1 2011-12-20 Robert Dewar <dewar@adacore.com>
3 * sem_ch3.adb, sem_ch5.adb, s-diinio.adb, s-diinio.ads, sem_dim.adb,
4 sem_dim.ads, sem_res.adb, s-stposu.adb, s-stposu.ads, sem_ch4.adb,
5 s-diflio.adb, s-diflio.ads, exp_disp.adb, s-llflex.ads: Minor
7 * aspects.ads: Dimension[_Aspects] are GNAT defined.
9 2011-12-20 Robert Dewar <dewar@adacore.com>
11 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Check
14 2011-12-20 Thomas Quinot <quinot@adacore.com>
16 * sem_cat.adb, sem_ch10.adb (Analyze_With_Clause): For a WITH clause on
17 a child unit that is an illegal instantiation, mark the WITH clause in
19 (Install_Siblings, Validate_Categorization_Dependency): Guard
20 against WITH clause marked as in error.
22 2011-12-20 Hristian Kirtchev <kirtchev@adacore.com>
24 * sem_res.adb (Resolve_Allocator): Warning on allocation
25 of tasks on a subpool and rewrite the allocator into a raise
26 Program_Error statement.
27 * s-stposu.ads, s-stposu.adb: Code reformatting.
28 (Create_Subpool): Remove formal parameter Storage_Size.
29 (Default_Subpool_For_Pool): Add the default implementation of this
31 (Set_Pool_Of_Subpool): Rename formal parameter Pool to To. Update
32 all the uses of the parameter.
34 2011-12-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
36 * gcc-interface/Makefile.in (%86 linux%):
37 (LIBGNAT_TARGET_PAIRS_32): Split off from LIBGNAT_TARGET_PAIRS.
38 (LIBGNAT_TARGET_PAIRS_64): New.
39 (LIBGNAT_TARGET_PAIRS): Add either depending on multilib.
41 2011-12-18 Eric Botcazou <ebotcazou@adacore.com>
43 * gcc-interface/decl.c (gnat_to_gnu_param): Add comment about double
44 reference and DECL_POINTS_TO_READONLY_P.
45 * gcc-interface/trans.c (Identifier_to_gnu) <by_ref>: Always set the
46 TREE_READONLY flag on the first dereference of a double dereference.
48 2011-12-15 Arnaud Charlet <charlet@adacore.com>
50 * a-numaux-vms.ads, s-asthan-vms-ia64.adb, s-auxdec-vms-ia64.adb,
51 s-memory-vms_64.adb, s-memory-vms_64.ads, s-osinte-vms-ia64.adb,
52 s-osinte-vms-ia64.ads, s-tasdeb-vms.adb: New files.
54 2011-12-15 Vincent Pucci <pucci@adacore.com>
56 * aspects.adb, aspects.ads Aspect_Dimension and
57 Aspect_Dimension_System added
58 * exp_ch6.adb (Expand_Call): Expand_Put_Call_With_Dimension_String
60 * gcc-interface/Make-lang.in: s-llflex, sem_dim added.
61 * impunit.adb :s-diflio and s-diinio defined as GNAT Defined
63 * Makefile.rtl: s-diflio, s-diinio and s-llflex added
64 * par-prag.adb, sem_prag.adb: Pragma_Dimension removed
65 * rtsfind.ads: Expon_LLF added
66 * sem_aggr.adb (Resolve_Aggregate): handles aggregate for
68 * sem_attr.adb (Resolve_Attribute): analyze dimension for
70 * sem_ch10.adb (Analyze_With_Clause): Avoid the warning messages
71 due to the use of a GNAT library for Dimension packages
72 * sem_ch13.adb (Analyze_Aspect_Specifications):
73 Aspect_Dimension and Aspect_Dimension_System cases added
74 (Check_Aspect_At_Freeze_Point): Aspect_Dimension and
75 Aspect_Dimension_System cases added
76 * sem_ch2.adb (Analyze_Identifier): analyze dimension for
78 * sem_ch3.adb (Analyze_Component_Declaration): analyze dimension
79 for component declaration (Analyze_Object_Declaration): analyze
80 dimension for object declaration (Analyze_Subtype_Declaration):
81 analyze dimension for subtype declaration
82 * sem_ch4.adb (Operator_Check): checks exponent is a rational
83 for dimensioned operand for a N_Op_Expon
84 * sem_ch5.adb (Analyze_Assignment): analyze dimension for
85 assignment (Analyze_Statements): removal of dimensions in all
87 * sem_ch6.adb (Analyze_Return_Statement): analyze dimension for
89 * sem_ch8.adb (Analyze_Object_Renaming): analyze dimension for
91 * sem_dim.adb, sem_dim.ads (Analyze_Aspect_Dimension):
92 analyze the expression for aspect dimension and store the
94 (Analyze_Aspect_Dimension_System): analyze
95 the expression for aspect dimension system and store the new
97 (Analyze_Dimension): propagates dimension
98 (Expand_Put_Call_With_Dimension_String): add the dimension
99 string as a suffix of the numeric value in the output
100 (Has_Dimension): return True if the node has a dimension
101 (Remove_Dimension_In_Declaration): removal of dimension in the
102 expression of the declaration.
103 (Remove_Dimension_In_Statement): removal of dimension in statement
104 * sem_res.adb (Resolve): analyze dimension if the node
105 has already been analyzed.
106 (Resolve_Arithmetic_Op): analyze
107 dimension for arithmetic op.
108 (Resolve_Call): analyze dimension for function call.
109 (Resolve_Comparison_Op): analyze dimension for comparison op.
110 (Resolve_Equality_Op): analyze dimension for equality op.
111 (Resolve_Indexed_Component): analyze dimension for indexed component.
112 (Resolve_Op_Expon): analyze dimension for op expon.
113 (Resolve_Selected_Component): analyze dimension
114 for selected component.
115 (Resolve_Slice): analyze dimension for slice.
116 (Resolve_Unary_Op): analyze dimension for unary op
117 (Resolve_Type_Conversion): analyze dimension for type conversion
118 (Resolve_Unchecked_Type_Conversion): analyze dimension for
119 unchecked type conversion
120 * snames.ads-tmpl Name_Dimension, Name_Dimension_System,
121 Name_Dim_Float_IO, Name_Dim_Integer_IO,
122 Name_Generic_Elementary_Functions, Name_Sqrt added.
123 Pragma_Dimension removed
124 * s-diflio.adb, s-diflio.ads New GNAT library generic package
125 for dimensioned float type IO
126 * s-diinio.adb, s-diinio.ads New GNAT library generic package
127 for dimensioned integer type IO
128 * s-llflex.ads (Expon_LLF): exponentiation routine for long long
129 floats operand and exponent
131 2011-12-15 Robert Dewar <dewar@adacore.com>
133 * sem_aggr.adb: Minor comment addition.
135 2011-12-15 Bob Duff <duff@adacore.com>
137 * s-tasren.adb (Task_Count): Do not call Yield; E'Count is not a
138 task dispatching point.
139 * s-taprop-mingw.adb (Yield): Do not yield if Do_Yield is False.
141 2011-12-15 Robert Dewar <dewar@adacore.com>
143 * sigtramp-ppcvxw.c, sigtramp.h: Fix header.
145 2011-12-15 Javier Miranda <miranda@adacore.com>
147 * exp_attr.adb (Expand_N_Attribute_Reference): For 'alignment
148 applied to a class-wide type under VM targets generate code which
149 invokes the function Get_Alignment to retrieve the value of the
150 alignment from the TSD.
151 * rtsfind.ads (RE_Get_Alignment): New entity.
153 2011-12-15 Robert Dewar <dewar@adacore.com>
155 * g-comlin.adb: Fix header.
157 2011-12-15 Tristan Gingold <gingold@adacore.com>
159 * gnatls.adb: Fix typo.
161 2011-12-15 Ed Falis <falis@adacore.com>
163 * s-tpopsp-vxworks.adb: Update comment.
165 2011-12-15 Ed Schonberg <schonberg@adacore.com>
167 * sem_aggr.adb (Resolve_Array_Aggregate, Resolve_Aggr_Expr); If
168 the component type has predicates, generate corresponding check.
169 (Resolve_Record_Aggregate, Resolve_Aggr_Expr): Ditto.
171 2011-12-13 Cesar Strauss <cestrauss@gmail.com>
172 Eric Botcazou <ebotcazou@adacore.com>
175 * types.h (Byte): Change typedef to 'unsigned char'.
176 * atree.h (struct Flag_Word): Use Byte for 'convention' field.
178 2011-12-12 Robert Dewar <dewar@adacore.com>
180 * s-taprop-mingw.adb: Minor reformatting.
182 2011-12-12 Nicolas Roche <roche@adacore.com>
184 * gcc-interface/Make-lang.in: Update dependencies.
185 Add gnattools4 target when building tools in canadian mode
187 2011-12-12 Javier Miranda <miranda@adacore.com>
189 * exp_disp.adb (Make_VM_TSD): Complete previous patch.
191 2011-12-12 Bob Duff <duff@adacore.com>
193 * s-tpobop.adb: Use named notation.
194 * g-bytswa.ads, s-taprop.ads: Minor comment fix.
196 2011-12-12 Arnaud Charlet <charlet@adacore.com>
198 * make.adb: Minor comment update.
200 2011-12-12 Robert Dewar <dewar@adacore.com>
202 * freeze.adb, s-taprop-mingw.adb, exp_disp.adb, sem_ch13.adb: Minor
205 2011-12-12 Robert Dewar <dewar@adacore.com>
207 * sem_ch6.adb, gnatls.adb: Minor reformatting.
209 2011-12-12 Ed Schonberg <schonberg@adacore.com>
211 * freeze.adb (Freeze_Entity): If a type declared in a generic
212 context has predicates, generate a freeze node for it.
213 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): If expression
214 has not been analyzed yet, entity has not been frozen, so analyze
217 2011-12-12 Javier Miranda <miranda@adacore.com>
219 * exp_disp.adb (Make_VM_TSD): Generate code to store the value of
220 'alignment in the TSD.
222 2011-12-12 Bob Duff <duff@adacore.com>
224 * s-taprop-mingw.adb (Yield): Do not delay 1 millisecond in Annex D
227 2011-12-12 Hristian Kirtchev <kirtchev@adacore.com>
229 * exp_ch4.adb (Expand_N_Allocator): Update the master of an
230 anonymous access-to-controlled type to utilize the heterogeneous
231 master associated with the current unit.
233 2011-12-12 Ed Schonberg <schonberg@adacore.com>
235 * sem_ch6.adb (Analyze_Expression_Function): If the function
236 is not a completion, pre-analyze the expression now to prevent
237 spurious visibility on later entities. The body is inserted at
238 the end of the current declaration list or package to prevent
239 early freezing, but the visibility is established at the point
242 2011-12-12 Bob Duff <duff@adacore.com>
244 * sem.adb, sem.ads: Add debugging routines.
246 2011-12-12 Tristan Gingold <gingold@adacore.com>
248 * gnatls.adb: (gnatls): Also add the objects dir in search list.
250 2011-12-12 Robert Dewar <dewar@adacore.com>
252 * exp_atag.adb, exp_atag.ads, exp_util.adb, exp_attr.adb,
253 sem_ch13.adb: Minor reformatting.
255 2011-12-12 Gary Dismukes <dismukes@adacore.com>
257 * sem_ch7.adb (Uninstall_Declarations): Don't
258 apply check for incomplete types used as a result type for an
259 access-to-function type when compiling for Ada 2012 or later.
260 * sem_ch6.adb (Analyze_Subprogram_Declaration):
261 Specialize error message for interface subprograms that are
262 not declared abstract nor null (functions can't be declared as
263 null). Also, remove "(Ada 2005)" from message.
265 2011-12-12 Robert Dewar <dewar@adacore.com>
267 * sem_prag.adb (GNAT_Pragma): Check comes from source.
269 2011-12-12 Robert Dewar <dewar@adacore.com>
271 * gnatls.adb: Minor reformatting.
273 2011-12-12 Javier Miranda <miranda@adacore.com>
275 * a-tags.ads (Alignment): New TSD field.
276 (Max_Predef_Prims): Value lowered to 15 (or 9 in case of
277 configurable runtime) Update documentation of predefined
278 primitives since Alignment has been removed.
279 * exp_disp.ads Update documentation of slots of dispatching
281 * exp_disp.adb (Default_Prim_Op_Position): Update slot
282 values since alignment is no longer a predefined primitive.
283 (Is_Predefined_Dispatch_Operation): Remove _alignment.
284 (Is_Predefined_Internal_Operation): Remove _alignment.
285 (Make_DT): Update static test on the value stored in a-tags.ads
286 for Max_Predef_Prims; store the value of 'alignment in the TSD.
287 * exp_atag.ads, exp_atag.adb (Build_Get_Alignment): New subprogram
288 that retrieves the alignment from the TSD
289 * exp_util.adb (Build_Allocated_Deallocate_Proc): For deallocation
290 of class-wide types obtain the value of alignment from the TSD.
291 * exp_attr.adb (Expand_N_Attribute_Reference): For 'alignment
292 applied to a class-wide type invoke Build_Get_Alignment to
293 generate code which retrieves the value of the alignment from
295 * rtsfind.ads (RE_Alignment): New Ada.Tags entity
296 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): For tagged
297 types if the value of the alignment is bigger than the Maximum
298 alignment then set the value of the alignment to the Maximum
299 alignment and report a warning.
300 * exp_ch3.adb (Make_Predefined_Primitive_Specs): Do not generate
302 (Predefined_Primitive_Bodies): Do not generate body of _alignment.
304 2011-12-12 Gary Dismukes <dismukes@adacore.com>
306 * freeze.adb (Freeze_Expression): Allow freezing of static
307 scalar subtypes that are prefixes of an attribute, even if not
308 yet marked static. Such attributes will get marked as static
309 later in Eval_Attribute (as called from Resolve_Attribute).
310 * sem_attr.adb (Eval_Attribute): Remove wrong code that does an
311 early return for attribute prefixes that are unfrozen source-level
312 types. This code was incorrectly bypassing folding of unfrozen
313 static subtype attributes in default expressions (the executable
314 example in the now-deleted comment was in fact illegal).
316 2011-12-12 Robert Dewar <dewar@adacore.com>
318 * a-coinve.adb, sem_res.adb, prj-nmsc.adb, a-cobove.adb, a-convec.adb,
319 gnatls.adb, sem_ch13.adb, prj-env.adb, prj-env.ads: Minor reformatting.
321 2011-12-12 Tristan Gingold <gingold@adacore.com>
323 * gsocket.h: Adjust previous patch.
325 2011-12-12 Thomas Quinot <quinot@adacore.com>
327 * exp_disp.adb: Minor reformatting.
329 2011-12-12 Tristan Gingold <gingold@adacore.com>
331 * gnatls.adb (Search_RTS): New procedure.
332 (Scan_Ls_Arg): Move code that search the RTS.
333 (Gnatls): search the RTS later.
334 * prj-env.ads, prj-env.adb (Get_Runtime_Path): New function.
336 2011-12-12 Ed Falis <falis@adacore.com>
338 * sysdep.c: Fix treatment of VxWorks task options so that run-times
339 built with __SPE__ get option VX_SPE_TASK while others get VX_FP_TASK.
341 2011-12-12 Bob Duff <duff@adacore.com>
343 * sem_type.adb, sem_type.ads, sem_ch4.adb, treepr.adb, treepr.ads:
344 Minor cleanup and fiddling with debug printouts.
346 2011-12-12 Vincent Celier <celier@adacore.com>
348 * prj-nmsc.adb (Get_Directories): For a non extending project,
349 always get a declared object and/or exec directory if it already
350 exists, even when there are no sources, but do not create them.
352 2011-12-12 Bob Duff <duff@adacore.com>
354 * sem_res.adb (Resolve): Deal with the case where an abstract
355 operator is called with operands of type universal_integer.
357 2011-12-12 Thomas Quinot <quinot@adacore.com>
359 * par_sco.adb: Minor fix to dominance marker referencing WHILE
362 2011-12-12 Tristan Gingold <gingold@adacore.com>
364 * mlib-tgt-specific-xi.adb: (Get_Target_Prefix): Simplify code.
366 2011-12-12 Thomas Quinot <quinot@adacore.com>
368 * par_sco.adb: Adjust dominant marker for branches of CASE
371 2011-12-12 Thomas Quinot <quinot@adacore.com>
373 * gsocket.h, s-oscons-tmplt.c: Ensure we do not include any system
374 header file prior to redefining FD_SETSIZE.
376 2011-12-12 Ed Schonberg <schonberg@adacore.com>
378 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): In
379 a generic context the aspect expressions may not have been
380 preanalyzed if there was no previous freeze point, so the
381 expressions must be preanalyzed now, and there is no conformance
382 to check for visibility changes.
384 2011-12-12 Matthew Heaney <heaney@adacore.com>
386 * a-convec.adb, a-coinve.adb, a-cobove.adb (Iterator): Use
387 subtype Index_Type'Base for Index component (Finalize): Remove
388 unnecessary access check (First, Last): Cursor return value
389 depends on iterator index value (Iterate): Use start position as
390 iterator index value (Next, Previous): Forward to corresponding
391 cursor-based operation.
392 * a-cborma.adb (Iterate): Properly initialize iterator object (with 0
395 2011-12-12 Robert Dewar <dewar@adacore.com>
397 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting.
399 2011-12-12 Steve Baird <baird@adacore.com>
401 * sem_ch3.adb (Check_Completion): Improve a comment.
403 2011-12-12 Tristan Gingold <gingold@adacore.com>
405 * cstand.adb: Minor comment fix.
407 2011-12-11 Eric Botcazou <ebotcazou@adacore.com>
409 * gcc-interface/utils2.c (gnat_build_constructor): Test the TREE_STATIC
410 flag of elements to compute that of the constructor.
412 2011-12-11 Eric Botcazou <ebotcazou@adacore.com>
414 * gcc-interface/decl.c (gnat_to_gnu_param): Set the restrict qualifier
415 on references built for parameters which aren't specifically by-ref.
417 2011-12-11 Eric Botcazou <ebotcazou@adacore.com>
419 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: If there is an
420 alignment set on a renaming, assert that the renamed object is aligned
421 enough as to make it possible to honor it.
423 2011-12-11 Eric Botcazou <ebotcazou@adacore.com>
425 * gcc-interface/trans.c (gigi): Initialize the linemap earlier.
427 2011-12-06 Dave Korn <dave.korn.cygwin@gmail.com>
429 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS [windows targets]):
430 Correctly detect cygwin, which no longer has the '32' suffix, and use
431 appropriate implementations of the sockets and memory packages.
432 * sysdep.c (WIN_SETMODE): New define to choose the correct spelling of
433 setmode/_setmode for MinGW and Cygwin, respectively.
434 (__gnat_set_binary_mode [windows targets]): Use the above, and enable
435 the windows version for Cygwin as well as MinGW.
436 (__gnat_set_text_mode [windows targets]): Likewise.
437 (__gnat_ttyname [windows targets]): Provide a Cygwin implementation
438 in addition to the MinGW version.
439 (__gnat_is_windows_xp): Make available to Cygwin as well as MinGW.
440 (__gnat_get_stack_bounds): Likewise.
442 2011-12-05 Bob Duff <duff@adacore.com>
444 * sem_ch4.adb: Minor comment fix.
446 2011-12-05 Robert Dewar <dewar@adacore.com>
448 * gnat_ugn.texi: Add documentation for -gnatw.e.
450 2011-12-05 Bob Duff <duff@adacore.com>
452 * treepr.adb (pn): Print something useful for
453 Elmt_Ids. Add Write_Eol to 'when others' case, so the output
454 will be seen immediately in gdb.
456 2011-12-05 Ed Schonberg <schonberg@adacore.com>
458 * lib-writ.adb (Output_Main_Program_Line): A generic subprogram
459 is never a main program.
461 2011-12-05 Thomas Quinot <quinot@adacore.com>
463 * par_sco.adb: Various minor adjustments to dominance markers
466 2011-12-05 Ed Schonberg <schonberg@adacore.com>
468 * sem_ch6.adb (Analyze_Expression_Function): If the function is
469 a completion, generate a body reference for its defining entity,
470 before rewriting the node as a body.
471 * sem_util.adb (Defining_Entity): Add entry for expression
474 2011-12-05 Bob Duff <duff@adacore.com>
476 * sem_ch3.adb (Derive_Progenitor_Subprograms): Add Ultimate_Alias
477 to the Comes_From_Source check, to deal properly with the case
478 of indirect inheritance of "=".
480 2011-12-05 Thomas Quinot <quinot@adacore.com>
483 * s-oscons-tmplt.c: On HP-UX, CLOCK_REALTIME is an enum literal,
486 2011-12-05 Thomas Quinot <quinot@adacore.com>
488 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Generate dominance
491 2011-12-02 Eric Botcazou <ebotcazou@adacore.com>
492 Thomas Quinot <quinot@adacore.com>
494 * gcc-interface/Makefile.in (INCLUDES): Remove $(srcdir)/config.
495 (INCLUDES_FOR_SUBDIR): Add $(fsrcdir) except for VxWorks.
496 Add thread.c to LIBGNAT_SRCS so that a symlink is created in ada/rts,
497 which allows the file to be installed in adainclude.
498 * gcc-interface/Make-lang.in: Update dependencies.
500 2011-12-02 Javier Miranda <miranda@adacore.com>
502 * sem_ch3.adb (Constrain_Access): Undo previous
503 patch for this routine. Required since the RM rule 3.7.1(7/3)
504 applies to all access types.
506 2011-12-02 Bob Duff <duff@adacore.com>
508 * sem_ch6.adb: Minor comment fix.
510 2011-12-02 Joel Sherrill <joel.sherrill@oarcorp.com>
512 * s-tpopsp-rtems.adb: Use ATCB_Key rather than RTEMS_Ada_Self variable
513 for consistency with other ports.
514 * s-osinte-rtems.adb: Add body for dummy implementation of
515 pthread_rwlockattr_setkind_np().
516 * s-osinte-rtems.ads: Add missing clock and rwlock bindings.
517 * terminals.c: Add __rtems__ conditionals to account for differences
518 in termios implementation.
520 2011-12-02 Robert Dewar <dewar@adacore.com>
522 * sem_ch3.adb, sem_attr.adb, a-comutr.adb, a-cbmutr.adb,
523 a-cbmutr.ads: Minor reformatting.
525 2011-12-02 Hristian Kirtchev <kirtchev@adacore.com>
527 * exp_dbug.adb: Comment reformatting.
528 (Get_External_Name): Use Reset_Buffers to reset the contents of
529 Name_Buffer and Homonym_Numbers.
530 (Qualify_All_Entity_Names): Reset the contents of Name_Buffer and
531 Homonym_Numbers before creating a new qualified name for a particular
533 (Reset_Buffers): New routine.
535 2011-12-02 Matthew Heaney <heaney@adacore.com>
537 * a-cbmutr.ads (No_Node): Moved declaration from body to spec
538 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Iterator): Derives
540 (Child_Iterator): Derives from Root_Iterator.
541 (Finalize): Implemented as an override operation for Root_Iterator.
542 (First): Return value depends on Subtree component.
543 (Last): Component was renamed from Parent to Subtree.
544 (Next): Checks parameter value, and uses simplified loop.
545 (Iterate): Forwards to Iterate_Subtree.
546 (Iterate_Children): Component was renamed from Parent to Subtree.
547 (Iterate_Subtree): Checks parameter value
549 2011-12-02 Robert Dewar <dewar@adacore.com>
551 * usage.adb: Add lines for -gnatw.n and -gnatw.N
552 (atomic sync info msgs).
554 2011-12-02 Steve Baird <baird@adacore.com>
556 * sem_ch3.adb (Check_Completion): An Ada 2012
557 generic formal type doesn't require a completion.
559 2011-12-02 Eric Botcazou <ebotcazou@adacore.com>
561 * sem_util.adb (Set_Debug_Info_Needed): Also set the flag on the
562 packed array type if it is to be set on the array type used to
565 2011-12-02 Robert Dewar <dewar@adacore.com>
567 * gnat_rm.texi: Eliminate confusing use of type name.
569 2011-12-02 Thomas Quinot <quinot@adacore.com>
571 * sem_ch10.adb (Analyze_Compilation_Unit): For a library subprogram
572 body that acts as spec, do not create a shallow copy of the context
573 clause for the synthetized spec (instead, use the same list as
576 2011-12-02 Bob Duff <duff@adacore.com>
578 * gnat_ugn.texi: Clarify usage of -p binder switch.
580 2011-12-02 Javier Miranda <miranda@adacore.com>
582 * sem_util.ads, sem_util.adb, sem_aux.ads, sem_aux.adb
583 (Effectively_Has_Constrained_Partial_View): Moved to sem_aux
584 (In_Generic_Body): Moved to sem_aux.
585 (Unit_Declaration_Node): Moved to sem_aux.
586 * einfo.ads (Effectively_Has_Constrained_Partial_View): Complete
588 * exp_attr.adb, live.adb, sem_ch10.adb, checks.adb, sem.adb,
589 rtsfind.adb, sem_attr.adb, sem_elab.adb, exp_ch4.adb, sem_ch4.adb,
590 exp_ch13.adb: Add with-clause on Sem_Aux.
592 2011-12-02 Yannick Moy <moy@adacore.com>
594 * sem_util.adb (Unique_Name): Reach through Unique_Entity to
595 get the name of the entity.
596 (Unique_Entity): Correct case for subprogram stubs.
598 2011-12-02 Yannick Moy <moy@adacore.com>
600 * sem_ch3.adb (Check_Initialization): Do not emit warning on
601 initialization of limited type object in Alfa mode.
603 2011-12-02 Robert Dewar <dewar@adacore.com>
605 * sinfo.ads: Minor reformatting.
606 * gnat_ugn.texi: Fix confusion in use of term "type name".
608 2011-12-02 Robert Dewar <dewar@adacore.com>
610 * sem_ch6.adb: Minor change in error message.
612 2011-12-02 Robert Dewar <dewar@adacore.com>
614 * sem_ch9.adb, prj-part.adb, vms_data.ads, sem_ch8.adb: Minor
617 2011-12-02 Javier Miranda <miranda@adacore.com>
619 * sem_ch3.adb (Constrain_Access): Enable on Ada 2005 mode the
620 static check of the rule of general access types whose designated
621 type has discriminants.
622 * sem_util.ads, sem_util.adb
623 (Effectively_Has_Constrained_Partial_View): New subprogram.
624 (In_Generic_Body): New subprogram.
625 * einfo.ads (Has_Constrained_Partial_View): Adding documentation.
626 * sem_prag.adb (Inside_Generic_Body): Removed. Replaced by new
627 subprogram In_Generic_Body.
628 * exp_attr.adb, checks.adb, sem_attr.adb, exp_ch4.adb,
629 sem_ch4.adb: In addition, this patch replaces the occurrences of
630 Has_Constrained_Partial_View by
631 Effectively_Has_Constrained_Partial_View.
633 2011-12-02 Matthew Heaney <heaney@adacore.com>
635 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Iterator): Rename
637 (Finalize): Remove unnecessary access check.
638 (First): Forward to First_Child.
639 (Last): Forward to Last_Child.
640 (Iterate): Check preconditions for parent node parameter.
641 (Next): Forward to Next_Sibling.
642 (Previous): Forward to Previous_Sibling.
644 2011-12-02 Robert Dewar <dewar@adacore.com>
646 * a-coinve.adb, a-coorma.adb, freeze.adb, a-coorse.adb, a-comutr.adb,
647 a-coormu.adb, a-convec.adb: Minor reformatting.
649 2011-12-02 Matthew Heaney <heaney@adacore.com>
651 * a-coormu.ads, a-ciormu.ads: Declare iterator factory function.
652 * a-ciormu.adb, a-ciormu.adb (Iterator): Declare concrete
654 (Finalize): Decrement busy counter.
655 (First, Last): Cursor return value depends on iterator node value.
656 (Iterate): Use start position as iterator node value.
657 (Next, Previous): Forward to corresponding cursor-based operation.
659 2011-12-02 Robert Dewar <dewar@adacore.com>
661 * a-cborma.adb, a-cbhama.adb, a-cbdlli.adb, a-cbmutr.adb,
662 a-cbhase.adb, a-cdlili.adb, a-cihama.adb, a-ciorse.adb, a-cidlli.adb,
663 a-cimutr.adb, a-cihase.adb, a-cohama.adb, a-cborse.adb,
664 a-ciorma.adb, a-cobove.adb: Minor reformatting.
666 2011-12-01 Jakub Jelinek <jakub@redhat.com>
669 * gcc-interface/Make-lang.in: Initialize RTS_DIR with = instead of :=.
671 2011-11-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
673 * s-taprop-tru64.adb (Create_Task): Use Unrestricted_Access.
675 2011-11-23 Thomas Quinot <quinot@adacore.com>
677 * thread.c, s-oscons-tmplt.c: Generate __gnat_pthread_condattr_setup
678 only on platforms where this is required, as determined by
681 2011-11-23 Ed Schonberg <schonberg@adacore.com>
683 * sem_ch9.adb: No check on entry index if error on index.
685 2011-11-23 Gary Dismukes <dismukes@adacore.com>
687 * sem_ch6.adb (Analyze_Return_Statement): Improve error messages for
688 return statements nested inside an extended_return_statement.
689 * gcc-interface/Make-lang.in: Update dependencies.
690 * gcc-interface/Makefile.in (MISCLIB): Add -lutil for BSD targets.
692 2011-11-23 Ed Schonberg <schonberg@adacore.com>
694 * freeze.adb (Freeze_All_Ent): An incomplete type is not
695 frozen by a subprogram body that does not come from source.
697 2011-11-23 Pascal Obry <obry@adacore.com>
699 * s-oscons-tmplt.c: Add PTY_Library constant. It contains
700 the library for pseudo terminal support.
701 * g-exptty.ads: Add pseudo-terminal library into a Linker_Options
704 2011-11-23 Ed Schonberg <schonberg@adacore.com>
706 * sem_ch9.adb: No check on entry family index if generic.
708 2011-11-23 Thomas Quinot <quinot@adacore.com>
710 * sem_ch9.adb, s-taprop.ads, s-taprop-hpux-dce.adb, s-taprop-irix.adb,
711 s-taprop-posix.adb, s-taprop-rtx.adb, s-taprop-solaris.adb,
712 s-taprop-tru64.adb, s-taprop-vxworks.adb: Move dependency on
713 System.OS_Constants from shared spec of
714 System.Tasking.Primitive_Operations to the specific body variants
715 that really require this dependency.
717 2011-11-23 Ed Schonberg <schonberg@adacore.com>
719 * sem_ch8.adb (Analyze_Subprogram_Renaming_Declaration):
720 If the declaration has aspects, analyze them so they can be
723 2011-11-23 Hristian Kirtchev <kirtchev@adacore.com>
725 * a-comutr.adb, a-coorma.adb, a-coorse.adb, a-convec.adb, a-cihase.adb,
726 a-cimutr.adb, a-coinve.adb, a-ciorma.adb, a-ciorse.adb, a-cobove.adb,
727 a-cohama.adb, a-cihama.adb, a-cidlli.adb, a-cdlili.adb, a-cbhama.adb,
728 a-cbhase.adb, a-cbmutr.adb, a-cborma.adb, a-cborse.adb, a-cbdlli.adb:
729 Add with and use clause for Ada.Finalization. Type
730 Iterator and Child_Iterator are now derived from Limited_Controlled.
731 (Finalize): New routine.
732 (Iterate): Add a renaming of counter Busy and
733 increment it. Update the return aggregate.
734 (Iterate_Children): Add a renaming of
735 counter Busy and increment it. Update the return aggregate.
736 (Iterate_Subtree): Add a renaming of counter Busy and increment
737 it. Update the return aggregate.
738 * a-cdlili.ads, a-cidlli.ads: Type List_Access is now a general access
740 * a-cihama.ads: Type Map_Access is now a general access type.
741 * a-comutr.ads, a-cimutr.ads: Use type Natural for the two locks
742 associated with the tree.
743 * a-cohama.ads: Type Map_Access is now a general access type.
744 * a-coinve.ads, a-convec.ads: Type Vector_Access is now a general
746 * exp_ch5.adb (Expand_Iterator_Loop): Do not create a block
747 to wrap the loop as this is done at an earlier step, during
748 analysis. The declarations of the iterator and the cursor use
749 the usual Insert_Action mechanism when added into the tree.
750 * sem_ch5.adb (Analyze_Loop_Statement): Remove local constant
751 Loop_Statement and replace all respective uses by N. Add local
752 constant Loc. Preanalyze the loop iterator to discover whether
753 it is a container iterator and if it is, wrap the loop in a
754 block. This ensures that any controlled temporaries produced
755 by the iteration scheme share the same lifetime of the loop.
756 (Is_Container_Iterator): New routine.
757 (Is_Wrapped_In_Block): New routine.
758 (Pre_Analyze_Range): Move spec and body to the library level.
760 2011-11-23 Sergey Rybin <rybin@adacore.com frybin>
762 * gnat_ugn.texi, vms_data.ads: Add documentation for new gnatpp option
763 that controls casing of type and subtype names.
765 2011-11-23 Yannick Moy <moy@adacore.com>
767 * sem_ch3.adb: Minor addition of comments.
769 2011-11-23 Thomas Quinot <quinot@adacore.com>
771 * prj-part.adb (Extension_Withs): New global variable,
772 contains the head of the list of WITH clauses from the EXTENDS
773 ALL projects for which virtual packages are being created.
774 (Look_For_Virtual_Projects_For): When recursing through
775 an EXTENDS ALL, add the WITH clauses of the extending
776 project to Extension_Withs. When adding a project to the
777 Virtual_Hash, record the associated Extension_Withs list.
778 (Create_Virtual_Extending_Project): Add a copy of the appropriate
779 Extension_Withs to the virtual project.
781 2011-11-23 Thomas Quinot <quinot@adacore.com>
783 * mlib-tgt-specific-vxworks.adb: Minor reformatting.
785 2011-11-23 Thomas Quinot <quinot@adacore.com>
787 * Make-generated.in (Sdefault.Target_Name): Set to
788 $(target_noncanonical) instead of $(target) for consistency.
790 2011-11-23 Matthew Heaney <heaney@adacore.com>
792 * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb (Iterator): Declared
793 Iterator type as limited (First, Last): Cursor return value
794 depends on iterator node value (Iterate): Use start position as
795 iterator node value (Next, Previous): Forward to corresponding
796 cursor-based operation.
798 2011-11-23 Matthew Heaney <heaney@adacore.com>
800 * a-coorse.ads, a-ciorse.ads, a-cborse.ads (Set_Iterator_Interfaces):
801 Renamed from Ordered_Set_Iterator_Interfaces.
802 * a-coorse.adb, a-ciorse.adb, a-cborse.adb (Iterator): Declared
803 Iterator type as limited (First, Last): Cursor return value
804 depends on iterator node value (Iterate): Use start position as
805 iterator node value (Next, Previous): Forward to corresponding
806 cursor-based operation.
807 * a-cohase.ads, a-cohase.adb: Implemented forward iterator.
808 * a-cihase.adb, a-cbhase.adb (Iterator): Removed unnecessary
809 node component (First, Next): Forward call to corresponding
810 cursor-based operation (Iterate): Representation of iterator no
811 longer has node component
813 2011-11-23 Hristian Kirtchev <kirtchev@adacore.com>
815 * exp_intr.adb (Expand_Unc_Deallocation): Ensure that the
816 dereference has a proper type before the side effect removal
818 * sem_ch3.adb (Analyze_Subtype_Declaration): Handle a rare case
819 where the base type of the subtype is a private itype created
820 to act as the partial view of a constrained record type. This
821 scenario manifests with equivalent class-wide types for records
822 with unknown discriminants.
824 2011-11-23 Jerome Guitton <guitton@adacore.com>
826 * s-osprim-vxworks.adb (Clock): Use Clock_RT_Ada.
828 2011-11-23 Thomas Quinot <quinot@adacore.com>
830 * s-oscons-tmplt.c: Fix unbalanced preprocessor directives Minor
831 reformatting/reorganization.
833 2011-11-23 Thomas Quinot <quinot@adacore.com>
835 * g-htable.ads: Remove old comments.
837 2011-11-23 Thomas Quinot <quinot@adacore.com>
839 * exp_imgv.adb: Minor reformatting.
841 2011-11-23 Robert Dewar <dewar@adacore.com>
843 * sem_ch9.adb (Analyze_Entry_Declaration): Check for entry
844 family bounds out of range.
846 2011-11-23 Matthew Heaney <heaney@adacore.com>
848 * a-cohama.adb, a-cihama.adb, a-cbhama.adb (Iterator): Declare
849 type as limited, and remove node component.
850 (First, Next): Forward call to corresponding cursor-based operation.
851 (Iterate): Representation of iterator no longer has node component.
853 2011-11-23 Yannick Moy <moy@adacore.com>
855 * exp_util.adb: Revert previous change to remove side-effects in Alfa
856 mode, which is not the correct thing to do for renamings.
858 2011-11-23 Thomas Quinot <quinot@adacore.com>
860 * s-osinte-hpux.ads, s-taprop-vxworks.adb, s-taprop-tru64.adb,
861 s-osinte-vxworks.ads, s-osinte-aix.ads, s-osinte-lynxos.ads,
862 s-osinte-solaris-posix.ads, s-taprop-solaris.adb, a-exetim-posix.adb,
863 s-osinte-irix.ads, s-osinte-solaris.ads, s-oscons-tmplt.c,
864 s-taprop-irix.adb, s-osinte-hpux-dce.ads, Makefile.rtl,
865 s-osinte-tru64.ads, s-osinte-darwin.ads, s-taprop.ads,
866 s-osinte-freebsd.ads, s-osinte-lynxos-3.ads, s-taprop-hpux-dce.adb,
867 s-taprop-posix.adb: Remove hard-coded clock ids;
868 instead, generate them in System.OS_Constants.
869 (System.OS_Constants.CLOCK_RT_Ada): New constant denoting the
870 id of the clock providing Ada.Real_Time.Monotonic_Clock.
871 * thread.c: New file.
872 (__gnat_pthread_condattr_setup): New function. For platforms where
873 CLOCK_RT_Ada is not CLOCK_REALTIME, set appropriate condition
876 2011-11-23 Yannick Moy <moy@adacore.com>
878 * sem_ch3.adb: Restore the use of Expander_Active instead of
879 Full_Expander_Active, so that the evaluation is forced in Alfa
880 mode too. Otherwise, we end up with an unexpected insertion in a
881 place where it is not supposed to happen, on default parameters
884 2011-11-23 Thomas Quinot <quinot@adacore.com>
886 * prj-pp.adb, prj-pp.ads: Minor new addition: wrapper procedure "wpr"
887 for Pretty_Print, for use from within gdb.
889 2011-11-23 Ed Schonberg <schonberg@adacore.com>
891 * exp_ch5.adb (Expand_Iterator_Loop): Wrap the expanded loop
892 and the cursor declarations in a block, so that the loop variable
893 is local to the construct.
895 2011-11-23 Matthew Heaney <heaney@adacore.com>
897 * a-coorma.ads, a-ciorma.ads, a-cborma.ads (Iterate): Returns
898 type Reversible_Iterator'Class.
899 * a-coorma.adb, a-ciorma.adb, a-cborma.adb (Iterator):
900 Declare type as limited.
901 (First, Last): Return value depends on iterator's start node value.
902 (Next, Previous): Call corresponding Cursor-based operation.
903 (Iterate): Indicate whether complete or partial iteration
905 2011-11-23 Robert Dewar <dewar@adacore.com>
907 * errout.adb: Minor reformattin (Finalize): Take templates into
908 account for warning suppression.
909 * errout.ads (Set_Specific_Warning_Off): Add Used parameter.
910 * erroutc.adb: Minor reformatting (Finalize): Take generic
911 templates into account for warning suppress.
912 * erroutc.ads (Set_Specific_Warning_Off): Add Used parameter.
913 * sem_prag.adb: Minor reformatting (Analyze_Pragma,
914 case Warnings): Provide Used parameter in call to
915 Set_Specific_Warnings_Off (to deal with generic template case).
917 2011-11-23 Pascal Obry <obry@adacore.com>
919 * sem_prag.adb (Process_Convention): Better error message for
920 stdcall convention on dispatching calls.
922 2011-11-23 Gary Dismukes <dismukes@adacore.com>
924 * sem_ch4.adb, sem_ch13.adb: Minor reformatting.
926 2011-11-23 Javier Miranda <miranda@adacore.com>
928 * exp_ch6.adb (Expand_Simple_Function_Return): Add missing
929 implicit type conversion when the returned object is allocated
930 in the secondary stack and the type of the returned object is
931 an interface. Done to force generation of displacement of the
934 2011-11-23 Pascal Obry <obry@adacore.com>
936 * impunit.adb: Add g-exptty and g-tty units.
938 2011-11-23 Robert Dewar <dewar@adacore.com>
940 * exp_imgv.adb: Minor code reorganization (use Make_Temporary).
942 2011-11-23 Robert Dewar <dewar@adacore.com>
944 * exp_util.adb, par-ch6.adb, sem_res.adb, par-util.adb: Minor
947 2011-11-23 Yannick Moy <moy@adacore.com>
949 * sem_ch13.adb (Analyze_Aspect_Specifications): Place error on
950 line of precondition/ postcondition/invariant.
952 2011-11-23 Pascal Obry <obry@adacore.com>
954 * g-exptty.ads, g-exptty.adb, g-tty.ads, g-tty.adb,
955 terminals.c: New files.
956 Makefile.rtl: Add these new files.
957 * gnat_rm.texi: Add documentation for GNAT.Expect.TTY.
958 * gcc-interface/Makefile.in: Add g-exptty, g-tty, terminals.o
959 * gcc-interface/Make-lang.in: Update dependencies.
961 2011-11-21 Robert Dewar <dewar@adacore.com>
963 * exp_imgv.adb (Expand_Width_Attribute): Handle case of Discard_Names.
964 * sem_attr.adb (Eval_Attribute, case Width): Ditto.
966 2011-11-21 Thomas Quinot <quinot@adacore.com>
968 * sinfo.ads: Minor reformatting.
970 2011-11-21 Yannick Moy <moy@adacore.com>
972 * exp_util.adb: Minor reformatting. Update comments.
974 2011-11-21 Robert Dewar <dewar@adacore.com>
976 * exp_prag.adb, exp_util.adb, sinfo.ads, sem_res.adb, s-stposu.adb,
977 sem_attr.adb, s-stposu.ads, s-taprop-solaris.adb, s-taprop-irix.adb,
978 sem_ch6.adb: Minor reformatting.
980 2011-11-21 Arnaud Charlet <charlet@adacore.com>
982 * s-taprop-irix.adb, s-taprop-solaris.adb (Create_Task): Use
983 Unrestricted_Access to deal with fact that we properly detect the
984 error if Access is used.
985 * gcc-interface/Make-lang.in: Update dependencies.
987 2011-11-21 Yannick Moy <moy@adacore.com>
989 * exp_prag.adb (Expand_Pragma_Check): Place error on first character
991 * sem_res.adb (Resolve_Short_Circuit): Place error on first
992 character of expression.
994 2011-11-21 Yannick Moy <moy@adacore.com>
996 * exp_util.adb (Remove_Side_Effects): Do nothing in Alfa mode.
998 2011-11-21 Hristian Kirtchev <kirtchev@adacore.com>
1000 * exp_attr.adb (Expand_N_Attribute_Reference, case
1001 Max_Size_In_Storage_Elements): Account for the size of the
1002 hidden list header which precedes controlled objects allocated
1004 * rtsfind.ads: Add RE_Header_Size_With_Padding to the runtime
1006 * sinfo.adb (Header_Size_Added): New routine.
1007 (Set_Header_Size_Added): New routine.
1008 * sinfo.ads: Add flag Controlled_Header_Added along with
1010 (Header_Size_Added): New inlined routine.
1011 (Set_Header_Size_Added): New inlined routine.
1012 * s-stposu.adb (Allocate_Any_Controlled): Use
1013 Header_Size_With_Padding to calculate the proper
1015 (Deallocate_Any_Controlled): Use
1016 Header_Size_With_Padding to calculate the proper size
1017 of the header. (Header_Size_With_Padding): New routine.
1018 (Nearest_Multiple_Rounded_Up): Removed along with its uses.
1019 * s-stposu.ads (Header_Size_With_Padding): New routine.
1021 2011-11-21 Ed Schonberg <schonberg@adacore.com>
1023 * aspects.adb: Aspect specifications are allowed on renaming
1025 * par-ch6.adb (P_Subprogram): Parse aspect specifications in a
1026 subprogram renaming declaration
1028 2011-11-21 Tristan Gingold <gingold@adacore.com>
1030 * env.c: Remove unused declaration.
1032 2011-11-21 Pascal Obry <obry@adacore.com>
1034 * s-os_lib.ads: Minor style fix.
1036 2011-11-21 Pascal Obry <obry@adacore.com>
1038 * adaint.c (__gnat_dup2): When fd are stdout, stdin or stderr and
1039 identical, do nothing on Windows XP.
1041 2011-11-21 Yannick Moy <moy@adacore.com>
1043 * sem_ch3.adb (Constrain_Index, Process_Range_Expr_In_Decl):
1044 Use Full_Expander_Active instead of Expander_Active to control
1045 the forced evaluation of expressions for the sake of generating
1048 2011-11-21 Thomas Quinot <quinot@adacore.com>
1050 * init.c: On FreeBSD, stack checking failures may raise SIGBUS.
1052 2011-11-21 Tristan Gingold <gingold@adacore.com>
1054 * sysdep.c (mode_read_text, mode_write_text, mode_append_text,
1055 mode_read_binary, mode_write_binary, mode_append_binary,
1056 mode_read_text_plus, mode_write_text_plus, mode_append_text_plus,
1057 mode_read_binary_plus, mode_write_binary_plus,
1058 mode_append_binary_plus): Remove unused declarations.
1060 2011-11-21 Yannick Moy <moy@adacore.com>
1062 * gnat_rm.texi: Minor rewording.
1064 2011-11-21 Hristian Kirtchev <kirtchev@adacore.com>
1066 * exp_imgv.adb (Expand_Width_Attribute): Emit
1067 an error message rather than a warning when pragma Discard_Names
1068 prevents the computation of 'Width. Do not emit an error through
1071 2011-11-21 Javier Miranda <miranda@adacore.com>
1073 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add
1074 implicit type conversion when the type of the allocator is an
1075 interface. Done to force generation of displacement of the "this"
1076 pointer when required.
1078 2011-11-21 Ed Schonberg <schonberg@adacore.com>
1080 * sinfo.ads, sinfo.adb: Corresponding_Spec applies to expression
1081 functions, and is set when the expression is a completion of a
1082 previous declaration.
1083 * sem_ch6.adb (Analyze_Expression_Function): To determine properly
1084 whether an expression function completes a previous declaration,
1085 use Find_Corresponding_Spec, as when analyzing a subprogram body.
1087 2011-11-21 Steve Baird <baird@adacore.com>
1089 * sem_util.adb (Deepest_Type_Access_Level): Improve comment.
1090 (Type_Access_Level): Improve comment.
1092 2011-11-21 Eric Botcazou <ebotcazou@adacore.com>
1094 * gcc-interface/Makefile.in (INCLUDES_FOR_SUBDIR): Add $(fsrcdir) by
1095 means of -iquote unconditionally.
1097 2011-11-21 Robert Dewar <dewar@adacore.com>
1099 * sem_ch3.adb, sem_util.adb, sem_res.adb, sem_attr.adb: Minor
1102 2011-11-21 Arnaud Charlet <charlet@adacore.com>
1104 * s-taprop-posix.adb (Create_Task): Use Unrestricted_Access
1105 to deal with fact that we properly detect the error if Access
1108 2011-11-21 Steve Baird <baird@adacore.com>
1110 * sem_util.ads: Update comment describing function
1111 Deepest_Access_Level.
1112 * sem_util.adb (Deepest_Type_Access_Level): Return Int'Last for a
1113 generic formal type.
1114 (Type_Access_Level): Return library level
1115 for a generic formal type.
1116 * sem_attr.adb (Resolve_Attribute): Replace two Type_Access_Level
1117 calls with calls to Deepest_Type_Access_Level.
1118 * sem_ch3.adb (Analyze_Component_Declaration): replace a
1119 Type_Access_Level call with a call to Deepest_Type_Access_Level.
1120 * sem_res.adb (Resolve_Allocator.Check_Allocator_Discrim_Accessibility):
1121 Replace three Type_Access_Level calls with calls to
1122 Deepest_Type_Access_Level.
1123 (Resolve_Allocator): Replace a Type_Access_Level call with a call to
1124 Deepest_Type_Access_Level.
1125 (Valid_Conversion.Valid_Array_Conversion): Replace a
1126 Type_Access_Level call with a call to Deepest_Type_Access_Level.
1128 2011-11-21 Robert Dewar <dewar@adacore.com>
1130 * sem_ch3.adb, s-taprop-vms.adb, opt.ads: Minor reformatting.
1132 2011-11-21 Robert Dewar <dewar@adacore.com>
1134 * sinput.ads: Minor comment fix.
1136 2011-11-21 Robert Dewar <dewar@adacore.com>
1138 * exp_attr.adb (Expand_N_Attribute_Reference, case First_Bit,
1139 Last_Bit, Position): Handle 2005 case.
1141 2011-11-21 Robert Dewar <dewar@adacore.com>
1143 * s-atocou-builtin.adb (Decrement): Use Unrestricted_Access
1144 to deal with fact that we properly detect the error if Access
1146 (Increment): Same fix.
1147 * s-taprop-linux.adb (Create_Task): Use Unrestricted_Access
1148 to deal with fact that we properly detect the error if Access
1150 * sem_util.adb (Is_Volatile_Object): Properly record that A.B is
1151 volatile if the B component is volatile. This affects the check
1152 for passing such a by reference volatile actual to a non-volatile
1153 formal (which should be illegal)
1155 2011-11-21 Robert Dewar <dewar@adacore.com>
1157 * freeze.adb (Freeze_Enumeration_Type): Make sure to set both
1158 size and alignment for foreign convention enumeration types.
1159 * layout.adb (Set_Elem_Alignment): Redo setting of alignment
1162 2011-11-21 Yannick Moy <moy@adacore.com>
1164 * checks.adb (Apply_Access_Check, Apply_Arithmetic_Overflow_Check,
1165 Apply_Discriminant_Check, Apply_Divide_Check,
1166 Apply_Selected_Length_Checks, Apply_Selected_Range_Checks,
1167 Build_Discriminant_Checks, Insert_Range_Checks, Selected_Length_Checks,
1168 Selected_Range_Checks): Replace reference to Expander_Active
1169 with reference to Full_Expander_Active, so that expansion of
1170 checks is not performed in Alfa mode
1172 2011-11-21 Tristan Gingold <gingold@adacore.com>
1174 * s-taprop-vms.adb (Create_Task): Use Unrestricted_Access to deal with
1175 fact that we properly detect the error if Access is used.
1177 2011-11-21 Hristian Kirtchev <kirtchev@adacore.com>
1179 * par-ch4.adb (P_Quantified_Expression): Add an Ada 2012 check.
1181 2011-11-21 Hristian Kirtchev <kirtchev@adacore.com>
1183 * exp_imgv.adb: Add with and use clause for Errout.
1184 (Expand_Width_Attribute): Emit a warning when in
1185 configurable run-time mode to provide a better diagnostic message.
1187 2011-11-21 Hristian Kirtchev <kirtchev@adacore.com>
1189 * s-finmas.adb (Finalize): Add comment concerning double finalization.
1191 2011-11-21 Ed Schonberg <schonberg@adacore.com>
1193 * sem_ch3.adb (Access_Definition): If the access definition
1194 is itself the return type of an access to function definition
1195 which is ultimately the return type of an access to subprogram
1196 declaration, its scope is the enclosing scope of the ultimate
1197 access to subprogram.
1199 2011-11-21 Steve Baird <baird@adacore.com>
1201 * sem_res.adb (Valid_Conversion): If a conversion was legal
1202 in the body of a generic, then the corresponding conversion is
1203 legal in the expanded body of an instance of the generic.
1205 2011-11-21 Robert Dewar <dewar@adacore.com>
1207 * sem_ch3.adb: Minor reformatting.
1209 2011-11-21 Robert Dewar <dewar@adacore.com>
1211 * s-utf_32.adb (Is_UTF_32_Line_Terminator): Recognize NEL as
1213 * sinput.ads: Add section on Handling of Source Line Terminators.
1214 * types.ads (Line_Terminator): Adjust comments.
1216 2011-11-21 Robert Dewar <dewar@adacore.com>
1218 * frontend.adb (Frontend): Capture restrictions from config files
1219 * lib-load.adb (Load_Unit): Save/set/restore restriction pragma
1221 * lib-xref.adb (Generate_Reference): Fix handling of obsolescent
1222 references. This was noticed during debugging, but it is not
1223 known if it causes real bugs.
1224 * restrict.ads, restrict.adb: New routines to save/set/restore
1225 non-partition-wide restrictions.
1226 * s-rident.ads: Comment changes for new handling of
1228 * sem.adb (Sem): Save/Set/Restore non-partition-wide restrictions
1229 * sem_ch10.adb (Analyze_Compilation_Unit): Remove incomplete
1230 attempt to save/restore non-partition-wide restrictions (now
1231 this work is all done in Sem).
1232 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
1233 Special handling for restriction No_Elaboration_Code.
1235 2011-11-21 Robert Dewar <dewar@adacore.com>
1237 * gnat_ugn.texi: Document new handling of restrictions pragmas.
1239 2011-11-21 Pascal Obry <obry@adacore.com>
1241 * s-taprop-linux.adb (Initialize_Lock): Do not allocate a cond
1242 attribute as not needed.
1244 2011-11-21 Robert Dewar <dewar@adacore.com>
1246 * sem_prag.adb: Minor reformatting.
1248 2011-11-21 Pascal Obry <obry@adacore.com>
1250 * gnat_rm.texi: Document restriction for stdcall convention on
1253 2011-11-21 Pascal Obry <obry@adacore.com>
1255 * sem_prag.adb (Process_Convention): A dispatching call cannot
1256 have a stdcall calling convention.
1258 2011-11-21 Pascal Obry <obry@adacore.com>
1260 * s-taprop-linux.adb (Initialize_Lock): Do not allocate a
1261 mutex attribute as not needed.
1262 (Initialize_TCB): Likewise.
1263 (Initialize): Likewise.
1265 2011-11-21 Robert Dewar <dewar@adacore.com>
1267 * sem_ch6.adb (Is_Public_Subprogram_For): New procedure
1268 (Process_PPCs): Invariants only apply to public subprograms.
1270 2011-11-21 Robert Dewar <dewar@adacore.com>
1272 * sem_util.adb, sem_util.ads, sem_attr.adb, restrict.adb,
1273 restrict.ads: Fix for No_Implicit_Aliasing in the renames case.
1275 2011-11-21 Robert Dewar <dewar@adacore.com>
1277 * a-finali.ads: Use pragma Pure_12 for this unit
1278 * aspects.adb: Add aspect Pure_12
1279 * aspects.ads: Add aspect Pure_12
1280 * opt.ads: Add note on Pure_12
1281 * par-prag.adb: Add dummy entry for Pure_12
1282 * sem_prag.adb: Implement Pure_12 pragma
1283 * snames.ads-tmpl: Add Entry for Pure_12
1285 2011-11-21 Sergey Rybin <rybin@adacore.com frybin>
1287 * vms_data.ads: Add qualifiers for new gnatpp options
1288 '--call_threshold' and '--par_threshold".
1289 * gnat_ugn.texi: Add description for new gnatpp options
1290 '--call_threshold' and '--par_threshold".
1292 2011-11-21 Robert Dewar <dewar@adacore.com>
1294 * lib.ads: Minor reformatting.
1296 2011-11-21 Robert Dewar <dewar@adacore.com>
1298 * lib-load.ads: Add comment.
1300 2011-11-21 Gary Dismukes <dismukes@adacore.com>
1302 * sem_elab.adb: Minor reformatting
1304 2011-11-21 Robert Dewar <dewar@adacore.com>
1306 * exp_ch6.adb: Minor reformatting.
1308 2011-11-21 Ed Schonberg <schonberg@adacore.com>
1310 * sem_ch12.adb (Check_Formal_Package_Instance): If a formal
1311 subprogram of the formal package is covered by an others
1312 association with a box initialization, no check is needed
1313 against the actual in the instantiation of the formal package.
1315 2011-11-21 Robert Dewar <dewar@adacore.com>
1317 * sem_elab.adb (Check_Internal_Call_Continue): Suppress junk
1318 elab warning from within precondition/postcondition etc.
1320 2011-11-21 Ed Schonberg <schonberg@adacore.com>
1322 * exp_ch6.adb (Expand_Actuals): In Ada 2012, a function call
1323 with out parameters may generate assignments to force constraint
1324 checks. These checks must be properly placed in the code after the
1325 declaration or statement that contains the call.
1327 2011-11-21 Fedor Rybin <frybin@adacore.com>
1329 * gnat_ugn.texi: Adding info on current gnattest limitations an
1330 support of -X option.
1332 2011-11-21 Robert Dewar <dewar@adacore.com>
1334 * a-cfdlli.adb, a-cbdlli.adb: Minor reformatting.
1336 2011-11-20 Robert Dewar <dewar@adacore.com>
1338 * exp_ch6.adb, exp_util.adb: Minor reformatting
1340 2011-11-20 Eric Botcazou <ebotcazou@adacore.com>
1342 * sinfo.ads (Reference): Document that it is OK to set
1343 Is_Known_Non_Null on a temporary initialized to a N_Reference
1346 2011-11-20 Matthew Heaney <heaney@adacore.com>
1348 * a-cbdlli.adb, a-cfdlli.adb (Move): Set Last component to 0
1351 2011-11-20 Eric Botcazou <ebotcazou@adacore.com>
1353 * exp_ch6.adb (Make_Build_In_Place_Call_In_Assignment):
1354 Declare NEW_EXPR local variable and attach the
1355 temporary to it. Set Is_Known_Non_Null on the temporary.
1356 (Make_Build_In_Place_Call_In_Object_Declaration): Likewise.
1357 * exp_util.adb (Remove_Side_Effects): Set Is_Known_Non_Null on
1358 the temporary created to hold the 'Reference of the expression,
1360 * checks.adb (Install_Null_Excluding_Check): Bail out for the
1361 Get_Current_Excep.all.all idiom generated by the expander.
1363 2011-11-20 Eric Botcazou <ebotcazou@adacore.com>
1365 * gcc-interface/trans.c (struct language_function): Add GNAT_RET.
1366 (f_gnat_ret): New macro.
1367 (struct nrv_data): Add GNAT_RET.
1368 (finalize_nrv_unc_r): New helper function.
1369 (finalize_nrv): Add GNAT_RET parameter. Copy it into DATA. If the
1370 function returns unconstrained, use finalize_nrv_unc_r as callback.
1371 (return_value_ok_for_nrv_p): Test the alignment of RET_OBJ only if
1372 RET_OBJ is non-null.
1373 (Subprogram_Body_to_gnu): Pass GNAT_RET to finalize_nrv.
1374 (gnat_to_gnu) <N_Return_Statement>: In the return-unconstrained case,
1375 if optimization is enabled, record candidates for the Named Return
1378 2011-11-20 Eric Botcazou <ebotcazou@adacore.com>
1380 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Add comment.
1381 (gnat_to_gnu) <N_Return_Statement>: Add 'else' to avoid doing a useless
1382 test. Tweak default case.
1383 <N_Goto_Statement>: Use better formatting.
1384 * gcc-interface/utils2.c (maybe_wrap_malloc): Use INIT_EXPR instead of
1385 MODIFY_EXPR to initialize the storage.
1386 (build_allocator): Likewise.
1388 2011-11-20 Eric Botcazou <ebotcazou@adacore.com>
1390 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Adjust
1391 call to components_to_record.
1392 (components_to_record): Add FIRST_FREE_POS parameter. For the variant
1393 part, reuse enclosing union even if there is a representation clause
1394 on the Unchecked_Union. If there is a variant part, compute the new
1395 first free position, if any. Adjust call to self. Use a single field
1396 directly only if it hasn't got a representation clause or is placed at
1397 offset zero. Create the variant part at offset 0 if all the fields
1398 down to this level have a rep clause. Do not chain the variant part
1399 immediately and adjust downstream.
1400 Do not test ALL_REP before moving the fields without rep clause to the
1401 previous level. Call create_rep_part to create the REP part and force
1402 a minimum size on it if necessary. Do not chain it immediately.
1403 Create a fake REP part if there are fields without rep clause that need
1404 to be laid out starting from FIRST_FREE_POS.
1405 At the end, chain the REP part and then the variant part.
1406 (create_rep_part): New function.
1407 (get_rep_part): Minor tweak.
1408 * gcc-interface/utils.c (tree_code_for_record_type): Minor tweak.
1410 2011-11-18 Iain Sandoe <iains@gcc.gnu.org>
1413 * init.c (__gnat_error_handler) [Darwin]: Move workaround to the
1414 bug filed as radar #10302855 from __gnat_error_handler to...
1415 (__gnat_adjust_context_for_raise) [Darwin]: ...here. New function.
1416 (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE) [Darwin]: Define.
1418 2011-11-18 Tristan Gingold <gingold@adacore.com>
1419 Iain Sandoe <iains@gcc.gnu.org>
1422 * mlib-tgt-specific-darwin.adb (Archive_Indexer_Options): Remove.
1423 * gcc-interface/Makefile.in (darwin): Remove ranlib special-casing.
1425 2011-11-12 Iain Sandoe <iains@gcc.gnu.org>
1427 * gcc-interface/Makefile.in (stamp-gnatlib-$(RTSDIR)): Don't link
1429 (OSCONS_CPP, OSCONS_EXTRACT): New.
1430 (./bldtools/oscons/xoscons): New target.
1431 ($(RTSDIR)/s-oscons.ads): Likewise.
1432 (gnatlib): Depend on $(RTSDIR)/s-oscons.ads.
1433 * gcc-interface/Make-lang.in (ada/s-oscons.ads) Remove as dependency.
1434 * Make-generated.in: Remove machinery to generate xoscons and
1437 2011-11-10 Eric Botcazou <ebotcazou@adacore.com>
1439 * fe.h (Serious_Errors_Detected): New macro.
1440 * gcc-interface/gigi.h (build_atomic_load): Declare.
1441 (build_atomic_store): Likewise.
1442 * gcc-interface/trans.c (atomic_sync_required_p): New predicate.
1443 (call_to_gnu): Add ATOMIC_SYNC parameter. Use local variable.
1444 Build an atomic load for an In or In Out parameter if needed.
1445 Build an atomic store for the assignment of an Out parameter if needed.
1446 Build an atomic store to the target if ATOMIC_SYNC is true.
1447 (present_in_lhs_or_actual_p): New predicate.
1448 (gnat_to_gnu) <N_Identifier>: Build an atomic load if needed.
1449 <N_Explicit_Dereference>: Likewise.
1450 <N_Indexed_Component>: Likewise.
1451 <N_Selected_Component>: Likewise.
1452 <N_Assignment_Statement>: Adjust call to call_to_gnu.
1453 Build an atomic store to the LHS if needed.
1454 <N_Function_Call>: Adjust call to call_to_gnu.
1455 * gcc-interface/utils2.c: Include toplev.h.
1456 (resolve_atomic_size): New static function.
1457 (build_atomic_load): New function.
1458 (build_atomic_store): Likewise.
1459 * gcc-interface/Make-lang.in (ada/utils2.o): Add toplev.h.
1461 2011-11-07 Olivier Hainque <hainque@adacore.com>
1463 * sigtramp-ppcvxw.c: Add general comments.
1464 (CFI_COMMON_REGS): Remove rule for r1, as in other unwinders. Add
1465 rules for r2 to r13, plus CTR and XER.
1466 (CFA_REG): New, register number used to hold the local CFA.
1467 (CFI_DEF_CFA, SIGTRAMP_BODY): Use it.
1468 Make that 15, not 14, with documentation.
1469 (TCR): Undef before definition, preventing conflict with reg number in
1472 2011-11-07 Robert Dewar <dewar@adacore.com>
1474 * exp_util.ads, exp_alfa.adb, a-cohama.adb, a-cohama.ads, sem_ch4.adb,
1475 aspects.ads, exp_ch8.adb, exp_ch8.ads, atree.ads: Minor reformatting.
1476 * gcc-interface/Make-lang.in: Update dependencies.
1478 2011-11-07 Ed Schonberg <schonberg@adacore.com>
1480 * exp_ch6.adb: A tagged type is a legal actual for an aliased
1483 2011-11-07 Pascal Obry <obry@adacore.com>
1485 * g-socket.adb, g-socket.ads: Minor reformatting.
1487 2011-11-07 Robert Dewar <dewar@adacore.com>
1489 * sem_res.adb (Resolve_Actuals): Minor error message improvement.
1491 2011-11-07 Robert Dewar <dewar@adacore.com>
1493 * gnat_ugn.texi: Add discussion of default mode handling of
1494 source representation with no -gnatW option given, in particular
1495 noting that NEL (next line) is not recognized in this context.
1497 2011-11-07 Yannick Moy <moy@adacore.com>
1499 * sem_util.adb (Note_Possible_Modification): In Alfa mode,
1500 generate a reference for a modification even when the modification
1501 does not come from source.
1503 2011-11-07 Ed Schonberg <schonberg@adacore.com>
1505 * exp_ch5.adb (Expand_Iterator_Loop): For the "of" iterator form,
1506 use the indexing attributes rather than the Element function,
1507 to obtain variable references.
1508 * sem_ch4.adb (Try_Container_Indexing): Code cleanup. Use
1509 Find_Aspect rather than iterating over representation
1510 items. Improve error message.
1511 * a-cohama.adb, a-cohama.ads Update to latest RM, with two versions
1512 of Reference functions.
1514 2011-11-07 Yannick Moy <moy@adacore.com>
1516 * sem_util.adb (Unique_Entity): For a parameter on a subprogram
1517 body that has a corresponding parameter on the subprogram
1518 declaration, define the unique entity as being the declaration
1521 2011-11-07 Ed Schonberg <schonberg@adacore.com>
1523 * sem_ch6.adb (Analyze_Return_Type): In Ada 2012 mode, if the
1524 return type of a function is the class-wide type of an incomplete
1525 type T, T can be a Taft-amendment type and does not have to be
1526 completed in the current private part.
1528 2011-11-07 Ed Schonberg <schonberg@adacore.com>
1530 * aspects.ads (Inherited_Aspect): Map that indicates type aspects
1531 that are inherited by default, and apply to the class-wide type
1533 * aspects.adb (Find_Aspect): If the entity is class-wide and the
1534 aspect is inherited, use the aspect of the specific type.
1536 2011-11-07 Hristian Kirtchev <kirtchev@adacore.com>
1538 * exp_alfa.adb: Remove with and use clause for
1539 Exp_Ch8. Add with and use clause for Exp_Util.
1540 Remove local constant Disable_Processing_Of_Renamings.
1541 (Expand_Alfa_N_Object_Renaming_Declaration): The expansion of
1542 object renamings has been reenabled.
1543 (Expand_Possible_Renaming):
1544 The expansion of identifier and expanded names has been
1545 reenabled. Perform the substitutions only for entities that
1547 * exp_ch8.ads, exp_ch8.adb (Evaluate_Name): Moved to Exp_Util.
1548 * exp_util.adb (Evaluate_Name): Moved from Exp_Ch8.
1549 (Remove_Side_Effects): Alphabetize local variables. Add a guard
1550 to avoid the infinite expansion of an expression in Alfa mode. Add
1551 processing for function calls in Alfa mode.
1552 * exp_util.ads (Evaliate_Name): Moved from Exp_Ch8.
1554 2011-11-07 Ed Schonberg <schonberg@adacore.com>
1556 * freeze.adb (Freeze_Entity): If the entity is an access to
1557 subprogram whose designated type is itself a subprogram type,
1558 its own return type must be decorated with size information.
1560 2011-11-04 Arnaud Charlet <charlet@adacore.com>
1562 * gcc-interface/Make-lang.in: Update dependencies.
1564 2011-11-04 Robert Dewar <dewar@adacore.com>
1566 * sprint.adb (Sprint_Node_Actual, case Qualified_Expression):
1567 Avoid junk semicolon after argument of machine code Asm operand.
1569 2011-11-04 Robert Dewar <dewar@adacore.com>
1571 * exp_ch11.adb (Generate_Push_Pop): Inhibit push/pop nodes in
1572 CodePeer mode or if restriction No_Exception_Handlers is present.
1573 * exp_ch6.adb (Expand_N_Subprogram_Body): (Inhibit push/pop
1574 nodes in CodePeer mode or if restriction No_Exception_Handlers
1577 2011-11-04 Robert Dewar <dewar@adacore.com>
1579 * s-tassta.adb, atree.ads, errout.adb, sinput.adb: Minor reformatting.
1581 2011-11-04 Ed Schonberg <schonberg@adacore.com>
1583 * sem_ch6.adb (Analyze_Subprogram_Specification): The
1584 specification is legal if it is a function that returns an
1585 abstract type, if it comes from an attribute renaming of a stream
1586 attribute of an abstract type.
1588 2011-11-04 Gary Dismukes <dismukes@adacore.com>
1590 * exp_util.adb (Is_Possibly_Unaligned_Object): In case of indexed
1591 components, check whether recursively check whether the prefix
1592 denotes an unaligned object.
1594 2011-11-04 Ed Schonberg <schonberg@adacore.com>
1596 * sem_prag.adb (Analyze_Pragma, case Debug): The argument of
1597 the pragma is legal if it is an expanded name that denotes a
1598 procedure that be can called without parameters.
1600 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
1602 * gnat_ugn.texi (Performance Considerations) <Vectorization
1603 of loops>: New sub-section. <Other Optimization Switches>:
1606 2011-11-04 Robert Dewar <dewar@adacore.com>
1608 * gnat_rm.texi: Minor reformatting.
1610 2011-11-04 Matthew Heaney <heaney@adacore.com>
1612 * a-convec.adb, a-coinve.adb, a-cobove.adb (Merge): Raise PE
1613 when Target and Source denote same non-empty object
1614 * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb (Merge): Ditto
1616 2011-11-04 Robert Dewar <dewar@adacore.com>
1618 * exp_attr.adb: Minor reformatting.
1620 2011-11-04 Ed Schonberg <schonberg@adacore.com>
1622 * exp_ch5.adb (Expand_Assign_Record): Do not generate a
1623 discriminant assignment within an initialization proc if the
1624 record is an unchecked union, as it can only come from the
1625 initialization of an unchecked union component.
1627 2011-11-04 Robert Dewar <dewar@adacore.com>
1629 * gnat_ugn.texi: Minor reformatting.
1631 2011-11-04 Robert Dewar <dewar@adacore.com>
1633 * par-labl.adb (Rewrite_As_Loop): Generate info msg rather than
1636 2011-11-04 Robert Dewar <dewar@adacore.com>
1638 * exp_ch4.adb: Minor code reorganization (remove junk obsolete
1641 2011-11-04 Hristian Kirtchev <kirtchev@adacore.com>
1643 * exp_alfa.adb: Add local constant
1644 Disable_Processing_Of_Renamings;
1645 (Expand_Alfa_N_Object_Renaming_Declaration): Disable
1646 the name evaluation of object renamings for now.
1647 (Expand_Potential_Renaming): Do not perform the substitution
1649 * exp_util.adb (Remove_Side_Effects): Remove processing for
1650 functions with side effects in Alfa mode.
1652 2011-11-04 Gary Dismukes <dismukes@adacore.com>
1654 * bindgen.adb (Gen_Elab_Calls): In the case
1655 of the AAMP target, set elaboration entities to 1 rather than
1658 2011-11-04 Ed Schonberg <schonberg@adacore.com>
1660 * sem_ch10.adb (Install_Limited_With_Unit): To establish the
1661 proper entities on the ancestors of a child unit that appear
1662 in a limited_with clause, follow the unit links because the
1663 units are not analyzed and scope information is incomplete.
1665 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
1667 * exp_ch4.adb (Expand_N_Selected_Component): Refine code
1668 setting the Atomic_Sync_Required flag to detect one more case.
1669 * exp_util.adb (Activate_Atomic_Synchronization): Refine code
1670 setting the Atomic_Sync_Required flag to exclude more cases,
1671 depending on the parent of the node to be examined.
1673 2011-11-04 Bob Duff <duff@adacore.com>
1675 * g-excact.adb: Minor: use named notation.
1677 2011-11-04 Ed Schonberg <schonberg@adacore.com>
1679 * sem_ch5.adb: Improve error messages for illegal iterators.
1681 2011-11-04 Hristian Kirtchev <kirtchev@adacore.com>
1683 * exp_alfa.adb: Add with and use clauses for Exp_Ch8 and
1685 (Expand_Alfa): Alphabetize cases on first choice. Add
1686 processing for object renaming declarations, identifiers and
1688 (Expand_Alfa_N_In): Remove useless return.
1689 (Expand_Alfa_N_Object_Renaming_Declaration): New routine.
1690 (Expand_Potential_Renaming): New routine.
1691 * exp_ch8.adb (Evaluate_Name): Moved to the top level.
1692 (Expand_N_Object_Declaration): Alphabetize local variables. Move
1693 Evaluate_Name out to the top level.
1694 * exp_ch8.ads (Evaluate_Name): Moved from body to package spec.
1695 * exp_util.adb (Remove_Side_Effects): Add processing for
1696 functions with side effects in Alfa mode.
1698 2011-11-04 Hristian Kirtchev <kirtchev@adacore.com>
1700 * gnat_rm.texi: Add entries for
1701 restrictions No_Relative_Delay, No_Requeue_Statements and
1702 No_Stream_Optimizations.
1704 2011-11-04 Ed Schonberg <schonberg@adacore.com>
1706 * sem_ch4.adb: Set type of entity in prefixed call, for
1707 completeness in a generic context.
1709 2011-11-04 Yannick Moy <moy@adacore.com>
1711 * sem_prag.adb: Minor refactoring (renaming of a parameter).
1713 2011-11-04 Robert Dewar <dewar@adacore.com>
1715 * atree.ads: Minor reformatting.
1717 2011-11-04 Robert Dewar <dewar@adacore.com>
1719 * checks.adb (Atomic_Synchronization_Disabled): Check -gnatd.d
1721 * exp_ch2.adb (Expand_Entity_Reference): Use
1722 Activate_Atomic_Synchronization
1723 * exp_ch4.adb (Expand_N_Explicit_Dereference): Use
1724 Activate_Atomic_Synchronization (Expand_N_Indexed_Compoonent):
1725 Activate_Atomic_Synchronization (Expand_N_Selected_Component):
1726 Use Activate_Atomic_Synchronization
1727 * exp_util.ads, exp_util.adb (Activate_Atomic_Synchronization): New
1729 * sinfo.ads, sinfo.adb (Atomic_Sync_Required): Can now apply to
1730 N_Selected_Component node
1732 2011-11-04 Robert Dewar <dewar@adacore.com>
1734 * sem_prag.adb, atree.ads, prj-env.adb, prj-env.ads: Minor reformatting.
1736 2011-11-04 Yannick Moy <moy@adacore.com>
1738 * atree.adb, atree.ads (Set_Original_Node): New set procedure.
1739 * sem_ch13.adb (Analyze_Aspect_Specifications/Pre_Post_Aspects):
1740 In ASIS mode, no splitting of aspects between conjuncts.
1741 (Analyze_Aspect_Specifications/Aspect_Test_Case): Make pragma
1742 expressions refer to the original aspect expressions through
1743 the Original_Node link. This is used in semantic analysis for
1744 ASIS mode, so that the original expression also gets analyzed.
1745 * sem_prag.adb (Preanalyze_TC_Args,
1746 Check_Precondition_Postcondition,
1747 Analyze_Pragma/Pragma_Test_Case): In ASIS mode, for a pragma
1748 generated from a source aspect, also analyze the original aspect
1750 (Check_Expr_Is_Static_Expression): New procedure
1751 similar to existing procedure Check_Arg_Is_Static_Expression,
1752 except called on expression inside pragma.
1754 2011-11-04 Tristan Gingold <gingold@adacore.com>
1756 * prj-env.adb, prj-env.ads (Find_Name_In_Path): New function, from
1757 Find_Project.Try_Path_Name.
1758 (Find_Project): Use Find_Name_In_Path to implement Try_Path_Name.
1760 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
1762 * s-atocou.ads (Atomic_Counter): Remove redundant pragma Volatile.
1764 2011-11-04 Pascal Obry <obry@adacore.com>
1766 * projects.texi: Add short description for qualifiers aggregate
1767 and aggregate library.
1769 2011-11-04 Matthew Heaney <heaney@adacore.com>
1771 * Makefile.rtl, impunit.adb: Added a-cogeso.ad[sb]
1772 * a-cgaaso.adb: Replaced implementation with instantiation
1774 * a-cogeso.ad[sb] This is the new Ada 2012 unit
1775 Ada.Containers.Generic_Sort
1777 2011-11-04 Robert Dewar <dewar@adacore.com>
1779 * exp_ch2.adb (Expand_Entity_Reference): Do not set
1780 Atomic_Sync_Required for the case of a prefix of an attribute.
1781 * exp_ch4.adb (Expand_N_Explicit_Dereference): May require
1782 atomic synchronization
1783 (Expand_N_Indexed_Component): Ditto.
1784 (Expand_B_Selected_Component): Ditto.
1785 * sem_prag.adb (Process_Suppress_Unsuppress):
1786 Disable/Enable_Atomic_Synchronization can now occur for array
1787 types with pragma Atomic_Components.
1788 * sinfo.ads, sinfo.adb (Atomic_Sync_Required): Can now occur on
1789 N_Explicit_Dereference nodes and on N_Indexed_Component nodes.
1791 2011-11-04 Gary Dismukes <dismukes@adacore.com>
1793 * gnat_ugn.texi: Editorial corrections for gnattest section.
1795 2011-11-04 Robert Dewar <dewar@adacore.com>
1797 * sem_prag.adb: Minor reformatting.
1798 * gnat_rm.texi: Update documentation for pragma Warnings (Off,
1800 * exp_ch2.adb (Expand_Entity_Reference): Only set
1801 Atomic_Sync_Required on entities that are variables. Doesn't
1802 make any sense on anything else.
1804 2011-11-04 Robert Dewar <dewar@adacore.com>
1806 * exp_ch2.adb (Expand_Entity_Reference): Extend handling of
1807 atomic sync to type case.
1808 * sem_prag.adb (Process_Suppress_Unsuppress): Atomic Sync can
1811 2011-11-04 Robert Dewar <dewar@adacore.com>
1813 * sem_warn.adb (Warn_On_Useless_Assignment): More accurate test
1815 * gcc-interface/Make-lang.in: Update dependencies.
1817 2011-11-04 Robert Dewar <dewar@adacore.com>
1819 * sem_prag.adb: Detect more cases of Long_Float inconsistencies at
1822 2011-11-04 Matthew Heaney <heaney@adacore.com>
1824 * Makefile.rtl, impunit.adb: Added a-sfecin.ads,
1825 * a-sfhcin.ads, a-sflcin.ads, a-sbecin.ad[sb], a-sbhcin.ad[sb],
1826 a-sblcin.ad[sb], a-suecin.ad[sb], a-suhcin.ad[sb], a-sulcin.ad[sb]
1827 * a-sfecin.ads, a-sfhcin.ads, a-sflcin.ads, a-sbecin.ad[sb],
1828 a-sbhcin.ad[sb], a-sblcin.ad[sb], a-suecin.ad[sb], a-suhcin.ad[sb],
1829 a-sulcin.ad[sb]: New files.
1831 2011-11-04 Geert Bosch <bosch@adacore.com>
1833 * i-forbla-unimplemented.ads, s-gecola.adb, s-gecola.ads,
1834 s-gerebl.adb, s-gerebl.ads, i-forbla.adb, i-forbla.ads,
1835 i-forlap.ads, i-forbla-darwin.adb, s-gecobl.adb, s-gecobl.ads,
1836 s-gerela.adb, s-gerela.ads: Remove partial interface to BLAS/LAPACK.
1837 * gcc-interface/Makefile.in: Remove libgnala and related objects.
1839 2011-11-04 Matthew Heaney <heaney@adacore.com>
1841 * a-cdlili.ad[sb], a-cidlli.ad[sb], a-coorse.ad[sb], a-ciorse.ad[sb],
1842 a-coorma.ad[sb], a-ciorma.ad[sb], a-coormu.ad[sb], a-ciormu.ad[sb],
1843 a-cohama.ad[sb], a-cihama.ad[sb], a-cohase.ad[sb], a-cihase.ad[sb],
1844 a-convec.ad[sb], a-coinve.ad[sb] (Assign, Copy): New operations
1847 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
1849 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Do not assert
1850 that the type of the parameters isn't dummy in type_annotate_only mode.
1852 2011-11-04 Robert Dewar <dewar@adacore.com>
1854 * sem_ch12.adb: Minor reformatting
1856 2011-11-04 Gary Dismukes <dismukes@adacore.com>
1858 * bindgen.adb (Gen_Elab_Calls): In the case of the AAMP target,
1859 initialize elaboration entities to zero when specs are processed.
1861 2011-10-28 Iain Sandoe <iains@gcc.gnu.org>
1862 Eric Botcazou <ebotcazou@adacore.com>
1865 * init.c (__gnat_error_handler) [Darwin]: Apply a work-around to the
1866 bug filed as radar #10302855 (inconsistent unwind data for sigtramp).
1868 2011-10-28 Eric Botcazou <ebotcazou@adacore.com>
1871 * gcc-interface/Makefile.in (SYMDEPS): Delete.
1872 (LIBICONV): New variable.
1873 (LIBICONV_DEP): Likewise.
1874 (LIBS): Add $(LIBICONV).
1875 (LIBDEPS): Add $(LIBICONV_DEP).
1876 (EXTRA_GNATTOOLS_OBJS): Merge into...
1877 (TOOLS_LIBS): ...this. Add $(LIBICONV).
1879 2011-10-26 Eric Botcazou <ebotcazou@adacore.com>
1881 * gcc-interface/decl.c (elaborate_expression_1): Add EXPR_PUBLIC_P local
1882 variable. Always create the elaboration variable, if any, as constant.
1884 2011-10-26 Eric Botcazou <ebotcazou@adacore.com>
1886 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Try to
1887 make a packable type for fields of union types as well.
1888 <is_type>: Use RECORD_OR_UNION_TYPE_P predicate.
1889 (gnat_to_gnu_component_type): Try to make a packable type for fields
1890 of union types as well.
1891 (make_packable_type): Use RECORD_OR_UNION_TYPE_P predicate.
1892 (maybe_pad_type): Try to make a packable type for fields of union types
1894 (gnat_to_gnu_field): Likewise.
1895 (is_variable_size): Use RECORD_OR_UNION_TYPE_P predicate.
1896 (set_rm_size): Likewise.
1897 (rm_size): Likewise.
1898 * gcc-interface/misc.c (gnat_type_max_size): Likewise.
1899 * gcc-interface/trans.c (add_decl_expr): Likewise.
1900 * gcc-interface/utils.c (finish_record_type): Likewise.
1901 * gcc-interface/utils2.c (build_simple_component_ref): Likewise.
1903 2011-10-26 Eric Botcazou <ebotcazou@adacore.com>
1905 * gcc-interface/decl.c (gnat_to_gnu_field): Always check components
1906 declared as atomic. Move around conditionally executed code.
1908 2011-10-24 Robert Dewar <dewar@adacore.com>
1910 * sem.adb (Initialize): Fix bug that blew up if called a second time.
1912 2011-10-24 Robert Dewar <dewar@adacore.com>
1914 * tb-alvxw.c, tracebak.c, expect.c, initflt.c, tb-alvms.c,
1915 tb-ivms.c, tb-gcc.c: Update headers to GPL 3.
1917 2011-10-24 Robert Dewar <dewar@adacore.com>
1919 * sem_prag.adb (Analyze_Pragma, case Debug): Give proper pragma
1922 2011-10-24 Hristian Kirtchev <kirtchev@adacore.com>
1924 * gnat_rm.texi: Add an entry for restriction No_Finalization.
1926 2011-10-24 Ed Schonberg <schonberg@adacore.com>
1928 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): If the
1929 current instance is within the one that contains the generic,
1930 the freeze node for the current one must appear in the current
1931 declarative part. Ditto if the current instance is within another
1932 package instance. In both of these cases the freeze node of the
1933 previous instance is not relevant.
1935 2011-10-24 Gary Dismukes <dismukes@adacore.com>
1937 * switch-m.adb (Normalize_Compiler_Switches): Add recognition
1938 of AAMP-specific switches -univ and -aamp_target.
1940 2011-10-24 Robert Dewar <dewar@adacore.com>
1942 * a-tienau.adb (Put): Deal properly with limited line length.
1944 2011-10-24 Robert Dewar <dewar@adacore.com>
1946 * sem_warn.adb, sem_ch12.adb: Minor reformatting.
1948 2011-10-24 Tristan Gingold <gingold@adacore.com>
1950 * gcc-interface/Makefile.in: Use GNU ld switches to generate map files
1953 2011-10-24 Ed Schonberg <schonberg@adacore.com>
1955 * sem_ch12.adb (Earlier): make available globally. If both
1956 nodes have the same sloc, the freeze node that does not come
1957 from source is the later one.
1958 (True_Parent): Make available globally.
1959 (Previous_Instance): Subsidiary of
1960 Insert_Freeze_Node_For_Instance, to check whether the generic
1961 parent of the current instance is declared within a previous
1962 instance in the same unit or declarative part, in which case the
1963 freeze nodes of both instances must appear in order to prevent
1964 elaboration problems in gigi.
1965 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): A stub is a
1966 freeze point, and the freeze node of a preceding instantiation
1967 must be inserted before it.
1969 2011-10-24 Robert Dewar <dewar@adacore.com>
1971 * checks.ads, checks.adb: Add handling of Synchronization_Check
1972 * debug.adb: Add doc for -gnatd.d and -gnatd.e (disable/enable
1974 * exp_ch2.adb (Expand_Entity_Reference): Set Atomic_Sync_Required
1975 flag Minor code reorganization.
1976 * opt.ads (Warn_On_Atomic_Synchronization): New switch.
1977 * par-prag.adb: Add dummy entries for pragma
1978 Disable/Enable_Atomic_Synchronization.
1979 * sem_prag.adb (Process_Suppress_Unsuppress): Handle
1980 case of Atomic_Synchronization specially (not suppressed
1981 by All_Checks, cannot be set from Source).
1982 (Pragma Disable/Enable_Atomic_Synchronization): Add processing.
1983 * sinfo.ads, sinfo.adb: Add Atomic_Sync_Required flag
1984 * snames.ads-tmpl: Add entry for Atomic_Synchronization Add
1985 entry for pragma Disable/Enable_Atomic_Synchronization
1986 * switch-c.adb: The -gnatp switch does not disable
1987 Atomic_Synchronization Add -gnatep switch to disable
1988 Atomic_Synchronization.
1989 * types.ads: Add entry for Synchronization_Check
1990 * usage.adb: Add line for -gnated switch
1991 * warnsw.adb: Settings for Warn_On_Atomic_Synchronization
1993 2011-10-24 Geert Bosch <bosch@adacore.com>
1995 * s-gearop.adb (Back_Substitute): Avoid overflow if matrix bounds start
1998 2011-10-24 Robert Dewar <dewar@adacore.com>
2000 * sem_ch12.adb, s-gearop.adb: Minor reformatting.
2002 2011-10-24 Robert Dewar <dewar@adacore.com>
2004 * warnsw.adb: Add some missing warnings to Set_GNAT_Mode_Warnings.
2005 * warnsw.ads: Add comments to Set_GNAT_Mode_Warnings.
2007 2011-10-24 Emmanuel Briot <briot@adacore.com>
2009 * prj-proc.adb (Process_Expression_Variable_Decl): No special
2010 handling for Project_Path unless it is an attribute.
2012 2011-10-24 Javier Miranda <miranda@adacore.com>
2014 * sem_ch12.adb (Check_Hidden_Primitives): New subprogram.
2015 (Install_Hidden_Primitives): New subprogram.
2016 (Restore_Hidden_Primitives): New subprogram.
2017 (Analyze_Formal_Package_Declaration,
2018 Analyze_Package_Instantiation, Analyze_Subprogram_Instantiation):
2019 Invoke Check_Hidden_Primitives after every call to
2020 Analyze_Associations, and invoke Restore_Hidden_Primitives to
2021 restore their visibility after processing the instantiation.
2022 (Instantiate_Package_Body): Install visible primitives before
2023 analyzing the instantiation and uninstall them to restore their
2024 visibility when the instantiation has been analyzed.
2025 * sem_util.ads, sem_util.adb (Add_Suffix): New subprogram
2026 (Remove_Suffix): New subprogram
2027 * sem_ch3.adb (Derive_Subprogram): When handling
2028 a derived subprogram for the instantiation of a formal derived
2029 tagged type, inherit the dispatching attributes from the actual
2030 subprogram (not from the parent type).
2032 2011-10-24 Vasiliy Fofanov <fofanov@adacore.com>
2034 * gnat_ugn.texi: Document explicit use of XDECGNAT library.
2036 2011-10-24 Hristian Kirtchev <kirtchev@adacore.com>
2038 * exp_ch3.adb (Build_Assignment): Add local constant N_Loc and
2040 (Build_Discriminant_Assignments): Add local variable D_Loc and update
2042 (Build_Init_Statements): Add local variables Comp_Loc, Decl_Loc and
2043 Var_Loc and update their uses.
2044 (Build_Record_Init_Proc): Code reformatting.
2045 (Increment_Counter): Add formal parameter Loc.
2046 (Make_Counter): Add formal parameter Loc.
2048 2011-10-24 Eric Botcazou <ebotcazou@adacore.com>
2050 * sem_disp.adb (Covers_Some_Interface): Fix typo.
2052 2011-10-24 Matthew Heaney <heaney@adacore.com>
2054 * a-cuprqu.adb, a-cbprqu.adb (Dequeue_Only_High_Priority): Fix sense
2057 2011-10-24 Yannick Moy <moy@adacore.com>
2059 * sem_ch13.adb (Analyze_Aspect_Specifications/Aspect_Test_Case):
2060 Translate arguments in positional notation into pragma argument
2061 association arguments for the generated pragma.
2063 2011-10-24 Arnaud Charlet <charlet@adacore.com>
2065 * exp_ch5.adb: Fix minor typo.
2067 2011-10-24 Ed Schonberg <schonberg@adacore.com>
2069 * sem_ch3.adb (Is_Visible_Component): Refine predicate for
2070 the case of a component reference in an instance body, when the
2071 enclosing type is private.
2073 2011-10-24 Sergey Rybin <rybin@adacore.com frybin>
2075 * gnat_ugn.texi: For gnatelim, move the note about using the GNAT
2076 driver for getting the project support into gnatelim section.
2078 2011-10-24 Robert Dewar <dewar@adacore.com>
2080 * gnat_rm.texi: Minor correction to documentation on address clause.
2082 2011-10-24 Hristian Kirtchev <kirtchev@adacore.com>
2084 * s-finmas.adb (Attach): Synchronize and call the unprotected version.
2085 (Attach_Unprotected): New routine.
2086 (Delete_Finalize_Address): Removed.
2087 (Delete_Finalize_Address_Unprotected): New routine.
2088 (Detach): Synchronize and call the unprotected version.
2089 (Detach_Unprotected): Remove locking.
2090 (Finalize): Add various comment on synchronization. Lock the critical
2091 region and call the unprotected versions of routines.
2092 (Finalize_Address): Removed.
2093 (Finalize_Address_Unprotected): New routine.
2094 (Set_Finalize_Address): Synchronize and call
2095 the unprotected version.
2096 (Set_Finalize_Address_Unprotected): New routine.
2097 (Set_Heterogeneous_Finalize_Address): Removed.
2098 (Set_Heterogeneous_Finalize_Address_Unprotected): New routine.
2099 (Set_Is_Heterogeneous): Add comment on synchronization and
2101 * s-finmas.ads: Flag Finalization_Started is no longer atomic
2102 because synchronization uses task locking / unlocking.
2103 (Attach): Add comment on usage.
2104 (Attach_Unprotected): New routine.
2105 (Delete_Finalize_Address): Renamed to
2106 Delete_Finalize_Address_Unprotected.
2107 (Detach): Add comment on usage.
2108 (Detach_Unprotected): New routine.
2109 (Finalize_Address): Renamed to Finalize_Address_Unprotected.
2110 (Set_Finalize_Address): Add comment on usage.
2111 (Set_Finalize_Address_Unprotected): New routine.
2112 (Set_Heterogeneous_Finalize_Address): Renamed to
2113 Set_Heterogeneous_Finalize_Address_Unprotected.
2114 * s-stposu.adb (Allocate_Any_Controlled): Add local variable
2115 Allocation_Locked. Add various comments on synchronization. Lock
2116 the critical region and call the unprotected version of
2118 (Deallocate_Any_Controlled): Add various comments on
2119 synchronization. Lock the critical region and call the unprotected
2120 version of routines.
2122 2011-10-24 Ed Schonberg <schonberg@adacore.com>
2124 * sem_ch3.adb (Set_Fixed_Range): The bounds of a fixed point type
2125 are universal and must carry the corresponding type.
2126 * sem_eval.adb (Check_Non_Static_Context): If the type of the
2127 expression is universal real, as may be the case for a fixed point
2128 expression with constant operands in the context of a conversion,
2129 there is nothing to check.
2130 * s-finmas.adb: Minor reformatting
2132 2011-10-23 Eric Botcazou <ebotcazou@adacore.com>
2134 * gcc-interface/decl.c (create_concat_name): Add explicit cast.
2136 2011-10-20 Eric Botcazou <ebotcazou@adacore.com>
2138 * gcc-interface/Make-lang.in (GNATLIBFLAGS, GNATLIBCFLAGS, THREAD_KIND,
2139 TRACE): Reintroduce.
2140 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o,
2141 ada/initialize.o, ada/raise.o): Reintroduce explicit compilation rules.
2143 2011-10-20 Eric Botcazou <ebotcazou@adacore.com>
2145 * gcc-interface/trans.c (lhs_or_actual_p): New predicate.
2146 (unchecked_conversion_nop): Use it.
2147 (gnat_to_gnu): Likewise.
2149 2011-10-20 Eric Botcazou <ebotcazou@adacore.com>
2151 * back_end.adb (Call_Back_End): Pass the maximum logical line number
2152 instead of the maximum physical line number to gigi.
2153 * gcc-interface/trans.c (Sloc_to_locus): Cope with line zero.
2155 2011-10-16 Tom Tromey <tromey@redhat.com>
2156 Dodji Seketeli <dodji@redhat.com>
2158 * gcc-interface/trans.c (gigi, Sloc_to_locus): Adjust to use the new
2159 public ordinary map interface.
2161 2011-10-16 Tristan Gingold <gingold@adacore.com>
2163 * link.c (_AIX): Add support for GNU ld.
2165 2011-10-16 Fedor Rybin <frybin@adacore.com>
2167 * gnat_ugn.texi: Fixing gnattest example names in the doc.
2168 Adding explanation to additional tests usage.
2170 2011-10-16 Robert Dewar <dewar@adacore.com>
2172 * exp_ch6.adb, sem_ch6.adb: Minor reformatting.
2174 2011-10-16 Eric Botcazou <ebotcazou@adacore.com>
2176 * a-convec.adb: Fix minor inconsistencies.
2178 2011-10-16 Matthew Heaney <heaney@adacore.com>
2180 * a-cusyqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cbprqu.ads (package
2181 Implementation): Specify pragma Implementation_Defined.
2183 2011-10-15 Nicolas Roche <roche@adacore.com>
2185 * gcc-interface/lang-specs.h: Ensure -mrtp switch is passed when using
2186 either rtp-smp or ravenscar-cert-rtp runtimes.
2188 2011-10-15 Bob Duff <duff@adacore.com>
2190 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call):
2191 Do not create a pool formal on unless RE_Root_Storage_Pool_Ptr
2193 (Expand_N_Extended_Return_Statement): Do not create a renaming of the
2194 build-in-place pool parameter unless RE_Root_Storage_Pool_Ptr is
2196 (Make_Build_In_Place_Call_In_Allocator): Add the user-defined
2197 pool only if RE_Root_Storage_Pool_Ptr is available.
2198 (Make_Build_In_Place_Call_In_Object_Declaration): Do not add a
2199 pool actual unless RE_Root_Storage_Pool_Ptr is available.
2200 * sem_ch6.adb (Create_Extra_Formals): Add build-in-place pool
2201 formal only if RE_Root_Storage_Pool_Ptr is available.
2203 2011-10-15 Matthew Heaney <heaney@adacore.com>
2205 * a-cusyqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cbprqu.ads (Queue
2206 type): Specify Priority aspect for protected type.
2208 2011-10-14 Ed Schonberg <schonberg@adacore.com>
2210 * exp_disp.adb (Check_Premature_Freezing): If an untagged type
2211 is a generic actual, it is a subtype of a type that was frozen
2212 by the instantiation, and even if not marked frozen it does not
2213 affect the construction of the dispatch table.
2215 2011-10-14 Robert Dewar <dewar@adacore.com>
2217 * make.adb, mlib-utl.adb, sem_util.adb, sem_ch4.adb: Minor code
2219 * s-rident.ads: Add missing Compiler_Unit pragma.
2221 2011-10-14 Gary Dismukes <dismukes@adacore.com>
2223 * sem_res.adb: Minor reformatting.
2225 2011-10-14 Hristian Kirtchev <kirtchev@adacore.com>
2227 * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call):
2228 Code and comment reformatting. Use BIP_Task_Master
2229 when creating a _master.
2230 (BIP_Formal_Suffix): Code reformatting. Correct the case for
2232 (Make_Build_In_Place_Call_In_Object_Declaration): Use
2233 BIP_Task_Master when creating a reference to the enclosing
2234 function's _master formal.
2235 (Move_Activation_Chain): Use BIP_Task_Master when creating a reference
2237 * exp_ch6.ads: Change BIP_Master to BIP_Task_Master.
2238 (Needs_BIP_Finalization_Master): Alphabetized.
2239 * sem_ch6.adb (Create_Extra_Formals): Update the usage of
2242 2011-10-14 Ed Schonberg <schonberg@adacore.com>
2244 * par-ch6.adb (P_Return_Object_Declaration): In Ada 2012 mode,
2245 reject an aliased keyword on the object declaration of an extended
2246 return statement. In older versions of the language indicate
2247 that this is illegal in the standard.
2249 2011-10-14 Pascal Obry <obry@adacore.com>
2251 * sem_util.adb, sem_ch4.adb: Minor reformatting.
2253 2011-10-14 Ed Schonberg <schonberg@adacore.com>
2255 * sem_ch13.adb: Recognize properly procedure calls that are
2256 transformed into code statements.
2258 2011-10-14 Vincent Celier <celier@adacore.com>
2260 * projects.texi: Minor fix in project example.
2262 2011-10-14 Ed Schonberg <schonberg@adacore.com>
2264 * sem_util.adb: Return objects are aliased if their type is
2265 immutably limited as per AI05-0053.
2267 2011-10-14 Gary Dismukes <dismukes@adacore.com>
2269 * exp_ch4.adb (Expand_N_Op_And): Remove Short_Circuit_And_Or
2270 expansion code (moved to sem_res) (Expand_N_Op_Or): Remove
2271 Short_Circuit_And_Or expansion code (moved to sem_res).
2272 * sem_res.adb (Resolve_Logical_Op): Add code to rewrite Boolean
2273 "and" and "or" operators as short-circuit "and then" and "or
2274 else", when pragma Short_Circuit_And_Or is active.
2276 2011-10-13 Robert Dewar <dewar@adacore.com>
2278 * sem_ch9.adb, sem_util.adb, sem_util.ads, exp_ch6.adb, sem_ch4.adb,
2279 sem_ch6.adb, exp_ch3.adb: Minor reformatting.
2281 2011-10-13 Arnaud Charlet <charlet@adacore.com>
2283 * Makefile.rtl (GNATRTL_NONTASKING_OBJS): Add a-ngcoar.o.
2285 2011-10-13 Jerome Guitton <guitton@adacore.com>
2287 * sysdep.c (__gnat_get_task_options): Re-enable VX_SPE_TASK on vThreads
2289 2011-10-13 Eric Botcazou <ebotcazou@adacore.com>
2291 * a-convec.ads (Cursor): Minor reformatting.
2292 * a-convec.adb (Next): Fix minor inconsistencies.
2293 (Previous): Likewise.
2295 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2297 * sem_util.ads, sem_util.adb (Available_Full_View_Of_Component):
2298 New predicate to determine whether some operations on an array
2299 type are available when the full view of its component may differ
2300 from the view of the point of the array declaration.
2301 * sem_ch4.adb (Find_Equality_Types): Use
2302 Available_Full_View_Of_Component.
2303 * sem_type.adb (Valid_Boolean_Arg, Valid_Comparison_Arg): Ditto
2305 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2307 * sem_ch9.adb: Analyze aspects while discriminants of protected
2310 2011-10-13 Geert Bosch <bosch@adacore.com>
2312 * Makefile.rtl (GNATRTL_TASKING_OBJECTS): Add
2313 a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o, as these no
2314 longer depend on an external library.
2315 * gcc-interface/Makefile.in (GNATRTL_LINEARALGEBRA_OBJS): Remove
2316 a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o.
2317 Update dependencies.
2318 * gcc-interface/Make-lang.in: Update dependencies.
2320 2011-10-13 Cyrille Comar <comar@adacore.com>
2322 * gnat_ugn.texi: Minor editing.
2324 2011-10-13 Vincent Celier <celier@adacore.com>
2326 * projects.texi: Add documentation on packages and attributes
2327 that are inherited from a project being extended into the
2330 2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
2332 * exp_ch3.adb (Build_Master): Rewritten.
2333 (Expand_N_Full_Type_Declaration): Reformat the declarative
2334 region. Update the call to Build_Master_Renaming.
2335 (Expand_Previous_Access_Type): Rewritten.
2336 * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call):
2337 Add local constant Result_Subt and update related usage.
2338 (Expand_N_Extended_Return_Statement): Add local constant
2339 Result_Subt and update related usage.
2340 * exp_ch9.adb (Build_Activation_Chain): Rewritten to use the
2341 new context detection mechanism.
2342 (Build_Class_Wide_Master):
2343 Use Insert_Action to add the renaming into the tree.
2344 (Build_Master_Entity): Rewritten to use the new context detection
2346 (Build_Master_Renaming): Add formal parameter Ins_Nod
2347 and related usage. Use Insert_Action to add the renaming into the
2349 (Find_Enclosing_Context): New subsidiary routine. Rather
2350 than relying on enclosing scopes, this routine looks at the
2351 tree structure to figure out the proper context for a _master
2352 or a _chain. This approach eliminates the issues with transient
2353 scopes which have not been converted into blocks.
2354 * exp_ch9.ads (Build_Master_Entity): Change parameter profile
2355 to better reflect the new usage. Update the related comment.
2356 (Build_Master_Renaming): Add formal parameter Ins_Nod. Update
2357 the comment on usage.
2358 * sem_ch3.adb (Access_Definition): Update the calls to
2359 Build_Master_Entity and Build_Master_Renaming.
2360 * sem_ch6.adb (Create_Extra_Formals): Add local variable
2361 Full_Subt. Code reformatting.
2362 * sem_util.adb (Is_Iterator): Alphabetized.
2363 (Is_LHS): Alphabetized.
2364 (Is_Limited_Class_Wide_Type): New routine.
2365 * sem_util.ads (Is_Limited_Class_Wide_Type): New routine.
2367 2011-10-13 Geert Bosch <bosch@adacore.com>
2369 * a-ngrear.adb (Solve): Make generic and move to
2370 System.Generic_Array_Operations.
2371 * s-gearop.ads (Matrix_Vector_Solution, Matrix_Matrix_Solution):
2372 New generic solvers to compute a vector resp. matrix Y such
2373 that A * Y = X, approximately.
2374 * s-gearop.adb (Matrix_Vector_Solution, Matrix_Matrix_Solution):
2375 Implement using Forward_Eliminate and Back_Substitute
2376 * a-ngcoar.adb: Reimplement in pure Ada to remove dependencies
2378 * a-ngcoar.ads ("abs"): Fix return type to be real.
2380 2011-10-13 Eric Botcazou <ebotcazou@adacore.com>
2383 * s-linux-alpha.ads: Do not "with" Interfaces.C.
2384 * s-linux-sparc.ads: Likewise.
2386 2011-10-13 Geert Bosch <bosch@adacore.com>
2388 * s-gearop.ads (Forward_Eliminate): Add "abs" formal function
2390 * s-gearop.adb (Forward_Eliminate): Remove local "abs" function
2392 * a-ngrear.adb (Forward_Eliminate): Adjust instantiation for
2395 2011-10-13 Geert Bosch <bosch@adacore.com>
2397 * a-ngrear.adb, s-gearop.adb, s-gearop.ads (Sqrt): Make generic and
2398 move to System.Generic_Array_Operations.
2400 2011-10-13 Geert Bosch <bosch@adacore.com>
2402 * a-ngrear.adb ("abs"): Adjust for modified L2_Norm generic
2403 * s-gearop.ads (L2_Norm): Change profile to be suitable for
2405 * s-gearop.adb (L2_Norm): Reimplement using direct definition,
2408 2011-10-13 Robert Dewar <dewar@adacore.com>
2410 * exp_ch5.adb, sem_ch3.adb, impunit.adb, impunit.ads, sem_type.adb,
2411 prj-proc.adb, exp_ch9.adb, s-regpat.adb, sem_ch10.adb, sem_prag.adb,
2412 sem_ch12.adb, freeze.adb, sem_attr.adb, sem_attr.ads, gnatlink.adb,
2413 par-ch6.adb, exp_ch6.adb, sem_ch4.adb, sem_ch6.adb, sem_ch8.adb,
2414 par-util.adb, sem_ch13.adb, lib-xref.adb, g-trasym.adb, g-trasym.ads,
2415 exp_aggr.adb, s-taprop-posix.adb: Minor reformatting.
2417 2011-10-13 Geert Bosch <bosch@adacore.com>
2419 * s-gearop.adb: Minor comment additions.
2421 2011-10-13 Fedor Rybin <frybin@adacore.com>
2423 * gnat_ugn.texi: Add gnattest section.
2425 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2427 * freeze.adb: Do not create body of renaming if declaration has
2430 2011-10-13 Olivier Hainque <hainque@adacore.com>
2432 * init.c (__gnat_error_handler - vxworks case): Restrict sigtramp calls
2433 further, to the ppc+kernel case only.
2435 2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
2437 * exp_ch4.adb (Expand_N_Allocator): Comment reformatting.
2438 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call):
2439 Do not create a pool formal on .NET/JVM.
2440 (Expand_N_Extended_Return_Statement): Alphabetize local
2441 variables. Do not create a renaming of the build-in-place pool
2442 parameter on .NET/JVM. (Make_Build_In_Place_Call_In_Allocator):
2443 Add the user-defined pool only on non-VM targets.
2444 (Make_Build_In_Place_Call_In_Object_Declaration): Alphabetize
2445 local variables. Do not add a pool actual on .NET/JVM.
2446 * sem_ch6.adb: Add with and use clause for Targparm.
2447 (Create_Extra_Formals): Add build-in-place pool formal only on
2449 * rtsfind.ads: Alphabetize entries.
2451 2011-10-13 Sergey Rybin <rybin@adacore.com>
2453 * gnat_ugn.texi: Minor correction.
2455 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2457 * sem_ch8.adb: Minor error message improvement.
2459 2011-10-13 Robert Dewar <dewar@adacore.com>
2461 * a-cbprqu.adb, a-ciorma.adb, exp_ch3.adb: Minor reformatting.
2463 2011-10-13 Gary Dismukes <dismukes@adacore.com>
2465 * exp_ch5.adb (Expand_N_Loop_Statement): For the transformation
2466 of a for loop for an enumeration type with an enumeration rep
2467 clause, which involves moving the original loop parameter into
2468 a nested block, the loop parameter's entity must be removed from
2469 the entity list of the loop scope.
2471 2011-10-13 Bob Duff <duff@adacore.com>
2473 * exp_ch6.ads (BIP_Storage_Pool): New "extra implicit parameter"
2474 that gets passed in the same cases where BIP_Alloc_Form is passed
2475 (caller-unknown-size results). BIP_Storage_Pool is used when
2476 BIP_Alloc_Form = User_Storage_Pool. In that case, a pointer
2477 to the user-defined storage pool is passed at the call site,
2478 and this pool is used in callee to allocate the result.
2479 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call): New
2480 version of Add_Alloc_Form_Actual_To_Build_In_Place_Call. Passes
2481 the additional BIP_Storage_Pool actual.
2482 (Expand_N_Extended_Return_Statement): Allocate the function
2483 result using the user-defined storage pool, if BIP_Alloc_Form =
2485 * sem_ch6.adb: Add the "extra formal" for BIP_Storage_Pool.
2486 * exp_ch4.adb: Don't overwrite storage pool set by
2487 Expand_N_Extended_Return_Statement.
2488 * s-stopoo.ads, rtsfind.ads (Root_Storage_Pool_Ptr): New type,
2489 for use in build-in-place function calls within allocators
2490 where the access type has a user-defined storage pool.
2492 2011-10-13 Sergey Rybin <rybin@adacore.com>
2494 * gnat_ugn.texi, vms_data.ads: Add an option to control enumeration
2497 2011-10-13 Nicolas Roche <roche@adacore.com>
2499 * gnatlink.adb: Ensure that -mrtp is passed when runtime name ends
2502 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2504 * sem_prag.adb (Analyze_Pragma, case Unchecked_Union): Take into
2505 account that an unchecked union type can be limited.
2507 2011-10-13 Olivier Hainque <hainque@adacore.com>
2509 * init.c (__gnat_error_handler) <VxWorks version>: Add comments on
2510 the use of the signal trampoline for PPC in the sjlj case as well.
2511 Add legitimate casts, preventing compile time warnings on the
2512 (sighandler *) profile.
2514 2011-10-13 Yannick Moy <moy@adacore.com>
2516 * sem_aggr.adb (Resolve_Aggr_Expr): Always perform semantic analysis
2519 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2521 * sem_ch3.adb (OK_For_Limited_Init_In_05): Conditional and case
2522 expressions are legal limited return values if each one of their
2523 dependent expressions are legal.
2525 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2527 * sem_ch6.adb (Analyze_Procedure_Call_Statement): In Ada 2012 mode,
2528 if the prefix of the call is a qualified expression, rewrite as
2530 * sem_ch13.adb (Analyze_Code_Statement): In Ada 2012 mode, the
2531 code statement is legal if it is a rewriting of a procedure call.
2533 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2535 * exp_aggr.adb (Flatten): If a component association has a box,
2536 assume that aggregate is not static.
2537 (Safe_Aggregate): If a component association in a non-limited
2538 aggregate has a box, assume that it cannot be expanded in place.
2540 2011-10-13 Vincent Celier <celier@adacore.com>
2542 * prj-conf.adb (Get_Or_Create_Configuration_File): Call
2543 Process_Project_Tree_Phase_1 with Packages_To_Check.
2544 (Process_Project_And_Apply_Config): Ditto
2545 * prj-part.ads, prj-part.adb, prj-pars.ads, prj-pars.adb (Parse):
2546 Remove default for argument Packages_To_Check.
2547 * prj-proc.adb (Recursive_Process): New argument
2550 (Process_Project_Tree_Phase_1): Ditto.
2551 (Recursive_Project.Process_Aggregated_Projects): Call
2552 Prj.Part.Parse and Process_Project_Tree_Phase_1 with
2554 * prj-proc.ads (Process): New argument Packages_To_Check
2555 (Process_Project_Tree_Phase_1): Ditto
2557 2011-10-13 Arnaud Charlet <charlet@adacore.com>
2559 * gcc-interface/Makefile.in: Fix typo.
2561 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2563 * sem_ch12.adb (Analyze_Formal_{Floating_Type,
2564 Signed_Integer_Type, Decimal_Fixed_Point_Type, Discrete_Type}):
2565 Use sloc of defining identifier of farmal type declaration,
2566 as sloc of generated internal entity, to prevent misplaced
2569 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2571 * sem_intr.adb (Check_Intrinsic_Operator): Check that type
2572 is fully defined before checking that it is a numeric type.
2574 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2576 * sem_aggr.adb (Resolve_Record_Aggregate): If a component
2577 association for component X has a box, then X is covered in the
2578 aggregate even if there is not default value for X in the type
2579 declaration, and X has to be default-initialized.
2581 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2583 * sem_attr.adb (Check_Enum_Image, Analyze_Attribute case 'Value): Mark
2584 literals as referenced only if reference is in current source unit.
2586 2011-10-13 Matthew Heaney <heaney@adacore.com>
2588 * a-csquin.ads (Enque, Dequeue): Mark interface operations as entries.
2590 2011-10-13 Olivier Hainque <hainque@adacore.com>
2592 * sigtramp.h: New file. Prototype and spec of the signal
2593 trampoline to be called by an established handler to provide
2594 dwarf call frame info before the real signal processing code.
2595 * sigtramp-ppcvxw.c: New file. Implementation of the signal
2596 trampoline for ppc-vxworks.
2597 * init.c (vxworks section): Use it for ppc.
2599 2011-10-13 Thomas Quinot <quinot@adacore.com>
2601 * par-ch2.adb, par.adb, par-util.adb, par-ch3.adb
2602 (Check_Future_Identifier): New subprogram,
2603 factors duplicated code from Par.Ch2.P_Identifier and
2604 Par.Ch3.P_Defining_Identifier.
2606 2011-10-13 Thomas Quinot <quinot@adacore.com>
2608 * s-taprop-posix.adb (Initialize): Always raise Storage_Error
2609 if we fail to initialize CV attributes or CV.
2611 2011-10-13 Thomas Quinot <quinot@adacore.com>
2613 * s-tasren.adb (Timed_Selective_Wait, case
2614 Accept_Alternative_Selected): Use Defer_Abort_Nestable, since
2615 we know abortion is already deferred.
2617 2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
2619 * exp_ch3.adb (Build_Class_Wide_Master): Moved to exp_ch9.
2620 (Build_Master_Renaming (function)): Removed.
2621 (Build_Master_Renaming (procedure)): Moved to exp_ch9.
2622 (Expand_Full_Type_Declaration): Alphabetize
2623 variables. Reformatting of code and comments. Rewrite the
2624 section on processing of anonymous access-to-task types in
2626 * exp_ch3.ads (Build_Class_Wide_Master): Moved to exp_ch9.
2627 (Build_Master_Renaming): Moved to exp_ch9.
2628 * exp_ch9.adb (Build_Class_Wide_Master): Moved from exp_ch3.
2629 (Build_Master_Entity): Add formal parameter
2630 Use_Current. Reformatting of code and comments.
2631 (Build_Master_Renaming): Moved from exp_ch3.
2632 * exp_ch9.ads (Build_Class_Wide_Master): Moved from
2633 exp_ch3. Update comment on usage.
2634 (Build_Master_Entity):
2635 Add formal parameter Use_Current. Update comment on usage.
2636 (Build_Master_Renaming): Moved from exp_ch3.
2637 * sem_ch3.adb (Access_Definition): Remove redundant code to
2638 create a _master and a renaming.
2640 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2642 * lib-xref.adb: Do no emit reference to overridden operation,
2643 if it is internally generated.
2645 2011-10-13 Vincent Celier <celier@adacore.com>
2647 * bindgen.adb: Remove any processing related to g-trasym
2648 * Makefile.rtl: Add g-trasym.o to GNATRTL_NONTASKING_OBJS
2649 * mlib-prj.adb: Remove any processing related to g-trasym.
2651 2011-10-12 Eric Botcazou <ebotcazou@adacore.com>
2653 * sem_util.adb (Denotes_Same_Prefix): Fix fatal warning.
2654 * gcc-interface/Make-lang.in (WARN_ADAFLAGS): New.
2655 (ALL_ADAFLAGS): Include WARN_ADAFLAGS.
2656 (ADA_FLAGS_TO_PASS): Likewise.
2657 (COMMON_FLAGS_TO_PASS): New.
2658 (ADA_TOOLS_FLAGS_TO_PASS): Use COMMON_FLAGS_TO_PASS. In the regular
2659 native case, also use FLAGS_TO_PASS and ADA_FLAGS_TO_PASS.
2660 (gnatlib): Use COMMON_FLAGS_TO_PASS.
2661 (ada.install-common): Likewise.
2662 (install-gnatlib): Likewise.
2663 (install-gnatlib-obj): Likewise.
2664 (gnattools): Use ADA_TOOLS_FLAGS_TO_PASS for gnattools1 as well.
2665 (gnat-cross): Delete.
2666 (gnatboot): Likewise.
2667 (gnatboot2): Likewise.
2668 (gnatboot3): Likewise.
2669 (gnatstage1): Likewise.
2670 (gnatstage2): Likewise.
2671 * gcc-interface/Makefile.in (SOME_ADAFLAGS): Likewise.
2672 (MOST_ADAFLAGS): Likewise.
2673 (LOOSE_CFLAGS): Likewise.
2674 (gnat-cross): Likewise.
2675 (GNATLIBFLAGS): Add -W -Wall.
2676 (GNATLIBCFLAGS_FOR_C): Likewise.
2677 * gcc-interface/lang.opt: Remove C-specific warnings. Add doc lines.
2678 * gcc-interface/misc.c (gnat_handle_option): Remove obsolete cases.
2680 2011-10-12 Eric Botcazou <ebotcazou@adacore.com>
2682 * gcc-interface/trans.c (Attribute_to_gnu): Use remove_conversions.
2683 (push_range_check_info): Likewise.
2684 (gnat_to_gnu) <N_Code_Statement>: Likewise.
2685 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: Likewise.
2686 (gnat_invariant_expr): Likewise.
2687 * gcc-interface/utils.c (compute_related_constant): Likewise.
2688 (max_size): Fix handling of SAVE_EXPR.
2689 (remove_conversions): Fix formatting.
2691 2011-10-12 Eric Botcazou <ebotcazou@adacore.com>
2693 * gcc-interface/ada-tree.h (DECL_LOOP_PARM_P): New flag.
2694 (DECL_INDUCTION_VAR): New macro.
2695 (SET_DECL_INDUCTION_VAR): Likewise.
2696 * gcc-interface/gigi.h (convert_to_index_type): Declare.
2697 (gnat_invariant_expr): Likewise.
2698 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: If this is a loop
2699 parameter, set DECL_LOOP_PARM_P on it.
2700 * gcc-interface/misc.c (gnat_print_decl) <VAR_DECL>: If DECL_LOOP_PARM_P
2701 is set, print DECL_INDUCTION_VAR instead of DECL_RENAMED_OBJECT.
2702 * gcc-interface/trans.c (gnu_loop_label_stack): Delete.
2703 (struct range_check_info_d): New type.
2704 (struct loop_info_d): Likewise.
2705 (gnu_loop_stack): New stack.
2706 (Identifier_to_gnu): Set TREE_READONLY flag on the first dereference
2707 built for a by-double-ref read-only parameter. If DECL_LOOP_PARM_P
2708 is set, do not test DECL_RENAMED_OBJECT.
2709 (push_range_check_info): New function.
2710 (Loop_Statement_to_gnu): Push a new struct loop_info_d instead of just
2711 the label. Reference the label and the iteration variable from it.
2712 Build the special induction variable in the unsigned version of the
2713 size type, if it is larger than the base type. And attach it to the
2714 iteration variable if the latter isn't by-ref. In the iteration scheme
2715 case, initialize the invariant conditions in front of the loop if
2716 deemed profitable. Use gnu_loop_stack.
2717 (gnat_to_gnu) <N_Exit_Statement>: Use gnu_loop_stack.
2718 <N_Raise_Constraint_Error>: Always process the reason. In the range
2719 check and related cases, and if loop unswitching is enabled, compute
2720 invariant conditions and push this information onto the stack.
2721 Do not translate again the condition if it has been already translated.
2722 * gcc-interface/utils.c (record_global_renaming_pointer): Assert that
2723 DECL_LOOP_PARM_P isn't set.
2724 (convert_to_index_type): New function.
2725 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Use it in order
2726 to convert the index from the base index type to sizetype.
2727 (gnat_invariant_expr): New function.
2729 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
2731 * gcc-interface/utils.c (def_builtin_1): Delete old interface with
2732 two parallel arrays to hold standard builtin declarations, and
2733 replace it with a function based interface that can support
2734 creating builtins on the fly in the future.
2735 * gcc-interface/trans.c (Exception_Handler_to_gnu_zcx): Ditto.
2736 (gnat_to_gnu): Ditto.
2738 2011-10-07 Eric Botcazou <ebotcazou@adacore.com>
2741 * gcc-interface/gigi.h (gnat_pushdecl): Adjust comment.
2742 * gcc-interface/utils.c (global_context): New variable.
2743 (gnat_pushdecl): Initialize it and set it as the DECL_CONTEXT of DECLs
2744 that are either public external or at top level. Use "No" macro.
2745 (end_subprog_body): Call decl_function_context.
2746 (rest_of_subprog_body_compilation): Likewise.
2748 2011-10-07 Eric Botcazou <ebotcazou@adacore.com>
2750 * gcc-interface/gigi.h (gnat_useless_type_conversion): Declare.
2751 (rest_of_subprog_body_compilation): Likewise.
2752 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: For renaming,
2753 test for useless conversions by means of gnat_useless_type_conversion.
2754 * gcc-interface/trans.c: Include bitmap.h and cgraph.h.
2755 (language_function): Add named_ret_val and other_ret_val.
2756 (f_named_ret_val): New macro.
2757 (f_other_ret_val): Likewise.
2758 (gigi): Call rest_of_subprog_body_compilation.
2759 (struct nrv_data): New structure.
2760 (is_nrv_p): New predicate.
2761 (prune_nrv_r): New helper function.
2762 (prune_nrv_in_block): New function.
2763 (finalize_nrv_r): New helper function.
2764 (finalize_nrv): New function.
2765 (return_value_ok_for_nrv_p): New predicate.
2766 (build_return_expr): If optimization is enabled, record candidates for
2767 the Named Return Value optimization.
2768 (build_function_stub): Call rest_of_subprog_body_compilation.
2769 (Subprogram_Body_to_gnu): If optimization is enabled and there are
2770 candidates, finalize the Named Return Value optimization.
2771 Call rest_of_subprog_body_compilation.
2772 (call_to_gnu): At the end, if a return value is needed, simplify the
2773 result before wrapping it up in a COMPOUND_EXPR.
2774 * gcc-interface/utils.c (end_subprog_body): Split into...
2775 (rest_of_subprog_body_compilation): ...this. New function.
2776 (gnat_useless_type_conversion): Likewise.
2778 2011-10-06 Thomas Quinot <quinot@adacore.com>
2780 * einfo.ads, exp_attr.adb, exp_ch3.adb, exp_ch4.adb, exp_ch7.adb,
2781 exp_ch9.adb, exp_ch9.ads, exp_strm.adb, exp_util.adb, freeze.adb,
2782 g-debpoo.ads, opt.ads, par-ch12.adb, par-ch2.adb, par-ch3.adb,
2783 par-ch5.adb, par-ch6.adb, sem_aggr.adb, sem_attr.adb, sem_cat.adb,
2784 sem_ch10.adb, sem_ch12.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
2785 sem_ch6.adb, sem_intr.adb, sem_res.ads, sem_type.adb, sem_util.adb,
2786 s-regpat.adb, s-tpopde-vms.ads: Minor reformatting.
2787 * s-osinte-freebsd.ads: Fix for tasking failures on FreeBSD.
2789 2011-10-06 Ed Schonberg <schonberg@adacore.com>
2791 * a-cihase.adb, a-ciorma.adb: Avoid accessibility checks in container
2794 2011-10-06 Matthew Heaney <heaney@adacore.com>
2796 * a-cuprqu.ads, a-cuprqu.adb, a-cbprqu.ads, a-cbprqu.adb
2797 (Dequeue_Only_High_Priority): Protected procedure now implemented.
2799 2011-10-06 Vincent Celier <celier@adacore.com>
2801 * g-trasym.adb: Replace old implementation with the default
2802 implementation that returns list of addresses as "0x...".
2803 * g-trasym.ads: Update the list of platforms with the full
2804 capability. Indicate that there is a default implementation
2805 for other platforms.
2806 * g-trasym-unimplemented.ads, g-trasym-unimplemented.adb: Remove.
2807 * gcc-interface/Makefile.in: Remove g-trasym-unimplemented, as there
2808 is now a default implementation for all platforms without the full
2811 2011-10-06 Robert Dewar <dewar@adacore.com>
2813 * a-ciorse.adb, a-cihase.adb, a-cihase.ads, a-coorse.adb,
2814 a-cborse.adb, a-comutr.adb, a-ciorma.adb, a-cbmutr.adb,
2815 a-cbmutr.ads, a-cbhase.adb, a-cbhase.ads: Minor reformatting and code
2816 reorganization (use conditional expressions).
2818 2011-10-06 Robert Dewar <dewar@adacore.com>
2820 * sem_res.adb (Resolve_Arithmetic_Op): Fix bad warning for
2821 floating divide by zero.
2823 2011-10-06 Ed Schonberg <schonberg@adacore.com>
2825 * sem_ch6.adb: Limited interfaces that are not immutably limited
2826 are OK in return statements.
2828 2011-09-30 Iain Sandoe <iains@gcc.gnu.org>
2830 * gcc-interface/Makefile.in (Darwin): Partial reversion of previous
2831 change to powerpc section.
2833 2011-09-29 Iain Sandoe <iains@gcc.gnu.org>
2835 * gcc-interface/Makefile.in (Darwin): Factor LIBGNAT_TARGET_PAIRS
2838 2011-09-27 Ed Schonberg <schonberg@adacore.com>
2840 * a-cbhase.adb, a-cbhase.ads, a-cborse.adb, a-cborse.ads,
2841 a-cihase.adb, a-cihase.ads, a-ciorse.adb, a-ciorse.ads,
2842 a-coorse.adb, a-coorse.ads: Add iterator machinery to bounded sets and
2844 * a-coorma.ads: Minor reformmating.
2845 * einfo.ads: Improve the comment describing the
2846 Directly_Designated_Type function.
2847 * a-ciorma.adb, a-ciorma.ads: Add iterator machinery to indefinite
2849 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
2852 2011-09-27 Robert Dewar <dewar@adacore.com>
2854 * a-comutr.ads: Minor reformatting.
2856 2011-09-27 Ed Schonberg <schonberg@adacore.com>
2858 * a-cimutr.adb, a-cimutr.ads, a-cbmutr.adb, a-cbmutr.ads: Add children
2859 iterators to multiway trees.
2861 2011-09-27 Yannick Moy <moy@adacore.com>
2863 * debug.adb (d.D): New option for strict Alfa mode.
2864 * opt.ads (Strict_Alfa_Mode): New flag to interpret compiler
2865 permissions as strictly as possible.
2866 * sem_ch3.adb (Signed_Integer_Type_Declaration): In non-strict
2867 Alfa mode, now, interpret ranges of base types like GNAT does; in
2868 strict mode, simply change the range of the implicit base Itype.
2869 * gnat1drv.adb: Update comments. Set Strict_Alfa_Mode.
2871 2011-09-27 Robert Dewar <dewar@adacore.com>
2873 * exp_ch9.adb: Minor comment fixes.
2875 2011-09-27 Ed Schonberg <schonberg@adacore.com>
2877 * a-comutr.adb, a-comutr.ads: Add children iterators on multiway
2880 2011-09-27 Eric Botcazou <ebotcazou@adacore.com>
2882 * checks.adb (Apply_Scalar_Range_Check): Use Designated_Type
2883 instead of Directly_Designated_Type in the indirect array case.
2885 2011-09-27 Robert Dewar <dewar@adacore.com>
2887 * exp_util.adb, exp_aggr.adb: Minor reformatting.
2889 2011-09-27 Ed Schonberg <schonberg@adacore.com>
2891 * sinfo.ads, par-ch3.adb: Minor comment update: aspect specification
2892 on subtype declarations.
2893 * exp_aggr.adb: Minor comment update.
2895 2011-09-27 Eric Botcazou <ebotcazou@adacore.com>
2897 * exp_util.adb (Safe_Prefixed_Reference): Remove always-false
2898 test in the N_Explicit_Dereference case. Fold double logical
2899 negation in the special loop case and conditionalize it on
2900 Variable_Ref being true.
2902 2011-09-27 Ed Schonberg <schonberg@adacore.com>
2904 * sem_ch4.adb (Analyze_Selected_Component): If the prefix is a
2905 single protected object and the selector is a discriminant or an
2906 entry family, this is a non-overloaded candidate interpretation,
2907 and possible primitive operations of the type must not be
2910 2011-09-27 Arnaud Charlet <charlet@adacore.com>
2912 * s-taspri-posix-noaltstack.ads (Lock): Mark fields aliased.
2914 2011-09-27 Pascal Obry <obry@adacore.com>
2916 * s-osinte-hpux.ads, s-osinte-aix.ads, s-osinte-solaris-posix.ads,
2917 s-osinte-irix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads:
2918 Add dummy definitions for pthread_rwlock_t
2919 and pthread_rwlockattr_t on all POSIX platforms.
2920 * s-taprop-irix.adb, s-taprop-posix.adb (Initialize_Lock): Fix lock
2922 (Finalize_Lock): Likewise.
2923 (Write_Lock): Likewise.
2926 2011-09-27 Tristan Gingold <gingold@adacore.com>
2928 * s-tassta.adb (Task_Wrapper): Increase Guard_Page_Size value for
2931 2011-09-27 Pascal Obry <obry@adacore.com>
2933 * s-osinte-hpux.ads, s-taprop-vxworks.adb, s-taspri-vxworks.ads,
2934 s-taprop-tru64.adb, s-osinte-aix.ads, s-taspri-posix-noaltstack.ads,
2935 s-taspri-mingw.ads, s-taprop-vms.adb, s-tpoben.adb, s-tpoben.ads,
2936 s-taprop-mingw.adb, s-taprob.adb, s-taprob.ads,
2937 s-osinte-solaris-posix.ads, s-taprop-solaris.adb, s-taspri-solaris.ads,
2938 s-osinte-irix.ads, s-taprop-irix.adb, s-osinte-darwin.ads,
2939 s-taspri-dummy.ads, s-taspri-posix.ads, s-taprop.ads,
2940 s-taspri-vms.ads, s-osinte-freebsd.ads, s-taprop-hpux-dce.adb,
2941 s-taspri-hpux-dce.ads, s-taspri-tru64.ads, s-taprop-dummy.adb,
2942 s-taprop-posix.adb: Revert previous changes.
2943 (Lock): Now a record containing the two possible lock
2944 (mutex and read/write) defined in OS_Interface.
2945 * s-taprop-linux.adb (Finalize_Protection): Use r/w lock for
2947 (Initialize_Protection): Likewise.
2949 (Lock_Read_Only): Likewise.
2952 2011-09-27 Pascal Obry <obry@adacore.com>
2954 * s-taspri-posix-noaltstack.ads (RW_Lock): This type is now defined as
2955 OS_Interface.pthread_rwlock_t.
2957 2011-09-27 Robert Dewar <dewar@adacore.com>
2959 * exp_ch9.adb, a-cimutr.adb, a-cimutr.ads, gnat1drv.adb, a-comutr.adb,
2960 a-comutr.ads, exp_dist.adb, a-cbmutr.adb, a-cbmutr.ads,
2961 sem_ch5.adb, sem_util.adb: Minor reformatting.
2963 2011-09-27 Pascal Obry <obry@adacore.com>
2965 * s-taprop.ads (Initialize_Lock)[RW_Lock]: New spec for r/w lock.
2966 (Finalize_Lock)[RW_Lock]: Likewise.
2967 (Write_Lock)[RW_Lock]: Likewise.
2968 (Unlock)[RW_Lock]: Likewise.
2969 (Read_Lock): Define L as RW_Lock (instead of Lock).
2970 * s-taprop-linux.adb (Initialize_Lock)[RW_Lock]: New
2971 routine for r/w lock.
2972 (Finalize_Lock)[RW_Lock]: Likewise.
2973 (Write_Lock)[RW_Lock]: Likewise.
2974 (Unlock)[RW_Lock]: Likewise.
2975 (Read_Lock): Define L as RW_Lock (instead of Lock).
2977 * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
2978 s-taprop-mingw.adb, s-taprop-solaris.adb, s-taprop-irix.adb,
2979 s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
2980 (Initialize_Lock)[RW_Lock]: Same implementation as corresponding
2981 routine for standard lock.
2982 (Finalize_Lock)[RW_Lock]: Likewise.
2983 (Write_Lock)[RW_Lock]: Likewise.
2984 (Unlock)[RW_Lock]: Likewise.
2985 (Read_Lock): Define L as RW_Lock (instead of Lock).
2986 * s-taprob.ads, s-tpoben.ads (Protection): Add RWL (RW_Lock)
2987 in the record definition.
2988 * s-taprob.adb, s-taproben.adb (Finalize_Protection): Use r/w
2989 lock for 'R' locking policy.
2990 (Initialize_Protection): Likewise.
2992 (Lock_Read_Only): Likewise.
2994 * s-taspri-posix.ads (RW_Lock): New type defined as
2995 OS_Interface.pthread_rwlock_t.
2997 * s-taspri-vxworks.ads, s-taspri-posix-noaltstack.ads,
2998 s-taspri-mingw.ads, s-taspri-solaris.ads, s-taspri-dummy.ads,
2999 s-taspri-posix.ads, s-taspri-vms.ads, s-taspri-hpux-dce.ads,
3000 s-taspri-tru64.ads (RW_Lock): New type defined as alias to Lock.
3002 2011-09-27 Pascal Obry <obry@adacore.com>
3004 * exp_ch9.adb, s-taspri-posix.ads: Minor reformatting.
3006 2011-09-27 Pascal Obry <obry@adacore.com>
3008 * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
3009 s-osinte-hpux.ads, s-osinte-irix.ads,
3010 s-osinte-solaris-posix.ads (pthread_rwlock_t): New definition alias of
3012 (pthread_rwlockattr_t): New definition alias of pthread_mutexattr_t.
3013 * s-osinte-linux.ads (pthread_rwlock_t, pthread_rwlockattr_t,
3014 pthread_rwlockattr_init, pthread_rwlockattr_destroy,
3015 pthread_rwlockattr_setkind_np, pthread_rwlock_init,
3016 pthread_rwlock_destroy, pthread_rwlock_rdlock,
3017 pthread_rwlock_wrlock, pthread_rwlock_unlock): New.
3019 2011-09-27 Pascal Obry <obry@adacore.com>
3021 * rtsfind.ads: Add RE_Lock_Read_Only into rtsfind circuitry.
3022 (RE_Id): Add RE_Lock_Read_Only.
3023 (RE_Unit_Table): Likewise.
3024 * sem_prag.adb (Process_Convention): Change Pragma_Locking_Policy
3025 to lift restriction on first character. Handle now the
3026 Name_Concurrent_Readers_Locking where policy character is set to
3028 * snames.ads-tmpl (Name_Concurrent_Readers_Locking): New
3030 * exp_ch9.adb (Build_Protected_Subprogram_Body): Generate a
3031 read only lock for function in protected object.
3032 * s-taprob.ads (Lock_Read_Only): Remove obsolete comment as
3033 this routine is now used.
3035 2011-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3037 * s-atocou-x86.adb (Decrement): Use %;.
3038 (Increment): Likewise.
3040 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
3042 * gcc-interface/utils2.c (build_allocator): Set TREE_THIS_NOTRAP on the
3043 dereference of the pointer to the storage area. Remove useless type
3044 conversions and factor out common code.
3046 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
3048 * gcc-interface/utils.c (maybe_unconstrained_array): Declare TYPE local
3049 variable and use it throughout.
3050 <UNCONSTRAINED_ARRAY_TYPE>: Add 'break' at the end.
3051 <RECORD_TYPE>: Do not unconditionally convert to the unpadded type as a
3052 first step. Also convert to the unpadded type as a last step.
3054 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
3056 * gcc-interface/gigi.h (create_subprog_decl): Replace TREE_CHAIN with
3057 DECL_CHAIN in comment.
3058 * gcc-interface/trans.c (gigi): Likewise.
3059 (Attribute_to_gnu): Likewise.
3060 (build_function_stub): Likewise.
3061 (gnat_to_gnu): Likewise.
3062 * gcc-interface/utils.c (create_subprog_decl): Likewise.
3063 (convert_vms_descriptor64): Likewise.
3064 (convert_vms_descriptor32): Likewise.
3066 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
3068 * gcc-interface/trans.c (assoc_to_constructor): Minor tweaks.
3069 * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting
3070 issues. Use COMPLETE_TYPE_P in assertion. Also set TREE_READONLY if
3071 the type of the record is TYPE_READONLY.
3073 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
3074 Robert Dewar <dewar@adacore.com>
3076 * sem_ch6.adb (Set_Formal_Mode): Set Can_Never_Be_Null on an IN or IN
3077 OUT formal parameter which is of an null-exclusion access subtype.
3079 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
3081 * gcc-interface/ada-tree.h (DECL_CAN_NEVER_BE_NULL_P): New macro.
3082 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Set the flag.
3083 (gnat_to_gnu_param): Likewise.
3084 * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Invoke
3085 maybe_unconstrained_array instead of doing the work manually.
3086 (maybe_unconstrained_array): Propagate the TREE_THIS_NOTRAP flag.
3087 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: If operand
3088 is a DECL with the flag, set TREE_THIS_NOTRAP on the reference.
3089 (gnat_stabilize_reference_1): Propagate the TREE_THIS_NOTRAP flag.
3090 (gnat_stabilize_reference): Likewise.
3092 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
3094 * gcc-interface/ada-tree.h (TYPE_NULL_BOUNDS): New macro.
3095 (SET_TYPE_NULL_BOUNDS): Likewise.
3096 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Set again
3097 TREE_THIS_NOTRAP on the INDIRECT_REF node built for the template.
3098 * gcc-interface/trans.c (Identifier_to_gnu): Return initializers of fat
3100 * gcc-interface/utils.c (create_var_decl_1): If the object is external,
3101 check that the initializer is a valid constant expression for use in
3102 initializing a static variable. Add missing guard.
3103 (update_pointer_to): Adjust TYPE_NULL_BOUNDS if set.
3104 (convert_to_fat_pointer): In the null fat pointer case, build a valid
3105 pointer for the bounds.
3106 * gcc-interface/utils2.c (compare_fat_pointers): New function.
3107 (build_binary_op) <EQ_EXPR>: Call it to compare fat pointers.
3109 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
3111 * gcc-interface/ada-tree.h (TREE_THIS_NOTRAP): Redefine.
3112 * gcc-interface/trans.c (Identifier_to_gnu): Factor out common code in
3113 the by-ref case. Do not set TREE_READONLY on a renamed object. Set
3114 TREE_THIS_NOTRAP on UNCONSTRAINED_ARRAY_REF nodes.
3115 (Attribute_to_gnu) <Attr_Length>: Expand the use of the parameter cache
3116 to the indirect case.
3117 * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Preserve
3118 the TREE_THIS_NOTRAP flag.
3120 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
3122 * gcc-interface/trans.c (Loop_Statement_to_gnu): In the case of an
3123 iteration scheme, always generate the do-while form if optimization
3124 is enabled. Use more straightforward test at the end.
3126 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
3128 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Subtype>: Use
3129 XNEW instead of xmalloc. Do not build useless pointer type.
3130 <E_Anonymous_Access_Subprogram_Type>: Use XNEW instead of xmalloc.
3131 * gcc-interface/trans.c (gnat_to_gnu) <N_Raise_Constraint_Error>: Tidy.
3132 * gcc-interface/utils2.c (build_unary_op): Remove local variable.
3134 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
3136 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not promote
3137 the alignment if this doesn't prevent BLKmode access to the object.
3139 2011-09-24 Iain Sandoe <iains@gcc.gnu.org>
3141 * gcc-interface/Makefile.in (darwin): Do not issue the
3142 '-flat_namespace' linker flag during Ada build.
3143 * mlib-tgt-specific-darwin.adb: Remove '-flat_namespace' flag from the
3144 default shared library options.
3146 2011-09-19 Alexandre Oliva <aoliva@redhat.com>
3148 * gcc-interface/decl.c (annotate_value): Look up expression for
3149 insertion in the cache at the end.
3151 2011-09-19 Arnaud Charlet <charlet@adacore.com>
3153 * gcc-interface/Make-lang.in: Update dependencies.
3155 2011-09-19 Steve Baird <baird@adacore.com>
3157 * snames.ads-tmpl: Move declaration of Name_Annotate into range of
3158 configuration pragma names so that Is_Configuration_Pragma_Name
3159 will return True for Name_Annotate. Make corresponding change in
3160 Pragma_Id enumeration type. This is needed to allow an Annotate
3161 pragma to occur in a configuration pragma file (typically,
3163 * gnat_ugn.texi: Add Annotate to the list of configuration pragmas.
3164 * gnat_rm.texi: Note that pragma Annotate may be used as a
3165 configuration pragma.
3167 2011-09-19 Ed Schonberg <schonberg@adacore.com>
3169 * a-cbmutr.adb, a-cbmutr.ads, a-cimutr.adb, a-cimutr.ads,
3170 a-comutr.adb, a-comutr.ads: Add iterator machinery for multiway trees.
3172 2011-09-19 Yannick Moy <moy@adacore.com>
3174 * exp_alfa.adb, exp_alfa.ads (Expand_Alfa_N_In): New function
3175 for expansion of set membership.
3176 (Expand_Alfa): Call expansion for N_In and N_Not_In nodes.
3177 * exp_ch4.adb, exp_ch4.ads (Expand_Set_Membership): Make procedure
3178 visible for use in Alfa expansion.
3179 * sem_ch5.adb (Analyze_Iterator_Specification): Introduce loop
3180 variable in Alfa mode.
3182 2011-09-19 Thomas Quinot <quinot@adacore.com>
3184 * s-osinte-darwin.ads: Change SIGADAABRT on Darwin to SIGABRT.
3186 2011-09-19 Thomas Quinot <quinot@adacore.com>
3188 * exp_ch9.adb: Minor reformatting.
3190 2011-09-19 Hristian Kirtchev <kirtchev@adacore.com>
3192 * freeze.adb (Build_Renamed_Body): Generic subprograms
3193 instantiations cannot be poperly inlined by the compiler, do
3194 not set the Body_To_Inline attribute in such cases.
3195 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Inherit all
3196 inlining-related flags from the generic subprogram declaration.
3198 2011-09-19 Thomas Quinot <quinot@adacore.com>
3200 * exp_dist.adb, rtsfind.ads, sem_util.adb, sem_util.ads
3201 (Build_Stub_Type): Remove, instead copy components from
3202 System.Partition_Interface.RACW_Stub_Type.
3203 (RPC_Receiver_Decl): Remainder of code from old Build_Stub_Type routine.
3204 (Copy_Component_List): New subprogram.
3206 2011-09-19 Yannick Moy <moy@adacore.com>
3208 * lib-xref.adb (Generate_Reference): Ignore references to
3209 constants in Standard.
3211 2011-09-19 Robert Dewar <dewar@adacore.com>
3213 * err_vars.ads, errout.ads: Minor reformatting.
3215 2011-09-19 Robert Dewar <dewar@adacore.com>
3217 * aspects.ads (Impl_Defined_Aspects): New array
3218 * lib-writ.adb (No_Dependences): New name for No_Dependence
3219 * restrict.adb (No_Dependences): New name for No_Dependence
3220 (Check_Restriction_No_Specification_Of_Aspect): New
3222 (Set_Restriction_No_Specification_Of_Aspect): New procedure
3223 (Restricted_Profile_Result): New variable
3224 (No_Specification_Of_Aspects): New variable
3225 (No_Specification_Of_Aspect_Warning): New variable
3226 * restrict.ads (No_Dependences): New name for No_Dependence
3227 (Check_Restriction_No_Specification_Of_Aspect): New procedure
3228 (Set_Restriction_No_Specification_Of_Aspect): New procedure
3229 * s-rident.ads: Add restriction
3230 No_Implementation_Aspect_Specifications, this is also added to
3231 the No_Implementation_Extensions profile.
3232 * sem_ch13.adb (Analyze_Aspect_Specifications): Check
3233 No_Implementation_Defined_Aspects
3234 (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
3235 * sem_prag.adb (Analyze_Aspect_Specifications): Check
3236 No_Implementation_Aspects
3237 (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
3238 * snames.ads-tmpl (Name_No_Specification_Of_Aspect): New name
3240 2011-09-19 Yannick Moy <moy@adacore.com>
3242 * lib-xref.adb (Generate_Reference): Take into account multiple
3243 renamings for Alfa refs.
3245 2011-09-19 Thomas Quinot <quinot@adacore.com>
3247 * g-socthi-mingw.adb: Minor reformatting.
3249 2011-09-19 Yannick Moy <moy@adacore.com>
3251 * gnat1drv.adb (Adjust_Global_Switches): Set tagged type
3252 expansion to False in mode Alfa
3254 2011-09-19 Pascal Obry <obry@adacore.com>
3256 * mingw32.h: Remove obsolete code needed for old versions
3259 2011-09-19 Robert Dewar <dewar@adacore.com>
3261 * errout.ads: Minor reformatting.
3263 2011-09-19 Ed Schonberg <schonberg@adacore.com>
3265 * sem_ch6.adb (Analyze_Expression_Function): When the expression
3266 function is transformed into a declaration and a body, insert
3267 body at the end of the declarative part, to prevent premature
3268 freeze actions, and preserve original specification in the
3269 subprogram declaration.
3271 2011-09-19 Vincent Celier <celier@adacore.com>
3273 * projects.texi: Minor editing.
3275 2011-09-19 Robert Dewar <dewar@adacore.com>
3277 * sem_aggr.adb, lib-writ.ads, s-restri.ads, sem_ch6.adb,
3278 exp_aggr.adb: Minor reformatting.
3280 2011-09-19 Yannick Moy <moy@adacore.com>
3282 * lib-xref.adb (Generate_Reference): Change entity referenced
3283 to underlying object if any, or else reference to the HEAP.
3285 2011-09-15 Arnaud Charlet <charlet@adacore.com>
3287 * gcc-interface/Make-lang.in: Update dependencies.
3289 2011-09-15 Robert Dewar <dewar@adacore.com>
3291 * tree_io.ads: Minor reformatting.
3292 * a-intnam.ads: Fix bad header.
3294 2011-09-15 Thomas Quinot <quinot@adacore.com>
3296 * a-exexpr-gcc.adb: Minor reformatting.
3298 2011-09-15 Yannick Moy <moy@adacore.com>
3300 * sem_ch6.adb: Propagate information that an expression function comes
3301 from source (otherwise references to this entity are not stored).
3303 2011-09-15 Robert Dewar <dewar@adacore.com>
3305 * a-cdlili.adb, a-coinve.adb, a-stzunb-shared.ads, a-suezst.adb,
3306 a-suenco.adb, a-stwiun-shared.ads, a-cobove.adb, a-convec.adb,
3307 a-btgbso.adb, a-cbdlli.adb, a-suewst.adb: Minor reformatting.
3309 2011-09-15 Ed Schonberg <schonberg@adacore.com>
3311 * sem_ch6.adb (Analyze_Expression_Function): Code cleanup:
3312 if the expression function is not a completion, create a
3313 new specification for the generated declaration, and keep the
3314 original specification in the generated body. Shorter code also
3315 ensures that proper warnings are generated for unused formals
3318 2011-09-15 Sergey Rybin <rybin@adacore.com>
3320 * tree_io.ads: Update ASIS_Version_Number because of the changes
3321 in the tree structures for expression functions.
3323 2011-09-15 Arnaud Charlet <charlet@adacore.com>
3325 * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
3326 s-osinte-hpux.ads, s-osinte-lynxos.ads, s-osinte-solaris-posix.ads,
3327 s-taprop-posix.adb (CLOCK_MONOTONIC): New constant.
3328 (CLOCK_REALTIME): Fix wrong value on some OSes.
3329 * s-taprop-posix.adb (Monotonic_Clock): Use CLOCK_MONOTONIC.
3331 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
3333 * gcc-interface/utils.c (maybe_unconstrained_array): In the reference
3334 to unconstrained array case, deal with each branch of a COND_EXPR.
3335 * gcc-interface/utils2.c (build_allocator): Deal with each branch of
3336 a COND_EXPR in the initializer, if present.
3338 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
3340 * gcc-interface/decl.c (maybe_pad_type): Do not try to change the form
3341 of an addressable type.
3342 * gcc-interface/trans.c (gnat_gimplify_expr) <VIEW_CONVERT_EXPR>: New.
3343 Deal with those cases for which creating a temporary is mandatory.
3345 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
3347 * gcc-interface/trans.c (call_to_gnu): Use local variable. Make sure
3348 this is a real formal parameter before testing whether it is by ref.
3350 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
3352 * gcc-interface/gigi.h (build_call_0_expr): Delete.
3353 (build_call_1_expr): Likewise.
3354 (build_call_2_expr): Likewise.
3355 (build_call_n_expr): New prototype.
3356 * gcc-interface/decl.c (gnat_to_gnu_entity): Use build_call_n_expr.
3357 * gcc-interface/trans.c (establish_gnat_vms_condition_handler): Ditto.
3358 (Handled_Sequence_Of_Statements_to_gnu): Likewise.
3359 (Exception_Handler_to_gnu_zcx): Likewise.
3360 (gnat_to_gnu): Likewise.
3361 (build_binary_op_trapv): Likewise.
3362 * gcc-interface/utils2.c (build_call_0_expr): Delete.
3363 (build_call_1_expr): Likewise.
3364 (build_call_2_expr): Likewise.
3365 (build_call_n_expr): New function.
3366 (build_call_raise): Use build_call_n_expr.
3367 (build_call_raise_range): Likewise.
3368 (build_call_raise_column): Likewise.
3369 (build_call_alloc_dealloc_proc): Likewise.
3370 (maybe_wrap_malloc): Likewise.
3371 (maybe_wrap_free): Likewise.
3373 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
3375 * gcc-interface/trans.c (build_return_expr): Use void_type_node for
3377 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Assert that
3378 the result type is null if ENABLE_CHECKING. Set operation_type at the
3379 end unconditionally if not set in the previous cases.
3380 Use build2 and void_type_node for MODIFY_EXPR.
3381 (build_allocator): Use NULL_TREE for MODIFY_EXPR.
3383 2011-09-08 Eric Botcazou <ebotcazou@adacore.com>
3385 * gcc-interface/utils.c (unchecked_convert): Use a field of the right
3386 precision when converting to or from an integral type whose precision
3387 is not equal to its size.
3389 2011-09-08 Iain Sandoe <iains@gcc.gnu.org>
3391 * traceback.c (Darwin) USE_GCC_UNWINDER for Darwin versions >= 8.
3393 2011-09-07 Iain Sandoe <iains@gcc.gnu.org>
3395 * gcc-interface/Makefile.in (darwin): Provide powerpc64 system
3397 * system-darwin-ppc64.ads: New file.
3399 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
3401 * gcc-interface/Makefile.in (gnatlib-shared-darwin): Remove
3404 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
3406 * gcc-interface/Makefile.in (darwin, SO_OPTS): Provide architecture
3407 size switches to the link phase for shared libs.
3409 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
3411 * gcc-interface/Makefile.in (x86_64 darwin arch): Adjust
3412 LIBGNAT_TARGET_PAIRS for x86 and x86_64 variants.
3414 2011-09-06 Arnaud Charlet <charlet@adacore.com>
3416 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in
3417 (gnattools, regnattools, cross-gnattools, canadian-gnattools,
3418 gnatlib, gnatlib-sjlj, gnatlib-zcx, gnatlib-shared, gnatlib_and_tools):
3420 (TOOLS_FLAGS_TO_PASS): New.
3421 (../stamp-tools): Reintroduce, to avoid merge conflicts.
3423 2011-09-06 Robert Dewar <dewar@adacore.com>
3425 * sem_ch10.adb, impunit.ads, impunit.adb (Not_Impl_Defined_Unit): New
3426 name for Is_RM_Defined_Unit. Also several fixes to this unit.
3428 2011-09-06 Robert Dewar <dewar@adacore.com>
3430 * impunit.ads, impunit.adb (Is_RM_Defined_Unit): New function.
3431 * s-rident.ads: New restriction No_Implementation_Units
3432 (this restriction is also part of the profile
3433 No_Implementation_Extensions)
3434 * sem_ch10.adb (Analyze_With_Clause): Add check for
3435 No_Implementation_Units restriction.
3437 2011-09-06 Jerome Guitton <guitton@adacore.com>
3439 * sysdep.c (__gnat_get_task_options): Disable VX_SPE_TASK
3442 2011-09-06 Thomas Quinot <quinot@adacore.com>
3444 * s-solita.adb: Minor reformatting.
3446 2011-09-06 Ed Schonberg <schonberg@adacore.com>
3448 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The body that
3449 is a rewriting of an expression function does not freeze previous
3452 2011-09-06 Robert Dewar <dewar@adacore.com>
3454 * impunit.adb (Is_Known_Unit): Fix bad handling of Ada 2012 case
3456 2011-09-06 Tristan Gingold <gingold@adacore.com>
3458 * gcc-interface/Makefile.in: Handle e500v2-wrs-vxworksae like
3459 powerpc-wrs-vxworksae.
3461 2011-09-06 Thomas Quinot <quinot@adacore.com>
3463 * s-os_lib.ads (Spawn): Minor documentation clarification,
3464 Success is True for a zero exit status.
3466 2011-09-06 Ed Schonberg <schonberg@adacore.com>
3468 * sem_ch5.adb: Add message for common iterator error.
3470 2011-09-06 Ed Schonberg <schonberg@adacore.com>
3472 * exp_ch3.adb (Build_Initialization_Call): If the target is a
3473 selected component discriminated by a current instance, replace
3474 the constraint with a reference to the target object, regardless
3475 of whether the context is an init_proc.
3477 2011-09-06 Robert Dewar <dewar@adacore.com>
3479 * exp_attr.adb: Descriptor_Size is never static.
3481 2011-09-06 Robert Dewar <dewar@adacore.com>
3483 * gnat_ugn.texi: Add documentation for LSLOC metric in gnatmetric
3485 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
3487 * gnat_rm.texi: Clarify that attribute Descriptor_Size is
3490 2011-09-06 Ed Schonberg <schonberg@adacore.com>
3492 * sem_res.adb (Resolve): An expression that is the body of an
3493 expression function does not freeze.
3495 2011-09-06 Matthew Heaney <heaney@adacore.com>
3497 * a-csquin.ads, a-cusyqu.adb, a-cbprqu.adb, a-cbsyqu.adb,
3498 a-cuprqu.adb: Changed copyright notice to indicate current
3501 2011-09-06 Vincent Celier <celier@adacore.com>
3503 * prj.adb: Minor spelling error fix in comment
3504 * sem_res.adb: Minor reformatting
3506 2011-09-06 Pascal Obry <obry@adacore.com>
3508 * sysdep.c (winflush_nt): Removed as not needed anymore.
3509 (winflush_95): Likewise.
3510 (winflush_init): Likewise.
3511 (winflush_function): Likewise.
3512 (getc_immediate_common): Remove call to winflush_function.
3514 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
3516 * exp_attr.adb (Expand_N_Attribute_Reference): Rewrite the
3517 processing for Descriptor_Size.
3518 * gnat_rm.texi: Rephrase the wording for attribute Descriptor_Size
3519 to account for its broader usage.
3520 * sem_attr.adb (Analyze_Attribute): Change the error detection
3521 circuitry for Descriptor_Size as the attribute is now applicable
3524 2011-09-06 Robert Dewar <dewar@adacore.com>
3526 * sem_attr.adb, prj-nmsc.adb, exp_aggr.adb: Minor reformatting.
3528 2011-09-06 Ed Schonberg <schonberg@adacore.com>
3530 * lib-xref.adb (OK_To_Set_Referenced): A reference to a formal
3531 in a parameter association must not set the Referenced flag on
3533 * prj-nmsc.adb (Check_File_Naming_Schemes): Remove useless formal
3535 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
3537 * gnat_rm.texi: Add a section on attribute Descriptor_Size
3539 2011-09-06 Arnaud Charlet <charlet@adacore.com>
3541 * gcc-interface/Makefile.in (common-tools, gnatmake-re,
3542 gnatlink-re): Speed up by using -j0.
3544 2011-09-06 Yannick Moy <moy@adacore.com>
3546 * sem_ch13.adb (Analyze_Aspect_Specifications): Call
3547 Set_Corresponding_Aspect when creating pragma from aspect.
3548 (Add_Predicates): Use new field Corresponding_Aspect.
3549 * sem_prag.adb (Analyze_Pragma): Make Pname hold source aspect
3550 name when present, for the purpose of issuing error messages;
3551 remove local procedure Error_Pragma_Arg_Alternate_Name.
3552 * sinfo.adb, sinfo.ads (Corresponding_Aspect): New field in
3554 (From_Dynamic_Predicate, From_Static_Predicate): Remove fields from
3557 2011-09-06 Robert Dewar <dewar@adacore.com>
3559 * checks.adb, s-except.ads, g-socket.adb: Minor reformatting.
3561 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
3563 * exp_ch6.adb (Build_Heap_Allocator): Add new
3564 local variable Desig_Typ. Code and comment reformatting. Add
3565 machinery to ensure that the allocation uses a fat pointer when
3566 the type of the return object is a constrained array and the
3567 function return type is an unconstrained array.
3569 2011-09-06 Vincent Celier <celier@adacore.com>
3571 * make.adb, prj-part.adb, prj-nmsc.adb: Remove unused formal
3572 parameters in subprograms.
3574 2011-09-06 Arnaud Charlet <charlet@adacore.com>
3576 * s-taprop-mingw.adb (Finalize_TCB): Fix typo.
3578 2011-09-06 Thomas Quinot <quinot@adacore.com>
3580 * s-taprop-vxworks.adb, s-tpoaal.adb, s-tpopsp-vxworks.adb
3581 (System.Tasking.Primitive_Operations.Specific.Delete): Remove
3583 (System.Tasking.Primitive_Operations.Specific.Set): If argument
3584 is null, destroy task specific data, to make API consistent with
3585 other platforms, and thus compatible with the shared version
3587 (System.Tasking.Primitive_Operations.ATCB_Allocation.Free_ATCB):
3588 Document the above assumption.
3590 2011-09-06 Ed Schonberg <schonberg@adacore.com>
3592 * exp_ch6.adb (Expand_Inlined_Call): Fix use of uninitialized
3593 variable for type of return value when return type is
3594 unconstrained and context is an assignment.
3596 2011-09-06 Ed Schonberg <schonberg@adacore.com>
3598 * sem_ch8.adb (Check_Class_Wide_Actual): Do not generate body of
3599 class-wide operation if expansion is not enabled.
3601 2011-09-06 Eric Botcazou <ebotcazou@adacore.com>
3603 * checks.adb (Apply_Scalar_Range_Check): Deal with access
3606 2011-09-06 Yannick Moy <moy@adacore.com>
3608 * sem_ch13.adb (Analyze_Aspect_Specifications, case
3609 Aspect_Invariant): Do not issue error at this point on illegal
3610 pragma placement, as this is checked later on when analyzing
3611 the corresponding pragma.
3612 * sem_prag.adb (Error_Pragma_Arg_Alternate_Name): New procedure
3613 similar to Error_Pragma_Arg, except the source name of the
3614 aspect/pragma to use in warnings may be equal to parameter
3615 Alt_Name (Analyze_Pragma, case Pragma_Invariant): refine error
3616 message to distinguish source name of pragma/aspect, and whether
3617 the illegality resides in the type being public, or being private
3618 without a public declaration
3620 2011-09-06 Thomas Quinot <quinot@adacore.com>
3622 * g-socket.adb (Check_For_Fd_Set): On Windows, no need for bitmap
3623 size check (fd_set is implemented differently on that platform).
3625 2011-09-06 Thomas Quinot <quinot@adacore.com>
3627 * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
3628 s-tpoaal.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
3629 s-taprop-solaris.adb, s-taprop-irix.adb, s-taprop.ads,
3630 s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
3631 (ATCB_Allocation): New subpackage of
3632 System.Tasking.Primitive_Operations, shared across all targets
3633 with full tasking runtime.
3634 (ATCB_Allocation.New_ATCB): Moved there (from target specific
3636 (ATCB_Allocation.Free_ATCB): New subprogram. Deallocate an ATCB,
3637 taking care of establishing a local temporary ATCB if the one
3638 being deallocated is Self, to avoid a reference to the freed
3639 ATCB in Abort_Undefer.
3641 2011-09-06 Thomas Quinot <quinot@adacore.com>
3643 * s-tassta.adb, s-taskin.ads (Free_Task): If the task is not
3644 terminated, mark it for deallocation upon termination.
3645 (Terminate_Task): Call Free_Task again if the task is marked
3646 for automatic deallocation upon termination.
3648 2011-09-06 Robert Dewar <dewar@adacore.com>
3650 * a-cbprqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cusyqu.ads,
3651 a-intnam-aix.ads, a-intnam-darwin.ads, a-intnam-dummy.ads,
3652 a-intnam-freebsd.ads, a-intnam-hpux.ads, a-intnam-irix.ads,
3653 a-intnam-linux.ads, a-intnam-lynxos.ads, a-intnam-mingw.ads,
3654 a-intnam-solaris.ads, a-intnam-tru64.ads,
3655 a-intnam-vms.ads, a-intnam-vxworks.ads, a-intnam.ads, interfac.ads,
3656 cstand.adb, s-maccod.ads: Mark all entities as Implementation_Defined
3657 * einfo.ads, einfo.adb (Is_Implementation_Defined): New flag
3658 * par-prag.adb: Add dummy entry for pragma Implementation_Defined
3659 * s-rident.ads: Add new restriction No_Implementation_Identifiers
3660 Add new profile No_Implementation_Extensions
3661 * sem_prag.adb: Implement pragma Implementation_Defined Implement
3662 profile No_Implementation_Extensions
3663 * sem_util.adb: Minor reformatting (Set_Entity_With_Style_Check):
3664 Check violation of restriction No_Implementation_Identifiers
3665 * snames.ads-tmpl: Add entries for pragma Implementation_Defined
3666 Add entry for Name_No_Implementation_Extensions
3668 2011-09-06 Robert Dewar <dewar@adacore.com>
3670 * impunit.ads: Minor reformatting.
3672 2011-09-06 Robert Dewar <dewar@adacore.com>
3674 * ali.adb, sem_ch13.adb, lib-xref.adb: Minor reformatting.
3676 2011-09-06 Pascal Obry <obry@adacore.com>
3678 * s-osinte-linux.ads, s-oscons-tmplt.c: Use oscons to define sigset_t
3681 2011-09-06 Robert Dewar <dewar@adacore.com>
3683 * g-socket.adb: Minor reformatting
3685 2011-09-06 Javier Miranda <miranda@adacore.com>
3687 * ali.adb (Scan_ALI): Add missing support to load references of
3688 entities imported from other languages.
3689 * ali.ads (Xref_Record): Adding new fields to store the language and
3690 name of an imported entity.
3691 * lib-xref.adb (Output_Import_Export_Info): Fix typo
3694 2011-09-06 Ed Schonberg <schonberg@adacore.com>
3696 * sem_prag.adb (Analyze_Pragma, case Type_Invariant): A type invariant
3697 is allowed on a full type declaration if it is the completion of
3698 a private declarations.
3699 * sem_ch13.adb (Analyze_Aspect_Specifications): An invariant
3700 aspect is allowed on a full type declaration in the private part
3703 2011-09-06 Robert Dewar <dewar@adacore.com>
3705 * sem_ch8.ads: Minor reformatting
3707 2011-09-06 Thomas Quinot <quinot@adacore.com>
3709 * s-oscons-tmplt.c, g-socket.adb (GNAT.Sockets.Clear,Set,Is_Set):
3710 Guard against socket values that are not in [0;FD_SETSIZE[
3712 2011-09-06 Robert Dewar <dewar@adacore.com>
3714 * s-osinte-linux.ads, a-iteint.ads, exp_ch6.adb, s-solita.adb: Minor
3717 2011-09-06 Arnaud Charlet <charlet@adacore.com>
3719 * s-linux-alpha.ads: Minor reformatting
3720 * s-oscons-tmplt.c: Fix generated comments in s-oscons template.
3721 Use sizeof instead of corresponding C defines in s-oscons template.
3723 2011-09-06 Vadim Godunko <godunko@adacore.com>
3725 * a-convec.ads, a-iteint.ads: Minor reformatting.
3727 2011-09-06 Vincent Celier <celier@adacore.com>
3729 * projects.texi: Add menus and @node lines.
3731 2011-09-06 Ed Schonberg <schonberg@adacore.com>
3733 * exp_ch6.adb (Expand_Inlined_Call): Handle properly the case
3734 where the return type is an unconstrained array and the context
3735 is an assignment. Optimize the case when the target of the
3736 assignment is a selected component.
3738 2011-09-06 Arnaud Charlet <charlet@adacore.com>
3740 * s-solita.adb: Update comments.
3742 2011-09-06 Pascal Obry <obry@adacore.com>
3744 * s-linux.ads, s-linux-alpha.ads, s-linux-hppa.ads, s-linux-mipsel.ads,
3745 s-linux-sparc.ads: Remove hard coded and now wrong definitions.
3746 * s-oscons-tmplt.c: Add support for generating pthread related
3747 types size on GNU/Linux as done for Darwin.
3748 * s-osinte-linux.ads: Use s-oscons to define the pthread types.
3750 2011-09-06 Robert Dewar <dewar@adacore.com>
3752 * exp_ch6.adb: Fix minor typo.
3754 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
3756 * exp_ch7.adb: Remove with and use clauses for Get_Targ.
3757 (Alignment_Of): Moved to the body of Nearest_Multiple_Rounded_Up.
3758 (Double_Size_Of): Alphabetized. Update the comment on usage.
3759 (Make_Finalize_Address_Stmts): Update comments and reformat code.
3760 (Nearest_Multiple_Rounded_Up): New routine.
3761 (Size_Of): Update comment on usage. The generated expression now
3762 accounts for alignment gaps by rounding the size of the type to the
3763 nearest multiple rounded up of the type's alignment.
3765 2011-09-06 Robert Dewar <dewar@adacore.com>
3767 * exp_ch7.adb, g-comlin.adb: Minor reformatting.
3769 2011-09-06 Steve Baird <baird@adacore.com>
3771 * exp_ch4.adb (Expand_Allocator_Expression): Look through
3772 derived subprograms in checking for presence of an
3773 Extra_Accessibility_Of_Result formal parameter.
3774 * exp_ch6.adb (Expand_Call): Look through derived subprograms in
3775 checking for presence of an Extra_Accessibility_Of_Result formal
3777 (Expand_Call.Add_Actual_Parameter): Fix a bug in the
3778 case where the Parameter_Associatiations attribute is already set,
3779 but set to an empty list.
3780 (Needs_Result_Accessibility_Level):
3781 Unconditionally return False. This is a temporary
3782 change, disabling the Extra_Accessibility_Of_Result
3784 (Expand_Simple_Function_Return): Check for
3785 Extra_Accessibility_Of_Result parameter's presence instead of
3786 testing Ada_Version when generating a runtime accessibility
3787 check which makes use of the parameter.
3789 2011-09-06 Ed Schonberg <schonberg@adacore.com>
3791 * exp_ch4.adb (Expand_N_Case_Expression): Actions created for the
3792 expression in a given case alternative must be attached to the
3793 statement list of the ccrresponding case statement alternative
3794 They cannot be propagated ahead of the case statement, because
3795 the validity of the expression that generated the action may
3796 hold only for that alternative.
3798 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
3800 * exp_ch7.adb: Remove with and use clauses for Get_Targ.
3801 (Alignment_Of): Remove the code for strict alignment targets.
3802 (Double_Alignment_Of): Removed.
3803 (Double_Size_Of): New routine.
3804 (Make_Finalize_Address_Stmts): Change the
3805 calculation of the dope's size. Update relevant comments.
3806 (Size_Of): New routine.
3808 2011-09-06 Steve Baird <baird@adacore.com>
3810 * einfo.ads (Extra_Accessibility): Update associated comment to use
3811 the term "present" correctly ("present" just means that it is not
3812 an error to query the value of the attribute - it does not imply
3813 that the value must be non-null).
3814 (Extra_Constrained): Ditto.
3815 (Is_Visible_Formal): Ditto.
3816 (Extra_Accessibility_Of_Result) Ditto; also add Inline pragma.
3817 (Set_Extra_Accessibility_Of_Result): Add Inline pragma.
3818 * exp_ch4.adb (Expand_Allocator_Expression): Improve a comment.
3819 * exp_ch6.adb (Expand_Call): The callee may require an
3820 Extra_Accessibility_Of_Result actual parameter even if Ada_Version
3821 < Ada_2012. This can occur if the callee is exported from a Gnat
3822 runtimes unit. Also improve a comment.
3824 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
3826 * exp_ch7.adb: Add with and use clauses for Get_Targ.
3827 (Alignment_Of): Rename formal parameter Some_Typ
3828 to Typ, update related comment. Use the allocator alignment on
3829 strict alignment targets such as SPARC.
3830 (Double_Alignment_Of): Rename formal parameter Some_Typ to Typ, update
3833 2011-09-06 Gary Dismukes <dismukes@adacore.com>
3835 * sem_ch9.adb (Check_Interfaces): Test
3836 Is_Limited_Type rather than Is_Limited_Record when checking that
3837 the partial view of a synchronized full view must be limited.
3839 2011-09-06 Emmanuel Briot <briot@adacore.com>
3841 * g-comlin.adb (Free): Fix memory leak.
3843 2011-09-06 Robert Dewar <dewar@adacore.com>
3845 * sem_util.adb, exp_ch6.adb: Minor reformatting and code reorganization.
3847 2011-09-06 Steve Baird <baird@adacore.com>
3849 * einfo.ads (Extra_Accessibility_Of_Result): New function; in the
3850 (Ada2012) cases described in AI05-0234 where the accessibility
3851 level of a function result is "determined by the point of
3852 call", an implicit parameter representing that accessibility
3853 level is passed in. Extra_Accessibilty_Of_Result yields this
3854 additional formal parameter. Extra_Accessibility_Of_Result
3855 is analogous to the existing Extra_Accessibility
3856 function used in the implementation of access parameters.
3857 (Set_Extra_Accessibility_Of_Result): New procedure; sets
3858 Extra_Accessibility_Of_Result attribute.
3859 * einfo.adb (Extra_Accessibility_Of_Result): New function.
3860 (Set_Extra_Accessibility_Of_Result): New procedure.
3861 (Write_Field19_Name): Display Extra_Accessibilty_Of_Result attribute.
3862 * sem_util.adb (Dynamic_Accessibility_Level): Set Etype of
3863 an accessibility level literal to Natural; introduce a nested
3864 function, Make_Level_Literal, to do this.
3865 * exp_ch6.ads (Needs_Result_Accessibility_Level): New function;
3866 determines whether a given function (or access-to-function
3867 type) needs to have an implicitly-declared accessibility-level
3868 parameter added to its profile.
3869 (Add_Extra_Actual_To_Call): Export an existing procedure which was
3870 previously declared in the body of Exp_Ch6.
3871 * exp_ch6.adb (Add_Extra_Actual_To_Call): Export declaration by moving
3873 (Has_Unconstrained_Access_Discriminants): New Function; a
3874 predicate on subtype entities which returns True if the given
3875 subtype is unconstrained and has one or more access discriminants.
3876 (Expand_Call): When expanding a call to a function which takes an
3877 Extra_Accessibility_Of_Result parameter, pass in the appropriate
3878 actual parameter value. In the case of a function call which is
3879 used to initialize an allocator, this may not be possible because
3880 the Etype of the allocator may not have been set yet. In this
3881 case, we defer passing in the parameter and handle it later in
3882 Expand_Allocator_Expression.
3883 (Expand_Simple_Function_Return): When returning from a function which
3884 returns an unconstrained subtype having at least one access
3885 discriminant, generate the accessibility check needed to ensure that
3886 the function result will not outlive any objects designated by its
3888 (Needs_Result_Accessibility_Level): New function; see exp_ch6.ads
3890 * exp_ch4.adb (Expand_Allocator_Expression): When a function call
3891 is used to initialize an allocator, we may need to pass in "the
3892 accessibility level determined by the point of call" (AI05-0234)
3893 to the function. Expand_Call, where such actual parameters are
3894 usually generated, is too early in this case because the Etype of
3895 the allocator (which is used in determining the level to be passed
3896 in) may not have been set yet when Expand_Call executes. Instead,
3897 we generate code to pass in the appropriate actual parameter
3898 in Expand_Allocator_Expression.
3899 * sem_ch6.adb (Create_Extra_Formals): Create
3900 the new Extra_Accessibility_Of_Result formal if
3901 Needs_Result_Accessibility_Level returns True. This includes the
3902 introduction of a nested procedure, Check_Against_Result_Level.
3904 2011-09-06 Arnaud Charlet <charlet@adacore.com>
3906 * gcc-interface/Makefile.in (X86_TARGET_PAIRS): Remove duplicate
3909 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
3911 * s-finmas.adb (Set_Finalize_Address): Explain the reason
3912 for the synchronization. Move the test for null from
3913 s-stposu.Allocate_Any_Controlled to this routine since the check
3914 needs to be protected too.
3915 (Set_Heterogeneous_Finalize_Address): Explain the reason for the
3916 synchronization code.
3917 * s-finmas.ads (Set_Heterogeneous_Finalize_Address): Add comment
3918 explaining the context in which this routine is used.
3919 * s-stposu.adb (Allocate_Any_Controlled): Move the test for null
3920 to s-finmas.Set_Finalize_Address.
3922 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3924 * einfo.ads: Document that itypes have no parent field.
3926 2011-09-05 Robert Dewar <dewar@adacore.com>
3928 * rtsfind.adb (Check_CRT): Check for overloaded entity
3929 * rtsfind.ads: Document that entities to be found by rtsfind
3930 cannot be overloaded
3931 * s-taenca.adb, s-tasren.adb, s-tpobop.adb, s-tpoben.ads, s-tpoben.adb
3932 (Lock_Entries_With_Status): New name for Lock_Entries with two
3933 arguments (changed to meet rtsfind no overloading rule).
3935 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
3937 * s-finmas.adb (Set_Finalize_Address (Address,
3938 Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
3939 (Set_Finalize_Address (in out Finalization_Master,
3940 Finalize_Address_Ptr): Add synchronization code.
3941 * s-finmas.ads (Set_Finalize_Address (Address,
3942 Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
3943 * s-stposu.adb (Allocate_Any_Controlled): Update the call to
3944 Set_Finalize_Address for the heterogeneous case.
3946 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3948 * sem_ch3.adb: Undo previous change, not suitable after all.
3950 2011-09-05 Robert Dewar <dewar@adacore.com>
3952 * einfo.ads: Minor comment clarification.
3954 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
3956 * exp_ch6.adb (Move_Activation_Chain): Rewritten. The routine
3957 no longer needs to search through the entities of the return
3958 statement scope to find the _chain.
3959 * sem_ch5.adb: Add with and use clauses for Exp_Ch6 and Sem_Ch6.
3960 (Analyze_Block_Statement): Add local variable
3961 Is_BIP_Return_Statement. Add machinery to install all entities
3962 produced by the expansion of the return object declaration.
3963 (Install_Return_Entities): New routine.
3964 * sem_ch6.ads, sem_ch6.adb (Install_Entity): Moved from body to spec.
3966 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3968 * sem_ch10.adb (Analyze_Context): Apply simple fixup if context
3969 of subunit is incomplete.
3970 (Analyze_Proper_Body): If parent spec is not available, do not
3973 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3975 * sem_disp.adb (Find_Controlling_Arg): Add checks for
3976 interface type conversions, that are expanded into dereferences.
3978 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
3980 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
3981 Examine the parameter and return profile of a subprogram and swap
3982 any incomplete types coming from a limited context with their
3983 corresponding non-limited views.
3984 (Exchange_Limited_Views): New routine.
3986 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3988 * sem_ch3.adb (Prepare_Private_Subtype_Completion): Set parent
3989 of internal entity to the subtype declaration, so that when
3990 entities are subsequently exchanged in a package body, the tree
3991 remains properly formatted for ASIS.
3993 2011-09-05 Johannes Kanig <kanig@adacore.com>
3995 * g-comlin.adb (Set_Usage): Additional optional argument to set help
3997 (Display_Help): display the user given help message, if available.
3999 2011-09-05 Ed Schonberg <schonberg@adacore.com>
4001 * sem_ch3.adb (OK_For_Limited_Init_In_05): The expression
4002 is legal if the original node is an identifier that is a
4003 parameterless function call.
4005 2011-09-05 Pascal Obry <obry@adacore.com>
4007 * prj-nmsc.adb: Minor reformatting.
4008 Add support for standalone aggregate library.
4009 (Check_Stand_Alone_Library): Handle standalone aggregate library.
4010 * projects.texi: Fix documentation for aggregate library projects.
4012 2011-09-05 Robert Dewar <dewar@adacore.com>
4014 * sem_ch6.adb: Minor reformatting.
4016 2011-09-05 Matthew Gingell <gingell@adacore.com>
4018 * s-tassta.adb (Task_Wrapper): Ensure that we don't try to write the
4019 stack guard page on PPC Linux. This patch ensures the 64K guard page at
4020 the bottom of the stack is not overwritten.
4022 2011-09-05 Thomas Quinot <quinot@adacore.com>
4024 * exp_intr.adb, s-tasini.adb: Minor reformatting.
4026 2011-09-05 Ed Schonberg <schonberg@adacore.com>
4028 * sem_ch3.adb (Access_Definition): If an access type declaration
4029 appears in a child unit, the scope of whatever anonymous type
4030 may be generated is the child unit itself.
4032 2011-09-05 Ed Schonberg <schonberg@adacore.com>
4034 * sem_ch6.adb (Analyze_Expression_Function): Do not set
4035 Comes_From_Source on rewritten body.
4036 (Analyze_Subprogram_Body_Helper): Check that the original node for
4037 the body comes from source, when determining whether expansion
4038 of a protected operation is needed.
4040 2011-09-05 Ed Schonberg <schonberg@adacore.com>
4042 * exp_aggr.adb (Replace_Type): If the target of the assignment is
4043 a selected component and the right-hand side is a self-referential
4044 access, the proper prefix of the rewritten attribute is a copy
4045 of the left-hand side, not of its prefix.
4047 2011-09-05 Robert Dewar <dewar@adacore.com>
4049 * sem_ch5.adb: Minor reformatting.
4050 * sem_ch3.adb: Minor code clean up.
4052 2011-09-05 Jose Ruiz <ruiz@adacore.com>
4054 * exp_ch9.adb (Make_Initialize_Protection): The fact that
4055 restriction No_Dynamic_Attachment is in effect or not should
4056 not influence the default priority associated to a protected
4057 object. With this change, when the restriction is in effect (as
4058 is the case for the Ravenscar profile) the default priority of
4059 a protected object with an interrupt handler is in the range of
4060 interrupt priorities (Default_Interrupt_Priority) as required
4063 2011-09-05 Arnaud Charlet <charlet@adacore.com>
4065 * a-iteint.ads: Fix header.
4067 2011-09-05 Vincent Celier <celier@adacore.com>
4069 * prj-conf.adb (Do_Autoconf): Make sure Obj_Dir always ends
4070 with a directory separator to avoid output such as:
4071 "/path/to/objauto.cgpr" has been deleted.
4073 2011-09-05 Robert Dewar <dewar@adacore.com>
4075 * sem_ch3.adb: Minor reformatting.
4077 2011-09-05 Ed Schonberg <schonberg@adacore.com>
4079 * sem_ch5.adb: Better error message.
4081 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
4083 * exp_aggr.adb: Add with and use clause for Exp_Ch6.
4084 (Expand_Array_Aggregate): Detect a special case of an aggregate
4085 which contains tasks in the context of an unexpanded return
4086 statement of a build-in-place function.
4087 * exp_ch6.adb: Add with and use clause for Exp_Aggr.
4088 (Expand_N_Extended_Return_Statement): Detect a delayed aggregate
4089 which contains tasks and expand it now that the original simple
4090 return statement has been rewritten.
4091 * exp_ch9.adb (Build_Activation_Chain_Entity): Code
4092 reformatting. Do not create a chain for an extended return
4093 statement if one is already available.
4094 (Has_Activation_Chain): New routine.
4096 2011-09-05 Marc Sango <sango@adacore.com>
4098 * sem_ch3.adb (Analyze_Object_Declaration): Remove
4099 the wrong test and add the correct test to detect the violation
4100 of illegal use of unconstrained string type in SPARK mode.
4102 2011-09-05 Ed Schonberg <schonberg@adacore.com>
4104 * sem_ch5.adb (Analyze_Iteration_Specification): Improve error
4105 message on an iterator over an array.
4107 2011-09-05 Robert Dewar <dewar@adacore.com>
4109 * lib-xref-alfa.adb: Minor reformatting.
4111 2011-09-05 Robert Dewar <dewar@adacore.com>
4113 * sem_ch3.adb, sem_res.adb, par.adb, par-ch6.adb, g-comlin.adb,
4114 exp_ch6.adb, lib-xref-alfa.adb: Minor reformatting.
4116 2011-09-05 Gary Dismukes <dismukes@adacore.com>
4118 * exp_ch7.adb, exp_ch6.adb: Minor reformatting.
4120 2011-09-05 Johannes Kanig <kanig@adacore.com>
4122 * lib-xref-alfa.adb: Update comments.
4124 2011-09-05 Thomas Quinot <quinot@adacore.com>
4126 * sem_res.adb: Minor reformatting
4128 2011-09-05 Ed Schonberg <schonberg@adacore.com>
4130 * exp_ch6.adb (Build_In_Place_Formal): If extra formals are not
4131 present, create them now. Needed in case the return type was
4132 a limited view in the function declaration.
4133 (Make_Build_In_Place_Call_In_Allocator): If return type contains
4134 tasks, build the activation chain for it. Pass a reference to
4135 the Master_Id in call to Add_Task_Actuals_To_Build_In_Place call.
4136 * exp_ch7.adb (Make_Set_Finalize_Address_Call): Clean up interface
4137 with build_in_place calls.
4138 * sem_ch9.adb (Analyze_Task_Type_Declaration): If partial view was
4139 incomplete, inatialize its Corresponding_Record_Type component.
4140 * sem_ch10.adb (Build_Chain): Initialize Private_Dependents field
4143 2011-09-05 Johannes Kanig <kanig@adacore.com>
4145 * lib-xref-alfa.adb (Is_Alfa_Reference): Filter constants from effect
4148 2011-09-05 Ed Schonberg <schonberg@adacore.com>
4150 * par-ch6.adb (P_Subprogram): In Ada2012 mode, if the subprogram
4151 appears within a package specification and the token after "IS"
4152 is not a parenthesis, assume that this is an unparenthesized
4153 expression function, even if the token appears in a line by
4155 * par.adb: Clarify use of Labl field of scope stack in error
4158 2011-09-05 Bob Duff <duff@adacore.com>
4160 * sem_res.adb (Resolve_Intrinsic_Operator): Use unchecked
4161 conversions instead of normal type conversions in all cases where a
4162 type conversion would be illegal. In particular, use unchecked
4163 conversions when the operand types are private.
4165 2011-09-05 Johannes Kanig <kanig@adacore.com>
4167 * lib-xref-alfa.adb (Is_Alfa_Reference): Never declare effects on
4168 objects of task type or protected type.
4170 2011-09-05 Ed Schonberg <schonberg@adacore.com>
4172 * sem_ch6.adb (Analyze_Expression_Function): If the expression
4173 function comes from source, indicate that so does its rewriting,
4174 so it is compatible with any subsequent expansion of the
4175 subprogram body (e.g. when it is a protected operation).
4176 * sem_ch4.adb: minor reformatting
4178 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
4180 * lib.adb (Check_Same_Extended_Unit): Comment rewriting. Use
4181 Get_Source_Unit rather than Get_Code_Unit as instantiation unfolding
4182 may lead to wrong ancestor package in the case of instantiated subunit
4183 bodies. If a subunit is instantiated, follow the chain of instantiations
4184 rather than the stub structure.
4186 2011-09-02 Robert Dewar <dewar@adacore.com>
4188 * sem_ch4.adb, sem_ch6.adb: Minor reformatting.
4189 * gcc-interface/Make-lang.in: Update dependencies.
4191 2011-09-02 Marc Sango <sango@adacore.com>
4193 * sem_ch3.adb (Analyze_Object_Declaration): Change
4194 comment and add additional check to differentiate constant of
4195 type string from others unconstrained type.
4197 2011-09-02 Ed Schonberg <schonberg@adacore.com>
4199 * sinfo.ads, sinfo.adb: New semantic attribute Premature_Use,
4200 present in incomplete type declarations to refine the error
4201 message the full declaration is in the same unit.
4202 * sem_ch4.adb (Analyze_Selected_Component): If the prefix is of
4203 an incomplete type, set the Premature_Use for additional message.
4204 * sem_ch3.adb (Find_Type_Name): If partial view is incomplete
4205 and Premature_Use is set, place additional information at the
4206 point of premature use.
4208 2011-09-02 Bob Duff <duff@adacore.com>
4210 * sem_ch6.adb: (Check_Post_State): Suppress warning
4211 "postcondition refers only to pre-state" when the expression has not
4212 yet been analyzed, because it causes false alarms. This can happen when
4213 the postcondition contains a quantified expression, because those are
4214 analyzed later. This is a temporary/partial fix.
4215 (Process_Post_Conditions): Minor: change wording of warning.
4217 2011-09-02 Marc Sango <sango@adacore.com>
4219 * sem_ch3.adb (Analyze_Object_Declaration): Detect the violation of
4220 illegal use of unconstrained string type in SPARK mode.
4221 * sem_res.adb (Analyze_Operator_Symbol): Set the
4222 right place where the string operand of concatenation should be
4223 violate in SPARK mode.
4225 2011-09-02 Robert Dewar <dewar@adacore.com>
4227 * sem_prag.adb, sem_util.adb, sem_ch6.adb, prj-nmsc.adb,
4228 exp_ch3.adb: Minor reformatting.
4230 2011-09-02 Vincent Celier <celier@adacore.com>
4232 * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Declare "gcc"
4233 as the compiler driver so Is_Compilable returns True for sources.
4234 * prj-nmsc.adb (Override_Kind): When Kind is Sep, set the source
4237 2011-09-02 Ed Schonberg <schonberg@adacore.com>
4239 * sem_prag.adb (Analyze_PPC_In_Decl_Part): for a class-wide
4240 condition, a reference to a controlling formal must be interpreted
4241 as having the class-wide type (or an access to such) so that the
4242 inherited condition can be properly applied to any overriding
4243 operation (see ARM12 6.6.1 (7)).
4245 2011-09-02 Tristan Gingold <gingold@adacore.com>
4247 * init.c (__gnat_is_vms_v7): Fix case and add prototype
4250 2011-09-02 Javier Miranda <miranda@adacore.com>
4252 * exp_ch3.adb (Expand_N_Object_Declaration): Do not copy the
4253 initializing expression of a class-wide interface object declaration
4254 if its type is limited.
4256 2011-09-02 Johannes Kanig <kanig@adacore.com>
4258 * sem_util.adb (Unique_Name): To obtain a unique name for enumeration
4259 literals, take into account the type name; the type is *not*
4260 the scope for an enumeration literal.
4262 2011-09-02 Ed Schonberg <schonberg@adacore.com>
4264 * sem_ch6.adb (Check_Overriding_Indicator): add special check
4265 to reject an overriding indicator on a user-defined Adjust
4266 subprogram for a limited controlled type.
4268 2011-09-02 Ed Schonberg <schonberg@adacore.com>
4270 * sem_res.adb (Resolve_Actuals): add missing call to Resolve
4271 for an actual that is a function call returning an unconstrained
4272 limited controlled type.
4274 2011-09-02 Tristan Gingold <gingold@adacore.com>
4276 * g-socthi-vms.adb (c_sendmsg, c_recvmsg): Use unpacked msg if on vms 7
4278 2011-09-02 Johannes Kanig <kanig@adacore.com>
4280 * alfa.ads (Name_Of_Heap_Variable): Change value of the HEAP variable
4281 from "HEAP" to __HEAP Change comment that refers to that variable
4282 * put_alfa.adb: Change comment that refers to that variable
4284 2011-09-02 Robert Dewar <dewar@adacore.com>
4286 * exp_ch4.adb, exp_ch6.adb, prj-nmsc.adb: Minor reformatting.
4288 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
4290 * exp_util.adb (Extract_Renamed_Object): Renamed to
4291 Find_Renamed_Object. This routine has been reimplemented and now uses
4292 tree traversal to locate a renamed object.
4293 (Is_Aliased): Replace call to Extract_Renamed_Object with
4294 Find_Renamed_Object.
4296 2011-09-02 Tristan Gingold <gingold@adacore.com>
4298 * init.c: (__gnat_is_vms_v7): New function.
4300 2011-09-02 Olivier Hainque <hainque@adacore.com>
4302 * tracebak.c (STOP_FRAME, ppc elf/vxworks case): Stop on frames
4303 that have a misaligned backchain, necessarily bogus.
4305 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
4307 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not create
4308 TSS routine Finalize_Address when compiling in Alfa mode.
4309 (Expand_Freeze_Record_Type): Do not create TSS routine
4310 Finalize_Address when compiling in Alfa mode.
4311 * exp_ch4.adb (Expand_Allocator_Expression): Do not produce a
4312 call to Set_Finalize_Address in Alfa mode because Finalize_Address is
4314 (Expand_N_Allocator): Do not produce a call to
4315 Set_Finalize_Address in Alfa mode because Finalize_Address is not built.
4316 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Do not
4317 produce a call to primitive Set_Finalize_Address in Alfa mode because
4318 Finalize_Address is not built.
4319 * exp_ch7.adb (Build_Finalization_Master): Do not create
4320 finalization masters in Afa mode since they are not needed.
4321 (Build_Finalizer): Do not create scope and library-level
4322 finalizers in Alfa mode since they are not needed.
4323 * exp_util.adb (Build_Allocate_Deallocate_Proc): Do not expand
4324 "new" and "free" when applied to controlled objects in Alfa mode since
4327 2011-09-02 Vincent Celier <celier@adacore.com>
4329 * prj-nmsc.db: (Check_Stand_Alone_Library): For SALs, allow
4330 only library names with the syntax of Ada identifiers, to avoid errors
4331 when compiling the binder generated files.
4332 * projects.texi: Document restriction on SAL library names
4334 2011-09-02 Thomas Quinot <quinot@adacore.com>
4336 * a-chtgbo.adb: Minor comment fix.
4338 2011-09-02 Robert Dewar <dewar@adacore.com>
4340 * lib-xref.adb: Minor reformatting
4342 2011-09-02 Vincent Celier <celier@adacore.com>
4344 * bindusg.adb, clean.adb, gnatchop.adb, gnatfind.adb, gnatlink.adb,
4345 gnatls.adb, gnatname.adb, gnatxref.adb, gprep.adb, makeusg.adb: Add
4346 --version and --help in usage.
4347 * switch.ads, switch.adb (Display_Usage_Version_And_Help): New procedure
4349 2011-09-02 Bob Duff <duff@adacore.com>
4351 * lib-xref.adb: (Hash): Avoid use of 'Mod attribute, because old
4352 compilers don't understand it.
4354 2011-09-02 Gary Dismukes <dismukes@adacore.com>
4356 * exp_attr.adb (Expand_N_Attribute_Reference): Pass the
4357 underlying subtype rather than its base type on the call to
4358 Build_Record_Or_Elementary_Input_Function, so that any
4359 constraints on a discriminated subtype will be available for
4360 doing the check required by AI05-0192.
4361 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
4362 If the prefix subtype of the 'Input attribute is a constrained
4363 discriminated subtype, then check each constrained discriminant value
4364 against the corresponding value read from the stream.
4366 2011-09-02 Yannick Moy <moy@adacore.com>
4368 * usage.adb, warnsw.adb, sem_ch6.adb, opt.ads: Disable by default
4369 warnings on suspicious contracts, and enable them with -gnatwa.
4371 2011-09-02 Robert Dewar <dewar@adacore.com>
4373 * exp_util.adb, exp_ch9.adb, sem_attr.adb, sem_ch6.adb: Minor
4376 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
4378 * exp_ch9.adb (Install_Private_Data_Declarations): Add guards
4379 which ensure that restriction No_Dynamic_Attachment has not been
4381 (Make_Initialize_Protection): Protected types with attach or
4382 interrupt handlers must not violate restriction No_Dynamic_Attachment.
4383 * exp_util.adb (Corresponding_Runtime_Package): Add a guard
4384 which ensures that restriction No_Dynamic_Attachment has not been
4386 * sem_attr.adb: (Eval_Attribute): Transform
4387 VAX_Float_Type'First and 'Last into references to
4388 the temporaries which store the corresponding bounds. The
4389 transformation is needed since the back end cannot evaluate
4390 'First and 'Last on VAX.
4391 (Is_VAX_Float): New routine.
4393 2011-09-02 Ed Schonberg <schonberg@adacore.com>
4395 * sem_ch12.adb (Analyze_Subprogram_Instantiation): If the
4396 generic unit is not intrinsic and has an explicit convention,
4397 the instance inherits it.
4399 2011-09-02 Robert Dewar <dewar@adacore.com>
4401 * prj-dect.adb, prj-env.adb, prj-nmsc.adb, prj-proc.adb, prj-tree.adb,
4402 prj.adb, prj.ads, sem_ch5.adb: Minor reformatting.
4404 2011-09-02 Thomas Quinot <quinot@adacore.com>
4406 * sem_attr.adb (Analyze_Attribute, case Unrestriced_Access):
4407 Guard against a prefix that is an N_Has_Entity but has no
4410 2011-09-02 Yannick Moy <moy@adacore.com>
4412 * lib-xref-alfa.adb (Is_Alfa_Reference): Ignore IN parameters in Alfa
4415 2011-09-02 Yannick Moy <moy@adacore.com>
4417 * opt.ads (Warn_On_Suspicious_Contract): New warning flag.
4418 * sem_ch3.adb (Analyze_Declarations): Call checker for suspicious
4420 * sem_ch6.adb, sem_ch6.ads (Check_Subprogram_Contract): New
4421 procedure looking for suspicious postconditions.
4422 * usage.adb (Usage): New options -gnatw.t and -gnatw.T.
4423 * warnsw.adb (Set_Dot_Warning_Switch): Take into account new
4424 options -gnatw.t and -gnatw.T.
4426 2011-09-02 Pascal Obry <obry@adacore.com>
4428 * prj.adb: Minor code refactoring. Move check for null project in
4430 * projects.texi: Fix minor typos.
4432 2011-09-02 Ed Schonberg <schonberg@adacore.com>
4434 * sem_ch5.adb (Analyze_Iterator_Specification): If the domain
4435 of iteration is an expression, its value must be captured in a
4436 renaming declaration, so that modification of the elements is
4437 propagated to the original container.
4439 2011-09-02 Pascal Obry <obry@adacore.com>
4441 * prj-proc.adb, prj.adb, makeutl.adb, makeutl.ads, prj-dect.adb,
4442 prj-nmsc.adb, prj-util.adb, prj-conf.adb, prj-env.adb,
4443 prj-tree.adb: Minor reformatting and style fixes.
4445 2011-09-02 Robert Dewar <dewar@adacore.com>
4447 * s-rident.ads: Add new restriction No_Implicit_Aliasing
4448 * sem_attr.adb: (Analyze_Access_Attribute): Deal with
4449 No_Implicit_Aliasing
4450 (Analyze_Attribute, case Address): ditto
4451 (Analyze_Attribute, case Unrestricted_Access): ditto
4452 * sem_util.ads, sem_util.adb: (Is_Aliased_View): Handle
4453 No_Implicit_Aliasing restriction.
4454 * gnat_rm.texi: Add documentation for No_Implicit_Aliasing
4456 2011-09-02 Ed Schonberg <schonberg@adacore.com>
4458 * exp_util.adb: (Possible_Bit_Aligned_Object): If the object
4459 is an unchecked conversion, apply test to its expression.
4461 2011-09-02 Javier Miranda <miranda@adacore.com>
4463 * sem_ch3.adb (Check_Abstract_Overriding): When
4464 traversing the chain of aliased subprograms avoid reporting a
4465 redundant error on the current entity.
4467 2011-09-02 Sergey Rybin <rybin@adacore.com>
4469 * gnat_ugn.texi: Minor clean up.
4471 2011-09-02 Bob Duff <duff@adacore.com>
4473 * s-htable.adb (Set_If_Not_Present): Use renaming
4474 instead of ":=", because the type Key is limited in the generic (even
4475 if not in the instances).
4477 2011-09-02 Robert Dewar <dewar@adacore.com>
4479 * exp_util.adb, sem_ch10.adb, sem_attr.adb, s-htable.adb,
4480 g-comlin.adb, g-comlin.ads, lib-xref-alfa.adb, lib-xref.adb: Minor
4483 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
4485 * sem_ch3.adb: (Set_Anonymous_Type): Associate the itype of an
4486 inherited component with the enclosing derived type. Code reformatting.
4488 2011-09-02 Gary Dismukes <dismukes@adacore.com>
4490 * checks.adb: (Determine_Range): Add test of OK1 to prevent the early
4491 return done when overflow checks are enabled, since comparisons against
4492 Lor and Hir should not be done when OK1 is False.
4494 2011-09-02 Gary Dismukes <dismukes@adacore.com>
4496 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
4497 Add new formal Master_Exp. When present, add that expression to the
4498 call as an extra actual.
4499 (Make_Build_In_Place_Call_In_Object_Declaration): Add variable
4500 Fmaster_Actual and in the case of a BIP call initializing a return
4501 object of an enclosing BIP function set it to a
4502 new reference to the implicit finalization master
4503 formal of the enclosing function. Fmaster_Actual is
4504 then passed to the new formal Master_Exp on the call to
4505 Add_Finalization_Master_Actual_To_Build_ In_Place_Call. Move
4506 initializations of Enclosing_Func to its declaration.
4508 2011-09-02 Thomas Quinot <quinot@adacore.com>
4510 * csets.ads: Minor reformatting
4512 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
4514 * exp_aggr.adb: (Get_Constraint_Association): Add code to retrieve
4515 the full view of a private type coming from an instantiation.
4516 * exp_ch4.adb: (Current_Anonymous_Master): Reimplement the search
4517 loop to iterate over the declarations rather than use the
4518 First_Entity / Next_Entity scheme.
4520 2011-09-02 Ed Schonberg <schonberg@adacore.com>
4522 * sem_attr.adb: (Analyze_Attribute, case 'Range): when expanding
4523 X'range (N) into X'First (N) .. X'Last (N), do not share the
4524 dimension indicator N, if present. Even though it is a static
4525 constant, its source location may be modified when printing
4526 expanded code under -gnatDL, and node sharing will lead to chaos
4527 in Sprint on large files, by generating a sloc value that does
4528 not correspond to any source file.
4530 2011-09-02 Bob Duff <duff@adacore.com>
4532 * einfo.adb: (Has_Xref_Entry): Do not call
4533 Implementation_Base_Type. Lib.Xref has been
4534 rewritten to avoid the need for it, and it was costly.
4535 * s-htable.ads,s-htable.adb: (Present,Set_If_Not_Present): New
4536 functions in support of efficient xref.
4537 * lib-xref-alfa.adb: Misc changes related to Key component of
4539 * lib-xref.adb: (Add_Entry,etc): Speed improvement.
4540 (New_Entry): Call Implementation_Base_Type, because Has_Xref_Entry
4541 no longer does. This is the one place where it is needed.
4543 2011-09-02 Johannes Kanig <kanig@adacore.com>
4545 * g-comlin.adb (Getopt): New optional argument Concatenate to have
4546 similar interface as the other Getopt function.
4548 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
4550 * exp_ch4.adb: (Expand_Allocator_Expression): Do not generate
4551 a call to Set_Finalize_Address if there is no allocator available.
4552 * exp_util.adb: (Build_Allocate_Deallocate_Proc): Account for
4553 a case of allocator expansion where the allocator is not expanded but
4554 needs a custom allocate routine. Code reformatting.
4555 (Is_Finalizable_Transient): Remove local variables Has_Rens and
4556 Ren_Obj. Code reformatting.
4557 (Is_Renamed): Renamed to Is_Aliased. Add code to detect aliasing
4558 through the use of 'reference.
4559 * sem_ch4.adb: (Analyze_Allocator): Detect allocators generated
4560 as part of build-in-place expansion. They are intentionally marked as
4561 coming from source, but their parents are not.
4563 2011-09-02 Ed Schonberg <schonberg@adacore.com>
4565 * sem_ch10.adb (Analyze_With_Clause): If the library unit
4566 is the generated subprogram declaration for a child unit body
4567 that acts as spec, use the original body in the with_clause,
4568 to prevent binding errors.
4570 2011-09-02 Vincent Celier <celier@adacore.com>
4572 * gnat_ugn.texi: Adapt documentation of -gnateInnn to new VMS
4573 qualifier /MULTI_UNIT_INDEX=
4575 2011-09-02 Johannes Kanig <kanig@adacore.com>
4577 * g-comlin.adb (Getopt): Return when switch is dealt with automatically,
4578 instead of calling the callback function
4580 2011-09-02 Robert Dewar <dewar@adacore.com>
4582 * prj-proc.adb, prj.ads, sem_util.adb, s-taprop-linux.adb,
4583 prj-nmsc.adb, prj-util.ads, prj-env.adb: Minor reformatting.
4585 2011-09-02 Vincent Celier <celier@adacore.com>
4587 * prj-nmsc.adb: (Find_Sources): When the list of sources is
4588 explicitly declared in an extending project, do not warn if a source
4589 for an inherited naming exception is not found.
4591 2011-09-02 Gary Dismukes <dismukes@adacore.com>
4593 * exp_ch6.adb: (Is_Build_In_Place_Function_Call): Return False if
4594 expansion is inactive.
4596 2011-09-02 Ed Schonberg <schonberg@adacore.com>
4598 * sem_util.adb (Note_Possible_Modification): If the entity
4599 being modified is the renaming generated for an Ada2012 iterator
4600 element, the enclosing container or array is modified as well.
4602 2011-09-02 Jose Ruiz <ruiz@adacore.com>
4604 * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB,
4605 Initialize): Define and initialize the
4606 mutex attributes and condition variable attributes locally.
4608 2011-09-02 Vincent Celier <celier@adacore.com>
4610 * prj-nmsc.adb (Check_File): Mark as Locally_Removed a naming
4611 exception replaced in an extending project.
4612 (Check_Object): No error when the other source is locally removed.
4614 2011-09-02 Yannick Moy <moy@adacore.com>
4616 * exp_ch6.adb (Is_Build_In_Place_Function_Call): in Alfa mode, allow
4619 2011-08-31 Arnaud Charlet <charlet@adacore.com>
4621 * gcc-interface/Makefile.in: Clean up handling of x86 and x86-64
4623 * gcc-interface/Make-lang.in: Update dependencies.
4625 2011-09-01 Robert Dewar <dewar@adacore.com>
4627 * sem_ch3.adb, s-taprop-linux.adb, gnatls.adb: Minor reformatting.
4629 2011-09-01 Jose Ruiz <ruiz@adacore.com>
4631 * adaint.h (__gnat_cpu_free): Fix the name of this profile.
4632 * adaint.c (__gnat_cpu_alloc, __gnat_cpu_alloc_size, __gnat_cpu_free,
4633 __gnat_cpu_zero, __gnat_cpu_set): Create version of these subprograms
4634 specific for systems where their glibc version does not define the
4635 routines to handle dynamically allocated CPU sets.
4637 2011-09-01 Vincent Celier <celier@adacore.com>
4639 * prj-proc.adb, prj.ads, prj-nmsc.adb, prj-util.adb, prj-util.ads,
4640 prj-env.adb: Implement inheritance of naming exceptions in extending
4643 2011-09-01 Romain Berrendonner <berrendo@adacore.com>
4645 * gnatls.adb: Display simple message instead of content of
4648 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
4650 * sem_ch3.adb: (Build_Derived_Record_Type) Remove the kludgy update of
4651 access discriminant and anonymous access component scopes.
4652 (Inherit_Component): Reuse the itype of an access discriminant
4653 or anonymous access component by copying it in order to set the proper
4654 scope. This is done only when the parent and the derived type
4655 are in different scopes.
4656 (Set_Anonymous_Etype): New routine.
4658 2011-09-01 Robert Dewar <dewar@adacore.com>
4660 * a-convec.adb: Minor reformatting throughout.
4662 2011-09-01 Jose Ruiz <ruiz@adacore.com>
4664 * adaint.c, adaint.h (__gnat_cpu_alloc, __gnat_cpu_alloc_size,
4665 __gnat_cpu_set_free): Create these wrappers around the CPU_ALLOC,
4666 CPU_ALLOC_SIZE and CPU_FREE linux macros.
4667 (__gnat_cpu_zero, __gnat_cpu_set): Use the CPU_ZERO_S and
4668 CPU_SET_S respectively because we are now using dynamically allocated
4669 CPU sets which are more portable across different glibc versions.
4670 * s-osinte-linux.ads (cpu_set_t_ptr, CPU_ALLOC, CPU_ALLOC_SIZE,
4671 CPU_FREE): Add this type and subprograms to be able to create cpu_set_t
4672 masks dynamically according to the number of processors in the target
4674 (CPU_ZERO, CPU_SET): They are now mapped to the CPU_ZERO_S and CPU_SET_S
4675 respectively, so we need to pass the size of the masks as
4677 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use dynamically
4678 created cpu_set_t masks
4679 with the number of processors available in the target platform,
4680 instead of static bit arrays. It enhances portability because
4681 it uses the information from the target platform.
4682 * sem_ch8.adb: (Attribute_Renaming): When checking whether we
4683 are using a restricted run-time library, use the flag
4684 Configurable_Run_Time_Mode instead of Restricted_Profile.
4686 2011-09-01 Vincent Celier <celier@adacore.com>
4688 * ug_words: Add /MULTI_UNIT_INDEX= -> -gnateI
4689 * vms_data.ads: Add new VMS qualifier equivalent for -gnateInnn
4691 2011-09-01 Nicolas Roche <roche@adacore.com>
4693 * adaint.c (__gnat_tmp_name): Don't use tmpnam function from the system
4694 on VxWorks in kernel mode.
4696 2011-09-01 Jose Ruiz <ruiz@adacore.com>
4698 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use the linux
4699 macros for handling CPU sets (CPU_ZERO, CPU_SET) instead of modifying
4700 directly the bit array.
4701 * s-osinte-linux.ads (CPU_ZERO, CPU_SET): Import these wrappers around
4702 the linux macros with the same name.
4703 * adaint.h, adaint.c (__gnat_cpu_zero, __gnat_cpu_set): Create these
4704 wrappers around the CPU_ZERO and CPU_SET linux macros.
4706 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
4708 * exp_ch7.adb (Find_Insertion_List): Removed.
4709 (Process_Transient_Objects): Insert the declarations of the hook
4710 access type and the hook object before the associated transient object.
4712 2011-09-01 Jose Ruiz <ruiz@adacore.com>
4714 * sem_ch8.adb (Attribute_Renaming): Add missing check to avoid loading
4715 package System.Aux_Dec when using restricted run-time libraries which
4716 do not have this package.
4718 2011-09-01 Tristan Gingold <gingold@adacore.com>
4720 * s-vaflop-vms-alpha.adb: Remove pragma optimize, useless.
4722 2011-09-01 Bob Duff <duff@adacore.com>
4724 * sem_attr.adb (Analyze_Access_Attribute): Do not call
4725 Kill_Current_Values for P'Unrestricted_Access, where P is library level
4727 2011-09-01 Thomas Quinot <quinot@adacore.com>
4729 * exp_ch5.adb: Minor reformatting
4730 * gnat_ugn.texi: Fix minor typos.
4731 * gcc-interface/Make-lang.in: Update dependencies.
4733 2011-09-01 Robert Dewar <dewar@adacore.com>
4735 * inline.adb, sem_aggr.adb: Minor reformatting.
4737 2011-09-01 Ed Schonberg <schonberg@adacore.com>
4739 * a-convec.adb: Proper handling of cursors for Ada2012 iterators.
4741 2011-09-01 Robert Dewar <dewar@adacore.com>
4743 * prj-proc.adb, exp_ch6.adb, prj-env.adb: Minor reformatting.
4745 2011-09-01 Bob Duff <duff@adacore.com>
4747 * sem_aggr.adb (Resolve_Aggregate): Need to treat "in instance
4748 body" the same as "in inlined body", because visibility shouldn't
4751 2011-09-01 Eric Botcazou <ebotcazou@adacore.com>
4753 * inline.adb (Add_Inlined_Body): Refine previous change.
4755 2011-09-01 Gary Dismukes <dismukes@adacore.com>
4757 * exp_ch6.ads (Needs_BIP_Alloc_Form): New utility function.
4758 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
4759 Test for case where call
4760 initializes an object of a return statement before testing for
4761 a constrained call, to ensure that all such cases get handled
4762 by simply passing on the caller's parameters. Also, in that
4763 case call Needs_BIP_Alloc_Form to determine whether to pass on
4764 the BIP_Alloc_Form parameter of the enclosing function rather
4765 than testing Is_Constrained. Add similar tests for the return
4766 of a BIP call to later processing to ensure consistent handling.
4767 (Needs_BIP_Alloc_Form): New utility function.
4768 * sem_ch6.adb: (Create_Extra_Formals): Replace test for adding
4769 a BIP_Alloc_Form formal with call to new utility function
4770 Needs_BIP_Alloc_Form.
4772 2011-09-01 Pascal Obry <obry@adacore.com>
4774 * prj-part.adb: Minor reformatting.
4776 2011-09-01 Vincent Celier <celier@adacore.com>
4778 * prj-env.adb (Create_Mapping_File.Process): Encode the upper
4779 half character in the unit name.
4781 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
4783 * exp_ch4.adb: Minor code and comment reformatting.
4785 2011-09-01 Thomas Quinot <quinot@adacore.com>
4787 * exp_ch6.adb (Expand_Inlined_Call): Remove redundant tests
4788 for Is_Limited_Type and Is_Tagged_Type in condition checking
4789 for by-reference type.
4790 * inline.adb (Add_Inlined_Body): Only exclude init_procs. Other
4791 subprograms may have a completion because of a previous
4792 Inline_Always clause, but the enclosing package must be marked
4793 inlined for the subprogram body to become visible to the backend.
4795 2011-09-01 Thomas Quinot <quinot@adacore.com>
4797 * sem_aux.adb, exp_ch4.adb: Minor reformatting
4799 2011-09-01 Pascal Obry <obry@adacore.com>
4801 * prj-proc.adb, prj.ads, sinput-p.adb: Minor reformatting.
4803 2011-09-01 Ed Schonberg <schonberg@adacore.com>
4805 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Generate references to
4806 the formals of a subprogram stub that acts as a spec.
4808 2011-09-01 Ed Schonberg <schonberg@adacore.com>
4810 * exp_ch6.adb (Expand_Inlined_Call): If an actual is a by_reference
4811 type, declare a renaming for it, not an object declaration.
4813 2011-09-01 Yannick Moy <moy@adacore.com>
4815 * ali-util.adb, ali-util.ads (Read_Withed_ALIs): Add parameter
4816 Ignore_Errors to ignore failures to read ALI files when True.
4818 2011-09-01 Javier Miranda <miranda@adacore.com>
4820 * exp_ch3.adb (Expand_N_Object_Declaration): Handle non-default
4821 constructor calls associated with non-tagged record types.
4823 2011-09-01 Robert Dewar <dewar@adacore.com>
4825 * g-socthi-vms.adb: Minor reformatting.
4827 2011-09-01 Nicolas Roche <roche@adacore.com>
4829 * sysdep.c: Don't use macro functions for stdio functions on VxWorks
4830 in order to avoid impact of imcompatible changes.
4831 * cstreams.c: Likewise
4833 * aux-io.c: Likewise
4835 2011-09-01 Yannick Moy <moy@adacore.com>
4837 * lib-writ.adb (Write_With_Lines): Always output complete information
4838 on "with" line in Alfa mode, as this is required by formal verification
4841 2011-09-01 Tristan Gingold <gingold@adacore.com>
4843 * g-socthi-vms.adb: Add comments.
4845 2011-09-01 Pascal Obry <obry@adacore.com>
4847 * prj.ads: Minor reformatting.
4849 2011-09-01 Vincent Celier <celier@adacore.com>
4851 * prj-env.adb (Create_Config_Pragmas_File.Check): Put all naming
4852 exceptions in the config pragmas file.
4854 2011-09-01 Tristan Gingold <gingold@adacore.com>
4856 * gnat_ugn.texi: Document GNAT_STACK_SIZE on IVMS.
4858 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
4860 * exp_ch7.adb (Find_Insertion_List): New routine.
4861 (Process_Transient_Objects): Add code to handle the abnormal
4862 finalization of a controlled transient associated with a subprogram
4863 call. Since transients are cleaned up right after the associated
4864 context, an exception raised during a subprogram call may bypass the
4867 2011-09-01 Robert Dewar <dewar@adacore.com>
4869 * exp_ch6.adb (Expand_Call): Check actual for aliased parameter is
4872 2011-09-01 Robert Dewar <dewar@adacore.com>
4874 * exp_ch4.adb, a-exexda.adb: Minor reformatting.
4876 2011-09-01 Robert Dewar <dewar@adacore.com>
4878 * s-taskin.ads, s-tassta.adb, sem_ch13.adb: Minor reformatting.
4880 2011-09-01 Thomas Quinot <quinot@adacore.com>
4882 * Makefile.rtl: Move s-oscons.o from GNATRTL_TASKING_OBJS to
4883 GNATRTL_NONTASKING_OBJS.
4885 2011-09-01 Robert Dewar <dewar@adacore.com>
4887 * einfo.ads (Is_Aliased): Fix existing documentation and add note on
4888 possibility of this flag being set for formals in Ada 2012 mode.
4889 * par-ch6.adb (P_Formal_Part): Handle aliased for parameters for Ada
4891 * sem_ch6.adb (Process_Formals): Handle aliased parameters in Ada 2012
4893 * sinfo.adb (Aliased_Present): Allowed in N_Parameter_Specification for
4895 * sinfo.ads (Aliased_Present): Allowed in N_Parameter_Specification for
4898 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
4900 * exp_ch4.adb (Find_Insertion_Node): New routine. Determines the proper
4901 insertion node in a tree of nested Expression_With_Actions nodes.
4902 (Process_Transient_Object): In the case where a complex if statement
4903 has been converted into nested Expression_With_Actions nodes, the
4904 "hook" object and the associated access type must be inserted before
4905 the top most Expression_With_Actions.
4907 2011-09-01 Robert Dewar <dewar@adacore.com>
4909 * a-cbprqu.adb, a-cbprqu.ads, a-cuprqu.adb, a-cuprqu.ads,
4910 a-cbsyqu.adb, a-cbsyqu.ads: Minor reformatting.
4912 2011-09-01 Ed Schonberg <schonberg@adacore.com>
4914 * sem_attr.adb: Conditionalize aliasing predicates to Ada2012.
4916 2011-09-01 Jose Ruiz <ruiz@adacore.com>
4918 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the CPU
4920 * aspects.adb (Canonical_Aspect): Add entry for the CPU aspect.
4921 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the CPU aspect
4922 in a similar way as we do for the Priority or Dispatching_Domain aspect.
4923 * s-mudido-affinity.adb (Dispatching_Domain_Tasks,
4924 Dispatching_Domains_Frozen): Move this local data to package
4925 System.Tasking because with the CPU aspect we need to have access
4926 to this data when creating the task in System.Tasking.Stages.Create_Task
4927 * s-taskin.ads (Dispatching_Domain_Tasks, Dispatching_Domains_Frozen):
4928 Move these variables from the body of
4929 System.Multiprocessors.Dispatching_Domains because with the CPU aspect
4930 we need to have access to this data when creating the task in
4931 System.Tasking.Stages.Create_Task.
4932 * s-taskin.adb (Initialize): Signal the allocation of the environment
4933 task to a CPU, if any, so that we know whether the CPU can be
4934 transferred to a different dispatching domain.
4935 * s-tassta.adb (Create_Task): Check whether the CPU to which this task
4936 is being allocated belongs to the dispatching domain where the task
4937 lives. Signal the allocation of the task to a CPU, if any, so that we
4938 know whether the CPU can be transferred to a different dispatching
4941 2011-09-01 Ed Schonberg <schonberg@adacore.com>
4943 * exp_attr.adb, sem_attr.adb, snames.ads-tmpl: Implementation of
4944 attributes Same_Storage and Overlaps_Storage.
4946 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
4948 * exp_strm.adb: Remove with and use clause for Opt.
4949 (Build_Array_Input_Function): Remove the version-dependent generation
4950 of the return statement. The Ada 2005 tree is now the default.
4952 2011-09-01 Yannick Moy <moy@adacore.com>
4954 * put_alfa.adb: Unconditionnally write files in Alfa section, so that
4955 it is never empty when compiling in Alfa mode.
4957 2011-09-01 Robert Dewar <dewar@adacore.com>
4959 * sem_aggr.adb, sem_ch3.adb, a-direct.adb, s-taprop-vxworks.adb,
4960 comperr.adb, exp_ch9.adb, exp_pakd.adb, sem_ch12.adb, freeze.adb,
4961 s-taprop-mingw.adb, s-taprop-linux.adb, s-taprop-solaris.adb,
4962 gnat1drv.adb, a-rbtgbo.adb, exp_dist.adb: Minor reformatting
4964 2011-09-01 Matthew Heaney <heaney@adacore.com>
4966 * Makefile.rtl, impunit.adb: Add a-csquin.ads, a-cusyqu.ad[sb],
4967 a-cuprqu.ad[sb], a-cbsyqu.ad[sb], a-cbprqu.ad[sb]
4968 * a-csquin.ads: New Ada 2012 unit that specifies the queue interface
4969 * a-cusyqu.ads, a-cusyqu.adb: New Ada 2012 unit that specifies the
4970 unbounded queue container.
4971 * a-cbsyqu.ads, a-cbsyqu.adb: New Ada 2012 unit that specifies the
4972 bounded queue container.
4973 * a-cuprqu.ads, a-cuprqu.adb: New Ada 2012 unit that specifies the
4974 unbounded priority queue container.
4975 * a-cbprqu.ads, a-cbprqu.adb: New Ada 2012 unit that specifies the
4976 bounded priority queue container.
4978 2011-08-31 Pascal Obry <obry@adacore.com>
4980 * a-direct.adb: Do not try to create an UNC path on Windows.
4981 (Create_Path): Skip leading computer name in UNC path if any.
4983 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
4985 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): Remove the
4986 version-dependent generation of the return statement. The Ada 2005 tree
4989 2011-08-31 Thomas Quinot <quinot@adacore.com>
4991 * rtsfind.ads, exp_dist.adb (Find_Numeric_Representation): Predefined
4992 types Stream_Element_Offset and Storage_Offset have a different native
4993 type depending on whether the platform is 32 or 64 bits. When
4994 exchanging them, always convert to 64 bits.
4996 2011-08-31 Yannick Moy <moy@adacore.com>
4998 * debug.adb: Reserve debug option -gnatd.E for passing gnatprove option
4999 --force-alfa to gnat2why.
5001 2011-08-31 Ed Schonberg <schonberg@adacore.com>
5003 * sem_ch12.adb (Save_References): If the node has aspects, save
5004 references within the corresponding expressions in a separate step,
5005 because the aspects are not directly in the tree for the declaration
5006 to which they belong.
5008 2011-08-31 Arnaud Charlet <charlet@adacore.com>
5010 * freeze.adb (Freeze_Record_Type): Omit test on variable size component
5011 in CodePeer mode, since representation clauses are partially ignored.
5012 * gcc-interface/Make-lang.in: Update dependencies.
5014 2011-08-31 Jose Ruiz <ruiz@adacore.com>
5016 * s-taprop-vxworks.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
5017 s-taprop-solaris.adb (Create_Task): Not_A_Specific_CPU can be assigned
5018 to any dispatching domain.
5020 2011-08-31 Thomas Quinot <quinot@adacore.com>
5022 * exp_ch4.adb: Minor reformatting.
5024 2011-08-31 Bob Duff <duff@adacore.com>
5026 * sem_ch6.adb (Get_Generic_Parent_Type): Don't query Subtype_Indication
5027 on nodes for which it is not defined.
5028 (Is_Non_Overriding_Operation): Exit the loop when we find a generic
5031 2011-08-31 Bob Duff <duff@adacore.com>
5033 * sem_ch3.adb (Process_Full_View): Disable legality check if
5034 In_Instance, to avoid spurious errors.
5035 * sem_ch12.adb (Validate_Derived_Type_Instance): Disable legality check
5036 if In_Instance, to avoid spurious errors.
5038 2011-08-31 Pascal Obry <obry@adacore.com>
5040 * a-direct.adb: Use Dir_Seps everywhere to properly handle all
5041 directory speparators.
5042 (Compose): Use Dir_Seps to handle both forms.
5043 (Create_Path): Use Dir_Seps instead of explicit check, no semantic
5045 (Extension): Use Dir_Seps to handle both forms.
5047 2011-08-31 Pascal Obry <obry@adacore.com>
5049 * prj-conf.adb: Minor reformatting.
5051 2011-08-31 Jose Ruiz <ruiz@adacore.com>
5053 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the
5054 dispatching domain aspect.
5055 * aspects.adb (Canonical_Aspect): Add entry for the dispatching domain
5057 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the
5058 Dispatching_Domain aspect in a similar way as we do for the Priority
5060 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Add the
5061 Dispatching_Domain component if a Dispatching_Domain pragma or aspect
5063 (Make_Task_Create_Call): Add the Dispatching_Domain when creating a task
5064 * par-prag.adb (Prag): Add Pragma_Dispatching_Domain as a known pragma.
5065 * sem_prag.adb (Analyze_Pragma): Check the correctness of a pragma
5066 Dispatching_Domain and add it to the task definition.
5067 (Sig_Flags): Add Pragma_Dispatching_Domain.
5068 * rtsfind.ads, rtsfind.adb (RTU_Id, RE_Id, Get_Unit_Name): Add the
5069 support to find the types Dispatching_Domain and
5070 Dispatching_Domain_Access.
5071 * sinfo.ads, sinfo.adb (Has_Pragma_Dispatching_Domain,
5072 Set_Has_Pragma_Dispatching_Domain): Add these subprograms to set and
5073 query the availability of a pragma Dispatching_Domain.
5074 * snames.ads-tmpl (Name_uDispatching_Domain): Add this name required by
5075 the expander to pass the Dispatching_Domain when creating a task.
5076 (Name_Dispatching_Domain): Add this new name for a pragma.
5077 (Pragma_Id): Add the new Pragma_Dispatching_Domain.
5078 * s-tassta.ads, s-tassta.adb (Create_Task): Set the domain to which the
5079 task has been allocated at creation time.
5080 * s-tarest.adb (Create_Restricted_Task): The dispatching domain using
5081 Ravenscar is always null.
5082 * s-taskin.ads, s-taskin.adb (Initialize_ATCB): Set the domain to which
5083 the task has been allocated at creation time.
5084 * s-tporft.adb (Register_Foreign_Thread): A foreign task will not have
5085 a specific dispatching domain.
5086 * s-taprop-linux.adb, s-taprop-solaris.adb, s-taprop-vxworks.adb,
5087 s-taprop-mingw.adb (Create_Task): Check whether both Dispatching_Domain
5088 and CPU are specified for the task, and the CPU value is not contained
5089 within the range of processors for the domain.
5091 2011-08-31 Vincent Celier <celier@adacore.com>
5093 * make.adb (Original_Gcc) : New constant String_Access.
5094 (Gnatmake): For VM targets, do not use VM version of the compiler if
5095 --GCC= has been specified.
5097 2011-08-31 Thomas Quinot <quinot@adacore.com>
5099 * sem_ch5.adb: Minor reformatting.
5101 2011-08-31 Ed Schonberg <schonberg@adacore.com>
5103 * exp_pakd.adb (Convert_To_PAT_Type): If prefix is a function call, do
5106 2011-08-31 Bob Duff <duff@adacore.com>
5108 * exp_ch4.adb (Expand_N_Selected_Component): Use the full type, in case
5109 the access type is private; we don't care about privacy in expansion.
5111 2011-08-31 Ed Schonberg <schonberg@adacore.com>
5113 * sem_aggr.adb (Resolve_Aggregate): In an instance, ignore aggregate
5114 subcomponents tnat may be limited, because they originate in view
5115 conflicts. If the original aggregate is legal and the actuals are
5116 legal, the aggregate itself is legal.
5118 2011-08-31 Matthew Heaney <heaney@adacore.com>
5120 * a-rbtgbo.adb (Clear_Tree): Assert representation invariant for lock
5123 2011-08-31 Ed Schonberg <schonberg@adacore.com>
5125 * sem_ch5.adb: Set kind of loop parameter properly, to preserve all
5128 2011-08-31 Jose Ruiz <ruiz@adacore.com>
5130 * sem_ch13.adb (Analyze_Aspect_Specifications): For the Priority and
5131 Interrupt_Priority aspects, force the analysis of the aspect expression
5132 (when building the equivalent pragma). Otherwise, its analysis is done
5133 too late, after the task or protected object has been created.
5134 * sem_ch9.adb (Analyze_Single_Protected_Declaration,
5135 Analyze_Single_Task_Declaration): Remove the code to move the aspects
5136 to the object declaration because they are needed in the type
5139 2011-08-31 Robert Dewar <dewar@adacore.com>
5141 * exp_ch5.adb, exp_ch7.ads, sem_ch5.adb, put_scos.adb, s-rannum.adb,
5142 a-rbtgbo.adb, exp_intr.adb, a-cbdlli.adb, a-cbdlli.ads: Minor
5145 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
5147 * exp_util.adb (Find_Protection_Type): Do not look for fields _object
5148 if the corresponding type is malformed due to restriction violations.
5150 2011-08-31 Robert Dewar <dewar@adacore.com>
5152 * s-ransee.ads, s-ransee.adb: Minor reformatting.
5154 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
5156 * exp_ch4.adb (Expand_N_Allocator): Correct faulty condition which
5157 would cause the generation of Set_Finalize_Address if the target is a
5158 VM and the designated type is not derived from [Limited_]Controlled.
5160 2011-08-31 Arnaud Charlet <charlet@adacore.com>
5162 * comperr.adb, comperr.ads, gnat1drv.adb (Delete_SCIL_Files): New
5164 (Compiler_Abort, Gnat1drv): Call Delete_SCIL_Files in codepeer mode in
5165 case of a compilation error.
5167 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
5169 * init.c (__gnat_error_handler): Standardize the stack overflow or
5170 erroneous memory access message.
5171 * seh_init.c (__gnat_SEH_error_handler): Standardize the stack overflow
5172 or erroneous memory access message.
5174 2011-08-31 Robert Dewar <dewar@adacore.com>
5176 * sem_ch4.adb: Minor reformatting.
5177 * sem_ch6.adb: Minor code reorganization (use Ekind_In).
5179 2011-08-31 Thomas Quinot <quinot@adacore.com>
5181 * scos.ads: Minor documentation clarification.
5182 * put_scos.adb: Do not generate SCO unit header line for a unit that
5185 2011-08-31 Robert Dewar <dewar@adacore.com>
5187 * a-rbtgbo.adb, alfa_test.adb: Minor reformatting.
5189 2011-08-31 Tristan Gingold <gingold@adacore.com>
5191 * exp_ch7.ads, exp_ch7.adb (Finalization_Exception_Data): New type to
5192 hold variables between these following subprograms.
5193 (Build_Exception_Handler, Build_Object_Declarations,
5194 Build_Raise_Statement): Use the above type as parameter.
5195 Make the above adjustments.
5196 * exp_intr.adb (Expand_Unc_Deallocation): Adjust.
5198 2011-08-31 Pascal Obry <obry@adacore.com>
5200 * projects.texi: Minor reformatting.
5202 2011-08-31 Tristan Gingold <gingold@adacore.com>
5204 * s-ransee.ads, s-ransee.adb: Add system.random_seed unit.
5205 * s-rannum.adb (Reset): Use Get_Seed from s-ransee.
5207 2011-08-31 Ed Schonberg <schonberg@adacore.com>
5209 * exp_ch5.adb: Minor code cleanup.
5210 * sem_ch5.adb (Analyze_Iteration_Scheme): Set ekind of loop variable to
5211 prevent cascaded errors.
5212 (Analyze_Loop_Statement): In semantics-only mode, introduce loop
5213 variable of an iterator specification in current scope.
5214 * sem_ch6.adb (Analyze_Return_Statement, Find_what_It_Apples_To): Skip
5215 postconditions on the stack, as they contain no return statements.
5217 2011-08-31 Yannick Moy <moy@adacore.com>
5219 * exp_alfa.adb (Expand_Alfa_N_Package_Declaration,
5220 Expand_Alfa_N_Subprogram_Body): Remove useless procedures which simply
5221 call Qualify_Entity_Names.
5222 (Expand_Alfa): call Qualify_Entity_Names in more cases
5223 * lib-xref-alfa.adb: Take into account system package.
5224 * sem_prag.adb Take into account restrictions in Alfa mode, contrary to
5225 CodePeer mode in which we are interested in finding bugs even if
5226 compiler cannot compile source.
5227 * sem_util.adb, sem_util.ads (Unique_Entity): Take into account case of
5230 2011-08-31 Gary Dismukes <dismukes@adacore.com>
5232 * sem_ch3.adb (Constrain_Concurrent): Retrieve Base_Type of the subtype
5233 denoted by the subtype mark to ensure getting the concurrent type in
5234 the case where the subtype mark denotes a private subtype of a
5235 concurrent type (needed when using -gnatc).
5236 (Process_Subtype): For the processing specific to type kinds, case on
5237 the Base_Type kind of the Subtype_Mark_Id, to handle cases where the
5238 subtype denotes a private subtype whose base type is nonprivate (needed
5239 for subtypes of private fulfilled by task types when compiling with
5242 2011-08-31 Gary Dismukes <dismukes@adacore.com>
5244 * sem_disp.adb (Check_Dispatching_Operation): Bypass registration of
5245 late primitives that override interface operations when the full
5246 expander is not active, to avoid blowups in Register_Primitive when
5247 types don't have associated secondary dispatch tables.
5249 2011-08-31 Yannick Moy <moy@adacore.com>
5251 * alfa_test.adb: Code clean up.
5253 2011-08-31 Marc Sango <sango@adacore.com>
5255 * restrict.adb (Check_SPARK_Restriction): Change Comes_From_Source (N)
5256 by Comes_From_Source (Original_Node (N)) in order to treat also the
5257 nodes which have been rewritten.
5258 * sem_ch4.adb (Analyze_Explicit_Dereference, Analyze_Slice): Guard the
5259 explicit dereference and slice violation in spark mode on the nodes
5260 coming only from the source code.
5262 2011-08-31 Robert Dewar <dewar@adacore.com>
5264 * exp_ch5.adb, exp_alfa.ads, prj.ads, sem_attr.adb,
5265 lib-xref-alfa.adb: Minor reformatting.
5267 2011-08-31 Matthew Heaney <heaney@adacore.com>
5269 * a-crbltr.ads (Tree_Type): Default-initialize the Nodes component.
5271 2011-08-31 Javier Miranda <miranda@adacore.com>
5273 * sem_ch4.adb (Try_Object_Operation): Addition of one formal to search
5274 only for class-wide subprograms conflicting with entities of concurrent
5277 2011-08-31 Matthew Heaney <heaney@adacore.com>
5279 * a-rbtgbo.adb (Generic_Allocate): Initialize pointer components of
5282 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
5284 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): Provide a more
5285 general description of the routine.
5287 2011-08-31 Ed Schonberg <schonberg@adacore.com>
5289 * a-cbdlli.adb, a-cbdlli.ads: Add iterator machinery to bounded
5290 doubly-linked lists.
5292 2011-08-31 Gary Dismukes <dismukes@adacore.com>
5294 * exp_ch5.adb (Expand_N_Assignment_Statement): When a discriminant
5295 check is needed for a left-hand side that is a dereference, and the
5296 base type is private without discriminants (whereas the full type does
5297 have discriminants), an extra retrieval of the underlying type may be
5298 needed in the case where the subtype is a record subtype whose base
5299 type is private. Update comments.
5301 2011-08-31 Javier Miranda <miranda@adacore.com>
5303 * sem_ch4.adb (Try_Object_Operation): When a dispatching primitive is
5304 found check if there is a class-wide subprogram covering the primitive.
5306 2011-08-31 Yannick Moy <moy@adacore.com>
5308 * sem_res.adb: Further cases where full expansion test is needed,
5309 rather than expansion test.
5311 2011-08-31 Pascal Obry <obry@adacore.com>
5313 * prj-attr.adb: Fix Source_File_Switches attribute kind (must be a list)
5315 2011-08-31 Ed Schonberg <schonberg@adacore.com>
5317 * exp_ch5.adb: Handle iterators over derived container types.
5319 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
5321 * einfo.ads, einfo.adb: Add new flag Has_Anonymous_Master.
5322 (Has_Anonymous_Master): New routine.
5323 (Set_Has_Anonymous_Master): New routine.
5324 (Write_Entity_Flags): Add an entry for Has_Anonymous_Master.
5325 * exp_ch4.adb: Add with and use clause for Sem_Ch8.
5326 (Current_Anonymous_Master): New routine.
5327 (Current_Unit_First_Declaration): Removed.
5328 (Current_Unit_Scope): Removed.
5329 (Expand_N_Allocator): Anonymous access-to-controlled types now chain
5330 their objects on a per-unit heterogeneous finalization master.
5332 2011-08-31 Matthew Heaney <heaney@adacore.com>
5334 * a-cbhama.adb, a-cbhase.adb (Insert): Check for zero-length buckets
5337 2011-08-31 Jose Ruiz <ruiz@adacore.com>
5339 * s-taprop-linux.adb (Create_Task): Avoid changing the affinity mask
5342 2011-08-31 Gary Dismukes <dismukes@adacore.com>
5344 * sem_disp.adb (Propagate_Tag): Return without propagating in the case
5345 where the actual is an unexpanded call to 'Input.
5347 2011-08-31 Yannick Moy <moy@adacore.com>
5349 * sem_ch4.adb: Code clean up.
5351 2011-08-31 Yannick Moy <moy@adacore.com>
5353 * exp_alfa.adb, exp_alfa.ads: Minor correction of copyright notice.
5355 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
5357 * exp_ch7.adb (Build_Array_Deep_Procs): Do not generate Deep_Finalize
5358 and TSS primitive Finalize_Address if finalization is suppressed.
5359 (Build_Record_Deep_Procs): Do not generate Deep_Finalize and TSS
5360 primitive Finalize_Address if finalization is suppressed.
5362 2011-08-31 Jose Ruiz <ruiz@adacore.com>
5364 * s-mudido-affinity.adb, s-taprop-linux.adb, s-taprop-mingw.adb,
5365 s-taprop-solaris.adb, s-taprop-vxworks.adb (Set_Task_Affinity): Make
5366 sure that the underlying task has already been created before trying
5367 to change its affinity.
5368 (Set_CPU): Use the term processor instead of CPU, as we do in
5371 2011-08-31 Vincent Celier <celier@adacore.com>
5373 * prj-attr.adb: New Compiler attribute Source_File_Switches.
5374 * prj-nmsc.adb (Process_Compiler): Process attribute
5375 Source_File_Switches.
5376 * prj.ads (Language_Config): New name list component
5377 Name_Source_File_Switches.
5378 * snames.ads-tmpl (Name_Source_File_Switches): New standard name.
5380 2011-08-31 Ed Schonberg <schonberg@adacore.com>
5382 * sem_attr.adb (Analyze_Attribute, case 'Old): If prefix may be a
5383 discriminated component of an actual, expand at once to prevent
5384 ouf-of-order references with generated subtypes.
5386 2011-08-31 Yannick Moy <moy@adacore.com>
5388 * lib-xref-alfa.adb (Add_Alfa_Xrefs): Do not take into account read
5389 reference to operator in Alfa xrefs.
5391 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
5393 * sem_ch12.adb (Freeze_Subprogram_Body): Add code to handle the case
5394 where the parent instance was frozen before the current instance due to
5395 the presence of a source body. Update calls to Insert_After_Last_Decl.
5396 (Insert_After_Last_Decl): Renamed to Insert_Freeze_Node_For_Instance.
5397 Update the comment which illustrates the purpose of the routine.
5398 Package instances are now frozen by source bodies which appear after
5399 the instance. This ensures that entities coming from within the
5400 instance are available for use in the said bodies.
5401 (Install_Body): Add code to handle the case where the parent instance
5402 was frozen before the current instance due to the presence of a source
5403 body. Update calls to Insert_After_Last_Decl.
5405 2011-08-31 Jose Ruiz <ruiz@adacore.com>
5407 * s-taprop-linux.adb (Set_Task_Affinity): Avoid the use of anonymous
5409 * affinity.c (__gnat_set_affinity_mask): Declare index variable.
5411 2011-08-31 Yannick Moy <moy@adacore.com>
5413 * sem_ch8.adb (Analyze_Subprogram_Renaming): Refine expander test in
5415 * alfa.adb, alfa.ads, alfa_test.adb, ali.adb, debug.adb, errout.adb,
5416 errout.ads, erroutc.adb, expander.adb, exp_ch4.adb, exp_ch7.adb,
5417 freeze.adb, get_alfa.adb, get_alfa.ads, gnat1drv.adb, lib-writ.adb,
5418 lib-writ.ads, lib-xref.adb, lib-xref.ads, lib-xref-alfa.adb, opt.adb,
5419 opt.ads, put_alfa.adb, put_alfa.ads, restrict.adb, sem_ch12.adb,
5420 sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
5421 sem_prag.adb, sem_res.adb, sem_util.adb: Minor reformatting, renaming
5422 ALFA in Alfa (we dropped acronym).
5423 * einfo.adb (Primitive_Operations): Correctly return list of primitive
5424 operations in a case where it returned previously No_Elist.
5426 2011-08-31 Robert Dewar <dewar@adacore.com>
5428 * s-taprop-vxworks.adb, sem_ch5.adb, s-taprop-tru64.adb, exp_alfa.adb,
5429 s-taprop-vms.adb, bindgen.adb, s-mudido.adb, s-mudido.ads,
5430 sem_res.adb, expander.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
5431 s-taprop-solaris.adb, s-mudido-affinity.adb, vms_conv.adb,
5432 s-taprop-irix.adb, s-taprop.ads, s-taskin.adb, s-taskin.ads,
5433 s-taprop-hpux-dce.adb, a-chtgbo.adb, s-taprop-posix.adb: Minor
5436 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
5438 * sem_ch12 (Check_Private_View): Revert previous change.
5439 * sem_res.adb (Conversion_Check): Do not emit the error message if the
5440 conversion is in a generic instance.
5442 2011-08-31 Matthew Heaney <heaney@adacore.com>
5444 * a-cbhase.adb (Symmetric_Difference): Dereference correct node array.
5445 * a-chtgbo.adb (Free): Allow 0 as index value.
5447 2011-08-31 Matthew Heaney <heaney@adacore.com>
5449 * a-cborma.adb (Insert): Add comment to explain why no element
5452 2011-08-31 Gary Dismukes <dismukes@adacore.com>
5454 * sem_util.adb (Find_Body_Discriminal): Test whether the scope of the
5455 spec discriminant is already a concurrent type, in which case just use
5456 it, otherwise fetch the Corresponding_Concurrent_Type as before.
5458 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
5460 * system-irix-n64.ads, system-linux-armeb.ads, system-linux-armel.ads,
5461 system-linux-mips.ads, system-linux-mipsel.ads,
5462 system-linux-mips64el.ads, system-linux-ppc64.ads,
5463 system-linux-sparcv9.ads, system-rtems.ads: Remove GCC_ZCX_Support.
5465 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
5467 * gcc-interface/ada-tree.h (TYPE_EXTRA_SUBTYPE_P): Add internal check.
5468 * gcc-interface/utils2.c (build_binary_op): Tighten condition.
5469 (build_unary_op): Likewise.
5471 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
5473 * raise-gcc.c: Do not include coretypes.h and tm.h.
5474 (setup_to_install): Remove test for compiler macro.
5475 * targext.c: Document use for the library.
5476 * gcc-interface/Makefile.in: Fix comment on the use of IN_GCC.
5478 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
5480 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not convert
5481 the expression to the nominal type if the latter is a record type with
5482 a variant part and the type of the former is a record type without one.
5484 2011-08-30 Yannick Moy <moy@adacore.com>
5486 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
5487 expansion in Alfa mode.
5488 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public
5489 * exp_alfa.adb, exp_alfa.ads: New package defining light expansion for
5491 * gnat1drv.adb (Adjust_Global_Switches): Update Comment.
5492 * sem_res.adb: Ditto.
5493 * gcc-interface/Make-lang.in: Update dependencies.
5495 2011-08-30 Thomas Quinot <quinot@adacore.com>
5497 * g-socket.ads: Minor documentation adjustment.
5499 2011-08-30 Robert Dewar <dewar@adacore.com>
5501 * exp_ch9.adb, s-tassta.adb, s-secsta.adb: Minor reformatting.
5503 2011-08-30 Yannick Moy <moy@adacore.com>
5505 * exp_ch6_light.adb, exp_ch6_light.ads, exp_attr_light.adb,
5506 exp_attr_light.ads, exp_ch7_light.adb, exp_ch7_light.ads,
5507 exp_light.adb, exp_light.ads, exp_prag.adb, expander.adb,
5508 gnat1drv.adb, exp_ch11.adb, exp_ch6.adb, exp_ch6.ads, exp_aggr.adb:
5509 Revert change which introduced files for "light"
5510 expansion, to be replaced by a single file for Alfa expansion.
5512 2011-08-30 Robert Dewar <dewar@adacore.com>
5514 * opt.ads, s-soflin.adb, exp_ch9.adb, sem_res.adb: Update comment.
5515 Minor code reorg/reformatting.
5517 2011-08-30 Yannick Moy <moy@adacore.com>
5519 * opt.adb, opt.ads (Full_Expander_Active): New function defines a
5520 common shorthand for (Expander_Active and not ALFA_Mode) that can be
5521 used for testing full expansion, that is active expansion not in the
5522 reduced mode for Alfa
5523 * exp_ch4.adb, exp_ch9.adb, exp_disp.adb, sem_ch10.adb, sem_ch12.adb,
5524 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Use newly defined "flag" instead
5525 of the verbose (Expander_Active and not ALFA_Mode)
5527 2011-08-30 Tristan Gingold <gingold@adacore.com>
5529 * s-parame-vms-alpha.ads, s-parame-hpux.ads, s-tassta.adb,
5530 s-tarest.adb, s-parame-vms-ia64.ads, s-soflin.adb, s-secsta.adb,
5531 s-secsta.ads, s-parame.ads, s-parame-vxworks.ads, s-parame-ae653.ads:
5532 Renames Ratio to Percentage, and Sec_Stack_Ratio to Sec_Stack_Percentage
5534 2011-08-30 Gary Dismukes <dismukes@adacore.com>
5536 * sem_res.adb (Valid_Conversion): Revise test for implicit anonymous
5537 access conversions to check that the conversion is a rewritten node,
5538 rather than just having Comes_From_Source set to False, which wasn't
5541 2011-08-30 Robert Dewar <dewar@adacore.com>
5543 * exp_ch9.adb, sem_ch9.adb, sem_ch6.adb, exp_disp.adb,
5544 g-socket.ads: Minor reformatting.
5546 2011-08-30 Thomas Quinot <quinot@adacore.com>
5548 * sem_util.adb: Minor reformatting.
5550 2011-08-30 Tristan Gingold <gingold@adacore.com>
5552 * raise-gcc.c: Never catch exception if _UA_FORCE_UNWIND flag is set,
5553 to be compliant with the ABI.
5555 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
5557 * sem_ch12.adb (Check_Private_View): Exchange the private and full view
5558 of a designated type when the related access type is an actual in an
5559 instance. This ensures that the full view of designated type is
5560 available when inside the body of the instance.
5562 2011-08-30 Ed Schonberg <schonberg@adacore.com>
5564 * sem_util.adb (May_Be_Lvalue): To determine whether a reference may be
5565 in a position to be modified, a slice is treated like an indexed
5568 2011-08-30 Thomas Quinot <quinot@adacore.com>
5570 * s-oscons-tmplt.c, g-socket.ads: Adjust maximum allowed value for
5571 field tv_sec in struct timeval.
5573 2011-08-30 Yannick Moy <moy@adacore.com>
5575 * exp_ch9.adb, exp_disp.adb, sem_ch9.adb, sem_res.adb: Protect several
5576 blocks of code doing full expansion, previously only guarded by
5577 Expander_Active, by anding the test that ALFA_Mode is not set
5579 2011-08-30 Ed Schonberg <schonberg@adacore.com>
5581 * sem_ch6.adb (Analyze_Return_Type): If the return type is incomplete,
5582 add the function to the list of private dependents, for subsequent
5583 legality check on Taft amendment types.
5584 * sem_ch12.adb (Analyze_Formal_Incomplete_Type): Initialize
5585 Private_Dependents, as for other incomplete types.
5586 * sem_util.adb (Wrong_Type): Avoid cascaded errors when a
5587 Taft-amendment type is used as the return type of a function.
5589 2011-08-30 Javier Miranda <miranda@adacore.com>
5591 * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup: replace code
5592 which emits an error by a call to a new routine which report the error.
5593 * exp_ch9.adb (Build_Wrapper_Spec): Build the wrapper even if the
5594 entity does not cover an existing interface.
5595 * errout.ads, errout.adb (Error_Msg_PT): New routine. Used to factorize
5597 * sem_ch6.adb (Check_Conformance): Add specific error for wrappers of
5598 protected procedures or entries whose mode is not conformant.
5599 (Check_Synchronized_Overriding): Code cleanup: replace code which emits
5600 an error by a call to a new routine which report the error.
5602 2011-08-30 Robert Dewar <dewar@adacore.com>
5604 * gnat_rm.texi: Minor change.
5605 * exp_attr_light.adb: Minor reformatting.
5607 2011-08-30 Ed Schonberg <schonberg@adacore.com>
5609 * sem_ch3.adb: Patch inheritance of aspects in
5610 Complete_Private_Subtype, to avoid infinite loop.
5612 2011-08-30 Javier Miranda <miranda@adacore.com>
5614 * sem_ch3.adb (Add_Internal_Interface_Entities): If serious errors have
5615 been reported and a subprogram covering an interface primitive is not
5616 found then skip generating the internal entity. Done to avoid crashing
5618 (Check_Abstract_Overriding): Change text of error of wrong formal of
5619 protected subprogram or entry. Done for consistency to emit exactly the
5620 same error reported by Check_Synchronized_Overriding. In addition, the
5621 error is restricted to protected types (bug found working on AI05-0090)
5623 2011-08-30 Yannick Moy <moy@adacore.com>
5625 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
5626 expansion in Alfa mode.
5627 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public.
5628 * exp_light.adb, exp_light.ads: New package defining light expansion.
5629 * expander.adb (Expand): Call light expansion in Alfa mode
5630 * exp_ch6_light.adb, exp_ch6_light.ads: Light expansion of chapter 6
5632 * exp_ch7_light.adb, exp_ch7_light.ads: Light expansion of chapter 7
5634 * exp_attr_light.adb, exp_attr_light.ads: Light expansion of attributes
5635 * gnat1drv.adb (Adjust_Global_Switches): Comment
5637 2011-08-30 Yannick Moy <moy@adacore.com>
5639 * lib-xref-alfa.adb: Minor refactoring.
5641 2011-08-30 Yannick Moy <moy@adacore.com>
5643 * exp_ch9.adb (Expand_Entry_Barrier): Do not perform expansion in Alfa
5645 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not perform
5646 expansion in Alfa mode.
5647 * sem_ch9.adb (Analyze_Entry_Body): Do not perform expansion in Alfa
5650 2011-08-30 Robert Dewar <dewar@adacore.com>
5652 * debug_a.adb: Update comment.
5654 2011-08-30 Robert Dewar <dewar@adacore.com>
5656 * exp_ch5.adb, sem_ch3.adb, sem_ch5.adb, einfo.adb, checks.adb,
5657 sem_util.adb, sem_util.ads, sem_res.adb, s-stposu.adb, sem_attr.adb,
5658 exp_ch4.adb, exp_ch6.adb, lib-xref-alfa.adb,
5659 sem_ch8.adb, sem_disp.adb, exp_ch3.adb: Minor reformatting
5661 2011-08-30 Robert Dewar <dewar@adacore.com>
5663 * gnat_rm.texi: Add section on C.6(16) implementation advice for pragma
5666 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
5668 * exp_ch3.adb (Expand_Freeze_Array_Type): Correct the call to
5669 Build_Finalization_Master by supplying an insertion node and enclosing
5670 scope. In its old version, the call did not generate a finalization
5672 (Expand_Freeze_Record_Type): Add local variable Has_AACC. Add code to
5673 recognize anonymous access-to-controlled components. Rewrite the
5674 machinery which creates finalization masters to service anonymous
5675 access-to-controlled components of a record type. In its current state,
5676 only one heterogeneous master is necessary to handle multiple anonymous
5678 (Freeze_Type): Comment reformatting.
5679 * rtsfind.ads: Add RE_Set_Is_Heterogeneous to tables RE_Id and
5681 * s-stposu.adb (Allocate_Any_Controlled): Rewrite the machinery which
5682 associates TSS primitive Finalize_Address with either the master itself
5683 or with the internal hash table depending on the mode of operation of
5686 2011-08-30 Javier Miranda <miranda@adacore.com>
5688 * exp_ch3.adb (Make_Eq_If): If the etype of the _parent component is an
5689 interface type then do not generate code to compare this component.
5690 Required since they have no components and their equality operator is
5693 2011-08-30 Steve Baird <baird@adacore.com>
5695 * sem_util.ads (Deepest_Type_Access_Level): New function; for the type
5696 of a saooaaat (i.e, a stand-alone object of an anonymous access type),
5697 returns the (static) accessibility level of the object. Otherwise, the
5698 same as Type_Access_Level.
5699 (Dynamic_Accessibility_Level): New function; given an expression which
5700 could occur as the rhs of an assignment to a saooaaat (i.e., an
5701 expression of an access-to-object type), return the new value for the
5702 saooaaat's associated Extra_Accessibility object.
5703 (Effective_Extra_Accessibility): New function; same as
5704 Einfo.Extra_Accessibility except that object renames are looked through.
5706 (Deepest_Type_Access_Level): New function; see sem_util.ads description.
5707 (Dynamic_Accessibility_Level): New function; see sem_util.ads
5709 (Effective_Extra_Accessibility): New function; see sem_util.ads
5711 * einfo.ads (Is_Local_Anonymous_Access): Update comments.
5712 (Extra_Accessibility): Update comments.
5713 (Init_Object_Size_Align): New procedure; same as Init_Size_Align
5714 except RM_Size field (which is only for types) is unaffected.
5716 (Extra_Accessibility): Expand domain to allow objects, not just formals.
5717 (Set_Extra_Accessibility): Expand domain to allow objects, not just
5719 (Init_Size): Add assertion that we are not trashing the
5720 Extra_Accessibility attribute of an object.
5721 (Init_Size_Align): Add assertion that we are not trashing the
5722 Extra_Accessibility attribute of an object.
5723 (Init_Object_Size_Align): New procedure; see einfo.ads description.
5724 * sem_ch3.adb (Find_Type_Of_Object): Set Is_Local_Anonymous_Access
5725 differently for the type of a (non-library-level) saooaaat depending
5726 whether Ada_Version < Ada_2012. This is the only point where Ada_Version
5727 is queried in this set of changes - everything else (in particular,
5728 setting of the Extra_Accessibility attribute in exp_ch3.adb) is
5729 driven off of the setting of the Is_Local_Anonymous_Access attribute.
5730 The special treatment of library-level saooaaats is an optimization,
5731 not required for correctnesss. This is based on the observation that the
5732 Ada2012 rules (static and dynamic) for saooaaats turn out to be
5733 equivalent to the Ada2005 rules in the case of a library-level saooaaat.
5735 (Expand_N_Object_Declaration): If Is_Local_Anonymous_Access is
5736 false for the type of a saooaaat, declare and initialize its
5737 accessibility level object and set the Extra_Accessibility attribute
5738 of the saooaaat to refer to this object.
5739 * checks.adb (Apply_Accessibility_Check): Add Ada 2012 saooaaat support.
5740 * exp_ch4.adb (Expand_N_In): Replace some Extra_Accessibility calls with
5741 calls to Effective_Extra_Accessibility in order to support
5742 renames of saooaaats.
5743 (Expand_N_Type_Conversion): Add new local function,
5744 Has_Extra_Accessibility, and call it when determining whether an
5745 accessibility check is needed.
5746 It returns True iff Present (Effective_Extra_Accessibility (Id)) would
5747 evaluate to True (without raising an exception).
5749 (Expand_N_Assignment_Statement): When assigning to an Ada2012
5750 saooaaat, update its associated Extra_Accessibility object (if
5751 it has one). This includes an accessibility check.
5752 * exp_ch6.adb (Add_Call_By_Copy_Code): When parameter copy-back updates
5753 a saooaaat, update its Extra_Accessibility object too (if it
5755 (Expand_Call): Replace a couple of calls to Type_Access_Level
5756 with calls to Dynamic_Access_Level to handle cases where
5757 passing a literal (any literal) is incorrect.
5758 * sem_attr.adb (Resolve_Attribute): Handle the static accessibility
5759 checks associated with "Saooaat := Some_Object'Access;"; this must
5760 be rejected if Some_Object is declared in a more nested scope
5762 * sem_ch5.adb (Analyze_Assignment): Force accessibility checking for an
5763 assignment to a saooaaat even if Is_Local_Anonymous_Access
5764 returns False for its type (indicating a 2012-style saooaaat).
5766 (Analyze_Object_Renaming): Replace a call to Init_Size_Align
5767 (which is only appropriate for objects, not types) with a call
5768 of Init_Object_Size_Align in order to avoid trashing the
5769 Extra_Accessibility attribute of a rename (the two attributes
5772 (Valid_Conversion) Replace six calls to Type_Access_Level with
5773 calls to Deepest_Type_Access_Level. This is a bit tricky. For an
5774 Ada2012 non-library-level saooaaat, the former returns library level
5775 while the latter returns the (static) accessibility level of the
5776 saooaaat. A type conversion to the anonymous type of a saooaaat
5777 can only occur as part of an assignment to the saooaaat, so we
5778 know that such a conversion must be in a lhs context, so Deepest
5779 yields the result that we need. If such a conversion could occur,
5780 say, as the operand of an equality operator, then this might not
5781 be right. Also add a test so that static accessibilty checks are
5782 performed for converting to a saooaaat's type even if
5783 Is_Local_Anonymous_Access yields False for the type.
5785 2011-08-30 Javier Miranda <miranda@adacore.com>
5787 * sem_disp.adb (Check_Dispatching_Operation): Complete condition that
5788 controls generation of a warning associated with late declaration of
5789 dispatching functions. Required to avoid generating spurious
5792 2011-08-30 Gary Dismukes <dismukes@adacore.com>
5794 * sem_ch6.adb (Check_Return_Subtype_Indication): Issue error if the
5795 return object has an anonymous access type and the function's type is
5796 a named access type.
5797 * sem_ch8.adb (Analyze_Object_Renaming): Suppress error about renaming
5798 conversions on implicit conversions, since such conversions can occur
5799 for anonymous access cases due to expansion. Issue error for attempt
5800 to rename an anonymous expression as an object of a named access type.
5801 * sem_res.ads (Valid_Conversion): Add defaulted parameter Report_Errs,
5802 to indicate whether this function should report errors on invalid
5804 * sem_res.adb (Resolve): For Ada 2012, in the case where the type of
5805 the expression is of an anonymous access type and the expected type is
5806 a named general access type, rewrite the expression as a type
5807 conversion, unless this is an expression of a membership test.
5808 (Valid_Conversion.Error_Msg_N): New procedure that conditions the
5809 calling of Error_Msg_N on new formal Report_Errs.
5810 (Valid_Conversion.Error_Msg_NE): New procedure that conditions the
5811 calling of Error_Msg_NE on new formal Report_Errs.
5812 (Valid_Conversion): Move declaration of this function to the package
5813 spec, to allow calls from membership test processing. For Ada 2012,
5814 enforce legality restrictions on implicit conversions of anonymous
5815 access values to general access types, disallowing such conversions in
5816 cases where the expression has a dynamic accessibility level (access
5817 parameters, stand-alone anonymous access objects, or a component of a
5818 dereference of one of the first two cases).
5819 * sem_type.adb (Covers): For Ada 2012, allow an anonymous access type
5820 in the context of a named general access expected type.
5821 * exp_ch4.adb Add with and use of Exp_Ch2.
5822 (Expand_N_In): Add processing for membership tests applied to
5823 expressions of an anonymous access type. First, Valid_Conversion is
5824 called to check whether the test is statically False, and then the
5825 conversion is expanded to test that the expression's accessibility
5826 level is no deeper than that of the tested type. In the case of
5827 anonymous access-to-tagged types, a tagged membership test is applied
5829 (Tagged_Membership): Extend to handle access type cases, applying the
5830 test to the designated types.
5831 * exp_ch6.adb (Expand_Call): When creating an extra actual for an
5832 accessibility level, and the actual is a 'Access applied to a current
5833 instance, pass the accessibility level of the type of the current
5834 instance rather than applying Object_Access_Level to the prefix. Add a
5835 ??? comment, since this level isn't quite right either (will eventually
5836 need to pass an implicit level parameter to init procs).
5838 2011-08-30 Bob Duff <duff@adacore.com>
5840 * s-taskin.ads: Minor comment fix.
5842 2011-08-30 Ed Schonberg <schonberg@adacore.com>
5844 * sem_res.adb (Check_Parameterless_Call): If the node is a selected
5845 component and the selector is a dispatching operation, check if it is
5846 a prefixed call before rewriting as a parameterless function call.
5848 2011-08-29 Jakub Jelinek <jakub@redhat.com>
5850 * gcc-interface/Makefile.in (../stamp-gnatlib1-$(RTSDIR)): Copy
5851 tsystem.h into $(RTSDIR) instead of rts.
5853 2011-08-29 Robert Dewar <dewar@adacore.com>
5855 * sem_ch10.adb, a-coorse.adb, exp_dist.adb, exp_ch3.adb: Minor
5857 * gcc-interface/Make-lang.in: Update dependencies.
5859 2011-08-29 Yannick Moy <moy@adacore.com>
5861 * alfa.ads (Name_Of_Heap_Variable): New constant name.
5862 * lib-xref-alfa.adb, lib-xref.adb, lib-xref.ads (Drefs): New global
5863 table to hold dereferences.
5864 (Add_ALFA_Xrefs): Take into account dereferences as special
5865 reads/writes to the variable "HEAP".
5866 (Enclosing_Subprogram_Or_Package): Move subprogram here.
5867 (Generate_Dereference): New procedure to store a read/write dereferencew
5869 * put_alfa.adb (Put_ALFA): Use different default than (0,0) used for
5870 the special "HEAP" var.
5871 * sem_ch4.adb (Analyze_Explicit_Dereference): Store read dereference
5873 * sem_util.adb (Note_Possible_Modification): Store write dereference
5876 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5878 * exp_ch3.adb (Freeze_Type): Generate an accessibility check which
5879 ensures that the level of the subpool access type is not deeper than
5880 that of the pool object.
5881 * sem_util.adb (Object_Access_Level): Expand to handle defining
5883 * sem_res.adb (Resolve_Allocator): Add a guard to avoid examining the
5884 subpool handle name of a rewritten allocator.
5886 2011-08-29 Robert Dewar <dewar@adacore.com>
5888 * impunit.adb, exp_ch4.adb, s-finmas.adb: Minor reformatting.
5890 2011-08-29 Thomas Quinot <quinot@adacore.com>
5892 * exp_dist.adb (TC_Rec_Add_Process_Element): For a choice with multiple
5893 values, we generate multiple triples of parameters in the TypeCode.
5894 Bump Choice_Index for each such triple so that a subsequent default
5895 choice is associated with the correct index in the typecode.
5897 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5899 * a-cdlili.adb (Iterate): Initialize properly an iterator over a null
5901 (First, Last): Handle properly an iterator over a null container.
5903 2011-08-29 Bob Duff <duff@adacore.com>
5905 * sem_ch10.adb (Analyze_With_Clause,Install_Withed_Unit): Abandon
5906 processing if we run across a node with no Scope. This can happen if
5907 we're with-ing an library-level instance, and that instance got errors
5908 that caused "instantiation abandoned".
5909 * sem_util.adb (Unit_Declaration_Node): Make it more robust, by raising
5910 an exception instead of using Assert, so it won't go into an infinite
5911 loop, even when assertions are turned off.
5913 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5915 * a-coorse.adb: Proper handling of empty ordered sets.
5917 2011-08-29 Johannes Kanig <kanig@adacore.com>
5919 * debug.adb: Add comments.
5921 2011-08-29 Thomas Quinot <quinot@adacore.com>
5923 * a-except.adb, a-except-2005.adb: Minor comment rewording and
5926 2011-08-29 Yannick Moy <moy@adacore.com>
5928 * sem_ch3.adb (Array_Type_Declaration): Remove insertion of
5929 declaration for Itypes in Alfa mode.
5931 2011-08-29 Robert Dewar <dewar@adacore.com>
5933 * a-cdlili.ads, a-coinve.ads, a-coorma.adb, a-coorma.ads, s-tassta.adb,
5934 a-cborma.adb, a-cborma.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
5935 a-cborse.ads, a-cobove.adb, a-cobove.ads, a-cbhase.ads: Minor
5938 2011-08-29 Tristan Gingold <gingold@adacore.com>
5940 * exp_ch7.adb, exp_ch7.ads (Build_Exception_Handler): Move its spec to
5942 * exp_intr.adb (Expand_Unc_Deallocation): Use Build_Exception_Handler.
5943 * a-except.adb, a-except-2005.adb (Rcheck_22): Do not defer aborts
5946 2011-08-29 Robert Dewar <dewar@adacore.com>
5948 * a-cbhama.adb, a-cbhama.ads: Minor reformatting.
5950 2011-08-29 Javier Miranda <miranda@adacore.com>
5952 * sem_ch8.adb (Analyze_Subprogram_Renaming): Complete support for
5953 renamings of formal subprograms when the actual for a formal type is
5956 2011-08-29 Matthew Heaney <heaney@adacore.com>
5958 * a-cbhama.ads, a-cbhase.ads (Move): Clear Source following assignment
5961 2011-08-29 Matthew Heaney <heaney@adacore.com>
5963 * a-cborma.ads, a-cborse.ads (Cursor): Default-initialize all
5964 components of record type.
5965 * a-cborma.adb, a-cborse.adb (Move): Clear Source following assignmentw
5968 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5970 * a-cbhama.adb, a-cbhama.ads, a-cborma.adb, a-cborma.ads, a-cobove.adb,
5971 a-cobove.ads, a-coorma.adb, a-coorma.ads: Add iterator machinery to
5974 2011-08-29 Robert Dewar <dewar@adacore.com>
5976 * sem_ch3.adb, sem_util.adb, gnat1drv.adb, s-parint.ads: Minor
5979 2011-08-29 Matthew Heaney <heaney@adacore.com>
5981 * a-cbhama.ads, a-cbhase.ads (Cursor): Default-initialize all
5982 components of record type.
5984 2011-08-29 Bob Duff <duff@adacore.com>
5986 * s-tassta.adb (Task_Wrapper): Handle and ignore exceptions propagated
5987 by the termination handler.
5989 2011-08-29 Yannick Moy <moy@adacore.com>
5991 * sem_ch3.adb (Array_Type_Declaration): Create declarations for Itypes
5992 created in Alfa mode, instead of inserting artificial declarations of
5993 non-Itypes in the tree.
5994 * sem_util.adb, sem_util.ads (Itype_Has_Declaration): New function to
5995 know if an Itype has a corresponding declaration, as defined in
5998 2011-08-29 Yannick Moy <moy@adacore.com>
6000 * gnat1drv.adb: Minor rewrite.
6002 2011-08-29 Bob Duff <duff@adacore.com>
6004 * s-tasuti.adb (Make_Passive): Work around race condition in
6005 Make_Independent, which can cause Wait_Count to be zero. So instead of
6006 asserting that Wait_Count > 0, and then decrementing it, decrement it
6007 only if Wait_Count > 0.
6008 * s-taskin.ads (Wait_Count, Alive_Count, Awake_Count): All of these
6009 should be nonnegative, so declare them Natural instead of Integer.
6011 2011-08-29 Robert Dewar <dewar@adacore.com>
6013 * exp_ch5.adb, sem_ch3.adb, a-cihama.adb, a-cihama.ads, exp_ch7.adb,
6014 sem_ch5.adb, a-ciorse.adb, a-ciorse.ads, sem_ch12.adb, a-cidlli.adb,
6015 a-cidlli.ads, sem_util.adb, sem_res.adb, gnat1drv.adb, a-except.adb,
6016 a-except.ads, a-except-2005.ads, sem_ch4.adb, exp_disp.adb,
6017 exp_aggr.adb, sem_ch13.adb, par-ch3.adb: Minor reformatting.
6019 2011-08-29 Tristan Gingold <gingold@adacore.com>
6021 * s-auxdec-vms-alpha.adb: Add comments, remove some HT before labels.
6023 2011-08-29 Vadim Godunko <godunko@adacore.com>
6025 * s-parint.ads: Minor comment clarification.
6027 2011-08-29 Vincent Celier <celier@adacore.com>
6029 * prj.adb (Initialize): Make sure that new reserved words after Ada 95
6030 may be used as identifiers.
6032 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6034 * a-coinho.ads: Minor reformating.
6036 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6038 * exp_ch5.adb (Expand_Iterator_Loop): Handle properly a loop over a
6039 container of a derived type.
6041 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6043 * a-cidlli.adb, a-cidlli.ads, a-cihama.adb, a-cihama.ads,
6044 a-ciorse.adb, a-ciorse.ads: Add iterator machinery to containers.
6046 2011-08-29 Pascal Obry <obry@adacore.com>
6048 * exp_disp.adb: Minor comment fix.
6049 (Make_Disp_Asynchronous_Select_Body): Properly initialize out parameters
6050 to avoid warnings when compiling with -Wall.
6051 (Make_Disp_Conditional_Select_Body): Likewise.
6052 (Make_Disp_Timed_Select_Body): Likewise.
6054 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6056 * sem_ch12.adb (Analyze_Formal_Subprogram_Declaration): If default is
6057 an entity name, generate reference for it.
6059 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6061 * exp_ch5.adb (Expand_Iterator_Loop): Uniform handling of "X of S"
6063 * sem_util.adb (Is_Iterator, Is_Reversible_Iterator): Yield True for
6064 the class-wide type.
6065 * sem_ch5.adb: Move some rewriting to the expander, where it belongs.
6067 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6069 * sem_ch8.adb (Check_Constrained_Object): Do not create an actual
6070 subtype for an object whose type is an unconstrained union.
6072 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6074 * par-ch3.adb (P_Array_Type_Definiation, P_Component_Items): "aliased"
6075 is allowed in a component definition, by AI95-406.
6077 2011-08-29 Matthew Heaney <heaney@adacore.com>
6079 * a-chtgbo.adb (Generic_Iteration): Use correct overloading of Next.
6081 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
6083 * a-except-2005.adb: Alphabetize all routines.
6084 (Triggered_By_Abort): New routine.
6085 * a-except-2005.ads (Triggered_By_Abort): New routine.
6086 * a-except.adb Alphabetize all routines.
6087 (Triggered_By_Abort): New routine.
6088 * a-except.ads (Triggered_By_Abort): New routine.
6089 * exp_ch7.adb: Update all comments involving the detection of aborts in
6091 (Build_Object_Declarations): Do not generate code to detect the
6092 presence of an abort at the start of finalization code, use a runtime
6094 * rtsfind.ads: Add RE_Triggered_By_Abort to tables RE_Id and
6096 * sem_res.adb (Resolve_Allocator): Emit a warning when attempting to
6097 allocate a task on a subpool.
6098 * s-stposu.adb: Add library-level flag Finalize_Address_Table_In_Use.
6099 The flag disables all actions related to the maintenance of
6100 Finalize_Address_Table when subpools are not in use.
6101 (Allocate_Any_Controlled): Signal the machinery that subpools are in
6103 (Deallocate_Any_Controlled): Do not call Delete_Finalize_Address which
6104 performs costly task locking when subpools are not in use.
6106 2011-08-29 Yannick Moy <moy@adacore.com>
6108 * gnat1drv.adb (Adjust_Global_Switches): Restore expansion of tagged
6109 types and dispatching calls in Alfa mode.
6110 * lib-xref-alfa.adb (Collect_ALFA): Rewrite computation of
6111 correspondance between body and spec scopes, to reuse utility functions
6112 (Traverse_Declarations_Or_Statements): Protect access to body for stub
6113 by testing the presence of the library unit for the body
6114 * sem_ch6.adb (Set_Actual_Subtypes): take into account that in Alfa
6115 mode the expansion of accept statements is skipped
6116 * sem_util.adb, sem_util.ads (Unique_Entity): New function returning
6117 the unique entity corresponding to the one returned by
6118 Unique_Defining_Entity applied to the enclosing declaration of the
6121 2011-08-29 Bob Duff <duff@adacore.com>
6123 * treepr.ads: Improve debugging facilities. pn(x) no longer crashes in
6124 gdb when x is not a node (it can be a node list, name_id, etc). pp is
6125 an alias for pn. ppp is an alias for pt.
6127 2011-08-29 Javier Miranda <miranda@adacore.com>
6129 * exp_aggr.adb (Expand_Record_Aggregate): Use the top-level enclosing
6130 aggregate to take a consistent decision on the need to convert into
6131 assignments aggregates that initialize constant objects.
6133 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
6135 * exp_ch4.adb (Expand_Allocator_Expression): Add a call to
6136 Build_Allocate_Deallocate_Proc in order to handle allocation of
6137 non-controlled objects on subpools.
6138 * impunit.adb: Remove s-finmas and s-spsufi since they were never meant
6139 to be end-user visible.
6140 * s-finmas.adb: Add with and use clause for System.HTable.
6141 Add an instantiation of Simple_HTable which provides a mapping between
6142 the address of a controlled object and the corresponding
6143 Finalize_Address used to clean up the object. The table is used when a
6144 master is operating in heterogeneous mode.
6145 (Attach): Explain why the input node is not verified on being already
6147 (Delete_Finalize_Address): New routine.
6148 (Detach): Add pragma Assert which ensures that a node is already
6150 (Finalize): Add local variable Cleanup. Rewrite the iteration scheme
6151 since nodes are no longer removed on traversal. Explain why node
6152 detachment is undesirable in this case.
6153 (Get_Finalize_Address): New routine.
6154 (Hash): New routine.
6155 (Is_Empty_List): Removed.
6156 (pm): Renamed to Print_Master. Add output for discriminant
6158 Comment reformatting.
6159 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
6160 * s-finmas.ads: Various comments additions / improvements.
6161 Type Finalization_Master has a discriminant which determines the mode of
6163 (Delete_Finalize_Address): New routine.
6164 (Get_Finalize_Address): New routine.
6165 (pm): Renamed to Print_Master.
6166 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
6167 * s-stposu.adb: Add with clause for System.Address_Image; Add with and
6168 use clause for System.IO.
6169 (Allocate_Any_Controlled): Add machinery to set TSS primitive
6170 Finalize_Address depending on the mode of allocation and the mode of
6172 (Deallocate_Any_Controlled): Remove the relation pair object -
6173 Finalize_Address regardless of the master mode. Add comment explaining
6175 (Detach): Ensure that fields Prev and Next are null after detachment.
6176 (Finalize_Pool): Remove local variable Next_Ptr. Rewrite the iteration
6177 scheme to check whether the list of subpools is empty. There is no
6178 longer need to store the next subpool or advance the current pointer.
6179 (Is_Empty_List): New routine.
6180 (Print_Pool): New routine.
6181 (Print_Subpool): New routine.
6182 * s-stposu.ads: Various comments additions / improvements.
6183 Field Master of type Root_Subpool is now a heterogeneous collection.
6184 (Print_Pool): New routine.
6185 (Print_Subpool): New routine.
6187 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6189 * exp_ch5.adb (Expand_N_Iterator_Loop): Implement Ada2012 loop iterator
6190 forms, using aspects of container types.
6191 * sem_ch3.adb (Find_Type_Name): Preserve Has_Delayed_Aspects and
6192 Has_Implicit_Dereference flags, that may be set on the partial view.
6193 * sem_ch4.adb (Process_Overloaded_Indexed_Component): Prefix may be a
6194 container type with an indexing aspect.
6195 (Analyze_Quantified_Expression): Analyze construct with expansion
6196 disabled, because it will be rewritten as a loop during expansion.
6197 (Try_Container_Indexing): The prefix itself may be a container type
6198 with an indexing aspect, as with a vector of vectors.
6199 * sem_ch5.adb (Analyze_Iteration_Scheme): In a generic context, analyze
6200 the original doamin of iteration, for name capture.
6201 (Analyze_Iterator_Specification): If the domain is an expression that
6202 needs finalization, create a separate declaration for it.
6203 For an iterator with "of" retrieve default iterator info from aspect of
6204 container type. For "in" iterator, retrieve type of Iterate function.
6205 * sem_ch13.adb (Check_Iterator_Function): Fix typo.
6206 (Check_Aspect_At_End_Of_Declaration): Make type unfrozen before
6207 analysis, to prevent spurious errors about late attributes.
6208 * sprint.adb: Handle quantified expression with either loop or iterator
6210 * a-convec.ads, a-convec.adb: Iterate function returns a reversible
6213 2011-08-29 Vincent Celier <celier@adacore.com>
6215 * make.adb (Scan_Make_Arg): Take any option as is in packages Compiler,
6216 Binder or Linker of the main project file.
6218 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6220 * inline.adb (Add_Scopes_To_Clean): Exclude any entity within a generic
6223 2011-08-29 Yannick Moy <moy@adacore.com>
6225 * exp_ch9.adb: Partial revert of previous change for Alfa mode
6227 2011-08-29 Yannick Moy <moy@adacore.com>
6229 * exp_ch11.adb: Minor expansion of comment.
6231 2011-08-29 Yannick Moy <moy@adacore.com>
6233 * lib-xref-alfa.adb (Add_ALFA_Scope): Treat generic entities.
6235 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6237 * sem_res.adb (Resolve_Arithmetic_Op): If the node has a universal
6238 interpretation, set the type before resolving the operands, because
6239 legality checks on an exponention operand need to know the type of the
6242 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6244 * sem_ch12.adb (Analyze_Package_Instantiation): Do not set delayed
6245 cleanups on a master if the instance is within a generic unit.
6246 Complement to the corresponding fix to inline.adb for K520-030.
6248 2011-08-29 Tristan Gingold <gingold@adacore.com>
6250 * exp_ch7.adb (Build_Raise_Statement): Raise PE instead of the current
6252 * exp_intr.adb: Minor comment fix.
6254 2011-08-29 Bob Duff <duff@adacore.com>
6256 * sem_ch13.adb (Analyze_Aspect_Specifications): Fix cases where
6257 Delay_Required was used as an uninitialized variable.
6259 2011-08-29 Robert Dewar <dewar@adacore.com>
6261 * a-cdlili.adb, a-cdlili.ads, a-coinve.adb, a-coinve.ads,
6262 sem_util.adb, sem_util.ads, a-cohama.adb, a-cohama.ads, a-coorse.adb,
6263 a-coorse.ads, aspects.ads, sem_ch8.adb: Minor reformatting.
6265 2011-08-29 Thomas Quinot <quinot@adacore.com>
6267 * system-freebsd-x86_64.ads (Backend_Overflow_Checks): Set true True.
6268 Remove unused variables.
6270 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6272 * sem_res.adb: Remove Build_Explicit_Dereference.
6273 * sem_util.adb, sem_util.ads (Build_Explicit_Dereference): Moved here
6274 from sem_res.adb, used in analysis of additional constructs.
6275 (Is_Iterator, Is_Reversible_Iterator): New predicates for Ada2012
6276 expansion of iterators.
6277 (Is_Object_Reference): Recognize variables rewritten as explicit
6278 dereferences in Ada2012.
6279 * snames.ads-tmpl: Add Has_Element, Forward_Iterator,
6280 Reversible_Iterator names, for expansion of Ada2012 iterators.
6281 * aspects.ads, aspects.adb (Find_Aspect): Utility.
6282 * a-cdlili.ads, a-cdlili.adb: Add new iterator machinery to doubly
6283 linked list container.
6284 * a-coinve.ads, a-coinve.adb: Ditto for indefinite vector containers.
6285 * a-coorse.ads, a-coorse.adb: Ditto for ordered sets.
6287 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6289 * a-cohama.adb, a-cohama.ads: Add iterator primitives to hashed map
6292 2011-08-29 Vincent Celier <celier@adacore.com>
6294 * make.adb (Gnatmake): Get the maximum number of simultaneous
6295 compilation processes after the Builder switches has been scanned, as
6296 there may include -jnn.
6298 2011-08-29 Matthew Heaney <heaney@adacore.com>
6300 * a-chtgbo.adb (Generic_Equal): Use correct overloading of Next.
6302 2011-08-29 Tristan Gingold <gingold@adacore.com>
6304 * gnatcmd.adb (GNATCmd): On OpenVMS, truncate the length of
6305 GNAT_DRIVER_COMMAND_LINE to 255.
6307 2011-08-29 Pascal Obry <obry@adacore.com>
6309 * freeze.adb, sem_ch8.adb, a-convec.adb, a-convec.ads: Minor
6310 reformatting and style fix (class attribute casing).
6312 2011-08-29 Yannick Moy <moy@adacore.com>
6314 * exp_ch11.adb: Yet another case where expansion should be common
6315 between CodePeer and Alfa.
6317 2011-08-29 Yannick Moy <moy@adacore.com>
6319 * exp_ch9.adb: Partial revert of previous change for Alfa mode.
6321 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6323 * sem_ch6.adb (Matches_Limited_With_View): The limited views of an
6324 incomplete type and its completion match.
6326 2011-08-29 Yannick Moy <moy@adacore.com>
6328 * exp_ch13.adb: Adjust previous change.
6330 2011-08-29 Robert Dewar <dewar@adacore.com>
6332 * sem_prag.adb, prj.adb, sem_util.adb, sem_res.adb, gnat1drv.adb,
6333 exp_ch4.adb, sem_ch8.adb: Minor code reorganization
6336 2011-08-29 Emmanuel Briot <briot@adacore.com>
6338 * make.adb, prj.adb, prj.ads (Compute_All_Imported_Projects): Also
6339 initialize aggregated projects.
6341 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6343 * sem_ch8.adb (Find_Renamed_Entity): Within an instance, use scope
6344 depth of candidates to resolve a potentially spurious ambiguity between
6345 two visible subprograms.
6347 2011-08-29 Yannick Moy <moy@adacore.com>
6349 * sem_prag.adb (Analyze_Pragma): Allow Test_Case pragma without
6351 * sem_util.adb (Get_Ensures_From_Test_Case_Pragma,
6352 Get_Requires_From_Test_Case_Pragma): Allow Test_Case pragma without
6355 2011-08-29 Arnaud Charlet <charlet@adacore.com>
6357 * gnat1drv.adb (Adjust_Global_Switches): Improve previous change.
6360 2011-08-29 Thomas Quinot <quinot@adacore.com>
6362 * sem_res.adb: Minor reformatting.
6364 2011-08-29 Johannes Kanig <kanig@adacore.com>
6366 * exp_ch4.adb (Expand_Quantified_Expression): Do not expand in ALFA
6368 * gnat1drv.adb (Adjust_Global_Switches): Set
6369 Use_Expressions_With_Actions to False in ALFA mode.
6370 * sem_res.adb (Resolve_Quantified_Expression): Simpler treatment in
6373 2011-08-29 Yannick Moy <moy@adacore.com>
6375 * exp_ch13.adb (Expand_N_Freeze_Entity): Do nothing in Alfa mode.
6376 * exp_ch9.adb: Do not expand tasking constructs in Alfa mode.
6377 * gnat1drv.adb (Adjust_Global_Switches): Suppress the expansion of
6378 tagged types and dispatching calls in Alfa mode.
6380 2011-08-29 Javier Miranda <miranda@adacore.com>
6382 * sem_ch3.adb (Process_Discriminants): Add missing check to ensure that
6383 we do not report an error on an Empty node.
6385 2011-08-29 Geert Bosch <bosch@adacore.com>
6387 * Makefile.rtl (GNATRTL_NONTASKING_OBJECTS): Add a-nllrar.o,
6388 a-nlrear.o and a-nurear.o.
6390 2011-08-29 Robert Dewar <dewar@adacore.com>
6392 * freeze.adb: Minor code reorganization.
6394 * sem_util.adb, errout.adb, exp_ch11.adb, a-ngrear.adb, s-gearop.adb,
6395 sem_ch6.adb: Minor reformatting
6397 2011-08-29 Tristan Gingold <gingold@adacore.com>
6399 * s-except.ads, s-except.adb: Provide dummy body.
6401 2011-08-29 Yannick Moy <moy@adacore.com>
6403 * sem_warn.adb (Within_Postcondition): Take into account the case of
6404 an Ensures component in a Test_Case.
6406 2011-08-29 Tristan Gingold <gingold@adacore.com>
6408 * s-excdeb.ads, s-excdeb.adb: New files, created from s-except.
6409 * rtsfind.ads (RTU_Id): Replaces System_Exceptions by
6410 System_Exceptions_Debug
6411 (RE_Unit_Table): Search RE_Local_Raise in System_Exceptions_Debug
6412 * a-except.adb: With and use System.Exceptions_Debug instead of
6414 * a-except-2005.adb: Likewise.
6415 * s-assert.adb: Likewise.
6416 * s-except.adb, s-except.ads: Move debugging hooks to s-excdeb.
6417 * Makefile.rtl: Add s-excdeb. Adjust compilation rule.
6418 * gcc-interfaces/Makefile.in, gcc-interface/Make-lang.in: Add
6419 s-excdeb. Update dependencies.
6420 (GNATRTL_LINEARALGEBRA_OBJS): Remove a-nlrear.o a-nurear.o a-nllrar.o
6421 as these no longer need external libraries.
6423 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6425 * sem_res.adb (Resolve_Op_Expon): Additional check to reject an
6426 exponentiation operator on universal values in a context that requires
6429 2011-08-29 Tristan Gingold <gingold@adacore.com>
6431 * raise-gcc.c (personnality_routine): Fix thinko. Set Ada occurrence
6432 before calling notify_handled_exception.
6433 * a-exextr.adb: Fix comment.
6435 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
6437 * exp_ch4.adb (Expand_Allocator_Expression): Add code to set attribute
6438 Finalize_Address of the access type's finalization master.
6439 (Expand_N_Allocator): Add code to set attribute Finalize_Address of the
6440 access type's finalization master. Add a guard to prevent
6441 Associated_Storage_Pool from being set on .NET/JVM.
6442 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add code to set
6443 attribute Finalize_Address of the access type's finalization master.
6444 * exp_ch7.adb (Make_Finalize_Address_Call): New routine.
6445 * exp_ch7.ads (Make_Finalize_Address_Call): New routine.
6446 * rtsfind.ads: Add RE_Set_Finalize_Address to tables RE_Id and
6448 * s-finmas.adb: Add with clause for System.Address_Image. Add with and
6449 use clause for System.IO
6450 (Detach): Relax the assertion, to be reinstated later.
6451 (Finalize): Rewrite the iteration loop to avoid pointer comparison.
6452 Relax the assertion on Finalize_Address, to be reinstated later.
6453 (Is_Empty_List): New routine.
6454 (pm): New debug routine.
6455 (Set_Finalize_Address): New routine.
6456 * s-finmas.ads (pm): New debug routine.
6457 (Set_Finalize_Address): New routine.
6458 * s-stposu.adb (Allocate_Any_Controlled): Code reformatting.
6460 2011-08-29 Tristan Gingold <gingold@adacore.com>
6462 * a-exexpr-gcc.adb (GCC_Exception_Access, GNAT_GCC_Exception_Access):
6463 Remove convention C.
6465 2011-08-29 Tristan Gingold <gingold@adacore.com>
6467 * s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove.
6468 (Initialize_TCB): Remove Exc_Stack_Ptr initialization.
6469 (Finalize_TCB): Remove its finalization.
6470 (Initialize): Remove assignment of GET_Exc_Stack_Addr
6471 * s-soflin.adb (NT_Exc_Stack): Remove
6472 (Get_Exc_Stack_Addr_NT): Likewise.
6473 (Get_Exc_Stack_Addr_Soft): Likewise.
6474 * s-soflin.ads (Get_Exc_Stack_Addr_NT): Remove.
6475 (Get_Exc_Stack_Addr): Likewise.
6476 (Get_Exc_Stack_Addr_Soft): Likewise
6477 * s-taspri-vms.ads (Exc_Stack_T): Remove.
6478 (Exc_Stack_Ptr_T): Likewise.
6479 (Private_Data): Remove Exc_Stack_Ptr component.
6481 2011-08-29 Tristan Gingold <gingold@adacore.com>
6483 * raise-gcc.c (get_ip_from_context): New function. Factorize code.
6485 2011-08-29 Tristan Gingold <gingold@adacore.com>
6487 * gnat_ugn.texi: Fix aix and x86-solaris info for run-time.
6489 2011-08-29 Geert Bosch <bosch@adacore.com>
6491 * s-gearop.ads (Back_Substitute, Diagonal, Forward_Eliminate,
6492 L2_Norm, Swap_Column): New generic subprograms
6493 * s-gearop.adb (Back_Substitute, Diagonal, Forward_Eliminate,
6494 L2_Norm, Swap_Column): Implement new subprograms in order to
6495 eliminate dependency on BLAS and LAPACK libraries in
6496 Ada.Numerics.Generic_Real_Arrays and eventually also the complex
6497 version. Forward_Eliminate/Back_Substitute can be used to put a
6498 matrix in row echelon or reduced row echelon form using partial
6500 * a-ngrear.adb: (Back_Substitute, Diagonal, Forward_Eleminate,
6501 Swap_Column): Instantiate from System.Generic_Array_Operations.
6502 ("*", "abs"): Implement by instantiation from Generic_Array_Operations.
6503 (Sqrt): Local function for simple computation of square root without
6504 adding dependencies on Generic_Elementary_Functions.
6505 (Swap): New subprogram to exchange floating point numbers.
6506 (Inverse): Reimplement using Jordan-Gauss elimination.
6507 (Jacobi): New procedure implementing Jacobi's method for computation
6508 of eigensystems, based on Rutishauser's implementation.
6509 (L2_Norm): Implement directly using the inner product.
6510 (Sort_Eigensystem): Sort eigenvalue/eigenvector pairs in order of
6511 decreasing eigenvalue as required by the Ada RM.
6512 (Swap_Column): New helper procedure for Sort_Eigensystem.
6513 Remove with of System.Generic_Real_BLAS and System.Generic_Real_LAPACK.
6514 Add with of Ada.Containers.Generic_Anonymous_Array_Sort, for
6517 2011-08-29 Thomas Quinot <quinot@adacore.com>
6519 * put_scos.adb (Put_SCOs): Do not emit a newline for an empty
6522 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
6524 * s-finmas.adb (Finalize): Check Finalize_Address of the master rather
6525 than the current node.
6526 * s-finmas.ads: Move field Finalize_Address from type FM_Node to
6527 Finalization_Master. The list headers have two fields instead of three.
6528 This should fix alignment issue but subpool allocations are now
6529 unusable. Alphabetize subprograms.
6530 * s-stposu.adb (Allocate_Any_Controlled): Use the offset rather than
6531 the size of the header when converting the beginning of the object to
6532 a FM_Node. Set the master's Finalize_Address attribute if not already
6534 (Deallocate_Any_Controlled): Use the offset rather than the size of the
6535 header when converting the beginning of the object to a FM_Node.
6537 2011-08-29 Gary Dismukes <dismukes@adacore.com>
6539 * exp_ch11.adb (Expand_N_Raise_Statement): Don't suppress expansion of
6540 reraise when compiling for CodePeer.
6542 2011-08-29 Arnaud Charlet <charlet@adacore.com>
6544 * a-iteint.ads, Makefile.rtl: Add missing compilation of a-iteint.ads,
6545 now needed by a-convec.adb. Fix warning.
6547 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
6549 * exp_util.adb (Build_Allocate_Deallocate_Proc): Add a guard for the
6550 processing of TSS routine Finalize_Address when compiling in
6553 2011-08-29 Thomas Quinot <quinot@adacore.com>
6555 * a-strunb.ads, einfo.ads, g-comlin.ads, sem_ch6.adb,
6556 sem_warn.adb: Minor reformatting.
6558 2011-08-29 Emmanuel Briot <briot@adacore.com>
6560 * prj-conf.adb (Get_Config_Switches): Also collect the list of
6561 languages from aggregated projects.
6563 2011-08-29 Yannick Moy <moy@adacore.com>
6565 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Declarations_Or_Statements,
6566 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
6567 Traverse_Package_Declaration, Traverse_Subprogram_Body,
6568 Traverse_Compilation_Unit): Add a parameter Inside_Stubs so that bodies
6569 for stubs are traversed too when parameter is set
6570 (Traverse_All_Compilation_Units): Traverse without going inside stubs
6571 (Traverse_Declarations_Or_Statements): Do the special traversing for
6572 stubs when required.
6573 * sem_util.adb, sem_util.ads (Get_Body_From_Stub): New function to
6574 return subprogram or package body from stub.
6575 (Is_Subprogram_Stub_Without_Prior_Declaration): New function to detect
6576 stubs without prior subprogram decl.
6578 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
6580 * gnat_ugn.texi: Fix typo.
6582 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
6584 * s-stposu.adb (Allocate_Any_Controlled): Reimplement the mechanism
6585 which accounts for size vs alignment issues and calculates the size of
6587 (Deallocate_Any_Controlled): Ditto.
6588 (Nearest_Multiple_Rounded_Up): New routine.
6590 2011-08-29 Tristan Gingold <gingold@adacore.com>
6592 * a-exstat.adb (String_To_EO): Do no set Cleanup_Flag.
6593 * a-exexda.adb (Set_Exception_C_Msg): Ditto.
6594 (Set_Exception_Msg): Ditto.
6595 * a-exexpr-gcc.adb (Setup_Current_Excep): Ditto. Do not set
6597 * a-except.adb, a-except-2005.adb (Save_Occurrence_No_Private): Remove.
6598 Use Save_Occurrence instead of Save_Occurrence_No_Private.
6599 (Raise_With_Msg): Remove Cleanup_Flag.
6600 * a-except.ads, a-except-2005.ads (Exception_Occurrence): Remove
6601 Clean_Flag and Private_Data components.
6603 2011-08-29 Yannick Moy <moy@adacore.com>
6605 * freeze.adb (Freeze_Record_Type): Ignore packing in Alfa mode, like
6607 * sem_ch3.adb (Signed_Integer_Type_Declaration): Correct the generation
6608 of an explicitly declared type, so that the base types of the original
6609 type and this generated type are the same, and a "type" (not a subtype
6611 * errout.adb (Special_Msg_Delete): Do not issue messages "Size too
6612 small" in Alfa mode, like in CodePeer mode.
6613 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore rep
6614 clauses in Alfa mode.
6616 2011-08-29 Javier Miranda <miranda@adacore.com>
6618 * exp_ch6.ads, exp_ch6.adb (Is_Null_Procedure): Move the spec of this
6619 function to the package spec.
6620 * sem_ch6.adb (Find_Corresponding_Spec, New_Overloaded_Entity): For
6621 internally generated bodies of null procedures locate the internally
6622 generated spec enforcing mode conformance.
6623 (Is_Interface_Conformant): Ensure that the controlling formal of the
6626 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6628 * sem_prag.adb (Analyze_Pragma, case Inline): In an instance, do not
6629 reject the pragma if it appears to apply to a formal subprogram.
6631 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6633 * exp_ch4.adb (Expand_Allocator_Expression): Use consistent name for
6634 inner expression, to prevent double evaluation.
6636 2011-08-29 Tristan Gingold <gingold@adacore.com>
6638 * a-exexpr.adb (Propagate_Exception): Remove all the parameters as
6640 * a-exexpr-gcc.adb (Propagate_Exception): Ditto.
6641 * a-except-2005.adb (Propagate_Exception): Adjust spec.
6642 (Raise_Current_Excep): Adjust call.
6643 (Raise_From_Signal_Handler): Call now simply call Raise_Current_Excep.
6645 2011-08-29 Thomas Quinot <quinot@adacore.com>
6647 * exp_disp.adb: Minor reformatting.
6649 2011-08-29 Tristan Gingold <gingold@adacore.com>
6651 * a-exexpr.adb (Setup_Exception): Removed.
6652 * a-exexpr-gcc.adb (Setup_Exception): Removed.
6653 * a-except.adb (Exception_Propagation): Removed.
6654 * a-except-2005.adb (Setup_Exception): Removed.
6655 (Reraise): Remove call to Setup_Exception.
6656 (Reraise_Occurrence): Ditto.
6657 (Reraise_Occurrence_Always): Ditto.
6658 (Reraise_Occurrence_No_Defer): Ditto.
6659 (Transfer_Occurrence): Ditto.
6660 * a-exexda.adb (Set_Exception_C_Msg): Remove call to Setup_Exception.
6661 (Set_Exception_Msg): Ditto.
6663 2011-08-29 Robert Dewar <dewar@adacore.com>
6665 * a-convec.adb, exp_disp.adb: Minor reformatting.
6667 2011-08-29 Tristan Gingold <gingold@adacore.com>
6669 * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C.
6671 2011-08-29 Gary Dismukes <dismukes@adacore.com>
6673 * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set
6674 Exception_Handlers to No_List instead of Empty_List in the case where
6675 there are no handlers.
6677 2011-08-29 Tristan Gingold <gingold@adacore.com>
6679 * gcc-interface/gigi.h (enum standard_datatypes): Add
6680 ADT_reraise_zcx_decl
6681 (reraise_zcx_decl): New macro.
6682 * gcc-interface/trans.c (gnu_incoming_exc_ptr): New variable.
6683 (gigi): Set reraise_zcx_decl.
6684 (Exception_Handler_to_gnu_zcx): Save and restore gnu_incoming_exc_ptr.
6685 (gnat_to_gnu): Handle N_Raise_Statement.
6687 2011-08-29 Robert Dewar <dewar@adacore.com>
6689 * sem_ch6.adb, exp_ch3.adb, s-stposu.adb, a-undesu.ads,
6690 a-undesu.adb: Minor reformatting.
6692 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6694 * exp_disp.adb (Check_Premature_Freezing): When building a dispatch
6695 table, accept an unfrozen untagged component if it is an actual for a
6696 formal incomplete type.
6697 * a-convec.ads, a-convec.adb: Instantiate Ada.Iterator_Interfaces to
6698 provide new iterator forms over vectors.
6699 Introduce type Iterator in package body to implement operations of
6700 Reversible_Iterator interface.
6701 * a-iteint.ads: Make package pure so it is usable with new container
6702 packages, that are categorized Remote_Types.
6704 2011-08-29 Robert Dewar <dewar@adacore.com>
6706 * a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting.
6708 2011-08-29 Bob Duff <duff@adacore.com>
6710 * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case
6711 of <>, because this is the routine that checks for dimensionality
6712 errors (for example, for a two-dimensional array, (others => <>) should
6713 be (others => (others => <>)).
6715 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
6717 * impunit.adb: Add new run-time units.
6718 * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb,
6719 s-stposu.ads, s-stposu.adb: Code clean up.
6720 Handle protected class-wide or task class-wide types
6721 Handle C/C++/CIL/Java types.
6722 * s-spsufi.adb, s-spsufi.ads: New files.
6724 2011-08-29 Yannick Moy <moy@adacore.com>
6726 * sem_ch13.adb (Analyze_Aspect_Specifications): Reject test-case on
6727 library-level subprogram.
6728 * sem_prag.adb (Check_Test_Case): Stricter rules for test-case
6730 (Analyze_Pragma): Change name "Normal" for "Nominal" in test-case
6732 * snames.ads-tmpl: Change name "Normal" for "Nominal" in test-case
6734 * gnat_rm.texi: Update doc for Test_Case pragma.
6736 2011-08-29 Tristan Gingold <gingold@adacore.com>
6738 * a-exexpr-gcc.adb (Unwind_Exception): Remove default value, made it
6740 (GCC_Exception_Access): New type.
6741 (Unwind_DeleteException): New imported procedure
6742 (Foreign_Exception): Import it.
6743 (GNAT_GCC_Exception): Simply have the occurrence inside.
6744 (To_GCC_Exception): New function.
6745 (To_GNAT_GCC_Exception): New function.
6746 (GNAT_GCC_Exception_Cleanup): New procedure..
6747 (Propagate_GCC_Exception): New procedure.
6748 (Reraise_GCC_Exception): New procedure.
6749 (Setup_Current_Excep): New procedure.
6750 (CleanupUnwind_Handler): Change type of UW_Exception parameter.
6751 (Unwind_RaiseException): Ditto.
6752 (Unwind_ForcedUnwind): Ditto.
6754 (Begin_Handler): Change type of parameter.
6755 (End_Handler): Ditto. Now delete the exception if still present.
6756 (Setup_Key): Removed.
6757 (Is_Setup_And_Not_Propagated): Removed.
6758 (Set_Setup_And_Not_Propagated): Ditto.
6759 (Clear_Setup_And_Not_Propagated): Ditto.
6760 (Save_Occurrence_And_Private): Ditto.
6761 (EID_For): Add 'not null' constraint on parameter.
6762 (Setup_Exception): Does nothing.
6763 (Propagate_Exception): Simplified.
6764 * exp_ch11.adb (Expand_N_Raise_Statement): In back-end exception model,
6765 re-raise is not expanded anymore.
6766 * s-except.ads (Foreign_Exception): New exception - placeholder for
6768 * raise-gcc.c (__gnat_setup_current_excep): Declare
6769 (CXX_EXCEPTION_CLASS): Define (not yet used)
6770 (GNAT_EXCEPTION_CLASS): Define.
6771 (is_handled_by): Handle foreign exceptions.
6772 (PERSONALITY_FUNCTION): Call __gnat_setup_current_excep.
6774 2011-08-29 Jose Ruiz <ruiz@adacore.com>
6776 * a-synbar.adb (Synchronous_Barrier): Some additional clarification.
6778 2011-08-29 Thomas Quinot <quinot@adacore.com>
6780 * a-synbar-posix.adb: Minor reformatting.
6782 2011-08-29 Jose Ruiz <ruiz@adacore.com>
6784 * a-exetim-posix.adb, a-exetim-mingw.adb, a-exetim-mingw.ads,
6785 a-exetim-default.ads (Interrupt_Clocks_Supported,
6786 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
6787 definitions to be compliant with AI-0171. The target systems do not
6788 support separate account for the execution time of interrupt handlers.
6790 2011-08-29 Jose Ruiz <ruiz@adacore.com>
6792 * a-synbar.adb (Wait): Change the order of evaluation of the conditions
6793 in the barrier to put first the easiest to evaluate (and the one which
6794 will be True more often). More efficient.
6796 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
6798 * s-atocou-x86.adb: Fix constraint in machine code insertion.
6800 2011-08-29 Bob Duff <duff@adacore.com>
6802 * aspects.ads, aspects.adb: Add new aspects for various pragmas and
6803 attributes that are now aspects, as specified by AI05-0229-1.
6804 * sem_ch13.adb (Analyze_Aspect_Specifications,
6805 Check_Aspect_At_Freeze_Point): Analyze the new aspects. Turn them into
6806 pragmas or attribute references, as appropriate.
6808 2011-08-29 Robert Dewar <dewar@adacore.com>
6810 * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
6811 a-synbar-posix.ads: Minor reformatting.
6813 2011-08-29 Yannick Moy <moy@adacore.com>
6815 * snames.ads-tmpl: Add name Force.
6817 2011-08-29 Pascal Obry <obry@adacore.com>
6819 * prj-nmsc.adb: Minor reformatting.
6821 2011-08-29 Jose Ruiz <ruiz@adacore.com>
6823 * a-exetim.ads (Interrupt_Clocks_Supported,
6824 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
6825 definitions to be compliant with AI-0171.
6827 2011-08-29 Robert Dewar <dewar@adacore.com>
6829 * a-ngelfu.adb: Add comments.
6831 2011-08-29 Geert Bosch <bosch@adacore.com>
6833 * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
6834 the closest machine number to Pi / 2.0.
6836 2011-08-29 Jose Ruiz <ruiz@adacore.com>
6838 * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
6839 package Ada.Synchronous_Barriers.
6840 * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
6841 Add new specs and bodies for Ada.Synchronous_Barriers. There is a
6842 default implementation using protected objects and another one
6843 a-synbar-posix using POSIX barriers as the underlying support.
6844 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
6845 x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
6846 Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
6847 Clean up dependencies.
6848 * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
6850 2011-08-29 Robert Dewar <dewar@adacore.com>
6852 * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
6853 exp_dist.adb: Minor code reorganization.
6856 2011-08-29 Thomas Quinot <quinot@adacore.com>
6858 * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
6859 primitive operation must support external streaming if it is not a
6860 controlling access result.
6862 2011-08-29 Thomas Quinot <quinot@adacore.com>
6864 * sinfo.ads, sem_ch7.adb: Minor reformatting.
6866 2011-08-29 Bob Duff <duff@adacore.com>
6868 * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
6869 restriction on allocators, as required by AI05-0013-1.
6870 * restrict.ads: Minor comment fix.
6872 2011-08-29 Tristan Gingold <gingold@adacore.com>
6874 * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
6875 (To_Jmpbuf_Address): Ditto
6876 (builtin_longjmp): Ditto
6878 2011-08-29 Thomas Quinot <quinot@adacore.com>
6880 * sem_res.adb: Minor reformatting.
6882 2011-08-29 Vincent Celier <celier@adacore.com>
6884 * make.adb (Gnatmake): Move special processing for VM targets after the
6885 call to Get_Target_Parameters.
6887 2011-08-29 Thomas Quinot <quinot@adacore.com>
6889 * sem_ch12.adb, par-ch12.adb: Minor reformatting.
6891 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
6893 * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
6894 where an anonymous access discriminant of a limited designated type
6895 appears in a non-immutably limited discriminated type and issue an
6896 error message. Add local variable Desig_T and replace all occurrences
6899 2011-08-29 Jose Ruiz <ruiz@adacore.com>
6901 * a-rttiev.adb (Set_Handler): Update comment to indicate that our
6902 implementation is compliant to RM D.15(15/2) after the modification
6903 imposed by AI05-0094-1 (binding interpretation).
6905 2011-08-29 Robert Dewar <dewar@adacore.com>
6907 * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
6908 s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
6910 2011-08-29 Thomas Quinot <quinot@adacore.com>
6912 * par-endh.adb (Check_End): For an END where it is mandatory to repeat
6913 the scope name, do not report a missing label as a style violation (it
6914 will be diagnosed as an illegality).
6915 * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
6916 variant records: Get_Enum_Lit_From_Pos already returns a usage
6917 occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
6918 on Expr in Integer_Literal case so that it can be used by
6921 2011-08-29 Tristan Gingold <gingold@adacore.com>
6923 * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
6925 * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
6926 (Build_Abort_Block_Handler): New function to build an Abort_Signal
6928 * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
6929 Build_Abort_Block_Handler to build the exception handler. Do not
6930 undefer aborts for the Abort_Signal exception handler if back-end
6931 exception mechanism.
6932 * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
6933 back_end exceptions for all others and abort_signal.
6934 * s-except.ads (ZCX_By_Default): New constant.
6935 * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
6936 (Raise_Exception_Always): Ditto.
6937 (Raise_From_Signal_Handler): Ditto.
6938 (Raise_With_Location_And_Msg): Ditto.
6939 (Raise_With_Msg): Ditto.
6941 (Reraise_Occurence): Ditto.
6942 (Reraise_Occurrence_Always): Ditto.
6943 * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
6944 * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
6946 2011-08-29 Thomas Quinot <quinot@adacore.com>
6948 * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
6950 2011-08-29 Robert Dewar <dewar@adacore.com>
6952 * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
6953 Minor code reorganization.
6955 2011-08-29 Bob Duff <duff@adacore.com>
6957 * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
6958 2012, not just Ada 2005.
6960 2011-08-29 Vincent Celier <celier@adacore.com>
6962 * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
6963 with a project file or with gprbuid, if -gnatep= is specified, the
6964 builder may need to be invoked with -x.
6966 2011-08-29 Tristan Gingold <gingold@adacore.com>
6968 * a-exexpr-gcc.adb: Minor comment fix.
6970 2011-08-29 Robert Dewar <dewar@adacore.com>
6972 * sem_ch8.adb: Minor reformatting.
6974 2011-08-29 Bob Duff <duff@adacore.com>
6976 * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
6977 * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
6978 treating "some" as unreserved in earlier Ada versions. This is now
6979 handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
6980 rather than Name_Some, since Tok_Some is now recognized as reserved.
6981 * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
6983 * scans.ads: Minor comment fixes.
6984 * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
6985 for other language versions.
6986 * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
6987 treating "some" as unreserved in earlier Ada versions. This is now
6988 handled in Snames.Is_Keyword_Name.
6989 * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
6991 (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
6992 unreserved in earlier Ada versions. This is now handled in
6993 Snames.Is_Keyword_Name.
6994 * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
6995 words as for other language versions.
6996 * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
6997 Ada 2012, not just Ada 2005.
6999 2011-08-29 Ed Schonberg <schonberg@adacore.com>
7001 * sem_ch13.adb: Additional semantic checks for aspects involved in
7004 2011-08-29 Matthew Heaney <heaney@adacore.com>
7006 * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
7007 a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
7008 Container parameter.
7009 (Ancestor_Find): ditto.
7011 2011-08-29 Thomas Quinot <quinot@adacore.com>
7013 * par-endh.adb: Minor reformatting.
7015 2011-08-29 Tristan Gingold <gingold@adacore.com>
7017 * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
7018 (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
7019 (Adjust_N_CLeanups_For): Remove.
7020 (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
7022 (Propgate_Exception): Adjust.
7023 * raise-gcc.c: Add a few static/const.
7024 (Adjust_N_Cleanups_For): Remove declaration.
7025 (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
7027 2011-08-29 Ed Schonberg <schonberg@adacore.com>
7029 * sem_ch8.adb: Use type of function return when rewriting as object
7032 2011-08-29 Gary Dismukes <dismukes@adacore.com>
7034 * sem_type.adb: Minor reformatting.
7036 2011-08-29 Robert Dewar <dewar@adacore.com>
7038 * makeutl.adb: Minor reformatting.
7040 2011-08-29 Ed Schonberg <schonberg@adacore.com>
7042 * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
7043 function call of a limited type, the expansion of the renaming is
7044 complicated by the presence of various temporaries and subtypes that
7045 capture constraints of the renamed object.
7046 Rewrite node as an object declaration, whose expansion is simpler.
7047 Given that the object is limited there is no copy involved and no
7050 2011-08-29 Robert Dewar <dewar@adacore.com>
7052 * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
7053 freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
7055 2011-08-29 Tristan Gingold <gingold@adacore.com>
7057 * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
7058 system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
7059 system-linux-hppa.ads, system-linux-s390.ads,
7060 system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
7061 system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
7062 system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
7063 system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
7064 system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
7065 system-solaris-sparc.ads, system-lynxos-x86.ads,
7066 system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
7067 system-solaris-x86_64.ads, system-mingw-x86_64.ads,
7068 system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
7069 system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
7070 system-vxworks-x86.ads: Remove GCC_ZCX_Support.
7071 * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
7072 s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
7073 * opt.ads: Adjust comment.
7074 * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
7075 * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
7076 * system.ads: Move GCC_ZCX_Support to obsolete entries.
7078 2011-08-29 Emmanuel Briot <briot@adacore.com>
7080 * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
7081 file name is specified on the gnatmake or gprbuild command line, and
7082 before we search for that file in the project.
7084 2011-08-29 Ed Schonberg <schonberg@adacore.com>
7086 * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
7087 used to determine whether a possible interpretation for an overloadable
7088 entity is declared within the current instantiation and should be
7089 included in the candidate set.
7091 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
7093 * gnat_rm.texi, gnat_ugn.texi: Clean ups.
7095 2011-08-29 Ed Schonberg <schonberg@adacore.com>
7097 * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
7098 access subtype is access_to_subprogram, when applying checks for
7101 2011-08-29 Matthew Heaney <heaney@adacore.com>
7103 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
7104 for sibling when common parent.
7106 2011-08-29 Thomas Quinot <quinot@adacore.com>
7108 * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
7111 2011-08-29 Ed Schonberg <schonberg@adacore.com>
7113 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
7114 for the return type when in ASIS mode.
7116 2011-08-29 Vincent Celier <celier@adacore.com>
7118 * make.adb (Gnatmake): Get the default search dirs, then the target
7119 parameters after getting the Builder switches, as the Builder switches
7120 may include --RTS= and that could change the default search dirs.
7122 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
7124 * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
7125 Make_Final_Call. Move the processing for class-wide types before the
7126 processing for derivations from [Limited_]Controlled.
7127 (Make_Final_Call): Move the processing for class-wide types before the
7128 processing for derivations from [Limited_]Controlled.
7129 * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
7130 Add code to account for alignments larger than the list header. Add a
7131 comment illustrating the structure of the allocated object + padding +
7133 (Deallocate_Any_Controlled): Add code to account for alignments larger
7134 than the list header.
7136 2011-08-29 Ed Schonberg <schonberg@adacore.com>
7138 * sinfo.ads, sinfo.adb: New node kind
7139 N_Formal_Incomplete_Type_Definition, related flags.
7140 par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
7141 Parse formal incomplete types.
7142 * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
7144 * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
7145 Formal incomplete types do not need completion.
7146 * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
7147 Validate_Incomplete_Type_Instance): New procedures to handle formal
7149 * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
7150 that corresponds to a formal incomplete type.
7151 * sprint.adb: Handle formal incomplete type declarations.
7152 * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
7155 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
7157 * a-fihema.ads, a-fihema.adb: Unit removed.
7158 * a-undesu.ads, a-undesu.adb: New unit implementing
7159 Ada.Unchecked_Deallocate_Subpool.
7160 * einfo.adb: Remove Associated_Collection from the node usage.
7161 Add Finalization_Master to the node usage.
7162 (Associated_Collection): Removed.
7163 (Finalization_Master): New routine.
7164 (Set_Associated_Collection): Removed.
7165 (Set_Finalization_Master): New routine.
7166 (Write_Field23_Name): Remove Associated_Collection from the output. Add
7167 Finalization_Master to the output.
7168 * einfo.ads: Remove attribute Associated_Collection and its uses in
7170 Add new attribute Finalization_Master along with its uses in entitites.
7171 (Associated_Collection): Removed along with its pragma import.
7172 (Finalization_Master): New routine along with a pragma import.
7173 (Set_Associated_Collection): Removed along with its pragma import.
7174 (Set_Finalization_Master): New routine along with a pragma import.
7175 * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
7176 Build_Finalization_Collection with Build_Finalization_Master.
7177 (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
7178 before the bodies of the predefined routines. Add comment explaining
7179 this. Replace call to Build_Finalization_Collection with
7180 Build_Finalization_Master.
7181 (Freeze_Type): Replace call to Build_Finalization_Collection with
7182 Build_Finalization_Master.
7183 (Make_Finalize_Address_Body): Comment reformatting.
7184 (Make_Predefined_Primitive_Specs): Code reformatting.
7185 (Stream_Operation_OK): Update comment mentioning finalization
7186 collections. Replace RE_Finalization_Collection with
7187 RE_Finalization_Master.
7188 * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
7189 Associated_Collection with Finalization_Master. Replace call to
7190 Build_Finalization_Collection with Build_Finalization_Master.
7191 (Expand_Allocator_Expression): Replace call to Associated_Collection
7192 with Finalization_Master. Replace call to Set_Associated_Collection with
7193 Set_Finalization_Master. Remove the generation of
7194 Set_Finalize_Address_Ptr.
7195 (Expand_N_Allocator): Replace call to Associated_Collection with
7196 Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
7197 * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
7198 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
7199 comment on usage. Replace call to Needs_BIP_Collection with
7200 Needs_BIP_Finalization_Master Remplace BIP_Collection with
7201 BIP_Finalization_Master. Update all comments which mention finalization
7202 collections. Replace Associated_Collection with
7203 Finalization_Master. Replace Build_Finalization_Collection with
7204 Build_Finalization_Master.
7205 (BIP_Formal_Suffix): Update BIP_Collection's case.
7206 (Build_Heap_Allocator): Update the related comment. Rename local
7207 variable Collect to Fin_Mas_Id and update its occurrences. Update
7208 comments which mention finalization collections. Replace
7209 Set_Associated_Collection with Set_Finalization_Master.
7210 (Expand_Call): Update the code which detects a special piece of library
7212 (Make_Build_In_Place_Call_In_Allocator): Replace the call to
7213 Add_Collection_Actual_To_Build_In_Place_Call with
7214 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
7215 which generates a call to Make_Set_Finalize_Address_Ptr_Call.
7216 (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
7217 Add_Collection_Actual_To_Build_In_Place_Call with
7218 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
7219 (Make_Build_In_Place_Call_In_Assignment): Replace call to
7220 Add_Collection_Actual_To_Build_In_Place_Call with
7221 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
7222 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
7223 * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
7224 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
7225 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
7226 Rename local variable Collect to Fin_Mas_Id and update its occurrences.
7227 Replace call to Set_Associated_Collection with Set_Finalization_Master.
7228 (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
7229 Replace the call to Associated_Collection with Finalization_Master.
7230 Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
7231 Update the way finalization master names are generated. Update the
7232 retrieval of the correct access type which will carry the pool and
7234 (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
7235 (Make_Finalize_Address_Body): Abstract types do not need
7236 Finalize_Address. Code reformatting.
7237 (Make_Finalize_Address_Stmts): Update comment on usage.
7238 (Make_Set_Finalize_Address_Ptr_Call): Removed.
7239 (Process_Declarations): Update comments.
7240 * exp_ch7.ads (Build_Finalization_Collection): Renamed to
7241 Build_Finalization_Master. Update associated comment.
7242 (Make_Set_Finalize_Address_Ptr_Call): Removed.
7243 * exp_ch13.adb: Update comments which mention finalization collections.
7244 (Expand_N_Free_Statement): Replace the call to Associated_Collection
7245 with Finalization_Master.
7246 * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
7247 create calls to routines Allocate_Any_Controlled and
7248 Deallocate_Any_Controlled.
7249 (Find_Finalize_Address): New routine.
7250 (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
7252 (Requires_Cleanup_Actions): Update the comment on freeze node
7254 * exp_util.ads: Remove comment on generated code for
7255 Build_Allocate_Deallocate_Proc. The code is now quite complex and it
7256 is better to simply look in the body.
7257 * freeze.adb (Freeze_All): Update the comment of finalization
7258 collections. Replace the call to Associated_Collection with
7259 Finalization_Master. Replace the call to Build_Finalization_Collection
7260 with Build_Finalization_Master.
7261 * impunit.adb: Add a-undesu and s-stposu to the list of units.
7262 * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
7264 * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
7265 Ada.Finalization. Add processing for children of System.Storage_Pools.
7266 * rtsfind.ads: Remove the naming of second level children of
7268 Remove Ada_Finalization_Heap_Management from the list of units.
7269 Remove subtype Ada_Finalization_Child.
7270 Remove the following subprogram entities:
7274 RE_Finalization_Collection
7275 RE_Finalization_Collection_Ptr
7276 RE_Set_Finalize_Address_Ptr
7278 Add the naming of second level children of System.Storage_Pools.
7279 Add System_Finalization_Masters and System_Storage_Pools_Subpools to
7281 Add subtype System_Storage_Pools_Child.
7282 Add the following subprogram entities to System.Finalization_Masters:
7284 RE_Finalization_Master
7285 RE_Finalization_Master_Ptr
7287 Add the following subprogram entities to System.Storage_Pools.Subpools:
7289 RE_Allocate_Any_Controlled
7290 RE_Deallocate_Any_Controlled
7291 RE_Root_Storage_Pool_With_Subpools
7295 Move the following subprogram entities from
7296 Ada.Finalization.Heap_Management to System.Finalization_Masters:
7298 RE_Add_Offset_To_Address
7303 * sem_ch3.adb (Access_Type_Declaration): Replace the call to
7304 Set_Associated_Collection with Set_Finalization_Master.
7305 * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
7306 BIP_Finalization_Master is created.
7307 * s-finmas.adb: New unit System.Finalization_Masters.
7308 * s-finmas.ads: New unit System.Finalization_Masters.
7309 * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
7310 * s-stposu.ads, s-stposu.adb: New unit implementing
7311 System.Storage_Pools.Subpools.
7313 2011-08-29 Bob Duff <duff@adacore.com>
7315 * tbuild.adb: Add assertion.
7317 2011-08-29 Thomas Quinot <quinot@adacore.com>
7319 * s-pooglo.adb: Minor reformatting.
7321 2011-08-29 Ed Schonberg <schonberg@adacore.com>
7323 * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
7324 an indexed component of a packed array whose element type is a record
7325 with a representation clause different from that of the right-hand
7326 side, generate a temporary to minimuze the number of bit-field
7327 operations generated.
7329 2011-08-29 Ed Schonberg <schonberg@adacore.com>
7331 * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
7332 declarations, and thus are likely insertion points for actions.
7334 2011-08-29 Bob Duff <duff@adacore.com>
7336 * einfo.ads: Minor comment fix.
7338 2011-08-29 Robert Dewar <dewar@adacore.com>
7340 * frontend.adb, gnat1drv.adb: Minor reformatting.
7342 2011-08-29 Tristan Gingold <gingold@adacore.com>
7344 * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
7345 * a-fihema.adb (Allocate, Deallocate): Ditto. Possibly add padding
7346 space in front of the header.
7348 2011-08-29 Johannes Kanig <kanig@adacore.com>
7350 * frontend.adb (Frontend): Exit after creating Standard package when
7351 -gnatd.H is present.
7352 * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
7355 2011-08-29 Robert Dewar <dewar@adacore.com>
7357 * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
7358 makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
7359 snames.ads-tmpl: Minor reformatting.
7361 2011-08-29 Philippe Gil <gil@adacore.com>
7363 * prj.adb (Reset_Units_In_Table): New procedure.
7364 Reset units to avoid access to freed memory.
7366 2011-08-29 Thomas Quinot <quinot@adacore.com>
7368 * get_scos.adb: When reading a P statement SCO without a pragma name
7369 (from an older ALI file), ensure that the Pragma_Name component is set
7370 to Unknown_Pragma (not left uninitialized).
7372 2011-08-29 Vincent Celier <celier@adacore.com>
7374 * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
7375 modified to compute correctly the object path of a SAL project that is
7376 extending another library project.
7377 (Write_Path_File): New procedure.
7378 * makeutl.ads (Directories): New table moved from Buildgpr
7379 (Get_Directories): New procedure moved from Buildgpr
7380 (Write_Path_File): New procedure
7381 * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
7382 paths before binding SALs, instead of Set_Ada_Paths.
7383 * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
7385 * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
7386 (Current_Source_Path_File_Of): New function
7387 (Set_Current_Object_Path_File_Of): New procedure
7388 (Current_Source_Object_File_Of): New function
7389 (Set_Current_Object_Path_File_Of): New procedure
7390 * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
7391 (Current_Source_Path_File_Of): New function
7392 (Set_Current_Object_Path_File_Of): New procedure
7393 (Current_Source_Object_File_Of): New function
7394 (Set_Current_Object_Path_File_Of): New procedure
7396 2011-08-29 Ed Schonberg <schonberg@adacore.com>
7398 * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
7399 packed entity, use a bit-field assignment only if there is no change of
7402 2011-08-29 Thomas Quinot <quinot@adacore.com>
7404 * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
7405 Is_RTU instead of using Chars comparisons.
7407 2011-08-29 Thomas Quinot <quinot@adacore.com>
7409 * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
7410 temporary object if the actual is constrained, and the discriminants
7411 read from the stream don't match.
7413 2011-08-29 Tristan Gingold <gingold@adacore.com>
7415 * sem_attr.adb, exp_attr.adb: Add handling of
7416 Attribute_System_Allocator_Alignment
7417 * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
7418 Attribute_System_Allocator_Alignment.
7419 * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
7420 * gcc-interface/targtyps.c, gcc-interface/utils2.c,
7421 gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
7422 get_target_system_allocator_alignment.
7424 2011-08-29 Arnaud Charlet <charlet@adacore.com>
7426 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
7429 2011-08-29 Arnaud Charlet <charlet@adacore.com>
7431 * exp_ch3.adb (In_Runtime): Fix typo.
7433 2011-08-29 Bob Duff <duff@adacore.com>
7435 * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
7437 2011-08-29 Ed Schonberg <schonberg@adacore.com>
7439 * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
7440 and a separate tag assignment is generated, ensure that the tag
7441 assignment is analyzed.
7443 2011-08-29 Ed Schonberg <schonberg@adacore.com>
7445 * atree.ads, atree.adb (Copy_Separate_List): New function that applies
7446 Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
7447 of statement lists that may contain local declarations.
7448 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
7449 duplicate the triggering statements needed for the expansion of this
7450 construct, when the trigger is a dispatching call to a synchronized
7453 2011-08-29 Arnaud Charlet <charlet@adacore.com>
7455 * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
7456 * bindgen.adb: Add comments.
7457 * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
7460 2011-08-29 Robert Dewar <dewar@adacore.com>
7462 * exp_attr.adb: Minor reformatting.
7463 Minor code reorganization and commenting.
7464 * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
7467 2011-08-29 Thomas Quinot <quinot@adacore.com>
7469 * get_scos.adb: Ignore chaining indicators not currently supported
7472 2011-08-29 Arnaud Charlet <charlet@adacore.com>
7474 * system.ads: Minor editing.
7476 2011-08-29 Arnaud Charlet <charlet@adacore.com>
7478 * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
7480 * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
7481 Attribute_Elab_Subp_Body.
7482 * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
7483 * sem_util.adb: Update comments.
7485 2011-08-29 Thomas Quinot <quinot@adacore.com>
7487 * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
7488 pragma name for each SCO statement corresponding to a pragma.
7490 2011-08-29 Arnaud Charlet <charlet@adacore.com>
7492 * opt.ads: Minor editing.
7494 2011-08-29 Yannick Moy <moy@adacore.com>
7496 * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
7497 that only made sense for CodePeer mode.
7499 2011-08-29 Jose Ruiz <ruiz@adacore.com>
7501 * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
7502 which is no longer used.
7503 * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
7504 handling of the 64-bit division check.
7505 * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
7507 * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
7510 2011-08-29 Thomas Quinot <quinot@adacore.com>
7512 * get_scos.adb: Minor reformatting.
7514 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
7516 * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
7517 statement list is wrapped in a block, the block is explicitly analyzed
7518 in order to properly redecorate the entities and create a servicing
7521 2011-08-29 Tristan Gingold <gingold@adacore.com>
7523 * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
7524 (Set_Zero_Cost_Handling): Remove.
7526 2011-08-29 Thomas Quinot <quinot@adacore.com>
7528 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
7530 2011-08-29 Geert Bosch <bosch@adacore.com>
7532 * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
7533 instruction, as the latter may produce -0.0, which is not a valid VAX
7535 (Neg_G): Likewise for VAX F float.
7537 2011-08-29 Robert Dewar <dewar@adacore.com>
7539 * exp_util.adb: Minor reformatting.
7541 2011-08-29 Yannick Moy <moy@adacore.com>
7543 * sem_ch3.adb: Minor comment update.
7545 2011-08-29 Thomas Quinot <quinot@adacore.com>
7547 * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
7550 2011-08-29 Thomas Quinot <quinot@adacore.com>
7552 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
7553 current statement sequence on a generic instantiation or a subprogram
7556 2011-08-29 Robert Dewar <dewar@adacore.com>
7558 * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
7561 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
7563 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
7564 Correct the check which involves the freeze node of a controlled or
7565 access-to-controlled type.
7567 2011-08-29 Geert Bosch <bosch@adacore.com>
7569 * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
7571 * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
7574 2011-08-29 Yannick Moy <moy@adacore.com>
7576 * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
7577 for every index type and component type that is not a subtype_mark.
7578 (Process_Subtype): Set Etype of subtype.
7580 2011-08-29 Robert Dewar <dewar@adacore.com>
7582 * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
7583 reorganization. Minor reformatting.
7585 2011-08-29 Steve Baird <baird@adacore.com>
7587 * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
7588 for CodePeer and ALFA modes.
7590 2011-08-29 Ed Schonberg <schonberg@adacore.com>
7592 * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
7593 that comes from an enclosing scope if it is not the renaming of an
7594 actual, to handle properly a spurious ambiguity in an instance.
7596 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
7598 * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
7599 (Alignment_Check_For_Size_Change): ...this. Add SIZE parameter and
7600 use it instead of the Esize of the first parameter.
7601 (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
7603 <Size>: Likewise. Call it for composite types on the RM size.
7605 2011-08-29 Yannick Moy <moy@adacore.com>
7607 * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
7608 * sem_util.adb (Unique_Name): Correct behaviour for names of
7611 2011-08-29 Yannick Moy <moy@adacore.com>
7613 * sem_prag.adb (Check_Precondition_Postcondition): In formal
7614 verification mode, analyze pragma expression for correctness, for
7615 pre/post on library-level subprogram, as it is not expanded later.
7617 2011-08-29 Yannick Moy <moy@adacore.com>
7619 * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
7620 in formal verification.
7622 2011-08-29 Thomas Quinot <quinot@adacore.com>
7624 * sem_util.adb: Minor reformatting.
7625 * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
7627 * par_sco.ads, par_sco.adb: Update comments.
7629 2011-08-29 Yannick Moy <moy@adacore.com>
7631 * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
7632 associated getter/setter.
7633 * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
7635 2011-08-29 Vincent Celier <celier@adacore.com>
7637 * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
7638 * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
7639 with declarations for Language_Kind and Dependency_Kind for Ada.
7640 * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
7641 (Process_Compiler): Take into account the new attributes Dependency_Kind
7643 (Check_Configuration): Check if language kind is unit based, not if the
7644 language name is Ada.
7645 (Process_Exceptions_Unit_Based): Ditto
7646 (Add_Language): Remove default additions of language and dependency kind
7647 * prj.ads: Minor comment change
7648 * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
7650 2011-08-29 Johannes Kanig <kanig@adacore.com>
7652 * debug.adb: Update comments.
7654 2011-08-24 Joseph Myers <joseph@codesourcery.com>
7656 * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
7657 (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
7658 (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
7659 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
7660 (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
7662 2011-08-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7664 * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
7665 (GNATLIBCFLAGS_FOR_C): Replace
7666 TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
7667 (gnatlib-shared-default, gnatlib-shared-dual-win32)
7668 (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
7669 (gnatlib-sjlj, gnatlib-zcx): Likewise.
7671 2011-08-07 Eric Botcazou <ebotcazou@adacore.com>
7673 * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
7675 * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
7677 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
7679 2011-08-05 Nicolas Roche <roche@adacore.com>
7681 * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
7682 libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
7684 * gcc-interface/Make-lang.in: Add support for canadian cross setting.
7686 2011-08-05 Matthew Heaney <heaney@adacore.com>
7688 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
7689 subprogram bodies declared out-of-order.
7691 2011-08-05 Yannick Moy <moy@adacore.com>
7693 * sem_util.adb (Unique_Name): only prefix with "standard" the names of
7694 entities directly in package Standard, otherwise skip the standard
7697 2011-08-05 Robert Dewar <dewar@adacore.com>
7699 * a-cbmutr.adb: Minor reformatting
7700 (Allocate_Node): refactor node allocation algorithm
7702 2011-08-05 Robert Dewar <dewar@adacore.com>
7704 * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
7705 * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
7707 (Analyze_Pragma, case Check_Policy): Ditto.
7708 * sem_prag.ads (Check_Disabled): New function
7709 * snames.ads-tmpl: Add Name_Disable.
7711 2011-08-05 Robert Dewar <dewar@adacore.com>
7713 * gnat_rm.texi: Document implementation-defined policy DISABLE for
7714 pragmas Assertion_Policy, Check_Policy, Debug_Policy.
7716 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7718 * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
7719 that appears in a generic formal part and applies to a formal
7722 2011-08-05 Robert Dewar <dewar@adacore.com>
7724 * a-cbmutr.ads: Minor reformatting.
7726 2011-08-05 Matthew Heaney <heaney@adacore.com>
7728 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
7729 to check count, check sign of value instead.
7730 * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
7731 (Copy_Subtree): allocate copy of source element
7732 (Equal_Subtree): compare elements, not access objects
7734 2011-08-05 Vincent Celier <celier@adacore.com>
7736 * gnat_ugn.texi: Fix VMS alternative.
7738 2011-08-05 Thomas Quinot <quinot@adacore.com>
7740 * sem_ch11.adb: Add comment.
7742 2011-08-05 Robert Dewar <dewar@adacore.com>
7744 * exp_util.adb: Minor comment fix.
7746 2011-08-05 Robert Dewar <dewar@adacore.com>
7748 * scng.adb (Error_Unterminated_String): Improve flag position when
7751 2011-08-05 Matthew Heaney <heaney@adacore.com>
7753 * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
7755 * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
7756 multiway tree containers.
7758 2011-08-05 Robert Dewar <dewar@adacore.com>
7760 * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
7761 * stylesw.adb: Implement -gnatyC to control comment spacing
7762 * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
7764 * usage.adb: Add line for -gnatyC.
7766 2011-08-05 Robert Dewar <dewar@adacore.com>
7768 * gnat_ugn.texi: Document -gnatyC.
7769 * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
7770 synonym for COMMENTS2).
7772 2011-08-05 Robert Dewar <dewar@adacore.com>
7774 * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
7775 a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
7776 sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
7777 a-comutr.ads, lib-xref.adb: Minor reformatting.
7779 2011-08-05 Robert Dewar <dewar@adacore.com>
7781 * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
7782 warning if there is an exception handler present.
7784 2011-08-05 Pascal Obry <obry@adacore.com>
7786 * a-iteint.ads: Fix copyright year.
7788 2011-08-05 Thomas Quinot <quinot@adacore.com>
7790 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
7791 statement SCO for a USE clause or a representation clause.
7793 2011-08-05 Yannick Moy <moy@adacore.com>
7795 * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
7796 between body and spec for stub.
7797 (Detect_And_Add_ALFA_Scope): take into account subprogram stub
7798 * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
7799 pragma precondition or postcondition, for which the enclosing
7800 subprogram or package in the AST is not the desired one, return empty.
7802 2011-08-05 Thomas Quinot <quinot@adacore.com>
7804 * g-expect.adb: Minor reformatting.
7806 2011-08-05 Bob Duff <duff@adacore.com>
7808 * a-fihema.adb: Comment out OS_Lib.
7810 2011-08-05 Matthew Heaney <heaney@adacore.com>
7812 * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
7813 (unbounded multiway tree containers) and a-iteint.ads.
7814 * a-comutr.ads, a-comutr.adb:
7815 This is the new Ada 2012 unit for unbounded multiway tree containers
7816 * a-cimutr.ads, a-cimutr.adb
7817 This is the new Ada 2012 unit for indefinite multiway tree containers
7818 * a-iteint.ads: New file.
7820 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7822 * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
7824 2011-08-05 Bob Duff <duff@adacore.com>
7826 * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
7828 * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
7830 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7832 * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
7833 general indexing aspects of Ada2012. Called when analyzing indexed
7834 components when other interpretations fail.
7835 * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
7836 in an expression context where overloading is meaningful. This excludes
7837 the occurrence in an aspect specification (efficiency only).
7838 * sem_attr.adb (Analyze_Attribute): indicate that the attributes
7839 related to iterators can be set by an attribute specification, but
7841 * sem_ch13.adb (Analyze_Aspect_Specifications): handle
7842 Constant_Indexing and Variable_Indexing.
7843 (Check_Indexing_Functions): New procedure to perform legality checks.
7844 Additional semantic checks at end of declarations.
7846 2011-08-05 Sergey Rybin <rybin@adacore.com>
7848 * tree_io.ads: Update ASIS_Version_Number because of the change of the
7849 order of calling Tree_Write/Tree_Read routines made for aspects.
7851 2011-08-05 Bob Duff <duff@adacore.com>
7853 * a-fihema.adb (Finalize): Fix race condition.
7855 2011-08-05 Yannick Moy <moy@adacore.com>
7857 * sem_ch12.adb (Analyze_Package_Instantiation,
7858 Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
7861 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7863 * sem_type.adb (Specific_Type): in an instance, the type-specific
7864 operand of an equality check that involves null may have a private
7865 type. Use full view to determine legality of construct.
7867 2011-08-05 Vincent Celier <celier@adacore.com>
7869 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
7870 delete or close the file when the call to gnatmake was successful.
7872 2011-08-05 Yannick Moy <moy@adacore.com>
7874 * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
7875 Global_Discard_Names.
7877 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7879 * sinfo.ads: comments on use of entity field for aspect specifications.
7881 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7883 * sem_ch12.adb (Reset_Entity): If the entity field of the associated
7884 node is not itself an entity but a selected component, it is a
7885 rewritten parameterless call to an en enclosing synchronized operation,
7886 and this expansion will be performed again in the instance, so there is
7887 no global information to preserve.
7889 2011-08-05 Javier Miranda <miranda@adacore.com>
7891 * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
7892 for renamings of predefined primitives.
7893 (In_Predef_Prims_DT): New subprogram.
7895 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7897 * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
7898 possible interpretation of name is a reference type, add an
7899 interpretation that is the designated type of the reference
7900 discriminant of that type.
7901 * sem_res.adb (resolve): If the interpretation imposed by context is an
7902 implicit dereference, rewrite the node as the deference of the
7903 reference discriminant.
7904 * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
7905 Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
7906 parent type or base type.
7907 * sem_ch4.adb (Process_Indexed_Component,
7908 Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
7909 Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
7910 Check for implicit dereference.
7911 (List_Operand_Interps): Indicate when an implicit dereference is
7913 * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
7915 2011-08-05 Thomas Quinot <quinot@adacore.com>
7917 * scos.ads: Update documentation of SCO table. Pragma statements can now
7918 be marked as disabled (using 'p' instead of 'P' as the statement kind).
7919 * par_sco.ads, par_sco.adb: Implement the above change.
7920 (Process_Decisions_Defer): Generate a P decision for the first parameter
7921 of a dyadic pragma Debug.
7922 * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
7924 * put_scos.adb: Code simplification based on above change.
7926 2011-08-05 Robert Dewar <dewar@adacore.com>
7928 * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
7929 bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
7930 a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
7931 prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
7933 2011-08-05 Bob Duff <duff@adacore.com>
7935 * a-stunau.ads, g-spipat.adb: Update comments.
7937 2011-08-05 Bob Duff <duff@adacore.com>
7939 * a-fihema.ads: Minor comment fix.
7940 * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
7942 (Attach, Detach): Remove some unnecessary code.
7943 (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
7945 2011-08-05 Bob Duff <duff@adacore.com>
7947 * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
7948 allocation for Objects component. This simplifies the code somewhat. It
7949 is also a little more efficient in the not-so-unusual case where there
7950 are no controlled objects allocated.
7951 Make Finalization_Started flag atomic.
7952 (Finalize): Avoid unnecessary detachment of items from the list.
7953 (pcol): Minor cleanup.
7955 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7957 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
7958 package whose name is the same as that of the generic unit, or its
7961 2011-08-05 Bob Duff <duff@adacore.com>
7963 * a-fihema.adb, a-fihema.ads: Minor comment improvements.
7964 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
7965 Minor comment fixes.
7967 2011-08-05 Arnaud Charlet <charlet@adacore.com>
7969 * make.adb (Linking_Phase): No longer need to set source search path
7970 before calling gnatlink in CodePeer mode.
7971 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
7972 gcc in CodePeer mode, since the binder generated file no longer has a
7974 * switch.ads, switch.adb (Is_Language_Switch): Removed.
7975 * switch-c.adb: Update comment.
7977 2011-08-05 Thomas Quinot <quinot@adacore.com>
7979 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
7981 2011-08-05 Nicolas Roche <roche@adacore.com>
7983 * gnat_ugn.texi: Fix minor syntax error issue.
7985 2011-08-05 Vincent Celier <celier@adacore.com>
7987 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
7988 delete or close the file when the call to gnatmake returns a non
7989 successful return code.
7991 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7993 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
7994 check, indicate that the copy of the original node does not come from
7995 source, to prevent an infinite recursion of the expansion.
7997 2011-08-05 Johannes Kanig <kanig@adacore.com>
7999 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
8000 VC generation for subprogram bodies.
8002 2011-08-05 Yannick Moy <moy@adacore.com>
8005 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
8006 the base type with the smallest allowed base type.
8008 2011-08-05 Sergey Rybin <rybin@adacore.com>
8010 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
8013 2011-08-05 Ed Schonberg <schonberg@adacore.com>
8015 * sem_ch12.ads: minor comment updates.
8017 2011-08-05 Ed Schonberg <schonberg@adacore.com>
8019 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
8020 instantiation and a formal package the compiler generates a package
8021 renaming declaration so that the generic name within the declaration
8022 is interpreted as a renaming of the instance. At the end of a formal
8023 package declaration, this renaming must become invisible.
8025 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
8027 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
8028 comparison and rely on concrete entities instead.
8030 2011-08-05 Ed Schonberg <schonberg@adacore.com>
8032 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
8033 and discriminants, to indicate that the type has an access discriminant
8034 that supports implicit dereference.
8035 * snames.ads-tmpl: Add names of aspects and attributes related to
8036 Ada2012 iterators: constant_indexing, default_iterator,
8037 iterator_element, implicit_dereference, variable_indexing.
8038 * aspects.ads, aspects.adb: entries for iterator-related aspects.
8039 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
8040 iterator-related aspects.
8041 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
8043 2011-08-05 Sergey Rybin <rybin@adacore.com>
8045 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
8046 metrics in gnatmetric to cover new kinds of coupling mentrics.
8048 2011-08-05 Steve Baird <baird@adacore.com>
8050 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
8051 of calling the user-defined main subprogram.
8052 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode
8053 is set) Call_Main_Subprogram ahead of, as opposed to
8055 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
8056 generation of a "with" of the user-defined main subprogram.
8057 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
8058 (which is now called from Gen_Main instead).
8060 2011-08-05 Emmanuel Briot <briot@adacore.com>
8062 * projects.texi: Added reference to the Makefile package.
8064 2011-08-05 Thomas Quinot <quinot@adacore.com>
8066 * exp_ch7.adb: Minor comment rewording.
8068 2011-08-05 Ed Falis <falis@adacore.com>
8070 * env.c: Fix comment.
8072 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
8074 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
8075 character comparison and rely on concrete entities instead.
8077 2011-08-05 Ed Schonberg <schonberg@adacore.com>
8079 * sem_ch3.adb: (Check_Private_Overriding): better error message,
8080 suggested by AI95-0068.
8082 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
8084 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
8085 the two potential initialization calls. This accounts for any
8086 access-before-elaboration checks which may precede the initialization
8088 (Next_Suitable_Statement): New routine. Returns the next real statement
8089 after the input node while skipping generated checks.
8090 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
8091 with comment on usage.
8092 Do not generate Elaborate_All when the trigger is a finalization call
8093 coming from a type init proc.
8094 (Check_Elab_Call): Propagate the initialization procedure context to
8095 subsequent calls to Check_A_Call.
8096 (Check_Internal_Call_Continue): Propagate the initialization procedure
8097 context to subsequent calls to Check_Elab_Call.
8098 (Is_Finalization_Procedure): New routine. Returns True if the input
8099 entity denotes a [Deep_]Finalize routine.
8100 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
8101 along with comment on usage.
8103 2011-08-05 Vadim Godunko <godunko@adacore.com>
8105 * s-atocou.ads: Add list of supported platforms.
8107 2011-08-05 Yannick Moy <moy@adacore.com>
8109 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
8111 * opt.ads (Disable_ALI_File): new Boolean flag
8112 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
8114 2011-08-05 Ed Falis <falis@adacore.com>
8116 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
8117 environ is properly defined.
8119 2011-08-05 Vincent Celier <celier@adacore.com>
8121 * make.adb (Compilation_Phase): Exit immediately when all objects have
8122 been found up to date, to avoid multiple exit messages.
8123 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
8124 same project for languages with no compiler.
8125 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
8127 2011-08-05 Robert Dewar <dewar@adacore.com>
8129 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
8130 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
8131 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
8132 s-atocou-builtin.adb: Minor reformatting.
8134 2011-08-05 Yannick Moy <moy@adacore.com>
8136 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
8137 if the node to wrap is a pragma check, this node and enclosed
8138 expression are not expanded, so do not apply any transformations here.
8139 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
8140 introducing transient scopes.
8142 2011-08-05 Jose Ruiz <ruiz@adacore.com>
8144 * adaint.c (__gnat_set_writable, __gnat_set_readable,
8145 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
8146 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
8147 routine is available, so we use the default implementation of these
8149 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
8150 support for copying attributes on VxWorks 6.
8152 2011-08-05 Yannick Moy <moy@adacore.com>
8154 * debug.adb: Remove use of -gnatd.D.
8155 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
8156 * opt.ads: Simplify variables for ALFA mode, to keep one only
8157 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
8160 2011-08-05 Vincent Celier <celier@adacore.com>
8162 * prj-conf.adb (Do_Autoconf): Look also for --RTS in
8163 Builder'Default_Switches.
8165 2011-08-05 Vincent Celier <celier@adacore.com>
8167 * makeusg.adb: Add lines for --create-map-file switches.
8169 2011-08-05 Ed Schonberg <schonberg@adacore.com>
8171 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
8172 profile is incomplete and the full view is available, replace it with
8174 * sem_ch6.adb (Possible_Freeze): if a type in the profile is
8175 incomplete, freezing the subprogram is delayed until the full view is
8177 * sem_type.adb (Disambiguate): an ambiguity between a user-defined
8178 fixed-point multiplication operator and the predefined operator is
8179 resolved in favor of the user-defined one.
8181 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8183 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
8186 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8188 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
8189 whether a type lacks user-defined Read or Write operations, or has a
8190 component that lacks them.
8191 * sem_attr.adb (Check_Stream_Attribute): if restriction
8192 No_Default_Stream_Attributes is active, verify that all subcomponent
8193 types of the target have user-defined stream operations, and report
8195 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
8196 * exp_strm.adb: Build_Elementary_Input_Call,
8197 Build_Elementary_Write_Call): remove checks for restriction
8198 No_Default_Stream_Attributes, now checked in semantics.
8200 2011-08-04 Vincent Celier <celier@adacore.com>
8202 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
8203 switches on the command line, look for all valid --RTS switches in the
8204 Builder switches and for each language use the first runtime name found
8205 to invoke gprconfig.
8206 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
8207 command line and there is no auto-configuration.
8208 (Runtime_Name_Set_For): New function.
8210 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8212 * exp_ch7.adb (Build_Object_Declarations): Do not generate the
8213 elaborate initialization expression for variable Abort when processing
8214 a package body or a declaration.
8215 (Create_Finalizer): Propagate the package context when creating the
8216 exception-related variables.
8217 * exp_ch7.ads (Build_Object_Declarations): New formal parameter
8218 For_Package along with usage comment.
8220 2011-08-04 Arnaud Charlet <charlet@adacore.com>
8222 * gcc-interface/Makefile.in: Clean up targets.
8223 Enable new package for atomic counters and copy-on-write implementation
8224 of unbounded strings on x86 platforms.
8225 * gcc-interface/Make-lang.in: Update dependencies.
8227 2011-08-04 Robert Dewar <dewar@adacore.com>
8229 * exp_ch7.adb: Minor reformatting.
8231 2011-08-04 Robert Dewar <dewar@adacore.com>
8233 * exp_strm.adb: Minor reformatting.
8235 2011-08-04 Vadim Godunko <godunko@adacore.com>
8237 * s-atocou.adb: Replace by dummy version and use on targets where atomic
8238 operations are not supported.
8239 * s-atocou-builtin.adb: Renamed from s-atocou.adb.
8240 * s-atocou-x86.adb: New file.
8241 * Makefile.rtl: Add s-atocou.o file
8243 2011-08-04 Arnaud Charlet <charlet@adacore.com>
8245 * make.adb (Compile): Move setting of CodePeer_Mode to ...
8246 (Compilation_Phase): ... here.
8247 (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
8249 2011-08-04 Thomas Quinot <quinot@adacore.com>
8251 * Make-generated.in: Fix minor typo in comment.
8253 2011-08-04 Thomas Quinot <quinot@adacore.com>
8255 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
8258 2011-08-04 Robert Dewar <dewar@adacore.com>
8260 * a-coinho.adb: Minor reformatting.
8262 2011-08-04 Robert Dewar <dewar@adacore.com>
8264 * a-coinho.ads: Minor reformatting.
8266 2011-08-04 Vadim Godunko <godunko@adacore.com>
8268 * s-atocou.ads, s-atocou.adb: New files.
8269 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
8270 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
8271 direct use of GCC's atomic builtins and replace them by use of new
8272 atomic counter package.
8274 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8276 * exp_strm.adb: better error message for No_Default_Stream_Attributes.
8278 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8280 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
8281 with a call to Get_External_Tag.
8282 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
8283 subprogram usage. Remove the guard against package declarations and
8284 bodies since Build_Cleanup_Statements is no longer invoked in that
8286 (Build_Components): Initialize Tagged_Type_Stmts when the context
8287 contains at least one library-level tagged type.
8288 (Build_Finalizer): New local variables Has_Tagged_Types and
8289 Tagged_Type_Stmts along with associated comments on usage. Update the
8290 logic to include tagged type processing.
8291 (Create_Finalizer): Insert all library-level tagged type unregistration
8292 code before the jump block circuitry.
8293 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
8294 (Expand_N_Package_Declaration): Remove the call to
8295 Build_Cleanup_Statements.
8296 (Process_Tagged_Type_Declaration): New routine. Generate a call to
8297 unregister the external tag of a tagged type.
8298 (Processing_Actions): Reimplemented to handle tagged types.
8299 (Process_Declarations): Detect the declaration of a library-level
8300 tagged type and carry out the appropriate actions.
8301 (Unregister_Tagged_Types): Removed. The machinery has been directly
8302 merged with Build_Finalizer.
8304 2011-08-04 Robert Dewar <dewar@adacore.com>
8306 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
8307 gnatls.adb, exp_ch3.adb: Minor reformatting.
8309 2011-08-04 Marc Sango <sango@adacore.com>
8311 * sem_attr.adb (Analyze_Attribute): Replace the message
8312 "invisible attribute of}" of the spark restriction violation in
8313 attribute reference by the simple message "invisible attribute of type".
8314 Indeed, the node value Error_Msg_Node_1 used is in conflit with the
8315 two insertion characters: '&' and '}'.
8317 2011-08-04 Vadim Godunko <godunko@adacore.com>
8319 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
8320 * a-coinho.ads, a-coinho.adb: New file.
8321 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
8323 2011-08-04 Nicolas Roche <roche@adacore.com>
8325 * alfa_test.adb: Not all ali files are containing alfa information even
8326 if compiled with -gnatd.F. So suppress warning about missing ALFA
8329 2011-08-04 Yannick Moy <moy@adacore.com>
8331 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
8333 * put_alfa.adb: Check that scope name is not empty.
8335 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8337 * exp_ch3.adb (Stream_Operation_Ok): new predicate
8338 Needs_Elementary_Stream_Operation, to determine whether user-defined
8339 Read and Write attributes are available for the elementary components
8340 of the given type. If only the predefined attributes are available,
8341 then when restriction No_Default_Stream_Attributes is active the
8342 predefined stream attributes for the composite type cannot be created.
8344 2011-08-04 Robert Dewar <dewar@adacore.com>
8346 * bindgen.adb: Fix obsolete comments and names from Ada/C days.
8347 Put routines in alpha order
8349 2011-08-04 Jose Ruiz <ruiz@adacore.com>
8351 * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
8352 * gcc-interface/Make-lang.in: Update dependencies.
8354 2011-08-04 Arnaud Charlet <charlet@adacore.com>
8356 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
8357 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
8360 2011-08-04 Robert Dewar <dewar@adacore.com>
8362 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
8363 lib-xref-alfa.adb: Minor reformatting.
8365 2011-08-04 Marc Sango <sango@adacore.com>
8367 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
8368 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
8369 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
8372 2011-08-04 Tristan Gingold <gingold@adacore.com>
8374 * bindgen.adb (Gen_Adainit_C): Remove.
8375 (Gen_Adafinal_C): Ditto.
8376 (Gen_Elab_Externals_C): Ditto.
8377 (Gen_Elab_Calls_C): Ditto.
8378 (Gen_Elab_Order_C): Ditto.
8379 (Gen_Elab_Defs_C): Ditto.
8380 (Gen_Finalize_Library_C): Ditto.
8381 (Gen_Finalize_Library_Defs_C): Ditto.
8382 (Gen_Main_C): Ditto.
8383 (Gen_Output_File_C): Ditto.
8384 (Gen_Restrictions_C): Ditto.
8385 (Gen_Versions_C): Ditto.
8386 (Write_Info_Ada_C): Ditto.
8387 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
8388 (Gen_Output_File): Do not force Ada_Bind_File anymore.
8389 Always call Gen_Output_File_Ada.
8390 * gnatlink.adb (Begin_Info): Now a constant.
8392 (Ada_Bind_File): Remove
8393 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases.
8394 * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
8395 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
8396 * opt.ads (Ada_Bind_File): Remove.
8398 2011-08-04 Thomas Quinot <quinot@adacore.com>
8400 * projects.texi: Document target-specific directory in default project
8403 2011-08-04 Thomas Quinot <quinot@adacore.com>
8405 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
8408 2011-08-04 Yannick Moy <moy@adacore.com>
8410 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
8411 opt.ads, lib-xref.ads: Code clean up.
8413 2011-08-04 Yannick Moy <moy@adacore.com>
8415 * gnat_rm.texi: Update description of Test_Case
8416 * gnat_ugn.texi: Typo.
8418 2011-08-04 Ed Falis <falis@adacore.com>
8420 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
8422 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8424 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
8425 it is of type Root_Controlled. This action eliminates fields Prev and
8426 Next from type equality.
8428 2011-08-04 Yannick Moy <moy@adacore.com>
8430 * lib-xref-alfa.adb: Correct typo.
8432 2011-08-04 Matthew Heaney <heaney@adacore.com>
8434 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
8437 2011-08-04 Yannick Moy <moy@adacore.com>
8439 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
8440 (Analyze_Pragma): allow static string expression for name of Test_Case,
8441 instead of simply string literals.
8442 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
8445 2011-08-04 Vincent Celier <celier@adacore.com>
8447 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
8448 case suffixes to find truncated main sources.
8450 2011-08-04 Tristan Gingold <gingold@adacore.com>
8452 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
8453 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
8454 (Compute_Current_Task): Ditto.
8456 2011-08-04 Tristan Gingold <gingold@adacore.com>
8458 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
8460 2011-08-04 Yannick Moy <moy@adacore.com>
8462 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
8463 library-level constant.
8464 (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
8465 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
8466 used as selector of parameter association, in ALFA mode.
8468 2011-08-04 Robert Dewar <dewar@adacore.com>
8470 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
8471 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
8474 2011-08-04 Arnaud Charlet <charlet@adacore.com>
8476 * make.adb (Linking_Phase): Set source search path before calling
8477 gnatlink in CodePeer mode.
8479 2011-08-04 Javier Miranda <miranda@adacore.com>
8481 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
8482 Remove code which takes care of building TSDs.
8483 * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
8484 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
8485 the accessibility check in VM targets.
8486 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
8487 (Building_Static_DT): Now returns false for VM targets.
8488 (Build_VM_TSDs): Removed.
8489 (Expand_Interface_Conversion): Generate missing runtime check for
8490 conversions to interface types whose target type is unknown at compile
8492 (Make_VM_TSD): Add missing code to disable the generation of calls to
8493 Check_TSD if the tagged type is not defined at library level, or not
8494 has a representation clause specifying its external tag, or -gnatdQ is
8496 * exp_disp.ads (Build_VM_TSDs): Removed.
8497 (Make_VM_TSDs): Spec relocated from exp_disp.adb
8498 * sem_disp.adb (Check_Dispatching_Operation): No code required to
8499 register primitives in the dispatch tables in VM targets.
8500 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
8501 initialization of class-wide interface objects in VM targets.
8502 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
8505 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
8507 * gnatlink.adb (Gnatlink): Correct missleading error message displayed
8508 when dotnet-ld cannot be found.
8510 2011-08-04 Arnaud Charlet <charlet@adacore.com>
8512 * bindgen.adb: Simplify significantly generation of binder body file in
8514 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
8515 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
8518 2011-08-04 Yannick Moy <moy@adacore.com>
8520 * sem_prag.adb, sem.ads: Code cleanup.
8522 2011-08-04 Tristan Gingold <gingold@adacore.com>
8524 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
8525 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
8526 results if possible.
8527 * s-stusta.adb (Print): Adjust after changes in s-stausa.
8528 * gnat_ugn.texi: Update dynamic stack usage section.
8530 2011-08-04 Steve Baird <baird@adacore.com>
8532 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
8533 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
8534 contains only a call to the user-defined main subprogram.
8535 (Gen_Main_Ada) - If CodePeer_Mode is set, then
8536 call the "wrapper" subprogram instead of directly
8537 calling the user-defined main subprogram.
8539 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8541 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
8542 alternatives of a case statement for controlled objects. Rename local
8543 variable A to Dead_Alt.
8544 (Expand_N_If_Statement): Check the then and else statements of an if
8545 statement for controlled objects. Check the then statements of all
8546 elsif parts of an if statement for controlled objects.
8547 (Expand_N_Loop_Statement): Check the statements of a loop for controlled
8549 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
8550 detects a loop associated with the expansion of an array object.
8551 Augment the processing of the loop statements to account for a possible
8552 wrap done by Process_Statements_For_Controlled_Objects.
8553 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
8554 statements and abortable part of an asynchronous select for controlled
8556 (Expand_N_Conditional_Entry_Call): Check the else statements of a
8557 conditional entry call for controlled objects.
8558 (Expand_N_Selective_Accept): Check the alternatives of a selective
8559 accept for controlled objects.
8560 (Expand_N_Timed_Entry_Call): Check the entry call and delay
8561 alternatives of a timed entry call for controlled objects.
8562 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
8563 exception handler for controlled objects.
8564 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
8565 Add formal parameter Nested_Constructs along with its associated
8567 (Requires_Cleanup_Actions (Node_Id)): Update all calls to
8568 Requires_Cleanup_Actions.
8569 (Process_Statements_For_Controlled_Objects): New routine.
8570 * exp_util.ads (Process_Statements_For_Controlled_Objects): New
8571 routine. Inspect a node which contains a non-handled sequence of
8572 statements for controlled objects. If such an object is found, the
8573 statements are wrapped in a block.
8575 2011-08-04 Bob Duff <duff@adacore.com>
8577 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
8578 need to compare with Class_Wide_Type (T2), in order to get at the
8579 original class-wide type node.
8580 * sem_type.ads (Covers): Improve the comment.
8581 * einfo.ads (Class_Wide_Type): Improve the comment.
8582 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
8583 the type of the Deref.
8585 2011-08-04 Yannick Moy <moy@adacore.com>
8587 * gnat_rm.texi: Document that Test_Case pragma can only appear on
8588 separate declarations.
8589 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
8590 check identifier of pragma argument.
8591 (Chain_TC): check that no other test case associated to the same entity
8592 share the same name.
8593 (Check_Test_Case): disallow test case inside subprogram body
8594 (Analyze_Pragma): correct call to check identifier and not argument
8595 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
8596 function gets name from test case pragma.
8598 2011-08-04 Yannick Moy <moy@adacore.com>
8600 * gnat_rm.texi: Document new pragma and aspect.
8601 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
8602 (No_Duplicates_Allowed): new constant array defining whether duplicates
8603 aspects of each kind can appear on the same declaration.
8604 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
8605 field, which points to a node holding the previous Spec_PPC_List.
8606 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
8607 through the indirection with Contract.
8608 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
8609 * par-prag.adb (Prag): do nothing on Test_Case pragma
8610 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
8612 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
8613 component Ensures of Test_Case.
8614 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
8615 (Analyze_Generic_Subprogram_Declaration,
8616 Analyze_Subprogram_Instantiation,
8617 Analyze_Abstract_Subprogram_Declaration,
8618 Analyze_Subprogram_Body_Helper,
8619 Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
8620 insert contract in subprogram node at point of definition
8622 (Aspect_Loop): do not raise error on duplicate Test_Case aspect
8623 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
8624 corresponding pragma
8625 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
8626 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
8627 similar to the analysis of pre/post
8628 (Derive_Subprogram): insert contract in subprogram node at point of
8630 * sem_prag.adb, sem_prag.ads
8631 (Check_Arg_Is_String_Literal, Check_Identifier):
8632 new checking procedures to be called in treatment of pragmas
8633 (Check_Test_Case): new procedure to check that a Test_Case aspect or
8634 pragma is well-formed. This does not check currently that 'Result is
8635 used only in the Ensures component of a Test_Case.
8636 (Analyze_Pragma): add case for Test_Case
8637 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
8638 components of a Test_Case.
8639 (Preanalyze_TC_Args): new procedure to preanalyze the boolean
8640 expressions in the 3rd (and 4th if present) arguments of a Test_Case
8641 pragma, treated as spec expressions.
8642 (Sig_Flags): add value -1 for Test_Case.
8643 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
8644 Get_Requires_From_Test_Case_Pragma): getters for both expression
8645 components of a Test_Case.
8646 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
8647 indirection between an entry or [generic] subprogram entity and its
8648 pre/post + test-cases.
8649 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
8650 get/set for fields of an N_Contract node.
8651 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
8652 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
8653 names and pragma for Test_Case.
8654 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
8656 2011-08-04 Vincent Celier <celier@adacore.com>
8658 * gnat_ugn.texi: Improve documentation of gnatmake switch
8659 --source-info-file=.
8661 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8663 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
8664 type). Initialize Atyp to the appropriate type which is later checked
8665 for completion. Rewrite the assertion associated with private type
8668 2011-08-04 Ed Falis <falis@adacore.com>
8670 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
8671 initialize the number of CPUs.
8673 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8675 * sem_type.adb (Disambiguate): New subsidiary routine
8676 In_Same_Declaration_List, to implement AI05-0020: a user-defined
8677 equality on an anonymous access type whose designated type is private
8678 does not lead to an ambiguity with the universal access equality
8679 operator in the body or child units of the defining package. The same
8680 is true for a multiplication operator on a private type completed with
8683 2011-08-04 Javier Miranda <miranda@adacore.com>
8685 * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
8686 (Normalize_Scalars_Config): Removed.
8688 (Register_Opt_Config_Switches): Remove registering config values of
8689 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
8690 (Restore_Opt_Config_Switches): Remove code which restores the values of
8691 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
8692 Init_Or_Norm_Scalars.
8693 (Save_Opt_Config_Switches): Remove code which saves values of
8694 Init_Or_Norm_Scalars and Normalize_Scalars.
8695 (Set_Opt_Config_Switches): Remove code which restores config values of
8696 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
8697 Init_Or_Norm_Scalars.
8699 2011-08-04 Yannick Moy <moy@adacore.com>
8701 * frontend.adb (Frontend): remove previous patch to avoid full
8702 qualification in ALFA mode.
8703 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
8704 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
8705 unique name for an entity, which could be used to identify the entity
8706 across compilation units.
8708 2011-08-04 Thomas Quinot <quinot@adacore.com>
8711 (Initialize_Default_Project_Path): Add target specific directory
8712 ($prefix/$target/lib/gnat) in front of project path in all cases
8713 (making gnatmake's behaviour consistent with gprbuild).
8714 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
8715 Pass target name from Sdefault to project subsystem.
8716 * gnatls.adb: Show new target specific default project directory.
8718 2011-08-04 Johannes Kanig <kanig@adacore.com>
8720 * cstand.adb: Add Information to Identifier in Standard
8721 (Identifer_For): Set Entity to the corresponding entity
8723 2011-08-04 Sergey Rybin <rybin@adacore.com>
8725 * gnat_ugn.texi: Update doc on gnatcheck.
8727 2011-08-04 Yannick Moy <moy@adacore.com>
8729 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
8732 2011-08-04 Yannick Moy <moy@adacore.com>
8734 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
8735 performing expansion.
8736 * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
8737 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
8738 it is not called in ALFA mode.
8740 2011-08-04 Emmanuel Briot <briot@adacore.com>
8742 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
8743 after all, so removed.
8745 2011-08-04 Sergey Rybin <rybin@adacore.com>
8747 * vms_data.ads: Add missing VMS qualifiers.
8749 2011-08-04 Emmanuel Briot <briot@adacore.com>
8751 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
8752 the list of files on the command line after processing it through
8755 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8757 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
8758 processing for .NET/JVM. These targets can now benefit from
8759 Raise_From_Controlled_Operation and they share the same processing with
8761 (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
8762 These targets need transient scopes in order to properly finalize short
8763 lived controlled objects.
8764 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
8765 NET/JVM. These targets can now benefit from
8766 Raise_From_Controlled_Operation and they share the same processing with
8769 2011-08-04 Geert Bosch <bosch@adacore.com>
8771 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
8773 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8775 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
8776 Expand_Record_Aggregate, to determine whether aggregate must be
8777 expanded into assignments. This is the case if the ancestor part is
8778 private, regarless of the setting of the flag Has_Private_Ancestor.
8780 2011-08-04 Ed Falis <falis@adacore.com>
8782 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
8784 2011-08-04 Bob Duff <duff@adacore.com>
8786 * sinfo.ads: Fix comment.
8788 2011-08-04 Steve Baird <baird@adacore.com>
8790 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
8791 choose a package name in much the same way as is
8792 done for JGNAT when VM_Target /= No_VM, except that
8793 a slightly more distinctive prefix string is used.
8795 2011-08-04 Emmanuel Briot <briot@adacore.com>
8797 * makeutl.adb (Complete_Mains): no longer accept unit names on the
8798 gnatmake command line.
8799 This behavior was never documented (and was supported only because of
8800 an early bug in the code). This case might lead to ambiguous cases
8801 (between unit names and truncated base names without suffixes).
8803 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8805 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
8806 Remove the external tag of a tagged type from the internal hash table.
8807 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
8808 expanded usage of the routine. Strenghten the check for Is_Master. Add
8809 processing for tagged types.
8810 (Build_Finalizer): Create all the necessary lists used in finalizer
8811 creation when the processed context is a package that may contain
8813 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
8814 Requires_Cleanup_Actions.
8815 (Expand_N_Package_Body): Package bodies may need clean up code
8816 depending on whether they contain tagged types.
8817 (Expand_N_Package_Declaration): Package declarations may need clean up
8818 code depending on whether they contain tagged types.
8819 (Unregister_Tagged_Types): New routine. Search through a list of
8820 declarations or statements, looking for non-abstract Ada tagged types.
8821 For each such type, generate code to unregister the external tag.
8822 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
8823 Requires_Cleanup_Actions.
8824 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
8825 through a list of declarations or statements looking for non-abstract
8826 Ada tagged types or controlled objects.
8827 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
8828 Requires_Cleanup_Actions.
8829 (Has_Controlled_Objects (List_Id, Boolean)): Removed.
8830 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
8833 2011-08-04 Vincent Celier <celier@adacore.com>
8835 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
8836 has Ada sources, not project Project, because if the root project
8837 Project has no sources of its own, all projects will be deemed without
8840 2011-08-04 Gary Dismukes <dismukes@adacore.com>
8842 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
8843 of the No_Param_Proc acc-to-subp type used for initialization of
8844 __gnat_finalize_library_objects so that it's declared at library level
8845 rather than nested inside of the adainit routine.
8847 2011-08-04 Javier Miranda <miranda@adacore.com>
8849 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
8850 if the tagged type has a representation clause which specifies its
8853 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8855 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
8856 Remove previous procedure with that name.
8857 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
8859 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
8860 subtype mark, the ancestor cannot have unknown discriminants.
8861 (Resolve_Record_Aggregate): if the type has invisible components
8862 because of a private ancestor, the aggregate is illegal.
8864 2011-08-04 Vincent Celier <celier@adacore.com>
8866 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
8867 account switches -gnat2005, -gnat12 and -gnat2012.
8869 2011-08-04 Bob Duff <duff@adacore.com>
8871 * s-tasdeb.ads: Minor comment fix.
8873 2011-08-04 Arnaud Charlet <charlet@adacore.com>
8875 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
8877 * switch.ads, switch.adb (Is_Language_Switch): New function.
8879 2011-08-04 Vincent Celier <celier@adacore.com>
8881 * switch-c.adb: Minor comment addition.
8883 2011-08-04 Vincent Celier <celier@adacore.com>
8885 * vms_conv.adb (Process_Argument): Fail graciously when qualifier
8886 ending with '=' is followed by a space (missing file name).
8888 2011-08-04 Pascal Obry <obry@adacore.com>
8890 * g-regist.ads: Fix size of HKEY on x86_64-windows.
8892 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8894 * sem_ch12.adb (Analyze_Associations): New routine
8895 Check_Overloaded_Formal_Subprogram to reject a formal package when
8896 there is a named association or a box initialisation for an overloaded
8897 formal subprogram of the corresponding generic.
8899 2011-08-04 Yannick Moy <moy@adacore.com>
8901 * alfa.ads (ALFA_Xref_Record): add component for type of entity
8902 * get_alfa.adb, put_alfa.adb: Read and write new component of
8904 * lib-xref-alfa.adb (Collect_ALFA): generate new component.
8906 2011-08-04 Pascal Obry <obry@adacore.com>
8908 * urealp.adb: Minor reformatting.
8910 2011-08-04 Tristan Gingold <gingold@adacore.com>
8912 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
8913 Handle the case when Cleanup_Protected_Object returns Empty.
8915 2011-08-04 Yannick Moy <moy@adacore.com>
8917 * frontend.adb (Frontend): only qualify names in non-ALFA mode
8919 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8921 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
8922 call, ignore functions.
8924 2011-08-04 Geert Bosch <bosch@adacore.com>
8926 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
8929 2011-08-04 Emmanuel Briot <briot@adacore.com>
8931 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
8932 as an index for Builder'Switches. This conforms to the documentation.
8933 * make.adb (Insert_Project_Sources): avoid duplicate code
8935 2011-08-04 Emmanuel Briot <briot@adacore.com>
8937 * makeutl.adb (Complete_Mains): if the user has passed a relative file
8938 name on the command line (for instance "../dummy"), never assume it can
8941 2011-08-04 Tristan Gingold <gingold@adacore.com>
8943 * bindgen.adb: Remove code the reference or create the
8944 Break_Start/__gnat_break_start procedure.
8945 * s-stalib.adb (Break_Start): Removed.
8947 2011-08-04 Emmanuel Briot <briot@adacore.com>
8949 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
8950 shared with gprbuild.
8952 2011-08-04 Yannick Moy <moy@adacore.com>
8954 * par-ch4.adb (P_Primary): preferentially issue an error message about
8955 a missing parenthesis arount a conditional or case expression in Ada
8956 2012 mode, if we detect that the alignment is not correct for a
8959 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8961 * exp_ch7.adb (Process_Declarations): Do not consider the result of a
8962 tag-to-class-wide conversion as needing finalization actions.
8963 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
8964 a tag-to-class-wide conversion as needing finalization actions.
8965 (Is_Finalizable_Transient): The result of a tag-to-class-wide
8966 conversion does not need finalization actions.
8967 (Is_Tag_To_CW_Conversion): New routine.
8968 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
8969 whether an object is the result of a tag-to-class-wide conversion.
8971 2011-08-04 Yannick Moy <moy@adacore.com>
8973 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
8974 the left-hand-side and right-hand-side of a conjunct are inserted when
8975 translating a pre- or postcondition
8976 * sem_ch6.adb: Correct typo in comment
8978 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8980 * gnat_rm.texi: Ravenscar does not prohibit dependence on
8981 Unchecked_Conversion and Unchecked_Deallocation.
8983 2011-08-04 Thomas Quinot <quinot@adacore.com>
8985 * make.adb: Minor reformatting.
8987 2011-08-04 Emmanuel Briot <briot@adacore.com>
8989 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
8990 sources in the project and its imported projects, but not in the whole
8993 2011-08-04 Emmanuel Briot <briot@adacore.com>
8995 * make.adb: Remove debug trace.
8997 2011-08-04 Vincent Celier <celier@adacore.com>
8999 * makeutl.adb (Do_Complete): Get the absolute path name of a relative
9000 path in canonical form, to be able to compare path names on platforms
9001 such as Windows or Darwin.
9003 2011-08-04 Thomas Quinot <quinot@adacore.com>
9005 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
9006 For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
9007 * scos.ads: Update documentation accordingly.
9008 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
9011 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9013 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
9014 attribute only if prefix type is scalar.
9016 2011-08-04 Emmanuel Briot <briot@adacore.com>
9018 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
9019 in gnatmake for specifying mains on the command line that do not belong
9020 to the main project. These mains must currently all belong to the same
9022 (Ultimate_Extension_Of): removed, since duplicated
9023 Ultimate_Extending_Project.
9025 2011-08-04 Arnaud Charlet <charlet@adacore.com>
9027 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
9029 (CodePeer_Mode_String): New.
9030 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
9032 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
9033 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
9034 mode, since no useful elaboration subprogram is needed by CodePeer.
9035 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
9036 In this mode, compile binder file with -gnatC and do stop after this
9039 2011-08-04 Vincent Celier <celier@adacore.com>
9041 * exp_ch7.adb: Minor comment fix.
9043 2011-08-04 Robert Dewar <dewar@adacore.com>
9045 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
9046 exp_ch4.adb, makeutl.adb: Minor reformatting.
9048 2011-08-04 Emmanuel Briot <briot@adacore.com>
9050 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
9051 Create several new subprograms to move code out of Make. This makes the
9052 code more readable, removes code duplication, and is a preparation work
9053 for adding support for aggregate projects.
9055 2011-08-04 Tristan Gingold <gingold@adacore.com>
9057 * s-po32gl.ads, s-po32gl.adb: New files.
9058 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
9059 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
9060 (Build_Finalization_Collection): Use it.
9061 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
9062 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
9064 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
9065 * gcc-interface/Make-lang.in: Update dependencies.
9067 2011-08-04 Emmanuel Briot <briot@adacore.com>
9069 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
9072 2011-08-04 Emmanuel Briot <briot@adacore.com>
9074 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
9075 command line is not a file name, also check whether it could be a unit
9078 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
9080 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
9081 the header of the finalization routine.
9082 If the unit has no finalizer but is a body whose spec has one, then
9083 generate the decrement of the elaboration entity only.
9084 If the unit has a finalizer and is a spec, then do not generate the
9085 decrement of the elaboration entity.
9086 (Gen_Finalize_Library_C): Likewise.
9088 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9090 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
9091 (Bounds_Size_Expression): Removed.
9092 (Double_Alignment_Of): New subsidiary routine.
9093 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
9094 for a hole in the dope vector of unconstrained arrays due to different
9095 index and element alignments.
9097 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9099 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
9100 raise program_error because body has not been seen yet.
9102 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9104 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
9107 2011-08-04 Vincent Celier <celier@adacore.com>
9109 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
9111 2011-08-04 Yannick Moy <moy@adacore.com>
9113 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
9114 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
9116 2011-08-04 Thomas Quinot <quinot@adacore.com>
9118 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
9119 instantiation in RCI.
9121 2011-08-04 Emmanuel Briot <briot@adacore.com>
9123 * make.adb: Share more code with gprbuild
9125 2011-08-04 Emmanuel Briot <briot@adacore.com>
9127 * projects.texi: Added documentation for the IDE'Gnat project file
9130 2011-08-04 Nicolas Roche <roche@adacore.com>
9132 * gnat_rm.texi: Minor editing.
9134 2011-08-04 Javier Miranda <miranda@adacore.com>
9136 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
9137 and the library case for VM targets.
9138 (Gen_Adainit_Ada): Likewise.
9140 2011-08-04 Robert Dewar <dewar@adacore.com>
9142 * g-altive.ads: Minor comment updates.
9143 * prj-nmsc.adb: Minor reformatting.
9145 2011-08-04 Javier Miranda <miranda@adacore.com>
9148 (Normalize_Scalars_Config): Value of the configuration switch set by
9149 pragma Normalize_Scalars when it appears in the gnat.adc file.
9150 (Normalize_Scalars): New field for record Config_Switches_Type. Used
9151 to save and restore settings of this pragma.
9153 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
9154 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
9156 2011-08-04 Vincent Celier <celier@adacore.com>
9158 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
9160 2011-08-04 Arnaud Charlet <charlet@adacore.com>
9162 * makeutl.adb: Minor reformatting.
9164 2011-08-04 Olivier Hainque <hainque@adacore.com>
9166 * g-altive.ads: Update comments to reflect that only the soft
9167 binding is available today.
9169 2011-08-04 Robert Dewar <dewar@adacore.com>
9171 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
9172 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
9173 * gcc-interface/Make-lang.in: Update dependencies.
9175 2011-08-04 Arnaud Charlet <charlet@adacore.com>
9177 * prj-env.adb: Remove local debug traces.
9179 2011-08-04 Yannick Moy <moy@adacore.com>
9181 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
9182 was used instead of Hi_OK, which could cause a read of an uninitialized
9183 value later on. Detected while working on the new warning.
9184 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
9186 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
9187 in more cases, in order to detect more unreferenced values.
9188 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
9189 object for expression, if any.
9191 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
9193 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
9194 the operand types instead of the Esize.
9196 2011-08-04 Steve Baird <baird@adacore.com>
9198 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
9199 enable CodePeer_Mode.
9200 * bindusg.adb (Display): Add help message describing -P binder switch.
9201 * gnat_ugn.texi: Document -P binder switch.
9202 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
9203 user-defined main program directly.
9204 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
9205 user-defined main program in the context clause of the package body.
9207 2011-08-04 Yannick Moy <moy@adacore.com>
9209 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
9210 duplicate of Defining_Entity
9211 (Get_Unique_Entity_For_Decl): rename function into
9212 Unique_Defining_Entity
9213 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
9214 (Formal_Proof_On): remove synthesized flag
9215 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
9216 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
9217 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
9218 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
9219 Annotate (Formal_Proof)
9221 2011-08-04 Emmanuel Briot <briot@adacore.com>
9223 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
9224 source files with non-standard naming schemes, in imported projects
9226 2011-08-04 Emmanuel Briot <briot@adacore.com>
9228 * makeutl.adb (Complete_Mains): when a multi-unit source file is
9229 specified on the gprbuild command line, we need to compile all units
9230 within that file, not just the first one we find
9231 Fix error message for mains that are not found.
9233 2011-08-04 Thomas Quinot <quinot@adacore.com>
9235 * sem_ch6.adb: Update comment.
9236 * sem_ch12.adb: Minor reformatting.
9238 2011-08-04 Bob Duff <duff@adacore.com>
9240 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
9241 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
9242 race condition whose symptom is to fail to lock Parent. That, in turn,
9243 causes Parent.Awake_Count to be accessed without locking Parent, which
9244 causes another race condition whose symptom is that Parent.Awake_Count
9245 can be off by 1 (either too high or too low). The solution is to lock
9246 Parent unconditionally, and then lock Acceptor, before reading
9247 Acceptor.Terminate_Alternative.
9249 2011-08-04 Arnaud Charlet <charlet@adacore.com>
9251 * debug.adb: Update comment.
9253 2011-08-04 Robert Dewar <dewar@adacore.com>
9255 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
9256 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
9257 exp_ch6.adb: Minor reformatting.
9259 2011-08-04 Gary Dismukes <dismukes@adacore.com>
9261 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
9264 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9266 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
9268 2011-08-04 Thomas Quinot <quinot@adacore.com>
9270 * sinfo.ads: Minor reformatting.
9272 2011-08-04 Emmanuel Briot <briot@adacore.com>
9274 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
9275 even if there is no location.
9277 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9279 * sem_res.adb, sem_ch4.adb: move check for restriction
9280 No_Task_Hierarchy to resolve_allocator.
9282 2011-08-04 Thomas Quinot <quinot@adacore.com>
9284 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
9285 This flag of N_Pragma nodes is not used, remove it as well as all of
9286 the associated circuitry.
9288 2011-08-04 Javier Miranda <miranda@adacore.com>
9290 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
9291 runtime check on duplicated externa tags
9292 * debug.adb Document switch -gnatdQ.
9294 2011-08-04 Gary Dismukes <dismukes@adacore.com>
9296 * a-fihema.ads: Minor typo fix.
9298 2011-08-04 Yannick Moy <moy@adacore.com>
9300 * sem_ch10.adb: Minor comment update.
9302 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9304 * einfo.adb: Update the node field usage to reflect the renaming of
9305 Return_Flag to Return_ Flag_Or_Transient_Decl.
9306 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
9307 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
9308 (Write_Field15_Name): Change Return_Flag to
9309 Return_Flag_Or_Transient_Decl.
9310 * einfo.ads: Rename node field Return_Flag to
9311 Return_Flag_Or_Transient_Decl. Update the associated comment and all
9312 occurrences in entities.
9313 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
9314 associated Inline pragma.
9315 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
9316 associated Inline pragma.
9317 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
9319 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
9320 Return_Flag and Set_Return_Flag.
9321 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
9322 objects generated for controlled transients declared inside an
9323 Exception_With_Actions. Update the calls to Return_Flag.
9324 (Process_Object_Declaration): Add code to add a null guard for hook
9325 objects generated for controlled transients declared inside an
9326 Exception_With_Actions. Update related comment.
9327 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
9328 objects generated for controlled transients declared inside an
9329 Exception_With_Actions. Update the calls to Return_Flag.
9330 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
9332 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9334 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
9335 positional aggregate.
9337 2011-08-04 Vincent Celier <celier@adacore.com>
9339 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
9340 SLOC only for pragmas.
9342 2011-08-04 Emmanuel Briot <briot@adacore.com>
9344 * projects.texi: Minor typo fix.
9346 2011-08-04 Emmanuel Briot <briot@adacore.com>
9348 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
9349 on case-sensitive file systems.
9351 2011-08-04 Thomas Quinot <quinot@adacore.com>
9353 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
9354 nested in a disabled pragma.
9355 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
9356 enclosing pragma, if any, for X decisions.
9358 2011-08-04 Thomas Quinot <quinot@adacore.com>
9360 * sem_prag.adb: Minor reformatting.
9362 2011-08-04 Vincent Celier <celier@adacore.com>
9364 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
9365 allowed in no run time mode.
9367 2011-08-04 Vincent Celier <celier@adacore.com>
9369 * make.adb (Check): When -gnatc is used, check for the source file
9370 inside the ALI file with a canonical case file name.
9372 2011-08-04 Emmanuel Briot <briot@adacore.com>
9374 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
9375 overriding the separator.
9377 2011-08-04 Robert Dewar <dewar@adacore.com>
9379 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
9380 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
9382 2011-08-04 Robert Dewar <dewar@adacore.com>
9384 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
9386 2011-08-04 Yannick Moy <moy@adacore.com>
9388 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
9389 'Result only appears in postcondition of function.
9391 2011-08-04 Thomas Quinot <quinot@adacore.com>
9393 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
9394 external tag, include the value of the external tag in the exception
9397 2011-08-04 Yannick Moy <moy@adacore.com>
9399 * sem_attr.adb (Result): modify error message for misplaced 'Result
9401 2011-08-04 Sergey Rybin <rybin@adacore.com>
9403 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
9404 clear that the second argument must be an identifier.
9406 2011-08-04 Thomas Quinot <quinot@adacore.com>
9408 * exp_ch9.adb (Build_Barrier_Function): When compiling with
9409 -fpreserve-control-flow, insert an IF statement on the barrier
9410 condition to ensure that a conditional branch instruction is generated.
9412 2011-08-04 Emmanuel Briot <briot@adacore.com>
9414 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
9415 (Processing_Flags.Ignore_Missing_With): new flag.
9417 2011-08-04 Emmanuel Briot <briot@adacore.com>
9419 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
9420 Source_List_File on case-insensitive systems where the file is actually
9421 on a case-sensitive file system (NFS,...).
9423 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9425 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
9426 function return contains a controlled [extension] aggregate and the
9427 return statement is not part of a handled sequence of statements, wrap
9428 the return in a block. This ensures that all controlled temporaries
9429 generated during aggregate resolution will be picked up by the
9430 finalization machinery.
9432 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9434 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
9435 components, freeze type before resolution, to ensure that default
9436 initializations are present for all components.
9437 * sem_res.adb (Resolve_Actuals): the designated object of an
9438 accces-to-constant type is a legal actual in a call to an
9439 initialization procedure.
9441 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9443 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
9444 N_Unchecked_Type_Conversion to the possible containers of a renamed
9447 2011-08-04 Yannick Moy <moy@adacore.com>
9449 * par-ch13.adb (Aspect_Specifications_Present): recognize
9450 "with Identifier'Class =>" as an aspect, so that a meaningful warning
9451 is issued in Strict mode.
9452 * par.adb: Fix typos in comments.
9454 2011-08-04 Yannick Moy <moy@adacore.com>
9456 * sem_attr.adb (Result): modify error message to take into account Post
9457 aspect when compiling Ada 2012 (or newer) code.
9459 2011-08-04 Nicolas Roche <roche@adacore.com>
9461 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
9462 remove need for GCC exceptions.
9464 2011-08-04 Vincent Celier <celier@adacore.com>
9466 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
9467 project, not the source file name.
9468 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
9469 excluded, continue looking. This excluded source will only be returned
9470 if there is no other source with the same base name that is not locally
9473 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9475 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
9476 private and one of the operands is a real literal, use a qualified
9477 expression rather than a conversion which is not meaningful to the
9480 2011-08-04 Yannick Moy <moy@adacore.com>
9482 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
9483 corresponding aspect X'Class are allowed, proceed with analysis of the
9484 aspect instead of skipping it.
9486 2011-08-04 Tristan Gingold <gingold@adacore.com>
9488 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
9489 This will allow to have an Ada implementation for the subprogram.
9491 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9493 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
9494 completion and aspects are present, apply them to the entity for the
9495 type which is currently the partial view, but which is the one that
9497 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
9498 applies to a partial view, indicate that the full view has predicates
9499 and delayed aspects.
9500 (Replace_Type_Reference): Handle properly predicates that apply to the
9501 full view of a private completion.
9503 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
9505 * layout.adb (Layout_Type): For composite types, do not set Esize.
9506 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
9508 (Size_Known): Look at the RM size of components instead of the Esize.
9509 (Freeze_Record_Type): Look at the RM size instead of the Esize to
9510 issue warning and activate Implicit_Packing.
9511 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
9512 if the Esize is not known.
9513 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
9514 for elementary types only.
9515 (Analyze_Record_Representation_Clause): Look at the RM size instead
9516 of the Esize to issue errors.
9517 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
9519 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
9521 Look at the RM size instead of the Esize for types if the latter is
9523 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
9525 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9527 * sem_type.adb: proper handling of equality not involving anonymous
9530 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9532 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
9533 Vis_Decls. When creating a library-level finalizer for a package spec,
9534 both the declaration and body of the finalizer are inserted either in
9535 the visible or private declarations of the package spec.
9537 2011-08-04 Javier Miranda <miranda@adacore.com>
9539 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
9540 use of the full-view of a type when invoking Is_Ancestor.
9541 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
9542 the full-view of private parents is requested, then use also the
9543 full-view of the parent of the first derivation.
9545 2011-08-04 Tristan Gingold <gingold@adacore.com>
9547 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
9548 instead of the locally imported procedure.
9549 * s-taprop-mingw.adb (Enter_Task): Ditto.
9550 * s-valrea.adb (Scan_Real): Ditto.
9551 * s-imgrea.adb (Set_Image_Real): Ditto.
9552 * s-flocon.ads: Make the package pure.
9554 2011-08-04 Thomas Quinot <quinot@adacore.com>
9556 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
9557 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
9558 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
9559 New subprogram, moved here from...
9560 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
9561 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
9562 rewriting of the last argument into a procedure call statement here...
9563 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
9566 2011-08-04 Thomas Quinot <quinot@adacore.com>
9568 * par_sco.adb: Minor reformatting.
9570 2011-08-04 Robert Dewar <dewar@adacore.com>
9572 * erroutc.adb: Minor reformatting.
9574 2011-08-04 Thomas Quinot <quinot@adacore.com>
9576 * par_sco.adb: Comment update.
9578 2011-08-04 Tristan Gingold <gingold@adacore.com>
9580 * s-flocon.ads: New file.
9581 * g-flocon.ads: Now a renaming of s-flocon.
9582 * Makefile.rtl: Add s-flocon.o
9584 2011-08-04 Javier Miranda <miranda@adacore.com>
9586 * exp_strm.adb (Build_Array_Input_Function): if the array type is
9587 constrained, do not attempt to build a subtype of it.
9589 2011-08-04 Yannick Moy <moy@adacore.com>
9591 * errout.ads Change comments: remove 'R'M as an example where quotes
9592 are needed; add ALFA as another case where quotes are not needed
9593 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
9594 case where quotes are not needed.
9595 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
9596 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
9597 Remove all occurrences of 'A'L'F'A
9599 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9601 * sem_ch13.adb: check legality of invariant pragma.
9603 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
9605 * bindgen.adb: Add comments.
9607 2011-08-04 Yannick Moy <moy@adacore.com>
9609 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
9611 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
9612 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
9614 2011-08-04 Robert Dewar <dewar@adacore.com>
9616 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
9617 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
9618 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
9620 2011-08-04 Thomas Quinot <quinot@adacore.com>
9622 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
9624 2011-08-04 Thomas Quinot <quinot@adacore.com>
9627 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
9630 2011-08-04 Robert Dewar <dewar@adacore.com>
9632 * einfo.ads, exp_ch4.adb: Minor reformatting.
9634 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
9636 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
9638 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9640 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
9641 type in all cases to compute list of primitive operations, because full
9642 view may be an itype that is not attached to the list of declarations.
9644 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
9646 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
9647 library has already been finalized.
9648 (Gen_Adafinal_C): Likewise.
9649 (Gen_Adainit_Ada): Generate an early return if the library has
9650 already been elaborated.
9651 (Gen_Adainit_C): Likewise.
9652 (Gen_Output_File_Ada): Generate an elaboration flag.
9653 (Gen_Output_File_C): Likewise.
9655 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9657 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
9658 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
9659 built in the first place.
9660 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
9661 for CodePeer because Finalize_Address was not built to begin with.
9662 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
9664 2011-08-04 Pascal Obry <obry@adacore.com>
9666 * adaint.c (__gnat_tmp_name): Use current process id to create temp
9667 filenames, this ensures unicity of filenames across processes.
9669 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9671 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
9672 Raise_Controlled to Raise_From_Controlled_Operation. Update the
9673 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
9674 Add False as the actual to From_Abort in the generated call to
9675 Raise_From_Controlled_Operation.
9677 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
9679 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
9680 so that the ali file name can be retrieved from outside of this package.
9681 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
9682 doing nothing in the general case, but used to update the object file
9683 timestamp if directly generated by the backend.
9684 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
9685 to a later time than the ali file one.
9687 2011-08-04 Yannick Moy <moy@adacore.com>
9689 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
9690 entities whose body contains an Annotate pragma which forces formal
9692 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
9693 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
9694 Mark_Non_ALFA_Subprogram to pass in a message and node.
9695 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
9696 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
9697 surrounding subprogram.
9698 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
9699 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
9700 as not in ALFA is annotated with Formal_Proof being On, then an error
9701 is issued based on the additional parameters for message and node.
9702 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
9703 * gcc-interface/Make-lang.in: Update dependencies.
9705 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9707 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
9708 Finalize_Address when CodePeer is enabled.
9710 2011-08-04 Pascal Obry <obry@adacore.com>
9712 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
9713 the latter returns a pointer to a static buffer which is deallocated
9714 at the end of the routine.
9716 2011-08-04 Yannick Moy <moy@adacore.com>
9718 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
9719 after index creation; mark unconstrained base array type generated as
9720 being in/not in ALFA as well
9721 (Make_Index): mark subtype created as in/not in ALFA
9722 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
9723 over a loop as in/not in ALFA, depending on its type and form of loop
9726 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9728 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
9729 directly to False on .NET and JVM.
9731 2011-08-04 Yannick Moy <moy@adacore.com>
9733 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
9734 constraint that subtype must come from source code to be in ALFA, so
9735 that anonymous subtypes can be in ALFA too.
9737 2011-08-04 Yannick Moy <moy@adacore.com>
9739 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
9740 reference for ALFA mode.
9741 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
9742 procedure public so as to use it from formal verification back-end.
9744 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
9746 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
9747 invalid checks of the Parameter, making Remove_Switch not working
9750 2011-08-04 Arnaud Charlet <charlet@adacore.com>
9752 * targparm.ads: Update header: no run-time exception is needed on this
9755 2011-08-04 Vincent Celier <celier@adacore.com>
9757 * a-fihema.adb: Use System.IO instead of GNAT.IO
9759 2011-08-04 Thomas Quinot <quinot@adacore.com>
9761 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
9762 are forbidden in Compiler_Unit mode.
9764 2011-08-04 Robert Dewar <dewar@adacore.com>
9766 * sem_util.adb: Minor reformatting.
9768 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9770 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
9771 library-level finalizers.
9772 (Gen_Finalize_Library_C): Update the import string for library-level
9774 (Gen_Finalize_Library_Defs_C): Update the definition name of a
9775 library-level finalizer.
9776 * exp_ch7.adb: Remove with and use clauses for Stringt.
9777 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
9778 Spec_Decl. Add local variable Body_Id. The names of library-level
9779 finalizers are now manually fully qualified and are no longer external.
9780 A single name is now capable of servicing .NET, JVM and non-VM targets.
9781 Pragma Export is no longer required to provide visibility for the name.
9782 (Create_Finalizer_String): Removed.
9783 (New_Finalizer_Name): New routine which mimics New_..._Name.
9785 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
9787 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
9788 elaboration counter to Standard_Short_Integer.
9789 * sem_util.adb (Build_Elaboration_Entity): Likewise.
9790 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
9791 (Gen_Elab_Externals_C): Likewise.
9793 2011-08-04 Ed Falis <falis@adacore.com>
9795 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
9796 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
9797 system-vxworks-mips.ads, system-vxworks-x86.ads
9798 (Always_Compatible_Rep): set to False for all VxWorks targets.
9800 2011-08-04 Robert Dewar <dewar@adacore.com>
9802 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
9803 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
9804 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
9805 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
9806 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
9807 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
9808 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
9809 Minor reformatting and code reorganization.
9811 2011-08-04 Emmanuel Briot <briot@adacore.com>
9813 * projects.texi: Added doc for aggregate projects.
9815 2011-08-04 Emmanuel Briot <briot@adacore.com>
9817 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
9818 Add support for overriding the Project_Path in aggregate projects.
9820 2011-08-04 Robert Dewar <dewar@adacore.com>
9822 * a-cofove.ads: Minor reformatting.
9824 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9826 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
9827 on the generated code.
9828 (Build_Finalize_Statements): Update the comment on the generated code.
9829 (Build_Initialize_Statements): Update the comment on the generated code.
9830 (Build_Object_Declarations): Add local variable Result. The object
9831 declarations are now built in sequence.
9832 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
9835 2011-08-04 Robert Dewar <dewar@adacore.com>
9837 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
9839 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
9841 * einfo.ads (Elaboration_Entity): Document new definition and use.
9842 (Elaboration_Entity_Required): Adjust to above change.
9843 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
9844 * exp_ch12.adb: And with and use for Snames.
9845 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
9846 * exp_util.adb (Set_Elaboration_Flag): Likewise.
9847 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
9848 <Check_Unit_Name>: Deal with N_Expanded_Name.
9849 <Attribute_Elaborated>: Extend to all unit names.
9850 * sem_elab.adb: And with and use for Uintp.
9851 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
9852 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
9853 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
9854 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
9855 from Gen_Adainit_Ada.
9856 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
9857 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
9858 case, do not call System.Standard_Library.Adafinal; instead call
9859 finalize_library if needed.
9860 (Gen_Adafinal_C): Likewise.
9861 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
9862 non-main program case.
9863 (Gen_Adainit_C): Generate a couple of external declarations here.
9864 In the main program case, set SSL.Finalize_Library_Objects.
9865 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
9866 (Gen_Elab_Calls_C): Likewise.
9867 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
9868 (Gen_Finalize_Library_C): Likewise. Generate a full function.
9869 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
9871 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
9872 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
9874 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
9875 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
9876 of external declarations. Call Gen_Finalize_Library_C.
9878 2011-08-04 Emmanuel Briot <briot@adacore.com>
9880 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
9881 Compute_Compilation_Phases): new subprogram.
9882 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
9883 The number of mains as well as the various compilation phases that
9884 need to be run are now project tree specific, since various
9885 aggregated trees might have different requirements. In particular,
9886 they do not all require bind or link phases.
9888 2011-08-04 Emmanuel Briot <briot@adacore.com>
9890 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
9891 (Project_Tree_Appdata): New type.
9892 It is now possible to associate application-specific data to a project
9893 tree. In particular, this is used in the gprbuild builder to avoid a
9894 number of global tables and htables, especially now that there can be
9895 several project trees loaded at once because of aggregate projects.
9896 (Debug_Name): new procedure.
9897 * projects.texi: Clarify syntax of "**" for Source_Dirs
9899 2011-08-03 Emmanuel Briot <briot@adacore.com>
9901 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
9902 the "roots" for a main.
9903 (Fill_From_Project): add support for aggregate projects. Main units
9904 in aggregated projects are now automatically added in the list of
9905 files to build (although this fails later on in gprbuild, because
9906 these files are not using the root proejct tree, so this needs
9908 * gcc-interface/Make-lang.in: Update dependencies.
9910 2011-08-03 Yannick Moy <moy@adacore.com>
9912 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
9913 conditional expression in ALFA.
9914 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
9915 expressions as not in ALFA.
9917 2011-08-03 Robert Dewar <dewar@adacore.com>
9919 * a-cofove.adb: Minor reformatting.
9921 2011-08-03 Emmanuel Briot <briot@adacore.com>
9923 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
9924 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
9926 These packages are more logically placed in the Queue package, since
9927 they manipulate the queue. It is also likely that they can be adapted
9928 for gnatmake, thus sharing more code.
9929 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
9930 that we could move the above.
9932 2011-08-03 Emmanuel Briot <briot@adacore.com>
9934 * errutil.adb (Finalize): clean up the list of error messages on exit.
9935 Calling this subprogram multiple times will no longer show duplicate
9936 error messages on stderr.
9938 2011-08-03 Emmanuel Briot <briot@adacore.com>
9940 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
9941 Getopt_Switches when we have already define a command line
9944 2011-08-03 Yannick Moy <moy@adacore.com>
9946 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
9947 in ALFA. Instead, they are considered as assertions to prove.
9948 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
9949 nodes as not in ALFA. Instead, include conditional expressions in ALFA
9950 if they have no ELSE part, or if they occur in pre- and postconditions,
9951 where the Condition cannot have side-effects in ALFA
9952 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
9953 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
9954 Instead, include type conversion between scalar types in ALFA.
9955 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
9956 if-and-only-if its type is in ALFA.
9958 2011-08-03 Thomas Quinot <quinot@adacore.com>
9960 * scos.adb, get_scos.adb, put_scos.adb
9961 New code letter for decisions: G (entry guard)
9963 (Traverse_Subprogram_Body): Rename to...
9964 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
9965 (Traverse_Protected_Body): New subprogram
9966 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
9967 protected bodies and entry bodies.
9969 2011-08-03 Yannick Moy <moy@adacore.com>
9971 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
9972 entities with get/set subprograms, which is set on procedure entities
9973 generated by the compiler for a postcondition.
9974 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
9975 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
9976 entity for a declaration
9977 (Get_Unique_Entity_For_Decl): new function returning an entity which
9978 represents a declaration, so that matching spec and body have the same
9981 2011-08-03 Robert Dewar <dewar@adacore.com>
9983 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
9984 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
9986 2011-08-03 Yannick Moy <moy@adacore.com>
9988 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
9989 library-level because retriction No_Implicit_Dynamic_Code in the
9990 front-end prevents its definition as a local subprogram
9991 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
9992 for reuse in other contexts
9993 (Traverse_Declarations_Or_Statements,
9994 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
9995 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
9996 procedures take a callback parameter to be called on all declarations
9998 (Traverse_All_Compilation_Units): new generic function to traverse a
9999 compilation unit and call a callback parameter on all declarations
10001 2011-08-03 Javier Miranda <miranda@adacore.com>
10003 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
10004 in Java since they are always enclosed in a namespace that
10005 differentiates them, and overloaded entities are supported by the VM.
10007 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10009 * checks.adb (Determine_Range): If a computed bound of an operation is
10010 outside the range of the base type of the expression, and overflow
10011 checks are enabled, the result is unknown and cannot be used for any
10012 subsequent constant folding.
10013 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
10014 unknown, so is the result of the comparison.
10016 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
10018 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
10019 From_Abort. When finalization was triggered by an abort, propagate
10020 Standard'Abort_Signal rather than Program_Error.
10021 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
10023 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
10024 From_Abort. When finalization was triggered by an abort, propagate
10025 Standard'Abort_Signal rather than Program_Error.
10026 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
10028 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
10029 Abort_Id. Update the calls to Build_Object_Declarations and
10030 Build_Raise_Statement to include Abort_Id.
10031 (Build_Adjust_Statements): New local variable Abort_Id. Update the
10032 calls to Build_Object_Declarations and Build_Raise_Statement to include
10034 (Build_Finalize_Statements): New local variable Abort_Id. Update the
10035 calls to Build_Object_Declarations and Build_Raise_Statement to include
10037 (Build_Components): Create an entity for Abort_Id when exceptions are
10038 allowed on the target.
10039 (Build_Finalizer): New local variable Abort_Id.
10040 (Build_Initialize_Statements): New local variable Abort_Id. Update the
10041 calls to Build_Object_Declarations and Build_Raise_Statement to include
10043 (Build_Object_Declarations): Add new formal Abort_Id. Create the
10044 declaration of flag Abort_Id to preserve the original abort status
10045 before finalization code is executed.
10046 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
10047 runtime routine Raise_From_Controlled_Operation.
10048 (Create_Finalizer): Update the call to Build_Raise_Statement to include
10049 Abort_Id. Update the call to Build_Object_Declarations to include
10050 Abort_Id. Update the layout of the finalizer body.
10051 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
10052 (Process_Transient_Objects): New local variable Abort_Id. Remove the
10053 clunky code to create all flags and objects related to
10054 exception propagation and replace it with a call to
10055 Build_Object_Declarations. Update the call to Build_Raise_Statement to
10057 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
10058 Add new formal Abort_Id and associated comment on its use.
10059 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
10061 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
10062 Remove the clunky code to create all flags and objects related to
10063 exception propagation and replace it with a call to
10064 Build_Object_Declarations. Update the call to Build_Raise_Statement.
10066 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
10068 * s-tassta.adb: Fix minor typos.
10070 2011-08-03 Robert Dewar <dewar@adacore.com>
10072 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
10073 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
10075 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
10077 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
10078 to packages. This ensures that the finalizer body will not end up
10079 inside the freeze node.
10080 (Process_Declarations): Add code to detect whether a freeze node has a
10081 nested finalization collection.
10083 2011-08-03 Pascal Obry <obry@adacore.com>
10085 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
10086 (Current_Session): Return a not null access to Session_Type.
10087 (Default_Session): Likewise.
10089 2011-08-03 Robert Dewar <dewar@adacore.com>
10091 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
10092 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
10094 2011-08-03 Pascal Obry <obry@adacore.com>
10096 * g-awk.ads: Minor comment fix.
10098 2011-08-03 Sergey Rybin <rybin@adacore.com>
10100 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
10101 the tree structure related to discriminant constraints.
10102 Original_Discriminant cannot be used any more for computing the
10103 defining name for the reference to a discriminant.
10105 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10107 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
10108 function is not visibly tagged, this is not a dispatching call and
10109 therfore is not Tag_Indeterminate, even if the function is marked as
10110 dispatching on result.
10112 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
10114 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
10115 (Expand_N_Free_Statement): Add a guard to protect against run-times
10116 which do not support controlled types.
10117 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
10118 against run-times which do not support controlled types.
10119 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
10120 against run-times which do not support controlled types.
10121 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
10122 against run-times which do not support controlled types.
10123 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
10124 protect against run-times which do not support controlled types.
10126 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
10128 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
10129 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
10131 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10133 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
10134 modified in the source, to prevent spurious warnings when compiling
10137 2011-08-03 Thomas Quinot <quinot@adacore.com>
10139 * a-except-2005.adb: Minor reformatting.
10141 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10143 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
10144 is a renaming declaration in the private part of a package, do not emit
10145 a warning that the with_clause could be moved because the renaming may
10146 be used in the body or in a child unit.
10148 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
10150 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
10151 Propagate the Comes_From_Source attribute from the original return
10152 object to the renaming.
10154 2011-08-03 Jose Ruiz <ruiz@adacore.com>
10156 * exp_ch7.adb (Build_Raise_Statement): Do not call
10157 Raise_From_Controlled_Operation when this routine is not present in
10158 the run-time library.
10159 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
10160 libraries (Ravenscar), tasks are non-terminating, and protected objects
10161 and tasks can only appear at library level, so we do not want
10162 finalization of protected objects nor tasks.
10163 * exp_intr.adb: Minor clarification in comment.
10164 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
10165 Gen_Output_File_C): Remove references to finalization of library-level
10166 objects when using restricted run-time libraries.
10168 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10170 * sem_ch3.adb (Build_Discriminant_Constraints): Set
10171 Original_Discriminant only if the parent type is a generic formal.
10173 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
10175 * exp_ch13.adb: Add with and use clause for Targparm;
10176 (Expand_N_Free_Statement): Prevent the generation of a custom
10177 Deallocate on .NET/JVM targets since this requires pools and address
10179 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
10180 .NET/JVM targets, attach the newly allocated object to the access
10181 type's finalization collection. Do not generate a call to
10182 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
10183 exist in the runtime.
10184 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
10185 create a custom Allocate for object that do not require initialization.
10186 Attach a newly allocated object to the access type's finalization
10187 collection on .NET/JVM.
10188 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
10189 assignment of controlled types on .NET/JVM. The two hidden pointers
10190 Prev and Next and stored and later restored after the assignment takes
10192 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
10193 kludge for .NET/JVM to recognize a particular piece of code coming from
10194 Heap_Management and change the call to Finalize into Deep_Finalize.
10195 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
10196 finalization collections on .NET/JVM only for types derived from
10197 Controlled. Separate the association of storage pools with a collection
10198 and only allow it on non-.NET/JVM targets.
10199 (Make_Attach_Call): New routine.
10200 (Make_Detach_Call): New routine.
10201 (Process_Object_Declarations): Suppress the generation of
10202 build-in-place return object clean up code on .NET/JVM since it uses
10204 * exp_ch7.ads (Make_Attach_Call): New routine.
10205 (Make_Detach_Call): New routine.
10206 * exp_intr.adb Add with and use clause for Targparm.
10207 (Expand_Unc_Deallocation): Detach a controlled object from a collection
10208 on .NET/JVM targets.
10209 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
10210 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
10211 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
10212 names used in finalization.
10214 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
10216 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
10217 (Attach, Detach): Lock the current task when chaining an object onto a
10220 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
10222 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
10223 Rewritten to create the message strings when the exception is not
10224 raised by an abort during finalization.
10225 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
10226 Raise_From_Controlled_Operation and update its associated comment.
10227 * a-fihema.ads, a-fihema.adb: New GNAT unit.
10228 Ada.Finalization.Heap_Management provides key functionality
10229 associated with controlled objects on the heap, their creation,
10230 finalization and reclamation. Type Finalization_Collection is
10231 effectively a wrapper which sits ontop of a storage pool and performs
10232 all necessary bookkeeping for all the objects it contains. Each
10233 access-to-controlled or access-to-class-wide type receives a collection
10234 as part of its expansion. The compiler generates buffer code and
10235 invokes Allocate / Deallocate to create and destroy allocated
10236 controlled objects.
10237 * a-finali.adb ("="): Removed.
10238 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
10239 fields Prev and Next.
10240 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
10241 A library unit with at least one controlled object on the library level
10242 has a special finalizer which is invoked by the binder. To signal this,
10243 ali files carry field PF.
10244 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
10245 associated comment on field usage.
10246 * a-tags.adb (Get_RC_Offset): Removed.
10247 (Needs_Finalization): New routine.
10248 * a-tags.ads: Update the structure of the GNAT dispatch tables.
10249 Dispatch tables now carry field Needs_Finalization which provides
10250 runtime indication whether a type is controlled or has controlled
10251 components or both. Remove field RC_Offset.
10252 (Get_RC_Offset): Removed along with its associated pragma Export.
10253 Since tagged types with controlled components no longer carry hidden
10254 field _controller, the special mechanism to retrieve its location is no
10256 (Needs_Finalization): New routine.
10257 * atree.ads, atree.adb (Elist24): New routine.
10258 (Set_Elist24): New routine.
10259 * atree.h: Add a define clause for Elist24.
10260 * bindgen.adb New library-level variable Lib_Final_Built.
10261 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
10262 presence of a VM target, the routine generates calls to the proper
10263 library finalization routine.
10264 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
10265 targets. Set the correct library finalization routine depending on
10266 whether the library has controlled objects or this is a VM compilation.
10267 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
10268 to library-level finalizers of compiled units in reverse order of
10269 elaboration. It also produces exception management code and reraises a
10270 potential exception after all units have been finalized.
10271 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
10272 library-level finalizers of compiled units in reverse order of
10274 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
10275 definitions of all library-level finalizers available to the compilation
10276 (Gen_Main_Ada): Directly call Adafinal which now contails all target
10278 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
10279 System.Standard_Library.Adafinal directly. If the library needs
10280 finalization actions, create the sequence of finalization calls.
10281 (Gen_Output_File_Ada): Alphabetize local variables and constants.
10282 Generate a with clause for System.Soft_Links when compiling for a VM.
10283 Remove the code which imports System.Standard_Library.Adafinal as
10284 Do_Finalize. Generate the library finalization routine.
10285 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
10286 If the library needs finalization actions, create all the definitions
10287 of library- level finalizers.
10288 (Has_Finalizer): New routine. Determines whether at least one compiled
10289 unit has a library-level finalizer.
10290 Add type Qualification_Mode.
10291 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
10292 * einfo.adb: New usage of field 15 as Return_Flag.
10293 Remove Finalization_Chain_Entity from the usages of field 19.
10294 Remove Associated_Final_Chain from the usages of field 23.
10295 New usage of field 23 as Associated_Collection.
10296 New usage of field 24 as Finalizer.
10297 New usage of flag 252 as Is_Processed_Transient.
10298 (Associated_Final_Chain): Removed.
10299 (Associated_Collection): New routine.
10300 (Finalization_Chain_Entity): Removed.
10301 (Finalizer): New routine.
10302 (Is_Finalizer): New routine.
10303 (Is_Processed_Transient): New routine.
10304 (Return_Flag): New routine.
10305 (Set_Associated_Final_Chain): Removed.
10306 (Set_Associated_Collection): New routine.
10307 (Set_Finalization_Chain_Entity): Removed.
10308 (Set_Finalizer): New routine.
10309 (Set_Is_Processed_Transient): New routine.
10310 (Set_Return_Flag): New routine.
10311 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
10313 (Write_Field8_Name): Alphabetize the output.
10314 (Write_Field11_Name): Alphabetize the output.
10315 (Write_Field12_Name): Alphabetize the output.
10316 (Write_Field13_Name): Alphabetize the output.
10317 (Write_Field14_Name): Alphabetize the output.
10318 (Write_Field15_Name): Alphabetize the output.
10319 (Write_Field16_Name): Alphabetize the output.
10320 (Write_Field17_Name): Alphabetize the output.
10321 (Write_Field18_Name): Alphabetize the output.
10322 (Write_Field19_Name): Alphabetize the output. Remove the output of
10323 Finalization_Chain_Entity.
10324 (Write_Field20_Name): Alphabetize the output.
10325 (Write_Field21_Name): Alphabetize the output.
10326 (Write_Field22_Name): Alphabetize the output.
10327 (Write_Field23_Name): Alphabetize the output. Remove the output of
10328 Associated_Final_Chain. Add output for Associated_Collection.
10329 (Write_Field24_Name): Alphabetize the output.
10330 (Write_Field25_Name): Add output for Finalizer.
10331 (Write_Field26_Name): Alphabetize the output.
10332 (Write_Field27_Name): Alphabetize the output.
10333 (Write_Field28_Name): Alphabetize the output.
10334 * einfo.ads: Add new field description for Associated_Collection and
10336 Remove Associated_Final_Chain and its uses in nodes.
10337 Remove Finalization_Chain_Entity and its uses in nodes.
10338 Add new field description for Finalizer and its uses in nodes.
10339 Add new synthesized attribute Is_Finalizer.
10340 Add new flag description for Is_Processed_Transient and its uses in
10342 Add new field description for Return_Flag and its uses in nodes.
10343 (Associated_Final_Chain): Removed along with its pragma Inline.
10344 (Associated_Collection): New routine and pragma Inline.
10345 (Finalization_Chain_Entity): Removed along with its pragma Inline.
10346 (Finalizer): New routine and pragma Inline.
10347 (Is_Finalizer): New routine and pragma Inline.
10348 (Is_Processed_Transient): New routine and pragma Inline.
10349 (Return_Flag): New routine and pragma Inline.
10350 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
10351 (Set_Associated_Collection): New routine and pragma Inline.
10352 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
10353 (Set_Finalizer): New routine and pragma Inline.
10354 (Set_Is_Processed_Transient): New routine and pragma Inline.
10355 (Set_Return_Flag): New routine and pragma Inline.
10356 * exp_aggr.adb: Alphabetize subprograms.
10357 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
10358 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
10359 associated comments. Remove local variables External_Final_List and
10361 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
10362 Ancestor. Remove the retrieval of finalization lists. Update the call to
10364 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
10365 lists. Update the call to Late_Expansion.
10366 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
10367 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
10368 (Gen_Assign): Remove the retrieval of the finalization list used to
10369 build the assignment. Update the calls to Make_Init_Call and
10371 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
10372 Remove the mechanism to determine attachment levels and finalization
10373 list retrieval. Remove the processing for coextensions.
10374 (Init_Controller): Removed. Controllers no longer exist.
10375 (Late_Expansion): Remove formals Flist and Obj along with their
10376 associated comments. Update the calls to Build_Record_Aggr_Code and
10377 Build_Array_Aggr_Code.
10378 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
10379 (Expand_N_Freeze_Entity): Add special processing for finalizers which
10380 appear in entry bodies, protected subprograms and task bodies.
10381 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
10382 * exp_ch3.adb (Add_Final_Chain): Removed.
10383 (Build_Array_Init_Proc): Alphabetize local variables.
10384 (Build_Assignment): Alphabetize local variables. Update the call to
10386 (Build_Class_Wide_Master): Rename local variables to better reflect
10388 (Build_Discriminant_Assignments): Code reformatting.
10389 (Build_Init_Call_Thru): Code reformatting.
10390 (Build_Init_Procedure): Code reformatting. Generate a special version
10391 of Deep_Finalize which is capable of finalizing all initialized
10392 components and ignore the rest.
10393 (Build_Init_Statements): Rename local variables to better reflect their
10395 Reimplement the mechanism to include the creation and update of an index
10396 variable called a "counter". It is used as a bookmark for tracing
10397 initialized and non-initialized components.
10398 (Build_Initialization_Call): Remove local variable Controller_Typ.
10399 Alphabetize all local variables. Remove the initialization of the
10400 record controller and update the call to Make_Init_Call.
10401 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
10402 New local variable Counter.
10403 (Constrain_Array): Alphabetize.
10404 (Expand_Freeze_Array_Type): Create a collection instead of a
10406 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
10407 Finalize_Address which is used in conjunction with allocated controlled
10409 (Expand_N_Object_Declaration): Remove the creation of a finalization
10410 list for anonymous access types. Update the calls to Make_Init_Call and
10412 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
10413 retrieval of finalization lists. Remove the expansion of the record
10414 controller. Create TSS primitive Finalize_Address used in conjunction
10415 with controlled objects on the heap. Create finalization collections
10416 for access-to-controlled record components.
10417 (Expand_Record_Controller): Removed.
10418 (Freeze_Type): Remove the freezing of record controllers. Freezing of
10419 class-wide types now requires additional processing. Create
10420 finalization collections for access-to-controlled types.
10421 (Increment_Counter): New routine.
10422 (Make_Counter): New routine.
10423 (Make_Eq_If): Remove the mention of Name_uController.
10424 (Make_Predefined_Primitive_Specs): There is no longer need to skip
10425 types coming from System.Finalization_Root.
10426 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
10427 (Predefined_Primitive_Bodies): There is no longer need to skip types
10428 coming from System.Finalization_Root.
10429 (Stream_Operation_OK): Do not generate stream routines for
10430 type Ada.Finalization.Heap_Management.Finalization_Collection.
10431 * exp_ch3.ads: Alphabetize subprograms.
10432 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
10433 Add with and use clause for Lib.
10434 (Complete_Coextension_Finalization): Removed.
10435 (Complete_Controlled_Allocation): New routine. Create a finalization
10436 collection for anonymous access-to-controlled types. Create a custom
10437 Allocate which interfaces with the back end and the machinery in
10439 (Expand_Allocator_Expression): Add necessary calls to
10440 Complete_Controlled_Allocation. Remove the retrieval of finalization
10441 lists. Update the calls to Make_Adjust_Call. Generate a call to
10442 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
10443 the associated collection.
10444 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
10445 Code clean up. Remove the retrieval of finalization lists and
10447 Update the call to Make_Init_Call. Generate a call to
10448 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
10449 the associated collection.
10450 (Get_Allocator_Final_List): Removed. Finalization lists are not
10452 (Suitable_Element): Remove the mention of Name_uController.
10453 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
10454 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
10455 the left hand side, carry out the assignment and adjust the left hand
10457 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
10458 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
10459 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
10460 BIP_Collection and BIPcollection.
10461 (Build_Heap_Allocator): New routine used to allocate the return object
10462 of a build-in-place function onto a collection.
10463 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
10464 (Expand_Call): Do not replace direct calls to Deep routines with their
10466 (Expand_N_Extended_Return_Statement): Give all variables shorter names
10467 and update their occurrences. Add a special return flag to monitor the
10468 [ab]normal execution of the function. The flag is set right before the
10470 Rewrite the mechanism used to allocate a build-in-place return object
10471 on the heap or on a storage pool.
10472 (Is_Direct_Deep_Call): New routine.
10473 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
10474 build-in-place function call instead of a final list. Build a call to
10475 Set_Finalize_Address_Ptr to decorate the associated collection.
10476 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
10477 order to name the build-in-place function call's result for later
10478 finalization. Add a collection to a build-in-place function call
10479 instead of a final list.
10480 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
10481 build-in-place function call instead of a final list. Remove the code
10482 which moves one final list and transforms it into the actual in a
10483 nested build-in-place call.
10484 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
10485 build-in-place function call instead of a final list.
10486 (Move_Final_List): Removed.
10487 (Needs_BIP_Collection): New routine.
10488 (Needs_BIP_Final_List): Removed.
10489 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
10490 enumeration type BIP_Formal_Kind.
10491 Update the related comment.
10492 (Needs_BIP_Collection): New routine.
10493 (Needs_BIP_Final_List): Removed.
10494 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
10495 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
10496 majority of subprograms in this unit. Add Name_Finalize_Address to
10497 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
10498 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
10499 statements for an array type.
10500 (Build_Adjust_Statements): Create the adjust statements for a record
10502 (Build_Cleanup_Statements): New routine. A procedure which given any
10503 construct containing asynchronous calls, references to _master, or is a
10504 task body, a task allocation or a protected body produces the necessary
10505 runtime calls to clean up these constructs.
10506 (Build_Exception_Handler): New routine.
10507 (Build_Final_List): Removed.
10508 (Build_Finalization_Collection): New routine. A core procedure which
10509 creates a collection to service heap allocated controlled objects
10510 associated with an access-to-controlled type.
10511 (Build_Finalize_Statements): Create the finalization statements for a
10513 (Build_Finalizer): New routine. A core procedure which given any
10514 construct with declarations and/or statements detects all objects which
10515 need any type of clean up (controlled objects, protected objects) and
10516 generates all necessary code to clean up the said objects in the proper
10518 (Build_Finalizer_Call): New routine.
10519 (Build_Initialize_Statements): Create the initialization statements for
10520 an array type. The generated routine contains code to finalize partially
10521 initialized arrays.
10522 (Build_Object_Declarations): New routine.
10523 (Build_Raise_Statement): New routine.
10524 (Clean_Simple_Protected_Objects): Removed.
10525 (Controller_Component): Removed.
10526 (Enclosing_Function): New routine.
10527 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
10528 either declarations or statements or both.
10529 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
10530 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
10532 (Find_Final_List): Removed.
10533 (Global_Flist_Ref): Removed.
10534 (In_Finalization_Root): Removed.
10535 (Insert_Actions_In_Scope_Around): Determine the range of the transient
10536 scope in terms of tree nodes. Process all transient variables within
10538 (Make_Adjust_Call): Rewritten. There is no longer an attach call
10539 generated after the adjust.
10540 (Make_Attach_Call): Removed.
10541 (Make_Call): New routine.
10542 (Make_Clean): Removed.
10543 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
10545 (Make_Deep_Proc): Rewritten to generate the new profile signature used
10547 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
10549 (Make_Final_Call): Modified to simply create a call to either
10550 Deep_Finalize or Finalize.
10551 (Make_Finalize_Address_Body): New routine.
10552 (Make_Finalize_Address_Stmts): New routine. A function which produces
10553 TSS primitive Finalize_Address used in conjunction with heap allocated
10554 controlled objects.
10555 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
10556 (Make_Init_Call): Rewritten. There is no longer an attach call
10557 generated after initialization.
10558 (Make_Local_Deep_Finalize): New routine.
10559 (Make_Set_Finalize_Address_Ptr_Call): New routine.
10560 (Make_Transient_Block): Remove the finalization list retrieval and
10562 (Needs_Finalization): Moved to Exp_Util.
10563 (Parent_Field_Type): New routine.
10564 (Preprocess_Components): New routine.
10565 (Process_Transient_Objects): New routine.
10566 (Wrap_HSS_In_Block): New routine.
10567 (Wrap_Transient_Declaration): Remove finalization list management and
10568 controller insertion.
10569 (Wrap_Transient_Expression): Code reformatting.
10570 (Wrap_Transient_Statement): Code reformatting.
10571 * exp_ch7.ads (Build_Final_List): Removed.
10572 (Build_Finalization_Collection): New routine.
10573 (Build_Raise_Statement): New routine.
10574 (Controller_Component): Removed.
10575 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
10576 (Find_Final_List): Removed.
10577 (In_Finalization_Root): Removed.
10578 (Is_Simple_Protected_Type): Update related comment.
10579 (Make_Adjust_Call): New parameter profile and associated comments.
10580 (Make_Attach_Call): Removed.
10581 (Make_Final_Call): New parameter profile and associated comments.
10582 (Make_Finalize_Address_Body): New routine.
10583 (Make_Init_Call): New parameter profile and associated comments.
10584 (Make_Local_Deep_Finalize): New routine.
10585 (Make_Set_Finalize_Address_Ptr_Call): New routine.
10586 (Needs_Finalization): Moved to Exp_Util.
10587 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
10588 (Expand_N_Protected_Body): Remove the handling of finalization lists.
10589 (Find_Protection_Type): Moved to Exp_Util.
10590 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
10591 (Make_DT): Update sequence of dispatch table initialization. Remove the
10592 initialization of field RC_Offset. Add initialization of field Needs_
10594 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
10595 Reimplement how an object is first finalized, then deallocated.
10596 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
10598 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
10599 Register TSS_Finalize_Address with type TSS_Names.
10600 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
10601 procedure provides the interface between an allocation / deallocation
10602 and the support machinery in Ada.Finalization.Heap_Management.
10603 (Find_Init_Call): Code reformatting.
10604 (Find_Init_Call_In_List): Code reformatting.
10605 (Find_Protection_Type): Moved from Exp_Ch9.
10606 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
10607 (Has_Controlled_Coextensions): Removed.
10608 (Has_Controlled_Objects): New routine.
10609 (In_Library_Level_Package_Body): New routine.
10610 (Insert_Action_After): New routine.
10611 (Is_Finalizable_Transient): New routine. This predicate determines
10612 whether an object declaration is one of the many variants of controlled
10614 (Is_Null_Access_BIP_Func_Call): New routine.
10615 (Is_Non_BIP_Func_Call): New routine.
10616 (Is_Related_To_Func_Return): New routine.
10617 (Needs_Finalization): Moved from Exp_Ch7.
10618 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
10619 (Find_Protection_Type): Moved from Exp_Ch9.
10620 (Has_Controlled_Coextensions): Removed.
10621 (Has_Controlled_Objects): New routine.
10622 (In_Library_Level_Package_Body): New routine.
10623 (Insert_Action_After): New routine.
10624 (Is_Finalizable_Transient): New routine.
10625 (Is_Null_Access_BIP_Func_Call): New routine.
10626 (Is_Non_BIP_Func_Call): New routine.
10627 (Is_Related_To_Func_Return): New routine.
10628 (Needs_Finalization): Moved from Exp_ch7.
10629 * expander.adb (Expand): Add a case for N_Free_Statement.
10630 * freeze.adb (Freeze_All): Replace the generation of a finalization
10631 list with a collection for access-to-controlled types.
10632 (Freeze_Entity): Code reformatting.
10633 (Freeze_Record_Type): Remove the freezing of a record controller
10635 (Freeze_Subprogram): Code reformatting.
10636 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
10638 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
10639 has a library-level finalizer.
10640 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
10641 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
10642 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
10643 files. Add a-fihema to the list of object files.
10645 Alphabetize the associations in type Is_Parameterless_Attribute.
10646 * rtsfind.ads: Ada.Finalization_List.Controller and
10647 System.Finalization_Implementation are no longer a GNAT unit.
10648 Update the range of type Ada_Finalization_Child. Remove the following
10649 recoverable entities:
10651 RE_Attach_To_Final_List
10655 RE_Finalizable_Ptr_Ptr
10656 RE_Global_Final_List
10657 RE_Limited_Record_Controller
10660 RE_Record_Controller
10661 RE_Simple_List_Controller
10663 Add the following recoverable entities:
10665 RE_Add_Offset_To_Address
10669 RE_Exception_Identity
10670 RE_Finalization_Collection
10671 RE_Finalization_Collection_Ptr
10672 RE_Needs_Finalization
10673 RE_Save_Library_Occurrence
10674 RE_Set_Finalize_Address_Ptr
10675 RE_Set_Storage_Pool_Ptr
10677 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
10679 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
10680 (First_Stored_Discriminant): Remove the mention of Name_uController.
10681 * sem_aux.ads: Comment reformatting.
10682 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
10683 to redecorate an already existing class-wide type.
10684 (Decorate_Tagged_Type): New parameter profile and associated comment.
10685 Create a "shadow class-wide type" for a shadow entity.
10686 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
10687 of the final chain along with the associated comment.
10688 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
10689 Full_Desig and set it to the full view of the designated type.
10690 Initialize the finalization collection to empty.
10691 (Build_Derived_Record_Type): Alphabetize local variables. Code
10693 (Collect_Fixed_Components): Remove the mention of Name_uController.
10694 (Create_Constrained_Components): Remove the mention of Name_uController.
10695 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
10696 class-wide type of a shadow entity.
10697 (Process_Full_View): Update the machinery which marks type
10698 Limited_Controlled's entity as limited.
10699 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
10700 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
10701 list, instead make a collection build-in-place formal.
10702 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
10703 a designated type in order to establish a match between the renaming
10704 and the renamed entity.
10705 (Find_Selected_Component): Add guard to prevent spurious exceptions
10706 from being raised on .NET/JVM.
10707 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
10708 to the list of primitive that need special processing. Update arrays
10709 C_Names and D_Names.
10710 (Replace_Types): Handle class-wide types.
10711 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
10712 different parameter profile, look at the first formal.
10713 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
10714 use clauses for Exp_Util.
10715 * sem_res.adb: Remove with and use clauses for Elists.
10716 (Propagate_Coextensions): Removed.
10717 (Resolve_Allocator): Do not propagate the list of coextensions from one
10718 allocator to another.
10719 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
10720 Deaccessed_T to Desig_Typ.
10721 (Enter_Name): Remove the mention of Name_uController.
10722 (Gather_Components): Remove the mention of Name_uController.
10723 (Incomplete_Or_Private_View): New routine.
10724 (Is_Coextension_Root): Removed.
10725 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
10726 * sem_util.ads (Incomplete_Or_Private_View): New routine.
10727 (Is_Coextension_Root): Removed.
10728 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
10729 Controlled types are now derived from a null tagged record. Remove
10730 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
10731 * sinfo.adb (Coextensions): Removed.
10732 (Set_Coextensions): Removed.
10733 * sinfo.ads: Remove Coextensions from the explanation of node fields
10734 and its uses in nodes.
10735 Update the field usage of N_Allocator.
10736 (Coextensions): Removed along with its pragma Inline.
10737 (Set_Coextensions): Removed along with its pragma Inline.
10738 * snames.ads-tmpl: Remove names
10743 Name_uLocal_Final_List
10744 Name_Finalization_Root
10751 Name_Finalize_Address
10752 * s-pooglo.adb (Allocate): Add overriding indicator.
10753 (Deallocate): Add overriding indicator.
10754 (Storage_Size): Add overriding indicator.
10755 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
10756 than Finalize_Global_List.
10757 (Null_Finalize_Global_List): Removed.
10758 (Save_Library_Occurrence): New routine.
10759 * s-soflin.ads: Remove variable Finalize_Global_List along with its
10760 initialization. Add variable Finalize_Library_Objects along with its
10761 pragma Export. Add variables Library_Exception and
10762 Library_Exception_Set along with their pragma Export.
10763 (Null_Finalize_Global_List): Removed.
10764 (Save_Library_Occurrence): New routine.
10765 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
10766 rather than Finalize_Global_List.
10767 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
10768 of the constructed node.
10770 2011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10772 * link.c: Include "auto-host.h" before system headers.
10774 2011-08-03 Vincent Celier <celier@adacore.com>
10776 * make.adb (Gnatmake): Add to table Library_Projs only library projects
10777 that are not extended. Do not check if a library project that is
10778 extended should be regenerated. Do not add to table Library_Paths the
10779 libraries that are in extended projects. Link only with libraries that
10780 are in libray projects that are not extended.
10781 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
10782 for a library project that is extended.
10784 2011-08-03 Gary Dismukes <dismukes@adacore.com>
10786 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
10787 conforming subprogram renamings that appear to be completions if they
10788 are not fully conformant.
10789 Such renamings are homographs but not completions.
10790 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
10791 names in a subprogram renaming that appears in an instance.
10793 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10795 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
10796 not immutably limited, build actual subtype from expression to provide
10797 proper bounds to caller.
10799 2011-08-03 Gary Dismukes <dismukes@adacore.com>
10801 * sem_ch8.adb: Minor comment correction.
10803 2011-08-03 Thomas Quinot <quinot@adacore.com>
10805 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
10806 returning a limited array, use an extended return statement.
10808 2011-08-03 Vincent Celier <celier@adacore.com>
10810 * make.adb (Initialize): If --subdirs= is used, but no project file is
10811 specified, attempt to create the specify subdir if it does not already
10812 exist and use it as the object directory as if -D had been specified.
10814 2011-08-03 Arnaud Charlet <charlet@adacore.com>
10816 * s-tpopsp-vms.adb: New file.
10817 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
10818 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
10820 2011-08-03 Emmanuel Briot <briot@adacore.com>
10822 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
10825 2011-08-03 Yannick Moy <moy@adacore.com>
10827 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
10828 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
10829 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
10830 detect that an array has static bounds.
10832 2011-08-03 Thomas Quinot <quinot@adacore.com>
10834 * exp_dist.adb: Minor reformatting.
10836 2011-08-03 Arnaud Charlet <charlet@adacore.com>
10838 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
10839 (ATCB_Key): Removed, not always used.
10841 2011-08-03 Emmanuel Briot <briot@adacore.com>
10843 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
10844 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
10845 most remaining global variables.
10847 2011-08-03 Robert Dewar <dewar@adacore.com>
10849 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
10850 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
10853 2011-08-03 Javier Miranda <miranda@adacore.com>
10855 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
10856 that must be passed by copy in VM targets.
10858 2011-08-03 Emmanuel Briot <briot@adacore.com>
10860 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
10861 duplicates a similar htable now in the project tree.
10863 2011-08-03 Claire Dross <dross@adacore.com>
10865 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
10866 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
10867 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
10868 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
10869 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
10870 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
10871 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
10874 2011-08-03 Arnaud Charlet <charlet@adacore.com>
10876 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
10877 (ATCB_Key): Removed, not always used.
10878 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
10879 s-taprop-posix.adb.
10880 * s-tpopsp-tls.adb: New file.
10881 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
10882 x86/x64/ia64/powerpc/sparc Linux.
10884 2011-08-03 Arnaud Charlet <charlet@adacore.com>
10886 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
10887 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
10889 2011-08-03 Thomas Quinot <quinot@adacore.com>
10891 * rtsfind.ads, exp_dist.adb, exp_dist.ads
10892 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
10893 Fix type selection for mapping integer types to PolyORB types.
10895 2011-08-03 Bob Duff <duff@adacore.com>
10897 * sem_ch7.adb: Minor comment clarification.
10899 2011-08-03 Bob Duff <duff@adacore.com>
10901 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
10902 an error analyzing a choice, skip further processing. Further
10903 processing could cause a crash or cascade errors.
10905 2011-08-03 Emmanuel Briot <briot@adacore.com>
10907 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
10908 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
10909 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
10910 prj-env.ads (Shared_Project_Tree_Data): new type
10911 An aggregate project and its aggregated trees need to share the common
10912 data structures used for lists of strings, packages,... This makes the
10913 code simpler since otherwise we have to pass the root tree (also used
10914 for the configuration file data) in addition to the current project
10915 tree. This also avoids ambiguities as to which tree should be used.
10916 And finally this saves a bit of memory.
10917 (For_Every_Project_Imported): new parameter Tree.
10918 Since aggregated projects are using a different tree, we need to let
10919 the caller know which tree to use to manipulate the returned project.
10921 2011-08-03 Robert Dewar <dewar@adacore.com>
10923 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
10924 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
10925 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
10926 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
10928 2011-08-03 Javier Miranda <miranda@adacore.com>
10930 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
10931 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
10933 2011-08-03 Bob Duff <duff@adacore.com>
10935 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
10938 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
10940 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
10941 g-sehash.ads: Fix typo. Update header.
10943 2011-08-03 Thomas Quinot <quinot@adacore.com>
10945 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
10948 2011-08-03 Gary Dismukes <dismukes@adacore.com>
10950 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
10951 prefixes of private types along with records, since the selector may be
10953 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
10954 private types along with records, since the selector may be a
10957 2011-08-03 Emmanuel Briot <briot@adacore.com>
10959 * prj-pp.adb (Pretty_Print): Remove trailing blank line.
10961 2011-08-03 Javier Miranda <miranda@adacore.com>
10963 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
10964 Tagged_Type_Expansion.
10966 2011-08-03 Yannick Moy <moy@adacore.com>
10968 * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
10969 violation when the argument of concatenation is the name of a
10972 2011-08-03 Emmanuel Briot <briot@adacore.com>
10974 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
10975 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
10976 (Process_Declarative_Items): new parameter Child_Env.
10978 2011-08-03 Yannick Moy <moy@adacore.com>
10980 * alfa.ads: Update format of ALFA section in ALI file in order to
10981 add a mapping from bodies to specs when both are present.
10982 (ALFA_Scope_Record): Add components for spec file/scope.
10983 * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
10985 * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
10986 collected, fill in the spec information when relevant.
10987 * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
10990 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
10992 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
10993 code unit to decide whether to add internally generated subprograms.
10995 2011-08-03 Javier Miranda <miranda@adacore.com>
10997 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
10998 * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
10999 be handled by copy in VM targets.
11001 2011-08-03 Emmanuel Briot <briot@adacore.com>
11003 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
11004 code with Makeutl.Get_Switches.
11005 * prj-tree.adb: Update comment.
11007 2011-08-03 Thomas Quinot <quinot@adacore.com>
11009 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
11010 subprogram with a limited formal that does not support external
11013 2011-08-03 Yannick Moy <moy@adacore.com>
11015 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
11017 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
11018 not from current unit in two phases, because it is not possible to
11019 change the table while iterating over its content.
11020 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
11022 2011-08-03 Sergey Rybin <rybin@adacore.com>
11024 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
11025 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
11027 2011-08-03 Ed Schonberg <schonberg@adacore.com>
11029 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
11030 and the component type is composite, this is ambiguous for predefined
11031 concatenation, but if the node is not overloaded and the entity is a use
11032 -defined function its profile can be used to resolve that aggregate.
11034 2011-08-03 Robert Dewar <dewar@adacore.com>
11036 * exp_ch4.adb: Minor code cleanup.
11038 2011-08-03 Thomas Quinot <quinot@adacore.com>
11040 * exp_dist.adb: Do not generate distribution stubs if serious errors
11041 have been diagnosed.
11043 2011-08-03 Ed Schonberg <schonberg@adacore.com>
11045 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
11046 the first formal of a primitive operation, go to the base type to
11047 handle properly an access to a derived type with constrained
11049 * sem_type.adb (Disambiguate): an immediately visible operator hides a
11050 user-defined function that is only use-visible.
11052 2011-08-03 Robert Dewar <dewar@adacore.com>
11054 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
11055 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
11056 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
11057 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
11058 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
11059 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
11060 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
11061 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
11063 2011-08-03 Robert Dewar <dewar@adacore.com>
11065 * repinfo.adb (List_Mechanism): Add handling of
11066 Convention_Ada_Pass_By_XXX.
11067 * sem_mech.adb (Set_Mechanism): Ditto.
11068 * sem_prag.adb (Process_Convention): Add entries for
11069 Convention_Ada_Pass_By_XXX.
11070 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
11072 2011-08-03 Pascal Obry <obry@adacore.com>
11074 * makeutl.adb: Minor reformatting.
11076 2011-08-03 Vincent Celier <celier@adacore.com>
11079 (Get_File_Name) If the file cannot be found when there are no config
11080 pragmas file and May_Fail is True, return No_File instead of the file
11081 name, to be consistent.
11083 2011-08-03 Pascal Obry <obry@adacore.com>
11085 * adaint.c (__gnat_is_executable_file_attr): Avoid access
11088 2011-08-03 Javier Miranda <miranda@adacore.com>
11091 (Same_Representation): In VM targets the representation of arrays with
11092 aliased components differs from arrays with non-aliased components.
11094 2011-08-03 Emmanuel Briot <briot@adacore.com>
11096 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
11097 not systematically lower case attribute indexes that contain no "."
11098 Fix definition of several Naming attributes, which take
11099 a unit name as index and therefore should be case insensitive.
11100 Minor refactoring (reduce length of variable names).
11102 2011-08-03 Emmanuel Briot <briot@adacore.com>
11104 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
11106 2011-08-03 Emmanuel Briot <briot@adacore.com>
11108 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
11109 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
11110 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
11111 prj-tree.ads (Prj.Tree.Environment): new type.
11113 2011-08-03 Emmanuel Briot <briot@adacore.com>
11115 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
11116 prj-tree.adb, prj-tree.ads (Environment): new type.
11118 2011-08-03 Emmanuel Briot <briot@adacore.com>
11120 * prj-tree.ads: Remove unused variable.
11122 2011-08-03 Yannick Moy <moy@adacore.com>
11124 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
11125 issuing messages related to SPARK restriction violation.
11127 2011-08-03 Ed Schonberg <schonberg@adacore.com>
11129 * sem_ch6.adb: guard against error nodes in return statements.
11131 2011-08-03 Arnaud Charlet <charlet@adacore.com>
11133 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
11134 a warning can only appear on a configuration file, so emit warning
11135 without further checks.
11137 2011-08-03 Arnaud Charlet <charlet@adacore.com>
11139 * s-interr.ads: add overriding keyword.
11141 2011-08-03 Geert Bosch <bosch@adacore.com>
11143 * exp_attr.adb: Fix minor typo.
11145 2011-08-03 Ed Schonberg <schonberg@adacore.com>
11147 * par-ch4.adb: improve error recovery.
11149 2011-08-03 Emmanuel Briot <briot@adacore.com>
11151 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
11152 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
11153 to Errout_Handling.
11155 2011-08-03 Emmanuel Briot <briot@adacore.com>
11157 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
11158 "external" as an attribute name in aggregate projects.
11160 2011-08-03 Jose Ruiz <ruiz@adacore.com>
11162 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
11163 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
11164 from 0, so we need to adjust.
11166 2011-08-03 Emmanuel Briot <briot@adacore.com>
11168 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
11169 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
11171 2011-08-03 Yannick Moy <moy@adacore.com>
11173 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
11174 restriction on overloaded entity if the entity is not an operator.
11176 2011-08-03 Yannick Moy <moy@adacore.com>
11178 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
11179 restrict.ads: Rename remaining Check_Formal_Restriction* into
11180 Check_SPARK_Restriction*.
11182 2011-08-03 Emmanuel Briot <briot@adacore.com>
11184 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
11185 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
11187 (Project_Empty): removed
11188 (Empty_Project): new parameter Qualifier
11189 This is used to have fields specific to aggregate projects, cleaner
11190 New field to store the list of aggregated projects.
11191 (Check_Aggregate_Project): removed
11192 (Process_Aggregated_Projects, Free): new subprograms.
11194 2011-08-03 Olivier Hainque <hainque@adacore.com>
11196 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
11198 2011-08-03 Ed Schonberg <schonberg@adacore.com>
11200 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
11201 explicit dereference of an unconstrained type, create a constrained
11202 subtype for it, as is done for function calls that return an
11203 unconstrained type.
11205 2011-08-03 Thomas Quinot <quinot@adacore.com>
11207 * g-pehage.adb (Finalize): Avoid possible double-free.
11209 2011-08-03 Steve Baird <baird@adacore.com>
11211 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
11212 Elab_Spec/Body attrs in CodePeer_Mode.
11214 2011-08-03 Javier Miranda <miranda@adacore.com>
11216 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
11217 low bound is not known at compile time but they have no others choice.
11218 Done because in this case the bounds can be obtained directly from the
11221 2011-08-03 Ed Falis <falis@adacore.com>
11223 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
11224 on VxWorks SMP. Remove unusable constant ANY_CPU.
11226 2011-08-03 Emmanuel Briot <briot@adacore.com>
11228 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
11229 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
11230 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
11231 Prj.Env.Initialize_Empty): new subprograms
11232 (Get_Env, Find_Project): remove parameter Target_Name.
11234 2011-08-03 Gary Dismukes <dismukes@adacore.com>
11236 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
11237 as a condition for the delayed call to Derived_Subprograms done for the
11238 case of the rewriting of a derived type that constrains the
11239 discriminants of its parent type.
11240 Avoids redundant subprogram derivations for private subtype derivations.
11242 2011-08-03 Javier Miranda <miranda@adacore.com>
11244 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
11245 Build_Record_Aggr_Code.
11246 (Build_Record_Aggr_Code): Add missing support to initialize hidden
11247 discriminants in extension aggregates.
11249 2011-08-03 Emmanuel Briot <briot@adacore.com>
11251 * prj-pp.adb (Print): also output project qualifiers, since in
11252 particular "aggregate" is mandatory in an aggregate project.
11254 2011-08-03 Emmanuel Briot <briot@adacore.com>
11256 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
11257 (Debug_Output): new function.
11259 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
11261 * gnat_ugn.texi: Document -Wstack-usage.
11262 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
11264 2011-08-03 Thomas Quinot <quinot@adacore.com>
11266 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
11267 have keyword LIMITED.
11269 2011-08-03 Yannick Moy <moy@adacore.com>
11271 * alfa.adb, alfa.ads, alfa_test.adb: New files.
11272 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
11273 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
11274 section (does not happen in compiler, only if code directly calls
11276 * get_alfa.adb, get_alfa.ads: New files.
11277 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
11279 * lib-xref-alfa.adb: New file.
11280 * lib-xref.adb, lib-xref.ads
11281 (Xref_Entry): redefine information needed in cross-references for ALFA.
11282 Push ALFA treatments in separated local package.
11283 (Enclosing_Subpragram_Or_Package): treat specially subprogram
11284 identifiers. Return entity of package body instead of spec. Return
11285 Empty for a scope with no location.
11286 (Generate_Reference): adapt to new components for ALFA information.
11287 Remove the need for D references on definitions.
11288 (Is_Local_Reference): moved to ALFA local package
11289 (Output_References): extract subfunction as Extract_Source_Name
11290 (Output_Local_References): remove procedure, replaced by filtering of
11291 cross-references in package ALFA and printing in Put_ALFA.
11292 (Write_Entity_Name): remove procedure
11293 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
11294 print exact name of entity as it appears in source file
11295 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
11296 * put_alfa.adb, put_alfa.ads: New files.
11297 * xref_lib.adb (Search_Xref): protect read of cross-references against
11298 reading other sections of the ALI file, in gnatxref
11299 (Search): protect read of cross-references against reading other
11300 sections of the ALI file, in gnatfind.
11301 * gcc-interface/Make-lang.in: Update dependencies.
11303 2011-08-03 Thomas Quinot <quinot@adacore.com>
11305 * sem_ch3.adb: Minor reformatting.
11307 2011-08-03 Jose Ruiz <ruiz@adacore.com>
11309 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
11310 raising an exception.
11312 2011-08-03 Ed Schonberg <schonberg@adacore.com>
11314 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
11315 type, always use 1 as the lower bound or string, even if lower bound of
11316 context is not static, to handle properly null strings in a non-static
11319 2011-08-03 Bob Duff <duff@adacore.com>
11321 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
11322 always legal on the right-hand side of an assignment statement; there
11323 is always an applicable index constraint in this case. Therefore, the
11324 check for Pkind = N_Assignment_Statement is now unconditional -- it
11325 doesn't depend on whether Is_Constrained (Typ).
11327 2011-08-03 Robert Dewar <dewar@adacore.com>
11329 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
11331 2011-08-03 Ed Schonberg <schonberg@adacore.com>
11333 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
11334 for an itype created within a generic unit.
11336 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
11338 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
11339 suppresses all inlining.
11341 2011-08-03 Robert Dewar <dewar@adacore.com>
11343 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
11344 exp_aggr.adb: Minor reformatting.
11346 2011-08-03 Thomas Quinot <quinot@adacore.com>
11348 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
11349 tagged assignment when discriminant checks are suppressed. This is
11350 useless and extremely costly in terms of static stack usage.
11352 2011-08-03 Bob Duff <duff@adacore.com>
11354 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
11355 of generics, because this leads to the wrong entity in the wrong scope,
11356 causing (e.g.) pragma Export_Procedure to get an error if the entity is
11358 (Process_Interface_Name): Follow Alias for instances of generics, to
11359 correct for the above change.
11361 2011-08-03 Ed Schonberg <schonberg@adacore.com>
11363 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
11364 is an integer literal it is always safe to replace the reference. In
11365 addition, if the reference appears in the generated code for an object
11366 declaration it is necessary to copy because otherwise the reference
11367 might be to the uninitilized value of the discriminant of the object
11370 2011-08-03 Pascal Obry <obry@adacore.com>
11372 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
11373 ACL used, in this case we want to check for ending .exe, not .exe
11374 anywhere in the path.
11376 2011-08-03 Sergey Rybin <rybin@adacore.com>
11378 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
11379 the tree structure (semantic decoration of references to record
11382 2011-08-03 Gary Dismukes <dismukes@adacore.com>
11384 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
11385 choices of a named array aggregate, bail out when any choices are
11386 marked as Errors_Posted.
11388 2011-08-03 Ed Schonberg <schonberg@adacore.com>
11390 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
11391 in which entity is frozen, to handle properly loop variables in
11394 2011-08-03 Ed Schonberg <schonberg@adacore.com>
11396 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
11397 subtype is not static, compute the upper bound using attributes, to
11398 handle properly index types that are not integer types.
11400 2011-08-03 Bob Duff <duff@adacore.com>
11402 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
11403 Update copyright notice.
11405 2011-08-03 Ed Schonberg <schonberg@adacore.com>
11407 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
11408 Original_Discriminant if within an instance.
11409 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
11411 2011-08-03 Thomas Quinot <quinot@adacore.com>
11413 * einfo.ads: Minor reformatting.
11415 2011-08-03 Ed Schonberg <schonberg@adacore.com>
11417 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
11418 composite type with an unfrozen subcomponent, in the profile of a
11419 primitive operation.
11421 2011-08-03 Robert Dewar <dewar@adacore.com>
11423 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
11425 2011-08-03 Ed Schonberg <schonberg@adacore.com>
11427 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
11428 unconstrained type with discriminants is initialized with an aggregate,
11429 use the constrained subtype of the aggregate as the type of the object,
11430 because it is immutable, and this allows the back-end to generate no
11431 code for the object declaration.
11433 2011-08-03 Robert Dewar <dewar@adacore.com>
11435 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
11436 comparison operand is variable, and turns out to be zero or negative.
11438 2011-08-03 Javier Miranda <miranda@adacore.com>
11441 (Expand_Dispatching_Constructor_Call): Disable expansion of
11442 code required for native targets. Done to avoid generating
11443 references to unavailable runtime entities in VM targets.
11445 (Expand_N_Object_Declaration): Add missing support to handle
11446 the explicit initialization of class-wide interface objects.
11449 2011-08-03 Matthew Heaney <heaney@adacore.com>
11451 * a-cobove.adb (Merge): Move source onto target, instead of using
11454 2011-08-03 Matthew Heaney <heaney@adacore.com>
11456 * a-cbdlli.adb (Splice): Move source items from first to last.
11458 2011-08-03 Yannick Moy <moy@adacore.com>
11460 * sem_util.ads: Add comment.
11462 2011-08-03 Javier Miranda <miranda@adacore.com>
11465 (Expand_Record_Aggregate): In VM targets disable the expansion into
11466 assignments of aggregates whose type is not known at compile time.
11468 2011-08-03 Ed Schonberg <schonberg@adacore.com>
11470 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
11471 protected entries and task entries, to build the proper renaming
11472 declaration for entry formals, used in debugging.
11473 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
11474 parameters in the same way.
11476 2011-08-02 Robert Dewar <dewar@adacore.com>
11478 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
11479 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
11480 code reorganization.
11482 2011-08-02 Robert Dewar <dewar@adacore.com>
11484 * debug.adb: Debug flag d.P to suppress length comparison optimization
11485 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
11486 comparison of Length by comparing First/Last instead.
11488 2011-08-02 Matthew Heaney <heaney@adacore.com>
11490 * a-cobove.ads: Code clean up.
11492 2011-08-02 Vincent Celier <celier@adacore.com>
11494 * adaint.c (file_names_case_sensitive_cache): New static int.
11495 (__gnat_get_file_names_case_sensitive): Cache the return value in
11496 file_names_case_sensitive_cache at the first invocation, to avoid
11497 multiple calls to getenv.
11499 2011-08-02 Bob Duff <duff@adacore.com>
11501 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
11503 2011-08-02 Yannick Moy <moy@adacore.com>
11505 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
11506 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
11507 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
11508 indicate that we are in a precondition or postcondition. This is used in
11509 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
11510 decide whether to flag the spec or body of the current subprogram as
11513 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
11515 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
11517 * a-extiin.ads: New file.
11519 2011-08-02 Bob Duff <duff@adacore.com>
11521 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
11522 now raises Name_Error instead of Use_Error in certain cases. The other
11523 parts of this AI were already implemented properly.
11525 2011-08-02 Vincent Celier <celier@adacore.com>
11527 * link.c: Only import "auto-host.h" when building the gnattools.
11529 2011-08-02 Yannick Moy <moy@adacore.com>
11531 * sem_util.adb: Inter-unit inlining does not work for a subprogram
11532 which calls a local subprogram, so extract subprogram
11533 from Mark_Non_ALFA_Subprogram_Body.
11535 2011-08-02 Javier Miranda <miranda@adacore.com>
11538 (Extract_Dispatching_Call): If the type of the dispatching object is an
11539 access type then return an explicit dereference in the Object out-mode
11542 2011-08-02 Gary Dismukes <dismukes@adacore.com>
11544 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
11545 compatibility checks for all indexes of an array subtype, not just the
11546 first. Reset Has_Dynamic_Range_Check on the subtype before each
11547 potential check to ensure that Insert_Range_Checks will not elide any
11548 of the dynamic checks.
11550 2011-08-02 Yannick Moy <moy@adacore.com>
11552 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
11553 SPARK restriction at parsing time.
11554 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
11555 directive only if the SPARK restriction is set for this unit.
11557 2011-08-02 Yannick Moy <moy@adacore.com>
11559 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
11560 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
11561 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
11562 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
11563 Mark_Non_ALFA_Subprogram_Body.
11564 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
11567 2011-08-02 Yannick Moy <moy@adacore.com>
11569 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
11572 2011-08-02 Robert Dewar <dewar@adacore.com>
11574 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
11575 exp_ch3.adb: Minor reformatting.
11577 2011-08-02 Emmanuel Briot <briot@adacore.com>
11579 * adaint.c (__gnat_locate_exec_on_path): only returns executable
11580 files, not any regular file.
11581 (__gnat_locate_file_with_predicate): new subprogram.
11583 2011-08-02 Yannick Moy <moy@adacore.com>
11585 * sinfo.adb, sinfo.ads: Restrict the use of flags
11586 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
11587 nodes, plus N_Subtype_Declaration for the 2nd one.
11589 2011-08-02 Sergey Rybin <rybin@adacore.com>
11591 * gnat_rm.texi: Ramification of pragma Eliminate documentation
11592 - fix bugs in the description of Source_Trace;
11593 - get rid of UNIT_NAME;
11595 2011-08-02 Javier Miranda <miranda@adacore.com>
11598 (Build_Dispatching_Requeue): Adding support for VM targets
11599 since we cannot directly reference the Tag entity.
11600 * exp_sel.adb (Build_K): Adding support for VM targets.
11601 (Build_S_Assignment): Adding support for VM targets.
11603 (Default_Prim_Op_Position): In VM targets do not restrict availability
11604 of predefined interface primitives to compiling in Ada 2005 mode.
11605 (Is_Predefined_Interface_Primitive): In VM targets this service is not
11606 restricted to compiling in Ada 2005 mode.
11607 (Make_VM_TSD): Generate code that declares and initializes the OSD
11608 record. Needed to support dispatching calls through synchronized
11611 (Make_Predefined_Primitive_Specs): Enable generation of predefined
11612 primitives associated with synchronized interfaces.
11613 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
11614 primitives associated with synchronized interfaces.
11616 2011-08-02 Yannick Moy <moy@adacore.com>
11618 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
11619 statements hidden in SPARK if preceded by the HIDE directive
11620 (Parse_Exception_Handlers): mark each exception handler in a sequence of
11621 exception handlers as hidden in SPARK if preceded by the HIDE directive
11622 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
11623 if starting with the HIDE directive
11624 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
11625 starting with the HIDE directive; mark the declarations in a private
11626 part as hidden in SPARK if the private part starts with the HIDE
11628 * restrict.adb, restrict.ads
11629 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
11630 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
11631 argument node belongs to a part which is hidden in SPARK
11632 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
11633 parts in SPARK; protect the possibly costly call to
11634 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
11635 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
11636 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
11637 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
11639 (Scan): recognize special comment starting with '#' and followed by
11640 SPARK keyword "hide" as a HIDE directive.
11642 2011-08-02 Yannick Moy <moy@adacore.com>
11644 * types.ads, erroutc.ads: Minor reformatting.
11646 2011-08-02 Vincent Celier <celier@adacore.com>
11648 * link.c: Add response file support for cross platforms.
11650 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11652 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
11653 in an association, set parent field of copy before partial analysis.
11654 * sem_res.adb (Resolve_Slice): create reference to itype only when
11655 expansion is enabled.
11657 2011-08-02 Yannick Moy <moy@adacore.com>
11659 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
11660 for new flag denoting which subprogram bodies are in ALFA
11661 * restrict.adb, sem_ch7.adb: Update comment
11662 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
11663 sem_ch9.adb, sem_res.adb: Add calls to
11664 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
11665 * sem_ch6.adb (Analyze_Function_Return): add calls to
11666 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
11667 middle of the body, and extended return.
11668 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
11669 False when missing return.
11670 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
11671 to True for subprograms whose spec is in ALFA. Remove later on the flag
11672 on the entity used for a subprogram body when there exists a separate
11674 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
11675 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
11676 False, otherwise do nothing.
11678 2011-08-02 Robert Dewar <dewar@adacore.com>
11680 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
11682 2011-08-02 Yannick Moy <moy@adacore.com>
11684 * sem_ch4.ads: minor formatting.
11686 2011-08-02 Yannick Moy <moy@adacore.com>
11688 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
11689 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
11690 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
11691 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
11692 opt.ads: cleanup of SPARK mode
11694 2011-08-02 Yannick Moy <moy@adacore.com>
11696 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
11698 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
11699 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
11701 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
11702 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
11703 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
11704 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
11706 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
11708 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
11709 functions whose return type is not in ALFA.
11710 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
11712 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
11713 parameter's type is not in ALFA.
11714 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
11717 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11719 * sem_ch6 (Analyze_Expression_Function): treat the function as
11720 Inline_Always, and introduce a subprogram declaration for it when it is
11722 * inline.adb (Add_Inlined_Body): recognize bodies that come from
11723 expression functions, so that the back-end can determine whether they
11724 can in fact be inlined.
11725 * sem_util.adb (Is_Expression_Function): predicate to determine whether
11726 a function body comes from an expression function.
11728 2011-08-02 Gary Dismukes <dismukes@adacore.com>
11730 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
11731 null exclusions to test Can_Never_Be_Null on the anonymous access types
11732 of the formals rather than testing the formals themselves. Exclude this
11733 check in cases where the Old_Formal is marked as a controlling formal,
11734 to avoid issuing spurious errors for bodies completing dispatching
11735 operations (due to the flag not getting set on controlling access
11736 formals in body specs).
11737 (Find_Corresponding_Spec): When checking full and subtype conformance of
11738 subprogram bodies in instances, pass Designated and E in that order, for
11739 consistency with the expected order of the formals (New_Id followed by
11742 2011-08-02 Robert Dewar <dewar@adacore.com>
11744 * sem_ch8.adb: Minor reformatting.
11746 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11748 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
11749 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
11750 primitive operations of class-wide actuals.
11752 2011-08-02 Javier Miranda <miranda@adacore.com>
11754 * exp_atag.ads, exp_atag.adb
11755 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
11756 since its value is implicitly passed in argument Typ.
11757 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
11758 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
11759 Build_Common_Dispatching_Select_Statements.
11761 2011-08-02 Robert Dewar <dewar@adacore.com>
11763 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
11764 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
11765 Minor reformatting.
11767 2011-08-02 Robert Dewar <dewar@adacore.com>
11769 * sem_res.adb: Minor reformatting.
11770 * sem_prag.adb: Minor reformatting.
11772 2011-08-02 Javier Miranda <miranda@adacore.com>
11774 * exp_atag.adb, exp_atags.ads
11775 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
11776 by the tagged type Entity. Required to use this routine in the VM
11777 targets since we do not have available the Tag entity in the VM
11780 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
11781 Ada.Tags has not been previously loaded.
11783 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
11784 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
11786 (Enclosing_Dynamic_Scope): Add missing support to handle the full
11787 view of enclosing scopes. Required to handle enclosing scopes that
11788 are synchronized types whose full view is a task type.
11790 (Build_VM_TSDs): Minor code improvement to avoid generating and
11791 analyzing lists with empty nodes.
11792 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
11793 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
11794 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
11795 (Make_Disp_Timed_Select_Body): Add support for VM targets.
11796 (Make_Select_Specific_Data_Table): Add support for VM targets.
11797 (Make_VM_TSD): Generate code to initialize the SSD structure of
11800 2011-08-02 Yannick Moy <moy@adacore.com>
11802 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
11803 cross-references section in ALI.
11804 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
11805 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
11807 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
11808 subprogram or package entity of a node
11809 (Is_Local_Reference_Type): new function returns True for references
11810 selected in local cross-references.
11811 (Lt): function extracted from Lt in Output_References
11812 (Write_Entity_Name): function extracted from Output_References
11813 (Generate_Definition): generate reference with type 'D' for definition
11814 of objects (object declaration and parameter specification), with
11815 appropriate locations and units, for use in local cross-references.
11816 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
11817 references of type 'I' for initialization in object definition.
11818 (Output_References): move part of function Lt and procedure
11819 Write_Entity_Name outside of the body. Ignore references of types 'D'
11820 and 'I' introduced for local cross-references.
11821 (Output_Local_References): new procedure to output the local
11822 cross-references sections.
11823 (Lref_Entity_Status): new array defining whether an entity is a local
11824 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
11825 with 'I' type when initialization expression is present.
11826 * get_scos.adb, get_scos.ads: Correct comments and typos
11828 2011-08-02 Javier Miranda <miranda@adacore.com>
11830 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
11832 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
11834 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
11837 2011-08-02 Vincent Celier <celier@adacore.com>
11839 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
11840 (No_Space_Img): New function
11841 (Find_Excluded_Sources): When reading from a file, record the file name
11842 and the line number for each excluded source.
11843 (Mark_Excluded_Sources): When reporting an error, if the excluded
11844 sources were read from a file, include file name and line number in
11847 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11849 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
11851 2011-08-02 Robert Dewar <dewar@adacore.com>
11853 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
11855 2011-08-02 Javier Miranda <miranda@adacore.com>
11857 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
11858 generation of TSDs to the DOTNET compiler.
11859 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
11860 generation of TSDs to the DOTNET compiler.
11862 2011-08-02 Javier Miranda <miranda@adacore.com>
11864 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
11865 record of all the tagged types declared inside library level package
11866 declarations, library level package bodies or library level subprograms.
11867 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
11868 associated with a given tagged type.
11869 (Build_VM_TSDs): New subprogram.
11870 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
11871 compilation units that are subprograms.
11872 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
11873 compilation units that are package bodies.
11874 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
11875 units that are a package declaration or a package instantiation.
11876 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
11877 reorganization to improve the error generated by the frontend when the
11878 function Ada.Tags.Secondary_Tag is not available.
11879 * rtsfind.ads (RE_Register_TSD): New runtime entity.
11880 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
11882 2011-08-02 Javier Miranda <miranda@adacore.com>
11884 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
11886 2011-08-02 Robert Dewar <dewar@adacore.com>
11888 * s-imenne.ads: Minor reformatting.
11890 2011-08-02 Robert Dewar <dewar@adacore.com>
11892 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
11893 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
11894 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
11896 2011-08-02 Robert Dewar <dewar@adacore.com>
11898 * einfo.ads (Materialize_Entity): Document this is only for renamings
11899 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
11900 required debug information in the case where we transform the object
11901 declaration into a renaming declaration.
11902 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
11904 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
11905 Materialize_Entity.
11907 2011-08-02 Robert Dewar <dewar@adacore.com>
11909 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
11910 Suppress_Init_Procs.
11911 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
11912 Suppress_Initialization/Initialization_Suppressed.
11913 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
11914 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
11915 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
11916 * sem_prag.adb: New processing for pragma Suppress_Initialization.
11918 2011-08-02 Robert Dewar <dewar@adacore.com>
11920 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
11921 Minor reformatting.
11923 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11925 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
11926 only have inheritable classwide pre/postconditions.
11928 2011-08-02 Javier Miranda <miranda@adacore.com>
11930 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
11931 * rtsfind.ads (RE_Check_TSD): New runtime entity.
11932 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
11933 checks if the external tag of a type is the same as the external tag
11934 of some other declaration.
11936 2011-08-02 Thomas Quinot <quinot@adacore.com>
11938 * s-taskin.ads: Minor reformatting.
11940 2011-08-02 Emmanuel Briot <briot@adacore.com>
11942 * g-comlin.adb (Display_Help): swap the order in which it prints the
11943 short help and the general usage.
11945 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11947 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
11948 the aspect declarations and attach them to the generic copy for
11949 subsequent analysis.
11950 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
11951 declarations of the generic tree to the new subprogram declarations.
11952 * sem_attr.adb (Check_Precondition_Postcondition): recognize
11953 conditions that apply to a subprogram instance.
11955 2011-08-02 Robert Dewar <dewar@adacore.com>
11957 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
11959 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11961 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
11962 private type with a tagged full view is not derived in the immediate
11963 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
11965 2011-08-02 Robert Dewar <dewar@adacore.com>
11967 * exp_ch4.adb: Minor reformatting.
11969 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11971 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
11972 Ada2012 iterator, the loop will be rewritten during expansion into a
11973 while loop with a cursor and an element declaration. Do not analyze the
11974 body in this case, because if the container is for indefinite types the
11975 actual subtype of the elements will only be determined when the cursor
11976 declaration is analyzed.
11978 2011-08-02 Arnaud Charlet <charlet@adacore.com>
11980 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
11981 size/alignment related attributes in CodePeer_Mode.
11983 2011-08-02 Gary Dismukes <dismukes@adacore.com>
11985 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
11986 Prepend_Element, since this can result in the operation getting the
11987 wrong slot in the full type's dispatch table if the full type has
11988 inherited operations. The incomplete type's operation will get added
11989 to the proper position in the full type's primitives
11990 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
11991 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
11992 dispatching operations, since there are cases where nonprimitive
11993 subprograms can get added to the list of incomplete dependents (such
11994 as subprograms in nested packages).
11995 * sem_ch6.adb (Process_Formals): First, remove test for being in a
11996 private part when determining whether to add a primitive with a
11997 parameter of a tagged incomplete type to the Private_Dependents list.
11998 Such primitives can also occur in the visible part, and should not have
11999 been excluded from being private dependents.
12000 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
12001 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
12002 list of a Taft-amendment incomplete type is a primitive before issuing
12003 an error that the full type must appear in the same unit. There are
12004 cases where nonprimitives can be in the list (such as subprograms in
12006 * sem_disp.adb (Derives_From): Use correct condition for checking that
12007 a formal's type is derived from the type of the corresponding formal in
12008 the parent subprogram (the condition was completely wrong). Add
12009 checking that was missing for controlling result types being derived
12010 from the result type of the parent operation.
12012 2011-08-02 Yannick Moy <moy@adacore.com>
12014 * errout.adb (First_Node): minor renaming
12015 * restrict.adb (Check_Formal_Restriction): put restriction warning on
12018 2011-08-02 Yannick Moy <moy@adacore.com>
12020 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
12021 before accessing operands.
12022 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
12023 decide whether an initialization expression respects SPARK rules, as
12024 the plain node is the expanded one. This allows for more valid warnings
12026 * gnat_rm.texi: Minor update.
12028 2011-08-02 Arnaud Charlet <charlet@adacore.com>
12030 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
12033 2011-08-02 Robert Dewar <dewar@adacore.com>
12035 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
12037 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
12039 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
12040 loop statements and the element renaming declaration with a block when
12041 the element type is controlled.
12043 2011-08-02 Yannick Moy <moy@adacore.com>
12045 * sinfo.ads: Minor formatting.
12047 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12049 * sem_aggr.adb (Add_Association): if the association has a box and no
12050 expression, use the Sloc of the aggregate itself for the new
12052 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
12055 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
12057 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
12058 When a container is provided via a function call, generate a renaming
12059 of the function result. This avoids the creation of a transient scope
12060 and the premature finalization of the container.
12061 * exp_ch7.adb (Is_Container_Cursor): Removed.
12062 (Wrap_Transient_Declaration): Remove the supression of the finalization
12063 of the list controller when the declaration denotes a container cursor,
12066 2011-08-02 Yannick Moy <moy@adacore.com>
12068 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
12069 node is from source, instead of the original node being from source.
12071 (Resolve_Array_Aggregate): refine the check for a static expression, to
12072 recognize also static ranges
12073 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
12074 Array_Type_Declaration): postpone the test for the type being a subtype
12075 mark after the type has been resolved, so that component-selection and
12076 expanded-name are discriminated.
12077 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
12078 to distinguish the case of an iteration scheme, so that an error is
12079 issed on a non-static range in SPARK except in an iteration scheme.
12080 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
12081 In_Iter_Schm = True.
12082 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
12083 user-defined operators so that they are allowed in renaming
12085 (Find_Selected_Component): refine the check for prefixing of operators
12086 so that they are allowed in renaming. Move the checks for restrictions
12087 on selector name after analysis discriminated between
12088 component-selection and expanded-name.
12089 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
12090 concatenation argument of string type if it is static.
12091 * sem_util.adb, sem_util.ads
12092 (Check_Later_Vs_Basic_Declarations): add a new function
12093 Is_Later_Declarative_Item to decice which declarations are allowed as
12094 later items, in the two different modes Ada 83 and SPARK. In the SPARK
12095 mode, add that renamings are considered as later items.
12096 (Enclosing_Package): new function to return the enclosing package
12097 (Enter_Name): correct the rule for homonyms in SPARK
12098 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
12099 from source (result of expansion) to avoid issuing wrong warnings.
12101 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12103 * errout.adb: On anything but an expression First_Node returns its
12106 2011-08-02 Pascal Obry <obry@adacore.com>
12108 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
12110 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
12112 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
12113 Set the associated loop as the related expression of internally
12115 * exp_ch7.adb (Is_Container_Cursor): New routine.
12116 (Wrap_Transient_Declaration): Supress the finalization of the list
12117 controller when the declaration denotes a container cursor.
12119 2011-08-02 Yannick Moy <moy@adacore.com>
12121 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
12123 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
12124 expression is a simple expression. This check cannot be performed in
12125 the semantics, so just drop it.
12126 (P_Index_Or_Discriminant_Constraint): move check that the index or
12127 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
12128 semantics. Other cases were previously checked in the semantics.
12129 * par-ch4.adb (P_Name): move checks that a selector name is not
12130 character literal or an operator symbol to Find_Selected_Component in
12132 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
12133 declarations are not placed after later declarations in a separate
12134 procedure in Sem_Util (possibly not the best choice?), to be used both
12135 during parsing, for Ada 83 mode, and during semantic analysis, for
12137 * par-endh.adb (Check_End): move check that end label is not missing
12138 to Process_End_Label in the semantics
12139 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
12140 the special case for SPARK restriction
12141 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
12142 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
12143 parameter Force to issue the error message even on internal node (used
12144 for generated end label). Call Check_Restriction to check when an error
12145 must be issued. In SPARK mode, issue an error message even if the
12146 restriction is not set.
12147 (Check_Restriction): new procedure with an additional out parameter to
12148 inform the caller that a message has been issued
12149 * sem_aggr.adb: Minor modification of message
12150 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
12151 instead of issuing an error message directly
12152 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
12153 declarations are not placed after later declarations, by calling
12154 Check_Later_Vs_Basic_Declarations
12155 (Analyze_Subtype_Declaration): move here the check that an index or
12156 discriminant constraint must be a subtype mark. Change the check that
12157 a subtype of String must start at one so that it works on subtype marks.
12158 * sem_ch4.adb (Analyze_Call): move here the check that a named
12159 association cannot follow a positional one in a call
12160 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
12161 instead of issuing an error message directly
12162 * sem_ch8.adb (Find_Selected_Component): move here the check that a
12163 selector name is not a character literal or an operator symbol. Move
12164 here the check that the prefix of an expanded name cannot be a
12165 subprogram or a loop statement.
12166 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
12167 procedure called from parsing and semantics to check that basic
12168 declarations are not placed after later declarations
12169 (Process_End_Label): move here the check that end label is not missing
12171 2011-08-02 Arnaud Charlet <charlet@adacore.com>
12173 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
12174 representation clause in codepeer mode, since it confuses CodePeer and
12175 does not bring useful info.
12177 2011-08-02 Ed Falis <falis@adacore.com>
12179 * init.c: initialize fp hw on MILS.
12181 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12183 * errout.adb (First_Node): for bodies, return the node itself (small
12184 optimization). For other nodes, do not check source_unit if the node
12185 comes from Standard.
12187 2011-08-02 Robert Dewar <dewar@adacore.com>
12189 * exp_ch3.adb: Minor comment additions.
12190 * sem_ch13.adb: Minor reformatting.
12192 2011-08-02 Pascal Obry <obry@adacore.com>
12194 * make.adb, makeutl.adb: Removes some superfluous directory separator.
12196 2011-08-02 Robert Dewar <dewar@adacore.com>
12198 * sem_attr.adb: Minor reformatting.
12200 2011-08-02 Robert Dewar <dewar@adacore.com>
12202 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
12203 (Has_Default_Component_Value): Removed
12204 * einfo.ads Comment updates
12205 (Has_Default_Aspect): Replaces Has_Default_Value
12206 (Has_Default_Component_Value): Removed
12208 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
12210 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
12211 (Get_Simple_Init_Val): Handle Default_Value aspect
12212 (Needs_Simple_Initialization): Handle Default_Value aspect
12213 * exp_ch3.ads: Needs_Simple_Initialization
12214 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
12215 * par-prag.adb (Pragma_Default[_Component]Value) Removed
12217 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
12218 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
12219 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
12221 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12223 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
12224 package containing iteration primitives.
12225 exp_ch5.adb (Expand_Iterator_Loop): ditto.
12227 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12229 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
12230 "of", pre-analyze expression in case it is a function call with
12231 finalization actions that must be placed ahead of the loop.
12232 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
12233 on an Ada2012 iterator, insert them ahead of the rewritten loop.
12235 2011-08-02 Geert Bosch <bosch@adacore.com>
12237 * cstand.adb (Create_Float_Types): Only consider C's long double for
12238 Long_Long_Float, in addition to double.
12240 2011-08-02 Robert Dewar <dewar@adacore.com>
12242 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
12243 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
12244 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
12245 Minor reformatting.
12247 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12249 * sem_attr.adb: handle properly 'Result when it is a prefix of an
12252 2011-08-02 Javier Miranda <miranda@adacore.com>
12254 * einfo.ads, einfo.adb
12255 (Original_Access_Type): Move this attribute to Node26 since there was
12256 an undocumented use of Node21 in E_Access_Subprogram_Type entities
12257 which causes conflicts and breaks the generation of the .NET compiler.
12258 (Interface_Name): Add missing documentation on JGNAT only uses of
12261 2011-08-02 Geert Bosch <bosch@adacore.com>
12263 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
12264 (Find_Back_End_Float_Type): Likewise
12265 (Create_Back_End_Float_Types): Likewise
12266 (Create_Float_Types): Likewise
12267 (Register_Float_Type): Likewise
12268 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
12269 Nlist and split out type selection in new local Find_Base_Type function.
12270 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
12272 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
12274 2011-08-02 Robert Dewar <dewar@adacore.com>
12276 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
12278 * opt.ads: Minor comment change.
12279 * sem_ch12.adb: Minor code reorganization.
12281 2011-08-02 Gary Dismukes <dismukes@adacore.com>
12283 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
12284 subtype's list of rep items to the list on the full subtype in the case
12285 where the lists are the same.
12287 2011-08-02 Geert Bosch <bosch@adacore.com>
12289 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
12290 using the one from System.Strings, which also deallocates all strings.
12292 2011-08-02 Geert Bosch <bosch@adacore.com>
12294 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
12296 * gcc-interface/Make-lang.in: Update dependencies.
12298 2011-08-02 Olivier Hainque <hainque@adacore.com>
12300 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
12303 2011-08-02 Javier Miranda <miranda@adacore.com>
12305 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
12306 associated with anonymous access to subprograms.
12308 2011-08-02 Geert Bosch <bosch@adacore.com>
12311 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
12312 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
12313 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
12314 (Add_Symbol_Definition): Move to switch-c.adb
12315 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
12316 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
12317 (Add_Symbol_Definition): Move to switch-c.adb.
12318 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
12320 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
12321 Move to warnsw.adb.
12322 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
12323 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
12324 Move to warnsw.adb.
12325 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
12326 (Add_Symbol_Definition): Moved from Prepcomp.
12327 * switch-c.ads: Update copyright notice. Use String_List instead of
12328 Argument_List, removing dependency on System.OS_Lib.
12330 2011-08-02 Yannick Moy <moy@adacore.com>
12332 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
12333 mode on initialization expression which does not respect SPARK
12335 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
12336 if the tree referenced by its argument represents an initialization
12337 expression in SPARK, suitable for initializing an object in an object
12340 2011-08-02 Javier Miranda <miranda@adacore.com>
12342 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
12343 internally generated access to subprogram with its associated protected
12345 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
12347 2011-08-02 Geert Bosch <bosch@adacore.com>
12349 * cstand.adb (Register_Float_Type): Print information about type to
12350 register, if the Debug_Flag_Dot_B is set.
12351 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
12352 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
12353 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
12354 with a requested precision of more than Max_Digits digits and no more
12355 than Max_Base_Digits digits, if a range specification is present and the
12356 Predefined_Float_Types list has a suitable type to derive from.
12357 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
12358 case of type completion with pragma Import
12360 (Process_Import_Predefined_Type): Processing to complete a type
12361 with pragma Import. Currently supports floating point types only.
12362 (Set_Convention_From_Pragma): Do nothing without underlying type.
12363 (Process_Convention): Guard against absence of underlying type,
12364 which may happen when importing incomplete types.
12365 (Process_Import_Or_Interface): Handle case of importing predefined
12366 types. Tweak error message.
12368 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12370 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
12371 functions to previous change. Reorganize code slightly.
12373 2011-08-02 Geert Bosch <bosch@adacore.com>
12375 * back_end.ads (Register_Type_Proc): New call back procedure type for
12376 allowing the back end to provide information about available types.
12377 (Register_Back_End_Types): New procedure to register back end types.
12378 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
12380 * cstand.adb (Back_End_Float_Types): New list for floating point types
12381 supported by the back end.
12382 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
12383 (Copy_Float_Type): New procedure to make new copies of predefined types.
12384 (Register_Float_Type): New call back procedure to populate the BEFT list
12385 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
12386 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
12387 (Create_Float_Types): New procedure to create entities for floating
12388 point types predefined in Standard, and put these and any remaining
12389 BEFTs on the Predefined_Float_Types list.
12390 * stand.ads (Predefined_Float_Types): New list for predefined floating
12391 point types that do not have declarations in package Standard.
12393 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12395 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
12396 entity node for the unit containing the parameter.
12397 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
12398 (Add_Inlined_Subprogram): Likewise.
12399 * gcc-interface/Make-lang.in: Update dependencies.
12401 2011-08-02 Thomas Quinot <quinot@adacore.com>
12403 * s-stusta.adb (Print): Make sure Pos is always initialized to a
12406 2011-08-02 Geert Bosch <bosch@adacore.com>
12408 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
12410 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12412 * sem_type.adb (Covers): Move trivial case to the top and reuse the
12413 computed value of Base_Type.
12415 2011-08-02 Yannick Moy <moy@adacore.com>
12417 * restrict.adb (Check_Restriction): issue an error for any use of
12418 class-wide, even if the No_Dispatch restriction is not set.
12419 * sem_aggr.adb: Correct typos in comments and messages in formal mode
12420 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
12421 when completing a private extension, the type named in the private part
12422 is not the same as that named in the visible part.
12423 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
12424 of an inherited primitive operations of a tagged type or type extension
12425 that returns the tagged type.
12426 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
12427 function which returns True for an implicit operation inherited by the
12428 derived type declaration for the argument type.
12429 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
12432 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12434 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
12435 Process_Bounds, to perform analysis with expansion of a range or an
12436 expression that is the iteration scheme for a loop.
12437 (Analyze_Iterator_Specification): If domain of iteration is given by a
12438 function call with a controlled result, as is the case if call returns
12439 a predefined container, ensure that finalization actions are properly
12441 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
12443 2011-08-02 Javier Miranda <miranda@adacore.com>
12445 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
12446 * gcc-interface/Make-lang.in: Update dependencies.
12448 2011-08-02 Javier Miranda <miranda@adacore.com>
12450 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
12451 determine if the analysis is performed using N or Original_Node (N).
12452 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
12453 functionality of routine Is_Variable avoids code duplication.
12454 * checks.adb (Determine_Range): Handle temporaries generated by
12455 Remove_Side_Effects.
12457 2011-08-02 Javier Miranda <miranda@adacore.com>
12459 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
12460 expansion of the condition. Required since the previous analysis was
12461 done with expansion disabled (see Resolve_Quantified_Expression) and
12462 hence checks were not inserted and record comparisons have not been
12465 2011-08-02 Ed Falis <falis@adacore.com>
12467 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
12470 2011-08-02 Bob Duff <duff@adacore.com>
12472 * opt.ads: Minor comment fix.
12474 2011-08-02 Bob Duff <duff@adacore.com>
12476 * sem_ch12.adb (Analyze_Package_Instantiation,
12477 Analyze_Subprogram_Instantiation): Turn off style checking while
12478 analyzing an instance. Whatever style checks that apply to the generic
12479 unit should apply, so it makes no sense to apply them in an instance.
12480 This was causing trouble when compiling an instance of a runtime
12481 unit that violates the -gnatyO switch.
12482 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
12483 one of the two case statements, causing spurious errors.
12485 2011-08-02 Robert Dewar <dewar@adacore.com>
12487 * uname.adb: Minor reformatting.
12488 * gnatcmd.adb: Minor reformatting.
12489 * exp_attr.adb: Minor reformatting.
12491 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12493 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
12494 No_Dispatching_Calls, do not look for the Assign primitive, because
12495 predefined primitives are not created in this case.
12497 2011-08-02 Bob Duff <duff@adacore.com>
12499 * stylesw.ads: Minor comment fixes.
12501 2011-08-02 Robert Dewar <dewar@adacore.com>
12503 * freeze.adb (Add_To_Result): New procedure.
12505 2011-08-02 Jose Ruiz <ruiz@adacore.com>
12507 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
12508 time, if the specific run-time routines for handling streams of strings
12509 are not available, use the default mechanism.
12511 2011-08-02 Arnaud Charlet <charlet@adacore.com>
12513 * s-regpat.ads: Fix typo.
12515 2011-08-02 Vincent Celier <celier@adacore.com>
12517 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
12518 not null, call it to create the in memory config project file without
12519 parsing an existing default config project file.
12521 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12523 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
12525 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12527 * sem_elim.adb: an abstract subprogram does not need an eliminate
12528 pragma for its descendant to be eliminable.
12530 2011-08-02 Ed Falis <falis@adacore.com>
12532 * init.c: revert to handling before previous checkin for VxWorks
12533 * s-intman-vxworks.adb: delete unnecessary declarations related to
12534 using Ada interrupt facilities for handling signals.
12535 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
12536 * s-intman-vxworks.ads: Import __gnat_install_handler as
12537 Initialize_Interrupts.
12538 * s-taprop-vxworks.adb: Delete Signal_Mask.
12539 (Abort_Handler): change construction of mask to unblock exception
12542 2011-08-02 Jerome Guitton <guitton@adacore.com>
12544 * a-except-2005.adb (Raise_From_Signal_Handler): Call
12545 Debug_Raise_Exception before propagation starts.
12547 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12549 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
12550 to Restriction_Check_Required.
12551 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
12552 * sem_res.adb (Resolve_Call): Likewise.
12553 * sem_attr.adb (Check_Stream_Attribute): Likewise.
12555 2011-08-02 Bob Duff <duff@adacore.com>
12557 * stylesw.ads: Update comment.
12558 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
12559 * errout.ads: Remove obsolete comment.
12561 2011-08-02 Javier Miranda <miranda@adacore.com>
12563 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
12564 (Set_Is_Safe_To_Reevaluate): new procedure.
12565 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
12566 assignment is allowed on safe-to-reevaluate variables.
12567 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
12568 temporary created to remove side effects in expressions that use
12569 the secondary stack as safe-to-reevaluate.
12570 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
12571 variables that are not true constants.
12573 2011-08-02 Robert Dewar <dewar@adacore.com>
12575 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
12576 sem_res.adb, sem_ch6.adb: Minor reformatting.
12578 2011-08-02 Jerome Guitton <guitton@adacore.com>
12580 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
12582 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12584 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
12585 not set Overridden_Operation if subprogram is an initialization
12588 2011-08-02 Yannick Moy <moy@adacore.com>
12590 * par-ch6.adb: Correct obsolete name in comments
12591 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
12592 which takes two message arguments (existing function takes one), with
12593 second message used for continuation.
12594 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
12595 block statements that originate from a source block statement, not
12596 generated block statements
12597 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
12598 symmetry with procedure case
12599 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
12600 function to issue an error in formal mode if a package specification
12601 contains more than one tagged type or type extension.
12602 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
12603 parameters matching formals of tagged types are objects (or ancestor
12604 type conversions of objects), not general expressions. Issue an error
12605 on view conversions that are not involving ancestor conversion of an
12607 (Resolve_Type_Conversion): in formal mode, issue an error on the
12608 operand of an ancestor type conversion which is not an object
12609 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
12610 procedure so that it works also for actuals of function calls
12611 (Is_Actual_Tagged_Parameter): new function which determines if its
12612 argument is an actual parameter of a formal of tagged type in a
12614 (Is_SPARK_Object_Reference): new function which determines if the tree
12615 referenced by its argument represents an object in SPARK
12617 2011-08-02 Robert Dewar <dewar@adacore.com>
12619 * sem_ch3.adb: Minor reformatting
12620 Minor comment addition
12621 Minor error msg text change
12623 2011-08-02 Javier Miranda <miranda@adacore.com>
12625 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
12626 function. Used to be more precise when we generate a variable plus one
12627 assignment to remove side effects in the evaluation of the Bound
12629 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
12630 of the bound expression to force its re-analysis and thus expand the
12631 associated transient scope (if required). Code cleanup replacing the
12632 previous code that declared the constant entity by an invocation to
12633 routine Force_Evaluation which centralizes this work in the frontend.
12635 2011-08-02 Robert Dewar <dewar@adacore.com>
12637 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
12638 (Base_Type): Now uses improved Is_Base_Type function
12639 * einfo.ads (Base_Type): Inline this function
12641 2011-08-02 Robert Dewar <dewar@adacore.com>
12643 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
12644 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
12646 2011-08-02 Arnaud Charlet <charlet@adacore.com>
12648 * gcc-interface/Make-lang.in: Update dependencies.
12649 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
12652 2011-08-02 Yannick Moy <moy@adacore.com>
12654 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
12655 non-simple expression used in delta constraint
12656 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
12657 index constraint which is not a subtype mark
12658 * par.adb: With and use Restrict
12659 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
12660 mode on component type which is not a subtype mark and default
12661 expression on component
12662 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
12663 of string which does not have a lower index bound equal to 1
12664 (Array_Type_Declaration): issue an error in formal mode on index or
12665 component type which is not a subtype mark, and on aliased keyword on
12667 (Derived_Type_Declaration): issue an error in formal mode on interface,
12668 limited or abstract type
12669 (Record_Type_Declaration): issue an error in formal mode on interface
12670 (Record_Type_Definition): issue an error in formal mode on tagged types
12671 and type extensions not declared in the specification of a library unit
12672 package; on null non-tagged record; on variant part
12674 2011-08-02 Vincent Celier <celier@adacore.com>
12676 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
12677 not declared for qualified library project when Library_Name is not
12678 declared, but Library_Dir is.
12680 2011-08-02 Robert Dewar <dewar@adacore.com>
12682 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
12683 pragmas (affects aspects [Component_]Default_Value
12684 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
12685 component type for the resolution
12687 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12689 * einfo.adb (Base_Type): Tune implementation for speed.
12691 2011-08-02 Robert Dewar <dewar@adacore.com>
12693 * freeze.adb: Minor reformatting.
12695 2011-08-02 Thomas Quinot <quinot@adacore.com>
12697 * scos.ads: Update comments.
12699 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12701 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
12702 base type, because the parent may be a subtype of a private type whose
12703 convention is established in a private part.
12705 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
12707 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
12708 statement in a block when the expansion of the return expression has
12709 created a finalization chain.
12710 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
12711 with the parent node.
12712 Add N_Extended_Return_Statement to handle the case where a transient
12713 object declaration appears in the Return_Object_Declarations list of
12714 an extended return statement.
12716 2011-08-02 Matthew Gingell <gingell@adacore.com>
12718 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
12719 unused parameter 'name'.
12721 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12723 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
12724 inherited operation, check whether its alias, which is the source
12725 operastion that it renames, has been marked eliminated.
12727 2011-08-02 Javier Miranda <miranda@adacore.com>
12729 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
12730 in-mode parameter whose type is an access type since it can be used to
12731 modify its designated object. Enforce code that handles as safe an
12732 access type that is not access-to-constant but it is the result of a
12733 previous removal of side-effects.
12734 (Remove_Side_Effects): Minor code reorganization of cases which require
12735 no action. Done to incorporate documentation on new cases uncovered
12736 working in this ticket: no action needed if this routine was invoked
12737 too early and the nodes are not yet decorated.
12738 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
12739 to routine Remove_Side_Effects by calls to Force_Evaluation since they
12740 were issued with actuals that are implicitly provided by
12743 2011-08-02 Robert Dewar <dewar@adacore.com>
12745 * sem_ch3.adb, sem_res.adb: Minor reformatting.
12747 2011-08-02 Yannick Moy <moy@adacore.com>
12749 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
12750 to issue an error in formal mode on attribute not supported in this mode
12751 (Analyze_Attribute): issue errors on standard attributes not supported
12753 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
12754 comment, and issue error in formal mode on modulus which is not a power
12756 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
12758 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
12760 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
12761 operator on modular type (except 'not').
12763 2011-08-02 Robert Dewar <dewar@adacore.com>
12765 * gnat_rm.texi: Minor reformatting.
12767 2011-08-02 Arnaud Charlet <charlet@adacore.com>
12769 * s-osinte-linux.ads: Minor comment update and reformatting.
12770 * i-cexten.ads: Make this unit pure, as for its parent.
12771 Will allow its usage in more contexts if needed.
12773 2011-08-02 Robert Dewar <dewar@adacore.com>
12775 * s-utf_32.ads: Minor comment fix.
12777 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12779 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
12780 operation of a tagged synchronized type, handle the case where the
12781 controlling argument is overloaded.
12783 2011-08-02 Yannick Moy <moy@adacore.com>
12785 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
12786 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
12787 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
12788 SPARK mode and formal verification mode on processing SPARK restriction
12789 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
12790 requiring consistency checking.
12792 2011-08-02 Robert Dewar <dewar@adacore.com>
12794 * sem_res.adb: Minor reformatting.
12796 2011-08-02 Robert Dewar <dewar@adacore.com>
12798 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
12799 a-cforse.ads: Remove unneeded with of Ada.Containers
12800 Remove commented out pragma Inline's
12801 Move specifications of new subprograms to the actual specs
12803 2011-08-02 Yannick Moy <moy@adacore.com>
12805 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
12806 a-cforse.ads: Update comments.
12808 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12810 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
12812 2011-08-02 Robert Dewar <dewar@adacore.com>
12814 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
12815 a-cforse.ads, a-cofove.ads: Minor reformatting.
12817 2011-08-02 Claire Dross <dross@adacore.com>
12819 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
12820 a-cofove.ads: Add comments.
12822 2011-08-02 Yannick Moy <moy@adacore.com>
12824 * gnat_rm.texi: Document formal containers.
12826 2011-08-02 Emmanuel Briot <briot@adacore.com>
12828 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
12829 are empty sections.
12831 2011-08-02 Robert Dewar <dewar@adacore.com>
12833 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
12836 2011-08-02 Robert Dewar <dewar@adacore.com>
12838 * aspects.adb: New aspects Default_Value and Default_Component_Value
12839 New format of Aspect_Names table checks for omitted entries
12840 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
12841 handling of boolean aspects for derived types.
12842 New aspects Default_Value and Default_Component_Value
12843 New format of Aspect_Names table checks for omitted entries
12844 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
12845 (Has_Default_Value): New flag
12846 (Has_Default_Component_Value): New flag
12847 (Has_Default_Value): New flag
12848 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
12850 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
12851 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
12852 Default_Value and Default_Component_Value
12853 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
12854 New aspects Default_Value and Default_Component_Value
12855 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
12856 * sprint.adb: Print N_Aspect_Specification node when called from gdb
12858 2011-08-02 Vincent Celier <celier@adacore.com>
12860 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
12861 inherit library kind.
12863 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12865 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
12866 Minor reformatting.
12868 2011-08-02 Robert Dewar <dewar@adacore.com>
12870 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
12872 2011-08-02 Yannick Moy <moy@adacore.com>
12874 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
12876 2011-08-02 Robert Dewar <dewar@adacore.com>
12878 * impunit.adb: Add comment.
12880 2011-08-02 Yannick Moy <moy@adacore.com>
12882 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
12883 qualification of aggregates in formal mode
12884 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
12886 (Resolve_Aggregate): complete the test that an aggregate is adequately
12887 qualified in formal mode
12889 2011-08-02 Pascal Obry <obry@adacore.com>
12891 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
12892 * mlib-prj.adb: Supress warning when compiling binder generated file.
12893 (Build_Library): Supress all warnings when compiling the binder
12896 2011-08-02 Yannick Moy <moy@adacore.com>
12898 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
12900 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
12901 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
12902 Add with/use clauses to make Check_Formal_Restriction visible
12904 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12906 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
12907 in-parameters when type of the generic formal is private in the generic
12908 spec and non-private in the body.
12910 2011-08-02 Claire Dross <dross@adacore.com>
12912 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
12913 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
12914 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
12915 * impunit.adb, Makefile.rtl: Take new files into account.
12917 2011-08-02 Robert Dewar <dewar@adacore.com>
12919 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
12920 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
12922 2011-08-02 Yannick Moy <moy@adacore.com>
12924 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
12926 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
12927 matching static array bounds, taking into account the special case of
12929 * sem_ch3.adb: Typo in comment.
12931 2011-08-02 Yannick Moy <moy@adacore.com>
12933 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
12934 which issues an error in formal mode if its argument node is originally
12936 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
12937 has a discriminant specification so that it does not include the case
12939 (Derived_Type_Declaration): move here the test that a derived type has a
12940 discriminant specification
12941 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
12942 first element of a component association before accessing its choices
12943 (presence of component association is not enough)
12944 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
12945 declaration is a library item before accessing the next element in a
12946 list, as library items are not member of lists
12947 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
12948 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
12949 Check_Formal_Restriction whenever possible.
12951 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12953 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
12954 reference when needed.
12956 2011-08-02 Bob Duff <duff@adacore.com>
12958 * gnat_ugn.texi: Fix typo.
12960 2011-08-02 Vincent Celier <celier@adacore.com>
12962 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
12963 archive file name. Do not use the full path name of archives for Open
12966 2011-08-02 Robert Dewar <dewar@adacore.com>
12968 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
12969 Analyze_Aspect_Specifications
12971 (Analyze_Aspect_Specifications): New handling for boolean aspects
12972 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
12973 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
12974 sequence for Analyze_Aspect_Specifications
12975 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
12976 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
12978 2011-08-02 Robert Dewar <dewar@adacore.com>
12980 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
12981 aspects, since these no longer exist.
12983 2011-08-02 Robert Dewar <dewar@adacore.com>
12985 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
12986 semicolon, do not try to see if there are aspects following it.
12987 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
12990 2011-08-02 Robert Dewar <dewar@adacore.com>
12992 * sem_ch8.adb, aspects.ads: Minor reformatting.
12994 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12996 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
12997 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
12999 (Analyze_Aspect_Specifications): ...here. Call above procedure.
13001 2011-08-02 Yannick Moy <moy@adacore.com>
13003 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
13004 mode on subprogram declaration outside of package specification, unless
13005 it is followed by a pragma Import
13006 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
13007 Access_Type_Declaration): issue error in formal mode on access type
13008 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
13010 (Analyze_Object_Declaration): issue error in formal mode on object
13011 declaration which does not respect SPARK restrictions
13012 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
13013 declaration which does not respect SPARK restrictions
13014 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
13015 error in formal mode on digits or delta constraint
13016 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
13017 decimal fixed point type
13018 (Derived_Type_Declaration): issue error in formal mode on derived type
13019 other than type extensions of tagged record types
13020 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
13021 with check on access definition
13022 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
13023 mode on protected definition.
13024 (Analyze_Task_Definition): issue error in formal mode on task definition
13026 2011-08-02 Robert Dewar <dewar@adacore.com>
13028 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
13030 2011-08-02 Javier Miranda <miranda@adacore.com>
13032 * sem_ch6.adb (Can_Override_Operator): New function.
13033 (Verify_Overriding_Indicator): Add missing code to check overriding
13034 indicator in operators. Fixes regression.
13035 (Check_Overriding_Indicator): Minor reformating after replacing the
13036 code that evaluates if the subprogram can override an operator by
13037 invocations to the above new function.
13039 (Write_Field26_Name): Add missing code to ensure that, following
13040 the documentation in einfo.ads, this field is not shown as attribute
13041 "Static_Initialization" on non-dispatching functions.
13043 2011-08-02 Jose Ruiz <ruiz@adacore.com>
13045 * sem_res.adb (Resolve_Call): A call to
13046 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
13047 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
13048 i.e., when the second parameter is of type Time_Span.
13050 2011-08-02 Vincent Celier <celier@adacore.com>
13052 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
13053 with an archive instead of -L<library dir> -l<library name>.
13055 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13057 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
13058 mark the base types In_Use in addition to making the operations
13061 2011-08-02 Ed Falis <falis@adacore.com>
13063 * init.c: add and setup __gnat_signal_mask for the exception signals
13064 * s-inmaop-vxworks.adb: new file.
13065 * s-intman-vxworks.adb: remove unnecessary initializations and
13067 * s-intman-vxworks.ads: remove unnecessary variable
13068 * s-taprop-vxworks.adb: simplify signal initialization
13070 2011-08-02 Robert Dewar <dewar@adacore.com>
13072 * sem_ch8.adb: Minor code reorganization, comment updates.
13074 2011-08-02 Robert Dewar <dewar@adacore.com>
13076 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
13077 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
13079 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
13080 (Matching_Static_Array_Bounds): Moved here from Sem_Res
13082 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13084 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
13085 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
13086 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
13087 use_type_clauses, to handle more efficiently use_type and use_all_type
13089 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
13090 Ada2012 Use_All_Type clause.
13091 (Use_Class_Wide_Operations): new procedure.
13093 2011-08-02 Robert Dewar <dewar@adacore.com>
13095 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
13096 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
13097 expression to expression function.
13099 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13101 * sem_ch4.adb: transform simple Ada2012 membership into equality only
13102 if types are compatible.
13104 2011-08-02 Yannick Moy <moy@adacore.com>
13106 * sem_res.adb (Matching_Static_Array_Bounds): new function which
13107 returns True if its argument array types have same dimension and same
13108 static bounds at each index.
13109 (Resolve_Actuals): issue an error in formal mode on actuals passed as
13110 OUT or IN OUT paramaters which are not view conversions in SPARK.
13111 (Resolve_Arithmetic_Op): issue an error in formal mode on
13112 multiplication or division with operands of fixed point types which are
13113 not qualified or explicitly converted.
13114 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
13115 Boolean or array type (except String) operands.
13116 (Resolve_Equality_Op): issue an error in formal mode on equality
13117 operators for array types other than String with non-matching static
13119 (Resolve_Logical_Op): issue an error in formal mode on logical operators
13120 for array types with non-matching static bounds. Factorize the code in
13121 Matching_Static_Array_Bounds.
13122 (Resolve_Qualified_Expression): issue an error in formal mode on
13123 qualified expressions for array types with non-matching static bounds.
13124 (Resolve_Type_Conversion): issue an error in formal mode on type
13125 conversion for array types with non-matching static bounds
13127 2011-08-02 Robert Dewar <dewar@adacore.com>
13129 * par-ch10.adb: Minor code reorganization (use Nkind_In).
13131 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13133 * par-ch9.adb: save location of entry for proper error message.
13135 2011-08-02 Javier Miranda <miranda@adacore.com>
13137 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
13138 (Use_Full_View) which permits this routine to climb through the
13139 ancestors using the full-view of private parents.
13140 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
13141 Use_Full_View to true in calls to Is_Ancestor.
13142 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
13143 true in call to Is_Ancestor.
13144 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
13145 Use_Full_View to true in call to Is_Ancestor.
13146 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
13147 call to Is_Ancestor.
13148 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
13149 Use_Full_View to true in calls to Is_Ancestor.
13150 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
13151 Make_Select_Specific_Data_Table, Register_Primitive,
13152 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
13153 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
13154 to true in call to Is_Ancestor.
13155 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
13156 Use_Full_View to true in calls to Is_Ancestor.
13158 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
13159 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
13161 2011-08-02 Robert Dewar <dewar@adacore.com>
13163 * gnat_rm.texi: Minor reformatting.
13164 * sem_prag.adb: Minor reformatting.
13166 2011-08-02 Tristan Gingold <gingold@adacore.com>
13168 * vms_data.ads: Add VMS qualifier for -gnateP.
13170 2011-08-02 Robert Dewar <dewar@adacore.com>
13172 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
13173 * par-ch7.adb (P_Package): Proper placement of aspects for package
13174 decl/instantiation.
13175 * par-endh.adb (Check_End): Ad Is_Sloc parameter
13176 (End_Statements): Add Is_Sloc parameterr
13177 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
13178 (Check_End): Ad Is_Sloc parameter
13179 (End_Statements): Add Is_Sloc parameterr
13181 2011-08-02 Vincent Celier <celier@adacore.com>
13183 * ug_words: Add VMS qualifier equivalent to -gnateP:
13184 /SYMBOL_PREPROCESSING.
13186 2011-08-02 Jose Ruiz <ruiz@adacore.com>
13188 * gnat-style.texi: For hexadecimal numeric literals the typical
13189 grouping of digits is 4 to represent 2 bytes.
13190 A procedure spec which is split into several lines is indented two
13193 2011-08-02 Yannick Moy <moy@adacore.com>
13195 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
13196 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
13197 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
13199 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
13200 choice in array aggregate
13201 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
13203 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
13204 positional and named aggregate for record, or others in record
13205 aggregate, or multiple choice in record aggregate
13206 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
13207 array operands to logical operations AND, OR and XOR do not have the
13208 same static lower and higher bounds
13209 * sem_ch5.adb, sinfo.ads: Correct typos in comments
13211 2011-08-01 Robert Dewar <dewar@adacore.com>
13213 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
13214 Replaces Last_Source_Node_In_Sequence.
13215 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
13216 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
13217 parens and blank in string (this was inconsistently implemented).
13219 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
13220 blank in string (this was inconsistently implemented).
13222 (Set_Global_Switches): Set formal mode switches appropriately
13223 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
13225 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
13226 call Set_Error_Msg_Lang to set "spark" as language name.
13227 * par.adb: Remove unnecessary call to set formal language for errout
13228 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
13229 appropriately and call Set_Error_Msg_Lang to set "spark" as language
13231 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
13232 calls to it, moved after resolution so that types are known
13233 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
13234 result of concatenation is not of type String
13235 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
13236 concatenation is not properly restricted
13237 * gnat_rm.texi: Add doc on pragma Spark_95.
13238 * gcc-interface/Makefile.in: Remove obsolete target pairs for
13239 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
13240 * gcc-interface/Make-lang.in: Update dependencies.
13242 2011-08-01 Javier Miranda <miranda@adacore.com>
13244 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
13245 condition that detects if the overridden operation must replace an
13248 2011-08-01 Javier Miranda <miranda@adacore.com>
13250 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
13251 code declarations inserted by Insert_Actions in each alternative of the
13252 N_Case_Expression node.
13254 2011-08-01 Robert Dewar <dewar@adacore.com>
13256 * sem_ch6.adb: Minor code reorganization.
13257 * sem_util.adb: Minor reformatting.
13259 2011-08-01 Pascal Obry <obry@adacore.com>
13261 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
13262 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
13264 2011-08-01 Yannick Moy <moy@adacore.com>
13266 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
13267 literal or operator symbol which is prefixed
13268 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
13269 mode on access attributes.
13270 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
13271 that concatenation operands are properly restricted in formal mode
13272 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
13273 Analyze_Concatenation_Operand. Issue an error in formal mode if the
13274 result of the concatenation has a type different from String.
13275 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
13276 Analyze_Quantified_Expression, Analyze_Slice,
13277 Analyze_Null): issue an error in formal mode on unsupported constructs
13279 (Analyze_Block_Statement): only issue error on source block statement
13280 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
13281 function which returns the last node in a list of nodes for which
13282 Comes_From_Source returns True, if any
13283 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
13284 Last_Source_Node_In_Sequence
13285 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
13286 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
13287 mode on unsupported constructs
13288 * sem_ch9.adb Do not return after issuing error in formal mode, as the
13289 rest of the actions may be needed later on since the error is marked as
13291 * sinfo.ads: Typos in comments.
13293 2011-08-01 Pascal Obry <obry@adacore.com>
13295 * projects.texi: Minor editing.
13297 2011-08-01 Yannick Moy <moy@adacore.com>
13299 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
13300 insertion character ~~
13301 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
13302 (Set_Error_Msg_Lang): new procedure which fixes the language for use
13303 with insertion character ~~
13304 (Set_Msg_Text): treat insertion character ~~
13305 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
13306 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
13307 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
13308 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
13309 errors related to the formal language restriction not serious
13310 (insertion character |).
13311 * par.adb (Par): set formal language for error messages if needed
13312 * sem_ch6.adb (Check_Missing_Return): take into account possible
13313 generated statements at the end of the function
13314 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
13315 enumeration value to define a new pragma SPARK_95
13316 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
13317 SPARK_Version): new type and variables to store the SPARK version
13319 (SPARK_Mode): return True when SPARK_Version is set
13320 * par-prag.adb: Correct indentation
13321 (Prag): take Pragma_SPARK_95 into account
13322 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
13325 2011-08-01 Robert Dewar <dewar@adacore.com>
13327 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
13328 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
13329 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
13331 2011-08-01 Pascal Obry <obry@adacore.com>
13333 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
13334 Target_Name to Get_Path call.
13335 (Parse_Single_Project): Likewise.
13336 (Post_Parse_Context_Clause): Likewise.
13337 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
13338 Call Initialise_Project_Path with the proper Target_Name.
13339 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
13341 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
13342 with the proper Target_Name.
13343 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
13344 Part.Parse routine.
13345 (Parse_Project_And_Apply_Config): Likewise.
13346 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
13347 This is fine as this part of the code is supporting only native
13349 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
13350 is fine as this part of the code is supporting only native compilation.
13352 2011-08-01 Yannick Moy <moy@adacore.com>
13354 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
13355 of homonym, unless the homonym is one of the cases allowed in SPARK
13356 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
13357 package declaration occurring after a body.
13359 2011-08-01 Robert Dewar <dewar@adacore.com>
13361 * checks.adb, exp_ch4.adb: Minor reformatting.
13363 2011-08-01 Javier Miranda <miranda@adacore.com>
13365 * einfo.ads (Access_Disp_Table): Fix documentation.
13366 (Dispatch_Table_Wrappers): Fix documentation.
13368 2011-08-01 Pascal Obry <obry@adacore.com>
13370 * prj-env.adb, prj-env.ads: Minor reformatting.
13372 2011-08-01 Yannick Moy <moy@adacore.com>
13374 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
13375 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
13376 procedures out of these packages.
13377 * errout.ads, errout.adb
13378 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
13379 procedures in of this package
13380 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
13381 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
13382 on misplaced later vs initial declarations, like in Ada 83
13383 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
13384 formal mode on attribute of private type whose full type declaration
13386 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
13387 package declaration inside a package specification
13388 (Analyze_Full_Type_Declaration): issue error in formal mode on
13389 controlled type or discriminant type
13390 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
13391 user-defined operator means that it should come from the source
13392 (New_Overloaded_Entity): issue error in formal mode on overloaded
13394 * sem_ch6.ads, sem_ch13.ads: typos in comments.
13396 2011-08-01 Thomas Quinot <quinot@adacore.com>
13398 * atree.adb: Minor reformatting.
13399 * checks.adb: Minor reformatting.
13401 2011-08-01 Vincent Celier <celier@adacore.com>
13403 * s-parame-vms-ia64.ads: Fix typo in comment
13405 * s-parame-vms-restrict.ads: Removed, unused.
13407 2011-08-01 Javier Miranda <miranda@adacore.com>
13410 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
13412 (Constrain_Index): Remove side effects in the evaluation of the bounds.
13413 * sem_ch3.ads, sem_ch3.adb
13414 (Is_Constant_Bound): New extended version of the subprogram that was
13415 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
13416 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
13417 * sem_aux.ads (Constant_Value): Fix typo in comment.
13418 * checks.adb (Generate_Index_Checks): New implementation which, for
13419 array objects with constant bounds, generates the runtime check
13420 referencing the bounds of the array type. For other cases this routine
13421 provides its previous behavior obtaining such values from the array
13423 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
13425 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
13426 we cannot have semantic interpretations of the new node.
13428 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13430 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
13433 2011-08-01 Arnaud Charlet <charlet@adacore.com>
13435 * sem_ch8.adb: Minor code editing.
13436 * s-vxwext.adb: Remove trailing space.
13437 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
13438 consistency with other files.
13440 2011-08-01 Thomas Quinot <quinot@adacore.com>
13442 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
13444 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13446 * par-ch10.adb: reject parameterized expressions as compilation unit.
13447 * sem_ch4.adb: handle properly conditional expression with overloaded
13448 then_clause and no else_clause.
13450 2011-08-01 Tristan Gingold <gingold@adacore.com>
13452 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
13453 like done by System.Aux_DEC.
13454 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
13456 2011-08-01 Yannick Moy <moy@adacore.com>
13458 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
13459 missing label at end of declaration (subprogram or package)
13460 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
13461 of positional and named parameter association
13462 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
13463 Error_Msg_SP which adds a prefix to the error message giving the name
13464 of the formal language analyzed
13465 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
13466 access result type in subprogram, unconstrained array as result type,.
13467 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
13469 * sem_ch8.adb: Code clean up.
13471 2011-08-01 Javier Miranda <miranda@adacore.com>
13473 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
13474 * einfo.ads (Access_Disp_Table): Fix documentation.
13475 (Dispatch_Table_Wrappers): Fix documentation.
13476 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
13477 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
13478 to enforce the documentation of this attribute.
13479 (Set_Is_Interface): Cleanup the assertion.
13480 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
13481 the Underlying_Type entity before reading attribute Access_Disp_Table.
13482 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
13483 Locate the Underlying_Type before reading attribute Access_Disp_Table.
13484 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
13485 the Underlying_Type entity before reading attribute Access_Disp_Table.
13486 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
13487 Locate the Underlying_Type entity before reading attribute
13490 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13492 * s-poosiz.ads: Additional overriding indicators.
13494 2011-08-01 Yannick Moy <moy@adacore.com>
13496 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
13498 (Analyze_Iteration_Scheme): issue error in formal mode when loop
13499 parameter specification does not include a subtype mark.
13500 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
13501 formal mode on abstract subprogram.
13502 (Analyze_Subprogram_Specification): issue error in formal mode on
13503 user-defined operator.
13504 (Process_Formals): issue error in formal mode on access parameter and
13505 default expression.
13506 * sem_ch9.adb (Analyze_Abort_Statement,
13507 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
13508 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
13509 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
13510 Analyze_Requeue, Analyze_Selective_Accept,
13511 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
13512 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
13513 issue error in formal mode on user-defined raise statement.
13515 2011-08-01 Thomas Quinot <quinot@adacore.com>
13517 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
13518 declaration being hidden when overriding an implicit inherited
13520 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
13521 (-gnats), do not complain about a source file that contains only a
13524 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13526 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
13527 variable if already set.
13529 2011-08-01 Arnaud Charlet <charlet@adacore.com>
13531 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
13532 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
13533 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
13534 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
13535 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
13536 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
13537 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
13538 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
13539 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
13540 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
13541 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
13542 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
13543 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
13544 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
13545 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
13546 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
13547 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
13548 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
13549 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
13550 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
13551 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
13552 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
13553 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
13554 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
13555 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
13556 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
13557 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
13558 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
13559 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
13560 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
13561 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
13562 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
13563 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
13564 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
13565 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
13566 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
13567 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
13568 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
13569 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
13570 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
13571 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
13572 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
13573 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
13574 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
13575 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
13576 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
13577 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
13578 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
13579 s-osinte-mingw.ads: Update to GPLv3 run-time license.
13580 Use GNAT instead of GNARL.
13582 2011-08-01 Bob Duff <duff@adacore.com>
13584 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
13585 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
13586 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
13589 2011-08-01 Yannick Moy <moy@adacore.com>
13591 * debug.adb (d.D) reverve flag for the SPARK mode
13592 (d.E) reverve flag for SPARK generation mode
13593 (d.F) reverve flag for Why generation mode
13594 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
13595 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
13596 functions which return True when the corresponding modes are set
13597 (Formal_Language): return "spark" or "alfa" when in formal verification
13599 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
13600 Error_Msg to prefix the error message with a tag giving the formal
13602 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
13603 message with a tag giving the formal language
13604 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
13606 (Analyze_Case_Statement): issue error in formal mode on case statement
13607 with a single "others" case alternative
13608 (Analyze_Exit_Statement): issue errors in formal mode on exit
13609 statements which do not respect SPARK restrictions
13610 (Analyze_Goto_Statement): issue error in formal mode on goto statement
13611 (Check_Unreachable_Code): always issue an error (not a warning) in
13612 formal mode on unreachable code (concerns both code after an infinite
13613 loop and after an unconditional jump, both not allowed in SPARK)
13614 * sem_ch6.adb (Analyze_Return_Statement): add call to
13615 Set_Return_Present for a procedure containing a return statement
13616 (already done for functions in Analyze_Function_Return)
13617 (Analyze_Function_Return): issue error in formal mode on extended
13618 return or if return is not last statement in function
13619 (Check_Missing_Return): issue error in formal mode if function does
13620 not end with return or if procedure contains a return
13621 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
13622 function to detect if there is an inner scope of its parameter S which
13625 2011-08-01 Thomas Quinot <quinot@adacore.com>
13627 * sem_ch6.ads: Minor reformatting.
13629 2011-08-01 Javier Miranda <miranda@adacore.com>
13631 * sem_util.adb (Abstract_Interface_List): Complete condition when
13632 processing private type declarations to avoid reading unavailable
13634 (Is_Synchronized_Tagged_Type): Complete condition when processing
13635 private extension declaration nodes to avoid reading unavailable
13638 2011-08-01 Thomas Quinot <quinot@adacore.com>
13640 * sem_ch3.adb: Minor reformatting.
13642 2011-08-01 Thomas Quinot <quinot@adacore.com>
13644 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
13645 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
13646 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
13647 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
13648 for VMS, instead parametrize the common implementation with
13649 System.Parameters declarations.
13651 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
13653 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
13655 2011-08-01 Tristan Gingold <gingold@adacore.com>
13657 * seh_init.c: Fix SEH handler installation on win64.
13659 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13661 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
13662 double analysis of an anonymous access to subprogram, because it can
13663 lead to improper sharing of profiles and a back-end crash.
13665 2011-08-01 Robert Dewar <dewar@adacore.com>
13667 * make.adb, sem_ch4.adb: Minor reformatting.
13668 * gcc-interface/Make-lang.in: Update dependencies.
13669 * sem_util.adb, exp_ch5.adb: Minor reformatting.
13671 2011-08-01 Arnaud Charlet <charlet@adacore.com>
13673 * gnat_rm.texi: Fix definition of Long_Integer.
13675 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13677 * exp_aggr.adb: check limit size of static aggregate unconditionally,
13678 to prevent storage exhaustion.
13679 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
13680 finalized is a function body, insert the cleanup code before the final
13681 return statement, to prevent spurious warnings.
13682 * s-pooglo.ads: add overriding indicator.
13684 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13686 * sem_ch4.adb (Operator_Check): improve error message when both a
13687 with_clause and a use_clause are needed to make operator usage legal.
13688 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
13689 determine whether a compilation unit is visible within an other,
13690 either through a with_clause in the current unit, or a with_clause in
13691 its library unit or one one of its parents.
13693 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13695 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
13696 over an arbitrary expression of an array or container type.
13697 * lib-xref.adb: clarify comment.
13699 2011-08-01 Bob Duff <duff@adacore.com>
13701 * einfo.ads: Minor reformatting.
13702 * debug.adb: Minor comment improvement.
13704 2011-08-01 Javier Miranda <miranda@adacore.com>
13706 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
13707 consider hidden subprograms as valid candidates.
13709 2011-08-01 Arnaud Charlet <charlet@adacore.com>
13711 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
13713 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
13715 * gnat_ugn.texi: Fix typo.
13717 2011-08-01 Robert Dewar <dewar@adacore.com>
13719 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
13720 lib-xref.adb: Minor reformatting
13722 2011-08-01 Gary Dismukes <dismukes@adacore.com>
13724 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
13725 when to generate a call to Move_Final_List.
13726 (Has_Controlled_Parts): Remove this function.
13728 2011-08-01 Geert Bosch <bosch@adacore.com>
13730 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
13731 "," in choice list.
13733 2011-08-01 Thomas Quinot <quinot@adacore.com>
13735 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
13736 explicit raise of a predefined exception as Comes_From_Source if the
13737 original N_Raise_Statement comes from source.
13739 2011-08-01 Robert Dewar <dewar@adacore.com>
13741 * sinfo.ads: Add comment.
13742 * sem_ch6.adb: Minor reformatting.
13744 2011-08-01 Robert Dewar <dewar@adacore.com>
13746 * freeze.adb (Freeze_Entity): Refine check for bad component size
13747 clause to avoid rejecting confirming clause when atomic/aliased present.
13749 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13751 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
13752 better determine whether an entity reference is a write.
13753 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
13755 * lib-xref.adb (Output_References): Do no suppress a read reference at
13756 the same location as an immediately preceeding modify-reference, to
13757 handle properly in-out actuals.
13759 2011-08-01 Tristan Gingold <gingold@adacore.com>
13761 * env.c (__gnat_setenv) [VMS]: Refine previous change.
13763 2011-08-01 Quentin Ochem <ochem@adacore.com>
13765 * i-cstrin.adb (New_String): Changed implementation, now uses only the
13766 heap to compute the result.
13768 2011-08-01 Robert Dewar <dewar@adacore.com>
13770 * atree.ads: Minor reformatting.
13772 2011-08-01 Emmanuel Briot <briot@adacore.com>
13774 * g-expect.adb (Get_Command_Output): Fix memory leak.
13776 2011-08-01 Geert Bosch <bosch@adacore.com>
13778 * cstand.adb (P_Float_Type): New procedure to print the definition of
13779 predefined fpt types.
13780 (P_Mixed_Name): New procedure to print a name using mixed case
13781 (Print_Standard): Use P_Float_Type for printing floating point types
13782 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
13783 precision IEEE float.
13785 2011-08-01 Thomas Quinot <quinot@adacore.com>
13787 * sem_ch3.adb: Minor reformatting.
13789 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13791 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
13792 the completion of a generic function, insert the new body rather than
13793 rewriting the original.
13795 2011-08-01 Yannick Moy <moy@adacore.com>
13797 * sinfo.ads, errout.ads: Typos in comments.
13799 2011-08-01 Robert Dewar <dewar@adacore.com>
13801 * par-endh.adb: Minor reformatting.
13803 2011-08-01 Robert Dewar <dewar@adacore.com>
13805 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
13806 (Pre_Post_Aspects): New subtype.
13807 * par-ch12.adb (P_Generic): New syntax for aspects in packages
13808 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
13809 * par-ch7.adb (P_Package): Remove Decl parameter
13810 (P_Package): Handle new syntax for aspects (before IS)
13811 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
13813 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
13814 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
13815 (P_Package): Remove Decl parameter
13816 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
13818 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
13820 * sem_util.ads, sem_util.adb (Static_Boolean): New function
13821 * sinfo.ads: Document new syntax for aspects in packages etc.
13822 * sprint.adb: Handle new syntax of aspects before IS in package
13824 2011-08-01 Thomas Quinot <quinot@adacore.com>
13826 * atree.ads: Minor reformatting.
13827 * sem_prag.adb: Minor reformatting.
13829 2011-08-01 Robert Dewar <dewar@adacore.com>
13831 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
13832 case expr alternative.
13834 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13836 * sem_ch12.adb: Fix typo.
13838 2011-08-01 Geert Bosch <bosch@adacore.com>
13840 * sem_prag.adb (Check_No_Link_Name): New procedure.
13841 (Process_Import_Or_Interface): Use Check_No_Link_Name.
13842 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
13843 instead of Standard_Long_Long_Float_Size global. Preparation for
13844 eventual removal of per type constants.
13845 * exp_util.ads (Get_Stream_Size): New function returning the stream
13846 size value of subtype E.
13847 * exp_util.adb (Get_Stream_Size): Implement new function.
13848 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
13850 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
13852 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
13854 2011-08-01 Geert Bosch <bosch@adacore.com>
13856 * cstand.adb: Fix comments.
13857 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
13858 count of arguments.
13860 2011-08-01 Robert Dewar <dewar@adacore.com>
13862 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
13864 2011-08-01 Geert Bosch <bosch@adacore.com>
13866 * atree.ads: Fix comment.
13868 2011-08-01 Robert Dewar <dewar@adacore.com>
13870 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
13871 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
13872 * par.adb: Add with for Namet.Sp.
13873 * par-tchk.adb: Minor reformatting.
13875 2011-08-01 Vincent Celier <celier@adacore.com>
13877 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
13878 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
13879 of the init procedure of a SAL.
13880 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
13883 2011-08-01 Thomas Quinot <quinot@adacore.com>
13885 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
13888 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13890 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
13892 2011-08-01 Thomas Quinot <quinot@adacore.com>
13894 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
13895 conformant with its spec (return True only for types that have
13896 an overriding Initialize primitive operation that prevents them from
13897 having preelaborable initialization).
13898 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
13899 initialization for controlled types in Ada 2005 or later mode.
13901 2011-08-01 Robert Dewar <dewar@adacore.com>
13903 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
13905 (Same_Aspect): New function.
13906 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
13907 Type_Invariant, Precondition, Postcondition.
13908 * snames.ads-tmpl: Add Name_Type_Invariant.
13910 2011-08-01 Robert Dewar <dewar@adacore.com>
13912 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
13914 (Freeze_All_Ent): Fix error in handling inherited aspects.
13915 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
13916 already analyzed, but don't skip entire processing of a declaration,
13917 that's wrong in some cases of declarations being rewritten.
13918 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
13919 Don't delay for integer, string literals
13920 Treat predicates in usual manner for delay, remove special case code,
13922 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
13923 (Build_Predicate_Function): Update saved expression in aspect
13924 (Build_Invariant_Procedure): Update saved expression in aspect
13925 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
13926 of replacement of discriminant references if the reference is simple.
13928 2011-08-01 Robert Dewar <dewar@adacore.com>
13930 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
13931 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
13932 Static_Predicate and Dynamic_Predicate.
13933 (Build_Predicate_Function): Add processing for Static_Predicate
13934 and Dynamic_Predicate.
13935 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
13936 (From_Static_Predicate): New flag
13937 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
13939 2011-08-01 Robert Dewar <dewar@adacore.com>
13941 * usage.adb: Documentation cleanup for Ada version modes in usage.
13942 * expander.adb: Minor reformatting.
13944 2011-08-01 Robert Dewar <dewar@adacore.com>
13946 * atree.ads: Minor comment fix.
13947 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
13948 a-witeio.ads, sem_prag.adb: Minor reformatting.
13950 2011-08-01 Doug Rupp <rupp@adacore.com>
13952 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
13953 pointers. Use descrip.h header file for convenience. Add some
13956 2011-08-01 Robert Dewar <dewar@adacore.com>
13958 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
13959 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
13960 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
13962 (Check_Aspect_At_End_Of_Declarations): New procedure
13963 (Analye_Aspect_Specification): Minor changes for above procedures
13964 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
13965 specification node as well.
13967 2011-08-01 Pascal Obry <obry@adacore.com>
13969 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
13970 Windows files. Use GetFilesAttributes() in this case to check for file
13971 existence instead of returning with an error code.
13973 2011-08-01 Vincent Celier <celier@adacore.com>
13975 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
13976 High is above Source length.
13978 2011-08-01 Robert Dewar <dewar@adacore.com>
13980 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
13982 2011-08-01 Robert Dewar <dewar@adacore.com>
13984 * aspects.ads (Boolean_Aspects): New subtype.
13985 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
13986 for derived types in cases where the parent type and derived type have
13988 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
13989 with aspects when parent type also has aspects.
13990 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
13991 boolean expression at this point).
13992 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
13993 accordance with final decision on the Ada 2012 feature.
13994 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
13996 2011-08-01 Matthew Heaney <heaney@adacore.com>
13998 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
14000 2011-08-01 Pascal Obry <obry@adacore.com>
14002 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
14003 Fix Replace_Slice when High is above current string size.
14004 (Replace_Slice): Fix DL computation when High is above current
14007 2011-08-01 Gary Dismukes <dismukes@adacore.com>
14009 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
14011 2011-08-01 Matthew Heaney <heaney@adacore.com>
14013 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
14016 2011-08-01 Pascal Obry <obry@adacore.com>
14018 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
14021 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14023 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
14024 access to protected subprograms in generic bodies.
14025 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
14026 protected type, indicate that the convention of the subprogram is
14027 Convention_Protected, because it may be used in subsequent declarations
14028 within the protected declaration.
14030 2011-08-01 Vincent Celier <celier@adacore.com>
14032 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
14033 and "final" procedures when the name of the library is "ada", to avoid
14034 duplicate symbols "adainit" and "adafinal" in executables.
14036 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14038 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
14039 quantified expression that appears within a postcondition and uses the
14040 Ada2012 'Result attribute.
14042 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14044 * init.c (__gnat_error_handler): Cast reason to int.
14045 (__gnat_install_handler): Explain sa_sigaction use.
14047 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
14049 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
14050 subprogram has copy-in copy-out parameters, try to promote the mode of
14051 the return type if it is passed in registers.
14053 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
14055 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
14056 left operand as addressable.
14058 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
14060 * gcc-interface/gigi.h (build_function_stub): Remove.
14061 (build_return_expr): Likewise.
14062 (convert_vms_descriptor): Declare.
14063 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
14064 (build_function_stub): Move to...
14065 * gcc-interface/utils2.c (build_return_expr): Move to...
14066 * gcc-interface/trans.c (build_function_stub): ...here.
14067 (build_return_expr): ...here.
14068 (Subprogram_Body_to_gnu): Add local variable for language_function.
14069 Disconnect the parameter attributes cache, if any, once done with it.
14070 Call end_subprog_body only after setting the end_locus.
14071 Build the stub associated with the function, if any, at the very end.
14072 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
14073 variables and streamline control flow.
14075 2011-07-23 Arnaud Charlet <charlet@adacore.com>
14078 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
14079 g-trasym-dwarf.adb.
14081 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14084 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
14085 Assign to act.sa_sigaction.
14086 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
14087 current->return_address to char * before arithmetic.
14089 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14091 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
14092 Correct argument types.
14093 Extract code from reason.
14094 (__gnat_install_handler): Assign to act.sa_sigaction.
14096 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
14098 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
14099 (GNAT1_OBJS): ...here.
14101 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
14104 * g-socthi-mingw.adb (Fill): Fix formatting.
14106 * gcc-interface/gigi.h: Move around comment.
14108 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
14111 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
14113 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
14116 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
14118 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
14120 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
14121 range comparison if Pmode is SImode.
14123 2011-07-12 Laurent GUERBY <laurent@guerby.net>
14124 Eric Botcazou <ebotcazou@adacore.com>
14126 * adadecode.c: Wrap up in extern "C" block.
14127 * adadecode.h: Likewise.
14128 * adaint.c: Likewise. Remove 'const' keyword.
14129 * adaint.h: Likewise.
14130 * argv.c: Likewise.
14131 * atree.h: Likewise.
14133 * cstreams.c: Likewise.
14135 * exit.c: Likewise.
14137 * final.c: Likewise.
14138 * init.c: Likewise.
14139 * initialize.c: Likewise.
14140 * link.c: Likewise.
14141 * namet.h: Likewise.
14142 * nlists.h: Likewise.
14143 * raise.c: Likewise.
14144 * raise.h: Likewise.
14145 * repinfo.h: Likewise.
14146 * seh_init.c: Likewise.
14147 * targext.c: Likewise.
14148 * tracebak.c: Likewise.
14149 * uintp.h: Likewise.
14150 * urealp.h: Likewise.
14151 * xeinfo.adb: Wrap up generated C code in extern "C" block.
14152 * xsinfo.adb: Likewise.
14153 * xsnamest.adb: Likewise.
14154 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
14155 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
14156 * gcc-interface/misc.c: Likewise.
14157 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
14158 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
14159 ada/targext.o here...
14160 (GNAT_ADA_OBJS): ...and not here.
14161 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
14162 (GNATBIND_OBJS): Reorder.
14164 2011-07-07 Richard Henderson <rth@redhat.com>
14166 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
14167 dwarf2out_frame_init.
14169 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
14171 * gcc-interface/misc.c (gnat_init): Tweak previous change.
14173 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14176 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
14178 2011-07-06 Richard Guenther <rguenther@suse.de>
14180 * gcc-interface/misc.c (gnat_init): Merge calls to
14181 build_common_tree_nodes and build_common_tree_nodes_2.
14182 Re-initialize boolean_false_node.
14184 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
14185 Olivier Hainque <hainque@adacore.com>
14186 Nicolas Setton <setton@adacore.com>
14188 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
14189 the type according to the ARTIFICIAL_P parameter.
14190 (create_type_decl): Likewise.
14191 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
14193 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
14195 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
14196 (gnatbind): Likewise.
14198 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14200 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
14202 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
14204 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
14205 local variable throughout. Remove useless call to Base_Type.
14206 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
14207 Take it also into account for the volatileness of the field. Set the
14208 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
14210 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
14212 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
14213 on a dereference built for a by-ref object if it has an address clause.
14215 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
14217 * einfo.ads (Address_Taken): Document use for the second argument of
14218 Asm_Input and Asm_Output attributes.
14219 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
14220 argument is an entity name, then set Address_Taken on it.
14221 <Attribute_Asm_Output>: Likewise.
14222 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
14223 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
14224 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
14225 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
14227 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
14229 PR middle-end/46500
14230 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
14232 2011-06-14 Joseph Myers <joseph@codesourcery.com>
14234 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
14235 (ada/utils.o): Update dependencies.
14236 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
14237 ../../../libcpp/libcpp.a.
14238 * gcc-interface/utils.c: Include common/common-target.h.
14239 (process_attributes): Use targetm_common.have_named_sections.
14241 2011-06-07 Richard Guenther <rguenther@suse.de>
14243 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
14246 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
14248 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
14249 TREE_THIS_NOTRAP flag.
14251 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
14253 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
14256 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
14258 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
14259 constants whose full view has discriminants specially.
14261 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
14263 * gcc-interface/utils.c: Include diagnostic.h.
14264 (gnat_write_global_declarations): Output debug information for all
14265 global type declarations before finalizing the compilation unit.
14266 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
14268 2011-05-25 Jakub Jelinek <jakub@redhat.com>
14270 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
14272 2011-05-25 Kai Tietz <ktietz@redhat.com>
14274 * adaint.c (__gnat_to_canonical_file_list_next): Use array
14275 initialization instead of const/none-const pointer assignment.
14277 2011-05-24 Joseph Myers <joseph@codesourcery.com>
14279 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
14280 $(EXTRA_GNAT1_OBJS).
14281 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
14282 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
14283 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
14284 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
14285 libcommon-target.a instead of prefix.o.
14287 2011-05-21 Joseph Myers <joseph@codesourcery.com>
14290 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
14292 2011-05-20 Joseph Myers <joseph@codesourcery.com>
14294 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
14295 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
14296 instead of version.o.
14298 2011-05-18 Kai Tietz <ktietz@redhat.com>
14300 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
14301 boolean_false_node instead of integer_zero_node.
14302 (convert_with_check): Likewise.
14303 * gcc-interface/decl.c (choices_to_gnu): Likewise.
14305 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
14307 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
14308 type of the parameter is an unconstrained array, convert the actual to
14309 the type of the formal in the In Out and Out cases as well.
14311 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
14313 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
14314 call build_function_type_array or build_varargs_function_type_array
14316 (create_subprog_type): Don't call build_function_type; call
14317 build_function_type_vec instead.
14319 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
14321 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
14322 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
14323 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
14325 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
14327 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
14329 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
14330 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
14332 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
14334 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
14336 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
14338 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
14339 instead of accessing TYPE_ARG_TYPES directly.
14340 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
14342 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
14345 * gcc-interface/gigi.h (get_variant_part): Declare.
14346 * gcc-interface/decl.c (get_variant_part): Make global.
14347 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
14348 types have the same constant size, are record types and T1 has a
14349 variant part while T2 doesn't.
14351 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
14353 * gcc-interface/utils.c (begin_subprog_body): Do not call
14355 (end_subprog_body): Likewise.
14357 2011-05-04 Richard Guenther <rguenther@suse.de>
14359 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
14361 (pos_to_constructor): Likewise.
14363 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
14364 Eric Botcazou <ebotcazou@adacore.com>
14366 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
14367 of build_function_type. Adjust calls to...
14368 (build_raise_check): ...this. Do not take a void_tree parameter.
14369 Call build_function_type_list instead of build_function_type.
14370 Fix head comment and swap couple of conditional blocks.
14372 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
14374 * gnatvsn.ads (Library_Version): Bump to 4.7.
14375 (Current_Year): Bump to 2011.
14377 2011-04-29 Michael Matz <matz@suse.de>
14379 * gcc-interface/misc.c (gnat_handle_option): Set
14380 warn_maybe_uninitialized.
14382 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
14384 * gnat_ugn.texi (Complexity Metrics Control): Update link to
14385 the Watson/McCabe paper.
14387 2011-04-23 Jim Meyering <meyering@redhat.com>
14389 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
14391 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
14393 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
14396 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
14398 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
14400 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
14401 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
14402 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
14403 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
14404 <all>: Do not set flags on the reused DECL node coming from an alias.
14405 Set DECL_IGNORED_P on the DECL node built for subprograms if they
14406 don't need debug info here...
14407 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
14408 (gigi): Adjust calls to create_subprog_decl.
14409 (build_raise_check): Likewise.
14410 (establish_gnat_vms_condition_handler): Likewise.
14411 (Compilation_Unit_to_gnu): Likewise.
14412 (gnat_to_gnu): Likewise.
14414 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
14416 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
14417 (NO_REORDER_ADAFLAGS): New variable.
14418 (EXTRA_GNATTOOLS): Always define.
14419 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
14420 Clean up and adjust list of files compiled with special options.
14421 * gcc-interface/Make-lang.in: Likewise.
14422 (ada/decl.o): Cosmetical change.
14423 (ada/misc.o): Remove dependency on $(PLUGIN_H).
14425 2011-04-20 Jim Meyering <meyering@redhat.com>
14427 * initialize.c (__gnat_initialize): Remove useless if-before-free.
14429 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
14431 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
14432 $(CFLAGS) on the link line.
14434 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
14436 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
14437 padded type built for the return type if it is unconstrained.
14439 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
14441 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
14443 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
14445 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
14446 before calling TREE_CHAIN.
14447 * gcc-interface/misc.c (gnat_init_ts): New function.
14448 (LANG_HOOKS_INIT_TS): Define.
14450 2011-04-12 Martin Jambor <mjambor@suse.cz>
14452 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
14453 instead of cgraph_node.
14455 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
14457 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
14458 alignment on fields of the RETURN type built for the Copy-In Copy-Out
14461 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
14463 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
14464 of aggregate types that contain a placeholder.
14466 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
14468 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
14470 (handle_type_generic_attribute): Likewise.
14472 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
14475 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
14477 2011-04-04 Kai Tietz <ktietz@redhat.com>
14480 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
14483 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14485 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
14486 type case, do not strip a padding type around the array type.
14488 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14490 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
14493 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14495 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
14496 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
14497 code for -feliminate-unused-debug-types.
14498 (gnat_post_options): Likewise.
14500 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14502 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
14503 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
14506 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14508 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
14509 DECL_ARTIFICIAL flag on enumeration types.
14511 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14513 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
14514 fat pointer types artificial unconditionally.
14515 <E_Array_Subtype>: Attach the base array type as a parallel type if it
14518 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14520 * gcc-interface/gigi.h (get_dummy_type): Declare.
14521 (build_dummy_unc_pointer_types): Likewise.
14522 (finish_fat_pointer_type): Likewise.
14523 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
14524 fat pointer type has been built, complete it in place.
14525 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
14526 and thin pointers. Remove useless variable.
14527 (finish_fat_pointer_type): Make global and move to...
14528 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
14529 (get_dummy_type): New function.
14530 (build_dummy_unc_pointer_types): Likewise.
14531 (gnat_pushdecl): Propage the name to the anonymous variants only.
14532 (update_pointer_to): Only adjust the pointer types in the unconstrained
14535 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14537 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
14538 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
14539 if this is a Taft amendment type and the full declaration is available.
14540 * gcc-interface/trans.c (process_type): Likewise.
14541 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
14542 (process_freeze_entity): Likewise.
14543 * gcc-interface/utils.c (dummy_global): New static variable.
14544 (gnat_write_global_declarations): If there are types declared as used
14545 at the global level, insert them in the global hash table.
14547 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14549 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
14550 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
14551 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
14553 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
14554 flag of the type accordingly.
14555 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
14557 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14559 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
14560 finalizing types when updating the pointers to the designated type.
14561 <all>: Finalize the deferred types even if we didn't defer processing
14562 of incomplete types in this invocation.
14564 2011-04-01 Olivier Hainque <hainque@adacore.com>
14565 Nicolas Setton <setton@adacore.com>
14566 Eric Botcazou <ebotcazou@adacore.com>
14568 * gcc-interface/misc.c (gnat_descriptive_type): New function.
14569 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
14571 2011-03-28 Kai Tietz <ktietz@redhat.com>
14573 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
14575 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
14576 * system-mingw.ads (System): Change ZCX_By_Default default to True.
14578 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
14580 2011-03-28 Tristan Gingold <gingold@adacore.com>
14583 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
14584 Use ada output of gnatbind.
14585 (ada/b_gnatb.adb): Ditto.
14586 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
14587 (ada.mostlyclean, ada.stage1)
14588 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
14589 (ada.stagefeedback): Adjust.
14590 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
14591 Use ada output of gnatbind.
14592 (b_gnatm.adb): Ditto.
14593 (b_gnatl.o, b_gnatm.o): New rules.
14595 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
14597 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
14598 for the padded type built to support a specified size or alignment.
14600 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
14602 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
14603 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
14604 unconditionally to the end of the unit when the designated type is
14606 <all>: Rename local variable. Attempt to un-defer types only and do it
14607 for limited_with'ed types as well.
14608 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
14609 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
14610 consistently and remove redundant call to finalize_from_with_types.
14612 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
14614 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
14615 subprograms without a previous spec declared in the same unit.
14616 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
14617 subprograms at the end of the unit instead of at the beginning.
14618 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
14619 isn't public for the special handling of non-inline functions nested
14620 inside inline external functions.
14622 2011-03-25 Jeff Law <law@redhat.com>
14624 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
14626 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
14628 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
14629 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
14630 to compute Set_Size_Depends_On_Discriminant.
14631 (Layout_Type): Call it on array types in back-end layout mode.
14632 * sem_util.adb (Requires_Transient_Scope): Return true for array
14633 types only if the size depends on the value of discriminants.
14634 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
14635 type if the RHS is a call to a function that returns an unconstrained
14636 type with default discriminant.
14638 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
14640 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
14641 non-conversion to the nominal result type at the end.
14643 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
14645 * gcc-interface/trans.c (create_temporary): New function taken from...
14646 (create_init_temporary): ...here. Call it.
14647 (call_to_gnu): Create the temporary for the return value early, if any.
14648 Create it for a function with copy-in/copy-out parameters if there is
14649 no target; in other cases of copy-in/copy-out, use another temporary.
14650 Push the new binding level lazily. Add and rename local variables.
14652 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
14654 * gcc-interface/decl.c (validate_size): Improve comments and tweak
14656 (set_rm_size): Likewise.
14658 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
14660 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
14661 for the padded type built in order to support a specified alignment.
14662 Fix incorrect formatting.
14664 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
14667 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
14669 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
14671 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
14672 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
14673 to the end of the list. Adjust recursive call. Rename local variable.
14674 If REORDER is true, reorder components of the record type.
14675 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
14676 components_to_record and adjust the parameter list.
14678 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
14680 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
14681 disabled, use the variable for bounds of loop iteration scheme.
14683 2011-03-21 Kai Tietz <ktietz@redhat.com>
14686 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
14688 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
14690 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
14691 out whether the expression is read-only. Short-circuit placeholder
14692 case and rename a couple of local variables.
14694 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
14696 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
14697 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
14698 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
14699 (convert): Deal with conversions from a smaller form type specially.
14701 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
14703 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
14704 its argument, except for the special -I- switch.
14706 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
14708 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
14711 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
14713 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
14715 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
14717 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
14719 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
14720 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
14721 instead of GNAT_FORMAL. Protect the expression against multiple uses.
14722 Do not generate the check directly, instead instantiate the template
14723 check present in the descriptor.
14724 (make_descriptor_field): Move around.
14725 (build_vms_descriptor32): Build a template check in the POINTER field.
14726 (build_vms_descriptor): Remove useless suffixes.
14727 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
14729 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
14732 * targext.c: Include target files if IN_RTS is defined.
14734 2011-01-26 Richard Guenther <rguenther@suse.de>
14737 * targext.c: Include config.h.
14738 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
14741 2011-01-04 Pascal Obry <obry@adacore.com>
14742 Eric Botcazou <ebotcazou@adacore.com>
14744 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
14746 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
14748 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
14749 end-of-case on the end label and its associated gotos, if any.
14751 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
14753 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
14754 expressions of the parameter cache within the statement group of
14755 the CICO mechanism.
14757 2011-01-04 Olivier Hainque <hainque@adacore.com>
14758 Eric Botcazou <ebotcazou@adacore.com>
14760 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
14761 (set_end_locus_from_node): New function.
14762 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
14763 make and the function end_locus.
14764 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
14765 for the elaboration subprogram.
14766 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
14767 set the end_locus of the expression as well.
14769 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
14772 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
14773 variables that are referenced in exception handlers volatile.
14777 Copyright (C) 2011 Free Software Foundation, Inc.
14779 Copying and distribution of this file, with or without modification,
14780 are permitted in any medium without royalty provided the copyright
14781 notice and this notice are preserved.
14783 * gnat_rm.texi: Ramification of pragma Eliminate documentation
14784 - fix bugs in the description of Source_Trace;
14785 - get rid of UNIT_NAME;
14787 2011-08-02 Javier Miranda <miranda@adacore.com>
14790 (Build_Dispatching_Requeue): Adding support for VM targets
14791 since we cannot directly reference the Tag entity.
14792 * exp_sel.adb (Build_K): Adding support for VM targets.
14793 (Build_S_Assignment): Adding support for VM targets.
14795 (Default_Prim_Op_Position): In VM targets do not restrict availability
14796 of predefined interface primitives to compiling in Ada 2005 mode.
14797 (Is_Predefined_Interface_Primitive): In VM targets this service is not
14798 restricted to compiling in Ada 2005 mode.
14799 (Make_VM_TSD): Generate code that declares and initializes the OSD
14800 record. Needed to support dispatching calls through synchronized
14803 (Make_Predefined_Primitive_Specs): Enable generation of predefined
14804 primitives associated with synchronized interfaces.
14805 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
14806 primitives associated with synchronized interfaces.
14808 2011-08-02 Yannick Moy <moy@adacore.com>
14810 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
14811 statements hidden in SPARK if preceded by the HIDE directive
14812 (Parse_Exception_Handlers): mark each exception handler in a sequence of
14813 exception handlers as hidden in SPARK if preceded by the HIDE directive
14814 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
14815 if starting with the HIDE directive
14816 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
14817 starting with the HIDE directive; mark the declarations in a private
14818 part as hidden in SPARK if the private part starts with the HIDE
14820 * restrict.adb, restrict.ads
14821 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
14822 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
14823 argument node belongs to a part which is hidden in SPARK
14824 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
14825 parts in SPARK; protect the possibly costly call to
14826 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
14827 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
14828 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
14829 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
14831 (Scan): recognize special comment starting with '#' and followed by
14832 SPARK keyword "hide" as a HIDE directive.
14834 2011-08-02 Yannick Moy <moy@adacore.com>
14836 * types.ads, erroutc.ads: Minor reformatting.
14838 2011-08-02 Vincent Celier <celier@adacore.com>
14840 * link.c: Add response file support for cross platforms.
14842 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14844 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
14845 in an association, set parent field of copy before partial analysis.
14846 * sem_res.adb (Resolve_Slice): create reference to itype only when
14847 expansion is enabled.
14849 2011-08-02 Yannick Moy <moy@adacore.com>
14851 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
14852 for new flag denoting which subprogram bodies are in ALFA
14853 * restrict.adb, sem_ch7.adb: Update comment
14854 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
14855 sem_ch9.adb, sem_res.adb: Add calls to
14856 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
14857 * sem_ch6.adb (Analyze_Function_Return): add calls to
14858 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
14859 middle of the body, and extended return.
14860 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
14861 False when missing return.
14862 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
14863 to True for subprograms whose spec is in ALFA. Remove later on the flag
14864 on the entity used for a subprogram body when there exists a separate
14866 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
14867 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
14868 False, otherwise do nothing.
14870 2011-08-02 Robert Dewar <dewar@adacore.com>
14872 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
14874 2011-08-02 Yannick Moy <moy@adacore.com>
14876 * sem_ch4.ads: minor formatting.
14878 2011-08-02 Yannick Moy <moy@adacore.com>
14880 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
14881 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
14882 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
14883 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
14884 opt.ads: cleanup of SPARK mode
14886 2011-08-02 Yannick Moy <moy@adacore.com>
14888 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
14890 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
14891 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
14893 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
14894 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
14895 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
14896 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
14898 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
14900 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
14901 functions whose return type is not in ALFA.
14902 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
14904 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
14905 parameter's type is not in ALFA.
14906 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
14909 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14911 * sem_ch6 (Analyze_Expression_Function): treat the function as
14912 Inline_Always, and introduce a subprogram declaration for it when it is
14914 * inline.adb (Add_Inlined_Body): recognize bodies that come from
14915 expression functions, so that the back-end can determine whether they
14916 can in fact be inlined.
14917 * sem_util.adb (Is_Expression_Function): predicate to determine whether
14918 a function body comes from an expression function.
14920 2011-08-02 Gary Dismukes <dismukes@adacore.com>
14922 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
14923 null exclusions to test Can_Never_Be_Null on the anonymous access types
14924 of the formals rather than testing the formals themselves. Exclude this
14925 check in cases where the Old_Formal is marked as a controlling formal,
14926 to avoid issuing spurious errors for bodies completing dispatching
14927 operations (due to the flag not getting set on controlling access
14928 formals in body specs).
14929 (Find_Corresponding_Spec): When checking full and subtype conformance of
14930 subprogram bodies in instances, pass Designated and E in that order, for
14931 consistency with the expected order of the formals (New_Id followed by
14934 2011-08-02 Robert Dewar <dewar@adacore.com>
14936 * sem_ch8.adb: Minor reformatting.
14938 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14940 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
14941 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
14942 primitive operations of class-wide actuals.
14944 2011-08-02 Javier Miranda <miranda@adacore.com>
14946 * exp_atag.ads, exp_atag.adb
14947 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
14948 since its value is implicitly passed in argument Typ.
14949 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
14950 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
14951 Build_Common_Dispatching_Select_Statements.
14953 2011-08-02 Robert Dewar <dewar@adacore.com>
14955 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
14956 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
14957 Minor reformatting.
14959 2011-08-02 Robert Dewar <dewar@adacore.com>
14961 * sem_res.adb: Minor reformatting.
14962 * sem_prag.adb: Minor reformatting.
14964 2011-08-02 Javier Miranda <miranda@adacore.com>
14966 * exp_atag.adb, exp_atags.ads
14967 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
14968 by the tagged type Entity. Required to use this routine in the VM
14969 targets since we do not have available the Tag entity in the VM
14972 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
14973 Ada.Tags has not been previously loaded.
14975 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
14976 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
14978 (Enclosing_Dynamic_Scope): Add missing support to handle the full
14979 view of enclosing scopes. Required to handle enclosing scopes that
14980 are synchronized types whose full view is a task type.
14982 (Build_VM_TSDs): Minor code improvement to avoid generating and
14983 analyzing lists with empty nodes.
14984 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
14985 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
14986 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
14987 (Make_Disp_Timed_Select_Body): Add support for VM targets.
14988 (Make_Select_Specific_Data_Table): Add support for VM targets.
14989 (Make_VM_TSD): Generate code to initialize the SSD structure of
14992 2011-08-02 Yannick Moy <moy@adacore.com>
14994 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
14995 cross-references section in ALI.
14996 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
14997 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
14999 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
15000 subprogram or package entity of a node
15001 (Is_Local_Reference_Type): new function returns True for references
15002 selected in local cross-references.
15003 (Lt): function extracted from Lt in Output_References
15004 (Write_Entity_Name): function extracted from Output_References
15005 (Generate_Definition): generate reference with type 'D' for definition
15006 of objects (object declaration and parameter specification), with
15007 appropriate locations and units, for use in local cross-references.
15008 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
15009 references of type 'I' for initialization in object definition.
15010 (Output_References): move part of function Lt and procedure
15011 Write_Entity_Name outside of the body. Ignore references of types 'D'
15012 and 'I' introduced for local cross-references.
15013 (Output_Local_References): new procedure to output the local
15014 cross-references sections.
15015 (Lref_Entity_Status): new array defining whether an entity is a local
15016 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
15017 with 'I' type when initialization expression is present.
15018 * get_scos.adb, get_scos.ads: Correct comments and typos
15020 2011-08-02 Javier Miranda <miranda@adacore.com>
15022 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
15024 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
15026 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
15029 2011-08-02 Vincent Celier <celier@adacore.com>
15031 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
15032 (No_Space_Img): New function
15033 (Find_Excluded_Sources): When reading from a file, record the file name
15034 and the line number for each excluded source.
15035 (Mark_Excluded_Sources): When reporting an error, if the excluded
15036 sources were read from a file, include file name and line number in
15039 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15041 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
15043 2011-08-02 Robert Dewar <dewar@adacore.com>
15045 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
15047 2011-08-02 Javier Miranda <miranda@adacore.com>
15049 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
15050 generation of TSDs to the DOTNET compiler.
15051 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
15052 generation of TSDs to the DOTNET compiler.
15054 2011-08-02 Javier Miranda <miranda@adacore.com>
15056 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
15057 record of all the tagged types declared inside library level package
15058 declarations, library level package bodies or library level subprograms.
15059 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
15060 associated with a given tagged type.
15061 (Build_VM_TSDs): New subprogram.
15062 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
15063 compilation units that are subprograms.
15064 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
15065 compilation units that are package bodies.
15066 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
15067 units that are a package declaration or a package instantiation.
15068 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
15069 reorganization to improve the error generated by the frontend when the
15070 function Ada.Tags.Secondary_Tag is not available.
15071 * rtsfind.ads (RE_Register_TSD): New runtime entity.
15072 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
15074 2011-08-02 Javier Miranda <miranda@adacore.com>
15076 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
15078 2011-08-02 Robert Dewar <dewar@adacore.com>
15080 * s-imenne.ads: Minor reformatting.
15082 2011-08-02 Robert Dewar <dewar@adacore.com>
15084 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
15085 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
15086 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
15088 2011-08-02 Robert Dewar <dewar@adacore.com>
15090 * einfo.ads (Materialize_Entity): Document this is only for renamings
15091 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
15092 required debug information in the case where we transform the object
15093 declaration into a renaming declaration.
15094 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
15096 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
15097 Materialize_Entity.
15099 2011-08-02 Robert Dewar <dewar@adacore.com>
15101 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
15102 Suppress_Init_Procs.
15103 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
15104 Suppress_Initialization/Initialization_Suppressed.
15105 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
15106 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
15107 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
15108 * sem_prag.adb: New processing for pragma Suppress_Initialization.
15110 2011-08-02 Robert Dewar <dewar@adacore.com>
15112 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
15113 Minor reformatting.
15115 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15117 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
15118 only have inheritable classwide pre/postconditions.
15120 2011-08-02 Javier Miranda <miranda@adacore.com>
15122 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
15123 * rtsfind.ads (RE_Check_TSD): New runtime entity.
15124 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
15125 checks if the external tag of a type is the same as the external tag
15126 of some other declaration.
15128 2011-08-02 Thomas Quinot <quinot@adacore.com>
15130 * s-taskin.ads: Minor reformatting.
15132 2011-08-02 Emmanuel Briot <briot@adacore.com>
15134 * g-comlin.adb (Display_Help): swap the order in which it prints the
15135 short help and the general usage.
15137 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15139 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
15140 the aspect declarations and attach them to the generic copy for
15141 subsequent analysis.
15142 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
15143 declarations of the generic tree to the new subprogram declarations.
15144 * sem_attr.adb (Check_Precondition_Postcondition): recognize
15145 conditions that apply to a subprogram instance.
15147 2011-08-02 Robert Dewar <dewar@adacore.com>
15149 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
15151 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15153 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
15154 private type with a tagged full view is not derived in the immediate
15155 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
15157 2011-08-02 Robert Dewar <dewar@adacore.com>
15159 * exp_ch4.adb: Minor reformatting.
15161 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15163 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
15164 Ada2012 iterator, the loop will be rewritten during expansion into a
15165 while loop with a cursor and an element declaration. Do not analyze the
15166 body in this case, because if the container is for indefinite types the
15167 actual subtype of the elements will only be determined when the cursor
15168 declaration is analyzed.
15170 2011-08-02 Arnaud Charlet <charlet@adacore.com>
15172 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
15173 size/alignment related attributes in CodePeer_Mode.
15175 2011-08-02 Gary Dismukes <dismukes@adacore.com>
15177 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
15178 Prepend_Element, since this can result in the operation getting the
15179 wrong slot in the full type's dispatch table if the full type has
15180 inherited operations. The incomplete type's operation will get added
15181 to the proper position in the full type's primitives
15182 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
15183 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
15184 dispatching operations, since there are cases where nonprimitive
15185 subprograms can get added to the list of incomplete dependents (such
15186 as subprograms in nested packages).
15187 * sem_ch6.adb (Process_Formals): First, remove test for being in a
15188 private part when determining whether to add a primitive with a
15189 parameter of a tagged incomplete type to the Private_Dependents list.
15190 Such primitives can also occur in the visible part, and should not have
15191 been excluded from being private dependents.
15192 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
15193 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
15194 list of a Taft-amendment incomplete type is a primitive before issuing
15195 an error that the full type must appear in the same unit. There are
15196 cases where nonprimitives can be in the list (such as subprograms in
15198 * sem_disp.adb (Derives_From): Use correct condition for checking that
15199 a formal's type is derived from the type of the corresponding formal in
15200 the parent subprogram (the condition was completely wrong). Add
15201 checking that was missing for controlling result types being derived
15202 from the result type of the parent operation.
15204 2011-08-02 Yannick Moy <moy@adacore.com>
15206 * errout.adb (First_Node): minor renaming
15207 * restrict.adb (Check_Formal_Restriction): put restriction warning on
15210 2011-08-02 Yannick Moy <moy@adacore.com>
15212 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
15213 before accessing operands.
15214 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
15215 decide whether an initialization expression respects SPARK rules, as
15216 the plain node is the expanded one. This allows for more valid warnings
15218 * gnat_rm.texi: Minor update.
15220 2011-08-02 Arnaud Charlet <charlet@adacore.com>
15222 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
15225 2011-08-02 Robert Dewar <dewar@adacore.com>
15227 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
15229 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
15231 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
15232 loop statements and the element renaming declaration with a block when
15233 the element type is controlled.
15235 2011-08-02 Yannick Moy <moy@adacore.com>
15237 * sinfo.ads: Minor formatting.
15239 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15241 * sem_aggr.adb (Add_Association): if the association has a box and no
15242 expression, use the Sloc of the aggregate itself for the new
15244 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
15247 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
15249 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
15250 When a container is provided via a function call, generate a renaming
15251 of the function result. This avoids the creation of a transient scope
15252 and the premature finalization of the container.
15253 * exp_ch7.adb (Is_Container_Cursor): Removed.
15254 (Wrap_Transient_Declaration): Remove the supression of the finalization
15255 of the list controller when the declaration denotes a container cursor,
15258 2011-08-02 Yannick Moy <moy@adacore.com>
15260 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
15261 node is from source, instead of the original node being from source.
15263 (Resolve_Array_Aggregate): refine the check for a static expression, to
15264 recognize also static ranges
15265 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
15266 Array_Type_Declaration): postpone the test for the type being a subtype
15267 mark after the type has been resolved, so that component-selection and
15268 expanded-name are discriminated.
15269 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
15270 to distinguish the case of an iteration scheme, so that an error is
15271 issed on a non-static range in SPARK except in an iteration scheme.
15272 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
15273 In_Iter_Schm = True.
15274 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
15275 user-defined operators so that they are allowed in renaming
15277 (Find_Selected_Component): refine the check for prefixing of operators
15278 so that they are allowed in renaming. Move the checks for restrictions
15279 on selector name after analysis discriminated between
15280 component-selection and expanded-name.
15281 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
15282 concatenation argument of string type if it is static.
15283 * sem_util.adb, sem_util.ads
15284 (Check_Later_Vs_Basic_Declarations): add a new function
15285 Is_Later_Declarative_Item to decice which declarations are allowed as
15286 later items, in the two different modes Ada 83 and SPARK. In the SPARK
15287 mode, add that renamings are considered as later items.
15288 (Enclosing_Package): new function to return the enclosing package
15289 (Enter_Name): correct the rule for homonyms in SPARK
15290 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
15291 from source (result of expansion) to avoid issuing wrong warnings.
15293 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15295 * errout.adb: On anything but an expression First_Node returns its
15298 2011-08-02 Pascal Obry <obry@adacore.com>
15300 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
15302 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
15304 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
15305 Set the associated loop as the related expression of internally
15307 * exp_ch7.adb (Is_Container_Cursor): New routine.
15308 (Wrap_Transient_Declaration): Supress the finalization of the list
15309 controller when the declaration denotes a container cursor.
15311 2011-08-02 Yannick Moy <moy@adacore.com>
15313 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
15315 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
15316 expression is a simple expression. This check cannot be performed in
15317 the semantics, so just drop it.
15318 (P_Index_Or_Discriminant_Constraint): move check that the index or
15319 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
15320 semantics. Other cases were previously checked in the semantics.
15321 * par-ch4.adb (P_Name): move checks that a selector name is not
15322 character literal or an operator symbol to Find_Selected_Component in
15324 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
15325 declarations are not placed after later declarations in a separate
15326 procedure in Sem_Util (possibly not the best choice?), to be used both
15327 during parsing, for Ada 83 mode, and during semantic analysis, for
15329 * par-endh.adb (Check_End): move check that end label is not missing
15330 to Process_End_Label in the semantics
15331 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
15332 the special case for SPARK restriction
15333 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
15334 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
15335 parameter Force to issue the error message even on internal node (used
15336 for generated end label). Call Check_Restriction to check when an error
15337 must be issued. In SPARK mode, issue an error message even if the
15338 restriction is not set.
15339 (Check_Restriction): new procedure with an additional out parameter to
15340 inform the caller that a message has been issued
15341 * sem_aggr.adb: Minor modification of message
15342 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
15343 instead of issuing an error message directly
15344 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
15345 declarations are not placed after later declarations, by calling
15346 Check_Later_Vs_Basic_Declarations
15347 (Analyze_Subtype_Declaration): move here the check that an index or
15348 discriminant constraint must be a subtype mark. Change the check that
15349 a subtype of String must start at one so that it works on subtype marks.
15350 * sem_ch4.adb (Analyze_Call): move here the check that a named
15351 association cannot follow a positional one in a call
15352 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
15353 instead of issuing an error message directly
15354 * sem_ch8.adb (Find_Selected_Component): move here the check that a
15355 selector name is not a character literal or an operator symbol. Move
15356 here the check that the prefix of an expanded name cannot be a
15357 subprogram or a loop statement.
15358 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
15359 procedure called from parsing and semantics to check that basic
15360 declarations are not placed after later declarations
15361 (Process_End_Label): move here the check that end label is not missing
15363 2011-08-02 Arnaud Charlet <charlet@adacore.com>
15365 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
15366 representation clause in codepeer mode, since it confuses CodePeer and
15367 does not bring useful info.
15369 2011-08-02 Ed Falis <falis@adacore.com>
15371 * init.c: initialize fp hw on MILS.
15373 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15375 * errout.adb (First_Node): for bodies, return the node itself (small
15376 optimization). For other nodes, do not check source_unit if the node
15377 comes from Standard.
15379 2011-08-02 Robert Dewar <dewar@adacore.com>
15381 * exp_ch3.adb: Minor comment additions.
15382 * sem_ch13.adb: Minor reformatting.
15384 2011-08-02 Pascal Obry <obry@adacore.com>
15386 * make.adb, makeutl.adb: Removes some superfluous directory separator.
15388 2011-08-02 Robert Dewar <dewar@adacore.com>
15390 * sem_attr.adb: Minor reformatting.
15392 2011-08-02 Robert Dewar <dewar@adacore.com>
15394 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
15395 (Has_Default_Component_Value): Removed
15396 * einfo.ads Comment updates
15397 (Has_Default_Aspect): Replaces Has_Default_Value
15398 (Has_Default_Component_Value): Removed
15400 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
15402 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
15403 (Get_Simple_Init_Val): Handle Default_Value aspect
15404 (Needs_Simple_Initialization): Handle Default_Value aspect
15405 * exp_ch3.ads: Needs_Simple_Initialization
15406 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
15407 * par-prag.adb (Pragma_Default[_Component]Value) Removed
15409 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
15410 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
15411 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
15413 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15415 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
15416 package containing iteration primitives.
15417 exp_ch5.adb (Expand_Iterator_Loop): ditto.
15419 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15421 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
15422 "of", pre-analyze expression in case it is a function call with
15423 finalization actions that must be placed ahead of the loop.
15424 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
15425 on an Ada2012 iterator, insert them ahead of the rewritten loop.
15427 2011-08-02 Geert Bosch <bosch@adacore.com>
15429 * cstand.adb (Create_Float_Types): Only consider C's long double for
15430 Long_Long_Float, in addition to double.
15432 2011-08-02 Robert Dewar <dewar@adacore.com>
15434 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
15435 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
15436 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
15437 Minor reformatting.
15439 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15441 * sem_attr.adb: handle properly 'Result when it is a prefix of an
15444 2011-08-02 Javier Miranda <miranda@adacore.com>
15446 * einfo.ads, einfo.adb
15447 (Original_Access_Type): Move this attribute to Node26 since there was
15448 an undocumented use of Node21 in E_Access_Subprogram_Type entities
15449 which causes conflicts and breaks the generation of the .NET compiler.
15450 (Interface_Name): Add missing documentation on JGNAT only uses of
15453 2011-08-02 Geert Bosch <bosch@adacore.com>
15455 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
15456 (Find_Back_End_Float_Type): Likewise
15457 (Create_Back_End_Float_Types): Likewise
15458 (Create_Float_Types): Likewise
15459 (Register_Float_Type): Likewise
15460 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
15461 Nlist and split out type selection in new local Find_Base_Type function.
15462 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
15464 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
15466 2011-08-02 Robert Dewar <dewar@adacore.com>
15468 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
15470 * opt.ads: Minor comment change.
15471 * sem_ch12.adb: Minor code reorganization.
15473 2011-08-02 Gary Dismukes <dismukes@adacore.com>
15475 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
15476 subtype's list of rep items to the list on the full subtype in the case
15477 where the lists are the same.
15479 2011-08-02 Geert Bosch <bosch@adacore.com>
15481 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
15482 using the one from System.Strings, which also deallocates all strings.
15484 2011-08-02 Geert Bosch <bosch@adacore.com>
15486 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
15488 * gcc-interface/Make-lang.in: Update dependencies.
15490 2011-08-02 Olivier Hainque <hainque@adacore.com>
15492 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
15495 2011-08-02 Javier Miranda <miranda@adacore.com>
15497 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
15498 associated with anonymous access to subprograms.
15500 2011-08-02 Geert Bosch <bosch@adacore.com>
15503 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
15504 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
15505 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
15506 (Add_Symbol_Definition): Move to switch-c.adb
15507 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
15508 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
15509 (Add_Symbol_Definition): Move to switch-c.adb.
15510 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
15512 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
15513 Move to warnsw.adb.
15514 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
15515 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
15516 Move to warnsw.adb.
15517 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
15518 (Add_Symbol_Definition): Moved from Prepcomp.
15519 * switch-c.ads: Update copyright notice. Use String_List instead of
15520 Argument_List, removing dependency on System.OS_Lib.
15522 2011-08-02 Yannick Moy <moy@adacore.com>
15524 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
15525 mode on initialization expression which does not respect SPARK
15527 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
15528 if the tree referenced by its argument represents an initialization
15529 expression in SPARK, suitable for initializing an object in an object
15532 2011-08-02 Javier Miranda <miranda@adacore.com>
15534 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
15535 internally generated access to subprogram with its associated protected
15537 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
15539 2011-08-02 Geert Bosch <bosch@adacore.com>
15541 * cstand.adb (Register_Float_Type): Print information about type to
15542 register, if the Debug_Flag_Dot_B is set.
15543 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
15544 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
15545 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
15546 with a requested precision of more than Max_Digits digits and no more
15547 than Max_Base_Digits digits, if a range specification is present and the
15548 Predefined_Float_Types list has a suitable type to derive from.
15549 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
15550 case of type completion with pragma Import
15552 (Process_Import_Predefined_Type): Processing to complete a type
15553 with pragma Import. Currently supports floating point types only.
15554 (Set_Convention_From_Pragma): Do nothing without underlying type.
15555 (Process_Convention): Guard against absence of underlying type,
15556 which may happen when importing incomplete types.
15557 (Process_Import_Or_Interface): Handle case of importing predefined
15558 types. Tweak error message.
15560 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
15562 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
15563 functions to previous change. Reorganize code slightly.
15565 2011-08-02 Geert Bosch <bosch@adacore.com>
15567 * back_end.ads (Register_Type_Proc): New call back procedure type for
15568 allowing the back end to provide information about available types.
15569 (Register_Back_End_Types): New procedure to register back end types.
15570 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
15572 * cstand.adb (Back_End_Float_Types): New list for floating point types
15573 supported by the back end.
15574 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
15575 (Copy_Float_Type): New procedure to make new copies of predefined types.
15576 (Register_Float_Type): New call back procedure to populate the BEFT list
15577 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
15578 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
15579 (Create_Float_Types): New procedure to create entities for floating
15580 point types predefined in Standard, and put these and any remaining
15581 BEFTs on the Predefined_Float_Types list.
15582 * stand.ads (Predefined_Float_Types): New list for predefined floating
15583 point types that do not have declarations in package Standard.
15585 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
15587 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
15588 entity node for the unit containing the parameter.
15589 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
15590 (Add_Inlined_Subprogram): Likewise.
15591 * gcc-interface/Make-lang.in: Update dependencies.
15593 2011-08-02 Thomas Quinot <quinot@adacore.com>
15595 * s-stusta.adb (Print): Make sure Pos is always initialized to a
15598 2011-08-02 Geert Bosch <bosch@adacore.com>
15600 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
15602 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
15604 * sem_type.adb (Covers): Move trivial case to the top and reuse the
15605 computed value of Base_Type.
15607 2011-08-02 Yannick Moy <moy@adacore.com>
15609 * restrict.adb (Check_Restriction): issue an error for any use of
15610 class-wide, even if the No_Dispatch restriction is not set.
15611 * sem_aggr.adb: Correct typos in comments and messages in formal mode
15612 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
15613 when completing a private extension, the type named in the private part
15614 is not the same as that named in the visible part.
15615 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
15616 of an inherited primitive operations of a tagged type or type extension
15617 that returns the tagged type.
15618 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
15619 function which returns True for an implicit operation inherited by the
15620 derived type declaration for the argument type.
15621 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
15624 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15626 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
15627 Process_Bounds, to perform analysis with expansion of a range or an
15628 expression that is the iteration scheme for a loop.
15629 (Analyze_Iterator_Specification): If domain of iteration is given by a
15630 function call with a controlled result, as is the case if call returns
15631 a predefined container, ensure that finalization actions are properly
15633 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
15635 2011-08-02 Javier Miranda <miranda@adacore.com>
15637 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
15638 * gcc-interface/Make-lang.in: Update dependencies.
15640 2011-08-02 Javier Miranda <miranda@adacore.com>
15642 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
15643 determine if the analysis is performed using N or Original_Node (N).
15644 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
15645 functionality of routine Is_Variable avoids code duplication.
15646 * checks.adb (Determine_Range): Handle temporaries generated by
15647 Remove_Side_Effects.
15649 2011-08-02 Javier Miranda <miranda@adacore.com>
15651 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
15652 expansion of the condition. Required since the previous analysis was
15653 done with expansion disabled (see Resolve_Quantified_Expression) and
15654 hence checks were not inserted and record comparisons have not been
15657 2011-08-02 Ed Falis <falis@adacore.com>
15659 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
15662 2011-08-02 Bob Duff <duff@adacore.com>
15664 * opt.ads: Minor comment fix.
15666 2011-08-02 Bob Duff <duff@adacore.com>
15668 * sem_ch12.adb (Analyze_Package_Instantiation,
15669 Analyze_Subprogram_Instantiation): Turn off style checking while
15670 analyzing an instance. Whatever style checks that apply to the generic
15671 unit should apply, so it makes no sense to apply them in an instance.
15672 This was causing trouble when compiling an instance of a runtime
15673 unit that violates the -gnatyO switch.
15674 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
15675 one of the two case statements, causing spurious errors.
15677 2011-08-02 Robert Dewar <dewar@adacore.com>
15679 * uname.adb: Minor reformatting.
15680 * gnatcmd.adb: Minor reformatting.
15681 * exp_attr.adb: Minor reformatting.
15683 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15685 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
15686 No_Dispatching_Calls, do not look for the Assign primitive, because
15687 predefined primitives are not created in this case.
15689 2011-08-02 Bob Duff <duff@adacore.com>
15691 * stylesw.ads: Minor comment fixes.
15693 2011-08-02 Robert Dewar <dewar@adacore.com>
15695 * freeze.adb (Add_To_Result): New procedure.
15697 2011-08-02 Jose Ruiz <ruiz@adacore.com>
15699 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
15700 time, if the specific run-time routines for handling streams of strings
15701 are not available, use the default mechanism.
15703 2011-08-02 Arnaud Charlet <charlet@adacore.com>
15705 * s-regpat.ads: Fix typo.
15707 2011-08-02 Vincent Celier <celier@adacore.com>
15709 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
15710 not null, call it to create the in memory config project file without
15711 parsing an existing default config project file.
15713 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
15715 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
15717 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15719 * sem_elim.adb: an abstract subprogram does not need an eliminate
15720 pragma for its descendant to be eliminable.
15722 2011-08-02 Ed Falis <falis@adacore.com>
15724 * init.c: revert to handling before previous checkin for VxWorks
15725 * s-intman-vxworks.adb: delete unnecessary declarations related to
15726 using Ada interrupt facilities for handling signals.
15727 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
15728 * s-intman-vxworks.ads: Import __gnat_install_handler as
15729 Initialize_Interrupts.
15730 * s-taprop-vxworks.adb: Delete Signal_Mask.
15731 (Abort_Handler): change construction of mask to unblock exception
15734 2011-08-02 Jerome Guitton <guitton@adacore.com>
15736 * a-except-2005.adb (Raise_From_Signal_Handler): Call
15737 Debug_Raise_Exception before propagation starts.
15739 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
15741 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
15742 to Restriction_Check_Required.
15743 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
15744 * sem_res.adb (Resolve_Call): Likewise.
15745 * sem_attr.adb (Check_Stream_Attribute): Likewise.
15747 2011-08-02 Bob Duff <duff@adacore.com>
15749 * stylesw.ads: Update comment.
15750 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
15751 * errout.ads: Remove obsolete comment.
15753 2011-08-02 Javier Miranda <miranda@adacore.com>
15755 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
15756 (Set_Is_Safe_To_Reevaluate): new procedure.
15757 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
15758 assignment is allowed on safe-to-reevaluate variables.
15759 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
15760 temporary created to remove side effects in expressions that use
15761 the secondary stack as safe-to-reevaluate.
15762 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
15763 variables that are not true constants.
15765 2011-08-02 Robert Dewar <dewar@adacore.com>
15767 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
15768 sem_res.adb, sem_ch6.adb: Minor reformatting.
15770 2011-08-02 Jerome Guitton <guitton@adacore.com>
15772 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
15774 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15776 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
15777 not set Overridden_Operation if subprogram is an initialization
15780 2011-08-02 Yannick Moy <moy@adacore.com>
15782 * par-ch6.adb: Correct obsolete name in comments
15783 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
15784 which takes two message arguments (existing function takes one), with
15785 second message used for continuation.
15786 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
15787 block statements that originate from a source block statement, not
15788 generated block statements
15789 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
15790 symmetry with procedure case
15791 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
15792 function to issue an error in formal mode if a package specification
15793 contains more than one tagged type or type extension.
15794 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
15795 parameters matching formals of tagged types are objects (or ancestor
15796 type conversions of objects), not general expressions. Issue an error
15797 on view conversions that are not involving ancestor conversion of an
15799 (Resolve_Type_Conversion): in formal mode, issue an error on the
15800 operand of an ancestor type conversion which is not an object
15801 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
15802 procedure so that it works also for actuals of function calls
15803 (Is_Actual_Tagged_Parameter): new function which determines if its
15804 argument is an actual parameter of a formal of tagged type in a
15806 (Is_SPARK_Object_Reference): new function which determines if the tree
15807 referenced by its argument represents an object in SPARK
15809 2011-08-02 Robert Dewar <dewar@adacore.com>
15811 * sem_ch3.adb: Minor reformatting
15812 Minor comment addition
15813 Minor error msg text change
15815 2011-08-02 Javier Miranda <miranda@adacore.com>
15817 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
15818 function. Used to be more precise when we generate a variable plus one
15819 assignment to remove side effects in the evaluation of the Bound
15821 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
15822 of the bound expression to force its re-analysis and thus expand the
15823 associated transient scope (if required). Code cleanup replacing the
15824 previous code that declared the constant entity by an invocation to
15825 routine Force_Evaluation which centralizes this work in the frontend.
15827 2011-08-02 Robert Dewar <dewar@adacore.com>
15829 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
15830 (Base_Type): Now uses improved Is_Base_Type function
15831 * einfo.ads (Base_Type): Inline this function
15833 2011-08-02 Robert Dewar <dewar@adacore.com>
15835 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
15836 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
15838 2011-08-02 Arnaud Charlet <charlet@adacore.com>
15840 * gcc-interface/Make-lang.in: Update dependencies.
15841 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
15844 2011-08-02 Yannick Moy <moy@adacore.com>
15846 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
15847 non-simple expression used in delta constraint
15848 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
15849 index constraint which is not a subtype mark
15850 * par.adb: With and use Restrict
15851 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
15852 mode on component type which is not a subtype mark and default
15853 expression on component
15854 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
15855 of string which does not have a lower index bound equal to 1
15856 (Array_Type_Declaration): issue an error in formal mode on index or
15857 component type which is not a subtype mark, and on aliased keyword on
15859 (Derived_Type_Declaration): issue an error in formal mode on interface,
15860 limited or abstract type
15861 (Record_Type_Declaration): issue an error in formal mode on interface
15862 (Record_Type_Definition): issue an error in formal mode on tagged types
15863 and type extensions not declared in the specification of a library unit
15864 package; on null non-tagged record; on variant part
15866 2011-08-02 Vincent Celier <celier@adacore.com>
15868 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
15869 not declared for qualified library project when Library_Name is not
15870 declared, but Library_Dir is.
15872 2011-08-02 Robert Dewar <dewar@adacore.com>
15874 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
15875 pragmas (affects aspects [Component_]Default_Value
15876 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
15877 component type for the resolution
15879 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
15881 * einfo.adb (Base_Type): Tune implementation for speed.
15883 2011-08-02 Robert Dewar <dewar@adacore.com>
15885 * freeze.adb: Minor reformatting.
15887 2011-08-02 Thomas Quinot <quinot@adacore.com>
15889 * scos.ads: Update comments.
15891 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15893 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
15894 base type, because the parent may be a subtype of a private type whose
15895 convention is established in a private part.
15897 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
15899 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
15900 statement in a block when the expansion of the return expression has
15901 created a finalization chain.
15902 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
15903 with the parent node.
15904 Add N_Extended_Return_Statement to handle the case where a transient
15905 object declaration appears in the Return_Object_Declarations list of
15906 an extended return statement.
15908 2011-08-02 Matthew Gingell <gingell@adacore.com>
15910 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
15911 unused parameter 'name'.
15913 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15915 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
15916 inherited operation, check whether its alias, which is the source
15917 operastion that it renames, has been marked eliminated.
15919 2011-08-02 Javier Miranda <miranda@adacore.com>
15921 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
15922 in-mode parameter whose type is an access type since it can be used to
15923 modify its designated object. Enforce code that handles as safe an
15924 access type that is not access-to-constant but it is the result of a
15925 previous removal of side-effects.
15926 (Remove_Side_Effects): Minor code reorganization of cases which require
15927 no action. Done to incorporate documentation on new cases uncovered
15928 working in this ticket: no action needed if this routine was invoked
15929 too early and the nodes are not yet decorated.
15930 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
15931 to routine Remove_Side_Effects by calls to Force_Evaluation since they
15932 were issued with actuals that are implicitly provided by
15935 2011-08-02 Robert Dewar <dewar@adacore.com>
15937 * sem_ch3.adb, sem_res.adb: Minor reformatting.
15939 2011-08-02 Yannick Moy <moy@adacore.com>
15941 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
15942 to issue an error in formal mode on attribute not supported in this mode
15943 (Analyze_Attribute): issue errors on standard attributes not supported
15945 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
15946 comment, and issue error in formal mode on modulus which is not a power
15948 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
15950 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
15952 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
15953 operator on modular type (except 'not').
15955 2011-08-02 Robert Dewar <dewar@adacore.com>
15957 * gnat_rm.texi: Minor reformatting.
15959 2011-08-02 Arnaud Charlet <charlet@adacore.com>
15961 * s-osinte-linux.ads: Minor comment update and reformatting.
15962 * i-cexten.ads: Make this unit pure, as for its parent.
15963 Will allow its usage in more contexts if needed.
15965 2011-08-02 Robert Dewar <dewar@adacore.com>
15967 * s-utf_32.ads: Minor comment fix.
15969 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15971 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
15972 operation of a tagged synchronized type, handle the case where the
15973 controlling argument is overloaded.
15975 2011-08-02 Yannick Moy <moy@adacore.com>
15977 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
15978 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
15979 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
15980 SPARK mode and formal verification mode on processing SPARK restriction
15981 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
15982 requiring consistency checking.
15984 2011-08-02 Robert Dewar <dewar@adacore.com>
15986 * sem_res.adb: Minor reformatting.
15988 2011-08-02 Robert Dewar <dewar@adacore.com>
15990 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
15991 a-cforse.ads: Remove unneeded with of Ada.Containers
15992 Remove commented out pragma Inline's
15993 Move specifications of new subprograms to the actual specs
15995 2011-08-02 Yannick Moy <moy@adacore.com>
15997 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
15998 a-cforse.ads: Update comments.
16000 2011-08-02 Ed Schonberg <schonberg@adacore.com>
16002 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
16004 2011-08-02 Robert Dewar <dewar@adacore.com>
16006 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
16007 a-cforse.ads, a-cofove.ads: Minor reformatting.
16009 2011-08-02 Claire Dross <dross@adacore.com>
16011 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
16012 a-cofove.ads: Add comments.
16014 2011-08-02 Yannick Moy <moy@adacore.com>
16016 * gnat_rm.texi: Document formal containers.
16018 2011-08-02 Emmanuel Briot <briot@adacore.com>
16020 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
16021 are empty sections.
16023 2011-08-02 Robert Dewar <dewar@adacore.com>
16025 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
16028 2011-08-02 Robert Dewar <dewar@adacore.com>
16030 * aspects.adb: New aspects Default_Value and Default_Component_Value
16031 New format of Aspect_Names table checks for omitted entries
16032 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
16033 handling of boolean aspects for derived types.
16034 New aspects Default_Value and Default_Component_Value
16035 New format of Aspect_Names table checks for omitted entries
16036 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
16037 (Has_Default_Value): New flag
16038 (Has_Default_Component_Value): New flag
16039 (Has_Default_Value): New flag
16040 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
16042 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
16043 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
16044 Default_Value and Default_Component_Value
16045 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
16046 New aspects Default_Value and Default_Component_Value
16047 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
16048 * sprint.adb: Print N_Aspect_Specification node when called from gdb
16050 2011-08-02 Vincent Celier <celier@adacore.com>
16052 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
16053 inherit library kind.
16055 2011-08-02 Ed Schonberg <schonberg@adacore.com>
16057 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
16058 Minor reformatting.
16060 2011-08-02 Robert Dewar <dewar@adacore.com>
16062 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
16064 2011-08-02 Yannick Moy <moy@adacore.com>
16066 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
16068 2011-08-02 Robert Dewar <dewar@adacore.com>
16070 * impunit.adb: Add comment.
16072 2011-08-02 Yannick Moy <moy@adacore.com>
16074 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
16075 qualification of aggregates in formal mode
16076 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
16078 (Resolve_Aggregate): complete the test that an aggregate is adequately
16079 qualified in formal mode
16081 2011-08-02 Pascal Obry <obry@adacore.com>
16083 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
16084 * mlib-prj.adb: Supress warning when compiling binder generated file.
16085 (Build_Library): Supress all warnings when compiling the binder
16088 2011-08-02 Yannick Moy <moy@adacore.com>
16090 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
16092 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
16093 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
16094 Add with/use clauses to make Check_Formal_Restriction visible
16096 2011-08-02 Ed Schonberg <schonberg@adacore.com>
16098 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
16099 in-parameters when type of the generic formal is private in the generic
16100 spec and non-private in the body.
16102 2011-08-02 Claire Dross <dross@adacore.com>
16104 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
16105 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
16106 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
16107 * impunit.adb, Makefile.rtl: Take new files into account.
16109 2011-08-02 Robert Dewar <dewar@adacore.com>
16111 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
16112 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
16114 2011-08-02 Yannick Moy <moy@adacore.com>
16116 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
16118 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
16119 matching static array bounds, taking into account the special case of
16121 * sem_ch3.adb: Typo in comment.
16123 2011-08-02 Yannick Moy <moy@adacore.com>
16125 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
16126 which issues an error in formal mode if its argument node is originally
16128 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
16129 has a discriminant specification so that it does not include the case
16131 (Derived_Type_Declaration): move here the test that a derived type has a
16132 discriminant specification
16133 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
16134 first element of a component association before accessing its choices
16135 (presence of component association is not enough)
16136 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
16137 declaration is a library item before accessing the next element in a
16138 list, as library items are not member of lists
16139 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
16140 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
16141 Check_Formal_Restriction whenever possible.
16143 2011-08-02 Ed Schonberg <schonberg@adacore.com>
16145 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
16146 reference when needed.
16148 2011-08-02 Bob Duff <duff@adacore.com>
16150 * gnat_ugn.texi: Fix typo.
16152 2011-08-02 Vincent Celier <celier@adacore.com>
16154 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
16155 archive file name. Do not use the full path name of archives for Open
16158 2011-08-02 Robert Dewar <dewar@adacore.com>
16160 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
16161 Analyze_Aspect_Specifications
16163 (Analyze_Aspect_Specifications): New handling for boolean aspects
16164 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
16165 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
16166 sequence for Analyze_Aspect_Specifications
16167 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
16168 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
16170 2011-08-02 Robert Dewar <dewar@adacore.com>
16172 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
16173 aspects, since these no longer exist.
16175 2011-08-02 Robert Dewar <dewar@adacore.com>
16177 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
16178 semicolon, do not try to see if there are aspects following it.
16179 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
16182 2011-08-02 Robert Dewar <dewar@adacore.com>
16184 * sem_ch8.adb, aspects.ads: Minor reformatting.
16186 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
16188 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
16189 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
16191 (Analyze_Aspect_Specifications): ...here. Call above procedure.
16193 2011-08-02 Yannick Moy <moy@adacore.com>
16195 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
16196 mode on subprogram declaration outside of package specification, unless
16197 it is followed by a pragma Import
16198 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
16199 Access_Type_Declaration): issue error in formal mode on access type
16200 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
16202 (Analyze_Object_Declaration): issue error in formal mode on object
16203 declaration which does not respect SPARK restrictions
16204 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
16205 declaration which does not respect SPARK restrictions
16206 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
16207 error in formal mode on digits or delta constraint
16208 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
16209 decimal fixed point type
16210 (Derived_Type_Declaration): issue error in formal mode on derived type
16211 other than type extensions of tagged record types
16212 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
16213 with check on access definition
16214 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
16215 mode on protected definition.
16216 (Analyze_Task_Definition): issue error in formal mode on task definition
16218 2011-08-02 Robert Dewar <dewar@adacore.com>
16220 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
16222 2011-08-02 Javier Miranda <miranda@adacore.com>
16224 * sem_ch6.adb (Can_Override_Operator): New function.
16225 (Verify_Overriding_Indicator): Add missing code to check overriding
16226 indicator in operators. Fixes regression.
16227 (Check_Overriding_Indicator): Minor reformating after replacing the
16228 code that evaluates if the subprogram can override an operator by
16229 invocations to the above new function.
16231 (Write_Field26_Name): Add missing code to ensure that, following
16232 the documentation in einfo.ads, this field is not shown as attribute
16233 "Static_Initialization" on non-dispatching functions.
16235 2011-08-02 Jose Ruiz <ruiz@adacore.com>
16237 * sem_res.adb (Resolve_Call): A call to
16238 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
16239 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
16240 i.e., when the second parameter is of type Time_Span.
16242 2011-08-02 Vincent Celier <celier@adacore.com>
16244 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
16245 with an archive instead of -L<library dir> -l<library name>.
16247 2011-08-02 Ed Schonberg <schonberg@adacore.com>
16249 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
16250 mark the base types In_Use in addition to making the operations
16253 2011-08-02 Ed Falis <falis@adacore.com>
16255 * init.c: add and setup __gnat_signal_mask for the exception signals
16256 * s-inmaop-vxworks.adb: new file.
16257 * s-intman-vxworks.adb: remove unnecessary initializations and
16259 * s-intman-vxworks.ads: remove unnecessary variable
16260 * s-taprop-vxworks.adb: simplify signal initialization
16262 2011-08-02 Robert Dewar <dewar@adacore.com>
16264 * sem_ch8.adb: Minor code reorganization, comment updates.
16266 2011-08-02 Robert Dewar <dewar@adacore.com>
16268 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
16269 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
16271 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
16272 (Matching_Static_Array_Bounds): Moved here from Sem_Res
16274 2011-08-02 Ed Schonberg <schonberg@adacore.com>
16276 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
16277 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
16278 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
16279 use_type_clauses, to handle more efficiently use_type and use_all_type
16281 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
16282 Ada2012 Use_All_Type clause.
16283 (Use_Class_Wide_Operations): new procedure.
16285 2011-08-02 Robert Dewar <dewar@adacore.com>
16287 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
16288 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
16289 expression to expression function.
16291 2011-08-02 Ed Schonberg <schonberg@adacore.com>
16293 * sem_ch4.adb: transform simple Ada2012 membership into equality only
16294 if types are compatible.
16296 2011-08-02 Yannick Moy <moy@adacore.com>
16298 * sem_res.adb (Matching_Static_Array_Bounds): new function which
16299 returns True if its argument array types have same dimension and same
16300 static bounds at each index.
16301 (Resolve_Actuals): issue an error in formal mode on actuals passed as
16302 OUT or IN OUT paramaters which are not view conversions in SPARK.
16303 (Resolve_Arithmetic_Op): issue an error in formal mode on
16304 multiplication or division with operands of fixed point types which are
16305 not qualified or explicitly converted.
16306 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
16307 Boolean or array type (except String) operands.
16308 (Resolve_Equality_Op): issue an error in formal mode on equality
16309 operators for array types other than String with non-matching static
16311 (Resolve_Logical_Op): issue an error in formal mode on logical operators
16312 for array types with non-matching static bounds. Factorize the code in
16313 Matching_Static_Array_Bounds.
16314 (Resolve_Qualified_Expression): issue an error in formal mode on
16315 qualified expressions for array types with non-matching static bounds.
16316 (Resolve_Type_Conversion): issue an error in formal mode on type
16317 conversion for array types with non-matching static bounds
16319 2011-08-02 Robert Dewar <dewar@adacore.com>
16321 * par-ch10.adb: Minor code reorganization (use Nkind_In).
16323 2011-08-02 Ed Schonberg <schonberg@adacore.com>
16325 * par-ch9.adb: save location of entry for proper error message.
16327 2011-08-02 Javier Miranda <miranda@adacore.com>
16329 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
16330 (Use_Full_View) which permits this routine to climb through the
16331 ancestors using the full-view of private parents.
16332 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
16333 Use_Full_View to true in calls to Is_Ancestor.
16334 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
16335 true in call to Is_Ancestor.
16336 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
16337 Use_Full_View to true in call to Is_Ancestor.
16338 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
16339 call to Is_Ancestor.
16340 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
16341 Use_Full_View to true in calls to Is_Ancestor.
16342 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
16343 Make_Select_Specific_Data_Table, Register_Primitive,
16344 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
16345 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
16346 to true in call to Is_Ancestor.
16347 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
16348 Use_Full_View to true in calls to Is_Ancestor.
16350 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
16351 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
16353 2011-08-02 Robert Dewar <dewar@adacore.com>
16355 * gnat_rm.texi: Minor reformatting.
16356 * sem_prag.adb: Minor reformatting.
16358 2011-08-02 Tristan Gingold <gingold@adacore.com>
16360 * vms_data.ads: Add VMS qualifier for -gnateP.
16362 2011-08-02 Robert Dewar <dewar@adacore.com>
16364 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
16365 * par-ch7.adb (P_Package): Proper placement of aspects for package
16366 decl/instantiation.
16367 * par-endh.adb (Check_End): Ad Is_Sloc parameter
16368 (End_Statements): Add Is_Sloc parameterr
16369 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
16370 (Check_End): Ad Is_Sloc parameter
16371 (End_Statements): Add Is_Sloc parameterr
16373 2011-08-02 Vincent Celier <celier@adacore.com>
16375 * ug_words: Add VMS qualifier equivalent to -gnateP:
16376 /SYMBOL_PREPROCESSING.
16378 2011-08-02 Jose Ruiz <ruiz@adacore.com>
16380 * gnat-style.texi: For hexadecimal numeric literals the typical
16381 grouping of digits is 4 to represent 2 bytes.
16382 A procedure spec which is split into several lines is indented two
16385 2011-08-02 Yannick Moy <moy@adacore.com>
16387 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
16388 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
16389 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
16391 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
16392 choice in array aggregate
16393 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
16395 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
16396 positional and named aggregate for record, or others in record
16397 aggregate, or multiple choice in record aggregate
16398 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
16399 array operands to logical operations AND, OR and XOR do not have the
16400 same static lower and higher bounds
16401 * sem_ch5.adb, sinfo.ads: Correct typos in comments
16403 2011-08-01 Robert Dewar <dewar@adacore.com>
16405 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
16406 Replaces Last_Source_Node_In_Sequence.
16407 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
16408 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
16409 parens and blank in string (this was inconsistently implemented).
16411 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
16412 blank in string (this was inconsistently implemented).
16414 (Set_Global_Switches): Set formal mode switches appropriately
16415 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
16417 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
16418 call Set_Error_Msg_Lang to set "spark" as language name.
16419 * par.adb: Remove unnecessary call to set formal language for errout
16420 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
16421 appropriately and call Set_Error_Msg_Lang to set "spark" as language
16423 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
16424 calls to it, moved after resolution so that types are known
16425 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
16426 result of concatenation is not of type String
16427 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
16428 concatenation is not properly restricted
16429 * gnat_rm.texi: Add doc on pragma Spark_95.
16430 * gcc-interface/Makefile.in: Remove obsolete target pairs for
16431 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
16432 * gcc-interface/Make-lang.in: Update dependencies.
16434 2011-08-01 Javier Miranda <miranda@adacore.com>
16436 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
16437 condition that detects if the overridden operation must replace an
16440 2011-08-01 Javier Miranda <miranda@adacore.com>
16442 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
16443 code declarations inserted by Insert_Actions in each alternative of the
16444 N_Case_Expression node.
16446 2011-08-01 Robert Dewar <dewar@adacore.com>
16448 * sem_ch6.adb: Minor code reorganization.
16449 * sem_util.adb: Minor reformatting.
16451 2011-08-01 Pascal Obry <obry@adacore.com>
16453 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
16454 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
16456 2011-08-01 Yannick Moy <moy@adacore.com>
16458 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
16459 literal or operator symbol which is prefixed
16460 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
16461 mode on access attributes.
16462 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
16463 that concatenation operands are properly restricted in formal mode
16464 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
16465 Analyze_Concatenation_Operand. Issue an error in formal mode if the
16466 result of the concatenation has a type different from String.
16467 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
16468 Analyze_Quantified_Expression, Analyze_Slice,
16469 Analyze_Null): issue an error in formal mode on unsupported constructs
16471 (Analyze_Block_Statement): only issue error on source block statement
16472 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
16473 function which returns the last node in a list of nodes for which
16474 Comes_From_Source returns True, if any
16475 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
16476 Last_Source_Node_In_Sequence
16477 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
16478 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
16479 mode on unsupported constructs
16480 * sem_ch9.adb Do not return after issuing error in formal mode, as the
16481 rest of the actions may be needed later on since the error is marked as
16483 * sinfo.ads: Typos in comments.
16485 2011-08-01 Pascal Obry <obry@adacore.com>
16487 * projects.texi: Minor editing.
16489 2011-08-01 Yannick Moy <moy@adacore.com>
16491 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
16492 insertion character ~~
16493 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
16494 (Set_Error_Msg_Lang): new procedure which fixes the language for use
16495 with insertion character ~~
16496 (Set_Msg_Text): treat insertion character ~~
16497 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
16498 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
16499 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
16500 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
16501 errors related to the formal language restriction not serious
16502 (insertion character |).
16503 * par.adb (Par): set formal language for error messages if needed
16504 * sem_ch6.adb (Check_Missing_Return): take into account possible
16505 generated statements at the end of the function
16506 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
16507 enumeration value to define a new pragma SPARK_95
16508 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
16509 SPARK_Version): new type and variables to store the SPARK version
16511 (SPARK_Mode): return True when SPARK_Version is set
16512 * par-prag.adb: Correct indentation
16513 (Prag): take Pragma_SPARK_95 into account
16514 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
16517 2011-08-01 Robert Dewar <dewar@adacore.com>
16519 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
16520 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
16521 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
16523 2011-08-01 Pascal Obry <obry@adacore.com>
16525 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
16526 Target_Name to Get_Path call.
16527 (Parse_Single_Project): Likewise.
16528 (Post_Parse_Context_Clause): Likewise.
16529 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
16530 Call Initialise_Project_Path with the proper Target_Name.
16531 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
16533 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
16534 with the proper Target_Name.
16535 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
16536 Part.Parse routine.
16537 (Parse_Project_And_Apply_Config): Likewise.
16538 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
16539 This is fine as this part of the code is supporting only native
16541 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
16542 is fine as this part of the code is supporting only native compilation.
16544 2011-08-01 Yannick Moy <moy@adacore.com>
16546 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
16547 of homonym, unless the homonym is one of the cases allowed in SPARK
16548 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
16549 package declaration occurring after a body.
16551 2011-08-01 Robert Dewar <dewar@adacore.com>
16553 * checks.adb, exp_ch4.adb: Minor reformatting.
16555 2011-08-01 Javier Miranda <miranda@adacore.com>
16557 * einfo.ads (Access_Disp_Table): Fix documentation.
16558 (Dispatch_Table_Wrappers): Fix documentation.
16560 2011-08-01 Pascal Obry <obry@adacore.com>
16562 * prj-env.adb, prj-env.ads: Minor reformatting.
16564 2011-08-01 Yannick Moy <moy@adacore.com>
16566 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
16567 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
16568 procedures out of these packages.
16569 * errout.ads, errout.adb
16570 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
16571 procedures in of this package
16572 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
16573 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
16574 on misplaced later vs initial declarations, like in Ada 83
16575 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
16576 formal mode on attribute of private type whose full type declaration
16578 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
16579 package declaration inside a package specification
16580 (Analyze_Full_Type_Declaration): issue error in formal mode on
16581 controlled type or discriminant type
16582 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
16583 user-defined operator means that it should come from the source
16584 (New_Overloaded_Entity): issue error in formal mode on overloaded
16586 * sem_ch6.ads, sem_ch13.ads: typos in comments.
16588 2011-08-01 Thomas Quinot <quinot@adacore.com>
16590 * atree.adb: Minor reformatting.
16591 * checks.adb: Minor reformatting.
16593 2011-08-01 Vincent Celier <celier@adacore.com>
16595 * s-parame-vms-ia64.ads: Fix typo in comment
16597 * s-parame-vms-restrict.ads: Removed, unused.
16599 2011-08-01 Javier Miranda <miranda@adacore.com>
16602 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
16604 (Constrain_Index): Remove side effects in the evaluation of the bounds.
16605 * sem_ch3.ads, sem_ch3.adb
16606 (Is_Constant_Bound): New extended version of the subprogram that was
16607 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
16608 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
16609 * sem_aux.ads (Constant_Value): Fix typo in comment.
16610 * checks.adb (Generate_Index_Checks): New implementation which, for
16611 array objects with constant bounds, generates the runtime check
16612 referencing the bounds of the array type. For other cases this routine
16613 provides its previous behavior obtaining such values from the array
16615 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
16617 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
16618 we cannot have semantic interpretations of the new node.
16620 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16622 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
16625 2011-08-01 Arnaud Charlet <charlet@adacore.com>
16627 * sem_ch8.adb: Minor code editing.
16628 * s-vxwext.adb: Remove trailing space.
16629 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
16630 consistency with other files.
16632 2011-08-01 Thomas Quinot <quinot@adacore.com>
16634 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
16636 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16638 * par-ch10.adb: reject parameterized expressions as compilation unit.
16639 * sem_ch4.adb: handle properly conditional expression with overloaded
16640 then_clause and no else_clause.
16642 2011-08-01 Tristan Gingold <gingold@adacore.com>
16644 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
16645 like done by System.Aux_DEC.
16646 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
16648 2011-08-01 Yannick Moy <moy@adacore.com>
16650 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
16651 missing label at end of declaration (subprogram or package)
16652 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
16653 of positional and named parameter association
16654 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
16655 Error_Msg_SP which adds a prefix to the error message giving the name
16656 of the formal language analyzed
16657 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
16658 access result type in subprogram, unconstrained array as result type,.
16659 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
16661 * sem_ch8.adb: Code clean up.
16663 2011-08-01 Javier Miranda <miranda@adacore.com>
16665 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
16666 * einfo.ads (Access_Disp_Table): Fix documentation.
16667 (Dispatch_Table_Wrappers): Fix documentation.
16668 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
16669 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
16670 to enforce the documentation of this attribute.
16671 (Set_Is_Interface): Cleanup the assertion.
16672 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
16673 the Underlying_Type entity before reading attribute Access_Disp_Table.
16674 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
16675 Locate the Underlying_Type before reading attribute Access_Disp_Table.
16676 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
16677 the Underlying_Type entity before reading attribute Access_Disp_Table.
16678 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
16679 Locate the Underlying_Type entity before reading attribute
16682 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16684 * s-poosiz.ads: Additional overriding indicators.
16686 2011-08-01 Yannick Moy <moy@adacore.com>
16688 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
16690 (Analyze_Iteration_Scheme): issue error in formal mode when loop
16691 parameter specification does not include a subtype mark.
16692 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
16693 formal mode on abstract subprogram.
16694 (Analyze_Subprogram_Specification): issue error in formal mode on
16695 user-defined operator.
16696 (Process_Formals): issue error in formal mode on access parameter and
16697 default expression.
16698 * sem_ch9.adb (Analyze_Abort_Statement,
16699 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
16700 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
16701 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
16702 Analyze_Requeue, Analyze_Selective_Accept,
16703 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
16704 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
16705 issue error in formal mode on user-defined raise statement.
16707 2011-08-01 Thomas Quinot <quinot@adacore.com>
16709 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
16710 declaration being hidden when overriding an implicit inherited
16712 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
16713 (-gnats), do not complain about a source file that contains only a
16716 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16718 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
16719 variable if already set.
16721 2011-08-01 Arnaud Charlet <charlet@adacore.com>
16723 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
16724 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
16725 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
16726 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
16727 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
16728 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
16729 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
16730 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
16731 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
16732 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
16733 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
16734 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
16735 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
16736 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
16737 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
16738 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
16739 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
16740 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
16741 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
16742 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
16743 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
16744 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
16745 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
16746 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
16747 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
16748 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
16749 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
16750 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
16751 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
16752 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
16753 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
16754 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
16755 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
16756 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
16757 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
16758 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
16759 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
16760 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
16761 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
16762 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
16763 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
16764 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
16765 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
16766 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
16767 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
16768 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
16769 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
16770 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
16771 s-osinte-mingw.ads: Update to GPLv3 run-time license.
16772 Use GNAT instead of GNARL.
16774 2011-08-01 Bob Duff <duff@adacore.com>
16776 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
16777 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
16778 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
16781 2011-08-01 Yannick Moy <moy@adacore.com>
16783 * debug.adb (d.D) reverve flag for the SPARK mode
16784 (d.E) reverve flag for SPARK generation mode
16785 (d.F) reverve flag for Why generation mode
16786 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
16787 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
16788 functions which return True when the corresponding modes are set
16789 (Formal_Language): return "spark" or "alfa" when in formal verification
16791 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
16792 Error_Msg to prefix the error message with a tag giving the formal
16794 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
16795 message with a tag giving the formal language
16796 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
16798 (Analyze_Case_Statement): issue error in formal mode on case statement
16799 with a single "others" case alternative
16800 (Analyze_Exit_Statement): issue errors in formal mode on exit
16801 statements which do not respect SPARK restrictions
16802 (Analyze_Goto_Statement): issue error in formal mode on goto statement
16803 (Check_Unreachable_Code): always issue an error (not a warning) in
16804 formal mode on unreachable code (concerns both code after an infinite
16805 loop and after an unconditional jump, both not allowed in SPARK)
16806 * sem_ch6.adb (Analyze_Return_Statement): add call to
16807 Set_Return_Present for a procedure containing a return statement
16808 (already done for functions in Analyze_Function_Return)
16809 (Analyze_Function_Return): issue error in formal mode on extended
16810 return or if return is not last statement in function
16811 (Check_Missing_Return): issue error in formal mode if function does
16812 not end with return or if procedure contains a return
16813 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
16814 function to detect if there is an inner scope of its parameter S which
16817 2011-08-01 Thomas Quinot <quinot@adacore.com>
16819 * sem_ch6.ads: Minor reformatting.
16821 2011-08-01 Javier Miranda <miranda@adacore.com>
16823 * sem_util.adb (Abstract_Interface_List): Complete condition when
16824 processing private type declarations to avoid reading unavailable
16826 (Is_Synchronized_Tagged_Type): Complete condition when processing
16827 private extension declaration nodes to avoid reading unavailable
16830 2011-08-01 Thomas Quinot <quinot@adacore.com>
16832 * sem_ch3.adb: Minor reformatting.
16834 2011-08-01 Thomas Quinot <quinot@adacore.com>
16836 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
16837 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
16838 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
16839 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
16840 for VMS, instead parametrize the common implementation with
16841 System.Parameters declarations.
16843 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
16845 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
16847 2011-08-01 Tristan Gingold <gingold@adacore.com>
16849 * seh_init.c: Fix SEH handler installation on win64.
16851 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16853 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
16854 double analysis of an anonymous access to subprogram, because it can
16855 lead to improper sharing of profiles and a back-end crash.
16857 2011-08-01 Robert Dewar <dewar@adacore.com>
16859 * make.adb, sem_ch4.adb: Minor reformatting.
16860 * gcc-interface/Make-lang.in: Update dependencies.
16861 * sem_util.adb, exp_ch5.adb: Minor reformatting.
16863 2011-08-01 Arnaud Charlet <charlet@adacore.com>
16865 * gnat_rm.texi: Fix definition of Long_Integer.
16867 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16869 * exp_aggr.adb: check limit size of static aggregate unconditionally,
16870 to prevent storage exhaustion.
16871 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
16872 finalized is a function body, insert the cleanup code before the final
16873 return statement, to prevent spurious warnings.
16874 * s-pooglo.ads: add overriding indicator.
16876 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16878 * sem_ch4.adb (Operator_Check): improve error message when both a
16879 with_clause and a use_clause are needed to make operator usage legal.
16880 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
16881 determine whether a compilation unit is visible within an other,
16882 either through a with_clause in the current unit, or a with_clause in
16883 its library unit or one one of its parents.
16885 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16887 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
16888 over an arbitrary expression of an array or container type.
16889 * lib-xref.adb: clarify comment.
16891 2011-08-01 Bob Duff <duff@adacore.com>
16893 * einfo.ads: Minor reformatting.
16894 * debug.adb: Minor comment improvement.
16896 2011-08-01 Javier Miranda <miranda@adacore.com>
16898 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
16899 consider hidden subprograms as valid candidates.
16901 2011-08-01 Arnaud Charlet <charlet@adacore.com>
16903 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
16905 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
16907 * gnat_ugn.texi: Fix typo.
16909 2011-08-01 Robert Dewar <dewar@adacore.com>
16911 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
16912 lib-xref.adb: Minor reformatting
16914 2011-08-01 Gary Dismukes <dismukes@adacore.com>
16916 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
16917 when to generate a call to Move_Final_List.
16918 (Has_Controlled_Parts): Remove this function.
16920 2011-08-01 Geert Bosch <bosch@adacore.com>
16922 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
16923 "," in choice list.
16925 2011-08-01 Thomas Quinot <quinot@adacore.com>
16927 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
16928 explicit raise of a predefined exception as Comes_From_Source if the
16929 original N_Raise_Statement comes from source.
16931 2011-08-01 Robert Dewar <dewar@adacore.com>
16933 * sinfo.ads: Add comment.
16934 * sem_ch6.adb: Minor reformatting.
16936 2011-08-01 Robert Dewar <dewar@adacore.com>
16938 * freeze.adb (Freeze_Entity): Refine check for bad component size
16939 clause to avoid rejecting confirming clause when atomic/aliased present.
16941 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16943 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
16944 better determine whether an entity reference is a write.
16945 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
16947 * lib-xref.adb (Output_References): Do no suppress a read reference at
16948 the same location as an immediately preceeding modify-reference, to
16949 handle properly in-out actuals.
16951 2011-08-01 Tristan Gingold <gingold@adacore.com>
16953 * env.c (__gnat_setenv) [VMS]: Refine previous change.
16955 2011-08-01 Quentin Ochem <ochem@adacore.com>
16957 * i-cstrin.adb (New_String): Changed implementation, now uses only the
16958 heap to compute the result.
16960 2011-08-01 Robert Dewar <dewar@adacore.com>
16962 * atree.ads: Minor reformatting.
16964 2011-08-01 Emmanuel Briot <briot@adacore.com>
16966 * g-expect.adb (Get_Command_Output): Fix memory leak.
16968 2011-08-01 Geert Bosch <bosch@adacore.com>
16970 * cstand.adb (P_Float_Type): New procedure to print the definition of
16971 predefined fpt types.
16972 (P_Mixed_Name): New procedure to print a name using mixed case
16973 (Print_Standard): Use P_Float_Type for printing floating point types
16974 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
16975 precision IEEE float.
16977 2011-08-01 Thomas Quinot <quinot@adacore.com>
16979 * sem_ch3.adb: Minor reformatting.
16981 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16983 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
16984 the completion of a generic function, insert the new body rather than
16985 rewriting the original.
16987 2011-08-01 Yannick Moy <moy@adacore.com>
16989 * sinfo.ads, errout.ads: Typos in comments.
16991 2011-08-01 Robert Dewar <dewar@adacore.com>
16993 * par-endh.adb: Minor reformatting.
16995 2011-08-01 Robert Dewar <dewar@adacore.com>
16997 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
16998 (Pre_Post_Aspects): New subtype.
16999 * par-ch12.adb (P_Generic): New syntax for aspects in packages
17000 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
17001 * par-ch7.adb (P_Package): Remove Decl parameter
17002 (P_Package): Handle new syntax for aspects (before IS)
17003 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
17005 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
17006 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
17007 (P_Package): Remove Decl parameter
17008 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
17010 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
17012 * sem_util.ads, sem_util.adb (Static_Boolean): New function
17013 * sinfo.ads: Document new syntax for aspects in packages etc.
17014 * sprint.adb: Handle new syntax of aspects before IS in package
17016 2011-08-01 Thomas Quinot <quinot@adacore.com>
17018 * atree.ads: Minor reformatting.
17019 * sem_prag.adb: Minor reformatting.
17021 2011-08-01 Robert Dewar <dewar@adacore.com>
17023 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
17024 case expr alternative.
17026 2011-08-01 Ed Schonberg <schonberg@adacore.com>
17028 * sem_ch12.adb: Fix typo.
17030 2011-08-01 Geert Bosch <bosch@adacore.com>
17032 * sem_prag.adb (Check_No_Link_Name): New procedure.
17033 (Process_Import_Or_Interface): Use Check_No_Link_Name.
17034 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
17035 instead of Standard_Long_Long_Float_Size global. Preparation for
17036 eventual removal of per type constants.
17037 * exp_util.ads (Get_Stream_Size): New function returning the stream
17038 size value of subtype E.
17039 * exp_util.adb (Get_Stream_Size): Implement new function.
17040 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
17042 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
17044 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
17046 2011-08-01 Geert Bosch <bosch@adacore.com>
17048 * cstand.adb: Fix comments.
17049 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
17050 count of arguments.
17052 2011-08-01 Robert Dewar <dewar@adacore.com>
17054 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
17056 2011-08-01 Geert Bosch <bosch@adacore.com>
17058 * atree.ads: Fix comment.
17060 2011-08-01 Robert Dewar <dewar@adacore.com>
17062 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
17063 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
17064 * par.adb: Add with for Namet.Sp.
17065 * par-tchk.adb: Minor reformatting.
17067 2011-08-01 Vincent Celier <celier@adacore.com>
17069 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
17070 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
17071 of the init procedure of a SAL.
17072 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
17075 2011-08-01 Thomas Quinot <quinot@adacore.com>
17077 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
17080 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
17082 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
17084 2011-08-01 Thomas Quinot <quinot@adacore.com>
17086 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
17087 conformant with its spec (return True only for types that have
17088 an overriding Initialize primitive operation that prevents them from
17089 having preelaborable initialization).
17090 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
17091 initialization for controlled types in Ada 2005 or later mode.
17093 2011-08-01 Robert Dewar <dewar@adacore.com>
17095 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
17097 (Same_Aspect): New function.
17098 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
17099 Type_Invariant, Precondition, Postcondition.
17100 * snames.ads-tmpl: Add Name_Type_Invariant.
17102 2011-08-01 Robert Dewar <dewar@adacore.com>
17104 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
17106 (Freeze_All_Ent): Fix error in handling inherited aspects.
17107 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
17108 already analyzed, but don't skip entire processing of a declaration,
17109 that's wrong in some cases of declarations being rewritten.
17110 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
17111 Don't delay for integer, string literals
17112 Treat predicates in usual manner for delay, remove special case code,
17114 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
17115 (Build_Predicate_Function): Update saved expression in aspect
17116 (Build_Invariant_Procedure): Update saved expression in aspect
17117 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
17118 of replacement of discriminant references if the reference is simple.
17120 2011-08-01 Robert Dewar <dewar@adacore.com>
17122 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
17123 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
17124 Static_Predicate and Dynamic_Predicate.
17125 (Build_Predicate_Function): Add processing for Static_Predicate
17126 and Dynamic_Predicate.
17127 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
17128 (From_Static_Predicate): New flag
17129 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
17131 2011-08-01 Robert Dewar <dewar@adacore.com>
17133 * usage.adb: Documentation cleanup for Ada version modes in usage.
17134 * expander.adb: Minor reformatting.
17136 2011-08-01 Robert Dewar <dewar@adacore.com>
17138 * atree.ads: Minor comment fix.
17139 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
17140 a-witeio.ads, sem_prag.adb: Minor reformatting.
17142 2011-08-01 Doug Rupp <rupp@adacore.com>
17144 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
17145 pointers. Use descrip.h header file for convenience. Add some
17148 2011-08-01 Robert Dewar <dewar@adacore.com>
17150 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
17151 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
17152 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
17154 (Check_Aspect_At_End_Of_Declarations): New procedure
17155 (Analye_Aspect_Specification): Minor changes for above procedures
17156 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
17157 specification node as well.
17159 2011-08-01 Pascal Obry <obry@adacore.com>
17161 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
17162 Windows files. Use GetFilesAttributes() in this case to check for file
17163 existence instead of returning with an error code.
17165 2011-08-01 Vincent Celier <celier@adacore.com>
17167 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
17168 High is above Source length.
17170 2011-08-01 Robert Dewar <dewar@adacore.com>
17172 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
17174 2011-08-01 Robert Dewar <dewar@adacore.com>
17176 * aspects.ads (Boolean_Aspects): New subtype.
17177 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
17178 for derived types in cases where the parent type and derived type have
17180 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
17181 with aspects when parent type also has aspects.
17182 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
17183 boolean expression at this point).
17184 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
17185 accordance with final decision on the Ada 2012 feature.
17186 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
17188 2011-08-01 Matthew Heaney <heaney@adacore.com>
17190 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
17192 2011-08-01 Pascal Obry <obry@adacore.com>
17194 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
17195 Fix Replace_Slice when High is above current string size.
17196 (Replace_Slice): Fix DL computation when High is above current
17199 2011-08-01 Gary Dismukes <dismukes@adacore.com>
17201 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
17203 2011-08-01 Matthew Heaney <heaney@adacore.com>
17205 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
17208 2011-08-01 Pascal Obry <obry@adacore.com>
17210 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
17213 2011-08-01 Ed Schonberg <schonberg@adacore.com>
17215 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
17216 access to protected subprograms in generic bodies.
17217 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
17218 protected type, indicate that the convention of the subprogram is
17219 Convention_Protected, because it may be used in subsequent declarations
17220 within the protected declaration.
17222 2011-08-01 Vincent Celier <celier@adacore.com>
17224 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
17225 and "final" procedures when the name of the library is "ada", to avoid
17226 duplicate symbols "adainit" and "adafinal" in executables.
17228 2011-08-01 Ed Schonberg <schonberg@adacore.com>
17230 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
17231 quantified expression that appears within a postcondition and uses the
17232 Ada2012 'Result attribute.
17234 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
17236 * init.c (__gnat_error_handler): Cast reason to int.
17237 (__gnat_install_handler): Explain sa_sigaction use.
17239 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
17241 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
17242 subprogram has copy-in copy-out parameters, try to promote the mode of
17243 the return type if it is passed in registers.
17245 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
17247 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
17248 left operand as addressable.
17250 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
17252 * gcc-interface/gigi.h (build_function_stub): Remove.
17253 (build_return_expr): Likewise.
17254 (convert_vms_descriptor): Declare.
17255 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
17256 (build_function_stub): Move to...
17257 * gcc-interface/utils2.c (build_return_expr): Move to...
17258 * gcc-interface/trans.c (build_function_stub): ...here.
17259 (build_return_expr): ...here.
17260 (Subprogram_Body_to_gnu): Add local variable for language_function.
17261 Disconnect the parameter attributes cache, if any, once done with it.
17262 Call end_subprog_body only after setting the end_locus.
17263 Build the stub associated with the function, if any, at the very end.
17264 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
17265 variables and streamline control flow.
17267 2011-07-23 Arnaud Charlet <charlet@adacore.com>
17270 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
17271 g-trasym-dwarf.adb.
17273 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
17276 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
17277 Assign to act.sa_sigaction.
17278 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
17279 current->return_address to char * before arithmetic.
17281 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
17283 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
17284 Correct argument types.
17285 Extract code from reason.
17286 (__gnat_install_handler): Assign to act.sa_sigaction.
17288 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
17290 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
17291 (GNAT1_OBJS): ...here.
17293 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
17296 * g-socthi-mingw.adb (Fill): Fix formatting.
17298 * gcc-interface/gigi.h: Move around comment.
17300 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
17303 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
17305 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
17308 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
17310 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
17312 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
17313 range comparison if Pmode is SImode.
17315 2011-07-12 Laurent GUERBY <laurent@guerby.net>
17316 Eric Botcazou <ebotcazou@adacore.com>
17318 * adadecode.c: Wrap up in extern "C" block.
17319 * adadecode.h: Likewise.
17320 * adaint.c: Likewise. Remove 'const' keyword.
17321 * adaint.h: Likewise.
17322 * argv.c: Likewise.
17323 * atree.h: Likewise.
17325 * cstreams.c: Likewise.
17327 * exit.c: Likewise.
17329 * final.c: Likewise.
17330 * init.c: Likewise.
17331 * initialize.c: Likewise.
17332 * link.c: Likewise.
17333 * namet.h: Likewise.
17334 * nlists.h: Likewise.
17335 * raise.c: Likewise.
17336 * raise.h: Likewise.
17337 * repinfo.h: Likewise.
17338 * seh_init.c: Likewise.
17339 * targext.c: Likewise.
17340 * tracebak.c: Likewise.
17341 * uintp.h: Likewise.
17342 * urealp.h: Likewise.
17343 * xeinfo.adb: Wrap up generated C code in extern "C" block.
17344 * xsinfo.adb: Likewise.
17345 * xsnamest.adb: Likewise.
17346 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
17347 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
17348 * gcc-interface/misc.c: Likewise.
17349 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
17350 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
17351 ada/targext.o here...
17352 (GNAT_ADA_OBJS): ...and not here.
17353 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
17354 (GNATBIND_OBJS): Reorder.
17356 2011-07-07 Richard Henderson <rth@redhat.com>
17358 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
17359 dwarf2out_frame_init.
17361 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
17363 * gcc-interface/misc.c (gnat_init): Tweak previous change.
17365 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
17368 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
17370 2011-07-06 Richard Guenther <rguenther@suse.de>
17372 * gcc-interface/misc.c (gnat_init): Merge calls to
17373 build_common_tree_nodes and build_common_tree_nodes_2.
17374 Re-initialize boolean_false_node.
17376 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
17377 Olivier Hainque <hainque@adacore.com>
17378 Nicolas Setton <setton@adacore.com>
17380 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
17381 the type according to the ARTIFICIAL_P parameter.
17382 (create_type_decl): Likewise.
17383 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
17385 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
17387 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
17388 (gnatbind): Likewise.
17390 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
17392 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
17394 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
17396 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
17397 local variable throughout. Remove useless call to Base_Type.
17398 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
17399 Take it also into account for the volatileness of the field. Set the
17400 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
17402 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
17404 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
17405 on a dereference built for a by-ref object if it has an address clause.
17407 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
17409 * einfo.ads (Address_Taken): Document use for the second argument of
17410 Asm_Input and Asm_Output attributes.
17411 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
17412 argument is an entity name, then set Address_Taken on it.
17413 <Attribute_Asm_Output>: Likewise.
17414 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
17415 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
17416 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
17417 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
17419 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
17421 PR middle-end/46500
17422 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
17424 2011-06-14 Joseph Myers <joseph@codesourcery.com>
17426 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
17427 (ada/utils.o): Update dependencies.
17428 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
17429 ../../../libcpp/libcpp.a.
17430 * gcc-interface/utils.c: Include common/common-target.h.
17431 (process_attributes): Use targetm_common.have_named_sections.
17433 2011-06-07 Richard Guenther <rguenther@suse.de>
17435 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
17438 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
17440 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
17441 TREE_THIS_NOTRAP flag.
17443 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
17445 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
17448 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
17450 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
17451 constants whose full view has discriminants specially.
17453 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
17455 * gcc-interface/utils.c: Include diagnostic.h.
17456 (gnat_write_global_declarations): Output debug information for all
17457 global type declarations before finalizing the compilation unit.
17458 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
17460 2011-05-25 Jakub Jelinek <jakub@redhat.com>
17462 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
17464 2011-05-25 Kai Tietz <ktietz@redhat.com>
17466 * adaint.c (__gnat_to_canonical_file_list_next): Use array
17467 initialization instead of const/none-const pointer assignment.
17469 2011-05-24 Joseph Myers <joseph@codesourcery.com>
17471 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
17472 $(EXTRA_GNAT1_OBJS).
17473 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
17474 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
17475 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
17476 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
17477 libcommon-target.a instead of prefix.o.
17479 2011-05-21 Joseph Myers <joseph@codesourcery.com>
17482 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
17484 2011-05-20 Joseph Myers <joseph@codesourcery.com>
17486 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
17487 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
17488 instead of version.o.
17490 2011-05-18 Kai Tietz <ktietz@redhat.com>
17492 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
17493 boolean_false_node instead of integer_zero_node.
17494 (convert_with_check): Likewise.
17495 * gcc-interface/decl.c (choices_to_gnu): Likewise.
17497 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
17499 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
17500 type of the parameter is an unconstrained array, convert the actual to
17501 the type of the formal in the In Out and Out cases as well.
17503 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
17505 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
17506 call build_function_type_array or build_varargs_function_type_array
17508 (create_subprog_type): Don't call build_function_type; call
17509 build_function_type_vec instead.
17511 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
17513 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
17514 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
17515 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
17517 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
17519 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
17521 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
17522 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
17524 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
17526 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
17528 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
17530 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
17531 instead of accessing TYPE_ARG_TYPES directly.
17532 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
17534 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
17537 * gcc-interface/gigi.h (get_variant_part): Declare.
17538 * gcc-interface/decl.c (get_variant_part): Make global.
17539 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
17540 types have the same constant size, are record types and T1 has a
17541 variant part while T2 doesn't.
17543 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
17545 * gcc-interface/utils.c (begin_subprog_body): Do not call
17547 (end_subprog_body): Likewise.
17549 2011-05-04 Richard Guenther <rguenther@suse.de>
17551 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
17553 (pos_to_constructor): Likewise.
17555 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
17556 Eric Botcazou <ebotcazou@adacore.com>
17558 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
17559 of build_function_type. Adjust calls to...
17560 (build_raise_check): ...this. Do not take a void_tree parameter.
17561 Call build_function_type_list instead of build_function_type.
17562 Fix head comment and swap couple of conditional blocks.
17564 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
17566 * gnatvsn.ads (Library_Version): Bump to 4.7.
17567 (Current_Year): Bump to 2011.
17569 2011-04-29 Michael Matz <matz@suse.de>
17571 * gcc-interface/misc.c (gnat_handle_option): Set
17572 warn_maybe_uninitialized.
17574 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
17576 * gnat_ugn.texi (Complexity Metrics Control): Update link to
17577 the Watson/McCabe paper.
17579 2011-04-23 Jim Meyering <meyering@redhat.com>
17581 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
17583 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
17585 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
17588 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
17590 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
17592 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
17593 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
17594 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
17595 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
17596 <all>: Do not set flags on the reused DECL node coming from an alias.
17597 Set DECL_IGNORED_P on the DECL node built for subprograms if they
17598 don't need debug info here...
17599 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
17600 (gigi): Adjust calls to create_subprog_decl.
17601 (build_raise_check): Likewise.
17602 (establish_gnat_vms_condition_handler): Likewise.
17603 (Compilation_Unit_to_gnu): Likewise.
17604 (gnat_to_gnu): Likewise.
17606 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
17608 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
17609 (NO_REORDER_ADAFLAGS): New variable.
17610 (EXTRA_GNATTOOLS): Always define.
17611 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
17612 Clean up and adjust list of files compiled with special options.
17613 * gcc-interface/Make-lang.in: Likewise.
17614 (ada/decl.o): Cosmetical change.
17615 (ada/misc.o): Remove dependency on $(PLUGIN_H).
17617 2011-04-20 Jim Meyering <meyering@redhat.com>
17619 * initialize.c (__gnat_initialize): Remove useless if-before-free.
17621 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
17623 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
17624 $(CFLAGS) on the link line.
17626 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
17628 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
17629 padded type built for the return type if it is unconstrained.
17631 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
17633 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
17635 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
17637 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
17638 before calling TREE_CHAIN.
17639 * gcc-interface/misc.c (gnat_init_ts): New function.
17640 (LANG_HOOKS_INIT_TS): Define.
17642 2011-04-12 Martin Jambor <mjambor@suse.cz>
17644 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
17645 instead of cgraph_node.
17647 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
17649 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
17650 alignment on fields of the RETURN type built for the Copy-In Copy-Out
17653 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
17655 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
17656 of aggregate types that contain a placeholder.
17658 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
17660 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
17662 (handle_type_generic_attribute): Likewise.
17664 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
17667 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
17669 2011-04-04 Kai Tietz <ktietz@redhat.com>
17672 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
17675 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17677 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
17678 type case, do not strip a padding type around the array type.
17680 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17682 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
17685 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17687 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
17688 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
17689 code for -feliminate-unused-debug-types.
17690 (gnat_post_options): Likewise.
17692 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17694 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
17695 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
17698 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17700 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
17701 DECL_ARTIFICIAL flag on enumeration types.
17703 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17705 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
17706 fat pointer types artificial unconditionally.
17707 <E_Array_Subtype>: Attach the base array type as a parallel type if it
17710 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17712 * gcc-interface/gigi.h (get_dummy_type): Declare.
17713 (build_dummy_unc_pointer_types): Likewise.
17714 (finish_fat_pointer_type): Likewise.
17715 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
17716 fat pointer type has been built, complete it in place.
17717 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
17718 and thin pointers. Remove useless variable.
17719 (finish_fat_pointer_type): Make global and move to...
17720 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
17721 (get_dummy_type): New function.
17722 (build_dummy_unc_pointer_types): Likewise.
17723 (gnat_pushdecl): Propage the name to the anonymous variants only.
17724 (update_pointer_to): Only adjust the pointer types in the unconstrained
17727 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17729 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
17730 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
17731 if this is a Taft amendment type and the full declaration is available.
17732 * gcc-interface/trans.c (process_type): Likewise.
17733 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
17734 (process_freeze_entity): Likewise.
17735 * gcc-interface/utils.c (dummy_global): New static variable.
17736 (gnat_write_global_declarations): If there are types declared as used
17737 at the global level, insert them in the global hash table.
17739 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17741 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
17742 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
17743 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
17745 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
17746 flag of the type accordingly.
17747 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
17749 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17751 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
17752 finalizing types when updating the pointers to the designated type.
17753 <all>: Finalize the deferred types even if we didn't defer processing
17754 of incomplete types in this invocation.
17756 2011-04-01 Olivier Hainque <hainque@adacore.com>
17757 Nicolas Setton <setton@adacore.com>
17758 Eric Botcazou <ebotcazou@adacore.com>
17760 * gcc-interface/misc.c (gnat_descriptive_type): New function.
17761 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
17763 2011-03-28 Kai Tietz <ktietz@redhat.com>
17765 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
17767 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
17768 * system-mingw.ads (System): Change ZCX_By_Default default to True.
17770 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
17772 2011-03-28 Tristan Gingold <gingold@adacore.com>
17775 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
17776 Use ada output of gnatbind.
17777 (ada/b_gnatb.adb): Ditto.
17778 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
17779 (ada.mostlyclean, ada.stage1)
17780 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
17781 (ada.stagefeedback): Adjust.
17782 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
17783 Use ada output of gnatbind.
17784 (b_gnatm.adb): Ditto.
17785 (b_gnatl.o, b_gnatm.o): New rules.
17787 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
17789 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
17790 for the padded type built to support a specified size or alignment.
17792 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
17794 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
17795 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
17796 unconditionally to the end of the unit when the designated type is
17798 <all>: Rename local variable. Attempt to un-defer types only and do it
17799 for limited_with'ed types as well.
17800 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
17801 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
17802 consistently and remove redundant call to finalize_from_with_types.
17804 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
17806 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
17807 subprograms without a previous spec declared in the same unit.
17808 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
17809 subprograms at the end of the unit instead of at the beginning.
17810 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
17811 isn't public for the special handling of non-inline functions nested
17812 inside inline external functions.
17814 2011-03-25 Jeff Law <law@redhat.com>
17816 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
17818 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
17820 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
17821 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
17822 to compute Set_Size_Depends_On_Discriminant.
17823 (Layout_Type): Call it on array types in back-end layout mode.
17824 * sem_util.adb (Requires_Transient_Scope): Return true for array
17825 types only if the size depends on the value of discriminants.
17826 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
17827 type if the RHS is a call to a function that returns an unconstrained
17828 type with default discriminant.
17830 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
17832 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
17833 non-conversion to the nominal result type at the end.
17835 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
17837 * gcc-interface/trans.c (create_temporary): New function taken from...
17838 (create_init_temporary): ...here. Call it.
17839 (call_to_gnu): Create the temporary for the return value early, if any.
17840 Create it for a function with copy-in/copy-out parameters if there is
17841 no target; in other cases of copy-in/copy-out, use another temporary.
17842 Push the new binding level lazily. Add and rename local variables.
17844 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
17846 * gcc-interface/decl.c (validate_size): Improve comments and tweak
17848 (set_rm_size): Likewise.
17850 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
17852 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
17853 for the padded type built in order to support a specified alignment.
17854 Fix incorrect formatting.
17856 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
17859 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
17861 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
17863 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
17864 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
17865 to the end of the list. Adjust recursive call. Rename local variable.
17866 If REORDER is true, reorder components of the record type.
17867 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
17868 components_to_record and adjust the parameter list.
17870 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
17872 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
17873 disabled, use the variable for bounds of loop iteration scheme.
17875 2011-03-21 Kai Tietz <ktietz@redhat.com>
17878 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
17880 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
17882 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
17883 out whether the expression is read-only. Short-circuit placeholder
17884 case and rename a couple of local variables.
17886 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
17888 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
17889 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
17890 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
17891 (convert): Deal with conversions from a smaller form type specially.
17893 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
17895 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
17896 its argument, except for the special -I- switch.
17898 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
17900 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
17903 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
17905 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
17907 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
17909 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
17911 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
17912 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
17913 instead of GNAT_FORMAL. Protect the expression against multiple uses.
17914 Do not generate the check directly, instead instantiate the template
17915 check present in the descriptor.
17916 (make_descriptor_field): Move around.
17917 (build_vms_descriptor32): Build a template check in the POINTER field.
17918 (build_vms_descriptor): Remove useless suffixes.
17919 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
17921 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
17924 * targext.c: Include target files if IN_RTS is defined.
17926 2011-01-26 Richard Guenther <rguenther@suse.de>
17929 * targext.c: Include config.h.
17930 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
17933 2011-01-04 Pascal Obry <obry@adacore.com>
17934 Eric Botcazou <ebotcazou@adacore.com>
17936 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
17938 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
17940 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
17941 end-of-case on the end label and its associated gotos, if any.
17943 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
17945 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
17946 expressions of the parameter cache within the statement group of
17947 the CICO mechanism.
17949 2011-01-04 Olivier Hainque <hainque@adacore.com>
17950 Eric Botcazou <ebotcazou@adacore.com>
17952 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
17953 (set_end_locus_from_node): New function.
17954 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
17955 make and the function end_locus.
17956 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
17957 for the elaboration subprogram.
17958 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
17959 set the end_locus of the expression as well.
17961 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
17964 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
17965 variables that are referenced in exception handlers volatile.
17969 Copyright (C) 2011 Free Software Foundation, Inc.
17971 Copying and distribution of this file, with or without modification,
17972 are permitted in any medium without royalty provided the copyright
17973 notice and this notice are preserved.