1 2011-11-21 Robert Dewar <dewar@adacore.com>
3 * sinput.ads: Minor comment fix.
5 2011-11-21 Robert Dewar <dewar@adacore.com>
7 * exp_attr.adb (Expand_N_Attribute_Reference, case First_Bit,
8 Last_Bit, Position): Handle 2005 case.
10 2011-11-21 Robert Dewar <dewar@adacore.com>
12 * s-atocou-builtin.adb (Decrement): Use Unrestricted_Access
13 to deal with fact that we properly detect the error if Access
15 (Increment): Same fix.
16 * s-taprop-linux.adb (Create_Task): Use Unrestricted_Access
17 to deal with fact that we properly detect the error if Access
19 * sem_util.adb (Is_Volatile_Object): Properly record that A.B is
20 volatile if the B component is volatile. This affects the check
21 for passing such a by reference volatile actual to a non-volatile
22 formal (which should be illegal)
24 2011-11-21 Robert Dewar <dewar@adacore.com>
26 * freeze.adb (Freeze_Enumeration_Type): Make sure to set both
27 size and alignment for foreign convention enumeration types.
28 * layout.adb (Set_Elem_Alignment): Redo setting of alignment
31 2011-11-21 Yannick Moy <moy@adacore.com>
33 * checks.adb (Apply_Access_Check, Apply_Arithmetic_Overflow_Check,
34 Apply_Discriminant_Check, Apply_Divide_Check,
35 Apply_Selected_Length_Checks, Apply_Selected_Range_Checks,
36 Build_Discriminant_Checks, Insert_Range_Checks, Selected_Length_Checks,
37 Selected_Range_Checks): Replace reference to Expander_Active
38 with reference to Full_Expander_Active, so that expansion of
39 checks is not performed in Alfa mode
41 2011-11-21 Tristan Gingold <gingold@adacore.com>
43 * s-taprop-vms.adb (Create_Task): Use Unrestricted_Access to deal with
44 fact that we properly detect the error if Access is used.
46 2011-11-21 Hristian Kirtchev <kirtchev@adacore.com>
48 * par-ch4.adb (P_Quantified_Expression): Add an Ada 2012 check.
50 2011-11-21 Hristian Kirtchev <kirtchev@adacore.com>
52 * exp_imgv.adb: Add with and use clause for Errout.
53 (Expand_Width_Attribute): Emit a warning when in
54 configurable run-time mode to provide a better diagnostic message.
56 2011-11-21 Hristian Kirtchev <kirtchev@adacore.com>
58 * s-finmas.adb (Finalize): Add comment concerning double finalization.
60 2011-11-21 Ed Schonberg <schonberg@adacore.com>
62 * sem_ch3.adb (Access_Definition): If the access definition
63 is itself the return type of an access to function definition
64 which is ultimately the return type of an access to subprogram
65 declaration, its scope is the enclosing scope of the ultimate
68 2011-11-21 Steve Baird <baird@adacore.com>
70 * sem_res.adb (Valid_Conversion): If a conversion was legal
71 in the body of a generic, then the corresponding conversion is
72 legal in the expanded body of an instance of the generic.
74 2011-11-21 Robert Dewar <dewar@adacore.com>
76 * sem_ch3.adb: Minor reformatting.
78 2011-11-21 Robert Dewar <dewar@adacore.com>
80 * s-utf_32.adb (Is_UTF_32_Line_Terminator): Recognize NEL as
82 * sinput.ads: Add section on Handling of Source Line Terminators.
83 * types.ads (Line_Terminator): Adjust comments.
85 2011-11-21 Robert Dewar <dewar@adacore.com>
87 * frontend.adb (Frontend): Capture restrictions from config files
88 * lib-load.adb (Load_Unit): Save/set/restore restriction pragma
90 * lib-xref.adb (Generate_Reference): Fix handling of obsolescent
91 references. This was noticed during debugging, but it is not
92 known if it causes real bugs.
93 * restrict.ads, restrict.adb: New routines to save/set/restore
94 non-partition-wide restrictions.
95 * s-rident.ads: Comment changes for new handling of
97 * sem.adb (Sem): Save/Set/Restore non-partition-wide restrictions
98 * sem_ch10.adb (Analyze_Compilation_Unit): Remove incomplete
99 attempt to save/restore non-partition-wide restrictions (now
100 this work is all done in Sem).
101 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
102 Special handling for restriction No_Elaboration_Code.
104 2011-11-21 Robert Dewar <dewar@adacore.com>
106 * gnat_ugn.texi: Document new handling of restrictions pragmas.
108 2011-11-21 Pascal Obry <obry@adacore.com>
110 * s-taprop-linux.adb (Initialize_Lock): Do not allocate a cond
111 attribute as not needed.
113 2011-11-21 Robert Dewar <dewar@adacore.com>
115 * sem_prag.adb: Minor reformatting.
117 2011-11-21 Pascal Obry <obry@adacore.com>
119 * gnat_rm.texi: Document restriction for stdcall convention on
122 2011-11-21 Pascal Obry <obry@adacore.com>
124 * sem_prag.adb (Process_Convention): A dispatching call cannot
125 have a stdcall calling convention.
127 2011-11-21 Pascal Obry <obry@adacore.com>
129 * s-taprop-linux.adb (Initialize_Lock): Do not allocate a
130 mutex attribute as not needed.
131 (Initialize_TCB): Likewise.
132 (Initialize): Likewise.
134 2011-11-21 Robert Dewar <dewar@adacore.com>
136 * sem_ch6.adb (Is_Public_Subprogram_For): New procedure
137 (Process_PPCs): Invariants only apply to public subprograms.
139 2011-11-21 Robert Dewar <dewar@adacore.com>
141 * sem_util.adb, sem_util.ads, sem_attr.adb, restrict.adb,
142 restrict.ads: Fix for No_Implicit_Aliasing in the renames case.
144 2011-11-21 Robert Dewar <dewar@adacore.com>
146 * a-finali.ads: Use pragma Pure_12 for this unit
147 * aspects.adb: Add aspect Pure_12
148 * aspects.ads: Add aspect Pure_12
149 * opt.ads: Add note on Pure_12
150 * par-prag.adb: Add dummy entry for Pure_12
151 * sem_prag.adb: Implement Pure_12 pragma
152 * snames.ads-tmpl: Add Entry for Pure_12
154 2011-11-21 Sergey Rybin <rybin@adacore.com frybin>
156 * vms_data.ads: Add qualifiers for new gnatpp options
157 '--call_threshold' and '--par_threshold".
158 * gnat_ugn.texi: Add description for new gnatpp options
159 '--call_threshold' and '--par_threshold".
161 2011-11-21 Robert Dewar <dewar@adacore.com>
163 * lib.ads: Minor reformatting.
165 2011-11-21 Robert Dewar <dewar@adacore.com>
167 * lib-load.ads: Add comment.
169 2011-11-21 Gary Dismukes <dismukes@adacore.com>
171 * sem_elab.adb: Minor reformatting
173 2011-11-21 Robert Dewar <dewar@adacore.com>
175 * exp_ch6.adb: Minor reformatting.
177 2011-11-21 Ed Schonberg <schonberg@adacore.com>
179 * sem_ch12.adb (Check_Formal_Package_Instance): If a formal
180 subprogram of the formal package is covered by an others
181 association with a box initialization, no check is needed
182 against the actual in the instantiation of the formal package.
184 2011-11-21 Robert Dewar <dewar@adacore.com>
186 * sem_elab.adb (Check_Internal_Call_Continue): Suppress junk
187 elab warning from within precondition/postcondition etc.
189 2011-11-21 Ed Schonberg <schonberg@adacore.com>
191 * exp_ch6.adb (Expand_Actuals): In Ada 2012, a function call
192 with out parameters may generate assignments to force constraint
193 checks. These checks must be properly placed in the code after the
194 declaration or statement that contains the call.
196 2011-11-21 Fedor Rybin <frybin@adacore.com>
198 * gnat_ugn.texi: Adding info on current gnattest limitations an
199 support of -X option.
201 2011-11-21 Robert Dewar <dewar@adacore.com>
203 * a-cfdlli.adb, a-cbdlli.adb: Minor reformatting.
205 2011-11-20 Robert Dewar <dewar@adacore.com>
207 * exp_ch6.adb, exp_util.adb: Minor reformatting
209 2011-11-20 Eric Botcazou <ebotcazou@adacore.com>
211 * sinfo.ads (Reference): Document that it is OK to set
212 Is_Known_Non_Null on a temporary initialized to a N_Reference
215 2011-11-20 Matthew Heaney <heaney@adacore.com>
217 * a-cbdlli.adb, a-cfdlli.adb (Move): Set Last component to 0
220 2011-11-20 Eric Botcazou <ebotcazou@adacore.com>
222 * exp_ch6.adb (Make_Build_In_Place_Call_In_Assignment):
223 Declare NEW_EXPR local variable and attach the
224 temporary to it. Set Is_Known_Non_Null on the temporary.
225 (Make_Build_In_Place_Call_In_Object_Declaration): Likewise.
226 * exp_util.adb (Remove_Side_Effects): Set Is_Known_Non_Null on
227 the temporary created to hold the 'Reference of the expression,
229 * checks.adb (Install_Null_Excluding_Check): Bail out for the
230 Get_Current_Excep.all.all idiom generated by the expander.
232 2011-11-20 Eric Botcazou <ebotcazou@adacore.com>
234 * gcc-interface/trans.c (struct language_function): Add GNAT_RET.
235 (f_gnat_ret): New macro.
236 (struct nrv_data): Add GNAT_RET.
237 (finalize_nrv_unc_r): New helper function.
238 (finalize_nrv): Add GNAT_RET parameter. Copy it into DATA. If the
239 function returns unconstrained, use finalize_nrv_unc_r as callback.
240 (return_value_ok_for_nrv_p): Test the alignment of RET_OBJ only if
242 (Subprogram_Body_to_gnu): Pass GNAT_RET to finalize_nrv.
243 (gnat_to_gnu) <N_Return_Statement>: In the return-unconstrained case,
244 if optimization is enabled, record candidates for the Named Return
247 2011-11-20 Eric Botcazou <ebotcazou@adacore.com>
249 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Add comment.
250 (gnat_to_gnu) <N_Return_Statement>: Add 'else' to avoid doing a useless
251 test. Tweak default case.
252 <N_Goto_Statement>: Use better formatting.
253 * gcc-interface/utils2.c (maybe_wrap_malloc): Use INIT_EXPR instead of
254 MODIFY_EXPR to initialize the storage.
255 (build_allocator): Likewise.
257 2011-11-20 Eric Botcazou <ebotcazou@adacore.com>
259 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Adjust
260 call to components_to_record.
261 (components_to_record): Add FIRST_FREE_POS parameter. For the variant
262 part, reuse enclosing union even if there is a representation clause
263 on the Unchecked_Union. If there is a variant part, compute the new
264 first free position, if any. Adjust call to self. Use a single field
265 directly only if it hasn't got a representation clause or is placed at
266 offset zero. Create the variant part at offset 0 if all the fields
267 down to this level have a rep clause. Do not chain the variant part
268 immediately and adjust downstream.
269 Do not test ALL_REP before moving the fields without rep clause to the
270 previous level. Call create_rep_part to create the REP part and force
271 a minimum size on it if necessary. Do not chain it immediately.
272 Create a fake REP part if there are fields without rep clause that need
273 to be laid out starting from FIRST_FREE_POS.
274 At the end, chain the REP part and then the variant part.
275 (create_rep_part): New function.
276 (get_rep_part): Minor tweak.
277 * gcc-interface/utils.c (tree_code_for_record_type): Minor tweak.
279 2011-11-18 Iain Sandoe <iains@gcc.gnu.org>
282 * init.c (__gnat_error_handler) [Darwin]: Move workaround to the
283 bug filed as radar #10302855 from __gnat_error_handler to...
284 (__gnat_adjust_context_for_raise) [Darwin]: ...here. New function.
285 (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE) [Darwin]: Define.
287 2011-11-18 Tristan Gingold <gingold@adacore.com>
288 Iain Sandoe <iains@gcc.gnu.org>
291 * mlib-tgt-specific-darwin.adb (Archive_Indexer_Options): Remove.
292 * gcc-interface/Makefile.in (darwin): Remove ranlib special-casing.
294 2011-11-12 Iain Sandoe <iains@gcc.gnu.org>
296 * gcc-interface/Makefile.in (stamp-gnatlib-$(RTSDIR)): Don't link
298 (OSCONS_CPP, OSCONS_EXTRACT): New.
299 (./bldtools/oscons/xoscons): New target.
300 ($(RTSDIR)/s-oscons.ads): Likewise.
301 (gnatlib): Depend on $(RTSDIR)/s-oscons.ads.
302 * gcc-interface/Make-lang.in (ada/s-oscons.ads) Remove as dependency.
303 * Make-generated.in: Remove machinery to generate xoscons and
306 2011-11-10 Eric Botcazou <ebotcazou@adacore.com>
308 * fe.h (Serious_Errors_Detected): New macro.
309 * gcc-interface/gigi.h (build_atomic_load): Declare.
310 (build_atomic_store): Likewise.
311 * gcc-interface/trans.c (atomic_sync_required_p): New predicate.
312 (call_to_gnu): Add ATOMIC_SYNC parameter. Use local variable.
313 Build an atomic load for an In or In Out parameter if needed.
314 Build an atomic store for the assignment of an Out parameter if needed.
315 Build an atomic store to the target if ATOMIC_SYNC is true.
316 (present_in_lhs_or_actual_p): New predicate.
317 (gnat_to_gnu) <N_Identifier>: Build an atomic load if needed.
318 <N_Explicit_Dereference>: Likewise.
319 <N_Indexed_Component>: Likewise.
320 <N_Selected_Component>: Likewise.
321 <N_Assignment_Statement>: Adjust call to call_to_gnu.
322 Build an atomic store to the LHS if needed.
323 <N_Function_Call>: Adjust call to call_to_gnu.
324 * gcc-interface/utils2.c: Include toplev.h.
325 (resolve_atomic_size): New static function.
326 (build_atomic_load): New function.
327 (build_atomic_store): Likewise.
328 * gcc-interface/Make-lang.in (ada/utils2.o): Add toplev.h.
330 2011-11-07 Olivier Hainque <hainque@adacore.com>
332 * sigtramp-ppcvxw.c: Add general comments.
333 (CFI_COMMON_REGS): Remove rule for r1, as in other unwinders. Add
334 rules for r2 to r13, plus CTR and XER.
335 (CFA_REG): New, register number used to hold the local CFA.
336 (CFI_DEF_CFA, SIGTRAMP_BODY): Use it.
337 Make that 15, not 14, with documentation.
338 (TCR): Undef before definition, preventing conflict with reg number in
341 2011-11-07 Robert Dewar <dewar@adacore.com>
343 * exp_util.ads, exp_alfa.adb, a-cohama.adb, a-cohama.ads, sem_ch4.adb,
344 aspects.ads, exp_ch8.adb, exp_ch8.ads, atree.ads: Minor reformatting.
345 * gcc-interface/Make-lang.in: Update dependencies.
347 2011-11-07 Ed Schonberg <schonberg@adacore.com>
349 * exp_ch6.adb: A tagged type is a legal actual for an aliased
352 2011-11-07 Pascal Obry <obry@adacore.com>
354 * g-socket.adb, g-socket.ads: Minor reformatting.
356 2011-11-07 Robert Dewar <dewar@adacore.com>
358 * sem_res.adb (Resolve_Actuals): Minor error message improvement.
360 2011-11-07 Robert Dewar <dewar@adacore.com>
362 * gnat_ugn.texi: Add discussion of default mode handling of
363 source representation with no -gnatW option given, in particular
364 noting that NEL (next line) is not recognized in this context.
366 2011-11-07 Yannick Moy <moy@adacore.com>
368 * sem_util.adb (Note_Possible_Modification): In Alfa mode,
369 generate a reference for a modification even when the modification
370 does not come from source.
372 2011-11-07 Ed Schonberg <schonberg@adacore.com>
374 * exp_ch5.adb (Expand_Iterator_Loop): For the "of" iterator form,
375 use the indexing attributes rather than the Element function,
376 to obtain variable references.
377 * sem_ch4.adb (Try_Container_Indexing): Code cleanup. Use
378 Find_Aspect rather than iterating over representation
379 items. Improve error message.
380 * a-cohama.adb, a-cohama.ads Update to latest RM, with two versions
381 of Reference functions.
383 2011-11-07 Yannick Moy <moy@adacore.com>
385 * sem_util.adb (Unique_Entity): For a parameter on a subprogram
386 body that has a corresponding parameter on the subprogram
387 declaration, define the unique entity as being the declaration
390 2011-11-07 Ed Schonberg <schonberg@adacore.com>
392 * sem_ch6.adb (Analyze_Return_Type): In Ada 2012 mode, if the
393 return type of a function is the class-wide type of an incomplete
394 type T, T can be a Taft-amendment type and does not have to be
395 completed in the current private part.
397 2011-11-07 Ed Schonberg <schonberg@adacore.com>
399 * aspects.ads (Inherited_Aspect): Map that indicates type aspects
400 that are inherited by default, and apply to the class-wide type
402 * aspects.adb (Find_Aspect): If the entity is class-wide and the
403 aspect is inherited, use the aspect of the specific type.
405 2011-11-07 Hristian Kirtchev <kirtchev@adacore.com>
407 * exp_alfa.adb: Remove with and use clause for
408 Exp_Ch8. Add with and use clause for Exp_Util.
409 Remove local constant Disable_Processing_Of_Renamings.
410 (Expand_Alfa_N_Object_Renaming_Declaration): The expansion of
411 object renamings has been reenabled.
412 (Expand_Possible_Renaming):
413 The expansion of identifier and expanded names has been
414 reenabled. Perform the substitutions only for entities that
416 * exp_ch8.ads, exp_ch8.adb (Evaluate_Name): Moved to Exp_Util.
417 * exp_util.adb (Evaluate_Name): Moved from Exp_Ch8.
418 (Remove_Side_Effects): Alphabetize local variables. Add a guard
419 to avoid the infinite expansion of an expression in Alfa mode. Add
420 processing for function calls in Alfa mode.
421 * exp_util.ads (Evaliate_Name): Moved from Exp_Ch8.
423 2011-11-07 Ed Schonberg <schonberg@adacore.com>
425 * freeze.adb (Freeze_Entity): If the entity is an access to
426 subprogram whose designated type is itself a subprogram type,
427 its own return type must be decorated with size information.
429 2011-11-04 Arnaud Charlet <charlet@adacore.com>
431 * gcc-interface/Make-lang.in: Update dependencies.
433 2011-11-04 Robert Dewar <dewar@adacore.com>
435 * sprint.adb (Sprint_Node_Actual, case Qualified_Expression):
436 Avoid junk semicolon after argument of machine code Asm operand.
438 2011-11-04 Robert Dewar <dewar@adacore.com>
440 * exp_ch11.adb (Generate_Push_Pop): Inhibit push/pop nodes in
441 CodePeer mode or if restriction No_Exception_Handlers is present.
442 * exp_ch6.adb (Expand_N_Subprogram_Body): (Inhibit push/pop
443 nodes in CodePeer mode or if restriction No_Exception_Handlers
446 2011-11-04 Robert Dewar <dewar@adacore.com>
448 * s-tassta.adb, atree.ads, errout.adb, sinput.adb: Minor reformatting.
450 2011-11-04 Ed Schonberg <schonberg@adacore.com>
452 * sem_ch6.adb (Analyze_Subprogram_Specification): The
453 specification is legal if it is a function that returns an
454 abstract type, if it comes from an attribute renaming of a stream
455 attribute of an abstract type.
457 2011-11-04 Gary Dismukes <dismukes@adacore.com>
459 * exp_util.adb (Is_Possibly_Unaligned_Object): In case of indexed
460 components, check whether recursively check whether the prefix
461 denotes an unaligned object.
463 2011-11-04 Ed Schonberg <schonberg@adacore.com>
465 * sem_prag.adb (Analyze_Pragma, case Debug): The argument of
466 the pragma is legal if it is an expanded name that denotes a
467 procedure that be can called without parameters.
469 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
471 * gnat_ugn.texi (Performance Considerations) <Vectorization
472 of loops>: New sub-section. <Other Optimization Switches>:
475 2011-11-04 Robert Dewar <dewar@adacore.com>
477 * gnat_rm.texi: Minor reformatting.
479 2011-11-04 Matthew Heaney <heaney@adacore.com>
481 * a-convec.adb, a-coinve.adb, a-cobove.adb (Merge): Raise PE
482 when Target and Source denote same non-empty object
483 * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb (Merge): Ditto
485 2011-11-04 Robert Dewar <dewar@adacore.com>
487 * exp_attr.adb: Minor reformatting.
489 2011-11-04 Ed Schonberg <schonberg@adacore.com>
491 * exp_ch5.adb (Expand_Assign_Record): Do not generate a
492 discriminant assignment within an initialization proc if the
493 record is an unchecked union, as it can only come from the
494 initialization of an unchecked union component.
496 2011-11-04 Robert Dewar <dewar@adacore.com>
498 * gnat_ugn.texi: Minor reformatting.
500 2011-11-04 Robert Dewar <dewar@adacore.com>
502 * par-labl.adb (Rewrite_As_Loop): Generate info msg rather than
505 2011-11-04 Robert Dewar <dewar@adacore.com>
507 * exp_ch4.adb: Minor code reorganization (remove junk obsolete
510 2011-11-04 Hristian Kirtchev <kirtchev@adacore.com>
512 * exp_alfa.adb: Add local constant
513 Disable_Processing_Of_Renamings;
514 (Expand_Alfa_N_Object_Renaming_Declaration): Disable
515 the name evaluation of object renamings for now.
516 (Expand_Potential_Renaming): Do not perform the substitution
518 * exp_util.adb (Remove_Side_Effects): Remove processing for
519 functions with side effects in Alfa mode.
521 2011-11-04 Gary Dismukes <dismukes@adacore.com>
523 * bindgen.adb (Gen_Elab_Calls): In the case
524 of the AAMP target, set elaboration entities to 1 rather than
527 2011-11-04 Ed Schonberg <schonberg@adacore.com>
529 * sem_ch10.adb (Install_Limited_With_Unit): To establish the
530 proper entities on the ancestors of a child unit that appear
531 in a limited_with clause, follow the unit links because the
532 units are not analyzed and scope information is incomplete.
534 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
536 * exp_ch4.adb (Expand_N_Selected_Component): Refine code
537 setting the Atomic_Sync_Required flag to detect one more case.
538 * exp_util.adb (Activate_Atomic_Synchronization): Refine code
539 setting the Atomic_Sync_Required flag to exclude more cases,
540 depending on the parent of the node to be examined.
542 2011-11-04 Bob Duff <duff@adacore.com>
544 * g-excact.adb: Minor: use named notation.
546 2011-11-04 Ed Schonberg <schonberg@adacore.com>
548 * sem_ch5.adb: Improve error messages for illegal iterators.
550 2011-11-04 Hristian Kirtchev <kirtchev@adacore.com>
552 * exp_alfa.adb: Add with and use clauses for Exp_Ch8 and
554 (Expand_Alfa): Alphabetize cases on first choice. Add
555 processing for object renaming declarations, identifiers and
557 (Expand_Alfa_N_In): Remove useless return.
558 (Expand_Alfa_N_Object_Renaming_Declaration): New routine.
559 (Expand_Potential_Renaming): New routine.
560 * exp_ch8.adb (Evaluate_Name): Moved to the top level.
561 (Expand_N_Object_Declaration): Alphabetize local variables. Move
562 Evaluate_Name out to the top level.
563 * exp_ch8.ads (Evaluate_Name): Moved from body to package spec.
564 * exp_util.adb (Remove_Side_Effects): Add processing for
565 functions with side effects in Alfa mode.
567 2011-11-04 Hristian Kirtchev <kirtchev@adacore.com>
569 * gnat_rm.texi: Add entries for
570 restrictions No_Relative_Delay, No_Requeue_Statements and
571 No_Stream_Optimizations.
573 2011-11-04 Ed Schonberg <schonberg@adacore.com>
575 * sem_ch4.adb: Set type of entity in prefixed call, for
576 completeness in a generic context.
578 2011-11-04 Yannick Moy <moy@adacore.com>
580 * sem_prag.adb: Minor refactoring (renaming of a parameter).
582 2011-11-04 Robert Dewar <dewar@adacore.com>
584 * atree.ads: Minor reformatting.
586 2011-11-04 Robert Dewar <dewar@adacore.com>
588 * checks.adb (Atomic_Synchronization_Disabled): Check -gnatd.d
590 * exp_ch2.adb (Expand_Entity_Reference): Use
591 Activate_Atomic_Synchronization
592 * exp_ch4.adb (Expand_N_Explicit_Dereference): Use
593 Activate_Atomic_Synchronization (Expand_N_Indexed_Compoonent):
594 Activate_Atomic_Synchronization (Expand_N_Selected_Component):
595 Use Activate_Atomic_Synchronization
596 * exp_util.ads, exp_util.adb (Activate_Atomic_Synchronization): New
598 * sinfo.ads, sinfo.adb (Atomic_Sync_Required): Can now apply to
599 N_Selected_Component node
601 2011-11-04 Robert Dewar <dewar@adacore.com>
603 * sem_prag.adb, atree.ads, prj-env.adb, prj-env.ads: Minor reformatting.
605 2011-11-04 Yannick Moy <moy@adacore.com>
607 * atree.adb, atree.ads (Set_Original_Node): New set procedure.
608 * sem_ch13.adb (Analyze_Aspect_Specifications/Pre_Post_Aspects):
609 In ASIS mode, no splitting of aspects between conjuncts.
610 (Analyze_Aspect_Specifications/Aspect_Test_Case): Make pragma
611 expressions refer to the original aspect expressions through
612 the Original_Node link. This is used in semantic analysis for
613 ASIS mode, so that the original expression also gets analyzed.
614 * sem_prag.adb (Preanalyze_TC_Args,
615 Check_Precondition_Postcondition,
616 Analyze_Pragma/Pragma_Test_Case): In ASIS mode, for a pragma
617 generated from a source aspect, also analyze the original aspect
619 (Check_Expr_Is_Static_Expression): New procedure
620 similar to existing procedure Check_Arg_Is_Static_Expression,
621 except called on expression inside pragma.
623 2011-11-04 Tristan Gingold <gingold@adacore.com>
625 * prj-env.adb, prj-env.ads (Find_Name_In_Path): New function, from
626 Find_Project.Try_Path_Name.
627 (Find_Project): Use Find_Name_In_Path to implement Try_Path_Name.
629 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
631 * s-atocou.ads (Atomic_Counter): Remove redundant pragma Volatile.
633 2011-11-04 Pascal Obry <obry@adacore.com>
635 * projects.texi: Add short description for qualifiers aggregate
636 and aggregate library.
638 2011-11-04 Matthew Heaney <heaney@adacore.com>
640 * Makefile.rtl, impunit.adb: Added a-cogeso.ad[sb]
641 * a-cgaaso.adb: Replaced implementation with instantiation
643 * a-cogeso.ad[sb] This is the new Ada 2012 unit
644 Ada.Containers.Generic_Sort
646 2011-11-04 Robert Dewar <dewar@adacore.com>
648 * exp_ch2.adb (Expand_Entity_Reference): Do not set
649 Atomic_Sync_Required for the case of a prefix of an attribute.
650 * exp_ch4.adb (Expand_N_Explicit_Dereference): May require
651 atomic synchronization
652 (Expand_N_Indexed_Component): Ditto.
653 (Expand_B_Selected_Component): Ditto.
654 * sem_prag.adb (Process_Suppress_Unsuppress):
655 Disable/Enable_Atomic_Synchronization can now occur for array
656 types with pragma Atomic_Components.
657 * sinfo.ads, sinfo.adb (Atomic_Sync_Required): Can now occur on
658 N_Explicit_Dereference nodes and on N_Indexed_Component nodes.
660 2011-11-04 Gary Dismukes <dismukes@adacore.com>
662 * gnat_ugn.texi: Editorial corrections for gnattest section.
664 2011-11-04 Robert Dewar <dewar@adacore.com>
666 * sem_prag.adb: Minor reformatting.
667 * gnat_rm.texi: Update documentation for pragma Warnings (Off,
669 * exp_ch2.adb (Expand_Entity_Reference): Only set
670 Atomic_Sync_Required on entities that are variables. Doesn't
671 make any sense on anything else.
673 2011-11-04 Robert Dewar <dewar@adacore.com>
675 * exp_ch2.adb (Expand_Entity_Reference): Extend handling of
676 atomic sync to type case.
677 * sem_prag.adb (Process_Suppress_Unsuppress): Atomic Sync can
680 2011-11-04 Robert Dewar <dewar@adacore.com>
682 * sem_warn.adb (Warn_On_Useless_Assignment): More accurate test
684 * gcc-interface/Make-lang.in: Update dependencies.
686 2011-11-04 Robert Dewar <dewar@adacore.com>
688 * sem_prag.adb: Detect more cases of Long_Float inconsistencies at
691 2011-11-04 Matthew Heaney <heaney@adacore.com>
693 * Makefile.rtl, impunit.adb: Added a-sfecin.ads,
694 * a-sfhcin.ads, a-sflcin.ads, a-sbecin.ad[sb], a-sbhcin.ad[sb],
695 a-sblcin.ad[sb], a-suecin.ad[sb], a-suhcin.ad[sb], a-sulcin.ad[sb]
696 * a-sfecin.ads, a-sfhcin.ads, a-sflcin.ads, a-sbecin.ad[sb],
697 a-sbhcin.ad[sb], a-sblcin.ad[sb], a-suecin.ad[sb], a-suhcin.ad[sb],
698 a-sulcin.ad[sb]: New files.
700 2011-11-04 Geert Bosch <bosch@adacore.com>
702 * i-forbla-unimplemented.ads, s-gecola.adb, s-gecola.ads,
703 s-gerebl.adb, s-gerebl.ads, i-forbla.adb, i-forbla.ads,
704 i-forlap.ads, i-forbla-darwin.adb, s-gecobl.adb, s-gecobl.ads,
705 s-gerela.adb, s-gerela.ads: Remove partial interface to BLAS/LAPACK.
706 * gcc-interface/Makefile.in: Remove libgnala and related objects.
708 2011-11-04 Matthew Heaney <heaney@adacore.com>
710 * a-cdlili.ad[sb], a-cidlli.ad[sb], a-coorse.ad[sb], a-ciorse.ad[sb],
711 a-coorma.ad[sb], a-ciorma.ad[sb], a-coormu.ad[sb], a-ciormu.ad[sb],
712 a-cohama.ad[sb], a-cihama.ad[sb], a-cohase.ad[sb], a-cihase.ad[sb],
713 a-convec.ad[sb], a-coinve.ad[sb] (Assign, Copy): New operations
716 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
718 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Do not assert
719 that the type of the parameters isn't dummy in type_annotate_only mode.
721 2011-11-04 Robert Dewar <dewar@adacore.com>
723 * sem_ch12.adb: Minor reformatting
725 2011-11-04 Gary Dismukes <dismukes@adacore.com>
727 * bindgen.adb (Gen_Elab_Calls): In the case of the AAMP target,
728 initialize elaboration entities to zero when specs are processed.
730 2011-10-28 Iain Sandoe <iains@gcc.gnu.org>
731 Eric Botcazou <ebotcazou@adacore.com>
734 * init.c (__gnat_error_handler) [Darwin]: Apply a work-around to the
735 bug filed as radar #10302855 (inconsistent unwind data for sigtramp).
737 2011-10-28 Eric Botcazou <ebotcazou@adacore.com>
740 * gcc-interface/Makefile.in (SYMDEPS): Delete.
741 (LIBICONV): New variable.
742 (LIBICONV_DEP): Likewise.
743 (LIBS): Add $(LIBICONV).
744 (LIBDEPS): Add $(LIBICONV_DEP).
745 (EXTRA_GNATTOOLS_OBJS): Merge into...
746 (TOOLS_LIBS): ...this. Add $(LIBICONV).
748 2011-10-26 Eric Botcazou <ebotcazou@adacore.com>
750 * gcc-interface/decl.c (elaborate_expression_1): Add EXPR_PUBLIC_P local
751 variable. Always create the elaboration variable, if any, as constant.
753 2011-10-26 Eric Botcazou <ebotcazou@adacore.com>
755 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Try to
756 make a packable type for fields of union types as well.
757 <is_type>: Use RECORD_OR_UNION_TYPE_P predicate.
758 (gnat_to_gnu_component_type): Try to make a packable type for fields
759 of union types as well.
760 (make_packable_type): Use RECORD_OR_UNION_TYPE_P predicate.
761 (maybe_pad_type): Try to make a packable type for fields of union types
763 (gnat_to_gnu_field): Likewise.
764 (is_variable_size): Use RECORD_OR_UNION_TYPE_P predicate.
765 (set_rm_size): Likewise.
767 * gcc-interface/misc.c (gnat_type_max_size): Likewise.
768 * gcc-interface/trans.c (add_decl_expr): Likewise.
769 * gcc-interface/utils.c (finish_record_type): Likewise.
770 * gcc-interface/utils2.c (build_simple_component_ref): Likewise.
772 2011-10-26 Eric Botcazou <ebotcazou@adacore.com>
774 * gcc-interface/decl.c (gnat_to_gnu_field): Always check components
775 declared as atomic. Move around conditionally executed code.
777 2011-10-24 Robert Dewar <dewar@adacore.com>
779 * sem.adb (Initialize): Fix bug that blew up if called a second time.
781 2011-10-24 Robert Dewar <dewar@adacore.com>
783 * tb-alvxw.c, tracebak.c, expect.c, initflt.c, tb-alvms.c,
784 tb-ivms.c, tb-gcc.c: Update headers to GPL 3.
786 2011-10-24 Robert Dewar <dewar@adacore.com>
788 * sem_prag.adb (Analyze_Pragma, case Debug): Give proper pragma
791 2011-10-24 Hristian Kirtchev <kirtchev@adacore.com>
793 * gnat_rm.texi: Add an entry for restriction No_Finalization.
795 2011-10-24 Ed Schonberg <schonberg@adacore.com>
797 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): If the
798 current instance is within the one that contains the generic,
799 the freeze node for the current one must appear in the current
800 declarative part. Ditto if the current instance is within another
801 package instance. In both of these cases the freeze node of the
802 previous instance is not relevant.
804 2011-10-24 Gary Dismukes <dismukes@adacore.com>
806 * switch-m.adb (Normalize_Compiler_Switches): Add recognition
807 of AAMP-specific switches -univ and -aamp_target.
809 2011-10-24 Robert Dewar <dewar@adacore.com>
811 * a-tienau.adb (Put): Deal properly with limited line length.
813 2011-10-24 Robert Dewar <dewar@adacore.com>
815 * sem_warn.adb, sem_ch12.adb: Minor reformatting.
817 2011-10-24 Tristan Gingold <gingold@adacore.com>
819 * gcc-interface/Makefile.in: Use GNU ld switches to generate map files
822 2011-10-24 Ed Schonberg <schonberg@adacore.com>
824 * sem_ch12.adb (Earlier): make available globally. If both
825 nodes have the same sloc, the freeze node that does not come
826 from source is the later one.
827 (True_Parent): Make available globally.
828 (Previous_Instance): Subsidiary of
829 Insert_Freeze_Node_For_Instance, to check whether the generic
830 parent of the current instance is declared within a previous
831 instance in the same unit or declarative part, in which case the
832 freeze nodes of both instances must appear in order to prevent
833 elaboration problems in gigi.
834 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): A stub is a
835 freeze point, and the freeze node of a preceding instantiation
836 must be inserted before it.
838 2011-10-24 Robert Dewar <dewar@adacore.com>
840 * checks.ads, checks.adb: Add handling of Synchronization_Check
841 * debug.adb: Add doc for -gnatd.d and -gnatd.e (disable/enable
843 * exp_ch2.adb (Expand_Entity_Reference): Set Atomic_Sync_Required
844 flag Minor code reorganization.
845 * opt.ads (Warn_On_Atomic_Synchronization): New switch.
846 * par-prag.adb: Add dummy entries for pragma
847 Disable/Enable_Atomic_Synchronization.
848 * sem_prag.adb (Process_Suppress_Unsuppress): Handle
849 case of Atomic_Synchronization specially (not suppressed
850 by All_Checks, cannot be set from Source).
851 (Pragma Disable/Enable_Atomic_Synchronization): Add processing.
852 * sinfo.ads, sinfo.adb: Add Atomic_Sync_Required flag
853 * snames.ads-tmpl: Add entry for Atomic_Synchronization Add
854 entry for pragma Disable/Enable_Atomic_Synchronization
855 * switch-c.adb: The -gnatp switch does not disable
856 Atomic_Synchronization Add -gnatep switch to disable
857 Atomic_Synchronization.
858 * types.ads: Add entry for Synchronization_Check
859 * usage.adb: Add line for -gnated switch
860 * warnsw.adb: Settings for Warn_On_Atomic_Synchronization
862 2011-10-24 Geert Bosch <bosch@adacore.com>
864 * s-gearop.adb (Back_Substitute): Avoid overflow if matrix bounds start
867 2011-10-24 Robert Dewar <dewar@adacore.com>
869 * sem_ch12.adb, s-gearop.adb: Minor reformatting.
871 2011-10-24 Robert Dewar <dewar@adacore.com>
873 * warnsw.adb: Add some missing warnings to Set_GNAT_Mode_Warnings.
874 * warnsw.ads: Add comments to Set_GNAT_Mode_Warnings.
876 2011-10-24 Emmanuel Briot <briot@adacore.com>
878 * prj-proc.adb (Process_Expression_Variable_Decl): No special
879 handling for Project_Path unless it is an attribute.
881 2011-10-24 Javier Miranda <miranda@adacore.com>
883 * sem_ch12.adb (Check_Hidden_Primitives): New subprogram.
884 (Install_Hidden_Primitives): New subprogram.
885 (Restore_Hidden_Primitives): New subprogram.
886 (Analyze_Formal_Package_Declaration,
887 Analyze_Package_Instantiation, Analyze_Subprogram_Instantiation):
888 Invoke Check_Hidden_Primitives after every call to
889 Analyze_Associations, and invoke Restore_Hidden_Primitives to
890 restore their visibility after processing the instantiation.
891 (Instantiate_Package_Body): Install visible primitives before
892 analyzing the instantiation and uninstall them to restore their
893 visibility when the instantiation has been analyzed.
894 * sem_util.ads, sem_util.adb (Add_Suffix): New subprogram
895 (Remove_Suffix): New subprogram
896 * sem_ch3.adb (Derive_Subprogram): When handling
897 a derived subprogram for the instantiation of a formal derived
898 tagged type, inherit the dispatching attributes from the actual
899 subprogram (not from the parent type).
901 2011-10-24 Vasiliy Fofanov <fofanov@adacore.com>
903 * gnat_ugn.texi: Document explicit use of XDECGNAT library.
905 2011-10-24 Hristian Kirtchev <kirtchev@adacore.com>
907 * exp_ch3.adb (Build_Assignment): Add local constant N_Loc and
909 (Build_Discriminant_Assignments): Add local variable D_Loc and update
911 (Build_Init_Statements): Add local variables Comp_Loc, Decl_Loc and
912 Var_Loc and update their uses.
913 (Build_Record_Init_Proc): Code reformatting.
914 (Increment_Counter): Add formal parameter Loc.
915 (Make_Counter): Add formal parameter Loc.
917 2011-10-24 Eric Botcazou <ebotcazou@adacore.com>
919 * sem_disp.adb (Covers_Some_Interface): Fix typo.
921 2011-10-24 Matthew Heaney <heaney@adacore.com>
923 * a-cuprqu.adb, a-cbprqu.adb (Dequeue_Only_High_Priority): Fix sense
926 2011-10-24 Yannick Moy <moy@adacore.com>
928 * sem_ch13.adb (Analyze_Aspect_Specifications/Aspect_Test_Case):
929 Translate arguments in positional notation into pragma argument
930 association arguments for the generated pragma.
932 2011-10-24 Arnaud Charlet <charlet@adacore.com>
934 * exp_ch5.adb: Fix minor typo.
936 2011-10-24 Ed Schonberg <schonberg@adacore.com>
938 * sem_ch3.adb (Is_Visible_Component): Refine predicate for
939 the case of a component reference in an instance body, when the
940 enclosing type is private.
942 2011-10-24 Sergey Rybin <rybin@adacore.com frybin>
944 * gnat_ugn.texi: For gnatelim, move the note about using the GNAT
945 driver for getting the project support into gnatelim section.
947 2011-10-24 Robert Dewar <dewar@adacore.com>
949 * gnat_rm.texi: Minor correction to documentation on address clause.
951 2011-10-24 Hristian Kirtchev <kirtchev@adacore.com>
953 * s-finmas.adb (Attach): Synchronize and call the unprotected version.
954 (Attach_Unprotected): New routine.
955 (Delete_Finalize_Address): Removed.
956 (Delete_Finalize_Address_Unprotected): New routine.
957 (Detach): Synchronize and call the unprotected version.
958 (Detach_Unprotected): Remove locking.
959 (Finalize): Add various comment on synchronization. Lock the critical
960 region and call the unprotected versions of routines.
961 (Finalize_Address): Removed.
962 (Finalize_Address_Unprotected): New routine.
963 (Set_Finalize_Address): Synchronize and call
964 the unprotected version.
965 (Set_Finalize_Address_Unprotected): New routine.
966 (Set_Heterogeneous_Finalize_Address): Removed.
967 (Set_Heterogeneous_Finalize_Address_Unprotected): New routine.
968 (Set_Is_Heterogeneous): Add comment on synchronization and
970 * s-finmas.ads: Flag Finalization_Started is no longer atomic
971 because synchronization uses task locking / unlocking.
972 (Attach): Add comment on usage.
973 (Attach_Unprotected): New routine.
974 (Delete_Finalize_Address): Renamed to
975 Delete_Finalize_Address_Unprotected.
976 (Detach): Add comment on usage.
977 (Detach_Unprotected): New routine.
978 (Finalize_Address): Renamed to Finalize_Address_Unprotected.
979 (Set_Finalize_Address): Add comment on usage.
980 (Set_Finalize_Address_Unprotected): New routine.
981 (Set_Heterogeneous_Finalize_Address): Renamed to
982 Set_Heterogeneous_Finalize_Address_Unprotected.
983 * s-stposu.adb (Allocate_Any_Controlled): Add local variable
984 Allocation_Locked. Add various comments on synchronization. Lock
985 the critical region and call the unprotected version of
987 (Deallocate_Any_Controlled): Add various comments on
988 synchronization. Lock the critical region and call the unprotected
991 2011-10-24 Ed Schonberg <schonberg@adacore.com>
993 * sem_ch3.adb (Set_Fixed_Range): The bounds of a fixed point type
994 are universal and must carry the corresponding type.
995 * sem_eval.adb (Check_Non_Static_Context): If the type of the
996 expression is universal real, as may be the case for a fixed point
997 expression with constant operands in the context of a conversion,
998 there is nothing to check.
999 * s-finmas.adb: Minor reformatting
1001 2011-10-23 Eric Botcazou <ebotcazou@adacore.com>
1003 * gcc-interface/decl.c (create_concat_name): Add explicit cast.
1005 2011-10-20 Eric Botcazou <ebotcazou@adacore.com>
1007 * gcc-interface/Make-lang.in (GNATLIBFLAGS, GNATLIBCFLAGS, THREAD_KIND,
1008 TRACE): Reintroduce.
1009 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o,
1010 ada/initialize.o, ada/raise.o): Reintroduce explicit compilation rules.
1012 2011-10-20 Eric Botcazou <ebotcazou@adacore.com>
1014 * gcc-interface/trans.c (lhs_or_actual_p): New predicate.
1015 (unchecked_conversion_nop): Use it.
1016 (gnat_to_gnu): Likewise.
1018 2011-10-20 Eric Botcazou <ebotcazou@adacore.com>
1020 * back_end.adb (Call_Back_End): Pass the maximum logical line number
1021 instead of the maximum physical line number to gigi.
1022 * gcc-interface/trans.c (Sloc_to_locus): Cope with line zero.
1024 2011-10-16 Tom Tromey <tromey@redhat.com>
1025 Dodji Seketeli <dodji@redhat.com>
1027 * gcc-interface/trans.c (gigi, Sloc_to_locus): Adjust to use the new
1028 public ordinary map interface.
1030 2011-10-16 Tristan Gingold <gingold@adacore.com>
1032 * link.c (_AIX): Add support for GNU ld.
1034 2011-10-16 Fedor Rybin <frybin@adacore.com>
1036 * gnat_ugn.texi: Fixing gnattest example names in the doc.
1037 Adding explanation to additional tests usage.
1039 2011-10-16 Robert Dewar <dewar@adacore.com>
1041 * exp_ch6.adb, sem_ch6.adb: Minor reformatting.
1043 2011-10-16 Eric Botcazou <ebotcazou@adacore.com>
1045 * a-convec.adb: Fix minor inconsistencies.
1047 2011-10-16 Matthew Heaney <heaney@adacore.com>
1049 * a-cusyqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cbprqu.ads (package
1050 Implementation): Specify pragma Implementation_Defined.
1052 2011-10-15 Nicolas Roche <roche@adacore.com>
1054 * gcc-interface/lang-specs.h: Ensure -mrtp switch is passed when using
1055 either rtp-smp or ravenscar-cert-rtp runtimes.
1057 2011-10-15 Bob Duff <duff@adacore.com>
1059 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call):
1060 Do not create a pool formal on unless RE_Root_Storage_Pool_Ptr
1062 (Expand_N_Extended_Return_Statement): Do not create a renaming of the
1063 build-in-place pool parameter unless RE_Root_Storage_Pool_Ptr is
1065 (Make_Build_In_Place_Call_In_Allocator): Add the user-defined
1066 pool only if RE_Root_Storage_Pool_Ptr is available.
1067 (Make_Build_In_Place_Call_In_Object_Declaration): Do not add a
1068 pool actual unless RE_Root_Storage_Pool_Ptr is available.
1069 * sem_ch6.adb (Create_Extra_Formals): Add build-in-place pool
1070 formal only if RE_Root_Storage_Pool_Ptr is available.
1072 2011-10-15 Matthew Heaney <heaney@adacore.com>
1074 * a-cusyqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cbprqu.ads (Queue
1075 type): Specify Priority aspect for protected type.
1077 2011-10-14 Ed Schonberg <schonberg@adacore.com>
1079 * exp_disp.adb (Check_Premature_Freezing): If an untagged type
1080 is a generic actual, it is a subtype of a type that was frozen
1081 by the instantiation, and even if not marked frozen it does not
1082 affect the construction of the dispatch table.
1084 2011-10-14 Robert Dewar <dewar@adacore.com>
1086 * make.adb, mlib-utl.adb, sem_util.adb, sem_ch4.adb: Minor code
1088 * s-rident.ads: Add missing Compiler_Unit pragma.
1090 2011-10-14 Gary Dismukes <dismukes@adacore.com>
1092 * sem_res.adb: Minor reformatting.
1094 2011-10-14 Hristian Kirtchev <kirtchev@adacore.com>
1096 * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call):
1097 Code and comment reformatting. Use BIP_Task_Master
1098 when creating a _master.
1099 (BIP_Formal_Suffix): Code reformatting. Correct the case for
1101 (Make_Build_In_Place_Call_In_Object_Declaration): Use
1102 BIP_Task_Master when creating a reference to the enclosing
1103 function's _master formal.
1104 (Move_Activation_Chain): Use BIP_Task_Master when creating a reference
1106 * exp_ch6.ads: Change BIP_Master to BIP_Task_Master.
1107 (Needs_BIP_Finalization_Master): Alphabetized.
1108 * sem_ch6.adb (Create_Extra_Formals): Update the usage of
1111 2011-10-14 Ed Schonberg <schonberg@adacore.com>
1113 * par-ch6.adb (P_Return_Object_Declaration): In Ada 2012 mode,
1114 reject an aliased keyword on the object declaration of an extended
1115 return statement. In older versions of the language indicate
1116 that this is illegal in the standard.
1118 2011-10-14 Pascal Obry <obry@adacore.com>
1120 * sem_util.adb, sem_ch4.adb: Minor reformatting.
1122 2011-10-14 Ed Schonberg <schonberg@adacore.com>
1124 * sem_ch13.adb: Recognize properly procedure calls that are
1125 transformed into code statements.
1127 2011-10-14 Vincent Celier <celier@adacore.com>
1129 * projects.texi: Minor fix in project example.
1131 2011-10-14 Ed Schonberg <schonberg@adacore.com>
1133 * sem_util.adb: Return objects are aliased if their type is
1134 immutably limited as per AI05-0053.
1136 2011-10-14 Gary Dismukes <dismukes@adacore.com>
1138 * exp_ch4.adb (Expand_N_Op_And): Remove Short_Circuit_And_Or
1139 expansion code (moved to sem_res) (Expand_N_Op_Or): Remove
1140 Short_Circuit_And_Or expansion code (moved to sem_res).
1141 * sem_res.adb (Resolve_Logical_Op): Add code to rewrite Boolean
1142 "and" and "or" operators as short-circuit "and then" and "or
1143 else", when pragma Short_Circuit_And_Or is active.
1145 2011-10-13 Robert Dewar <dewar@adacore.com>
1147 * sem_ch9.adb, sem_util.adb, sem_util.ads, exp_ch6.adb, sem_ch4.adb,
1148 sem_ch6.adb, exp_ch3.adb: Minor reformatting.
1150 2011-10-13 Arnaud Charlet <charlet@adacore.com>
1152 * Makefile.rtl (GNATRTL_NONTASKING_OBJS): Add a-ngcoar.o.
1154 2011-10-13 Jerome Guitton <guitton@adacore.com>
1156 * sysdep.c (__gnat_get_task_options): Re-enable VX_SPE_TASK on vThreads
1158 2011-10-13 Eric Botcazou <ebotcazou@adacore.com>
1160 * a-convec.ads (Cursor): Minor reformatting.
1161 * a-convec.adb (Next): Fix minor inconsistencies.
1162 (Previous): Likewise.
1164 2011-10-13 Ed Schonberg <schonberg@adacore.com>
1166 * sem_util.ads, sem_util.adb (Available_Full_View_Of_Component):
1167 New predicate to determine whether some operations on an array
1168 type are available when the full view of its component may differ
1169 from the view of the point of the array declaration.
1170 * sem_ch4.adb (Find_Equality_Types): Use
1171 Available_Full_View_Of_Component.
1172 * sem_type.adb (Valid_Boolean_Arg, Valid_Comparison_Arg): Ditto
1174 2011-10-13 Ed Schonberg <schonberg@adacore.com>
1176 * sem_ch9.adb: Analyze aspects while discriminants of protected
1179 2011-10-13 Geert Bosch <bosch@adacore.com>
1181 * Makefile.rtl (GNATRTL_TASKING_OBJECTS): Add
1182 a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o, as these no
1183 longer depend on an external library.
1184 * gcc-interface/Makefile.in (GNATRTL_LINEARALGEBRA_OBJS): Remove
1185 a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o.
1186 Update dependencies.
1187 * gcc-interface/Make-lang.in: Update dependencies.
1189 2011-10-13 Cyrille Comar <comar@adacore.com>
1191 * gnat_ugn.texi: Minor editing.
1193 2011-10-13 Vincent Celier <celier@adacore.com>
1195 * projects.texi: Add documentation on packages and attributes
1196 that are inherited from a project being extended into the
1199 2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
1201 * exp_ch3.adb (Build_Master): Rewritten.
1202 (Expand_N_Full_Type_Declaration): Reformat the declarative
1203 region. Update the call to Build_Master_Renaming.
1204 (Expand_Previous_Access_Type): Rewritten.
1205 * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call):
1206 Add local constant Result_Subt and update related usage.
1207 (Expand_N_Extended_Return_Statement): Add local constant
1208 Result_Subt and update related usage.
1209 * exp_ch9.adb (Build_Activation_Chain): Rewritten to use the
1210 new context detection mechanism.
1211 (Build_Class_Wide_Master):
1212 Use Insert_Action to add the renaming into the tree.
1213 (Build_Master_Entity): Rewritten to use the new context detection
1215 (Build_Master_Renaming): Add formal parameter Ins_Nod
1216 and related usage. Use Insert_Action to add the renaming into the
1218 (Find_Enclosing_Context): New subsidiary routine. Rather
1219 than relying on enclosing scopes, this routine looks at the
1220 tree structure to figure out the proper context for a _master
1221 or a _chain. This approach eliminates the issues with transient
1222 scopes which have not been converted into blocks.
1223 * exp_ch9.ads (Build_Master_Entity): Change parameter profile
1224 to better reflect the new usage. Update the related comment.
1225 (Build_Master_Renaming): Add formal parameter Ins_Nod. Update
1226 the comment on usage.
1227 * sem_ch3.adb (Access_Definition): Update the calls to
1228 Build_Master_Entity and Build_Master_Renaming.
1229 * sem_ch6.adb (Create_Extra_Formals): Add local variable
1230 Full_Subt. Code reformatting.
1231 * sem_util.adb (Is_Iterator): Alphabetized.
1232 (Is_LHS): Alphabetized.
1233 (Is_Limited_Class_Wide_Type): New routine.
1234 * sem_util.ads (Is_Limited_Class_Wide_Type): New routine.
1236 2011-10-13 Geert Bosch <bosch@adacore.com>
1238 * a-ngrear.adb (Solve): Make generic and move to
1239 System.Generic_Array_Operations.
1240 * s-gearop.ads (Matrix_Vector_Solution, Matrix_Matrix_Solution):
1241 New generic solvers to compute a vector resp. matrix Y such
1242 that A * Y = X, approximately.
1243 * s-gearop.adb (Matrix_Vector_Solution, Matrix_Matrix_Solution):
1244 Implement using Forward_Eliminate and Back_Substitute
1245 * a-ngcoar.adb: Reimplement in pure Ada to remove dependencies
1247 * a-ngcoar.ads ("abs"): Fix return type to be real.
1249 2011-10-13 Eric Botcazou <ebotcazou@adacore.com>
1252 * s-linux-alpha.ads: Do not "with" Interfaces.C.
1253 * s-linux-sparc.ads: Likewise.
1255 2011-10-13 Geert Bosch <bosch@adacore.com>
1257 * s-gearop.ads (Forward_Eliminate): Add "abs" formal function
1259 * s-gearop.adb (Forward_Eliminate): Remove local "abs" function
1261 * a-ngrear.adb (Forward_Eliminate): Adjust instantiation for
1264 2011-10-13 Geert Bosch <bosch@adacore.com>
1266 * a-ngrear.adb, s-gearop.adb, s-gearop.ads (Sqrt): Make generic and
1267 move to System.Generic_Array_Operations.
1269 2011-10-13 Geert Bosch <bosch@adacore.com>
1271 * a-ngrear.adb ("abs"): Adjust for modified L2_Norm generic
1272 * s-gearop.ads (L2_Norm): Change profile to be suitable for
1274 * s-gearop.adb (L2_Norm): Reimplement using direct definition,
1277 2011-10-13 Robert Dewar <dewar@adacore.com>
1279 * exp_ch5.adb, sem_ch3.adb, impunit.adb, impunit.ads, sem_type.adb,
1280 prj-proc.adb, exp_ch9.adb, s-regpat.adb, sem_ch10.adb, sem_prag.adb,
1281 sem_ch12.adb, freeze.adb, sem_attr.adb, sem_attr.ads, gnatlink.adb,
1282 par-ch6.adb, exp_ch6.adb, sem_ch4.adb, sem_ch6.adb, sem_ch8.adb,
1283 par-util.adb, sem_ch13.adb, lib-xref.adb, g-trasym.adb, g-trasym.ads,
1284 exp_aggr.adb, s-taprop-posix.adb: Minor reformatting.
1286 2011-10-13 Geert Bosch <bosch@adacore.com>
1288 * s-gearop.adb: Minor comment additions.
1290 2011-10-13 Fedor Rybin <frybin@adacore.com>
1292 * gnat_ugn.texi: Add gnattest section.
1294 2011-10-13 Ed Schonberg <schonberg@adacore.com>
1296 * freeze.adb: Do not create body of renaming if declaration has
1299 2011-10-13 Olivier Hainque <hainque@adacore.com>
1301 * init.c (__gnat_error_handler - vxworks case): Restrict sigtramp calls
1302 further, to the ppc+kernel case only.
1304 2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
1306 * exp_ch4.adb (Expand_N_Allocator): Comment reformatting.
1307 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call):
1308 Do not create a pool formal on .NET/JVM.
1309 (Expand_N_Extended_Return_Statement): Alphabetize local
1310 variables. Do not create a renaming of the build-in-place pool
1311 parameter on .NET/JVM. (Make_Build_In_Place_Call_In_Allocator):
1312 Add the user-defined pool only on non-VM targets.
1313 (Make_Build_In_Place_Call_In_Object_Declaration): Alphabetize
1314 local variables. Do not add a pool actual on .NET/JVM.
1315 * sem_ch6.adb: Add with and use clause for Targparm.
1316 (Create_Extra_Formals): Add build-in-place pool formal only on
1318 * rtsfind.ads: Alphabetize entries.
1320 2011-10-13 Sergey Rybin <rybin@adacore.com>
1322 * gnat_ugn.texi: Minor correction.
1324 2011-10-13 Ed Schonberg <schonberg@adacore.com>
1326 * sem_ch8.adb: Minor error message improvement.
1328 2011-10-13 Robert Dewar <dewar@adacore.com>
1330 * a-cbprqu.adb, a-ciorma.adb, exp_ch3.adb: Minor reformatting.
1332 2011-10-13 Gary Dismukes <dismukes@adacore.com>
1334 * exp_ch5.adb (Expand_N_Loop_Statement): For the transformation
1335 of a for loop for an enumeration type with an enumeration rep
1336 clause, which involves moving the original loop parameter into
1337 a nested block, the loop parameter's entity must be removed from
1338 the entity list of the loop scope.
1340 2011-10-13 Bob Duff <duff@adacore.com>
1342 * exp_ch6.ads (BIP_Storage_Pool): New "extra implicit parameter"
1343 that gets passed in the same cases where BIP_Alloc_Form is passed
1344 (caller-unknown-size results). BIP_Storage_Pool is used when
1345 BIP_Alloc_Form = User_Storage_Pool. In that case, a pointer
1346 to the user-defined storage pool is passed at the call site,
1347 and this pool is used in callee to allocate the result.
1348 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call): New
1349 version of Add_Alloc_Form_Actual_To_Build_In_Place_Call. Passes
1350 the additional BIP_Storage_Pool actual.
1351 (Expand_N_Extended_Return_Statement): Allocate the function
1352 result using the user-defined storage pool, if BIP_Alloc_Form =
1354 * sem_ch6.adb: Add the "extra formal" for BIP_Storage_Pool.
1355 * exp_ch4.adb: Don't overwrite storage pool set by
1356 Expand_N_Extended_Return_Statement.
1357 * s-stopoo.ads, rtsfind.ads (Root_Storage_Pool_Ptr): New type,
1358 for use in build-in-place function calls within allocators
1359 where the access type has a user-defined storage pool.
1361 2011-10-13 Sergey Rybin <rybin@adacore.com>
1363 * gnat_ugn.texi, vms_data.ads: Add an option to control enumeration
1366 2011-10-13 Nicolas Roche <roche@adacore.com>
1368 * gnatlink.adb: Ensure that -mrtp is passed when runtime name ends
1371 2011-10-13 Ed Schonberg <schonberg@adacore.com>
1373 * sem_prag.adb (Analyze_Pragma, case Unchecked_Union): Take into
1374 account that an unchecked union type can be limited.
1376 2011-10-13 Olivier Hainque <hainque@adacore.com>
1378 * init.c (__gnat_error_handler) <VxWorks version>: Add comments on
1379 the use of the signal trampoline for PPC in the sjlj case as well.
1380 Add legitimate casts, preventing compile time warnings on the
1381 (sighandler *) profile.
1383 2011-10-13 Yannick Moy <moy@adacore.com>
1385 * sem_aggr.adb (Resolve_Aggr_Expr): Always perform semantic analysis
1388 2011-10-13 Ed Schonberg <schonberg@adacore.com>
1390 * sem_ch3.adb (OK_For_Limited_Init_In_05): Conditional and case
1391 expressions are legal limited return values if each one of their
1392 dependent expressions are legal.
1394 2011-10-13 Ed Schonberg <schonberg@adacore.com>
1396 * sem_ch6.adb (Analyze_Procedure_Call_Statement): In Ada 2012 mode,
1397 if the prefix of the call is a qualified expression, rewrite as
1399 * sem_ch13.adb (Analyze_Code_Statement): In Ada 2012 mode, the
1400 code statement is legal if it is a rewriting of a procedure call.
1402 2011-10-13 Ed Schonberg <schonberg@adacore.com>
1404 * exp_aggr.adb (Flatten): If a component association has a box,
1405 assume that aggregate is not static.
1406 (Safe_Aggregate): If a component association in a non-limited
1407 aggregate has a box, assume that it cannot be expanded in place.
1409 2011-10-13 Vincent Celier <celier@adacore.com>
1411 * prj-conf.adb (Get_Or_Create_Configuration_File): Call
1412 Process_Project_Tree_Phase_1 with Packages_To_Check.
1413 (Process_Project_And_Apply_Config): Ditto
1414 * prj-part.ads, prj-part.adb, prj-pars.ads, prj-pars.adb (Parse):
1415 Remove default for argument Packages_To_Check.
1416 * prj-proc.adb (Recursive_Process): New argument
1419 (Process_Project_Tree_Phase_1): Ditto.
1420 (Recursive_Project.Process_Aggregated_Projects): Call
1421 Prj.Part.Parse and Process_Project_Tree_Phase_1 with
1423 * prj-proc.ads (Process): New argument Packages_To_Check
1424 (Process_Project_Tree_Phase_1): Ditto
1426 2011-10-13 Arnaud Charlet <charlet@adacore.com>
1428 * gcc-interface/Makefile.in: Fix typo.
1430 2011-10-13 Ed Schonberg <schonberg@adacore.com>
1432 * sem_ch12.adb (Analyze_Formal_{Floating_Type,
1433 Signed_Integer_Type, Decimal_Fixed_Point_Type, Discrete_Type}):
1434 Use sloc of defining identifier of farmal type declaration,
1435 as sloc of generated internal entity, to prevent misplaced
1438 2011-10-13 Ed Schonberg <schonberg@adacore.com>
1440 * sem_intr.adb (Check_Intrinsic_Operator): Check that type
1441 is fully defined before checking that it is a numeric type.
1443 2011-10-13 Ed Schonberg <schonberg@adacore.com>
1445 * sem_aggr.adb (Resolve_Record_Aggregate): If a component
1446 association for component X has a box, then X is covered in the
1447 aggregate even if there is not default value for X in the type
1448 declaration, and X has to be default-initialized.
1450 2011-10-13 Ed Schonberg <schonberg@adacore.com>
1452 * sem_attr.adb (Check_Enum_Image, Analyze_Attribute case 'Value): Mark
1453 literals as referenced only if reference is in current source unit.
1455 2011-10-13 Matthew Heaney <heaney@adacore.com>
1457 * a-csquin.ads (Enque, Dequeue): Mark interface operations as entries.
1459 2011-10-13 Olivier Hainque <hainque@adacore.com>
1461 * sigtramp.h: New file. Prototype and spec of the signal
1462 trampoline to be called by an established handler to provide
1463 dwarf call frame info before the real signal processing code.
1464 * sigtramp-ppcvxw.c: New file. Implementation of the signal
1465 trampoline for ppc-vxworks.
1466 * init.c (vxworks section): Use it for ppc.
1468 2011-10-13 Thomas Quinot <quinot@adacore.com>
1470 * par-ch2.adb, par.adb, par-util.adb, par-ch3.adb
1471 (Check_Future_Identifier): New subprogram,
1472 factors duplicated code from Par.Ch2.P_Identifier and
1473 Par.Ch3.P_Defining_Identifier.
1475 2011-10-13 Thomas Quinot <quinot@adacore.com>
1477 * s-taprop-posix.adb (Initialize): Always raise Storage_Error
1478 if we fail to initialize CV attributes or CV.
1480 2011-10-13 Thomas Quinot <quinot@adacore.com>
1482 * s-tasren.adb (Timed_Selective_Wait, case
1483 Accept_Alternative_Selected): Use Defer_Abort_Nestable, since
1484 we know abortion is already deferred.
1486 2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
1488 * exp_ch3.adb (Build_Class_Wide_Master): Moved to exp_ch9.
1489 (Build_Master_Renaming (function)): Removed.
1490 (Build_Master_Renaming (procedure)): Moved to exp_ch9.
1491 (Expand_Full_Type_Declaration): Alphabetize
1492 variables. Reformatting of code and comments. Rewrite the
1493 section on processing of anonymous access-to-task types in
1495 * exp_ch3.ads (Build_Class_Wide_Master): Moved to exp_ch9.
1496 (Build_Master_Renaming): Moved to exp_ch9.
1497 * exp_ch9.adb (Build_Class_Wide_Master): Moved from exp_ch3.
1498 (Build_Master_Entity): Add formal parameter
1499 Use_Current. Reformatting of code and comments.
1500 (Build_Master_Renaming): Moved from exp_ch3.
1501 * exp_ch9.ads (Build_Class_Wide_Master): Moved from
1502 exp_ch3. Update comment on usage.
1503 (Build_Master_Entity):
1504 Add formal parameter Use_Current. Update comment on usage.
1505 (Build_Master_Renaming): Moved from exp_ch3.
1506 * sem_ch3.adb (Access_Definition): Remove redundant code to
1507 create a _master and a renaming.
1509 2011-10-13 Ed Schonberg <schonberg@adacore.com>
1511 * lib-xref.adb: Do no emit reference to overridden operation,
1512 if it is internally generated.
1514 2011-10-13 Vincent Celier <celier@adacore.com>
1516 * bindgen.adb: Remove any processing related to g-trasym
1517 * Makefile.rtl: Add g-trasym.o to GNATRTL_NONTASKING_OBJS
1518 * mlib-prj.adb: Remove any processing related to g-trasym.
1520 2011-10-12 Eric Botcazou <ebotcazou@adacore.com>
1522 * sem_util.adb (Denotes_Same_Prefix): Fix fatal warning.
1523 * gcc-interface/Make-lang.in (WARN_ADAFLAGS): New.
1524 (ALL_ADAFLAGS): Include WARN_ADAFLAGS.
1525 (ADA_FLAGS_TO_PASS): Likewise.
1526 (COMMON_FLAGS_TO_PASS): New.
1527 (ADA_TOOLS_FLAGS_TO_PASS): Use COMMON_FLAGS_TO_PASS. In the regular
1528 native case, also use FLAGS_TO_PASS and ADA_FLAGS_TO_PASS.
1529 (gnatlib): Use COMMON_FLAGS_TO_PASS.
1530 (ada.install-common): Likewise.
1531 (install-gnatlib): Likewise.
1532 (install-gnatlib-obj): Likewise.
1533 (gnattools): Use ADA_TOOLS_FLAGS_TO_PASS for gnattools1 as well.
1534 (gnat-cross): Delete.
1535 (gnatboot): Likewise.
1536 (gnatboot2): Likewise.
1537 (gnatboot3): Likewise.
1538 (gnatstage1): Likewise.
1539 (gnatstage2): Likewise.
1540 * gcc-interface/Makefile.in (SOME_ADAFLAGS): Likewise.
1541 (MOST_ADAFLAGS): Likewise.
1542 (LOOSE_CFLAGS): Likewise.
1543 (gnat-cross): Likewise.
1544 (GNATLIBFLAGS): Add -W -Wall.
1545 (GNATLIBCFLAGS_FOR_C): Likewise.
1546 * gcc-interface/lang.opt: Remove C-specific warnings. Add doc lines.
1547 * gcc-interface/misc.c (gnat_handle_option): Remove obsolete cases.
1549 2011-10-12 Eric Botcazou <ebotcazou@adacore.com>
1551 * gcc-interface/trans.c (Attribute_to_gnu): Use remove_conversions.
1552 (push_range_check_info): Likewise.
1553 (gnat_to_gnu) <N_Code_Statement>: Likewise.
1554 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: Likewise.
1555 (gnat_invariant_expr): Likewise.
1556 * gcc-interface/utils.c (compute_related_constant): Likewise.
1557 (max_size): Fix handling of SAVE_EXPR.
1558 (remove_conversions): Fix formatting.
1560 2011-10-12 Eric Botcazou <ebotcazou@adacore.com>
1562 * gcc-interface/ada-tree.h (DECL_LOOP_PARM_P): New flag.
1563 (DECL_INDUCTION_VAR): New macro.
1564 (SET_DECL_INDUCTION_VAR): Likewise.
1565 * gcc-interface/gigi.h (convert_to_index_type): Declare.
1566 (gnat_invariant_expr): Likewise.
1567 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: If this is a loop
1568 parameter, set DECL_LOOP_PARM_P on it.
1569 * gcc-interface/misc.c (gnat_print_decl) <VAR_DECL>: If DECL_LOOP_PARM_P
1570 is set, print DECL_INDUCTION_VAR instead of DECL_RENAMED_OBJECT.
1571 * gcc-interface/trans.c (gnu_loop_label_stack): Delete.
1572 (struct range_check_info_d): New type.
1573 (struct loop_info_d): Likewise.
1574 (gnu_loop_stack): New stack.
1575 (Identifier_to_gnu): Set TREE_READONLY flag on the first dereference
1576 built for a by-double-ref read-only parameter. If DECL_LOOP_PARM_P
1577 is set, do not test DECL_RENAMED_OBJECT.
1578 (push_range_check_info): New function.
1579 (Loop_Statement_to_gnu): Push a new struct loop_info_d instead of just
1580 the label. Reference the label and the iteration variable from it.
1581 Build the special induction variable in the unsigned version of the
1582 size type, if it is larger than the base type. And attach it to the
1583 iteration variable if the latter isn't by-ref. In the iteration scheme
1584 case, initialize the invariant conditions in front of the loop if
1585 deemed profitable. Use gnu_loop_stack.
1586 (gnat_to_gnu) <N_Exit_Statement>: Use gnu_loop_stack.
1587 <N_Raise_Constraint_Error>: Always process the reason. In the range
1588 check and related cases, and if loop unswitching is enabled, compute
1589 invariant conditions and push this information onto the stack.
1590 Do not translate again the condition if it has been already translated.
1591 * gcc-interface/utils.c (record_global_renaming_pointer): Assert that
1592 DECL_LOOP_PARM_P isn't set.
1593 (convert_to_index_type): New function.
1594 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Use it in order
1595 to convert the index from the base index type to sizetype.
1596 (gnat_invariant_expr): New function.
1598 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
1600 * gcc-interface/utils.c (def_builtin_1): Delete old interface with
1601 two parallel arrays to hold standard builtin declarations, and
1602 replace it with a function based interface that can support
1603 creating builtins on the fly in the future.
1604 * gcc-interface/trans.c (Exception_Handler_to_gnu_zcx): Ditto.
1605 (gnat_to_gnu): Ditto.
1607 2011-10-07 Eric Botcazou <ebotcazou@adacore.com>
1610 * gcc-interface/gigi.h (gnat_pushdecl): Adjust comment.
1611 * gcc-interface/utils.c (global_context): New variable.
1612 (gnat_pushdecl): Initialize it and set it as the DECL_CONTEXT of DECLs
1613 that are either public external or at top level. Use "No" macro.
1614 (end_subprog_body): Call decl_function_context.
1615 (rest_of_subprog_body_compilation): Likewise.
1617 2011-10-07 Eric Botcazou <ebotcazou@adacore.com>
1619 * gcc-interface/gigi.h (gnat_useless_type_conversion): Declare.
1620 (rest_of_subprog_body_compilation): Likewise.
1621 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: For renaming,
1622 test for useless conversions by means of gnat_useless_type_conversion.
1623 * gcc-interface/trans.c: Include bitmap.h and cgraph.h.
1624 (language_function): Add named_ret_val and other_ret_val.
1625 (f_named_ret_val): New macro.
1626 (f_other_ret_val): Likewise.
1627 (gigi): Call rest_of_subprog_body_compilation.
1628 (struct nrv_data): New structure.
1629 (is_nrv_p): New predicate.
1630 (prune_nrv_r): New helper function.
1631 (prune_nrv_in_block): New function.
1632 (finalize_nrv_r): New helper function.
1633 (finalize_nrv): New function.
1634 (return_value_ok_for_nrv_p): New predicate.
1635 (build_return_expr): If optimization is enabled, record candidates for
1636 the Named Return Value optimization.
1637 (build_function_stub): Call rest_of_subprog_body_compilation.
1638 (Subprogram_Body_to_gnu): If optimization is enabled and there are
1639 candidates, finalize the Named Return Value optimization.
1640 Call rest_of_subprog_body_compilation.
1641 (call_to_gnu): At the end, if a return value is needed, simplify the
1642 result before wrapping it up in a COMPOUND_EXPR.
1643 * gcc-interface/utils.c (end_subprog_body): Split into...
1644 (rest_of_subprog_body_compilation): ...this. New function.
1645 (gnat_useless_type_conversion): Likewise.
1647 2011-10-06 Thomas Quinot <quinot@adacore.com>
1649 * einfo.ads, exp_attr.adb, exp_ch3.adb, exp_ch4.adb, exp_ch7.adb,
1650 exp_ch9.adb, exp_ch9.ads, exp_strm.adb, exp_util.adb, freeze.adb,
1651 g-debpoo.ads, opt.ads, par-ch12.adb, par-ch2.adb, par-ch3.adb,
1652 par-ch5.adb, par-ch6.adb, sem_aggr.adb, sem_attr.adb, sem_cat.adb,
1653 sem_ch10.adb, sem_ch12.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
1654 sem_ch6.adb, sem_intr.adb, sem_res.ads, sem_type.adb, sem_util.adb,
1655 s-regpat.adb, s-tpopde-vms.ads: Minor reformatting.
1656 * s-osinte-freebsd.ads: Fix for tasking failures on FreeBSD.
1658 2011-10-06 Ed Schonberg <schonberg@adacore.com>
1660 * a-cihase.adb, a-ciorma.adb: Avoid accessibility checks in container
1663 2011-10-06 Matthew Heaney <heaney@adacore.com>
1665 * a-cuprqu.ads, a-cuprqu.adb, a-cbprqu.ads, a-cbprqu.adb
1666 (Dequeue_Only_High_Priority): Protected procedure now implemented.
1668 2011-10-06 Vincent Celier <celier@adacore.com>
1670 * g-trasym.adb: Replace old implementation with the default
1671 implementation that returns list of addresses as "0x...".
1672 * g-trasym.ads: Update the list of platforms with the full
1673 capability. Indicate that there is a default implementation
1674 for other platforms.
1675 * g-trasym-unimplemented.ads, g-trasym-unimplemented.adb: Remove.
1676 * gcc-interface/Makefile.in: Remove g-trasym-unimplemented, as there
1677 is now a default implementation for all platforms without the full
1680 2011-10-06 Robert Dewar <dewar@adacore.com>
1682 * a-ciorse.adb, a-cihase.adb, a-cihase.ads, a-coorse.adb,
1683 a-cborse.adb, a-comutr.adb, a-ciorma.adb, a-cbmutr.adb,
1684 a-cbmutr.ads, a-cbhase.adb, a-cbhase.ads: Minor reformatting and code
1685 reorganization (use conditional expressions).
1687 2011-10-06 Robert Dewar <dewar@adacore.com>
1689 * sem_res.adb (Resolve_Arithmetic_Op): Fix bad warning for
1690 floating divide by zero.
1692 2011-10-06 Ed Schonberg <schonberg@adacore.com>
1694 * sem_ch6.adb: Limited interfaces that are not immutably limited
1695 are OK in return statements.
1697 2011-09-30 Iain Sandoe <iains@gcc.gnu.org>
1699 * gcc-interface/Makefile.in (Darwin): Partial reversion of previous
1700 change to powerpc section.
1702 2011-09-29 Iain Sandoe <iains@gcc.gnu.org>
1704 * gcc-interface/Makefile.in (Darwin): Factor LIBGNAT_TARGET_PAIRS
1707 2011-09-27 Ed Schonberg <schonberg@adacore.com>
1709 * a-cbhase.adb, a-cbhase.ads, a-cborse.adb, a-cborse.ads,
1710 a-cihase.adb, a-cihase.ads, a-ciorse.adb, a-ciorse.ads,
1711 a-coorse.adb, a-coorse.ads: Add iterator machinery to bounded sets and
1713 * a-coorma.ads: Minor reformmating.
1714 * einfo.ads: Improve the comment describing the
1715 Directly_Designated_Type function.
1716 * a-ciorma.adb, a-ciorma.ads: Add iterator machinery to indefinite
1718 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
1721 2011-09-27 Robert Dewar <dewar@adacore.com>
1723 * a-comutr.ads: Minor reformatting.
1725 2011-09-27 Ed Schonberg <schonberg@adacore.com>
1727 * a-cimutr.adb, a-cimutr.ads, a-cbmutr.adb, a-cbmutr.ads: Add children
1728 iterators to multiway trees.
1730 2011-09-27 Yannick Moy <moy@adacore.com>
1732 * debug.adb (d.D): New option for strict Alfa mode.
1733 * opt.ads (Strict_Alfa_Mode): New flag to interpret compiler
1734 permissions as strictly as possible.
1735 * sem_ch3.adb (Signed_Integer_Type_Declaration): In non-strict
1736 Alfa mode, now, interpret ranges of base types like GNAT does; in
1737 strict mode, simply change the range of the implicit base Itype.
1738 * gnat1drv.adb: Update comments. Set Strict_Alfa_Mode.
1740 2011-09-27 Robert Dewar <dewar@adacore.com>
1742 * exp_ch9.adb: Minor comment fixes.
1744 2011-09-27 Ed Schonberg <schonberg@adacore.com>
1746 * a-comutr.adb, a-comutr.ads: Add children iterators on multiway
1749 2011-09-27 Eric Botcazou <ebotcazou@adacore.com>
1751 * checks.adb (Apply_Scalar_Range_Check): Use Designated_Type
1752 instead of Directly_Designated_Type in the indirect array case.
1754 2011-09-27 Robert Dewar <dewar@adacore.com>
1756 * exp_util.adb, exp_aggr.adb: Minor reformatting.
1758 2011-09-27 Ed Schonberg <schonberg@adacore.com>
1760 * sinfo.ads, par-ch3.adb: Minor comment update: aspect specification
1761 on subtype declarations.
1762 * exp_aggr.adb: Minor comment update.
1764 2011-09-27 Eric Botcazou <ebotcazou@adacore.com>
1766 * exp_util.adb (Safe_Prefixed_Reference): Remove always-false
1767 test in the N_Explicit_Dereference case. Fold double logical
1768 negation in the special loop case and conditionalize it on
1769 Variable_Ref being true.
1771 2011-09-27 Ed Schonberg <schonberg@adacore.com>
1773 * sem_ch4.adb (Analyze_Selected_Component): If the prefix is a
1774 single protected object and the selector is a discriminant or an
1775 entry family, this is a non-overloaded candidate interpretation,
1776 and possible primitive operations of the type must not be
1779 2011-09-27 Arnaud Charlet <charlet@adacore.com>
1781 * s-taspri-posix-noaltstack.ads (Lock): Mark fields aliased.
1783 2011-09-27 Pascal Obry <obry@adacore.com>
1785 * s-osinte-hpux.ads, s-osinte-aix.ads, s-osinte-solaris-posix.ads,
1786 s-osinte-irix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads:
1787 Add dummy definitions for pthread_rwlock_t
1788 and pthread_rwlockattr_t on all POSIX platforms.
1789 * s-taprop-irix.adb, s-taprop-posix.adb (Initialize_Lock): Fix lock
1791 (Finalize_Lock): Likewise.
1792 (Write_Lock): Likewise.
1795 2011-09-27 Tristan Gingold <gingold@adacore.com>
1797 * s-tassta.adb (Task_Wrapper): Increase Guard_Page_Size value for
1800 2011-09-27 Pascal Obry <obry@adacore.com>
1802 * s-osinte-hpux.ads, s-taprop-vxworks.adb, s-taspri-vxworks.ads,
1803 s-taprop-tru64.adb, s-osinte-aix.ads, s-taspri-posix-noaltstack.ads,
1804 s-taspri-mingw.ads, s-taprop-vms.adb, s-tpoben.adb, s-tpoben.ads,
1805 s-taprop-mingw.adb, s-taprob.adb, s-taprob.ads,
1806 s-osinte-solaris-posix.ads, s-taprop-solaris.adb, s-taspri-solaris.ads,
1807 s-osinte-irix.ads, s-taprop-irix.adb, s-osinte-darwin.ads,
1808 s-taspri-dummy.ads, s-taspri-posix.ads, s-taprop.ads,
1809 s-taspri-vms.ads, s-osinte-freebsd.ads, s-taprop-hpux-dce.adb,
1810 s-taspri-hpux-dce.ads, s-taspri-tru64.ads, s-taprop-dummy.adb,
1811 s-taprop-posix.adb: Revert previous changes.
1812 (Lock): Now a record containing the two possible lock
1813 (mutex and read/write) defined in OS_Interface.
1814 * s-taprop-linux.adb (Finalize_Protection): Use r/w lock for
1816 (Initialize_Protection): Likewise.
1818 (Lock_Read_Only): Likewise.
1821 2011-09-27 Pascal Obry <obry@adacore.com>
1823 * s-taspri-posix-noaltstack.ads (RW_Lock): This type is now defined as
1824 OS_Interface.pthread_rwlock_t.
1826 2011-09-27 Robert Dewar <dewar@adacore.com>
1828 * exp_ch9.adb, a-cimutr.adb, a-cimutr.ads, gnat1drv.adb, a-comutr.adb,
1829 a-comutr.ads, exp_dist.adb, a-cbmutr.adb, a-cbmutr.ads,
1830 sem_ch5.adb, sem_util.adb: Minor reformatting.
1832 2011-09-27 Pascal Obry <obry@adacore.com>
1834 * s-taprop.ads (Initialize_Lock)[RW_Lock]: New spec for r/w lock.
1835 (Finalize_Lock)[RW_Lock]: Likewise.
1836 (Write_Lock)[RW_Lock]: Likewise.
1837 (Unlock)[RW_Lock]: Likewise.
1838 (Read_Lock): Define L as RW_Lock (instead of Lock).
1839 * s-taprop-linux.adb (Initialize_Lock)[RW_Lock]: New
1840 routine for r/w lock.
1841 (Finalize_Lock)[RW_Lock]: Likewise.
1842 (Write_Lock)[RW_Lock]: Likewise.
1843 (Unlock)[RW_Lock]: Likewise.
1844 (Read_Lock): Define L as RW_Lock (instead of Lock).
1846 * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
1847 s-taprop-mingw.adb, s-taprop-solaris.adb, s-taprop-irix.adb,
1848 s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
1849 (Initialize_Lock)[RW_Lock]: Same implementation as corresponding
1850 routine for standard lock.
1851 (Finalize_Lock)[RW_Lock]: Likewise.
1852 (Write_Lock)[RW_Lock]: Likewise.
1853 (Unlock)[RW_Lock]: Likewise.
1854 (Read_Lock): Define L as RW_Lock (instead of Lock).
1855 * s-taprob.ads, s-tpoben.ads (Protection): Add RWL (RW_Lock)
1856 in the record definition.
1857 * s-taprob.adb, s-taproben.adb (Finalize_Protection): Use r/w
1858 lock for 'R' locking policy.
1859 (Initialize_Protection): Likewise.
1861 (Lock_Read_Only): Likewise.
1863 * s-taspri-posix.ads (RW_Lock): New type defined as
1864 OS_Interface.pthread_rwlock_t.
1866 * s-taspri-vxworks.ads, s-taspri-posix-noaltstack.ads,
1867 s-taspri-mingw.ads, s-taspri-solaris.ads, s-taspri-dummy.ads,
1868 s-taspri-posix.ads, s-taspri-vms.ads, s-taspri-hpux-dce.ads,
1869 s-taspri-tru64.ads (RW_Lock): New type defined as alias to Lock.
1871 2011-09-27 Pascal Obry <obry@adacore.com>
1873 * exp_ch9.adb, s-taspri-posix.ads: Minor reformatting.
1875 2011-09-27 Pascal Obry <obry@adacore.com>
1877 * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
1878 s-osinte-hpux.ads, s-osinte-irix.ads,
1879 s-osinte-solaris-posix.ads (pthread_rwlock_t): New definition alias of
1881 (pthread_rwlockattr_t): New definition alias of pthread_mutexattr_t.
1882 * s-osinte-linux.ads (pthread_rwlock_t, pthread_rwlockattr_t,
1883 pthread_rwlockattr_init, pthread_rwlockattr_destroy,
1884 pthread_rwlockattr_setkind_np, pthread_rwlock_init,
1885 pthread_rwlock_destroy, pthread_rwlock_rdlock,
1886 pthread_rwlock_wrlock, pthread_rwlock_unlock): New.
1888 2011-09-27 Pascal Obry <obry@adacore.com>
1890 * rtsfind.ads: Add RE_Lock_Read_Only into rtsfind circuitry.
1891 (RE_Id): Add RE_Lock_Read_Only.
1892 (RE_Unit_Table): Likewise.
1893 * sem_prag.adb (Process_Convention): Change Pragma_Locking_Policy
1894 to lift restriction on first character. Handle now the
1895 Name_Concurrent_Readers_Locking where policy character is set to
1897 * snames.ads-tmpl (Name_Concurrent_Readers_Locking): New
1899 * exp_ch9.adb (Build_Protected_Subprogram_Body): Generate a
1900 read only lock for function in protected object.
1901 * s-taprob.ads (Lock_Read_Only): Remove obsolete comment as
1902 this routine is now used.
1904 2011-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1906 * s-atocou-x86.adb (Decrement): Use %;.
1907 (Increment): Likewise.
1909 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
1911 * gcc-interface/utils2.c (build_allocator): Set TREE_THIS_NOTRAP on the
1912 dereference of the pointer to the storage area. Remove useless type
1913 conversions and factor out common code.
1915 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
1917 * gcc-interface/utils.c (maybe_unconstrained_array): Declare TYPE local
1918 variable and use it throughout.
1919 <UNCONSTRAINED_ARRAY_TYPE>: Add 'break' at the end.
1920 <RECORD_TYPE>: Do not unconditionally convert to the unpadded type as a
1921 first step. Also convert to the unpadded type as a last step.
1923 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
1925 * gcc-interface/gigi.h (create_subprog_decl): Replace TREE_CHAIN with
1926 DECL_CHAIN in comment.
1927 * gcc-interface/trans.c (gigi): Likewise.
1928 (Attribute_to_gnu): Likewise.
1929 (build_function_stub): Likewise.
1930 (gnat_to_gnu): Likewise.
1931 * gcc-interface/utils.c (create_subprog_decl): Likewise.
1932 (convert_vms_descriptor64): Likewise.
1933 (convert_vms_descriptor32): Likewise.
1935 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
1937 * gcc-interface/trans.c (assoc_to_constructor): Minor tweaks.
1938 * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting
1939 issues. Use COMPLETE_TYPE_P in assertion. Also set TREE_READONLY if
1940 the type of the record is TYPE_READONLY.
1942 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
1943 Robert Dewar <dewar@adacore.com>
1945 * sem_ch6.adb (Set_Formal_Mode): Set Can_Never_Be_Null on an IN or IN
1946 OUT formal parameter which is of an null-exclusion access subtype.
1948 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
1950 * gcc-interface/ada-tree.h (DECL_CAN_NEVER_BE_NULL_P): New macro.
1951 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Set the flag.
1952 (gnat_to_gnu_param): Likewise.
1953 * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Invoke
1954 maybe_unconstrained_array instead of doing the work manually.
1955 (maybe_unconstrained_array): Propagate the TREE_THIS_NOTRAP flag.
1956 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: If operand
1957 is a DECL with the flag, set TREE_THIS_NOTRAP on the reference.
1958 (gnat_stabilize_reference_1): Propagate the TREE_THIS_NOTRAP flag.
1959 (gnat_stabilize_reference): Likewise.
1961 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
1963 * gcc-interface/ada-tree.h (TYPE_NULL_BOUNDS): New macro.
1964 (SET_TYPE_NULL_BOUNDS): Likewise.
1965 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Set again
1966 TREE_THIS_NOTRAP on the INDIRECT_REF node built for the template.
1967 * gcc-interface/trans.c (Identifier_to_gnu): Return initializers of fat
1969 * gcc-interface/utils.c (create_var_decl_1): If the object is external,
1970 check that the initializer is a valid constant expression for use in
1971 initializing a static variable. Add missing guard.
1972 (update_pointer_to): Adjust TYPE_NULL_BOUNDS if set.
1973 (convert_to_fat_pointer): In the null fat pointer case, build a valid
1974 pointer for the bounds.
1975 * gcc-interface/utils2.c (compare_fat_pointers): New function.
1976 (build_binary_op) <EQ_EXPR>: Call it to compare fat pointers.
1978 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
1980 * gcc-interface/ada-tree.h (TREE_THIS_NOTRAP): Redefine.
1981 * gcc-interface/trans.c (Identifier_to_gnu): Factor out common code in
1982 the by-ref case. Do not set TREE_READONLY on a renamed object. Set
1983 TREE_THIS_NOTRAP on UNCONSTRAINED_ARRAY_REF nodes.
1984 (Attribute_to_gnu) <Attr_Length>: Expand the use of the parameter cache
1985 to the indirect case.
1986 * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Preserve
1987 the TREE_THIS_NOTRAP flag.
1989 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
1991 * gcc-interface/trans.c (Loop_Statement_to_gnu): In the case of an
1992 iteration scheme, always generate the do-while form if optimization
1993 is enabled. Use more straightforward test at the end.
1995 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
1997 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Subtype>: Use
1998 XNEW instead of xmalloc. Do not build useless pointer type.
1999 <E_Anonymous_Access_Subprogram_Type>: Use XNEW instead of xmalloc.
2000 * gcc-interface/trans.c (gnat_to_gnu) <N_Raise_Constraint_Error>: Tidy.
2001 * gcc-interface/utils2.c (build_unary_op): Remove local variable.
2003 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
2005 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not promote
2006 the alignment if this doesn't prevent BLKmode access to the object.
2008 2011-09-24 Iain Sandoe <iains@gcc.gnu.org>
2010 * gcc-interface/Makefile.in (darwin): Do not issue the
2011 '-flat_namespace' linker flag during Ada build.
2012 * mlib-tgt-specific-darwin.adb: Remove '-flat_namespace' flag from the
2013 default shared library options.
2015 2011-09-19 Alexandre Oliva <aoliva@redhat.com>
2017 * gcc-interface/decl.c (annotate_value): Look up expression for
2018 insertion in the cache at the end.
2020 2011-09-19 Arnaud Charlet <charlet@adacore.com>
2022 * gcc-interface/Make-lang.in: Update dependencies.
2024 2011-09-19 Steve Baird <baird@adacore.com>
2026 * snames.ads-tmpl: Move declaration of Name_Annotate into range of
2027 configuration pragma names so that Is_Configuration_Pragma_Name
2028 will return True for Name_Annotate. Make corresponding change in
2029 Pragma_Id enumeration type. This is needed to allow an Annotate
2030 pragma to occur in a configuration pragma file (typically,
2032 * gnat_ugn.texi: Add Annotate to the list of configuration pragmas.
2033 * gnat_rm.texi: Note that pragma Annotate may be used as a
2034 configuration pragma.
2036 2011-09-19 Ed Schonberg <schonberg@adacore.com>
2038 * a-cbmutr.adb, a-cbmutr.ads, a-cimutr.adb, a-cimutr.ads,
2039 a-comutr.adb, a-comutr.ads: Add iterator machinery for multiway trees.
2041 2011-09-19 Yannick Moy <moy@adacore.com>
2043 * exp_alfa.adb, exp_alfa.ads (Expand_Alfa_N_In): New function
2044 for expansion of set membership.
2045 (Expand_Alfa): Call expansion for N_In and N_Not_In nodes.
2046 * exp_ch4.adb, exp_ch4.ads (Expand_Set_Membership): Make procedure
2047 visible for use in Alfa expansion.
2048 * sem_ch5.adb (Analyze_Iterator_Specification): Introduce loop
2049 variable in Alfa mode.
2051 2011-09-19 Thomas Quinot <quinot@adacore.com>
2053 * s-osinte-darwin.ads: Change SIGADAABRT on Darwin to SIGABRT.
2055 2011-09-19 Thomas Quinot <quinot@adacore.com>
2057 * exp_ch9.adb: Minor reformatting.
2059 2011-09-19 Hristian Kirtchev <kirtchev@adacore.com>
2061 * freeze.adb (Build_Renamed_Body): Generic subprograms
2062 instantiations cannot be poperly inlined by the compiler, do
2063 not set the Body_To_Inline attribute in such cases.
2064 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Inherit all
2065 inlining-related flags from the generic subprogram declaration.
2067 2011-09-19 Thomas Quinot <quinot@adacore.com>
2069 * exp_dist.adb, rtsfind.ads, sem_util.adb, sem_util.ads
2070 (Build_Stub_Type): Remove, instead copy components from
2071 System.Partition_Interface.RACW_Stub_Type.
2072 (RPC_Receiver_Decl): Remainder of code from old Build_Stub_Type routine.
2073 (Copy_Component_List): New subprogram.
2075 2011-09-19 Yannick Moy <moy@adacore.com>
2077 * lib-xref.adb (Generate_Reference): Ignore references to
2078 constants in Standard.
2080 2011-09-19 Robert Dewar <dewar@adacore.com>
2082 * err_vars.ads, errout.ads: Minor reformatting.
2084 2011-09-19 Robert Dewar <dewar@adacore.com>
2086 * aspects.ads (Impl_Defined_Aspects): New array
2087 * lib-writ.adb (No_Dependences): New name for No_Dependence
2088 * restrict.adb (No_Dependences): New name for No_Dependence
2089 (Check_Restriction_No_Specification_Of_Aspect): New
2091 (Set_Restriction_No_Specification_Of_Aspect): New procedure
2092 (Restricted_Profile_Result): New variable
2093 (No_Specification_Of_Aspects): New variable
2094 (No_Specification_Of_Aspect_Warning): New variable
2095 * restrict.ads (No_Dependences): New name for No_Dependence
2096 (Check_Restriction_No_Specification_Of_Aspect): New procedure
2097 (Set_Restriction_No_Specification_Of_Aspect): New procedure
2098 * s-rident.ads: Add restriction
2099 No_Implementation_Aspect_Specifications, this is also added to
2100 the No_Implementation_Extensions profile.
2101 * sem_ch13.adb (Analyze_Aspect_Specifications): Check
2102 No_Implementation_Defined_Aspects
2103 (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
2104 * sem_prag.adb (Analyze_Aspect_Specifications): Check
2105 No_Implementation_Aspects
2106 (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
2107 * snames.ads-tmpl (Name_No_Specification_Of_Aspect): New name
2109 2011-09-19 Yannick Moy <moy@adacore.com>
2111 * lib-xref.adb (Generate_Reference): Take into account multiple
2112 renamings for Alfa refs.
2114 2011-09-19 Thomas Quinot <quinot@adacore.com>
2116 * g-socthi-mingw.adb: Minor reformatting.
2118 2011-09-19 Yannick Moy <moy@adacore.com>
2120 * gnat1drv.adb (Adjust_Global_Switches): Set tagged type
2121 expansion to False in mode Alfa
2123 2011-09-19 Pascal Obry <obry@adacore.com>
2125 * mingw32.h: Remove obsolete code needed for old versions
2128 2011-09-19 Robert Dewar <dewar@adacore.com>
2130 * errout.ads: Minor reformatting.
2132 2011-09-19 Ed Schonberg <schonberg@adacore.com>
2134 * sem_ch6.adb (Analyze_Expression_Function): When the expression
2135 function is transformed into a declaration and a body, insert
2136 body at the end of the declarative part, to prevent premature
2137 freeze actions, and preserve original specification in the
2138 subprogram declaration.
2140 2011-09-19 Vincent Celier <celier@adacore.com>
2142 * projects.texi: Minor editing.
2144 2011-09-19 Robert Dewar <dewar@adacore.com>
2146 * sem_aggr.adb, lib-writ.ads, s-restri.ads, sem_ch6.adb,
2147 exp_aggr.adb: Minor reformatting.
2149 2011-09-19 Yannick Moy <moy@adacore.com>
2151 * lib-xref.adb (Generate_Reference): Change entity referenced
2152 to underlying object if any, or else reference to the HEAP.
2154 2011-09-15 Arnaud Charlet <charlet@adacore.com>
2156 * gcc-interface/Make-lang.in: Update dependencies.
2158 2011-09-15 Robert Dewar <dewar@adacore.com>
2160 * tree_io.ads: Minor reformatting.
2161 * a-intnam.ads: Fix bad header.
2163 2011-09-15 Thomas Quinot <quinot@adacore.com>
2165 * a-exexpr-gcc.adb: Minor reformatting.
2167 2011-09-15 Yannick Moy <moy@adacore.com>
2169 * sem_ch6.adb: Propagate information that an expression function comes
2170 from source (otherwise references to this entity are not stored).
2172 2011-09-15 Robert Dewar <dewar@adacore.com>
2174 * a-cdlili.adb, a-coinve.adb, a-stzunb-shared.ads, a-suezst.adb,
2175 a-suenco.adb, a-stwiun-shared.ads, a-cobove.adb, a-convec.adb,
2176 a-btgbso.adb, a-cbdlli.adb, a-suewst.adb: Minor reformatting.
2178 2011-09-15 Ed Schonberg <schonberg@adacore.com>
2180 * sem_ch6.adb (Analyze_Expression_Function): Code cleanup:
2181 if the expression function is not a completion, create a
2182 new specification for the generated declaration, and keep the
2183 original specification in the generated body. Shorter code also
2184 ensures that proper warnings are generated for unused formals
2187 2011-09-15 Sergey Rybin <rybin@adacore.com>
2189 * tree_io.ads: Update ASIS_Version_Number because of the changes
2190 in the tree structures for expression functions.
2192 2011-09-15 Arnaud Charlet <charlet@adacore.com>
2194 * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
2195 s-osinte-hpux.ads, s-osinte-lynxos.ads, s-osinte-solaris-posix.ads,
2196 s-taprop-posix.adb (CLOCK_MONOTONIC): New constant.
2197 (CLOCK_REALTIME): Fix wrong value on some OSes.
2198 * s-taprop-posix.adb (Monotonic_Clock): Use CLOCK_MONOTONIC.
2200 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
2202 * gcc-interface/utils.c (maybe_unconstrained_array): In the reference
2203 to unconstrained array case, deal with each branch of a COND_EXPR.
2204 * gcc-interface/utils2.c (build_allocator): Deal with each branch of
2205 a COND_EXPR in the initializer, if present.
2207 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
2209 * gcc-interface/decl.c (maybe_pad_type): Do not try to change the form
2210 of an addressable type.
2211 * gcc-interface/trans.c (gnat_gimplify_expr) <VIEW_CONVERT_EXPR>: New.
2212 Deal with those cases for which creating a temporary is mandatory.
2214 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
2216 * gcc-interface/trans.c (call_to_gnu): Use local variable. Make sure
2217 this is a real formal parameter before testing whether it is by ref.
2219 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
2221 * gcc-interface/gigi.h (build_call_0_expr): Delete.
2222 (build_call_1_expr): Likewise.
2223 (build_call_2_expr): Likewise.
2224 (build_call_n_expr): New prototype.
2225 * gcc-interface/decl.c (gnat_to_gnu_entity): Use build_call_n_expr.
2226 * gcc-interface/trans.c (establish_gnat_vms_condition_handler): Ditto.
2227 (Handled_Sequence_Of_Statements_to_gnu): Likewise.
2228 (Exception_Handler_to_gnu_zcx): Likewise.
2229 (gnat_to_gnu): Likewise.
2230 (build_binary_op_trapv): Likewise.
2231 * gcc-interface/utils2.c (build_call_0_expr): Delete.
2232 (build_call_1_expr): Likewise.
2233 (build_call_2_expr): Likewise.
2234 (build_call_n_expr): New function.
2235 (build_call_raise): Use build_call_n_expr.
2236 (build_call_raise_range): Likewise.
2237 (build_call_raise_column): Likewise.
2238 (build_call_alloc_dealloc_proc): Likewise.
2239 (maybe_wrap_malloc): Likewise.
2240 (maybe_wrap_free): Likewise.
2242 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
2244 * gcc-interface/trans.c (build_return_expr): Use void_type_node for
2246 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Assert that
2247 the result type is null if ENABLE_CHECKING. Set operation_type at the
2248 end unconditionally if not set in the previous cases.
2249 Use build2 and void_type_node for MODIFY_EXPR.
2250 (build_allocator): Use NULL_TREE for MODIFY_EXPR.
2252 2011-09-08 Eric Botcazou <ebotcazou@adacore.com>
2254 * gcc-interface/utils.c (unchecked_convert): Use a field of the right
2255 precision when converting to or from an integral type whose precision
2256 is not equal to its size.
2258 2011-09-08 Iain Sandoe <iains@gcc.gnu.org>
2260 * traceback.c (Darwin) USE_GCC_UNWINDER for Darwin versions >= 8.
2262 2011-09-07 Iain Sandoe <iains@gcc.gnu.org>
2264 * gcc-interface/Makefile.in (darwin): Provide powerpc64 system
2266 * system-darwin-ppc64.ads: New file.
2268 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
2270 * gcc-interface/Makefile.in (gnatlib-shared-darwin): Remove
2273 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
2275 * gcc-interface/Makefile.in (darwin, SO_OPTS): Provide architecture
2276 size switches to the link phase for shared libs.
2278 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
2280 * gcc-interface/Makefile.in (x86_64 darwin arch): Adjust
2281 LIBGNAT_TARGET_PAIRS for x86 and x86_64 variants.
2283 2011-09-06 Arnaud Charlet <charlet@adacore.com>
2285 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in
2286 (gnattools, regnattools, cross-gnattools, canadian-gnattools,
2287 gnatlib, gnatlib-sjlj, gnatlib-zcx, gnatlib-shared, gnatlib_and_tools):
2289 (TOOLS_FLAGS_TO_PASS): New.
2290 (../stamp-tools): Reintroduce, to avoid merge conflicts.
2292 2011-09-06 Robert Dewar <dewar@adacore.com>
2294 * sem_ch10.adb, impunit.ads, impunit.adb (Not_Impl_Defined_Unit): New
2295 name for Is_RM_Defined_Unit. Also several fixes to this unit.
2297 2011-09-06 Robert Dewar <dewar@adacore.com>
2299 * impunit.ads, impunit.adb (Is_RM_Defined_Unit): New function.
2300 * s-rident.ads: New restriction No_Implementation_Units
2301 (this restriction is also part of the profile
2302 No_Implementation_Extensions)
2303 * sem_ch10.adb (Analyze_With_Clause): Add check for
2304 No_Implementation_Units restriction.
2306 2011-09-06 Jerome Guitton <guitton@adacore.com>
2308 * sysdep.c (__gnat_get_task_options): Disable VX_SPE_TASK
2311 2011-09-06 Thomas Quinot <quinot@adacore.com>
2313 * s-solita.adb: Minor reformatting.
2315 2011-09-06 Ed Schonberg <schonberg@adacore.com>
2317 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The body that
2318 is a rewriting of an expression function does not freeze previous
2321 2011-09-06 Robert Dewar <dewar@adacore.com>
2323 * impunit.adb (Is_Known_Unit): Fix bad handling of Ada 2012 case
2325 2011-09-06 Tristan Gingold <gingold@adacore.com>
2327 * gcc-interface/Makefile.in: Handle e500v2-wrs-vxworksae like
2328 powerpc-wrs-vxworksae.
2330 2011-09-06 Thomas Quinot <quinot@adacore.com>
2332 * s-os_lib.ads (Spawn): Minor documentation clarification,
2333 Success is True for a zero exit status.
2335 2011-09-06 Ed Schonberg <schonberg@adacore.com>
2337 * sem_ch5.adb: Add message for common iterator error.
2339 2011-09-06 Ed Schonberg <schonberg@adacore.com>
2341 * exp_ch3.adb (Build_Initialization_Call): If the target is a
2342 selected component discriminated by a current instance, replace
2343 the constraint with a reference to the target object, regardless
2344 of whether the context is an init_proc.
2346 2011-09-06 Robert Dewar <dewar@adacore.com>
2348 * exp_attr.adb: Descriptor_Size is never static.
2350 2011-09-06 Robert Dewar <dewar@adacore.com>
2352 * gnat_ugn.texi: Add documentation for LSLOC metric in gnatmetric
2354 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2356 * gnat_rm.texi: Clarify that attribute Descriptor_Size is
2359 2011-09-06 Ed Schonberg <schonberg@adacore.com>
2361 * sem_res.adb (Resolve): An expression that is the body of an
2362 expression function does not freeze.
2364 2011-09-06 Matthew Heaney <heaney@adacore.com>
2366 * a-csquin.ads, a-cusyqu.adb, a-cbprqu.adb, a-cbsyqu.adb,
2367 a-cuprqu.adb: Changed copyright notice to indicate current
2370 2011-09-06 Vincent Celier <celier@adacore.com>
2372 * prj.adb: Minor spelling error fix in comment
2373 * sem_res.adb: Minor reformatting
2375 2011-09-06 Pascal Obry <obry@adacore.com>
2377 * sysdep.c (winflush_nt): Removed as not needed anymore.
2378 (winflush_95): Likewise.
2379 (winflush_init): Likewise.
2380 (winflush_function): Likewise.
2381 (getc_immediate_common): Remove call to winflush_function.
2383 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2385 * exp_attr.adb (Expand_N_Attribute_Reference): Rewrite the
2386 processing for Descriptor_Size.
2387 * gnat_rm.texi: Rephrase the wording for attribute Descriptor_Size
2388 to account for its broader usage.
2389 * sem_attr.adb (Analyze_Attribute): Change the error detection
2390 circuitry for Descriptor_Size as the attribute is now applicable
2393 2011-09-06 Robert Dewar <dewar@adacore.com>
2395 * sem_attr.adb, prj-nmsc.adb, exp_aggr.adb: Minor reformatting.
2397 2011-09-06 Ed Schonberg <schonberg@adacore.com>
2399 * lib-xref.adb (OK_To_Set_Referenced): A reference to a formal
2400 in a parameter association must not set the Referenced flag on
2402 * prj-nmsc.adb (Check_File_Naming_Schemes): Remove useless formal
2404 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2406 * gnat_rm.texi: Add a section on attribute Descriptor_Size
2408 2011-09-06 Arnaud Charlet <charlet@adacore.com>
2410 * gcc-interface/Makefile.in (common-tools, gnatmake-re,
2411 gnatlink-re): Speed up by using -j0.
2413 2011-09-06 Yannick Moy <moy@adacore.com>
2415 * sem_ch13.adb (Analyze_Aspect_Specifications): Call
2416 Set_Corresponding_Aspect when creating pragma from aspect.
2417 (Add_Predicates): Use new field Corresponding_Aspect.
2418 * sem_prag.adb (Analyze_Pragma): Make Pname hold source aspect
2419 name when present, for the purpose of issuing error messages;
2420 remove local procedure Error_Pragma_Arg_Alternate_Name.
2421 * sinfo.adb, sinfo.ads (Corresponding_Aspect): New field in
2423 (From_Dynamic_Predicate, From_Static_Predicate): Remove fields from
2426 2011-09-06 Robert Dewar <dewar@adacore.com>
2428 * checks.adb, s-except.ads, g-socket.adb: Minor reformatting.
2430 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2432 * exp_ch6.adb (Build_Heap_Allocator): Add new
2433 local variable Desig_Typ. Code and comment reformatting. Add
2434 machinery to ensure that the allocation uses a fat pointer when
2435 the type of the return object is a constrained array and the
2436 function return type is an unconstrained array.
2438 2011-09-06 Vincent Celier <celier@adacore.com>
2440 * make.adb, prj-part.adb, prj-nmsc.adb: Remove unused formal
2441 parameters in subprograms.
2443 2011-09-06 Arnaud Charlet <charlet@adacore.com>
2445 * s-taprop-mingw.adb (Finalize_TCB): Fix typo.
2447 2011-09-06 Thomas Quinot <quinot@adacore.com>
2449 * s-taprop-vxworks.adb, s-tpoaal.adb, s-tpopsp-vxworks.adb
2450 (System.Tasking.Primitive_Operations.Specific.Delete): Remove
2452 (System.Tasking.Primitive_Operations.Specific.Set): If argument
2453 is null, destroy task specific data, to make API consistent with
2454 other platforms, and thus compatible with the shared version
2456 (System.Tasking.Primitive_Operations.ATCB_Allocation.Free_ATCB):
2457 Document the above assumption.
2459 2011-09-06 Ed Schonberg <schonberg@adacore.com>
2461 * exp_ch6.adb (Expand_Inlined_Call): Fix use of uninitialized
2462 variable for type of return value when return type is
2463 unconstrained and context is an assignment.
2465 2011-09-06 Ed Schonberg <schonberg@adacore.com>
2467 * sem_ch8.adb (Check_Class_Wide_Actual): Do not generate body of
2468 class-wide operation if expansion is not enabled.
2470 2011-09-06 Eric Botcazou <ebotcazou@adacore.com>
2472 * checks.adb (Apply_Scalar_Range_Check): Deal with access
2475 2011-09-06 Yannick Moy <moy@adacore.com>
2477 * sem_ch13.adb (Analyze_Aspect_Specifications, case
2478 Aspect_Invariant): Do not issue error at this point on illegal
2479 pragma placement, as this is checked later on when analyzing
2480 the corresponding pragma.
2481 * sem_prag.adb (Error_Pragma_Arg_Alternate_Name): New procedure
2482 similar to Error_Pragma_Arg, except the source name of the
2483 aspect/pragma to use in warnings may be equal to parameter
2484 Alt_Name (Analyze_Pragma, case Pragma_Invariant): refine error
2485 message to distinguish source name of pragma/aspect, and whether
2486 the illegality resides in the type being public, or being private
2487 without a public declaration
2489 2011-09-06 Thomas Quinot <quinot@adacore.com>
2491 * g-socket.adb (Check_For_Fd_Set): On Windows, no need for bitmap
2492 size check (fd_set is implemented differently on that platform).
2494 2011-09-06 Thomas Quinot <quinot@adacore.com>
2496 * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
2497 s-tpoaal.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
2498 s-taprop-solaris.adb, s-taprop-irix.adb, s-taprop.ads,
2499 s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
2500 (ATCB_Allocation): New subpackage of
2501 System.Tasking.Primitive_Operations, shared across all targets
2502 with full tasking runtime.
2503 (ATCB_Allocation.New_ATCB): Moved there (from target specific
2505 (ATCB_Allocation.Free_ATCB): New subprogram. Deallocate an ATCB,
2506 taking care of establishing a local temporary ATCB if the one
2507 being deallocated is Self, to avoid a reference to the freed
2508 ATCB in Abort_Undefer.
2510 2011-09-06 Thomas Quinot <quinot@adacore.com>
2512 * s-tassta.adb, s-taskin.ads (Free_Task): If the task is not
2513 terminated, mark it for deallocation upon termination.
2514 (Terminate_Task): Call Free_Task again if the task is marked
2515 for automatic deallocation upon termination.
2517 2011-09-06 Robert Dewar <dewar@adacore.com>
2519 * a-cbprqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cusyqu.ads,
2520 a-intnam-aix.ads, a-intnam-darwin.ads, a-intnam-dummy.ads,
2521 a-intnam-freebsd.ads, a-intnam-hpux.ads, a-intnam-irix.ads,
2522 a-intnam-linux.ads, a-intnam-lynxos.ads, a-intnam-mingw.ads,
2523 a-intnam-solaris.ads, a-intnam-tru64.ads,
2524 a-intnam-vms.ads, a-intnam-vxworks.ads, a-intnam.ads, interfac.ads,
2525 cstand.adb, s-maccod.ads: Mark all entities as Implementation_Defined
2526 * einfo.ads, einfo.adb (Is_Implementation_Defined): New flag
2527 * par-prag.adb: Add dummy entry for pragma Implementation_Defined
2528 * s-rident.ads: Add new restriction No_Implementation_Identifiers
2529 Add new profile No_Implementation_Extensions
2530 * sem_prag.adb: Implement pragma Implementation_Defined Implement
2531 profile No_Implementation_Extensions
2532 * sem_util.adb: Minor reformatting (Set_Entity_With_Style_Check):
2533 Check violation of restriction No_Implementation_Identifiers
2534 * snames.ads-tmpl: Add entries for pragma Implementation_Defined
2535 Add entry for Name_No_Implementation_Extensions
2537 2011-09-06 Robert Dewar <dewar@adacore.com>
2539 * impunit.ads: Minor reformatting.
2541 2011-09-06 Robert Dewar <dewar@adacore.com>
2543 * ali.adb, sem_ch13.adb, lib-xref.adb: Minor reformatting.
2545 2011-09-06 Pascal Obry <obry@adacore.com>
2547 * s-osinte-linux.ads, s-oscons-tmplt.c: Use oscons to define sigset_t
2550 2011-09-06 Robert Dewar <dewar@adacore.com>
2552 * g-socket.adb: Minor reformatting
2554 2011-09-06 Javier Miranda <miranda@adacore.com>
2556 * ali.adb (Scan_ALI): Add missing support to load references of
2557 entities imported from other languages.
2558 * ali.ads (Xref_Record): Adding new fields to store the language and
2559 name of an imported entity.
2560 * lib-xref.adb (Output_Import_Export_Info): Fix typo
2563 2011-09-06 Ed Schonberg <schonberg@adacore.com>
2565 * sem_prag.adb (Analyze_Pragma, case Type_Invariant): A type invariant
2566 is allowed on a full type declaration if it is the completion of
2567 a private declarations.
2568 * sem_ch13.adb (Analyze_Aspect_Specifications): An invariant
2569 aspect is allowed on a full type declaration in the private part
2572 2011-09-06 Robert Dewar <dewar@adacore.com>
2574 * sem_ch8.ads: Minor reformatting
2576 2011-09-06 Thomas Quinot <quinot@adacore.com>
2578 * s-oscons-tmplt.c, g-socket.adb (GNAT.Sockets.Clear,Set,Is_Set):
2579 Guard against socket values that are not in [0;FD_SETSIZE[
2581 2011-09-06 Robert Dewar <dewar@adacore.com>
2583 * s-osinte-linux.ads, a-iteint.ads, exp_ch6.adb, s-solita.adb: Minor
2586 2011-09-06 Arnaud Charlet <charlet@adacore.com>
2588 * s-linux-alpha.ads: Minor reformatting
2589 * s-oscons-tmplt.c: Fix generated comments in s-oscons template.
2590 Use sizeof instead of corresponding C defines in s-oscons template.
2592 2011-09-06 Vadim Godunko <godunko@adacore.com>
2594 * a-convec.ads, a-iteint.ads: Minor reformatting.
2596 2011-09-06 Vincent Celier <celier@adacore.com>
2598 * projects.texi: Add menus and @node lines.
2600 2011-09-06 Ed Schonberg <schonberg@adacore.com>
2602 * exp_ch6.adb (Expand_Inlined_Call): Handle properly the case
2603 where the return type is an unconstrained array and the context
2604 is an assignment. Optimize the case when the target of the
2605 assignment is a selected component.
2607 2011-09-06 Arnaud Charlet <charlet@adacore.com>
2609 * s-solita.adb: Update comments.
2611 2011-09-06 Pascal Obry <obry@adacore.com>
2613 * s-linux.ads, s-linux-alpha.ads, s-linux-hppa.ads, s-linux-mipsel.ads,
2614 s-linux-sparc.ads: Remove hard coded and now wrong definitions.
2615 * s-oscons-tmplt.c: Add support for generating pthread related
2616 types size on GNU/Linux as done for Darwin.
2617 * s-osinte-linux.ads: Use s-oscons to define the pthread types.
2619 2011-09-06 Robert Dewar <dewar@adacore.com>
2621 * exp_ch6.adb: Fix minor typo.
2623 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2625 * exp_ch7.adb: Remove with and use clauses for Get_Targ.
2626 (Alignment_Of): Moved to the body of Nearest_Multiple_Rounded_Up.
2627 (Double_Size_Of): Alphabetized. Update the comment on usage.
2628 (Make_Finalize_Address_Stmts): Update comments and reformat code.
2629 (Nearest_Multiple_Rounded_Up): New routine.
2630 (Size_Of): Update comment on usage. The generated expression now
2631 accounts for alignment gaps by rounding the size of the type to the
2632 nearest multiple rounded up of the type's alignment.
2634 2011-09-06 Robert Dewar <dewar@adacore.com>
2636 * exp_ch7.adb, g-comlin.adb: Minor reformatting.
2638 2011-09-06 Steve Baird <baird@adacore.com>
2640 * exp_ch4.adb (Expand_Allocator_Expression): Look through
2641 derived subprograms in checking for presence of an
2642 Extra_Accessibility_Of_Result formal parameter.
2643 * exp_ch6.adb (Expand_Call): Look through derived subprograms in
2644 checking for presence of an Extra_Accessibility_Of_Result formal
2646 (Expand_Call.Add_Actual_Parameter): Fix a bug in the
2647 case where the Parameter_Associatiations attribute is already set,
2648 but set to an empty list.
2649 (Needs_Result_Accessibility_Level):
2650 Unconditionally return False. This is a temporary
2651 change, disabling the Extra_Accessibility_Of_Result
2653 (Expand_Simple_Function_Return): Check for
2654 Extra_Accessibility_Of_Result parameter's presence instead of
2655 testing Ada_Version when generating a runtime accessibility
2656 check which makes use of the parameter.
2658 2011-09-06 Ed Schonberg <schonberg@adacore.com>
2660 * exp_ch4.adb (Expand_N_Case_Expression): Actions created for the
2661 expression in a given case alternative must be attached to the
2662 statement list of the ccrresponding case statement alternative
2663 They cannot be propagated ahead of the case statement, because
2664 the validity of the expression that generated the action may
2665 hold only for that alternative.
2667 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2669 * exp_ch7.adb: Remove with and use clauses for Get_Targ.
2670 (Alignment_Of): Remove the code for strict alignment targets.
2671 (Double_Alignment_Of): Removed.
2672 (Double_Size_Of): New routine.
2673 (Make_Finalize_Address_Stmts): Change the
2674 calculation of the dope's size. Update relevant comments.
2675 (Size_Of): New routine.
2677 2011-09-06 Steve Baird <baird@adacore.com>
2679 * einfo.ads (Extra_Accessibility): Update associated comment to use
2680 the term "present" correctly ("present" just means that it is not
2681 an error to query the value of the attribute - it does not imply
2682 that the value must be non-null).
2683 (Extra_Constrained): Ditto.
2684 (Is_Visible_Formal): Ditto.
2685 (Extra_Accessibility_Of_Result) Ditto; also add Inline pragma.
2686 (Set_Extra_Accessibility_Of_Result): Add Inline pragma.
2687 * exp_ch4.adb (Expand_Allocator_Expression): Improve a comment.
2688 * exp_ch6.adb (Expand_Call): The callee may require an
2689 Extra_Accessibility_Of_Result actual parameter even if Ada_Version
2690 < Ada_2012. This can occur if the callee is exported from a Gnat
2691 runtimes unit. Also improve a comment.
2693 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2695 * exp_ch7.adb: Add with and use clauses for Get_Targ.
2696 (Alignment_Of): Rename formal parameter Some_Typ
2697 to Typ, update related comment. Use the allocator alignment on
2698 strict alignment targets such as SPARC.
2699 (Double_Alignment_Of): Rename formal parameter Some_Typ to Typ, update
2702 2011-09-06 Gary Dismukes <dismukes@adacore.com>
2704 * sem_ch9.adb (Check_Interfaces): Test
2705 Is_Limited_Type rather than Is_Limited_Record when checking that
2706 the partial view of a synchronized full view must be limited.
2708 2011-09-06 Emmanuel Briot <briot@adacore.com>
2710 * g-comlin.adb (Free): Fix memory leak.
2712 2011-09-06 Robert Dewar <dewar@adacore.com>
2714 * sem_util.adb, exp_ch6.adb: Minor reformatting and code reorganization.
2716 2011-09-06 Steve Baird <baird@adacore.com>
2718 * einfo.ads (Extra_Accessibility_Of_Result): New function; in the
2719 (Ada2012) cases described in AI05-0234 where the accessibility
2720 level of a function result is "determined by the point of
2721 call", an implicit parameter representing that accessibility
2722 level is passed in. Extra_Accessibilty_Of_Result yields this
2723 additional formal parameter. Extra_Accessibility_Of_Result
2724 is analogous to the existing Extra_Accessibility
2725 function used in the implementation of access parameters.
2726 (Set_Extra_Accessibility_Of_Result): New procedure; sets
2727 Extra_Accessibility_Of_Result attribute.
2728 * einfo.adb (Extra_Accessibility_Of_Result): New function.
2729 (Set_Extra_Accessibility_Of_Result): New procedure.
2730 (Write_Field19_Name): Display Extra_Accessibilty_Of_Result attribute.
2731 * sem_util.adb (Dynamic_Accessibility_Level): Set Etype of
2732 an accessibility level literal to Natural; introduce a nested
2733 function, Make_Level_Literal, to do this.
2734 * exp_ch6.ads (Needs_Result_Accessibility_Level): New function;
2735 determines whether a given function (or access-to-function
2736 type) needs to have an implicitly-declared accessibility-level
2737 parameter added to its profile.
2738 (Add_Extra_Actual_To_Call): Export an existing procedure which was
2739 previously declared in the body of Exp_Ch6.
2740 * exp_ch6.adb (Add_Extra_Actual_To_Call): Export declaration by moving
2742 (Has_Unconstrained_Access_Discriminants): New Function; a
2743 predicate on subtype entities which returns True if the given
2744 subtype is unconstrained and has one or more access discriminants.
2745 (Expand_Call): When expanding a call to a function which takes an
2746 Extra_Accessibility_Of_Result parameter, pass in the appropriate
2747 actual parameter value. In the case of a function call which is
2748 used to initialize an allocator, this may not be possible because
2749 the Etype of the allocator may not have been set yet. In this
2750 case, we defer passing in the parameter and handle it later in
2751 Expand_Allocator_Expression.
2752 (Expand_Simple_Function_Return): When returning from a function which
2753 returns an unconstrained subtype having at least one access
2754 discriminant, generate the accessibility check needed to ensure that
2755 the function result will not outlive any objects designated by its
2757 (Needs_Result_Accessibility_Level): New function; see exp_ch6.ads
2759 * exp_ch4.adb (Expand_Allocator_Expression): When a function call
2760 is used to initialize an allocator, we may need to pass in "the
2761 accessibility level determined by the point of call" (AI05-0234)
2762 to the function. Expand_Call, where such actual parameters are
2763 usually generated, is too early in this case because the Etype of
2764 the allocator (which is used in determining the level to be passed
2765 in) may not have been set yet when Expand_Call executes. Instead,
2766 we generate code to pass in the appropriate actual parameter
2767 in Expand_Allocator_Expression.
2768 * sem_ch6.adb (Create_Extra_Formals): Create
2769 the new Extra_Accessibility_Of_Result formal if
2770 Needs_Result_Accessibility_Level returns True. This includes the
2771 introduction of a nested procedure, Check_Against_Result_Level.
2773 2011-09-06 Arnaud Charlet <charlet@adacore.com>
2775 * gcc-interface/Makefile.in (X86_TARGET_PAIRS): Remove duplicate
2778 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
2780 * s-finmas.adb (Set_Finalize_Address): Explain the reason
2781 for the synchronization. Move the test for null from
2782 s-stposu.Allocate_Any_Controlled to this routine since the check
2783 needs to be protected too.
2784 (Set_Heterogeneous_Finalize_Address): Explain the reason for the
2785 synchronization code.
2786 * s-finmas.ads (Set_Heterogeneous_Finalize_Address): Add comment
2787 explaining the context in which this routine is used.
2788 * s-stposu.adb (Allocate_Any_Controlled): Move the test for null
2789 to s-finmas.Set_Finalize_Address.
2791 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2793 * einfo.ads: Document that itypes have no parent field.
2795 2011-09-05 Robert Dewar <dewar@adacore.com>
2797 * rtsfind.adb (Check_CRT): Check for overloaded entity
2798 * rtsfind.ads: Document that entities to be found by rtsfind
2799 cannot be overloaded
2800 * s-taenca.adb, s-tasren.adb, s-tpobop.adb, s-tpoben.ads, s-tpoben.adb
2801 (Lock_Entries_With_Status): New name for Lock_Entries with two
2802 arguments (changed to meet rtsfind no overloading rule).
2804 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
2806 * s-finmas.adb (Set_Finalize_Address (Address,
2807 Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
2808 (Set_Finalize_Address (in out Finalization_Master,
2809 Finalize_Address_Ptr): Add synchronization code.
2810 * s-finmas.ads (Set_Finalize_Address (Address,
2811 Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
2812 * s-stposu.adb (Allocate_Any_Controlled): Update the call to
2813 Set_Finalize_Address for the heterogeneous case.
2815 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2817 * sem_ch3.adb: Undo previous change, not suitable after all.
2819 2011-09-05 Robert Dewar <dewar@adacore.com>
2821 * einfo.ads: Minor comment clarification.
2823 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
2825 * exp_ch6.adb (Move_Activation_Chain): Rewritten. The routine
2826 no longer needs to search through the entities of the return
2827 statement scope to find the _chain.
2828 * sem_ch5.adb: Add with and use clauses for Exp_Ch6 and Sem_Ch6.
2829 (Analyze_Block_Statement): Add local variable
2830 Is_BIP_Return_Statement. Add machinery to install all entities
2831 produced by the expansion of the return object declaration.
2832 (Install_Return_Entities): New routine.
2833 * sem_ch6.ads, sem_ch6.adb (Install_Entity): Moved from body to spec.
2835 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2837 * sem_ch10.adb (Analyze_Context): Apply simple fixup if context
2838 of subunit is incomplete.
2839 (Analyze_Proper_Body): If parent spec is not available, do not
2842 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2844 * sem_disp.adb (Find_Controlling_Arg): Add checks for
2845 interface type conversions, that are expanded into dereferences.
2847 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
2849 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
2850 Examine the parameter and return profile of a subprogram and swap
2851 any incomplete types coming from a limited context with their
2852 corresponding non-limited views.
2853 (Exchange_Limited_Views): New routine.
2855 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2857 * sem_ch3.adb (Prepare_Private_Subtype_Completion): Set parent
2858 of internal entity to the subtype declaration, so that when
2859 entities are subsequently exchanged in a package body, the tree
2860 remains properly formatted for ASIS.
2862 2011-09-05 Johannes Kanig <kanig@adacore.com>
2864 * g-comlin.adb (Set_Usage): Additional optional argument to set help
2866 (Display_Help): display the user given help message, if available.
2868 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2870 * sem_ch3.adb (OK_For_Limited_Init_In_05): The expression
2871 is legal if the original node is an identifier that is a
2872 parameterless function call.
2874 2011-09-05 Pascal Obry <obry@adacore.com>
2876 * prj-nmsc.adb: Minor reformatting.
2877 Add support for standalone aggregate library.
2878 (Check_Stand_Alone_Library): Handle standalone aggregate library.
2879 * projects.texi: Fix documentation for aggregate library projects.
2881 2011-09-05 Robert Dewar <dewar@adacore.com>
2883 * sem_ch6.adb: Minor reformatting.
2885 2011-09-05 Matthew Gingell <gingell@adacore.com>
2887 * s-tassta.adb (Task_Wrapper): Ensure that we don't try to write the
2888 stack guard page on PPC Linux. This patch ensures the 64K guard page at
2889 the bottom of the stack is not overwritten.
2891 2011-09-05 Thomas Quinot <quinot@adacore.com>
2893 * exp_intr.adb, s-tasini.adb: Minor reformatting.
2895 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2897 * sem_ch3.adb (Access_Definition): If an access type declaration
2898 appears in a child unit, the scope of whatever anonymous type
2899 may be generated is the child unit itself.
2901 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2903 * sem_ch6.adb (Analyze_Expression_Function): Do not set
2904 Comes_From_Source on rewritten body.
2905 (Analyze_Subprogram_Body_Helper): Check that the original node for
2906 the body comes from source, when determining whether expansion
2907 of a protected operation is needed.
2909 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2911 * exp_aggr.adb (Replace_Type): If the target of the assignment is
2912 a selected component and the right-hand side is a self-referential
2913 access, the proper prefix of the rewritten attribute is a copy
2914 of the left-hand side, not of its prefix.
2916 2011-09-05 Robert Dewar <dewar@adacore.com>
2918 * sem_ch5.adb: Minor reformatting.
2919 * sem_ch3.adb: Minor code clean up.
2921 2011-09-05 Jose Ruiz <ruiz@adacore.com>
2923 * exp_ch9.adb (Make_Initialize_Protection): The fact that
2924 restriction No_Dynamic_Attachment is in effect or not should
2925 not influence the default priority associated to a protected
2926 object. With this change, when the restriction is in effect (as
2927 is the case for the Ravenscar profile) the default priority of
2928 a protected object with an interrupt handler is in the range of
2929 interrupt priorities (Default_Interrupt_Priority) as required
2932 2011-09-05 Arnaud Charlet <charlet@adacore.com>
2934 * a-iteint.ads: Fix header.
2936 2011-09-05 Vincent Celier <celier@adacore.com>
2938 * prj-conf.adb (Do_Autoconf): Make sure Obj_Dir always ends
2939 with a directory separator to avoid output such as:
2940 "/path/to/objauto.cgpr" has been deleted.
2942 2011-09-05 Robert Dewar <dewar@adacore.com>
2944 * sem_ch3.adb: Minor reformatting.
2946 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2948 * sem_ch5.adb: Better error message.
2950 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
2952 * exp_aggr.adb: Add with and use clause for Exp_Ch6.
2953 (Expand_Array_Aggregate): Detect a special case of an aggregate
2954 which contains tasks in the context of an unexpanded return
2955 statement of a build-in-place function.
2956 * exp_ch6.adb: Add with and use clause for Exp_Aggr.
2957 (Expand_N_Extended_Return_Statement): Detect a delayed aggregate
2958 which contains tasks and expand it now that the original simple
2959 return statement has been rewritten.
2960 * exp_ch9.adb (Build_Activation_Chain_Entity): Code
2961 reformatting. Do not create a chain for an extended return
2962 statement if one is already available.
2963 (Has_Activation_Chain): New routine.
2965 2011-09-05 Marc Sango <sango@adacore.com>
2967 * sem_ch3.adb (Analyze_Object_Declaration): Remove
2968 the wrong test and add the correct test to detect the violation
2969 of illegal use of unconstrained string type in SPARK mode.
2971 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2973 * sem_ch5.adb (Analyze_Iteration_Specification): Improve error
2974 message on an iterator over an array.
2976 2011-09-05 Robert Dewar <dewar@adacore.com>
2978 * lib-xref-alfa.adb: Minor reformatting.
2980 2011-09-05 Robert Dewar <dewar@adacore.com>
2982 * sem_ch3.adb, sem_res.adb, par.adb, par-ch6.adb, g-comlin.adb,
2983 exp_ch6.adb, lib-xref-alfa.adb: Minor reformatting.
2985 2011-09-05 Gary Dismukes <dismukes@adacore.com>
2987 * exp_ch7.adb, exp_ch6.adb: Minor reformatting.
2989 2011-09-05 Johannes Kanig <kanig@adacore.com>
2991 * lib-xref-alfa.adb: Update comments.
2993 2011-09-05 Thomas Quinot <quinot@adacore.com>
2995 * sem_res.adb: Minor reformatting
2997 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2999 * exp_ch6.adb (Build_In_Place_Formal): If extra formals are not
3000 present, create them now. Needed in case the return type was
3001 a limited view in the function declaration.
3002 (Make_Build_In_Place_Call_In_Allocator): If return type contains
3003 tasks, build the activation chain for it. Pass a reference to
3004 the Master_Id in call to Add_Task_Actuals_To_Build_In_Place call.
3005 * exp_ch7.adb (Make_Set_Finalize_Address_Call): Clean up interface
3006 with build_in_place calls.
3007 * sem_ch9.adb (Analyze_Task_Type_Declaration): If partial view was
3008 incomplete, inatialize its Corresponding_Record_Type component.
3009 * sem_ch10.adb (Build_Chain): Initialize Private_Dependents field
3012 2011-09-05 Johannes Kanig <kanig@adacore.com>
3014 * lib-xref-alfa.adb (Is_Alfa_Reference): Filter constants from effect
3017 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3019 * par-ch6.adb (P_Subprogram): In Ada2012 mode, if the subprogram
3020 appears within a package specification and the token after "IS"
3021 is not a parenthesis, assume that this is an unparenthesized
3022 expression function, even if the token appears in a line by
3024 * par.adb: Clarify use of Labl field of scope stack in error
3027 2011-09-05 Bob Duff <duff@adacore.com>
3029 * sem_res.adb (Resolve_Intrinsic_Operator): Use unchecked
3030 conversions instead of normal type conversions in all cases where a
3031 type conversion would be illegal. In particular, use unchecked
3032 conversions when the operand types are private.
3034 2011-09-05 Johannes Kanig <kanig@adacore.com>
3036 * lib-xref-alfa.adb (Is_Alfa_Reference): Never declare effects on
3037 objects of task type or protected type.
3039 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3041 * sem_ch6.adb (Analyze_Expression_Function): If the expression
3042 function comes from source, indicate that so does its rewriting,
3043 so it is compatible with any subsequent expansion of the
3044 subprogram body (e.g. when it is a protected operation).
3045 * sem_ch4.adb: minor reformatting
3047 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
3049 * lib.adb (Check_Same_Extended_Unit): Comment rewriting. Use
3050 Get_Source_Unit rather than Get_Code_Unit as instantiation unfolding
3051 may lead to wrong ancestor package in the case of instantiated subunit
3052 bodies. If a subunit is instantiated, follow the chain of instantiations
3053 rather than the stub structure.
3055 2011-09-02 Robert Dewar <dewar@adacore.com>
3057 * sem_ch4.adb, sem_ch6.adb: Minor reformatting.
3058 * gcc-interface/Make-lang.in: Update dependencies.
3060 2011-09-02 Marc Sango <sango@adacore.com>
3062 * sem_ch3.adb (Analyze_Object_Declaration): Change
3063 comment and add additional check to differentiate constant of
3064 type string from others unconstrained type.
3066 2011-09-02 Ed Schonberg <schonberg@adacore.com>
3068 * sinfo.ads, sinfo.adb: New semantic attribute Premature_Use,
3069 present in incomplete type declarations to refine the error
3070 message the full declaration is in the same unit.
3071 * sem_ch4.adb (Analyze_Selected_Component): If the prefix is of
3072 an incomplete type, set the Premature_Use for additional message.
3073 * sem_ch3.adb (Find_Type_Name): If partial view is incomplete
3074 and Premature_Use is set, place additional information at the
3075 point of premature use.
3077 2011-09-02 Bob Duff <duff@adacore.com>
3079 * sem_ch6.adb: (Check_Post_State): Suppress warning
3080 "postcondition refers only to pre-state" when the expression has not
3081 yet been analyzed, because it causes false alarms. This can happen when
3082 the postcondition contains a quantified expression, because those are
3083 analyzed later. This is a temporary/partial fix.
3084 (Process_Post_Conditions): Minor: change wording of warning.
3086 2011-09-02 Marc Sango <sango@adacore.com>
3088 * sem_ch3.adb (Analyze_Object_Declaration): Detect the violation of
3089 illegal use of unconstrained string type in SPARK mode.
3090 * sem_res.adb (Analyze_Operator_Symbol): Set the
3091 right place where the string operand of concatenation should be
3092 violate in SPARK mode.
3094 2011-09-02 Robert Dewar <dewar@adacore.com>
3096 * sem_prag.adb, sem_util.adb, sem_ch6.adb, prj-nmsc.adb,
3097 exp_ch3.adb: Minor reformatting.
3099 2011-09-02 Vincent Celier <celier@adacore.com>
3101 * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Declare "gcc"
3102 as the compiler driver so Is_Compilable returns True for sources.
3103 * prj-nmsc.adb (Override_Kind): When Kind is Sep, set the source
3106 2011-09-02 Ed Schonberg <schonberg@adacore.com>
3108 * sem_prag.adb (Analyze_PPC_In_Decl_Part): for a class-wide
3109 condition, a reference to a controlling formal must be interpreted
3110 as having the class-wide type (or an access to such) so that the
3111 inherited condition can be properly applied to any overriding
3112 operation (see ARM12 6.6.1 (7)).
3114 2011-09-02 Tristan Gingold <gingold@adacore.com>
3116 * init.c (__gnat_is_vms_v7): Fix case and add prototype
3119 2011-09-02 Javier Miranda <miranda@adacore.com>
3121 * exp_ch3.adb (Expand_N_Object_Declaration): Do not copy the
3122 initializing expression of a class-wide interface object declaration
3123 if its type is limited.
3125 2011-09-02 Johannes Kanig <kanig@adacore.com>
3127 * sem_util.adb (Unique_Name): To obtain a unique name for enumeration
3128 literals, take into account the type name; the type is *not*
3129 the scope for an enumeration literal.
3131 2011-09-02 Ed Schonberg <schonberg@adacore.com>
3133 * sem_ch6.adb (Check_Overriding_Indicator): add special check
3134 to reject an overriding indicator on a user-defined Adjust
3135 subprogram for a limited controlled type.
3137 2011-09-02 Ed Schonberg <schonberg@adacore.com>
3139 * sem_res.adb (Resolve_Actuals): add missing call to Resolve
3140 for an actual that is a function call returning an unconstrained
3141 limited controlled type.
3143 2011-09-02 Tristan Gingold <gingold@adacore.com>
3145 * g-socthi-vms.adb (c_sendmsg, c_recvmsg): Use unpacked msg if on vms 7
3147 2011-09-02 Johannes Kanig <kanig@adacore.com>
3149 * alfa.ads (Name_Of_Heap_Variable): Change value of the HEAP variable
3150 from "HEAP" to __HEAP Change comment that refers to that variable
3151 * put_alfa.adb: Change comment that refers to that variable
3153 2011-09-02 Robert Dewar <dewar@adacore.com>
3155 * exp_ch4.adb, exp_ch6.adb, prj-nmsc.adb: Minor reformatting.
3157 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
3159 * exp_util.adb (Extract_Renamed_Object): Renamed to
3160 Find_Renamed_Object. This routine has been reimplemented and now uses
3161 tree traversal to locate a renamed object.
3162 (Is_Aliased): Replace call to Extract_Renamed_Object with
3163 Find_Renamed_Object.
3165 2011-09-02 Tristan Gingold <gingold@adacore.com>
3167 * init.c: (__gnat_is_vms_v7): New function.
3169 2011-09-02 Olivier Hainque <hainque@adacore.com>
3171 * tracebak.c (STOP_FRAME, ppc elf/vxworks case): Stop on frames
3172 that have a misaligned backchain, necessarily bogus.
3174 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
3176 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not create
3177 TSS routine Finalize_Address when compiling in Alfa mode.
3178 (Expand_Freeze_Record_Type): Do not create TSS routine
3179 Finalize_Address when compiling in Alfa mode.
3180 * exp_ch4.adb (Expand_Allocator_Expression): Do not produce a
3181 call to Set_Finalize_Address in Alfa mode because Finalize_Address is
3183 (Expand_N_Allocator): Do not produce a call to
3184 Set_Finalize_Address in Alfa mode because Finalize_Address is not built.
3185 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Do not
3186 produce a call to primitive Set_Finalize_Address in Alfa mode because
3187 Finalize_Address is not built.
3188 * exp_ch7.adb (Build_Finalization_Master): Do not create
3189 finalization masters in Afa mode since they are not needed.
3190 (Build_Finalizer): Do not create scope and library-level
3191 finalizers in Alfa mode since they are not needed.
3192 * exp_util.adb (Build_Allocate_Deallocate_Proc): Do not expand
3193 "new" and "free" when applied to controlled objects in Alfa mode since
3196 2011-09-02 Vincent Celier <celier@adacore.com>
3198 * prj-nmsc.db: (Check_Stand_Alone_Library): For SALs, allow
3199 only library names with the syntax of Ada identifiers, to avoid errors
3200 when compiling the binder generated files.
3201 * projects.texi: Document restriction on SAL library names
3203 2011-09-02 Thomas Quinot <quinot@adacore.com>
3205 * a-chtgbo.adb: Minor comment fix.
3207 2011-09-02 Robert Dewar <dewar@adacore.com>
3209 * lib-xref.adb: Minor reformatting
3211 2011-09-02 Vincent Celier <celier@adacore.com>
3213 * bindusg.adb, clean.adb, gnatchop.adb, gnatfind.adb, gnatlink.adb,
3214 gnatls.adb, gnatname.adb, gnatxref.adb, gprep.adb, makeusg.adb: Add
3215 --version and --help in usage.
3216 * switch.ads, switch.adb (Display_Usage_Version_And_Help): New procedure
3218 2011-09-02 Bob Duff <duff@adacore.com>
3220 * lib-xref.adb: (Hash): Avoid use of 'Mod attribute, because old
3221 compilers don't understand it.
3223 2011-09-02 Gary Dismukes <dismukes@adacore.com>
3225 * exp_attr.adb (Expand_N_Attribute_Reference): Pass the
3226 underlying subtype rather than its base type on the call to
3227 Build_Record_Or_Elementary_Input_Function, so that any
3228 constraints on a discriminated subtype will be available for
3229 doing the check required by AI05-0192.
3230 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
3231 If the prefix subtype of the 'Input attribute is a constrained
3232 discriminated subtype, then check each constrained discriminant value
3233 against the corresponding value read from the stream.
3235 2011-09-02 Yannick Moy <moy@adacore.com>
3237 * usage.adb, warnsw.adb, sem_ch6.adb, opt.ads: Disable by default
3238 warnings on suspicious contracts, and enable them with -gnatwa.
3240 2011-09-02 Robert Dewar <dewar@adacore.com>
3242 * exp_util.adb, exp_ch9.adb, sem_attr.adb, sem_ch6.adb: Minor
3245 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
3247 * exp_ch9.adb (Install_Private_Data_Declarations): Add guards
3248 which ensure that restriction No_Dynamic_Attachment has not been
3250 (Make_Initialize_Protection): Protected types with attach or
3251 interrupt handlers must not violate restriction No_Dynamic_Attachment.
3252 * exp_util.adb (Corresponding_Runtime_Package): Add a guard
3253 which ensures that restriction No_Dynamic_Attachment has not been
3255 * sem_attr.adb: (Eval_Attribute): Transform
3256 VAX_Float_Type'First and 'Last into references to
3257 the temporaries which store the corresponding bounds. The
3258 transformation is needed since the back end cannot evaluate
3259 'First and 'Last on VAX.
3260 (Is_VAX_Float): New routine.
3262 2011-09-02 Ed Schonberg <schonberg@adacore.com>
3264 * sem_ch12.adb (Analyze_Subprogram_Instantiation): If the
3265 generic unit is not intrinsic and has an explicit convention,
3266 the instance inherits it.
3268 2011-09-02 Robert Dewar <dewar@adacore.com>
3270 * prj-dect.adb, prj-env.adb, prj-nmsc.adb, prj-proc.adb, prj-tree.adb,
3271 prj.adb, prj.ads, sem_ch5.adb: Minor reformatting.
3273 2011-09-02 Thomas Quinot <quinot@adacore.com>
3275 * sem_attr.adb (Analyze_Attribute, case Unrestriced_Access):
3276 Guard against a prefix that is an N_Has_Entity but has no
3279 2011-09-02 Yannick Moy <moy@adacore.com>
3281 * lib-xref-alfa.adb (Is_Alfa_Reference): Ignore IN parameters in Alfa
3284 2011-09-02 Yannick Moy <moy@adacore.com>
3286 * opt.ads (Warn_On_Suspicious_Contract): New warning flag.
3287 * sem_ch3.adb (Analyze_Declarations): Call checker for suspicious
3289 * sem_ch6.adb, sem_ch6.ads (Check_Subprogram_Contract): New
3290 procedure looking for suspicious postconditions.
3291 * usage.adb (Usage): New options -gnatw.t and -gnatw.T.
3292 * warnsw.adb (Set_Dot_Warning_Switch): Take into account new
3293 options -gnatw.t and -gnatw.T.
3295 2011-09-02 Pascal Obry <obry@adacore.com>
3297 * prj.adb: Minor code refactoring. Move check for null project in
3299 * projects.texi: Fix minor typos.
3301 2011-09-02 Ed Schonberg <schonberg@adacore.com>
3303 * sem_ch5.adb (Analyze_Iterator_Specification): If the domain
3304 of iteration is an expression, its value must be captured in a
3305 renaming declaration, so that modification of the elements is
3306 propagated to the original container.
3308 2011-09-02 Pascal Obry <obry@adacore.com>
3310 * prj-proc.adb, prj.adb, makeutl.adb, makeutl.ads, prj-dect.adb,
3311 prj-nmsc.adb, prj-util.adb, prj-conf.adb, prj-env.adb,
3312 prj-tree.adb: Minor reformatting and style fixes.
3314 2011-09-02 Robert Dewar <dewar@adacore.com>
3316 * s-rident.ads: Add new restriction No_Implicit_Aliasing
3317 * sem_attr.adb: (Analyze_Access_Attribute): Deal with
3318 No_Implicit_Aliasing
3319 (Analyze_Attribute, case Address): ditto
3320 (Analyze_Attribute, case Unrestricted_Access): ditto
3321 * sem_util.ads, sem_util.adb: (Is_Aliased_View): Handle
3322 No_Implicit_Aliasing restriction.
3323 * gnat_rm.texi: Add documentation for No_Implicit_Aliasing
3325 2011-09-02 Ed Schonberg <schonberg@adacore.com>
3327 * exp_util.adb: (Possible_Bit_Aligned_Object): If the object
3328 is an unchecked conversion, apply test to its expression.
3330 2011-09-02 Javier Miranda <miranda@adacore.com>
3332 * sem_ch3.adb (Check_Abstract_Overriding): When
3333 traversing the chain of aliased subprograms avoid reporting a
3334 redundant error on the current entity.
3336 2011-09-02 Sergey Rybin <rybin@adacore.com>
3338 * gnat_ugn.texi: Minor clean up.
3340 2011-09-02 Bob Duff <duff@adacore.com>
3342 * s-htable.adb (Set_If_Not_Present): Use renaming
3343 instead of ":=", because the type Key is limited in the generic (even
3344 if not in the instances).
3346 2011-09-02 Robert Dewar <dewar@adacore.com>
3348 * exp_util.adb, sem_ch10.adb, sem_attr.adb, s-htable.adb,
3349 g-comlin.adb, g-comlin.ads, lib-xref-alfa.adb, lib-xref.adb: Minor
3352 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
3354 * sem_ch3.adb: (Set_Anonymous_Type): Associate the itype of an
3355 inherited component with the enclosing derived type. Code reformatting.
3357 2011-09-02 Gary Dismukes <dismukes@adacore.com>
3359 * checks.adb: (Determine_Range): Add test of OK1 to prevent the early
3360 return done when overflow checks are enabled, since comparisons against
3361 Lor and Hir should not be done when OK1 is False.
3363 2011-09-02 Gary Dismukes <dismukes@adacore.com>
3365 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
3366 Add new formal Master_Exp. When present, add that expression to the
3367 call as an extra actual.
3368 (Make_Build_In_Place_Call_In_Object_Declaration): Add variable
3369 Fmaster_Actual and in the case of a BIP call initializing a return
3370 object of an enclosing BIP function set it to a
3371 new reference to the implicit finalization master
3372 formal of the enclosing function. Fmaster_Actual is
3373 then passed to the new formal Master_Exp on the call to
3374 Add_Finalization_Master_Actual_To_Build_ In_Place_Call. Move
3375 initializations of Enclosing_Func to its declaration.
3377 2011-09-02 Thomas Quinot <quinot@adacore.com>
3379 * csets.ads: Minor reformatting
3381 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
3383 * exp_aggr.adb: (Get_Constraint_Association): Add code to retrieve
3384 the full view of a private type coming from an instantiation.
3385 * exp_ch4.adb: (Current_Anonymous_Master): Reimplement the search
3386 loop to iterate over the declarations rather than use the
3387 First_Entity / Next_Entity scheme.
3389 2011-09-02 Ed Schonberg <schonberg@adacore.com>
3391 * sem_attr.adb: (Analyze_Attribute, case 'Range): when expanding
3392 X'range (N) into X'First (N) .. X'Last (N), do not share the
3393 dimension indicator N, if present. Even though it is a static
3394 constant, its source location may be modified when printing
3395 expanded code under -gnatDL, and node sharing will lead to chaos
3396 in Sprint on large files, by generating a sloc value that does
3397 not correspond to any source file.
3399 2011-09-02 Bob Duff <duff@adacore.com>
3401 * einfo.adb: (Has_Xref_Entry): Do not call
3402 Implementation_Base_Type. Lib.Xref has been
3403 rewritten to avoid the need for it, and it was costly.
3404 * s-htable.ads,s-htable.adb: (Present,Set_If_Not_Present): New
3405 functions in support of efficient xref.
3406 * lib-xref-alfa.adb: Misc changes related to Key component of
3408 * lib-xref.adb: (Add_Entry,etc): Speed improvement.
3409 (New_Entry): Call Implementation_Base_Type, because Has_Xref_Entry
3410 no longer does. This is the one place where it is needed.
3412 2011-09-02 Johannes Kanig <kanig@adacore.com>
3414 * g-comlin.adb (Getopt): New optional argument Concatenate to have
3415 similar interface as the other Getopt function.
3417 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
3419 * exp_ch4.adb: (Expand_Allocator_Expression): Do not generate
3420 a call to Set_Finalize_Address if there is no allocator available.
3421 * exp_util.adb: (Build_Allocate_Deallocate_Proc): Account for
3422 a case of allocator expansion where the allocator is not expanded but
3423 needs a custom allocate routine. Code reformatting.
3424 (Is_Finalizable_Transient): Remove local variables Has_Rens and
3425 Ren_Obj. Code reformatting.
3426 (Is_Renamed): Renamed to Is_Aliased. Add code to detect aliasing
3427 through the use of 'reference.
3428 * sem_ch4.adb: (Analyze_Allocator): Detect allocators generated
3429 as part of build-in-place expansion. They are intentionally marked as
3430 coming from source, but their parents are not.
3432 2011-09-02 Ed Schonberg <schonberg@adacore.com>
3434 * sem_ch10.adb (Analyze_With_Clause): If the library unit
3435 is the generated subprogram declaration for a child unit body
3436 that acts as spec, use the original body in the with_clause,
3437 to prevent binding errors.
3439 2011-09-02 Vincent Celier <celier@adacore.com>
3441 * gnat_ugn.texi: Adapt documentation of -gnateInnn to new VMS
3442 qualifier /MULTI_UNIT_INDEX=
3444 2011-09-02 Johannes Kanig <kanig@adacore.com>
3446 * g-comlin.adb (Getopt): Return when switch is dealt with automatically,
3447 instead of calling the callback function
3449 2011-09-02 Robert Dewar <dewar@adacore.com>
3451 * prj-proc.adb, prj.ads, sem_util.adb, s-taprop-linux.adb,
3452 prj-nmsc.adb, prj-util.ads, prj-env.adb: Minor reformatting.
3454 2011-09-02 Vincent Celier <celier@adacore.com>
3456 * prj-nmsc.adb: (Find_Sources): When the list of sources is
3457 explicitly declared in an extending project, do not warn if a source
3458 for an inherited naming exception is not found.
3460 2011-09-02 Gary Dismukes <dismukes@adacore.com>
3462 * exp_ch6.adb: (Is_Build_In_Place_Function_Call): Return False if
3463 expansion is inactive.
3465 2011-09-02 Ed Schonberg <schonberg@adacore.com>
3467 * sem_util.adb (Note_Possible_Modification): If the entity
3468 being modified is the renaming generated for an Ada2012 iterator
3469 element, the enclosing container or array is modified as well.
3471 2011-09-02 Jose Ruiz <ruiz@adacore.com>
3473 * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB,
3474 Initialize): Define and initialize the
3475 mutex attributes and condition variable attributes locally.
3477 2011-09-02 Vincent Celier <celier@adacore.com>
3479 * prj-nmsc.adb (Check_File): Mark as Locally_Removed a naming
3480 exception replaced in an extending project.
3481 (Check_Object): No error when the other source is locally removed.
3483 2011-09-02 Yannick Moy <moy@adacore.com>
3485 * exp_ch6.adb (Is_Build_In_Place_Function_Call): in Alfa mode, allow
3488 2011-08-31 Arnaud Charlet <charlet@adacore.com>
3490 * gcc-interface/Makefile.in: Clean up handling of x86 and x86-64
3492 * gcc-interface/Make-lang.in: Update dependencies.
3494 2011-09-01 Robert Dewar <dewar@adacore.com>
3496 * sem_ch3.adb, s-taprop-linux.adb, gnatls.adb: Minor reformatting.
3498 2011-09-01 Jose Ruiz <ruiz@adacore.com>
3500 * adaint.h (__gnat_cpu_free): Fix the name of this profile.
3501 * adaint.c (__gnat_cpu_alloc, __gnat_cpu_alloc_size, __gnat_cpu_free,
3502 __gnat_cpu_zero, __gnat_cpu_set): Create version of these subprograms
3503 specific for systems where their glibc version does not define the
3504 routines to handle dynamically allocated CPU sets.
3506 2011-09-01 Vincent Celier <celier@adacore.com>
3508 * prj-proc.adb, prj.ads, prj-nmsc.adb, prj-util.adb, prj-util.ads,
3509 prj-env.adb: Implement inheritance of naming exceptions in extending
3512 2011-09-01 Romain Berrendonner <berrendo@adacore.com>
3514 * gnatls.adb: Display simple message instead of content of
3517 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
3519 * sem_ch3.adb: (Build_Derived_Record_Type) Remove the kludgy update of
3520 access discriminant and anonymous access component scopes.
3521 (Inherit_Component): Reuse the itype of an access discriminant
3522 or anonymous access component by copying it in order to set the proper
3523 scope. This is done only when the parent and the derived type
3524 are in different scopes.
3525 (Set_Anonymous_Etype): New routine.
3527 2011-09-01 Robert Dewar <dewar@adacore.com>
3529 * a-convec.adb: Minor reformatting throughout.
3531 2011-09-01 Jose Ruiz <ruiz@adacore.com>
3533 * adaint.c, adaint.h (__gnat_cpu_alloc, __gnat_cpu_alloc_size,
3534 __gnat_cpu_set_free): Create these wrappers around the CPU_ALLOC,
3535 CPU_ALLOC_SIZE and CPU_FREE linux macros.
3536 (__gnat_cpu_zero, __gnat_cpu_set): Use the CPU_ZERO_S and
3537 CPU_SET_S respectively because we are now using dynamically allocated
3538 CPU sets which are more portable across different glibc versions.
3539 * s-osinte-linux.ads (cpu_set_t_ptr, CPU_ALLOC, CPU_ALLOC_SIZE,
3540 CPU_FREE): Add this type and subprograms to be able to create cpu_set_t
3541 masks dynamically according to the number of processors in the target
3543 (CPU_ZERO, CPU_SET): They are now mapped to the CPU_ZERO_S and CPU_SET_S
3544 respectively, so we need to pass the size of the masks as
3546 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use dynamically
3547 created cpu_set_t masks
3548 with the number of processors available in the target platform,
3549 instead of static bit arrays. It enhances portability because
3550 it uses the information from the target platform.
3551 * sem_ch8.adb: (Attribute_Renaming): When checking whether we
3552 are using a restricted run-time library, use the flag
3553 Configurable_Run_Time_Mode instead of Restricted_Profile.
3555 2011-09-01 Vincent Celier <celier@adacore.com>
3557 * ug_words: Add /MULTI_UNIT_INDEX= -> -gnateI
3558 * vms_data.ads: Add new VMS qualifier equivalent for -gnateInnn
3560 2011-09-01 Nicolas Roche <roche@adacore.com>
3562 * adaint.c (__gnat_tmp_name): Don't use tmpnam function from the system
3563 on VxWorks in kernel mode.
3565 2011-09-01 Jose Ruiz <ruiz@adacore.com>
3567 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use the linux
3568 macros for handling CPU sets (CPU_ZERO, CPU_SET) instead of modifying
3569 directly the bit array.
3570 * s-osinte-linux.ads (CPU_ZERO, CPU_SET): Import these wrappers around
3571 the linux macros with the same name.
3572 * adaint.h, adaint.c (__gnat_cpu_zero, __gnat_cpu_set): Create these
3573 wrappers around the CPU_ZERO and CPU_SET linux macros.
3575 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
3577 * exp_ch7.adb (Find_Insertion_List): Removed.
3578 (Process_Transient_Objects): Insert the declarations of the hook
3579 access type and the hook object before the associated transient object.
3581 2011-09-01 Jose Ruiz <ruiz@adacore.com>
3583 * sem_ch8.adb (Attribute_Renaming): Add missing check to avoid loading
3584 package System.Aux_Dec when using restricted run-time libraries which
3585 do not have this package.
3587 2011-09-01 Tristan Gingold <gingold@adacore.com>
3589 * s-vaflop-vms-alpha.adb: Remove pragma optimize, useless.
3591 2011-09-01 Bob Duff <duff@adacore.com>
3593 * sem_attr.adb (Analyze_Access_Attribute): Do not call
3594 Kill_Current_Values for P'Unrestricted_Access, where P is library level
3596 2011-09-01 Thomas Quinot <quinot@adacore.com>
3598 * exp_ch5.adb: Minor reformatting
3599 * gnat_ugn.texi: Fix minor typos.
3600 * gcc-interface/Make-lang.in: Update dependencies.
3602 2011-09-01 Robert Dewar <dewar@adacore.com>
3604 * inline.adb, sem_aggr.adb: Minor reformatting.
3606 2011-09-01 Ed Schonberg <schonberg@adacore.com>
3608 * a-convec.adb: Proper handling of cursors for Ada2012 iterators.
3610 2011-09-01 Robert Dewar <dewar@adacore.com>
3612 * prj-proc.adb, exp_ch6.adb, prj-env.adb: Minor reformatting.
3614 2011-09-01 Bob Duff <duff@adacore.com>
3616 * sem_aggr.adb (Resolve_Aggregate): Need to treat "in instance
3617 body" the same as "in inlined body", because visibility shouldn't
3620 2011-09-01 Eric Botcazou <ebotcazou@adacore.com>
3622 * inline.adb (Add_Inlined_Body): Refine previous change.
3624 2011-09-01 Gary Dismukes <dismukes@adacore.com>
3626 * exp_ch6.ads (Needs_BIP_Alloc_Form): New utility function.
3627 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
3628 Test for case where call
3629 initializes an object of a return statement before testing for
3630 a constrained call, to ensure that all such cases get handled
3631 by simply passing on the caller's parameters. Also, in that
3632 case call Needs_BIP_Alloc_Form to determine whether to pass on
3633 the BIP_Alloc_Form parameter of the enclosing function rather
3634 than testing Is_Constrained. Add similar tests for the return
3635 of a BIP call to later processing to ensure consistent handling.
3636 (Needs_BIP_Alloc_Form): New utility function.
3637 * sem_ch6.adb: (Create_Extra_Formals): Replace test for adding
3638 a BIP_Alloc_Form formal with call to new utility function
3639 Needs_BIP_Alloc_Form.
3641 2011-09-01 Pascal Obry <obry@adacore.com>
3643 * prj-part.adb: Minor reformatting.
3645 2011-09-01 Vincent Celier <celier@adacore.com>
3647 * prj-env.adb (Create_Mapping_File.Process): Encode the upper
3648 half character in the unit name.
3650 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
3652 * exp_ch4.adb: Minor code and comment reformatting.
3654 2011-09-01 Thomas Quinot <quinot@adacore.com>
3656 * exp_ch6.adb (Expand_Inlined_Call): Remove redundant tests
3657 for Is_Limited_Type and Is_Tagged_Type in condition checking
3658 for by-reference type.
3659 * inline.adb (Add_Inlined_Body): Only exclude init_procs. Other
3660 subprograms may have a completion because of a previous
3661 Inline_Always clause, but the enclosing package must be marked
3662 inlined for the subprogram body to become visible to the backend.
3664 2011-09-01 Thomas Quinot <quinot@adacore.com>
3666 * sem_aux.adb, exp_ch4.adb: Minor reformatting
3668 2011-09-01 Pascal Obry <obry@adacore.com>
3670 * prj-proc.adb, prj.ads, sinput-p.adb: Minor reformatting.
3672 2011-09-01 Ed Schonberg <schonberg@adacore.com>
3674 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Generate references to
3675 the formals of a subprogram stub that acts as a spec.
3677 2011-09-01 Ed Schonberg <schonberg@adacore.com>
3679 * exp_ch6.adb (Expand_Inlined_Call): If an actual is a by_reference
3680 type, declare a renaming for it, not an object declaration.
3682 2011-09-01 Yannick Moy <moy@adacore.com>
3684 * ali-util.adb, ali-util.ads (Read_Withed_ALIs): Add parameter
3685 Ignore_Errors to ignore failures to read ALI files when True.
3687 2011-09-01 Javier Miranda <miranda@adacore.com>
3689 * exp_ch3.adb (Expand_N_Object_Declaration): Handle non-default
3690 constructor calls associated with non-tagged record types.
3692 2011-09-01 Robert Dewar <dewar@adacore.com>
3694 * g-socthi-vms.adb: Minor reformatting.
3696 2011-09-01 Nicolas Roche <roche@adacore.com>
3698 * sysdep.c: Don't use macro functions for stdio functions on VxWorks
3699 in order to avoid impact of imcompatible changes.
3700 * cstreams.c: Likewise
3702 * aux-io.c: Likewise
3704 2011-09-01 Yannick Moy <moy@adacore.com>
3706 * lib-writ.adb (Write_With_Lines): Always output complete information
3707 on "with" line in Alfa mode, as this is required by formal verification
3710 2011-09-01 Tristan Gingold <gingold@adacore.com>
3712 * g-socthi-vms.adb: Add comments.
3714 2011-09-01 Pascal Obry <obry@adacore.com>
3716 * prj.ads: Minor reformatting.
3718 2011-09-01 Vincent Celier <celier@adacore.com>
3720 * prj-env.adb (Create_Config_Pragmas_File.Check): Put all naming
3721 exceptions in the config pragmas file.
3723 2011-09-01 Tristan Gingold <gingold@adacore.com>
3725 * gnat_ugn.texi: Document GNAT_STACK_SIZE on IVMS.
3727 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
3729 * exp_ch7.adb (Find_Insertion_List): New routine.
3730 (Process_Transient_Objects): Add code to handle the abnormal
3731 finalization of a controlled transient associated with a subprogram
3732 call. Since transients are cleaned up right after the associated
3733 context, an exception raised during a subprogram call may bypass the
3736 2011-09-01 Robert Dewar <dewar@adacore.com>
3738 * exp_ch6.adb (Expand_Call): Check actual for aliased parameter is
3741 2011-09-01 Robert Dewar <dewar@adacore.com>
3743 * exp_ch4.adb, a-exexda.adb: Minor reformatting.
3745 2011-09-01 Robert Dewar <dewar@adacore.com>
3747 * s-taskin.ads, s-tassta.adb, sem_ch13.adb: Minor reformatting.
3749 2011-09-01 Thomas Quinot <quinot@adacore.com>
3751 * Makefile.rtl: Move s-oscons.o from GNATRTL_TASKING_OBJS to
3752 GNATRTL_NONTASKING_OBJS.
3754 2011-09-01 Robert Dewar <dewar@adacore.com>
3756 * einfo.ads (Is_Aliased): Fix existing documentation and add note on
3757 possibility of this flag being set for formals in Ada 2012 mode.
3758 * par-ch6.adb (P_Formal_Part): Handle aliased for parameters for Ada
3760 * sem_ch6.adb (Process_Formals): Handle aliased parameters in Ada 2012
3762 * sinfo.adb (Aliased_Present): Allowed in N_Parameter_Specification for
3764 * sinfo.ads (Aliased_Present): Allowed in N_Parameter_Specification for
3767 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
3769 * exp_ch4.adb (Find_Insertion_Node): New routine. Determines the proper
3770 insertion node in a tree of nested Expression_With_Actions nodes.
3771 (Process_Transient_Object): In the case where a complex if statement
3772 has been converted into nested Expression_With_Actions nodes, the
3773 "hook" object and the associated access type must be inserted before
3774 the top most Expression_With_Actions.
3776 2011-09-01 Robert Dewar <dewar@adacore.com>
3778 * a-cbprqu.adb, a-cbprqu.ads, a-cuprqu.adb, a-cuprqu.ads,
3779 a-cbsyqu.adb, a-cbsyqu.ads: Minor reformatting.
3781 2011-09-01 Ed Schonberg <schonberg@adacore.com>
3783 * sem_attr.adb: Conditionalize aliasing predicates to Ada2012.
3785 2011-09-01 Jose Ruiz <ruiz@adacore.com>
3787 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the CPU
3789 * aspects.adb (Canonical_Aspect): Add entry for the CPU aspect.
3790 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the CPU aspect
3791 in a similar way as we do for the Priority or Dispatching_Domain aspect.
3792 * s-mudido-affinity.adb (Dispatching_Domain_Tasks,
3793 Dispatching_Domains_Frozen): Move this local data to package
3794 System.Tasking because with the CPU aspect we need to have access
3795 to this data when creating the task in System.Tasking.Stages.Create_Task
3796 * s-taskin.ads (Dispatching_Domain_Tasks, Dispatching_Domains_Frozen):
3797 Move these variables from the body of
3798 System.Multiprocessors.Dispatching_Domains because with the CPU aspect
3799 we need to have access to this data when creating the task in
3800 System.Tasking.Stages.Create_Task.
3801 * s-taskin.adb (Initialize): Signal the allocation of the environment
3802 task to a CPU, if any, so that we know whether the CPU can be
3803 transferred to a different dispatching domain.
3804 * s-tassta.adb (Create_Task): Check whether the CPU to which this task
3805 is being allocated belongs to the dispatching domain where the task
3806 lives. Signal the allocation of the task to a CPU, if any, so that we
3807 know whether the CPU can be transferred to a different dispatching
3810 2011-09-01 Ed Schonberg <schonberg@adacore.com>
3812 * exp_attr.adb, sem_attr.adb, snames.ads-tmpl: Implementation of
3813 attributes Same_Storage and Overlaps_Storage.
3815 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
3817 * exp_strm.adb: Remove with and use clause for Opt.
3818 (Build_Array_Input_Function): Remove the version-dependent generation
3819 of the return statement. The Ada 2005 tree is now the default.
3821 2011-09-01 Yannick Moy <moy@adacore.com>
3823 * put_alfa.adb: Unconditionnally write files in Alfa section, so that
3824 it is never empty when compiling in Alfa mode.
3826 2011-09-01 Robert Dewar <dewar@adacore.com>
3828 * sem_aggr.adb, sem_ch3.adb, a-direct.adb, s-taprop-vxworks.adb,
3829 comperr.adb, exp_ch9.adb, exp_pakd.adb, sem_ch12.adb, freeze.adb,
3830 s-taprop-mingw.adb, s-taprop-linux.adb, s-taprop-solaris.adb,
3831 gnat1drv.adb, a-rbtgbo.adb, exp_dist.adb: Minor reformatting
3833 2011-09-01 Matthew Heaney <heaney@adacore.com>
3835 * Makefile.rtl, impunit.adb: Add a-csquin.ads, a-cusyqu.ad[sb],
3836 a-cuprqu.ad[sb], a-cbsyqu.ad[sb], a-cbprqu.ad[sb]
3837 * a-csquin.ads: New Ada 2012 unit that specifies the queue interface
3838 * a-cusyqu.ads, a-cusyqu.adb: New Ada 2012 unit that specifies the
3839 unbounded queue container.
3840 * a-cbsyqu.ads, a-cbsyqu.adb: New Ada 2012 unit that specifies the
3841 bounded queue container.
3842 * a-cuprqu.ads, a-cuprqu.adb: New Ada 2012 unit that specifies the
3843 unbounded priority queue container.
3844 * a-cbprqu.ads, a-cbprqu.adb: New Ada 2012 unit that specifies the
3845 bounded priority queue container.
3847 2011-08-31 Pascal Obry <obry@adacore.com>
3849 * a-direct.adb: Do not try to create an UNC path on Windows.
3850 (Create_Path): Skip leading computer name in UNC path if any.
3852 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3854 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): Remove the
3855 version-dependent generation of the return statement. The Ada 2005 tree
3858 2011-08-31 Thomas Quinot <quinot@adacore.com>
3860 * rtsfind.ads, exp_dist.adb (Find_Numeric_Representation): Predefined
3861 types Stream_Element_Offset and Storage_Offset have a different native
3862 type depending on whether the platform is 32 or 64 bits. When
3863 exchanging them, always convert to 64 bits.
3865 2011-08-31 Yannick Moy <moy@adacore.com>
3867 * debug.adb: Reserve debug option -gnatd.E for passing gnatprove option
3868 --force-alfa to gnat2why.
3870 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3872 * sem_ch12.adb (Save_References): If the node has aspects, save
3873 references within the corresponding expressions in a separate step,
3874 because the aspects are not directly in the tree for the declaration
3875 to which they belong.
3877 2011-08-31 Arnaud Charlet <charlet@adacore.com>
3879 * freeze.adb (Freeze_Record_Type): Omit test on variable size component
3880 in CodePeer mode, since representation clauses are partially ignored.
3881 * gcc-interface/Make-lang.in: Update dependencies.
3883 2011-08-31 Jose Ruiz <ruiz@adacore.com>
3885 * s-taprop-vxworks.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
3886 s-taprop-solaris.adb (Create_Task): Not_A_Specific_CPU can be assigned
3887 to any dispatching domain.
3889 2011-08-31 Thomas Quinot <quinot@adacore.com>
3891 * exp_ch4.adb: Minor reformatting.
3893 2011-08-31 Bob Duff <duff@adacore.com>
3895 * sem_ch6.adb (Get_Generic_Parent_Type): Don't query Subtype_Indication
3896 on nodes for which it is not defined.
3897 (Is_Non_Overriding_Operation): Exit the loop when we find a generic
3900 2011-08-31 Bob Duff <duff@adacore.com>
3902 * sem_ch3.adb (Process_Full_View): Disable legality check if
3903 In_Instance, to avoid spurious errors.
3904 * sem_ch12.adb (Validate_Derived_Type_Instance): Disable legality check
3905 if In_Instance, to avoid spurious errors.
3907 2011-08-31 Pascal Obry <obry@adacore.com>
3909 * a-direct.adb: Use Dir_Seps everywhere to properly handle all
3910 directory speparators.
3911 (Compose): Use Dir_Seps to handle both forms.
3912 (Create_Path): Use Dir_Seps instead of explicit check, no semantic
3914 (Extension): Use Dir_Seps to handle both forms.
3916 2011-08-31 Pascal Obry <obry@adacore.com>
3918 * prj-conf.adb: Minor reformatting.
3920 2011-08-31 Jose Ruiz <ruiz@adacore.com>
3922 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the
3923 dispatching domain aspect.
3924 * aspects.adb (Canonical_Aspect): Add entry for the dispatching domain
3926 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the
3927 Dispatching_Domain aspect in a similar way as we do for the Priority
3929 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Add the
3930 Dispatching_Domain component if a Dispatching_Domain pragma or aspect
3932 (Make_Task_Create_Call): Add the Dispatching_Domain when creating a task
3933 * par-prag.adb (Prag): Add Pragma_Dispatching_Domain as a known pragma.
3934 * sem_prag.adb (Analyze_Pragma): Check the correctness of a pragma
3935 Dispatching_Domain and add it to the task definition.
3936 (Sig_Flags): Add Pragma_Dispatching_Domain.
3937 * rtsfind.ads, rtsfind.adb (RTU_Id, RE_Id, Get_Unit_Name): Add the
3938 support to find the types Dispatching_Domain and
3939 Dispatching_Domain_Access.
3940 * sinfo.ads, sinfo.adb (Has_Pragma_Dispatching_Domain,
3941 Set_Has_Pragma_Dispatching_Domain): Add these subprograms to set and
3942 query the availability of a pragma Dispatching_Domain.
3943 * snames.ads-tmpl (Name_uDispatching_Domain): Add this name required by
3944 the expander to pass the Dispatching_Domain when creating a task.
3945 (Name_Dispatching_Domain): Add this new name for a pragma.
3946 (Pragma_Id): Add the new Pragma_Dispatching_Domain.
3947 * s-tassta.ads, s-tassta.adb (Create_Task): Set the domain to which the
3948 task has been allocated at creation time.
3949 * s-tarest.adb (Create_Restricted_Task): The dispatching domain using
3950 Ravenscar is always null.
3951 * s-taskin.ads, s-taskin.adb (Initialize_ATCB): Set the domain to which
3952 the task has been allocated at creation time.
3953 * s-tporft.adb (Register_Foreign_Thread): A foreign task will not have
3954 a specific dispatching domain.
3955 * s-taprop-linux.adb, s-taprop-solaris.adb, s-taprop-vxworks.adb,
3956 s-taprop-mingw.adb (Create_Task): Check whether both Dispatching_Domain
3957 and CPU are specified for the task, and the CPU value is not contained
3958 within the range of processors for the domain.
3960 2011-08-31 Vincent Celier <celier@adacore.com>
3962 * make.adb (Original_Gcc) : New constant String_Access.
3963 (Gnatmake): For VM targets, do not use VM version of the compiler if
3964 --GCC= has been specified.
3966 2011-08-31 Thomas Quinot <quinot@adacore.com>
3968 * sem_ch5.adb: Minor reformatting.
3970 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3972 * exp_pakd.adb (Convert_To_PAT_Type): If prefix is a function call, do
3975 2011-08-31 Bob Duff <duff@adacore.com>
3977 * exp_ch4.adb (Expand_N_Selected_Component): Use the full type, in case
3978 the access type is private; we don't care about privacy in expansion.
3980 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3982 * sem_aggr.adb (Resolve_Aggregate): In an instance, ignore aggregate
3983 subcomponents tnat may be limited, because they originate in view
3984 conflicts. If the original aggregate is legal and the actuals are
3985 legal, the aggregate itself is legal.
3987 2011-08-31 Matthew Heaney <heaney@adacore.com>
3989 * a-rbtgbo.adb (Clear_Tree): Assert representation invariant for lock
3992 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3994 * sem_ch5.adb: Set kind of loop parameter properly, to preserve all
3997 2011-08-31 Jose Ruiz <ruiz@adacore.com>
3999 * sem_ch13.adb (Analyze_Aspect_Specifications): For the Priority and
4000 Interrupt_Priority aspects, force the analysis of the aspect expression
4001 (when building the equivalent pragma). Otherwise, its analysis is done
4002 too late, after the task or protected object has been created.
4003 * sem_ch9.adb (Analyze_Single_Protected_Declaration,
4004 Analyze_Single_Task_Declaration): Remove the code to move the aspects
4005 to the object declaration because they are needed in the type
4008 2011-08-31 Robert Dewar <dewar@adacore.com>
4010 * exp_ch5.adb, exp_ch7.ads, sem_ch5.adb, put_scos.adb, s-rannum.adb,
4011 a-rbtgbo.adb, exp_intr.adb, a-cbdlli.adb, a-cbdlli.ads: Minor
4014 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
4016 * exp_util.adb (Find_Protection_Type): Do not look for fields _object
4017 if the corresponding type is malformed due to restriction violations.
4019 2011-08-31 Robert Dewar <dewar@adacore.com>
4021 * s-ransee.ads, s-ransee.adb: Minor reformatting.
4023 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
4025 * exp_ch4.adb (Expand_N_Allocator): Correct faulty condition which
4026 would cause the generation of Set_Finalize_Address if the target is a
4027 VM and the designated type is not derived from [Limited_]Controlled.
4029 2011-08-31 Arnaud Charlet <charlet@adacore.com>
4031 * comperr.adb, comperr.ads, gnat1drv.adb (Delete_SCIL_Files): New
4033 (Compiler_Abort, Gnat1drv): Call Delete_SCIL_Files in codepeer mode in
4034 case of a compilation error.
4036 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
4038 * init.c (__gnat_error_handler): Standardize the stack overflow or
4039 erroneous memory access message.
4040 * seh_init.c (__gnat_SEH_error_handler): Standardize the stack overflow
4041 or erroneous memory access message.
4043 2011-08-31 Robert Dewar <dewar@adacore.com>
4045 * sem_ch4.adb: Minor reformatting.
4046 * sem_ch6.adb: Minor code reorganization (use Ekind_In).
4048 2011-08-31 Thomas Quinot <quinot@adacore.com>
4050 * scos.ads: Minor documentation clarification.
4051 * put_scos.adb: Do not generate SCO unit header line for a unit that
4054 2011-08-31 Robert Dewar <dewar@adacore.com>
4056 * a-rbtgbo.adb, alfa_test.adb: Minor reformatting.
4058 2011-08-31 Tristan Gingold <gingold@adacore.com>
4060 * exp_ch7.ads, exp_ch7.adb (Finalization_Exception_Data): New type to
4061 hold variables between these following subprograms.
4062 (Build_Exception_Handler, Build_Object_Declarations,
4063 Build_Raise_Statement): Use the above type as parameter.
4064 Make the above adjustments.
4065 * exp_intr.adb (Expand_Unc_Deallocation): Adjust.
4067 2011-08-31 Pascal Obry <obry@adacore.com>
4069 * projects.texi: Minor reformatting.
4071 2011-08-31 Tristan Gingold <gingold@adacore.com>
4073 * s-ransee.ads, s-ransee.adb: Add system.random_seed unit.
4074 * s-rannum.adb (Reset): Use Get_Seed from s-ransee.
4076 2011-08-31 Ed Schonberg <schonberg@adacore.com>
4078 * exp_ch5.adb: Minor code cleanup.
4079 * sem_ch5.adb (Analyze_Iteration_Scheme): Set ekind of loop variable to
4080 prevent cascaded errors.
4081 (Analyze_Loop_Statement): In semantics-only mode, introduce loop
4082 variable of an iterator specification in current scope.
4083 * sem_ch6.adb (Analyze_Return_Statement, Find_what_It_Apples_To): Skip
4084 postconditions on the stack, as they contain no return statements.
4086 2011-08-31 Yannick Moy <moy@adacore.com>
4088 * exp_alfa.adb (Expand_Alfa_N_Package_Declaration,
4089 Expand_Alfa_N_Subprogram_Body): Remove useless procedures which simply
4090 call Qualify_Entity_Names.
4091 (Expand_Alfa): call Qualify_Entity_Names in more cases
4092 * lib-xref-alfa.adb: Take into account system package.
4093 * sem_prag.adb Take into account restrictions in Alfa mode, contrary to
4094 CodePeer mode in which we are interested in finding bugs even if
4095 compiler cannot compile source.
4096 * sem_util.adb, sem_util.ads (Unique_Entity): Take into account case of
4099 2011-08-31 Gary Dismukes <dismukes@adacore.com>
4101 * sem_ch3.adb (Constrain_Concurrent): Retrieve Base_Type of the subtype
4102 denoted by the subtype mark to ensure getting the concurrent type in
4103 the case where the subtype mark denotes a private subtype of a
4104 concurrent type (needed when using -gnatc).
4105 (Process_Subtype): For the processing specific to type kinds, case on
4106 the Base_Type kind of the Subtype_Mark_Id, to handle cases where the
4107 subtype denotes a private subtype whose base type is nonprivate (needed
4108 for subtypes of private fulfilled by task types when compiling with
4111 2011-08-31 Gary Dismukes <dismukes@adacore.com>
4113 * sem_disp.adb (Check_Dispatching_Operation): Bypass registration of
4114 late primitives that override interface operations when the full
4115 expander is not active, to avoid blowups in Register_Primitive when
4116 types don't have associated secondary dispatch tables.
4118 2011-08-31 Yannick Moy <moy@adacore.com>
4120 * alfa_test.adb: Code clean up.
4122 2011-08-31 Marc Sango <sango@adacore.com>
4124 * restrict.adb (Check_SPARK_Restriction): Change Comes_From_Source (N)
4125 by Comes_From_Source (Original_Node (N)) in order to treat also the
4126 nodes which have been rewritten.
4127 * sem_ch4.adb (Analyze_Explicit_Dereference, Analyze_Slice): Guard the
4128 explicit dereference and slice violation in spark mode on the nodes
4129 coming only from the source code.
4131 2011-08-31 Robert Dewar <dewar@adacore.com>
4133 * exp_ch5.adb, exp_alfa.ads, prj.ads, sem_attr.adb,
4134 lib-xref-alfa.adb: Minor reformatting.
4136 2011-08-31 Matthew Heaney <heaney@adacore.com>
4138 * a-crbltr.ads (Tree_Type): Default-initialize the Nodes component.
4140 2011-08-31 Javier Miranda <miranda@adacore.com>
4142 * sem_ch4.adb (Try_Object_Operation): Addition of one formal to search
4143 only for class-wide subprograms conflicting with entities of concurrent
4146 2011-08-31 Matthew Heaney <heaney@adacore.com>
4148 * a-rbtgbo.adb (Generic_Allocate): Initialize pointer components of
4151 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
4153 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): Provide a more
4154 general description of the routine.
4156 2011-08-31 Ed Schonberg <schonberg@adacore.com>
4158 * a-cbdlli.adb, a-cbdlli.ads: Add iterator machinery to bounded
4159 doubly-linked lists.
4161 2011-08-31 Gary Dismukes <dismukes@adacore.com>
4163 * exp_ch5.adb (Expand_N_Assignment_Statement): When a discriminant
4164 check is needed for a left-hand side that is a dereference, and the
4165 base type is private without discriminants (whereas the full type does
4166 have discriminants), an extra retrieval of the underlying type may be
4167 needed in the case where the subtype is a record subtype whose base
4168 type is private. Update comments.
4170 2011-08-31 Javier Miranda <miranda@adacore.com>
4172 * sem_ch4.adb (Try_Object_Operation): When a dispatching primitive is
4173 found check if there is a class-wide subprogram covering the primitive.
4175 2011-08-31 Yannick Moy <moy@adacore.com>
4177 * sem_res.adb: Further cases where full expansion test is needed,
4178 rather than expansion test.
4180 2011-08-31 Pascal Obry <obry@adacore.com>
4182 * prj-attr.adb: Fix Source_File_Switches attribute kind (must be a list)
4184 2011-08-31 Ed Schonberg <schonberg@adacore.com>
4186 * exp_ch5.adb: Handle iterators over derived container types.
4188 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
4190 * einfo.ads, einfo.adb: Add new flag Has_Anonymous_Master.
4191 (Has_Anonymous_Master): New routine.
4192 (Set_Has_Anonymous_Master): New routine.
4193 (Write_Entity_Flags): Add an entry for Has_Anonymous_Master.
4194 * exp_ch4.adb: Add with and use clause for Sem_Ch8.
4195 (Current_Anonymous_Master): New routine.
4196 (Current_Unit_First_Declaration): Removed.
4197 (Current_Unit_Scope): Removed.
4198 (Expand_N_Allocator): Anonymous access-to-controlled types now chain
4199 their objects on a per-unit heterogeneous finalization master.
4201 2011-08-31 Matthew Heaney <heaney@adacore.com>
4203 * a-cbhama.adb, a-cbhase.adb (Insert): Check for zero-length buckets
4206 2011-08-31 Jose Ruiz <ruiz@adacore.com>
4208 * s-taprop-linux.adb (Create_Task): Avoid changing the affinity mask
4211 2011-08-31 Gary Dismukes <dismukes@adacore.com>
4213 * sem_disp.adb (Propagate_Tag): Return without propagating in the case
4214 where the actual is an unexpanded call to 'Input.
4216 2011-08-31 Yannick Moy <moy@adacore.com>
4218 * sem_ch4.adb: Code clean up.
4220 2011-08-31 Yannick Moy <moy@adacore.com>
4222 * exp_alfa.adb, exp_alfa.ads: Minor correction of copyright notice.
4224 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
4226 * exp_ch7.adb (Build_Array_Deep_Procs): Do not generate Deep_Finalize
4227 and TSS primitive Finalize_Address if finalization is suppressed.
4228 (Build_Record_Deep_Procs): Do not generate Deep_Finalize and TSS
4229 primitive Finalize_Address if finalization is suppressed.
4231 2011-08-31 Jose Ruiz <ruiz@adacore.com>
4233 * s-mudido-affinity.adb, s-taprop-linux.adb, s-taprop-mingw.adb,
4234 s-taprop-solaris.adb, s-taprop-vxworks.adb (Set_Task_Affinity): Make
4235 sure that the underlying task has already been created before trying
4236 to change its affinity.
4237 (Set_CPU): Use the term processor instead of CPU, as we do in
4240 2011-08-31 Vincent Celier <celier@adacore.com>
4242 * prj-attr.adb: New Compiler attribute Source_File_Switches.
4243 * prj-nmsc.adb (Process_Compiler): Process attribute
4244 Source_File_Switches.
4245 * prj.ads (Language_Config): New name list component
4246 Name_Source_File_Switches.
4247 * snames.ads-tmpl (Name_Source_File_Switches): New standard name.
4249 2011-08-31 Ed Schonberg <schonberg@adacore.com>
4251 * sem_attr.adb (Analyze_Attribute, case 'Old): If prefix may be a
4252 discriminated component of an actual, expand at once to prevent
4253 ouf-of-order references with generated subtypes.
4255 2011-08-31 Yannick Moy <moy@adacore.com>
4257 * lib-xref-alfa.adb (Add_Alfa_Xrefs): Do not take into account read
4258 reference to operator in Alfa xrefs.
4260 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
4262 * sem_ch12.adb (Freeze_Subprogram_Body): Add code to handle the case
4263 where the parent instance was frozen before the current instance due to
4264 the presence of a source body. Update calls to Insert_After_Last_Decl.
4265 (Insert_After_Last_Decl): Renamed to Insert_Freeze_Node_For_Instance.
4266 Update the comment which illustrates the purpose of the routine.
4267 Package instances are now frozen by source bodies which appear after
4268 the instance. This ensures that entities coming from within the
4269 instance are available for use in the said bodies.
4270 (Install_Body): Add code to handle the case where the parent instance
4271 was frozen before the current instance due to the presence of a source
4272 body. Update calls to Insert_After_Last_Decl.
4274 2011-08-31 Jose Ruiz <ruiz@adacore.com>
4276 * s-taprop-linux.adb (Set_Task_Affinity): Avoid the use of anonymous
4278 * affinity.c (__gnat_set_affinity_mask): Declare index variable.
4280 2011-08-31 Yannick Moy <moy@adacore.com>
4282 * sem_ch8.adb (Analyze_Subprogram_Renaming): Refine expander test in
4284 * alfa.adb, alfa.ads, alfa_test.adb, ali.adb, debug.adb, errout.adb,
4285 errout.ads, erroutc.adb, expander.adb, exp_ch4.adb, exp_ch7.adb,
4286 freeze.adb, get_alfa.adb, get_alfa.ads, gnat1drv.adb, lib-writ.adb,
4287 lib-writ.ads, lib-xref.adb, lib-xref.ads, lib-xref-alfa.adb, opt.adb,
4288 opt.ads, put_alfa.adb, put_alfa.ads, restrict.adb, sem_ch12.adb,
4289 sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
4290 sem_prag.adb, sem_res.adb, sem_util.adb: Minor reformatting, renaming
4291 ALFA in Alfa (we dropped acronym).
4292 * einfo.adb (Primitive_Operations): Correctly return list of primitive
4293 operations in a case where it returned previously No_Elist.
4295 2011-08-31 Robert Dewar <dewar@adacore.com>
4297 * s-taprop-vxworks.adb, sem_ch5.adb, s-taprop-tru64.adb, exp_alfa.adb,
4298 s-taprop-vms.adb, bindgen.adb, s-mudido.adb, s-mudido.ads,
4299 sem_res.adb, expander.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
4300 s-taprop-solaris.adb, s-mudido-affinity.adb, vms_conv.adb,
4301 s-taprop-irix.adb, s-taprop.ads, s-taskin.adb, s-taskin.ads,
4302 s-taprop-hpux-dce.adb, a-chtgbo.adb, s-taprop-posix.adb: Minor
4305 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
4307 * sem_ch12 (Check_Private_View): Revert previous change.
4308 * sem_res.adb (Conversion_Check): Do not emit the error message if the
4309 conversion is in a generic instance.
4311 2011-08-31 Matthew Heaney <heaney@adacore.com>
4313 * a-cbhase.adb (Symmetric_Difference): Dereference correct node array.
4314 * a-chtgbo.adb (Free): Allow 0 as index value.
4316 2011-08-31 Matthew Heaney <heaney@adacore.com>
4318 * a-cborma.adb (Insert): Add comment to explain why no element
4321 2011-08-31 Gary Dismukes <dismukes@adacore.com>
4323 * sem_util.adb (Find_Body_Discriminal): Test whether the scope of the
4324 spec discriminant is already a concurrent type, in which case just use
4325 it, otherwise fetch the Corresponding_Concurrent_Type as before.
4327 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
4329 * system-irix-n64.ads, system-linux-armeb.ads, system-linux-armel.ads,
4330 system-linux-mips.ads, system-linux-mipsel.ads,
4331 system-linux-mips64el.ads, system-linux-ppc64.ads,
4332 system-linux-sparcv9.ads, system-rtems.ads: Remove GCC_ZCX_Support.
4334 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
4336 * gcc-interface/ada-tree.h (TYPE_EXTRA_SUBTYPE_P): Add internal check.
4337 * gcc-interface/utils2.c (build_binary_op): Tighten condition.
4338 (build_unary_op): Likewise.
4340 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
4342 * raise-gcc.c: Do not include coretypes.h and tm.h.
4343 (setup_to_install): Remove test for compiler macro.
4344 * targext.c: Document use for the library.
4345 * gcc-interface/Makefile.in: Fix comment on the use of IN_GCC.
4347 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
4349 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not convert
4350 the expression to the nominal type if the latter is a record type with
4351 a variant part and the type of the former is a record type without one.
4353 2011-08-30 Yannick Moy <moy@adacore.com>
4355 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
4356 expansion in Alfa mode.
4357 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public
4358 * exp_alfa.adb, exp_alfa.ads: New package defining light expansion for
4360 * gnat1drv.adb (Adjust_Global_Switches): Update Comment.
4361 * sem_res.adb: Ditto.
4362 * gcc-interface/Make-lang.in: Update dependencies.
4364 2011-08-30 Thomas Quinot <quinot@adacore.com>
4366 * g-socket.ads: Minor documentation adjustment.
4368 2011-08-30 Robert Dewar <dewar@adacore.com>
4370 * exp_ch9.adb, s-tassta.adb, s-secsta.adb: Minor reformatting.
4372 2011-08-30 Yannick Moy <moy@adacore.com>
4374 * exp_ch6_light.adb, exp_ch6_light.ads, exp_attr_light.adb,
4375 exp_attr_light.ads, exp_ch7_light.adb, exp_ch7_light.ads,
4376 exp_light.adb, exp_light.ads, exp_prag.adb, expander.adb,
4377 gnat1drv.adb, exp_ch11.adb, exp_ch6.adb, exp_ch6.ads, exp_aggr.adb:
4378 Revert change which introduced files for "light"
4379 expansion, to be replaced by a single file for Alfa expansion.
4381 2011-08-30 Robert Dewar <dewar@adacore.com>
4383 * opt.ads, s-soflin.adb, exp_ch9.adb, sem_res.adb: Update comment.
4384 Minor code reorg/reformatting.
4386 2011-08-30 Yannick Moy <moy@adacore.com>
4388 * opt.adb, opt.ads (Full_Expander_Active): New function defines a
4389 common shorthand for (Expander_Active and not ALFA_Mode) that can be
4390 used for testing full expansion, that is active expansion not in the
4391 reduced mode for Alfa
4392 * exp_ch4.adb, exp_ch9.adb, exp_disp.adb, sem_ch10.adb, sem_ch12.adb,
4393 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Use newly defined "flag" instead
4394 of the verbose (Expander_Active and not ALFA_Mode)
4396 2011-08-30 Tristan Gingold <gingold@adacore.com>
4398 * s-parame-vms-alpha.ads, s-parame-hpux.ads, s-tassta.adb,
4399 s-tarest.adb, s-parame-vms-ia64.ads, s-soflin.adb, s-secsta.adb,
4400 s-secsta.ads, s-parame.ads, s-parame-vxworks.ads, s-parame-ae653.ads:
4401 Renames Ratio to Percentage, and Sec_Stack_Ratio to Sec_Stack_Percentage
4403 2011-08-30 Gary Dismukes <dismukes@adacore.com>
4405 * sem_res.adb (Valid_Conversion): Revise test for implicit anonymous
4406 access conversions to check that the conversion is a rewritten node,
4407 rather than just having Comes_From_Source set to False, which wasn't
4410 2011-08-30 Robert Dewar <dewar@adacore.com>
4412 * exp_ch9.adb, sem_ch9.adb, sem_ch6.adb, exp_disp.adb,
4413 g-socket.ads: Minor reformatting.
4415 2011-08-30 Thomas Quinot <quinot@adacore.com>
4417 * sem_util.adb: Minor reformatting.
4419 2011-08-30 Tristan Gingold <gingold@adacore.com>
4421 * raise-gcc.c: Never catch exception if _UA_FORCE_UNWIND flag is set,
4422 to be compliant with the ABI.
4424 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
4426 * sem_ch12.adb (Check_Private_View): Exchange the private and full view
4427 of a designated type when the related access type is an actual in an
4428 instance. This ensures that the full view of designated type is
4429 available when inside the body of the instance.
4431 2011-08-30 Ed Schonberg <schonberg@adacore.com>
4433 * sem_util.adb (May_Be_Lvalue): To determine whether a reference may be
4434 in a position to be modified, a slice is treated like an indexed
4437 2011-08-30 Thomas Quinot <quinot@adacore.com>
4439 * s-oscons-tmplt.c, g-socket.ads: Adjust maximum allowed value for
4440 field tv_sec in struct timeval.
4442 2011-08-30 Yannick Moy <moy@adacore.com>
4444 * exp_ch9.adb, exp_disp.adb, sem_ch9.adb, sem_res.adb: Protect several
4445 blocks of code doing full expansion, previously only guarded by
4446 Expander_Active, by anding the test that ALFA_Mode is not set
4448 2011-08-30 Ed Schonberg <schonberg@adacore.com>
4450 * sem_ch6.adb (Analyze_Return_Type): If the return type is incomplete,
4451 add the function to the list of private dependents, for subsequent
4452 legality check on Taft amendment types.
4453 * sem_ch12.adb (Analyze_Formal_Incomplete_Type): Initialize
4454 Private_Dependents, as for other incomplete types.
4455 * sem_util.adb (Wrong_Type): Avoid cascaded errors when a
4456 Taft-amendment type is used as the return type of a function.
4458 2011-08-30 Javier Miranda <miranda@adacore.com>
4460 * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup: replace code
4461 which emits an error by a call to a new routine which report the error.
4462 * exp_ch9.adb (Build_Wrapper_Spec): Build the wrapper even if the
4463 entity does not cover an existing interface.
4464 * errout.ads, errout.adb (Error_Msg_PT): New routine. Used to factorize
4466 * sem_ch6.adb (Check_Conformance): Add specific error for wrappers of
4467 protected procedures or entries whose mode is not conformant.
4468 (Check_Synchronized_Overriding): Code cleanup: replace code which emits
4469 an error by a call to a new routine which report the error.
4471 2011-08-30 Robert Dewar <dewar@adacore.com>
4473 * gnat_rm.texi: Minor change.
4474 * exp_attr_light.adb: Minor reformatting.
4476 2011-08-30 Ed Schonberg <schonberg@adacore.com>
4478 * sem_ch3.adb: Patch inheritance of aspects in
4479 Complete_Private_Subtype, to avoid infinite loop.
4481 2011-08-30 Javier Miranda <miranda@adacore.com>
4483 * sem_ch3.adb (Add_Internal_Interface_Entities): If serious errors have
4484 been reported and a subprogram covering an interface primitive is not
4485 found then skip generating the internal entity. Done to avoid crashing
4487 (Check_Abstract_Overriding): Change text of error of wrong formal of
4488 protected subprogram or entry. Done for consistency to emit exactly the
4489 same error reported by Check_Synchronized_Overriding. In addition, the
4490 error is restricted to protected types (bug found working on AI05-0090)
4492 2011-08-30 Yannick Moy <moy@adacore.com>
4494 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
4495 expansion in Alfa mode.
4496 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public.
4497 * exp_light.adb, exp_light.ads: New package defining light expansion.
4498 * expander.adb (Expand): Call light expansion in Alfa mode
4499 * exp_ch6_light.adb, exp_ch6_light.ads: Light expansion of chapter 6
4501 * exp_ch7_light.adb, exp_ch7_light.ads: Light expansion of chapter 7
4503 * exp_attr_light.adb, exp_attr_light.ads: Light expansion of attributes
4504 * gnat1drv.adb (Adjust_Global_Switches): Comment
4506 2011-08-30 Yannick Moy <moy@adacore.com>
4508 * lib-xref-alfa.adb: Minor refactoring.
4510 2011-08-30 Yannick Moy <moy@adacore.com>
4512 * exp_ch9.adb (Expand_Entry_Barrier): Do not perform expansion in Alfa
4514 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not perform
4515 expansion in Alfa mode.
4516 * sem_ch9.adb (Analyze_Entry_Body): Do not perform expansion in Alfa
4519 2011-08-30 Robert Dewar <dewar@adacore.com>
4521 * debug_a.adb: Update comment.
4523 2011-08-30 Robert Dewar <dewar@adacore.com>
4525 * exp_ch5.adb, sem_ch3.adb, sem_ch5.adb, einfo.adb, checks.adb,
4526 sem_util.adb, sem_util.ads, sem_res.adb, s-stposu.adb, sem_attr.adb,
4527 exp_ch4.adb, exp_ch6.adb, lib-xref-alfa.adb,
4528 sem_ch8.adb, sem_disp.adb, exp_ch3.adb: Minor reformatting
4530 2011-08-30 Robert Dewar <dewar@adacore.com>
4532 * gnat_rm.texi: Add section on C.6(16) implementation advice for pragma
4535 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
4537 * exp_ch3.adb (Expand_Freeze_Array_Type): Correct the call to
4538 Build_Finalization_Master by supplying an insertion node and enclosing
4539 scope. In its old version, the call did not generate a finalization
4541 (Expand_Freeze_Record_Type): Add local variable Has_AACC. Add code to
4542 recognize anonymous access-to-controlled components. Rewrite the
4543 machinery which creates finalization masters to service anonymous
4544 access-to-controlled components of a record type. In its current state,
4545 only one heterogeneous master is necessary to handle multiple anonymous
4547 (Freeze_Type): Comment reformatting.
4548 * rtsfind.ads: Add RE_Set_Is_Heterogeneous to tables RE_Id and
4550 * s-stposu.adb (Allocate_Any_Controlled): Rewrite the machinery which
4551 associates TSS primitive Finalize_Address with either the master itself
4552 or with the internal hash table depending on the mode of operation of
4555 2011-08-30 Javier Miranda <miranda@adacore.com>
4557 * exp_ch3.adb (Make_Eq_If): If the etype of the _parent component is an
4558 interface type then do not generate code to compare this component.
4559 Required since they have no components and their equality operator is
4562 2011-08-30 Steve Baird <baird@adacore.com>
4564 * sem_util.ads (Deepest_Type_Access_Level): New function; for the type
4565 of a saooaaat (i.e, a stand-alone object of an anonymous access type),
4566 returns the (static) accessibility level of the object. Otherwise, the
4567 same as Type_Access_Level.
4568 (Dynamic_Accessibility_Level): New function; given an expression which
4569 could occur as the rhs of an assignment to a saooaaat (i.e., an
4570 expression of an access-to-object type), return the new value for the
4571 saooaaat's associated Extra_Accessibility object.
4572 (Effective_Extra_Accessibility): New function; same as
4573 Einfo.Extra_Accessibility except that object renames are looked through.
4575 (Deepest_Type_Access_Level): New function; see sem_util.ads description.
4576 (Dynamic_Accessibility_Level): New function; see sem_util.ads
4578 (Effective_Extra_Accessibility): New function; see sem_util.ads
4580 * einfo.ads (Is_Local_Anonymous_Access): Update comments.
4581 (Extra_Accessibility): Update comments.
4582 (Init_Object_Size_Align): New procedure; same as Init_Size_Align
4583 except RM_Size field (which is only for types) is unaffected.
4585 (Extra_Accessibility): Expand domain to allow objects, not just formals.
4586 (Set_Extra_Accessibility): Expand domain to allow objects, not just
4588 (Init_Size): Add assertion that we are not trashing the
4589 Extra_Accessibility attribute of an object.
4590 (Init_Size_Align): Add assertion that we are not trashing the
4591 Extra_Accessibility attribute of an object.
4592 (Init_Object_Size_Align): New procedure; see einfo.ads description.
4593 * sem_ch3.adb (Find_Type_Of_Object): Set Is_Local_Anonymous_Access
4594 differently for the type of a (non-library-level) saooaaat depending
4595 whether Ada_Version < Ada_2012. This is the only point where Ada_Version
4596 is queried in this set of changes - everything else (in particular,
4597 setting of the Extra_Accessibility attribute in exp_ch3.adb) is
4598 driven off of the setting of the Is_Local_Anonymous_Access attribute.
4599 The special treatment of library-level saooaaats is an optimization,
4600 not required for correctnesss. This is based on the observation that the
4601 Ada2012 rules (static and dynamic) for saooaaats turn out to be
4602 equivalent to the Ada2005 rules in the case of a library-level saooaaat.
4604 (Expand_N_Object_Declaration): If Is_Local_Anonymous_Access is
4605 false for the type of a saooaaat, declare and initialize its
4606 accessibility level object and set the Extra_Accessibility attribute
4607 of the saooaaat to refer to this object.
4608 * checks.adb (Apply_Accessibility_Check): Add Ada 2012 saooaaat support.
4609 * exp_ch4.adb (Expand_N_In): Replace some Extra_Accessibility calls with
4610 calls to Effective_Extra_Accessibility in order to support
4611 renames of saooaaats.
4612 (Expand_N_Type_Conversion): Add new local function,
4613 Has_Extra_Accessibility, and call it when determining whether an
4614 accessibility check is needed.
4615 It returns True iff Present (Effective_Extra_Accessibility (Id)) would
4616 evaluate to True (without raising an exception).
4618 (Expand_N_Assignment_Statement): When assigning to an Ada2012
4619 saooaaat, update its associated Extra_Accessibility object (if
4620 it has one). This includes an accessibility check.
4621 * exp_ch6.adb (Add_Call_By_Copy_Code): When parameter copy-back updates
4622 a saooaaat, update its Extra_Accessibility object too (if it
4624 (Expand_Call): Replace a couple of calls to Type_Access_Level
4625 with calls to Dynamic_Access_Level to handle cases where
4626 passing a literal (any literal) is incorrect.
4627 * sem_attr.adb (Resolve_Attribute): Handle the static accessibility
4628 checks associated with "Saooaat := Some_Object'Access;"; this must
4629 be rejected if Some_Object is declared in a more nested scope
4631 * sem_ch5.adb (Analyze_Assignment): Force accessibility checking for an
4632 assignment to a saooaaat even if Is_Local_Anonymous_Access
4633 returns False for its type (indicating a 2012-style saooaaat).
4635 (Analyze_Object_Renaming): Replace a call to Init_Size_Align
4636 (which is only appropriate for objects, not types) with a call
4637 of Init_Object_Size_Align in order to avoid trashing the
4638 Extra_Accessibility attribute of a rename (the two attributes
4641 (Valid_Conversion) Replace six calls to Type_Access_Level with
4642 calls to Deepest_Type_Access_Level. This is a bit tricky. For an
4643 Ada2012 non-library-level saooaaat, the former returns library level
4644 while the latter returns the (static) accessibility level of the
4645 saooaaat. A type conversion to the anonymous type of a saooaaat
4646 can only occur as part of an assignment to the saooaaat, so we
4647 know that such a conversion must be in a lhs context, so Deepest
4648 yields the result that we need. If such a conversion could occur,
4649 say, as the operand of an equality operator, then this might not
4650 be right. Also add a test so that static accessibilty checks are
4651 performed for converting to a saooaaat's type even if
4652 Is_Local_Anonymous_Access yields False for the type.
4654 2011-08-30 Javier Miranda <miranda@adacore.com>
4656 * sem_disp.adb (Check_Dispatching_Operation): Complete condition that
4657 controls generation of a warning associated with late declaration of
4658 dispatching functions. Required to avoid generating spurious
4661 2011-08-30 Gary Dismukes <dismukes@adacore.com>
4663 * sem_ch6.adb (Check_Return_Subtype_Indication): Issue error if the
4664 return object has an anonymous access type and the function's type is
4665 a named access type.
4666 * sem_ch8.adb (Analyze_Object_Renaming): Suppress error about renaming
4667 conversions on implicit conversions, since such conversions can occur
4668 for anonymous access cases due to expansion. Issue error for attempt
4669 to rename an anonymous expression as an object of a named access type.
4670 * sem_res.ads (Valid_Conversion): Add defaulted parameter Report_Errs,
4671 to indicate whether this function should report errors on invalid
4673 * sem_res.adb (Resolve): For Ada 2012, in the case where the type of
4674 the expression is of an anonymous access type and the expected type is
4675 a named general access type, rewrite the expression as a type
4676 conversion, unless this is an expression of a membership test.
4677 (Valid_Conversion.Error_Msg_N): New procedure that conditions the
4678 calling of Error_Msg_N on new formal Report_Errs.
4679 (Valid_Conversion.Error_Msg_NE): New procedure that conditions the
4680 calling of Error_Msg_NE on new formal Report_Errs.
4681 (Valid_Conversion): Move declaration of this function to the package
4682 spec, to allow calls from membership test processing. For Ada 2012,
4683 enforce legality restrictions on implicit conversions of anonymous
4684 access values to general access types, disallowing such conversions in
4685 cases where the expression has a dynamic accessibility level (access
4686 parameters, stand-alone anonymous access objects, or a component of a
4687 dereference of one of the first two cases).
4688 * sem_type.adb (Covers): For Ada 2012, allow an anonymous access type
4689 in the context of a named general access expected type.
4690 * exp_ch4.adb Add with and use of Exp_Ch2.
4691 (Expand_N_In): Add processing for membership tests applied to
4692 expressions of an anonymous access type. First, Valid_Conversion is
4693 called to check whether the test is statically False, and then the
4694 conversion is expanded to test that the expression's accessibility
4695 level is no deeper than that of the tested type. In the case of
4696 anonymous access-to-tagged types, a tagged membership test is applied
4698 (Tagged_Membership): Extend to handle access type cases, applying the
4699 test to the designated types.
4700 * exp_ch6.adb (Expand_Call): When creating an extra actual for an
4701 accessibility level, and the actual is a 'Access applied to a current
4702 instance, pass the accessibility level of the type of the current
4703 instance rather than applying Object_Access_Level to the prefix. Add a
4704 ??? comment, since this level isn't quite right either (will eventually
4705 need to pass an implicit level parameter to init procs).
4707 2011-08-30 Bob Duff <duff@adacore.com>
4709 * s-taskin.ads: Minor comment fix.
4711 2011-08-30 Ed Schonberg <schonberg@adacore.com>
4713 * sem_res.adb (Check_Parameterless_Call): If the node is a selected
4714 component and the selector is a dispatching operation, check if it is
4715 a prefixed call before rewriting as a parameterless function call.
4717 2011-08-29 Jakub Jelinek <jakub@redhat.com>
4719 * gcc-interface/Makefile.in (../stamp-gnatlib1-$(RTSDIR)): Copy
4720 tsystem.h into $(RTSDIR) instead of rts.
4722 2011-08-29 Robert Dewar <dewar@adacore.com>
4724 * sem_ch10.adb, a-coorse.adb, exp_dist.adb, exp_ch3.adb: Minor
4726 * gcc-interface/Make-lang.in: Update dependencies.
4728 2011-08-29 Yannick Moy <moy@adacore.com>
4730 * alfa.ads (Name_Of_Heap_Variable): New constant name.
4731 * lib-xref-alfa.adb, lib-xref.adb, lib-xref.ads (Drefs): New global
4732 table to hold dereferences.
4733 (Add_ALFA_Xrefs): Take into account dereferences as special
4734 reads/writes to the variable "HEAP".
4735 (Enclosing_Subprogram_Or_Package): Move subprogram here.
4736 (Generate_Dereference): New procedure to store a read/write dereferencew
4738 * put_alfa.adb (Put_ALFA): Use different default than (0,0) used for
4739 the special "HEAP" var.
4740 * sem_ch4.adb (Analyze_Explicit_Dereference): Store read dereference
4742 * sem_util.adb (Note_Possible_Modification): Store write dereference
4745 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4747 * exp_ch3.adb (Freeze_Type): Generate an accessibility check which
4748 ensures that the level of the subpool access type is not deeper than
4749 that of the pool object.
4750 * sem_util.adb (Object_Access_Level): Expand to handle defining
4752 * sem_res.adb (Resolve_Allocator): Add a guard to avoid examining the
4753 subpool handle name of a rewritten allocator.
4755 2011-08-29 Robert Dewar <dewar@adacore.com>
4757 * impunit.adb, exp_ch4.adb, s-finmas.adb: Minor reformatting.
4759 2011-08-29 Thomas Quinot <quinot@adacore.com>
4761 * exp_dist.adb (TC_Rec_Add_Process_Element): For a choice with multiple
4762 values, we generate multiple triples of parameters in the TypeCode.
4763 Bump Choice_Index for each such triple so that a subsequent default
4764 choice is associated with the correct index in the typecode.
4766 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4768 * a-cdlili.adb (Iterate): Initialize properly an iterator over a null
4770 (First, Last): Handle properly an iterator over a null container.
4772 2011-08-29 Bob Duff <duff@adacore.com>
4774 * sem_ch10.adb (Analyze_With_Clause,Install_Withed_Unit): Abandon
4775 processing if we run across a node with no Scope. This can happen if
4776 we're with-ing an library-level instance, and that instance got errors
4777 that caused "instantiation abandoned".
4778 * sem_util.adb (Unit_Declaration_Node): Make it more robust, by raising
4779 an exception instead of using Assert, so it won't go into an infinite
4780 loop, even when assertions are turned off.
4782 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4784 * a-coorse.adb: Proper handling of empty ordered sets.
4786 2011-08-29 Johannes Kanig <kanig@adacore.com>
4788 * debug.adb: Add comments.
4790 2011-08-29 Thomas Quinot <quinot@adacore.com>
4792 * a-except.adb, a-except-2005.adb: Minor comment rewording and
4795 2011-08-29 Yannick Moy <moy@adacore.com>
4797 * sem_ch3.adb (Array_Type_Declaration): Remove insertion of
4798 declaration for Itypes in Alfa mode.
4800 2011-08-29 Robert Dewar <dewar@adacore.com>
4802 * a-cdlili.ads, a-coinve.ads, a-coorma.adb, a-coorma.ads, s-tassta.adb,
4803 a-cborma.adb, a-cborma.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
4804 a-cborse.ads, a-cobove.adb, a-cobove.ads, a-cbhase.ads: Minor
4807 2011-08-29 Tristan Gingold <gingold@adacore.com>
4809 * exp_ch7.adb, exp_ch7.ads (Build_Exception_Handler): Move its spec to
4811 * exp_intr.adb (Expand_Unc_Deallocation): Use Build_Exception_Handler.
4812 * a-except.adb, a-except-2005.adb (Rcheck_22): Do not defer aborts
4815 2011-08-29 Robert Dewar <dewar@adacore.com>
4817 * a-cbhama.adb, a-cbhama.ads: Minor reformatting.
4819 2011-08-29 Javier Miranda <miranda@adacore.com>
4821 * sem_ch8.adb (Analyze_Subprogram_Renaming): Complete support for
4822 renamings of formal subprograms when the actual for a formal type is
4825 2011-08-29 Matthew Heaney <heaney@adacore.com>
4827 * a-cbhama.ads, a-cbhase.ads (Move): Clear Source following assignment
4830 2011-08-29 Matthew Heaney <heaney@adacore.com>
4832 * a-cborma.ads, a-cborse.ads (Cursor): Default-initialize all
4833 components of record type.
4834 * a-cborma.adb, a-cborse.adb (Move): Clear Source following assignmentw
4837 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4839 * a-cbhama.adb, a-cbhama.ads, a-cborma.adb, a-cborma.ads, a-cobove.adb,
4840 a-cobove.ads, a-coorma.adb, a-coorma.ads: Add iterator machinery to
4843 2011-08-29 Robert Dewar <dewar@adacore.com>
4845 * sem_ch3.adb, sem_util.adb, gnat1drv.adb, s-parint.ads: Minor
4848 2011-08-29 Matthew Heaney <heaney@adacore.com>
4850 * a-cbhama.ads, a-cbhase.ads (Cursor): Default-initialize all
4851 components of record type.
4853 2011-08-29 Bob Duff <duff@adacore.com>
4855 * s-tassta.adb (Task_Wrapper): Handle and ignore exceptions propagated
4856 by the termination handler.
4858 2011-08-29 Yannick Moy <moy@adacore.com>
4860 * sem_ch3.adb (Array_Type_Declaration): Create declarations for Itypes
4861 created in Alfa mode, instead of inserting artificial declarations of
4862 non-Itypes in the tree.
4863 * sem_util.adb, sem_util.ads (Itype_Has_Declaration): New function to
4864 know if an Itype has a corresponding declaration, as defined in
4867 2011-08-29 Yannick Moy <moy@adacore.com>
4869 * gnat1drv.adb: Minor rewrite.
4871 2011-08-29 Bob Duff <duff@adacore.com>
4873 * s-tasuti.adb (Make_Passive): Work around race condition in
4874 Make_Independent, which can cause Wait_Count to be zero. So instead of
4875 asserting that Wait_Count > 0, and then decrementing it, decrement it
4876 only if Wait_Count > 0.
4877 * s-taskin.ads (Wait_Count, Alive_Count, Awake_Count): All of these
4878 should be nonnegative, so declare them Natural instead of Integer.
4880 2011-08-29 Robert Dewar <dewar@adacore.com>
4882 * exp_ch5.adb, sem_ch3.adb, a-cihama.adb, a-cihama.ads, exp_ch7.adb,
4883 sem_ch5.adb, a-ciorse.adb, a-ciorse.ads, sem_ch12.adb, a-cidlli.adb,
4884 a-cidlli.ads, sem_util.adb, sem_res.adb, gnat1drv.adb, a-except.adb,
4885 a-except.ads, a-except-2005.ads, sem_ch4.adb, exp_disp.adb,
4886 exp_aggr.adb, sem_ch13.adb, par-ch3.adb: Minor reformatting.
4888 2011-08-29 Tristan Gingold <gingold@adacore.com>
4890 * s-auxdec-vms-alpha.adb: Add comments, remove some HT before labels.
4892 2011-08-29 Vadim Godunko <godunko@adacore.com>
4894 * s-parint.ads: Minor comment clarification.
4896 2011-08-29 Vincent Celier <celier@adacore.com>
4898 * prj.adb (Initialize): Make sure that new reserved words after Ada 95
4899 may be used as identifiers.
4901 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4903 * a-coinho.ads: Minor reformating.
4905 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4907 * exp_ch5.adb (Expand_Iterator_Loop): Handle properly a loop over a
4908 container of a derived type.
4910 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4912 * a-cidlli.adb, a-cidlli.ads, a-cihama.adb, a-cihama.ads,
4913 a-ciorse.adb, a-ciorse.ads: Add iterator machinery to containers.
4915 2011-08-29 Pascal Obry <obry@adacore.com>
4917 * exp_disp.adb: Minor comment fix.
4918 (Make_Disp_Asynchronous_Select_Body): Properly initialize out parameters
4919 to avoid warnings when compiling with -Wall.
4920 (Make_Disp_Conditional_Select_Body): Likewise.
4921 (Make_Disp_Timed_Select_Body): Likewise.
4923 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4925 * sem_ch12.adb (Analyze_Formal_Subprogram_Declaration): If default is
4926 an entity name, generate reference for it.
4928 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4930 * exp_ch5.adb (Expand_Iterator_Loop): Uniform handling of "X of S"
4932 * sem_util.adb (Is_Iterator, Is_Reversible_Iterator): Yield True for
4933 the class-wide type.
4934 * sem_ch5.adb: Move some rewriting to the expander, where it belongs.
4936 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4938 * sem_ch8.adb (Check_Constrained_Object): Do not create an actual
4939 subtype for an object whose type is an unconstrained union.
4941 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4943 * par-ch3.adb (P_Array_Type_Definiation, P_Component_Items): "aliased"
4944 is allowed in a component definition, by AI95-406.
4946 2011-08-29 Matthew Heaney <heaney@adacore.com>
4948 * a-chtgbo.adb (Generic_Iteration): Use correct overloading of Next.
4950 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4952 * a-except-2005.adb: Alphabetize all routines.
4953 (Triggered_By_Abort): New routine.
4954 * a-except-2005.ads (Triggered_By_Abort): New routine.
4955 * a-except.adb Alphabetize all routines.
4956 (Triggered_By_Abort): New routine.
4957 * a-except.ads (Triggered_By_Abort): New routine.
4958 * exp_ch7.adb: Update all comments involving the detection of aborts in
4960 (Build_Object_Declarations): Do not generate code to detect the
4961 presence of an abort at the start of finalization code, use a runtime
4963 * rtsfind.ads: Add RE_Triggered_By_Abort to tables RE_Id and
4965 * sem_res.adb (Resolve_Allocator): Emit a warning when attempting to
4966 allocate a task on a subpool.
4967 * s-stposu.adb: Add library-level flag Finalize_Address_Table_In_Use.
4968 The flag disables all actions related to the maintenance of
4969 Finalize_Address_Table when subpools are not in use.
4970 (Allocate_Any_Controlled): Signal the machinery that subpools are in
4972 (Deallocate_Any_Controlled): Do not call Delete_Finalize_Address which
4973 performs costly task locking when subpools are not in use.
4975 2011-08-29 Yannick Moy <moy@adacore.com>
4977 * gnat1drv.adb (Adjust_Global_Switches): Restore expansion of tagged
4978 types and dispatching calls in Alfa mode.
4979 * lib-xref-alfa.adb (Collect_ALFA): Rewrite computation of
4980 correspondance between body and spec scopes, to reuse utility functions
4981 (Traverse_Declarations_Or_Statements): Protect access to body for stub
4982 by testing the presence of the library unit for the body
4983 * sem_ch6.adb (Set_Actual_Subtypes): take into account that in Alfa
4984 mode the expansion of accept statements is skipped
4985 * sem_util.adb, sem_util.ads (Unique_Entity): New function returning
4986 the unique entity corresponding to the one returned by
4987 Unique_Defining_Entity applied to the enclosing declaration of the
4990 2011-08-29 Bob Duff <duff@adacore.com>
4992 * treepr.ads: Improve debugging facilities. pn(x) no longer crashes in
4993 gdb when x is not a node (it can be a node list, name_id, etc). pp is
4994 an alias for pn. ppp is an alias for pt.
4996 2011-08-29 Javier Miranda <miranda@adacore.com>
4998 * exp_aggr.adb (Expand_Record_Aggregate): Use the top-level enclosing
4999 aggregate to take a consistent decision on the need to convert into
5000 assignments aggregates that initialize constant objects.
5002 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5004 * exp_ch4.adb (Expand_Allocator_Expression): Add a call to
5005 Build_Allocate_Deallocate_Proc in order to handle allocation of
5006 non-controlled objects on subpools.
5007 * impunit.adb: Remove s-finmas and s-spsufi since they were never meant
5008 to be end-user visible.
5009 * s-finmas.adb: Add with and use clause for System.HTable.
5010 Add an instantiation of Simple_HTable which provides a mapping between
5011 the address of a controlled object and the corresponding
5012 Finalize_Address used to clean up the object. The table is used when a
5013 master is operating in heterogeneous mode.
5014 (Attach): Explain why the input node is not verified on being already
5016 (Delete_Finalize_Address): New routine.
5017 (Detach): Add pragma Assert which ensures that a node is already
5019 (Finalize): Add local variable Cleanup. Rewrite the iteration scheme
5020 since nodes are no longer removed on traversal. Explain why node
5021 detachment is undesirable in this case.
5022 (Get_Finalize_Address): New routine.
5023 (Hash): New routine.
5024 (Is_Empty_List): Removed.
5025 (pm): Renamed to Print_Master. Add output for discriminant
5027 Comment reformatting.
5028 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
5029 * s-finmas.ads: Various comments additions / improvements.
5030 Type Finalization_Master has a discriminant which determines the mode of
5032 (Delete_Finalize_Address): New routine.
5033 (Get_Finalize_Address): New routine.
5034 (pm): Renamed to Print_Master.
5035 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
5036 * s-stposu.adb: Add with clause for System.Address_Image; Add with and
5037 use clause for System.IO.
5038 (Allocate_Any_Controlled): Add machinery to set TSS primitive
5039 Finalize_Address depending on the mode of allocation and the mode of
5041 (Deallocate_Any_Controlled): Remove the relation pair object -
5042 Finalize_Address regardless of the master mode. Add comment explaining
5044 (Detach): Ensure that fields Prev and Next are null after detachment.
5045 (Finalize_Pool): Remove local variable Next_Ptr. Rewrite the iteration
5046 scheme to check whether the list of subpools is empty. There is no
5047 longer need to store the next subpool or advance the current pointer.
5048 (Is_Empty_List): New routine.
5049 (Print_Pool): New routine.
5050 (Print_Subpool): New routine.
5051 * s-stposu.ads: Various comments additions / improvements.
5052 Field Master of type Root_Subpool is now a heterogeneous collection.
5053 (Print_Pool): New routine.
5054 (Print_Subpool): New routine.
5056 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5058 * exp_ch5.adb (Expand_N_Iterator_Loop): Implement Ada2012 loop iterator
5059 forms, using aspects of container types.
5060 * sem_ch3.adb (Find_Type_Name): Preserve Has_Delayed_Aspects and
5061 Has_Implicit_Dereference flags, that may be set on the partial view.
5062 * sem_ch4.adb (Process_Overloaded_Indexed_Component): Prefix may be a
5063 container type with an indexing aspect.
5064 (Analyze_Quantified_Expression): Analyze construct with expansion
5065 disabled, because it will be rewritten as a loop during expansion.
5066 (Try_Container_Indexing): The prefix itself may be a container type
5067 with an indexing aspect, as with a vector of vectors.
5068 * sem_ch5.adb (Analyze_Iteration_Scheme): In a generic context, analyze
5069 the original doamin of iteration, for name capture.
5070 (Analyze_Iterator_Specification): If the domain is an expression that
5071 needs finalization, create a separate declaration for it.
5072 For an iterator with "of" retrieve default iterator info from aspect of
5073 container type. For "in" iterator, retrieve type of Iterate function.
5074 * sem_ch13.adb (Check_Iterator_Function): Fix typo.
5075 (Check_Aspect_At_End_Of_Declaration): Make type unfrozen before
5076 analysis, to prevent spurious errors about late attributes.
5077 * sprint.adb: Handle quantified expression with either loop or iterator
5079 * a-convec.ads, a-convec.adb: Iterate function returns a reversible
5082 2011-08-29 Vincent Celier <celier@adacore.com>
5084 * make.adb (Scan_Make_Arg): Take any option as is in packages Compiler,
5085 Binder or Linker of the main project file.
5087 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5089 * inline.adb (Add_Scopes_To_Clean): Exclude any entity within a generic
5092 2011-08-29 Yannick Moy <moy@adacore.com>
5094 * exp_ch9.adb: Partial revert of previous change for Alfa mode
5096 2011-08-29 Yannick Moy <moy@adacore.com>
5098 * exp_ch11.adb: Minor expansion of comment.
5100 2011-08-29 Yannick Moy <moy@adacore.com>
5102 * lib-xref-alfa.adb (Add_ALFA_Scope): Treat generic entities.
5104 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5106 * sem_res.adb (Resolve_Arithmetic_Op): If the node has a universal
5107 interpretation, set the type before resolving the operands, because
5108 legality checks on an exponention operand need to know the type of the
5111 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5113 * sem_ch12.adb (Analyze_Package_Instantiation): Do not set delayed
5114 cleanups on a master if the instance is within a generic unit.
5115 Complement to the corresponding fix to inline.adb for K520-030.
5117 2011-08-29 Tristan Gingold <gingold@adacore.com>
5119 * exp_ch7.adb (Build_Raise_Statement): Raise PE instead of the current
5121 * exp_intr.adb: Minor comment fix.
5123 2011-08-29 Bob Duff <duff@adacore.com>
5125 * sem_ch13.adb (Analyze_Aspect_Specifications): Fix cases where
5126 Delay_Required was used as an uninitialized variable.
5128 2011-08-29 Robert Dewar <dewar@adacore.com>
5130 * a-cdlili.adb, a-cdlili.ads, a-coinve.adb, a-coinve.ads,
5131 sem_util.adb, sem_util.ads, a-cohama.adb, a-cohama.ads, a-coorse.adb,
5132 a-coorse.ads, aspects.ads, sem_ch8.adb: Minor reformatting.
5134 2011-08-29 Thomas Quinot <quinot@adacore.com>
5136 * system-freebsd-x86_64.ads (Backend_Overflow_Checks): Set true True.
5137 Remove unused variables.
5139 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5141 * sem_res.adb: Remove Build_Explicit_Dereference.
5142 * sem_util.adb, sem_util.ads (Build_Explicit_Dereference): Moved here
5143 from sem_res.adb, used in analysis of additional constructs.
5144 (Is_Iterator, Is_Reversible_Iterator): New predicates for Ada2012
5145 expansion of iterators.
5146 (Is_Object_Reference): Recognize variables rewritten as explicit
5147 dereferences in Ada2012.
5148 * snames.ads-tmpl: Add Has_Element, Forward_Iterator,
5149 Reversible_Iterator names, for expansion of Ada2012 iterators.
5150 * aspects.ads, aspects.adb (Find_Aspect): Utility.
5151 * a-cdlili.ads, a-cdlili.adb: Add new iterator machinery to doubly
5152 linked list container.
5153 * a-coinve.ads, a-coinve.adb: Ditto for indefinite vector containers.
5154 * a-coorse.ads, a-coorse.adb: Ditto for ordered sets.
5156 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5158 * a-cohama.adb, a-cohama.ads: Add iterator primitives to hashed map
5161 2011-08-29 Vincent Celier <celier@adacore.com>
5163 * make.adb (Gnatmake): Get the maximum number of simultaneous
5164 compilation processes after the Builder switches has been scanned, as
5165 there may include -jnn.
5167 2011-08-29 Matthew Heaney <heaney@adacore.com>
5169 * a-chtgbo.adb (Generic_Equal): Use correct overloading of Next.
5171 2011-08-29 Tristan Gingold <gingold@adacore.com>
5173 * gnatcmd.adb (GNATCmd): On OpenVMS, truncate the length of
5174 GNAT_DRIVER_COMMAND_LINE to 255.
5176 2011-08-29 Pascal Obry <obry@adacore.com>
5178 * freeze.adb, sem_ch8.adb, a-convec.adb, a-convec.ads: Minor
5179 reformatting and style fix (class attribute casing).
5181 2011-08-29 Yannick Moy <moy@adacore.com>
5183 * exp_ch11.adb: Yet another case where expansion should be common
5184 between CodePeer and Alfa.
5186 2011-08-29 Yannick Moy <moy@adacore.com>
5188 * exp_ch9.adb: Partial revert of previous change for Alfa mode.
5190 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5192 * sem_ch6.adb (Matches_Limited_With_View): The limited views of an
5193 incomplete type and its completion match.
5195 2011-08-29 Yannick Moy <moy@adacore.com>
5197 * exp_ch13.adb: Adjust previous change.
5199 2011-08-29 Robert Dewar <dewar@adacore.com>
5201 * sem_prag.adb, prj.adb, sem_util.adb, sem_res.adb, gnat1drv.adb,
5202 exp_ch4.adb, sem_ch8.adb: Minor code reorganization
5205 2011-08-29 Emmanuel Briot <briot@adacore.com>
5207 * make.adb, prj.adb, prj.ads (Compute_All_Imported_Projects): Also
5208 initialize aggregated projects.
5210 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5212 * sem_ch8.adb (Find_Renamed_Entity): Within an instance, use scope
5213 depth of candidates to resolve a potentially spurious ambiguity between
5214 two visible subprograms.
5216 2011-08-29 Yannick Moy <moy@adacore.com>
5218 * sem_prag.adb (Analyze_Pragma): Allow Test_Case pragma without
5220 * sem_util.adb (Get_Ensures_From_Test_Case_Pragma,
5221 Get_Requires_From_Test_Case_Pragma): Allow Test_Case pragma without
5224 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5226 * gnat1drv.adb (Adjust_Global_Switches): Improve previous change.
5229 2011-08-29 Thomas Quinot <quinot@adacore.com>
5231 * sem_res.adb: Minor reformatting.
5233 2011-08-29 Johannes Kanig <kanig@adacore.com>
5235 * exp_ch4.adb (Expand_Quantified_Expression): Do not expand in ALFA
5237 * gnat1drv.adb (Adjust_Global_Switches): Set
5238 Use_Expressions_With_Actions to False in ALFA mode.
5239 * sem_res.adb (Resolve_Quantified_Expression): Simpler treatment in
5242 2011-08-29 Yannick Moy <moy@adacore.com>
5244 * exp_ch13.adb (Expand_N_Freeze_Entity): Do nothing in Alfa mode.
5245 * exp_ch9.adb: Do not expand tasking constructs in Alfa mode.
5246 * gnat1drv.adb (Adjust_Global_Switches): Suppress the expansion of
5247 tagged types and dispatching calls in Alfa mode.
5249 2011-08-29 Javier Miranda <miranda@adacore.com>
5251 * sem_ch3.adb (Process_Discriminants): Add missing check to ensure that
5252 we do not report an error on an Empty node.
5254 2011-08-29 Geert Bosch <bosch@adacore.com>
5256 * Makefile.rtl (GNATRTL_NONTASKING_OBJECTS): Add a-nllrar.o,
5257 a-nlrear.o and a-nurear.o.
5259 2011-08-29 Robert Dewar <dewar@adacore.com>
5261 * freeze.adb: Minor code reorganization.
5263 * sem_util.adb, errout.adb, exp_ch11.adb, a-ngrear.adb, s-gearop.adb,
5264 sem_ch6.adb: Minor reformatting
5266 2011-08-29 Tristan Gingold <gingold@adacore.com>
5268 * s-except.ads, s-except.adb: Provide dummy body.
5270 2011-08-29 Yannick Moy <moy@adacore.com>
5272 * sem_warn.adb (Within_Postcondition): Take into account the case of
5273 an Ensures component in a Test_Case.
5275 2011-08-29 Tristan Gingold <gingold@adacore.com>
5277 * s-excdeb.ads, s-excdeb.adb: New files, created from s-except.
5278 * rtsfind.ads (RTU_Id): Replaces System_Exceptions by
5279 System_Exceptions_Debug
5280 (RE_Unit_Table): Search RE_Local_Raise in System_Exceptions_Debug
5281 * a-except.adb: With and use System.Exceptions_Debug instead of
5283 * a-except-2005.adb: Likewise.
5284 * s-assert.adb: Likewise.
5285 * s-except.adb, s-except.ads: Move debugging hooks to s-excdeb.
5286 * Makefile.rtl: Add s-excdeb. Adjust compilation rule.
5287 * gcc-interfaces/Makefile.in, gcc-interface/Make-lang.in: Add
5288 s-excdeb. Update dependencies.
5289 (GNATRTL_LINEARALGEBRA_OBJS): Remove a-nlrear.o a-nurear.o a-nllrar.o
5290 as these no longer need external libraries.
5292 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5294 * sem_res.adb (Resolve_Op_Expon): Additional check to reject an
5295 exponentiation operator on universal values in a context that requires
5298 2011-08-29 Tristan Gingold <gingold@adacore.com>
5300 * raise-gcc.c (personnality_routine): Fix thinko. Set Ada occurrence
5301 before calling notify_handled_exception.
5302 * a-exextr.adb: Fix comment.
5304 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5306 * exp_ch4.adb (Expand_Allocator_Expression): Add code to set attribute
5307 Finalize_Address of the access type's finalization master.
5308 (Expand_N_Allocator): Add code to set attribute Finalize_Address of the
5309 access type's finalization master. Add a guard to prevent
5310 Associated_Storage_Pool from being set on .NET/JVM.
5311 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add code to set
5312 attribute Finalize_Address of the access type's finalization master.
5313 * exp_ch7.adb (Make_Finalize_Address_Call): New routine.
5314 * exp_ch7.ads (Make_Finalize_Address_Call): New routine.
5315 * rtsfind.ads: Add RE_Set_Finalize_Address to tables RE_Id and
5317 * s-finmas.adb: Add with clause for System.Address_Image. Add with and
5318 use clause for System.IO
5319 (Detach): Relax the assertion, to be reinstated later.
5320 (Finalize): Rewrite the iteration loop to avoid pointer comparison.
5321 Relax the assertion on Finalize_Address, to be reinstated later.
5322 (Is_Empty_List): New routine.
5323 (pm): New debug routine.
5324 (Set_Finalize_Address): New routine.
5325 * s-finmas.ads (pm): New debug routine.
5326 (Set_Finalize_Address): New routine.
5327 * s-stposu.adb (Allocate_Any_Controlled): Code reformatting.
5329 2011-08-29 Tristan Gingold <gingold@adacore.com>
5331 * a-exexpr-gcc.adb (GCC_Exception_Access, GNAT_GCC_Exception_Access):
5332 Remove convention C.
5334 2011-08-29 Tristan Gingold <gingold@adacore.com>
5336 * s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove.
5337 (Initialize_TCB): Remove Exc_Stack_Ptr initialization.
5338 (Finalize_TCB): Remove its finalization.
5339 (Initialize): Remove assignment of GET_Exc_Stack_Addr
5340 * s-soflin.adb (NT_Exc_Stack): Remove
5341 (Get_Exc_Stack_Addr_NT): Likewise.
5342 (Get_Exc_Stack_Addr_Soft): Likewise.
5343 * s-soflin.ads (Get_Exc_Stack_Addr_NT): Remove.
5344 (Get_Exc_Stack_Addr): Likewise.
5345 (Get_Exc_Stack_Addr_Soft): Likewise
5346 * s-taspri-vms.ads (Exc_Stack_T): Remove.
5347 (Exc_Stack_Ptr_T): Likewise.
5348 (Private_Data): Remove Exc_Stack_Ptr component.
5350 2011-08-29 Tristan Gingold <gingold@adacore.com>
5352 * raise-gcc.c (get_ip_from_context): New function. Factorize code.
5354 2011-08-29 Tristan Gingold <gingold@adacore.com>
5356 * gnat_ugn.texi: Fix aix and x86-solaris info for run-time.
5358 2011-08-29 Geert Bosch <bosch@adacore.com>
5360 * s-gearop.ads (Back_Substitute, Diagonal, Forward_Eliminate,
5361 L2_Norm, Swap_Column): New generic subprograms
5362 * s-gearop.adb (Back_Substitute, Diagonal, Forward_Eliminate,
5363 L2_Norm, Swap_Column): Implement new subprograms in order to
5364 eliminate dependency on BLAS and LAPACK libraries in
5365 Ada.Numerics.Generic_Real_Arrays and eventually also the complex
5366 version. Forward_Eliminate/Back_Substitute can be used to put a
5367 matrix in row echelon or reduced row echelon form using partial
5369 * a-ngrear.adb: (Back_Substitute, Diagonal, Forward_Eleminate,
5370 Swap_Column): Instantiate from System.Generic_Array_Operations.
5371 ("*", "abs"): Implement by instantiation from Generic_Array_Operations.
5372 (Sqrt): Local function for simple computation of square root without
5373 adding dependencies on Generic_Elementary_Functions.
5374 (Swap): New subprogram to exchange floating point numbers.
5375 (Inverse): Reimplement using Jordan-Gauss elimination.
5376 (Jacobi): New procedure implementing Jacobi's method for computation
5377 of eigensystems, based on Rutishauser's implementation.
5378 (L2_Norm): Implement directly using the inner product.
5379 (Sort_Eigensystem): Sort eigenvalue/eigenvector pairs in order of
5380 decreasing eigenvalue as required by the Ada RM.
5381 (Swap_Column): New helper procedure for Sort_Eigensystem.
5382 Remove with of System.Generic_Real_BLAS and System.Generic_Real_LAPACK.
5383 Add with of Ada.Containers.Generic_Anonymous_Array_Sort, for
5386 2011-08-29 Thomas Quinot <quinot@adacore.com>
5388 * put_scos.adb (Put_SCOs): Do not emit a newline for an empty
5391 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5393 * s-finmas.adb (Finalize): Check Finalize_Address of the master rather
5394 than the current node.
5395 * s-finmas.ads: Move field Finalize_Address from type FM_Node to
5396 Finalization_Master. The list headers have two fields instead of three.
5397 This should fix alignment issue but subpool allocations are now
5398 unusable. Alphabetize subprograms.
5399 * s-stposu.adb (Allocate_Any_Controlled): Use the offset rather than
5400 the size of the header when converting the beginning of the object to
5401 a FM_Node. Set the master's Finalize_Address attribute if not already
5403 (Deallocate_Any_Controlled): Use the offset rather than the size of the
5404 header when converting the beginning of the object to a FM_Node.
5406 2011-08-29 Gary Dismukes <dismukes@adacore.com>
5408 * exp_ch11.adb (Expand_N_Raise_Statement): Don't suppress expansion of
5409 reraise when compiling for CodePeer.
5411 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5413 * a-iteint.ads, Makefile.rtl: Add missing compilation of a-iteint.ads,
5414 now needed by a-convec.adb. Fix warning.
5416 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5418 * exp_util.adb (Build_Allocate_Deallocate_Proc): Add a guard for the
5419 processing of TSS routine Finalize_Address when compiling in
5422 2011-08-29 Thomas Quinot <quinot@adacore.com>
5424 * a-strunb.ads, einfo.ads, g-comlin.ads, sem_ch6.adb,
5425 sem_warn.adb: Minor reformatting.
5427 2011-08-29 Emmanuel Briot <briot@adacore.com>
5429 * prj-conf.adb (Get_Config_Switches): Also collect the list of
5430 languages from aggregated projects.
5432 2011-08-29 Yannick Moy <moy@adacore.com>
5434 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Declarations_Or_Statements,
5435 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
5436 Traverse_Package_Declaration, Traverse_Subprogram_Body,
5437 Traverse_Compilation_Unit): Add a parameter Inside_Stubs so that bodies
5438 for stubs are traversed too when parameter is set
5439 (Traverse_All_Compilation_Units): Traverse without going inside stubs
5440 (Traverse_Declarations_Or_Statements): Do the special traversing for
5441 stubs when required.
5442 * sem_util.adb, sem_util.ads (Get_Body_From_Stub): New function to
5443 return subprogram or package body from stub.
5444 (Is_Subprogram_Stub_Without_Prior_Declaration): New function to detect
5445 stubs without prior subprogram decl.
5447 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
5449 * gnat_ugn.texi: Fix typo.
5451 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5453 * s-stposu.adb (Allocate_Any_Controlled): Reimplement the mechanism
5454 which accounts for size vs alignment issues and calculates the size of
5456 (Deallocate_Any_Controlled): Ditto.
5457 (Nearest_Multiple_Rounded_Up): New routine.
5459 2011-08-29 Tristan Gingold <gingold@adacore.com>
5461 * a-exstat.adb (String_To_EO): Do no set Cleanup_Flag.
5462 * a-exexda.adb (Set_Exception_C_Msg): Ditto.
5463 (Set_Exception_Msg): Ditto.
5464 * a-exexpr-gcc.adb (Setup_Current_Excep): Ditto. Do not set
5466 * a-except.adb, a-except-2005.adb (Save_Occurrence_No_Private): Remove.
5467 Use Save_Occurrence instead of Save_Occurrence_No_Private.
5468 (Raise_With_Msg): Remove Cleanup_Flag.
5469 * a-except.ads, a-except-2005.ads (Exception_Occurrence): Remove
5470 Clean_Flag and Private_Data components.
5472 2011-08-29 Yannick Moy <moy@adacore.com>
5474 * freeze.adb (Freeze_Record_Type): Ignore packing in Alfa mode, like
5476 * sem_ch3.adb (Signed_Integer_Type_Declaration): Correct the generation
5477 of an explicitly declared type, so that the base types of the original
5478 type and this generated type are the same, and a "type" (not a subtype
5480 * errout.adb (Special_Msg_Delete): Do not issue messages "Size too
5481 small" in Alfa mode, like in CodePeer mode.
5482 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore rep
5483 clauses in Alfa mode.
5485 2011-08-29 Javier Miranda <miranda@adacore.com>
5487 * exp_ch6.ads, exp_ch6.adb (Is_Null_Procedure): Move the spec of this
5488 function to the package spec.
5489 * sem_ch6.adb (Find_Corresponding_Spec, New_Overloaded_Entity): For
5490 internally generated bodies of null procedures locate the internally
5491 generated spec enforcing mode conformance.
5492 (Is_Interface_Conformant): Ensure that the controlling formal of the
5495 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5497 * sem_prag.adb (Analyze_Pragma, case Inline): In an instance, do not
5498 reject the pragma if it appears to apply to a formal subprogram.
5500 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5502 * exp_ch4.adb (Expand_Allocator_Expression): Use consistent name for
5503 inner expression, to prevent double evaluation.
5505 2011-08-29 Tristan Gingold <gingold@adacore.com>
5507 * a-exexpr.adb (Propagate_Exception): Remove all the parameters as
5509 * a-exexpr-gcc.adb (Propagate_Exception): Ditto.
5510 * a-except-2005.adb (Propagate_Exception): Adjust spec.
5511 (Raise_Current_Excep): Adjust call.
5512 (Raise_From_Signal_Handler): Call now simply call Raise_Current_Excep.
5514 2011-08-29 Thomas Quinot <quinot@adacore.com>
5516 * exp_disp.adb: Minor reformatting.
5518 2011-08-29 Tristan Gingold <gingold@adacore.com>
5520 * a-exexpr.adb (Setup_Exception): Removed.
5521 * a-exexpr-gcc.adb (Setup_Exception): Removed.
5522 * a-except.adb (Exception_Propagation): Removed.
5523 * a-except-2005.adb (Setup_Exception): Removed.
5524 (Reraise): Remove call to Setup_Exception.
5525 (Reraise_Occurrence): Ditto.
5526 (Reraise_Occurrence_Always): Ditto.
5527 (Reraise_Occurrence_No_Defer): Ditto.
5528 (Transfer_Occurrence): Ditto.
5529 * a-exexda.adb (Set_Exception_C_Msg): Remove call to Setup_Exception.
5530 (Set_Exception_Msg): Ditto.
5532 2011-08-29 Robert Dewar <dewar@adacore.com>
5534 * a-convec.adb, exp_disp.adb: Minor reformatting.
5536 2011-08-29 Tristan Gingold <gingold@adacore.com>
5538 * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C.
5540 2011-08-29 Gary Dismukes <dismukes@adacore.com>
5542 * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set
5543 Exception_Handlers to No_List instead of Empty_List in the case where
5544 there are no handlers.
5546 2011-08-29 Tristan Gingold <gingold@adacore.com>
5548 * gcc-interface/gigi.h (enum standard_datatypes): Add
5549 ADT_reraise_zcx_decl
5550 (reraise_zcx_decl): New macro.
5551 * gcc-interface/trans.c (gnu_incoming_exc_ptr): New variable.
5552 (gigi): Set reraise_zcx_decl.
5553 (Exception_Handler_to_gnu_zcx): Save and restore gnu_incoming_exc_ptr.
5554 (gnat_to_gnu): Handle N_Raise_Statement.
5556 2011-08-29 Robert Dewar <dewar@adacore.com>
5558 * sem_ch6.adb, exp_ch3.adb, s-stposu.adb, a-undesu.ads,
5559 a-undesu.adb: Minor reformatting.
5561 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5563 * exp_disp.adb (Check_Premature_Freezing): When building a dispatch
5564 table, accept an unfrozen untagged component if it is an actual for a
5565 formal incomplete type.
5566 * a-convec.ads, a-convec.adb: Instantiate Ada.Iterator_Interfaces to
5567 provide new iterator forms over vectors.
5568 Introduce type Iterator in package body to implement operations of
5569 Reversible_Iterator interface.
5570 * a-iteint.ads: Make package pure so it is usable with new container
5571 packages, that are categorized Remote_Types.
5573 2011-08-29 Robert Dewar <dewar@adacore.com>
5575 * a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting.
5577 2011-08-29 Bob Duff <duff@adacore.com>
5579 * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case
5580 of <>, because this is the routine that checks for dimensionality
5581 errors (for example, for a two-dimensional array, (others => <>) should
5582 be (others => (others => <>)).
5584 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5586 * impunit.adb: Add new run-time units.
5587 * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb,
5588 s-stposu.ads, s-stposu.adb: Code clean up.
5589 Handle protected class-wide or task class-wide types
5590 Handle C/C++/CIL/Java types.
5591 * s-spsufi.adb, s-spsufi.ads: New files.
5593 2011-08-29 Yannick Moy <moy@adacore.com>
5595 * sem_ch13.adb (Analyze_Aspect_Specifications): Reject test-case on
5596 library-level subprogram.
5597 * sem_prag.adb (Check_Test_Case): Stricter rules for test-case
5599 (Analyze_Pragma): Change name "Normal" for "Nominal" in test-case
5601 * snames.ads-tmpl: Change name "Normal" for "Nominal" in test-case
5603 * gnat_rm.texi: Update doc for Test_Case pragma.
5605 2011-08-29 Tristan Gingold <gingold@adacore.com>
5607 * a-exexpr-gcc.adb (Unwind_Exception): Remove default value, made it
5609 (GCC_Exception_Access): New type.
5610 (Unwind_DeleteException): New imported procedure
5611 (Foreign_Exception): Import it.
5612 (GNAT_GCC_Exception): Simply have the occurrence inside.
5613 (To_GCC_Exception): New function.
5614 (To_GNAT_GCC_Exception): New function.
5615 (GNAT_GCC_Exception_Cleanup): New procedure..
5616 (Propagate_GCC_Exception): New procedure.
5617 (Reraise_GCC_Exception): New procedure.
5618 (Setup_Current_Excep): New procedure.
5619 (CleanupUnwind_Handler): Change type of UW_Exception parameter.
5620 (Unwind_RaiseException): Ditto.
5621 (Unwind_ForcedUnwind): Ditto.
5623 (Begin_Handler): Change type of parameter.
5624 (End_Handler): Ditto. Now delete the exception if still present.
5625 (Setup_Key): Removed.
5626 (Is_Setup_And_Not_Propagated): Removed.
5627 (Set_Setup_And_Not_Propagated): Ditto.
5628 (Clear_Setup_And_Not_Propagated): Ditto.
5629 (Save_Occurrence_And_Private): Ditto.
5630 (EID_For): Add 'not null' constraint on parameter.
5631 (Setup_Exception): Does nothing.
5632 (Propagate_Exception): Simplified.
5633 * exp_ch11.adb (Expand_N_Raise_Statement): In back-end exception model,
5634 re-raise is not expanded anymore.
5635 * s-except.ads (Foreign_Exception): New exception - placeholder for
5637 * raise-gcc.c (__gnat_setup_current_excep): Declare
5638 (CXX_EXCEPTION_CLASS): Define (not yet used)
5639 (GNAT_EXCEPTION_CLASS): Define.
5640 (is_handled_by): Handle foreign exceptions.
5641 (PERSONALITY_FUNCTION): Call __gnat_setup_current_excep.
5643 2011-08-29 Jose Ruiz <ruiz@adacore.com>
5645 * a-synbar.adb (Synchronous_Barrier): Some additional clarification.
5647 2011-08-29 Thomas Quinot <quinot@adacore.com>
5649 * a-synbar-posix.adb: Minor reformatting.
5651 2011-08-29 Jose Ruiz <ruiz@adacore.com>
5653 * a-exetim-posix.adb, a-exetim-mingw.adb, a-exetim-mingw.ads,
5654 a-exetim-default.ads (Interrupt_Clocks_Supported,
5655 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
5656 definitions to be compliant with AI-0171. The target systems do not
5657 support separate account for the execution time of interrupt handlers.
5659 2011-08-29 Jose Ruiz <ruiz@adacore.com>
5661 * a-synbar.adb (Wait): Change the order of evaluation of the conditions
5662 in the barrier to put first the easiest to evaluate (and the one which
5663 will be True more often). More efficient.
5665 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
5667 * s-atocou-x86.adb: Fix constraint in machine code insertion.
5669 2011-08-29 Bob Duff <duff@adacore.com>
5671 * aspects.ads, aspects.adb: Add new aspects for various pragmas and
5672 attributes that are now aspects, as specified by AI05-0229-1.
5673 * sem_ch13.adb (Analyze_Aspect_Specifications,
5674 Check_Aspect_At_Freeze_Point): Analyze the new aspects. Turn them into
5675 pragmas or attribute references, as appropriate.
5677 2011-08-29 Robert Dewar <dewar@adacore.com>
5679 * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
5680 a-synbar-posix.ads: Minor reformatting.
5682 2011-08-29 Yannick Moy <moy@adacore.com>
5684 * snames.ads-tmpl: Add name Force.
5686 2011-08-29 Pascal Obry <obry@adacore.com>
5688 * prj-nmsc.adb: Minor reformatting.
5690 2011-08-29 Jose Ruiz <ruiz@adacore.com>
5692 * a-exetim.ads (Interrupt_Clocks_Supported,
5693 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
5694 definitions to be compliant with AI-0171.
5696 2011-08-29 Robert Dewar <dewar@adacore.com>
5698 * a-ngelfu.adb: Add comments.
5700 2011-08-29 Geert Bosch <bosch@adacore.com>
5702 * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
5703 the closest machine number to Pi / 2.0.
5705 2011-08-29 Jose Ruiz <ruiz@adacore.com>
5707 * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
5708 package Ada.Synchronous_Barriers.
5709 * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
5710 Add new specs and bodies for Ada.Synchronous_Barriers. There is a
5711 default implementation using protected objects and another one
5712 a-synbar-posix using POSIX barriers as the underlying support.
5713 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
5714 x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
5715 Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
5716 Clean up dependencies.
5717 * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
5719 2011-08-29 Robert Dewar <dewar@adacore.com>
5721 * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
5722 exp_dist.adb: Minor code reorganization.
5725 2011-08-29 Thomas Quinot <quinot@adacore.com>
5727 * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
5728 primitive operation must support external streaming if it is not a
5729 controlling access result.
5731 2011-08-29 Thomas Quinot <quinot@adacore.com>
5733 * sinfo.ads, sem_ch7.adb: Minor reformatting.
5735 2011-08-29 Bob Duff <duff@adacore.com>
5737 * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
5738 restriction on allocators, as required by AI05-0013-1.
5739 * restrict.ads: Minor comment fix.
5741 2011-08-29 Tristan Gingold <gingold@adacore.com>
5743 * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
5744 (To_Jmpbuf_Address): Ditto
5745 (builtin_longjmp): Ditto
5747 2011-08-29 Thomas Quinot <quinot@adacore.com>
5749 * sem_res.adb: Minor reformatting.
5751 2011-08-29 Vincent Celier <celier@adacore.com>
5753 * make.adb (Gnatmake): Move special processing for VM targets after the
5754 call to Get_Target_Parameters.
5756 2011-08-29 Thomas Quinot <quinot@adacore.com>
5758 * sem_ch12.adb, par-ch12.adb: Minor reformatting.
5760 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5762 * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
5763 where an anonymous access discriminant of a limited designated type
5764 appears in a non-immutably limited discriminated type and issue an
5765 error message. Add local variable Desig_T and replace all occurrences
5768 2011-08-29 Jose Ruiz <ruiz@adacore.com>
5770 * a-rttiev.adb (Set_Handler): Update comment to indicate that our
5771 implementation is compliant to RM D.15(15/2) after the modification
5772 imposed by AI05-0094-1 (binding interpretation).
5774 2011-08-29 Robert Dewar <dewar@adacore.com>
5776 * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
5777 s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
5779 2011-08-29 Thomas Quinot <quinot@adacore.com>
5781 * par-endh.adb (Check_End): For an END where it is mandatory to repeat
5782 the scope name, do not report a missing label as a style violation (it
5783 will be diagnosed as an illegality).
5784 * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
5785 variant records: Get_Enum_Lit_From_Pos already returns a usage
5786 occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
5787 on Expr in Integer_Literal case so that it can be used by
5790 2011-08-29 Tristan Gingold <gingold@adacore.com>
5792 * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
5794 * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
5795 (Build_Abort_Block_Handler): New function to build an Abort_Signal
5797 * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
5798 Build_Abort_Block_Handler to build the exception handler. Do not
5799 undefer aborts for the Abort_Signal exception handler if back-end
5800 exception mechanism.
5801 * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
5802 back_end exceptions for all others and abort_signal.
5803 * s-except.ads (ZCX_By_Default): New constant.
5804 * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
5805 (Raise_Exception_Always): Ditto.
5806 (Raise_From_Signal_Handler): Ditto.
5807 (Raise_With_Location_And_Msg): Ditto.
5808 (Raise_With_Msg): Ditto.
5810 (Reraise_Occurence): Ditto.
5811 (Reraise_Occurrence_Always): Ditto.
5812 * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
5813 * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
5815 2011-08-29 Thomas Quinot <quinot@adacore.com>
5817 * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
5819 2011-08-29 Robert Dewar <dewar@adacore.com>
5821 * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
5822 Minor code reorganization.
5824 2011-08-29 Bob Duff <duff@adacore.com>
5826 * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
5827 2012, not just Ada 2005.
5829 2011-08-29 Vincent Celier <celier@adacore.com>
5831 * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
5832 with a project file or with gprbuid, if -gnatep= is specified, the
5833 builder may need to be invoked with -x.
5835 2011-08-29 Tristan Gingold <gingold@adacore.com>
5837 * a-exexpr-gcc.adb: Minor comment fix.
5839 2011-08-29 Robert Dewar <dewar@adacore.com>
5841 * sem_ch8.adb: Minor reformatting.
5843 2011-08-29 Bob Duff <duff@adacore.com>
5845 * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
5846 * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
5847 treating "some" as unreserved in earlier Ada versions. This is now
5848 handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
5849 rather than Name_Some, since Tok_Some is now recognized as reserved.
5850 * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
5852 * scans.ads: Minor comment fixes.
5853 * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
5854 for other language versions.
5855 * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
5856 treating "some" as unreserved in earlier Ada versions. This is now
5857 handled in Snames.Is_Keyword_Name.
5858 * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
5860 (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
5861 unreserved in earlier Ada versions. This is now handled in
5862 Snames.Is_Keyword_Name.
5863 * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
5864 words as for other language versions.
5865 * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
5866 Ada 2012, not just Ada 2005.
5868 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5870 * sem_ch13.adb: Additional semantic checks for aspects involved in
5873 2011-08-29 Matthew Heaney <heaney@adacore.com>
5875 * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
5876 a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
5877 Container parameter.
5878 (Ancestor_Find): ditto.
5880 2011-08-29 Thomas Quinot <quinot@adacore.com>
5882 * par-endh.adb: Minor reformatting.
5884 2011-08-29 Tristan Gingold <gingold@adacore.com>
5886 * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
5887 (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
5888 (Adjust_N_CLeanups_For): Remove.
5889 (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
5891 (Propgate_Exception): Adjust.
5892 * raise-gcc.c: Add a few static/const.
5893 (Adjust_N_Cleanups_For): Remove declaration.
5894 (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
5896 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5898 * sem_ch8.adb: Use type of function return when rewriting as object
5901 2011-08-29 Gary Dismukes <dismukes@adacore.com>
5903 * sem_type.adb: Minor reformatting.
5905 2011-08-29 Robert Dewar <dewar@adacore.com>
5907 * makeutl.adb: Minor reformatting.
5909 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5911 * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
5912 function call of a limited type, the expansion of the renaming is
5913 complicated by the presence of various temporaries and subtypes that
5914 capture constraints of the renamed object.
5915 Rewrite node as an object declaration, whose expansion is simpler.
5916 Given that the object is limited there is no copy involved and no
5919 2011-08-29 Robert Dewar <dewar@adacore.com>
5921 * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
5922 freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
5924 2011-08-29 Tristan Gingold <gingold@adacore.com>
5926 * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
5927 system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
5928 system-linux-hppa.ads, system-linux-s390.ads,
5929 system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
5930 system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
5931 system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
5932 system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
5933 system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
5934 system-solaris-sparc.ads, system-lynxos-x86.ads,
5935 system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
5936 system-solaris-x86_64.ads, system-mingw-x86_64.ads,
5937 system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
5938 system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
5939 system-vxworks-x86.ads: Remove GCC_ZCX_Support.
5940 * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
5941 s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
5942 * opt.ads: Adjust comment.
5943 * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
5944 * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
5945 * system.ads: Move GCC_ZCX_Support to obsolete entries.
5947 2011-08-29 Emmanuel Briot <briot@adacore.com>
5949 * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
5950 file name is specified on the gnatmake or gprbuild command line, and
5951 before we search for that file in the project.
5953 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5955 * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
5956 used to determine whether a possible interpretation for an overloadable
5957 entity is declared within the current instantiation and should be
5958 included in the candidate set.
5960 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
5962 * gnat_rm.texi, gnat_ugn.texi: Clean ups.
5964 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5966 * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
5967 access subtype is access_to_subprogram, when applying checks for
5970 2011-08-29 Matthew Heaney <heaney@adacore.com>
5972 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
5973 for sibling when common parent.
5975 2011-08-29 Thomas Quinot <quinot@adacore.com>
5977 * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
5980 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5982 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
5983 for the return type when in ASIS mode.
5985 2011-08-29 Vincent Celier <celier@adacore.com>
5987 * make.adb (Gnatmake): Get the default search dirs, then the target
5988 parameters after getting the Builder switches, as the Builder switches
5989 may include --RTS= and that could change the default search dirs.
5991 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5993 * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
5994 Make_Final_Call. Move the processing for class-wide types before the
5995 processing for derivations from [Limited_]Controlled.
5996 (Make_Final_Call): Move the processing for class-wide types before the
5997 processing for derivations from [Limited_]Controlled.
5998 * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
5999 Add code to account for alignments larger than the list header. Add a
6000 comment illustrating the structure of the allocated object + padding +
6002 (Deallocate_Any_Controlled): Add code to account for alignments larger
6003 than the list header.
6005 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6007 * sinfo.ads, sinfo.adb: New node kind
6008 N_Formal_Incomplete_Type_Definition, related flags.
6009 par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
6010 Parse formal incomplete types.
6011 * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
6013 * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
6014 Formal incomplete types do not need completion.
6015 * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
6016 Validate_Incomplete_Type_Instance): New procedures to handle formal
6018 * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
6019 that corresponds to a formal incomplete type.
6020 * sprint.adb: Handle formal incomplete type declarations.
6021 * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
6024 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
6026 * a-fihema.ads, a-fihema.adb: Unit removed.
6027 * a-undesu.ads, a-undesu.adb: New unit implementing
6028 Ada.Unchecked_Deallocate_Subpool.
6029 * einfo.adb: Remove Associated_Collection from the node usage.
6030 Add Finalization_Master to the node usage.
6031 (Associated_Collection): Removed.
6032 (Finalization_Master): New routine.
6033 (Set_Associated_Collection): Removed.
6034 (Set_Finalization_Master): New routine.
6035 (Write_Field23_Name): Remove Associated_Collection from the output. Add
6036 Finalization_Master to the output.
6037 * einfo.ads: Remove attribute Associated_Collection and its uses in
6039 Add new attribute Finalization_Master along with its uses in entitites.
6040 (Associated_Collection): Removed along with its pragma import.
6041 (Finalization_Master): New routine along with a pragma import.
6042 (Set_Associated_Collection): Removed along with its pragma import.
6043 (Set_Finalization_Master): New routine along with a pragma import.
6044 * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
6045 Build_Finalization_Collection with Build_Finalization_Master.
6046 (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
6047 before the bodies of the predefined routines. Add comment explaining
6048 this. Replace call to Build_Finalization_Collection with
6049 Build_Finalization_Master.
6050 (Freeze_Type): Replace call to Build_Finalization_Collection with
6051 Build_Finalization_Master.
6052 (Make_Finalize_Address_Body): Comment reformatting.
6053 (Make_Predefined_Primitive_Specs): Code reformatting.
6054 (Stream_Operation_OK): Update comment mentioning finalization
6055 collections. Replace RE_Finalization_Collection with
6056 RE_Finalization_Master.
6057 * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
6058 Associated_Collection with Finalization_Master. Replace call to
6059 Build_Finalization_Collection with Build_Finalization_Master.
6060 (Expand_Allocator_Expression): Replace call to Associated_Collection
6061 with Finalization_Master. Replace call to Set_Associated_Collection with
6062 Set_Finalization_Master. Remove the generation of
6063 Set_Finalize_Address_Ptr.
6064 (Expand_N_Allocator): Replace call to Associated_Collection with
6065 Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
6066 * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
6067 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
6068 comment on usage. Replace call to Needs_BIP_Collection with
6069 Needs_BIP_Finalization_Master Remplace BIP_Collection with
6070 BIP_Finalization_Master. Update all comments which mention finalization
6071 collections. Replace Associated_Collection with
6072 Finalization_Master. Replace Build_Finalization_Collection with
6073 Build_Finalization_Master.
6074 (BIP_Formal_Suffix): Update BIP_Collection's case.
6075 (Build_Heap_Allocator): Update the related comment. Rename local
6076 variable Collect to Fin_Mas_Id and update its occurrences. Update
6077 comments which mention finalization collections. Replace
6078 Set_Associated_Collection with Set_Finalization_Master.
6079 (Expand_Call): Update the code which detects a special piece of library
6081 (Make_Build_In_Place_Call_In_Allocator): Replace the call to
6082 Add_Collection_Actual_To_Build_In_Place_Call with
6083 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
6084 which generates a call to Make_Set_Finalize_Address_Ptr_Call.
6085 (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
6086 Add_Collection_Actual_To_Build_In_Place_Call with
6087 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
6088 (Make_Build_In_Place_Call_In_Assignment): Replace call to
6089 Add_Collection_Actual_To_Build_In_Place_Call with
6090 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
6091 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
6092 * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
6093 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
6094 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
6095 Rename local variable Collect to Fin_Mas_Id and update its occurrences.
6096 Replace call to Set_Associated_Collection with Set_Finalization_Master.
6097 (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
6098 Replace the call to Associated_Collection with Finalization_Master.
6099 Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
6100 Update the way finalization master names are generated. Update the
6101 retrieval of the correct access type which will carry the pool and
6103 (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
6104 (Make_Finalize_Address_Body): Abstract types do not need
6105 Finalize_Address. Code reformatting.
6106 (Make_Finalize_Address_Stmts): Update comment on usage.
6107 (Make_Set_Finalize_Address_Ptr_Call): Removed.
6108 (Process_Declarations): Update comments.
6109 * exp_ch7.ads (Build_Finalization_Collection): Renamed to
6110 Build_Finalization_Master. Update associated comment.
6111 (Make_Set_Finalize_Address_Ptr_Call): Removed.
6112 * exp_ch13.adb: Update comments which mention finalization collections.
6113 (Expand_N_Free_Statement): Replace the call to Associated_Collection
6114 with Finalization_Master.
6115 * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
6116 create calls to routines Allocate_Any_Controlled and
6117 Deallocate_Any_Controlled.
6118 (Find_Finalize_Address): New routine.
6119 (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
6121 (Requires_Cleanup_Actions): Update the comment on freeze node
6123 * exp_util.ads: Remove comment on generated code for
6124 Build_Allocate_Deallocate_Proc. The code is now quite complex and it
6125 is better to simply look in the body.
6126 * freeze.adb (Freeze_All): Update the comment of finalization
6127 collections. Replace the call to Associated_Collection with
6128 Finalization_Master. Replace the call to Build_Finalization_Collection
6129 with Build_Finalization_Master.
6130 * impunit.adb: Add a-undesu and s-stposu to the list of units.
6131 * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
6133 * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
6134 Ada.Finalization. Add processing for children of System.Storage_Pools.
6135 * rtsfind.ads: Remove the naming of second level children of
6137 Remove Ada_Finalization_Heap_Management from the list of units.
6138 Remove subtype Ada_Finalization_Child.
6139 Remove the following subprogram entities:
6143 RE_Finalization_Collection
6144 RE_Finalization_Collection_Ptr
6145 RE_Set_Finalize_Address_Ptr
6147 Add the naming of second level children of System.Storage_Pools.
6148 Add System_Finalization_Masters and System_Storage_Pools_Subpools to
6150 Add subtype System_Storage_Pools_Child.
6151 Add the following subprogram entities to System.Finalization_Masters:
6153 RE_Finalization_Master
6154 RE_Finalization_Master_Ptr
6156 Add the following subprogram entities to System.Storage_Pools.Subpools:
6158 RE_Allocate_Any_Controlled
6159 RE_Deallocate_Any_Controlled
6160 RE_Root_Storage_Pool_With_Subpools
6164 Move the following subprogram entities from
6165 Ada.Finalization.Heap_Management to System.Finalization_Masters:
6167 RE_Add_Offset_To_Address
6172 * sem_ch3.adb (Access_Type_Declaration): Replace the call to
6173 Set_Associated_Collection with Set_Finalization_Master.
6174 * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
6175 BIP_Finalization_Master is created.
6176 * s-finmas.adb: New unit System.Finalization_Masters.
6177 * s-finmas.ads: New unit System.Finalization_Masters.
6178 * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
6179 * s-stposu.ads, s-stposu.adb: New unit implementing
6180 System.Storage_Pools.Subpools.
6182 2011-08-29 Bob Duff <duff@adacore.com>
6184 * tbuild.adb: Add assertion.
6186 2011-08-29 Thomas Quinot <quinot@adacore.com>
6188 * s-pooglo.adb: Minor reformatting.
6190 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6192 * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
6193 an indexed component of a packed array whose element type is a record
6194 with a representation clause different from that of the right-hand
6195 side, generate a temporary to minimuze the number of bit-field
6196 operations generated.
6198 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6200 * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
6201 declarations, and thus are likely insertion points for actions.
6203 2011-08-29 Bob Duff <duff@adacore.com>
6205 * einfo.ads: Minor comment fix.
6207 2011-08-29 Robert Dewar <dewar@adacore.com>
6209 * frontend.adb, gnat1drv.adb: Minor reformatting.
6211 2011-08-29 Tristan Gingold <gingold@adacore.com>
6213 * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
6214 * a-fihema.adb (Allocate, Deallocate): Ditto. Possibly add padding
6215 space in front of the header.
6217 2011-08-29 Johannes Kanig <kanig@adacore.com>
6219 * frontend.adb (Frontend): Exit after creating Standard package when
6220 -gnatd.H is present.
6221 * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
6224 2011-08-29 Robert Dewar <dewar@adacore.com>
6226 * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
6227 makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
6228 snames.ads-tmpl: Minor reformatting.
6230 2011-08-29 Philippe Gil <gil@adacore.com>
6232 * prj.adb (Reset_Units_In_Table): New procedure.
6233 Reset units to avoid access to freed memory.
6235 2011-08-29 Thomas Quinot <quinot@adacore.com>
6237 * get_scos.adb: When reading a P statement SCO without a pragma name
6238 (from an older ALI file), ensure that the Pragma_Name component is set
6239 to Unknown_Pragma (not left uninitialized).
6241 2011-08-29 Vincent Celier <celier@adacore.com>
6243 * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
6244 modified to compute correctly the object path of a SAL project that is
6245 extending another library project.
6246 (Write_Path_File): New procedure.
6247 * makeutl.ads (Directories): New table moved from Buildgpr
6248 (Get_Directories): New procedure moved from Buildgpr
6249 (Write_Path_File): New procedure
6250 * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
6251 paths before binding SALs, instead of Set_Ada_Paths.
6252 * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
6254 * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
6255 (Current_Source_Path_File_Of): New function
6256 (Set_Current_Object_Path_File_Of): New procedure
6257 (Current_Source_Object_File_Of): New function
6258 (Set_Current_Object_Path_File_Of): New procedure
6259 * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
6260 (Current_Source_Path_File_Of): New function
6261 (Set_Current_Object_Path_File_Of): New procedure
6262 (Current_Source_Object_File_Of): New function
6263 (Set_Current_Object_Path_File_Of): New procedure
6265 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6267 * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
6268 packed entity, use a bit-field assignment only if there is no change of
6271 2011-08-29 Thomas Quinot <quinot@adacore.com>
6273 * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
6274 Is_RTU instead of using Chars comparisons.
6276 2011-08-29 Thomas Quinot <quinot@adacore.com>
6278 * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
6279 temporary object if the actual is constrained, and the discriminants
6280 read from the stream don't match.
6282 2011-08-29 Tristan Gingold <gingold@adacore.com>
6284 * sem_attr.adb, exp_attr.adb: Add handling of
6285 Attribute_System_Allocator_Alignment
6286 * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
6287 Attribute_System_Allocator_Alignment.
6288 * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
6289 * gcc-interface/targtyps.c, gcc-interface/utils2.c,
6290 gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
6291 get_target_system_allocator_alignment.
6293 2011-08-29 Arnaud Charlet <charlet@adacore.com>
6295 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
6298 2011-08-29 Arnaud Charlet <charlet@adacore.com>
6300 * exp_ch3.adb (In_Runtime): Fix typo.
6302 2011-08-29 Bob Duff <duff@adacore.com>
6304 * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
6306 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6308 * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
6309 and a separate tag assignment is generated, ensure that the tag
6310 assignment is analyzed.
6312 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6314 * atree.ads, atree.adb (Copy_Separate_List): New function that applies
6315 Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
6316 of statement lists that may contain local declarations.
6317 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
6318 duplicate the triggering statements needed for the expansion of this
6319 construct, when the trigger is a dispatching call to a synchronized
6322 2011-08-29 Arnaud Charlet <charlet@adacore.com>
6324 * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
6325 * bindgen.adb: Add comments.
6326 * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
6329 2011-08-29 Robert Dewar <dewar@adacore.com>
6331 * exp_attr.adb: Minor reformatting.
6332 Minor code reorganization and commenting.
6333 * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
6336 2011-08-29 Thomas Quinot <quinot@adacore.com>
6338 * get_scos.adb: Ignore chaining indicators not currently supported
6341 2011-08-29 Arnaud Charlet <charlet@adacore.com>
6343 * system.ads: Minor editing.
6345 2011-08-29 Arnaud Charlet <charlet@adacore.com>
6347 * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
6349 * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
6350 Attribute_Elab_Subp_Body.
6351 * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
6352 * sem_util.adb: Update comments.
6354 2011-08-29 Thomas Quinot <quinot@adacore.com>
6356 * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
6357 pragma name for each SCO statement corresponding to a pragma.
6359 2011-08-29 Arnaud Charlet <charlet@adacore.com>
6361 * opt.ads: Minor editing.
6363 2011-08-29 Yannick Moy <moy@adacore.com>
6365 * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
6366 that only made sense for CodePeer mode.
6368 2011-08-29 Jose Ruiz <ruiz@adacore.com>
6370 * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
6371 which is no longer used.
6372 * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
6373 handling of the 64-bit division check.
6374 * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
6376 * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
6379 2011-08-29 Thomas Quinot <quinot@adacore.com>
6381 * get_scos.adb: Minor reformatting.
6383 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
6385 * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
6386 statement list is wrapped in a block, the block is explicitly analyzed
6387 in order to properly redecorate the entities and create a servicing
6390 2011-08-29 Tristan Gingold <gingold@adacore.com>
6392 * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
6393 (Set_Zero_Cost_Handling): Remove.
6395 2011-08-29 Thomas Quinot <quinot@adacore.com>
6397 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
6399 2011-08-29 Geert Bosch <bosch@adacore.com>
6401 * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
6402 instruction, as the latter may produce -0.0, which is not a valid VAX
6404 (Neg_G): Likewise for VAX F float.
6406 2011-08-29 Robert Dewar <dewar@adacore.com>
6408 * exp_util.adb: Minor reformatting.
6410 2011-08-29 Yannick Moy <moy@adacore.com>
6412 * sem_ch3.adb: Minor comment update.
6414 2011-08-29 Thomas Quinot <quinot@adacore.com>
6416 * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
6419 2011-08-29 Thomas Quinot <quinot@adacore.com>
6421 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
6422 current statement sequence on a generic instantiation or a subprogram
6425 2011-08-29 Robert Dewar <dewar@adacore.com>
6427 * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
6430 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
6432 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
6433 Correct the check which involves the freeze node of a controlled or
6434 access-to-controlled type.
6436 2011-08-29 Geert Bosch <bosch@adacore.com>
6438 * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
6440 * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
6443 2011-08-29 Yannick Moy <moy@adacore.com>
6445 * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
6446 for every index type and component type that is not a subtype_mark.
6447 (Process_Subtype): Set Etype of subtype.
6449 2011-08-29 Robert Dewar <dewar@adacore.com>
6451 * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
6452 reorganization. Minor reformatting.
6454 2011-08-29 Steve Baird <baird@adacore.com>
6456 * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
6457 for CodePeer and ALFA modes.
6459 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6461 * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
6462 that comes from an enclosing scope if it is not the renaming of an
6463 actual, to handle properly a spurious ambiguity in an instance.
6465 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
6467 * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
6468 (Alignment_Check_For_Size_Change): ...this. Add SIZE parameter and
6469 use it instead of the Esize of the first parameter.
6470 (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
6472 <Size>: Likewise. Call it for composite types on the RM size.
6474 2011-08-29 Yannick Moy <moy@adacore.com>
6476 * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
6477 * sem_util.adb (Unique_Name): Correct behaviour for names of
6480 2011-08-29 Yannick Moy <moy@adacore.com>
6482 * sem_prag.adb (Check_Precondition_Postcondition): In formal
6483 verification mode, analyze pragma expression for correctness, for
6484 pre/post on library-level subprogram, as it is not expanded later.
6486 2011-08-29 Yannick Moy <moy@adacore.com>
6488 * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
6489 in formal verification.
6491 2011-08-29 Thomas Quinot <quinot@adacore.com>
6493 * sem_util.adb: Minor reformatting.
6494 * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
6496 * par_sco.ads, par_sco.adb: Update comments.
6498 2011-08-29 Yannick Moy <moy@adacore.com>
6500 * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
6501 associated getter/setter.
6502 * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
6504 2011-08-29 Vincent Celier <celier@adacore.com>
6506 * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
6507 * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
6508 with declarations for Language_Kind and Dependency_Kind for Ada.
6509 * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
6510 (Process_Compiler): Take into account the new attributes Dependency_Kind
6512 (Check_Configuration): Check if language kind is unit based, not if the
6513 language name is Ada.
6514 (Process_Exceptions_Unit_Based): Ditto
6515 (Add_Language): Remove default additions of language and dependency kind
6516 * prj.ads: Minor comment change
6517 * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
6519 2011-08-29 Johannes Kanig <kanig@adacore.com>
6521 * debug.adb: Update comments.
6523 2011-08-24 Joseph Myers <joseph@codesourcery.com>
6525 * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
6526 (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
6527 (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
6528 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
6529 (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
6531 2011-08-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6533 * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
6534 (GNATLIBCFLAGS_FOR_C): Replace
6535 TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
6536 (gnatlib-shared-default, gnatlib-shared-dual-win32)
6537 (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
6538 (gnatlib-sjlj, gnatlib-zcx): Likewise.
6540 2011-08-07 Eric Botcazou <ebotcazou@adacore.com>
6542 * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
6544 * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
6546 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
6548 2011-08-05 Nicolas Roche <roche@adacore.com>
6550 * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
6551 libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
6553 * gcc-interface/Make-lang.in: Add support for canadian cross setting.
6555 2011-08-05 Matthew Heaney <heaney@adacore.com>
6557 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
6558 subprogram bodies declared out-of-order.
6560 2011-08-05 Yannick Moy <moy@adacore.com>
6562 * sem_util.adb (Unique_Name): only prefix with "standard" the names of
6563 entities directly in package Standard, otherwise skip the standard
6566 2011-08-05 Robert Dewar <dewar@adacore.com>
6568 * a-cbmutr.adb: Minor reformatting
6569 (Allocate_Node): refactor node allocation algorithm
6571 2011-08-05 Robert Dewar <dewar@adacore.com>
6573 * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
6574 * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
6576 (Analyze_Pragma, case Check_Policy): Ditto.
6577 * sem_prag.ads (Check_Disabled): New function
6578 * snames.ads-tmpl: Add Name_Disable.
6580 2011-08-05 Robert Dewar <dewar@adacore.com>
6582 * gnat_rm.texi: Document implementation-defined policy DISABLE for
6583 pragmas Assertion_Policy, Check_Policy, Debug_Policy.
6585 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6587 * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
6588 that appears in a generic formal part and applies to a formal
6591 2011-08-05 Robert Dewar <dewar@adacore.com>
6593 * a-cbmutr.ads: Minor reformatting.
6595 2011-08-05 Matthew Heaney <heaney@adacore.com>
6597 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
6598 to check count, check sign of value instead.
6599 * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
6600 (Copy_Subtree): allocate copy of source element
6601 (Equal_Subtree): compare elements, not access objects
6603 2011-08-05 Vincent Celier <celier@adacore.com>
6605 * gnat_ugn.texi: Fix VMS alternative.
6607 2011-08-05 Thomas Quinot <quinot@adacore.com>
6609 * sem_ch11.adb: Add comment.
6611 2011-08-05 Robert Dewar <dewar@adacore.com>
6613 * exp_util.adb: Minor comment fix.
6615 2011-08-05 Robert Dewar <dewar@adacore.com>
6617 * scng.adb (Error_Unterminated_String): Improve flag position when
6620 2011-08-05 Matthew Heaney <heaney@adacore.com>
6622 * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
6624 * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
6625 multiway tree containers.
6627 2011-08-05 Robert Dewar <dewar@adacore.com>
6629 * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
6630 * stylesw.adb: Implement -gnatyC to control comment spacing
6631 * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
6633 * usage.adb: Add line for -gnatyC.
6635 2011-08-05 Robert Dewar <dewar@adacore.com>
6637 * gnat_ugn.texi: Document -gnatyC.
6638 * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
6639 synonym for COMMENTS2).
6641 2011-08-05 Robert Dewar <dewar@adacore.com>
6643 * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
6644 a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
6645 sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
6646 a-comutr.ads, lib-xref.adb: Minor reformatting.
6648 2011-08-05 Robert Dewar <dewar@adacore.com>
6650 * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
6651 warning if there is an exception handler present.
6653 2011-08-05 Pascal Obry <obry@adacore.com>
6655 * a-iteint.ads: Fix copyright year.
6657 2011-08-05 Thomas Quinot <quinot@adacore.com>
6659 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
6660 statement SCO for a USE clause or a representation clause.
6662 2011-08-05 Yannick Moy <moy@adacore.com>
6664 * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
6665 between body and spec for stub.
6666 (Detect_And_Add_ALFA_Scope): take into account subprogram stub
6667 * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
6668 pragma precondition or postcondition, for which the enclosing
6669 subprogram or package in the AST is not the desired one, return empty.
6671 2011-08-05 Thomas Quinot <quinot@adacore.com>
6673 * g-expect.adb: Minor reformatting.
6675 2011-08-05 Bob Duff <duff@adacore.com>
6677 * a-fihema.adb: Comment out OS_Lib.
6679 2011-08-05 Matthew Heaney <heaney@adacore.com>
6681 * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
6682 (unbounded multiway tree containers) and a-iteint.ads.
6683 * a-comutr.ads, a-comutr.adb:
6684 This is the new Ada 2012 unit for unbounded multiway tree containers
6685 * a-cimutr.ads, a-cimutr.adb
6686 This is the new Ada 2012 unit for indefinite multiway tree containers
6687 * a-iteint.ads: New file.
6689 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6691 * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
6693 2011-08-05 Bob Duff <duff@adacore.com>
6695 * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
6697 * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
6699 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6701 * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
6702 general indexing aspects of Ada2012. Called when analyzing indexed
6703 components when other interpretations fail.
6704 * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
6705 in an expression context where overloading is meaningful. This excludes
6706 the occurrence in an aspect specification (efficiency only).
6707 * sem_attr.adb (Analyze_Attribute): indicate that the attributes
6708 related to iterators can be set by an attribute specification, but
6710 * sem_ch13.adb (Analyze_Aspect_Specifications): handle
6711 Constant_Indexing and Variable_Indexing.
6712 (Check_Indexing_Functions): New procedure to perform legality checks.
6713 Additional semantic checks at end of declarations.
6715 2011-08-05 Sergey Rybin <rybin@adacore.com>
6717 * tree_io.ads: Update ASIS_Version_Number because of the change of the
6718 order of calling Tree_Write/Tree_Read routines made for aspects.
6720 2011-08-05 Bob Duff <duff@adacore.com>
6722 * a-fihema.adb (Finalize): Fix race condition.
6724 2011-08-05 Yannick Moy <moy@adacore.com>
6726 * sem_ch12.adb (Analyze_Package_Instantiation,
6727 Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
6730 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6732 * sem_type.adb (Specific_Type): in an instance, the type-specific
6733 operand of an equality check that involves null may have a private
6734 type. Use full view to determine legality of construct.
6736 2011-08-05 Vincent Celier <celier@adacore.com>
6738 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
6739 delete or close the file when the call to gnatmake was successful.
6741 2011-08-05 Yannick Moy <moy@adacore.com>
6743 * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
6744 Global_Discard_Names.
6746 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6748 * sinfo.ads: comments on use of entity field for aspect specifications.
6750 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6752 * sem_ch12.adb (Reset_Entity): If the entity field of the associated
6753 node is not itself an entity but a selected component, it is a
6754 rewritten parameterless call to an en enclosing synchronized operation,
6755 and this expansion will be performed again in the instance, so there is
6756 no global information to preserve.
6758 2011-08-05 Javier Miranda <miranda@adacore.com>
6760 * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
6761 for renamings of predefined primitives.
6762 (In_Predef_Prims_DT): New subprogram.
6764 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6766 * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
6767 possible interpretation of name is a reference type, add an
6768 interpretation that is the designated type of the reference
6769 discriminant of that type.
6770 * sem_res.adb (resolve): If the interpretation imposed by context is an
6771 implicit dereference, rewrite the node as the deference of the
6772 reference discriminant.
6773 * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
6774 Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
6775 parent type or base type.
6776 * sem_ch4.adb (Process_Indexed_Component,
6777 Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
6778 Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
6779 Check for implicit dereference.
6780 (List_Operand_Interps): Indicate when an implicit dereference is
6782 * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
6784 2011-08-05 Thomas Quinot <quinot@adacore.com>
6786 * scos.ads: Update documentation of SCO table. Pragma statements can now
6787 be marked as disabled (using 'p' instead of 'P' as the statement kind).
6788 * par_sco.ads, par_sco.adb: Implement the above change.
6789 (Process_Decisions_Defer): Generate a P decision for the first parameter
6790 of a dyadic pragma Debug.
6791 * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
6793 * put_scos.adb: Code simplification based on above change.
6795 2011-08-05 Robert Dewar <dewar@adacore.com>
6797 * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
6798 bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
6799 a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
6800 prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
6802 2011-08-05 Bob Duff <duff@adacore.com>
6804 * a-stunau.ads, g-spipat.adb: Update comments.
6806 2011-08-05 Bob Duff <duff@adacore.com>
6808 * a-fihema.ads: Minor comment fix.
6809 * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
6811 (Attach, Detach): Remove some unnecessary code.
6812 (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
6814 2011-08-05 Bob Duff <duff@adacore.com>
6816 * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
6817 allocation for Objects component. This simplifies the code somewhat. It
6818 is also a little more efficient in the not-so-unusual case where there
6819 are no controlled objects allocated.
6820 Make Finalization_Started flag atomic.
6821 (Finalize): Avoid unnecessary detachment of items from the list.
6822 (pcol): Minor cleanup.
6824 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6826 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
6827 package whose name is the same as that of the generic unit, or its
6830 2011-08-05 Bob Duff <duff@adacore.com>
6832 * a-fihema.adb, a-fihema.ads: Minor comment improvements.
6833 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
6834 Minor comment fixes.
6836 2011-08-05 Arnaud Charlet <charlet@adacore.com>
6838 * make.adb (Linking_Phase): No longer need to set source search path
6839 before calling gnatlink in CodePeer mode.
6840 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
6841 gcc in CodePeer mode, since the binder generated file no longer has a
6843 * switch.ads, switch.adb (Is_Language_Switch): Removed.
6844 * switch-c.adb: Update comment.
6846 2011-08-05 Thomas Quinot <quinot@adacore.com>
6848 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
6850 2011-08-05 Nicolas Roche <roche@adacore.com>
6852 * gnat_ugn.texi: Fix minor syntax error issue.
6854 2011-08-05 Vincent Celier <celier@adacore.com>
6856 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
6857 delete or close the file when the call to gnatmake returns a non
6858 successful return code.
6860 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6862 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
6863 check, indicate that the copy of the original node does not come from
6864 source, to prevent an infinite recursion of the expansion.
6866 2011-08-05 Johannes Kanig <kanig@adacore.com>
6868 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
6869 VC generation for subprogram bodies.
6871 2011-08-05 Yannick Moy <moy@adacore.com>
6874 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
6875 the base type with the smallest allowed base type.
6877 2011-08-05 Sergey Rybin <rybin@adacore.com>
6879 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
6882 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6884 * sem_ch12.ads: minor comment updates.
6886 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6888 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
6889 instantiation and a formal package the compiler generates a package
6890 renaming declaration so that the generic name within the declaration
6891 is interpreted as a renaming of the instance. At the end of a formal
6892 package declaration, this renaming must become invisible.
6894 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
6896 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
6897 comparison and rely on concrete entities instead.
6899 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6901 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
6902 and discriminants, to indicate that the type has an access discriminant
6903 that supports implicit dereference.
6904 * snames.ads-tmpl: Add names of aspects and attributes related to
6905 Ada2012 iterators: constant_indexing, default_iterator,
6906 iterator_element, implicit_dereference, variable_indexing.
6907 * aspects.ads, aspects.adb: entries for iterator-related aspects.
6908 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
6909 iterator-related aspects.
6910 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
6912 2011-08-05 Sergey Rybin <rybin@adacore.com>
6914 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
6915 metrics in gnatmetric to cover new kinds of coupling mentrics.
6917 2011-08-05 Steve Baird <baird@adacore.com>
6919 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
6920 of calling the user-defined main subprogram.
6921 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode
6922 is set) Call_Main_Subprogram ahead of, as opposed to
6924 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
6925 generation of a "with" of the user-defined main subprogram.
6926 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
6927 (which is now called from Gen_Main instead).
6929 2011-08-05 Emmanuel Briot <briot@adacore.com>
6931 * projects.texi: Added reference to the Makefile package.
6933 2011-08-05 Thomas Quinot <quinot@adacore.com>
6935 * exp_ch7.adb: Minor comment rewording.
6937 2011-08-05 Ed Falis <falis@adacore.com>
6939 * env.c: Fix comment.
6941 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
6943 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
6944 character comparison and rely on concrete entities instead.
6946 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6948 * sem_ch3.adb: (Check_Private_Overriding): better error message,
6949 suggested by AI95-0068.
6951 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
6953 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
6954 the two potential initialization calls. This accounts for any
6955 access-before-elaboration checks which may precede the initialization
6957 (Next_Suitable_Statement): New routine. Returns the next real statement
6958 after the input node while skipping generated checks.
6959 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
6960 with comment on usage.
6961 Do not generate Elaborate_All when the trigger is a finalization call
6962 coming from a type init proc.
6963 (Check_Elab_Call): Propagate the initialization procedure context to
6964 subsequent calls to Check_A_Call.
6965 (Check_Internal_Call_Continue): Propagate the initialization procedure
6966 context to subsequent calls to Check_Elab_Call.
6967 (Is_Finalization_Procedure): New routine. Returns True if the input
6968 entity denotes a [Deep_]Finalize routine.
6969 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
6970 along with comment on usage.
6972 2011-08-05 Vadim Godunko <godunko@adacore.com>
6974 * s-atocou.ads: Add list of supported platforms.
6976 2011-08-05 Yannick Moy <moy@adacore.com>
6978 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
6980 * opt.ads (Disable_ALI_File): new Boolean flag
6981 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
6983 2011-08-05 Ed Falis <falis@adacore.com>
6985 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
6986 environ is properly defined.
6988 2011-08-05 Vincent Celier <celier@adacore.com>
6990 * make.adb (Compilation_Phase): Exit immediately when all objects have
6991 been found up to date, to avoid multiple exit messages.
6992 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
6993 same project for languages with no compiler.
6994 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
6996 2011-08-05 Robert Dewar <dewar@adacore.com>
6998 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
6999 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
7000 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
7001 s-atocou-builtin.adb: Minor reformatting.
7003 2011-08-05 Yannick Moy <moy@adacore.com>
7005 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
7006 if the node to wrap is a pragma check, this node and enclosed
7007 expression are not expanded, so do not apply any transformations here.
7008 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
7009 introducing transient scopes.
7011 2011-08-05 Jose Ruiz <ruiz@adacore.com>
7013 * adaint.c (__gnat_set_writable, __gnat_set_readable,
7014 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
7015 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
7016 routine is available, so we use the default implementation of these
7018 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
7019 support for copying attributes on VxWorks 6.
7021 2011-08-05 Yannick Moy <moy@adacore.com>
7023 * debug.adb: Remove use of -gnatd.D.
7024 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
7025 * opt.ads: Simplify variables for ALFA mode, to keep one only
7026 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
7029 2011-08-05 Vincent Celier <celier@adacore.com>
7031 * prj-conf.adb (Do_Autoconf): Look also for --RTS in
7032 Builder'Default_Switches.
7034 2011-08-05 Vincent Celier <celier@adacore.com>
7036 * makeusg.adb: Add lines for --create-map-file switches.
7038 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7040 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
7041 profile is incomplete and the full view is available, replace it with
7043 * sem_ch6.adb (Possible_Freeze): if a type in the profile is
7044 incomplete, freezing the subprogram is delayed until the full view is
7046 * sem_type.adb (Disambiguate): an ambiguity between a user-defined
7047 fixed-point multiplication operator and the predefined operator is
7048 resolved in favor of the user-defined one.
7050 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7052 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
7055 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7057 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
7058 whether a type lacks user-defined Read or Write operations, or has a
7059 component that lacks them.
7060 * sem_attr.adb (Check_Stream_Attribute): if restriction
7061 No_Default_Stream_Attributes is active, verify that all subcomponent
7062 types of the target have user-defined stream operations, and report
7064 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
7065 * exp_strm.adb: Build_Elementary_Input_Call,
7066 Build_Elementary_Write_Call): remove checks for restriction
7067 No_Default_Stream_Attributes, now checked in semantics.
7069 2011-08-04 Vincent Celier <celier@adacore.com>
7071 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
7072 switches on the command line, look for all valid --RTS switches in the
7073 Builder switches and for each language use the first runtime name found
7074 to invoke gprconfig.
7075 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
7076 command line and there is no auto-configuration.
7077 (Runtime_Name_Set_For): New function.
7079 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7081 * exp_ch7.adb (Build_Object_Declarations): Do not generate the
7082 elaborate initialization expression for variable Abort when processing
7083 a package body or a declaration.
7084 (Create_Finalizer): Propagate the package context when creating the
7085 exception-related variables.
7086 * exp_ch7.ads (Build_Object_Declarations): New formal parameter
7087 For_Package along with usage comment.
7089 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7091 * gcc-interface/Makefile.in: Clean up targets.
7092 Enable new package for atomic counters and copy-on-write implementation
7093 of unbounded strings on x86 platforms.
7094 * gcc-interface/Make-lang.in: Update dependencies.
7096 2011-08-04 Robert Dewar <dewar@adacore.com>
7098 * exp_ch7.adb: Minor reformatting.
7100 2011-08-04 Robert Dewar <dewar@adacore.com>
7102 * exp_strm.adb: Minor reformatting.
7104 2011-08-04 Vadim Godunko <godunko@adacore.com>
7106 * s-atocou.adb: Replace by dummy version and use on targets where atomic
7107 operations are not supported.
7108 * s-atocou-builtin.adb: Renamed from s-atocou.adb.
7109 * s-atocou-x86.adb: New file.
7110 * Makefile.rtl: Add s-atocou.o file
7112 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7114 * make.adb (Compile): Move setting of CodePeer_Mode to ...
7115 (Compilation_Phase): ... here.
7116 (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
7118 2011-08-04 Thomas Quinot <quinot@adacore.com>
7120 * Make-generated.in: Fix minor typo in comment.
7122 2011-08-04 Thomas Quinot <quinot@adacore.com>
7124 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
7127 2011-08-04 Robert Dewar <dewar@adacore.com>
7129 * a-coinho.adb: Minor reformatting.
7131 2011-08-04 Robert Dewar <dewar@adacore.com>
7133 * a-coinho.ads: Minor reformatting.
7135 2011-08-04 Vadim Godunko <godunko@adacore.com>
7137 * s-atocou.ads, s-atocou.adb: New files.
7138 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
7139 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
7140 direct use of GCC's atomic builtins and replace them by use of new
7141 atomic counter package.
7143 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7145 * exp_strm.adb: better error message for No_Default_Stream_Attributes.
7147 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7149 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
7150 with a call to Get_External_Tag.
7151 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
7152 subprogram usage. Remove the guard against package declarations and
7153 bodies since Build_Cleanup_Statements is no longer invoked in that
7155 (Build_Components): Initialize Tagged_Type_Stmts when the context
7156 contains at least one library-level tagged type.
7157 (Build_Finalizer): New local variables Has_Tagged_Types and
7158 Tagged_Type_Stmts along with associated comments on usage. Update the
7159 logic to include tagged type processing.
7160 (Create_Finalizer): Insert all library-level tagged type unregistration
7161 code before the jump block circuitry.
7162 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
7163 (Expand_N_Package_Declaration): Remove the call to
7164 Build_Cleanup_Statements.
7165 (Process_Tagged_Type_Declaration): New routine. Generate a call to
7166 unregister the external tag of a tagged type.
7167 (Processing_Actions): Reimplemented to handle tagged types.
7168 (Process_Declarations): Detect the declaration of a library-level
7169 tagged type and carry out the appropriate actions.
7170 (Unregister_Tagged_Types): Removed. The machinery has been directly
7171 merged with Build_Finalizer.
7173 2011-08-04 Robert Dewar <dewar@adacore.com>
7175 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
7176 gnatls.adb, exp_ch3.adb: Minor reformatting.
7178 2011-08-04 Marc Sango <sango@adacore.com>
7180 * sem_attr.adb (Analyze_Attribute): Replace the message
7181 "invisible attribute of}" of the spark restriction violation in
7182 attribute reference by the simple message "invisible attribute of type".
7183 Indeed, the node value Error_Msg_Node_1 used is in conflit with the
7184 two insertion characters: '&' and '}'.
7186 2011-08-04 Vadim Godunko <godunko@adacore.com>
7188 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
7189 * a-coinho.ads, a-coinho.adb: New file.
7190 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
7192 2011-08-04 Nicolas Roche <roche@adacore.com>
7194 * alfa_test.adb: Not all ali files are containing alfa information even
7195 if compiled with -gnatd.F. So suppress warning about missing ALFA
7198 2011-08-04 Yannick Moy <moy@adacore.com>
7200 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
7202 * put_alfa.adb: Check that scope name is not empty.
7204 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7206 * exp_ch3.adb (Stream_Operation_Ok): new predicate
7207 Needs_Elementary_Stream_Operation, to determine whether user-defined
7208 Read and Write attributes are available for the elementary components
7209 of the given type. If only the predefined attributes are available,
7210 then when restriction No_Default_Stream_Attributes is active the
7211 predefined stream attributes for the composite type cannot be created.
7213 2011-08-04 Robert Dewar <dewar@adacore.com>
7215 * bindgen.adb: Fix obsolete comments and names from Ada/C days.
7216 Put routines in alpha order
7218 2011-08-04 Jose Ruiz <ruiz@adacore.com>
7220 * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
7221 * gcc-interface/Make-lang.in: Update dependencies.
7223 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7225 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
7226 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
7229 2011-08-04 Robert Dewar <dewar@adacore.com>
7231 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
7232 lib-xref-alfa.adb: Minor reformatting.
7234 2011-08-04 Marc Sango <sango@adacore.com>
7236 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
7237 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
7238 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
7241 2011-08-04 Tristan Gingold <gingold@adacore.com>
7243 * bindgen.adb (Gen_Adainit_C): Remove.
7244 (Gen_Adafinal_C): Ditto.
7245 (Gen_Elab_Externals_C): Ditto.
7246 (Gen_Elab_Calls_C): Ditto.
7247 (Gen_Elab_Order_C): Ditto.
7248 (Gen_Elab_Defs_C): Ditto.
7249 (Gen_Finalize_Library_C): Ditto.
7250 (Gen_Finalize_Library_Defs_C): Ditto.
7251 (Gen_Main_C): Ditto.
7252 (Gen_Output_File_C): Ditto.
7253 (Gen_Restrictions_C): Ditto.
7254 (Gen_Versions_C): Ditto.
7255 (Write_Info_Ada_C): Ditto.
7256 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
7257 (Gen_Output_File): Do not force Ada_Bind_File anymore.
7258 Always call Gen_Output_File_Ada.
7259 * gnatlink.adb (Begin_Info): Now a constant.
7261 (Ada_Bind_File): Remove
7262 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases.
7263 * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
7264 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
7265 * opt.ads (Ada_Bind_File): Remove.
7267 2011-08-04 Thomas Quinot <quinot@adacore.com>
7269 * projects.texi: Document target-specific directory in default project
7272 2011-08-04 Thomas Quinot <quinot@adacore.com>
7274 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
7277 2011-08-04 Yannick Moy <moy@adacore.com>
7279 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
7280 opt.ads, lib-xref.ads: Code clean up.
7282 2011-08-04 Yannick Moy <moy@adacore.com>
7284 * gnat_rm.texi: Update description of Test_Case
7285 * gnat_ugn.texi: Typo.
7287 2011-08-04 Ed Falis <falis@adacore.com>
7289 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
7291 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7293 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
7294 it is of type Root_Controlled. This action eliminates fields Prev and
7295 Next from type equality.
7297 2011-08-04 Yannick Moy <moy@adacore.com>
7299 * lib-xref-alfa.adb: Correct typo.
7301 2011-08-04 Matthew Heaney <heaney@adacore.com>
7303 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
7306 2011-08-04 Yannick Moy <moy@adacore.com>
7308 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
7309 (Analyze_Pragma): allow static string expression for name of Test_Case,
7310 instead of simply string literals.
7311 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
7314 2011-08-04 Vincent Celier <celier@adacore.com>
7316 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
7317 case suffixes to find truncated main sources.
7319 2011-08-04 Tristan Gingold <gingold@adacore.com>
7321 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
7322 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
7323 (Compute_Current_Task): Ditto.
7325 2011-08-04 Tristan Gingold <gingold@adacore.com>
7327 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
7329 2011-08-04 Yannick Moy <moy@adacore.com>
7331 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
7332 library-level constant.
7333 (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
7334 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
7335 used as selector of parameter association, in ALFA mode.
7337 2011-08-04 Robert Dewar <dewar@adacore.com>
7339 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
7340 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
7343 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7345 * make.adb (Linking_Phase): Set source search path before calling
7346 gnatlink in CodePeer mode.
7348 2011-08-04 Javier Miranda <miranda@adacore.com>
7350 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
7351 Remove code which takes care of building TSDs.
7352 * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
7353 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
7354 the accessibility check in VM targets.
7355 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
7356 (Building_Static_DT): Now returns false for VM targets.
7357 (Build_VM_TSDs): Removed.
7358 (Expand_Interface_Conversion): Generate missing runtime check for
7359 conversions to interface types whose target type is unknown at compile
7361 (Make_VM_TSD): Add missing code to disable the generation of calls to
7362 Check_TSD if the tagged type is not defined at library level, or not
7363 has a representation clause specifying its external tag, or -gnatdQ is
7365 * exp_disp.ads (Build_VM_TSDs): Removed.
7366 (Make_VM_TSDs): Spec relocated from exp_disp.adb
7367 * sem_disp.adb (Check_Dispatching_Operation): No code required to
7368 register primitives in the dispatch tables in VM targets.
7369 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
7370 initialization of class-wide interface objects in VM targets.
7371 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
7374 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
7376 * gnatlink.adb (Gnatlink): Correct missleading error message displayed
7377 when dotnet-ld cannot be found.
7379 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7381 * bindgen.adb: Simplify significantly generation of binder body file in
7383 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
7384 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
7387 2011-08-04 Yannick Moy <moy@adacore.com>
7389 * sem_prag.adb, sem.ads: Code cleanup.
7391 2011-08-04 Tristan Gingold <gingold@adacore.com>
7393 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
7394 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
7395 results if possible.
7396 * s-stusta.adb (Print): Adjust after changes in s-stausa.
7397 * gnat_ugn.texi: Update dynamic stack usage section.
7399 2011-08-04 Steve Baird <baird@adacore.com>
7401 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
7402 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
7403 contains only a call to the user-defined main subprogram.
7404 (Gen_Main_Ada) - If CodePeer_Mode is set, then
7405 call the "wrapper" subprogram instead of directly
7406 calling the user-defined main subprogram.
7408 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7410 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
7411 alternatives of a case statement for controlled objects. Rename local
7412 variable A to Dead_Alt.
7413 (Expand_N_If_Statement): Check the then and else statements of an if
7414 statement for controlled objects. Check the then statements of all
7415 elsif parts of an if statement for controlled objects.
7416 (Expand_N_Loop_Statement): Check the statements of a loop for controlled
7418 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
7419 detects a loop associated with the expansion of an array object.
7420 Augment the processing of the loop statements to account for a possible
7421 wrap done by Process_Statements_For_Controlled_Objects.
7422 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
7423 statements and abortable part of an asynchronous select for controlled
7425 (Expand_N_Conditional_Entry_Call): Check the else statements of a
7426 conditional entry call for controlled objects.
7427 (Expand_N_Selective_Accept): Check the alternatives of a selective
7428 accept for controlled objects.
7429 (Expand_N_Timed_Entry_Call): Check the entry call and delay
7430 alternatives of a timed entry call for controlled objects.
7431 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
7432 exception handler for controlled objects.
7433 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
7434 Add formal parameter Nested_Constructs along with its associated
7436 (Requires_Cleanup_Actions (Node_Id)): Update all calls to
7437 Requires_Cleanup_Actions.
7438 (Process_Statements_For_Controlled_Objects): New routine.
7439 * exp_util.ads (Process_Statements_For_Controlled_Objects): New
7440 routine. Inspect a node which contains a non-handled sequence of
7441 statements for controlled objects. If such an object is found, the
7442 statements are wrapped in a block.
7444 2011-08-04 Bob Duff <duff@adacore.com>
7446 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
7447 need to compare with Class_Wide_Type (T2), in order to get at the
7448 original class-wide type node.
7449 * sem_type.ads (Covers): Improve the comment.
7450 * einfo.ads (Class_Wide_Type): Improve the comment.
7451 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
7452 the type of the Deref.
7454 2011-08-04 Yannick Moy <moy@adacore.com>
7456 * gnat_rm.texi: Document that Test_Case pragma can only appear on
7457 separate declarations.
7458 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
7459 check identifier of pragma argument.
7460 (Chain_TC): check that no other test case associated to the same entity
7461 share the same name.
7462 (Check_Test_Case): disallow test case inside subprogram body
7463 (Analyze_Pragma): correct call to check identifier and not argument
7464 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
7465 function gets name from test case pragma.
7467 2011-08-04 Yannick Moy <moy@adacore.com>
7469 * gnat_rm.texi: Document new pragma and aspect.
7470 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
7471 (No_Duplicates_Allowed): new constant array defining whether duplicates
7472 aspects of each kind can appear on the same declaration.
7473 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
7474 field, which points to a node holding the previous Spec_PPC_List.
7475 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
7476 through the indirection with Contract.
7477 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
7478 * par-prag.adb (Prag): do nothing on Test_Case pragma
7479 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
7481 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
7482 component Ensures of Test_Case.
7483 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
7484 (Analyze_Generic_Subprogram_Declaration,
7485 Analyze_Subprogram_Instantiation,
7486 Analyze_Abstract_Subprogram_Declaration,
7487 Analyze_Subprogram_Body_Helper,
7488 Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
7489 insert contract in subprogram node at point of definition
7491 (Aspect_Loop): do not raise error on duplicate Test_Case aspect
7492 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
7493 corresponding pragma
7494 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
7495 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
7496 similar to the analysis of pre/post
7497 (Derive_Subprogram): insert contract in subprogram node at point of
7499 * sem_prag.adb, sem_prag.ads
7500 (Check_Arg_Is_String_Literal, Check_Identifier):
7501 new checking procedures to be called in treatment of pragmas
7502 (Check_Test_Case): new procedure to check that a Test_Case aspect or
7503 pragma is well-formed. This does not check currently that 'Result is
7504 used only in the Ensures component of a Test_Case.
7505 (Analyze_Pragma): add case for Test_Case
7506 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
7507 components of a Test_Case.
7508 (Preanalyze_TC_Args): new procedure to preanalyze the boolean
7509 expressions in the 3rd (and 4th if present) arguments of a Test_Case
7510 pragma, treated as spec expressions.
7511 (Sig_Flags): add value -1 for Test_Case.
7512 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
7513 Get_Requires_From_Test_Case_Pragma): getters for both expression
7514 components of a Test_Case.
7515 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
7516 indirection between an entry or [generic] subprogram entity and its
7517 pre/post + test-cases.
7518 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
7519 get/set for fields of an N_Contract node.
7520 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
7521 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
7522 names and pragma for Test_Case.
7523 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
7525 2011-08-04 Vincent Celier <celier@adacore.com>
7527 * gnat_ugn.texi: Improve documentation of gnatmake switch
7528 --source-info-file=.
7530 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7532 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
7533 type). Initialize Atyp to the appropriate type which is later checked
7534 for completion. Rewrite the assertion associated with private type
7537 2011-08-04 Ed Falis <falis@adacore.com>
7539 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
7540 initialize the number of CPUs.
7542 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7544 * sem_type.adb (Disambiguate): New subsidiary routine
7545 In_Same_Declaration_List, to implement AI05-0020: a user-defined
7546 equality on an anonymous access type whose designated type is private
7547 does not lead to an ambiguity with the universal access equality
7548 operator in the body or child units of the defining package. The same
7549 is true for a multiplication operator on a private type completed with
7552 2011-08-04 Javier Miranda <miranda@adacore.com>
7554 * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
7555 (Normalize_Scalars_Config): Removed.
7557 (Register_Opt_Config_Switches): Remove registering config values of
7558 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
7559 (Restore_Opt_Config_Switches): Remove code which restores the values of
7560 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
7561 Init_Or_Norm_Scalars.
7562 (Save_Opt_Config_Switches): Remove code which saves values of
7563 Init_Or_Norm_Scalars and Normalize_Scalars.
7564 (Set_Opt_Config_Switches): Remove code which restores config values of
7565 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
7566 Init_Or_Norm_Scalars.
7568 2011-08-04 Yannick Moy <moy@adacore.com>
7570 * frontend.adb (Frontend): remove previous patch to avoid full
7571 qualification in ALFA mode.
7572 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
7573 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
7574 unique name for an entity, which could be used to identify the entity
7575 across compilation units.
7577 2011-08-04 Thomas Quinot <quinot@adacore.com>
7580 (Initialize_Default_Project_Path): Add target specific directory
7581 ($prefix/$target/lib/gnat) in front of project path in all cases
7582 (making gnatmake's behaviour consistent with gprbuild).
7583 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
7584 Pass target name from Sdefault to project subsystem.
7585 * gnatls.adb: Show new target specific default project directory.
7587 2011-08-04 Johannes Kanig <kanig@adacore.com>
7589 * cstand.adb: Add Information to Identifier in Standard
7590 (Identifer_For): Set Entity to the corresponding entity
7592 2011-08-04 Sergey Rybin <rybin@adacore.com>
7594 * gnat_ugn.texi: Update doc on gnatcheck.
7596 2011-08-04 Yannick Moy <moy@adacore.com>
7598 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
7601 2011-08-04 Yannick Moy <moy@adacore.com>
7603 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
7604 performing expansion.
7605 * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
7606 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
7607 it is not called in ALFA mode.
7609 2011-08-04 Emmanuel Briot <briot@adacore.com>
7611 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
7612 after all, so removed.
7614 2011-08-04 Sergey Rybin <rybin@adacore.com>
7616 * vms_data.ads: Add missing VMS qualifiers.
7618 2011-08-04 Emmanuel Briot <briot@adacore.com>
7620 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
7621 the list of files on the command line after processing it through
7624 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7626 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
7627 processing for .NET/JVM. These targets can now benefit from
7628 Raise_From_Controlled_Operation and they share the same processing with
7630 (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
7631 These targets need transient scopes in order to properly finalize short
7632 lived controlled objects.
7633 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
7634 NET/JVM. These targets can now benefit from
7635 Raise_From_Controlled_Operation and they share the same processing with
7638 2011-08-04 Geert Bosch <bosch@adacore.com>
7640 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
7642 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7644 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
7645 Expand_Record_Aggregate, to determine whether aggregate must be
7646 expanded into assignments. This is the case if the ancestor part is
7647 private, regarless of the setting of the flag Has_Private_Ancestor.
7649 2011-08-04 Ed Falis <falis@adacore.com>
7651 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
7653 2011-08-04 Bob Duff <duff@adacore.com>
7655 * sinfo.ads: Fix comment.
7657 2011-08-04 Steve Baird <baird@adacore.com>
7659 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
7660 choose a package name in much the same way as is
7661 done for JGNAT when VM_Target /= No_VM, except that
7662 a slightly more distinctive prefix string is used.
7664 2011-08-04 Emmanuel Briot <briot@adacore.com>
7666 * makeutl.adb (Complete_Mains): no longer accept unit names on the
7667 gnatmake command line.
7668 This behavior was never documented (and was supported only because of
7669 an early bug in the code). This case might lead to ambiguous cases
7670 (between unit names and truncated base names without suffixes).
7672 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7674 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
7675 Remove the external tag of a tagged type from the internal hash table.
7676 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
7677 expanded usage of the routine. Strenghten the check for Is_Master. Add
7678 processing for tagged types.
7679 (Build_Finalizer): Create all the necessary lists used in finalizer
7680 creation when the processed context is a package that may contain
7682 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
7683 Requires_Cleanup_Actions.
7684 (Expand_N_Package_Body): Package bodies may need clean up code
7685 depending on whether they contain tagged types.
7686 (Expand_N_Package_Declaration): Package declarations may need clean up
7687 code depending on whether they contain tagged types.
7688 (Unregister_Tagged_Types): New routine. Search through a list of
7689 declarations or statements, looking for non-abstract Ada tagged types.
7690 For each such type, generate code to unregister the external tag.
7691 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
7692 Requires_Cleanup_Actions.
7693 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
7694 through a list of declarations or statements looking for non-abstract
7695 Ada tagged types or controlled objects.
7696 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
7697 Requires_Cleanup_Actions.
7698 (Has_Controlled_Objects (List_Id, Boolean)): Removed.
7699 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
7702 2011-08-04 Vincent Celier <celier@adacore.com>
7704 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
7705 has Ada sources, not project Project, because if the root project
7706 Project has no sources of its own, all projects will be deemed without
7709 2011-08-04 Gary Dismukes <dismukes@adacore.com>
7711 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
7712 of the No_Param_Proc acc-to-subp type used for initialization of
7713 __gnat_finalize_library_objects so that it's declared at library level
7714 rather than nested inside of the adainit routine.
7716 2011-08-04 Javier Miranda <miranda@adacore.com>
7718 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
7719 if the tagged type has a representation clause which specifies its
7722 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7724 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
7725 Remove previous procedure with that name.
7726 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
7728 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
7729 subtype mark, the ancestor cannot have unknown discriminants.
7730 (Resolve_Record_Aggregate): if the type has invisible components
7731 because of a private ancestor, the aggregate is illegal.
7733 2011-08-04 Vincent Celier <celier@adacore.com>
7735 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
7736 account switches -gnat2005, -gnat12 and -gnat2012.
7738 2011-08-04 Bob Duff <duff@adacore.com>
7740 * s-tasdeb.ads: Minor comment fix.
7742 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7744 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
7746 * switch.ads, switch.adb (Is_Language_Switch): New function.
7748 2011-08-04 Vincent Celier <celier@adacore.com>
7750 * switch-c.adb: Minor comment addition.
7752 2011-08-04 Vincent Celier <celier@adacore.com>
7754 * vms_conv.adb (Process_Argument): Fail graciously when qualifier
7755 ending with '=' is followed by a space (missing file name).
7757 2011-08-04 Pascal Obry <obry@adacore.com>
7759 * g-regist.ads: Fix size of HKEY on x86_64-windows.
7761 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7763 * sem_ch12.adb (Analyze_Associations): New routine
7764 Check_Overloaded_Formal_Subprogram to reject a formal package when
7765 there is a named association or a box initialisation for an overloaded
7766 formal subprogram of the corresponding generic.
7768 2011-08-04 Yannick Moy <moy@adacore.com>
7770 * alfa.ads (ALFA_Xref_Record): add component for type of entity
7771 * get_alfa.adb, put_alfa.adb: Read and write new component of
7773 * lib-xref-alfa.adb (Collect_ALFA): generate new component.
7775 2011-08-04 Pascal Obry <obry@adacore.com>
7777 * urealp.adb: Minor reformatting.
7779 2011-08-04 Tristan Gingold <gingold@adacore.com>
7781 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
7782 Handle the case when Cleanup_Protected_Object returns Empty.
7784 2011-08-04 Yannick Moy <moy@adacore.com>
7786 * frontend.adb (Frontend): only qualify names in non-ALFA mode
7788 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7790 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
7791 call, ignore functions.
7793 2011-08-04 Geert Bosch <bosch@adacore.com>
7795 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
7798 2011-08-04 Emmanuel Briot <briot@adacore.com>
7800 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
7801 as an index for Builder'Switches. This conforms to the documentation.
7802 * make.adb (Insert_Project_Sources): avoid duplicate code
7804 2011-08-04 Emmanuel Briot <briot@adacore.com>
7806 * makeutl.adb (Complete_Mains): if the user has passed a relative file
7807 name on the command line (for instance "../dummy"), never assume it can
7810 2011-08-04 Tristan Gingold <gingold@adacore.com>
7812 * bindgen.adb: Remove code the reference or create the
7813 Break_Start/__gnat_break_start procedure.
7814 * s-stalib.adb (Break_Start): Removed.
7816 2011-08-04 Emmanuel Briot <briot@adacore.com>
7818 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
7819 shared with gprbuild.
7821 2011-08-04 Yannick Moy <moy@adacore.com>
7823 * par-ch4.adb (P_Primary): preferentially issue an error message about
7824 a missing parenthesis arount a conditional or case expression in Ada
7825 2012 mode, if we detect that the alignment is not correct for a
7828 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7830 * exp_ch7.adb (Process_Declarations): Do not consider the result of a
7831 tag-to-class-wide conversion as needing finalization actions.
7832 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
7833 a tag-to-class-wide conversion as needing finalization actions.
7834 (Is_Finalizable_Transient): The result of a tag-to-class-wide
7835 conversion does not need finalization actions.
7836 (Is_Tag_To_CW_Conversion): New routine.
7837 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
7838 whether an object is the result of a tag-to-class-wide conversion.
7840 2011-08-04 Yannick Moy <moy@adacore.com>
7842 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
7843 the left-hand-side and right-hand-side of a conjunct are inserted when
7844 translating a pre- or postcondition
7845 * sem_ch6.adb: Correct typo in comment
7847 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7849 * gnat_rm.texi: Ravenscar does not prohibit dependence on
7850 Unchecked_Conversion and Unchecked_Deallocation.
7852 2011-08-04 Thomas Quinot <quinot@adacore.com>
7854 * make.adb: Minor reformatting.
7856 2011-08-04 Emmanuel Briot <briot@adacore.com>
7858 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
7859 sources in the project and its imported projects, but not in the whole
7862 2011-08-04 Emmanuel Briot <briot@adacore.com>
7864 * make.adb: Remove debug trace.
7866 2011-08-04 Vincent Celier <celier@adacore.com>
7868 * makeutl.adb (Do_Complete): Get the absolute path name of a relative
7869 path in canonical form, to be able to compare path names on platforms
7870 such as Windows or Darwin.
7872 2011-08-04 Thomas Quinot <quinot@adacore.com>
7874 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
7875 For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
7876 * scos.ads: Update documentation accordingly.
7877 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
7880 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7882 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
7883 attribute only if prefix type is scalar.
7885 2011-08-04 Emmanuel Briot <briot@adacore.com>
7887 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
7888 in gnatmake for specifying mains on the command line that do not belong
7889 to the main project. These mains must currently all belong to the same
7891 (Ultimate_Extension_Of): removed, since duplicated
7892 Ultimate_Extending_Project.
7894 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7896 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
7898 (CodePeer_Mode_String): New.
7899 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
7901 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
7902 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
7903 mode, since no useful elaboration subprogram is needed by CodePeer.
7904 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
7905 In this mode, compile binder file with -gnatC and do stop after this
7908 2011-08-04 Vincent Celier <celier@adacore.com>
7910 * exp_ch7.adb: Minor comment fix.
7912 2011-08-04 Robert Dewar <dewar@adacore.com>
7914 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
7915 exp_ch4.adb, makeutl.adb: Minor reformatting.
7917 2011-08-04 Emmanuel Briot <briot@adacore.com>
7919 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
7920 Create several new subprograms to move code out of Make. This makes the
7921 code more readable, removes code duplication, and is a preparation work
7922 for adding support for aggregate projects.
7924 2011-08-04 Tristan Gingold <gingold@adacore.com>
7926 * s-po32gl.ads, s-po32gl.adb: New files.
7927 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
7928 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
7929 (Build_Finalization_Collection): Use it.
7930 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
7931 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
7933 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
7934 * gcc-interface/Make-lang.in: Update dependencies.
7936 2011-08-04 Emmanuel Briot <briot@adacore.com>
7938 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
7941 2011-08-04 Emmanuel Briot <briot@adacore.com>
7943 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
7944 command line is not a file name, also check whether it could be a unit
7947 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7949 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
7950 the header of the finalization routine.
7951 If the unit has no finalizer but is a body whose spec has one, then
7952 generate the decrement of the elaboration entity only.
7953 If the unit has a finalizer and is a spec, then do not generate the
7954 decrement of the elaboration entity.
7955 (Gen_Finalize_Library_C): Likewise.
7957 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7959 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
7960 (Bounds_Size_Expression): Removed.
7961 (Double_Alignment_Of): New subsidiary routine.
7962 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
7963 for a hole in the dope vector of unconstrained arrays due to different
7964 index and element alignments.
7966 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7968 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
7969 raise program_error because body has not been seen yet.
7971 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7973 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
7976 2011-08-04 Vincent Celier <celier@adacore.com>
7978 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
7980 2011-08-04 Yannick Moy <moy@adacore.com>
7982 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
7983 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
7985 2011-08-04 Thomas Quinot <quinot@adacore.com>
7987 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
7988 instantiation in RCI.
7990 2011-08-04 Emmanuel Briot <briot@adacore.com>
7992 * make.adb: Share more code with gprbuild
7994 2011-08-04 Emmanuel Briot <briot@adacore.com>
7996 * projects.texi: Added documentation for the IDE'Gnat project file
7999 2011-08-04 Nicolas Roche <roche@adacore.com>
8001 * gnat_rm.texi: Minor editing.
8003 2011-08-04 Javier Miranda <miranda@adacore.com>
8005 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
8006 and the library case for VM targets.
8007 (Gen_Adainit_Ada): Likewise.
8009 2011-08-04 Robert Dewar <dewar@adacore.com>
8011 * g-altive.ads: Minor comment updates.
8012 * prj-nmsc.adb: Minor reformatting.
8014 2011-08-04 Javier Miranda <miranda@adacore.com>
8017 (Normalize_Scalars_Config): Value of the configuration switch set by
8018 pragma Normalize_Scalars when it appears in the gnat.adc file.
8019 (Normalize_Scalars): New field for record Config_Switches_Type. Used
8020 to save and restore settings of this pragma.
8022 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
8023 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
8025 2011-08-04 Vincent Celier <celier@adacore.com>
8027 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
8029 2011-08-04 Arnaud Charlet <charlet@adacore.com>
8031 * makeutl.adb: Minor reformatting.
8033 2011-08-04 Olivier Hainque <hainque@adacore.com>
8035 * g-altive.ads: Update comments to reflect that only the soft
8036 binding is available today.
8038 2011-08-04 Robert Dewar <dewar@adacore.com>
8040 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
8041 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
8042 * gcc-interface/Make-lang.in: Update dependencies.
8044 2011-08-04 Arnaud Charlet <charlet@adacore.com>
8046 * prj-env.adb: Remove local debug traces.
8048 2011-08-04 Yannick Moy <moy@adacore.com>
8050 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
8051 was used instead of Hi_OK, which could cause a read of an uninitialized
8052 value later on. Detected while working on the new warning.
8053 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
8055 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
8056 in more cases, in order to detect more unreferenced values.
8057 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
8058 object for expression, if any.
8060 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
8062 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
8063 the operand types instead of the Esize.
8065 2011-08-04 Steve Baird <baird@adacore.com>
8067 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
8068 enable CodePeer_Mode.
8069 * bindusg.adb (Display): Add help message describing -P binder switch.
8070 * gnat_ugn.texi: Document -P binder switch.
8071 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
8072 user-defined main program directly.
8073 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
8074 user-defined main program in the context clause of the package body.
8076 2011-08-04 Yannick Moy <moy@adacore.com>
8078 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
8079 duplicate of Defining_Entity
8080 (Get_Unique_Entity_For_Decl): rename function into
8081 Unique_Defining_Entity
8082 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
8083 (Formal_Proof_On): remove synthesized flag
8084 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
8085 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
8086 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
8087 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
8088 Annotate (Formal_Proof)
8090 2011-08-04 Emmanuel Briot <briot@adacore.com>
8092 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
8093 source files with non-standard naming schemes, in imported projects
8095 2011-08-04 Emmanuel Briot <briot@adacore.com>
8097 * makeutl.adb (Complete_Mains): when a multi-unit source file is
8098 specified on the gprbuild command line, we need to compile all units
8099 within that file, not just the first one we find
8100 Fix error message for mains that are not found.
8102 2011-08-04 Thomas Quinot <quinot@adacore.com>
8104 * sem_ch6.adb: Update comment.
8105 * sem_ch12.adb: Minor reformatting.
8107 2011-08-04 Bob Duff <duff@adacore.com>
8109 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
8110 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
8111 race condition whose symptom is to fail to lock Parent. That, in turn,
8112 causes Parent.Awake_Count to be accessed without locking Parent, which
8113 causes another race condition whose symptom is that Parent.Awake_Count
8114 can be off by 1 (either too high or too low). The solution is to lock
8115 Parent unconditionally, and then lock Acceptor, before reading
8116 Acceptor.Terminate_Alternative.
8118 2011-08-04 Arnaud Charlet <charlet@adacore.com>
8120 * debug.adb: Update comment.
8122 2011-08-04 Robert Dewar <dewar@adacore.com>
8124 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
8125 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
8126 exp_ch6.adb: Minor reformatting.
8128 2011-08-04 Gary Dismukes <dismukes@adacore.com>
8130 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
8133 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8135 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
8137 2011-08-04 Thomas Quinot <quinot@adacore.com>
8139 * sinfo.ads: Minor reformatting.
8141 2011-08-04 Emmanuel Briot <briot@adacore.com>
8143 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
8144 even if there is no location.
8146 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8148 * sem_res.adb, sem_ch4.adb: move check for restriction
8149 No_Task_Hierarchy to resolve_allocator.
8151 2011-08-04 Thomas Quinot <quinot@adacore.com>
8153 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
8154 This flag of N_Pragma nodes is not used, remove it as well as all of
8155 the associated circuitry.
8157 2011-08-04 Javier Miranda <miranda@adacore.com>
8159 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
8160 runtime check on duplicated externa tags
8161 * debug.adb Document switch -gnatdQ.
8163 2011-08-04 Gary Dismukes <dismukes@adacore.com>
8165 * a-fihema.ads: Minor typo fix.
8167 2011-08-04 Yannick Moy <moy@adacore.com>
8169 * sem_ch10.adb: Minor comment update.
8171 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8173 * einfo.adb: Update the node field usage to reflect the renaming of
8174 Return_Flag to Return_ Flag_Or_Transient_Decl.
8175 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
8176 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
8177 (Write_Field15_Name): Change Return_Flag to
8178 Return_Flag_Or_Transient_Decl.
8179 * einfo.ads: Rename node field Return_Flag to
8180 Return_Flag_Or_Transient_Decl. Update the associated comment and all
8181 occurrences in entities.
8182 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
8183 associated Inline pragma.
8184 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
8185 associated Inline pragma.
8186 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
8188 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
8189 Return_Flag and Set_Return_Flag.
8190 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
8191 objects generated for controlled transients declared inside an
8192 Exception_With_Actions. Update the calls to Return_Flag.
8193 (Process_Object_Declaration): Add code to add a null guard for hook
8194 objects generated for controlled transients declared inside an
8195 Exception_With_Actions. Update related comment.
8196 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
8197 objects generated for controlled transients declared inside an
8198 Exception_With_Actions. Update the calls to Return_Flag.
8199 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
8201 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8203 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
8204 positional aggregate.
8206 2011-08-04 Vincent Celier <celier@adacore.com>
8208 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
8209 SLOC only for pragmas.
8211 2011-08-04 Emmanuel Briot <briot@adacore.com>
8213 * projects.texi: Minor typo fix.
8215 2011-08-04 Emmanuel Briot <briot@adacore.com>
8217 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
8218 on case-sensitive file systems.
8220 2011-08-04 Thomas Quinot <quinot@adacore.com>
8222 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
8223 nested in a disabled pragma.
8224 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
8225 enclosing pragma, if any, for X decisions.
8227 2011-08-04 Thomas Quinot <quinot@adacore.com>
8229 * sem_prag.adb: Minor reformatting.
8231 2011-08-04 Vincent Celier <celier@adacore.com>
8233 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
8234 allowed in no run time mode.
8236 2011-08-04 Vincent Celier <celier@adacore.com>
8238 * make.adb (Check): When -gnatc is used, check for the source file
8239 inside the ALI file with a canonical case file name.
8241 2011-08-04 Emmanuel Briot <briot@adacore.com>
8243 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
8244 overriding the separator.
8246 2011-08-04 Robert Dewar <dewar@adacore.com>
8248 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
8249 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
8251 2011-08-04 Robert Dewar <dewar@adacore.com>
8253 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
8255 2011-08-04 Yannick Moy <moy@adacore.com>
8257 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
8258 'Result only appears in postcondition of function.
8260 2011-08-04 Thomas Quinot <quinot@adacore.com>
8262 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
8263 external tag, include the value of the external tag in the exception
8266 2011-08-04 Yannick Moy <moy@adacore.com>
8268 * sem_attr.adb (Result): modify error message for misplaced 'Result
8270 2011-08-04 Sergey Rybin <rybin@adacore.com>
8272 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
8273 clear that the second argument must be an identifier.
8275 2011-08-04 Thomas Quinot <quinot@adacore.com>
8277 * exp_ch9.adb (Build_Barrier_Function): When compiling with
8278 -fpreserve-control-flow, insert an IF statement on the barrier
8279 condition to ensure that a conditional branch instruction is generated.
8281 2011-08-04 Emmanuel Briot <briot@adacore.com>
8283 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
8284 (Processing_Flags.Ignore_Missing_With): new flag.
8286 2011-08-04 Emmanuel Briot <briot@adacore.com>
8288 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
8289 Source_List_File on case-insensitive systems where the file is actually
8290 on a case-sensitive file system (NFS,...).
8292 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8294 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
8295 function return contains a controlled [extension] aggregate and the
8296 return statement is not part of a handled sequence of statements, wrap
8297 the return in a block. This ensures that all controlled temporaries
8298 generated during aggregate resolution will be picked up by the
8299 finalization machinery.
8301 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8303 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
8304 components, freeze type before resolution, to ensure that default
8305 initializations are present for all components.
8306 * sem_res.adb (Resolve_Actuals): the designated object of an
8307 accces-to-constant type is a legal actual in a call to an
8308 initialization procedure.
8310 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8312 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
8313 N_Unchecked_Type_Conversion to the possible containers of a renamed
8316 2011-08-04 Yannick Moy <moy@adacore.com>
8318 * par-ch13.adb (Aspect_Specifications_Present): recognize
8319 "with Identifier'Class =>" as an aspect, so that a meaningful warning
8320 is issued in Strict mode.
8321 * par.adb: Fix typos in comments.
8323 2011-08-04 Yannick Moy <moy@adacore.com>
8325 * sem_attr.adb (Result): modify error message to take into account Post
8326 aspect when compiling Ada 2012 (or newer) code.
8328 2011-08-04 Nicolas Roche <roche@adacore.com>
8330 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
8331 remove need for GCC exceptions.
8333 2011-08-04 Vincent Celier <celier@adacore.com>
8335 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
8336 project, not the source file name.
8337 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
8338 excluded, continue looking. This excluded source will only be returned
8339 if there is no other source with the same base name that is not locally
8342 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8344 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
8345 private and one of the operands is a real literal, use a qualified
8346 expression rather than a conversion which is not meaningful to the
8349 2011-08-04 Yannick Moy <moy@adacore.com>
8351 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
8352 corresponding aspect X'Class are allowed, proceed with analysis of the
8353 aspect instead of skipping it.
8355 2011-08-04 Tristan Gingold <gingold@adacore.com>
8357 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
8358 This will allow to have an Ada implementation for the subprogram.
8360 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8362 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
8363 completion and aspects are present, apply them to the entity for the
8364 type which is currently the partial view, but which is the one that
8366 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
8367 applies to a partial view, indicate that the full view has predicates
8368 and delayed aspects.
8369 (Replace_Type_Reference): Handle properly predicates that apply to the
8370 full view of a private completion.
8372 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
8374 * layout.adb (Layout_Type): For composite types, do not set Esize.
8375 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
8377 (Size_Known): Look at the RM size of components instead of the Esize.
8378 (Freeze_Record_Type): Look at the RM size instead of the Esize to
8379 issue warning and activate Implicit_Packing.
8380 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
8381 if the Esize is not known.
8382 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
8383 for elementary types only.
8384 (Analyze_Record_Representation_Clause): Look at the RM size instead
8385 of the Esize to issue errors.
8386 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
8388 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
8390 Look at the RM size instead of the Esize for types if the latter is
8392 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
8394 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8396 * sem_type.adb: proper handling of equality not involving anonymous
8399 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8401 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
8402 Vis_Decls. When creating a library-level finalizer for a package spec,
8403 both the declaration and body of the finalizer are inserted either in
8404 the visible or private declarations of the package spec.
8406 2011-08-04 Javier Miranda <miranda@adacore.com>
8408 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
8409 use of the full-view of a type when invoking Is_Ancestor.
8410 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
8411 the full-view of private parents is requested, then use also the
8412 full-view of the parent of the first derivation.
8414 2011-08-04 Tristan Gingold <gingold@adacore.com>
8416 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
8417 instead of the locally imported procedure.
8418 * s-taprop-mingw.adb (Enter_Task): Ditto.
8419 * s-valrea.adb (Scan_Real): Ditto.
8420 * s-imgrea.adb (Set_Image_Real): Ditto.
8421 * s-flocon.ads: Make the package pure.
8423 2011-08-04 Thomas Quinot <quinot@adacore.com>
8425 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
8426 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
8427 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
8428 New subprogram, moved here from...
8429 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
8430 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
8431 rewriting of the last argument into a procedure call statement here...
8432 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
8435 2011-08-04 Thomas Quinot <quinot@adacore.com>
8437 * par_sco.adb: Minor reformatting.
8439 2011-08-04 Robert Dewar <dewar@adacore.com>
8441 * erroutc.adb: Minor reformatting.
8443 2011-08-04 Thomas Quinot <quinot@adacore.com>
8445 * par_sco.adb: Comment update.
8447 2011-08-04 Tristan Gingold <gingold@adacore.com>
8449 * s-flocon.ads: New file.
8450 * g-flocon.ads: Now a renaming of s-flocon.
8451 * Makefile.rtl: Add s-flocon.o
8453 2011-08-04 Javier Miranda <miranda@adacore.com>
8455 * exp_strm.adb (Build_Array_Input_Function): if the array type is
8456 constrained, do not attempt to build a subtype of it.
8458 2011-08-04 Yannick Moy <moy@adacore.com>
8460 * errout.ads Change comments: remove 'R'M as an example where quotes
8461 are needed; add ALFA as another case where quotes are not needed
8462 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
8463 case where quotes are not needed.
8464 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
8465 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
8466 Remove all occurrences of 'A'L'F'A
8468 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8470 * sem_ch13.adb: check legality of invariant pragma.
8472 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
8474 * bindgen.adb: Add comments.
8476 2011-08-04 Yannick Moy <moy@adacore.com>
8478 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
8480 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
8481 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
8483 2011-08-04 Robert Dewar <dewar@adacore.com>
8485 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
8486 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
8487 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
8489 2011-08-04 Thomas Quinot <quinot@adacore.com>
8491 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
8493 2011-08-04 Thomas Quinot <quinot@adacore.com>
8496 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
8499 2011-08-04 Robert Dewar <dewar@adacore.com>
8501 * einfo.ads, exp_ch4.adb: Minor reformatting.
8503 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
8505 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
8507 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8509 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
8510 type in all cases to compute list of primitive operations, because full
8511 view may be an itype that is not attached to the list of declarations.
8513 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
8515 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
8516 library has already been finalized.
8517 (Gen_Adafinal_C): Likewise.
8518 (Gen_Adainit_Ada): Generate an early return if the library has
8519 already been elaborated.
8520 (Gen_Adainit_C): Likewise.
8521 (Gen_Output_File_Ada): Generate an elaboration flag.
8522 (Gen_Output_File_C): Likewise.
8524 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8526 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
8527 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
8528 built in the first place.
8529 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
8530 for CodePeer because Finalize_Address was not built to begin with.
8531 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
8533 2011-08-04 Pascal Obry <obry@adacore.com>
8535 * adaint.c (__gnat_tmp_name): Use current process id to create temp
8536 filenames, this ensures unicity of filenames across processes.
8538 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8540 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
8541 Raise_Controlled to Raise_From_Controlled_Operation. Update the
8542 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
8543 Add False as the actual to From_Abort in the generated call to
8544 Raise_From_Controlled_Operation.
8546 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
8548 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
8549 so that the ali file name can be retrieved from outside of this package.
8550 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
8551 doing nothing in the general case, but used to update the object file
8552 timestamp if directly generated by the backend.
8553 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
8554 to a later time than the ali file one.
8556 2011-08-04 Yannick Moy <moy@adacore.com>
8558 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
8559 entities whose body contains an Annotate pragma which forces formal
8561 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
8562 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
8563 Mark_Non_ALFA_Subprogram to pass in a message and node.
8564 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
8565 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
8566 surrounding subprogram.
8567 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
8568 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
8569 as not in ALFA is annotated with Formal_Proof being On, then an error
8570 is issued based on the additional parameters for message and node.
8571 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
8572 * gcc-interface/Make-lang.in: Update dependencies.
8574 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8576 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
8577 Finalize_Address when CodePeer is enabled.
8579 2011-08-04 Pascal Obry <obry@adacore.com>
8581 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
8582 the latter returns a pointer to a static buffer which is deallocated
8583 at the end of the routine.
8585 2011-08-04 Yannick Moy <moy@adacore.com>
8587 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
8588 after index creation; mark unconstrained base array type generated as
8589 being in/not in ALFA as well
8590 (Make_Index): mark subtype created as in/not in ALFA
8591 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
8592 over a loop as in/not in ALFA, depending on its type and form of loop
8595 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8597 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
8598 directly to False on .NET and JVM.
8600 2011-08-04 Yannick Moy <moy@adacore.com>
8602 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
8603 constraint that subtype must come from source code to be in ALFA, so
8604 that anonymous subtypes can be in ALFA too.
8606 2011-08-04 Yannick Moy <moy@adacore.com>
8608 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
8609 reference for ALFA mode.
8610 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
8611 procedure public so as to use it from formal verification back-end.
8613 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
8615 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
8616 invalid checks of the Parameter, making Remove_Switch not working
8619 2011-08-04 Arnaud Charlet <charlet@adacore.com>
8621 * targparm.ads: Update header: no run-time exception is needed on this
8624 2011-08-04 Vincent Celier <celier@adacore.com>
8626 * a-fihema.adb: Use System.IO instead of GNAT.IO
8628 2011-08-04 Thomas Quinot <quinot@adacore.com>
8630 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
8631 are forbidden in Compiler_Unit mode.
8633 2011-08-04 Robert Dewar <dewar@adacore.com>
8635 * sem_util.adb: Minor reformatting.
8637 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8639 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
8640 library-level finalizers.
8641 (Gen_Finalize_Library_C): Update the import string for library-level
8643 (Gen_Finalize_Library_Defs_C): Update the definition name of a
8644 library-level finalizer.
8645 * exp_ch7.adb: Remove with and use clauses for Stringt.
8646 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
8647 Spec_Decl. Add local variable Body_Id. The names of library-level
8648 finalizers are now manually fully qualified and are no longer external.
8649 A single name is now capable of servicing .NET, JVM and non-VM targets.
8650 Pragma Export is no longer required to provide visibility for the name.
8651 (Create_Finalizer_String): Removed.
8652 (New_Finalizer_Name): New routine which mimics New_..._Name.
8654 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
8656 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
8657 elaboration counter to Standard_Short_Integer.
8658 * sem_util.adb (Build_Elaboration_Entity): Likewise.
8659 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
8660 (Gen_Elab_Externals_C): Likewise.
8662 2011-08-04 Ed Falis <falis@adacore.com>
8664 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
8665 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
8666 system-vxworks-mips.ads, system-vxworks-x86.ads
8667 (Always_Compatible_Rep): set to False for all VxWorks targets.
8669 2011-08-04 Robert Dewar <dewar@adacore.com>
8671 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
8672 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
8673 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
8674 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
8675 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
8676 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
8677 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
8678 Minor reformatting and code reorganization.
8680 2011-08-04 Emmanuel Briot <briot@adacore.com>
8682 * projects.texi: Added doc for aggregate projects.
8684 2011-08-04 Emmanuel Briot <briot@adacore.com>
8686 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
8687 Add support for overriding the Project_Path in aggregate projects.
8689 2011-08-04 Robert Dewar <dewar@adacore.com>
8691 * a-cofove.ads: Minor reformatting.
8693 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8695 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
8696 on the generated code.
8697 (Build_Finalize_Statements): Update the comment on the generated code.
8698 (Build_Initialize_Statements): Update the comment on the generated code.
8699 (Build_Object_Declarations): Add local variable Result. The object
8700 declarations are now built in sequence.
8701 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
8704 2011-08-04 Robert Dewar <dewar@adacore.com>
8706 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
8708 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
8710 * einfo.ads (Elaboration_Entity): Document new definition and use.
8711 (Elaboration_Entity_Required): Adjust to above change.
8712 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
8713 * exp_ch12.adb: And with and use for Snames.
8714 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
8715 * exp_util.adb (Set_Elaboration_Flag): Likewise.
8716 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
8717 <Check_Unit_Name>: Deal with N_Expanded_Name.
8718 <Attribute_Elaborated>: Extend to all unit names.
8719 * sem_elab.adb: And with and use for Uintp.
8720 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
8721 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
8722 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
8723 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
8724 from Gen_Adainit_Ada.
8725 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
8726 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
8727 case, do not call System.Standard_Library.Adafinal; instead call
8728 finalize_library if needed.
8729 (Gen_Adafinal_C): Likewise.
8730 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
8731 non-main program case.
8732 (Gen_Adainit_C): Generate a couple of external declarations here.
8733 In the main program case, set SSL.Finalize_Library_Objects.
8734 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
8735 (Gen_Elab_Calls_C): Likewise.
8736 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
8737 (Gen_Finalize_Library_C): Likewise. Generate a full function.
8738 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
8740 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
8741 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
8743 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
8744 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
8745 of external declarations. Call Gen_Finalize_Library_C.
8747 2011-08-04 Emmanuel Briot <briot@adacore.com>
8749 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
8750 Compute_Compilation_Phases): new subprogram.
8751 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
8752 The number of mains as well as the various compilation phases that
8753 need to be run are now project tree specific, since various
8754 aggregated trees might have different requirements. In particular,
8755 they do not all require bind or link phases.
8757 2011-08-04 Emmanuel Briot <briot@adacore.com>
8759 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
8760 (Project_Tree_Appdata): New type.
8761 It is now possible to associate application-specific data to a project
8762 tree. In particular, this is used in the gprbuild builder to avoid a
8763 number of global tables and htables, especially now that there can be
8764 several project trees loaded at once because of aggregate projects.
8765 (Debug_Name): new procedure.
8766 * projects.texi: Clarify syntax of "**" for Source_Dirs
8768 2011-08-03 Emmanuel Briot <briot@adacore.com>
8770 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
8771 the "roots" for a main.
8772 (Fill_From_Project): add support for aggregate projects. Main units
8773 in aggregated projects are now automatically added in the list of
8774 files to build (although this fails later on in gprbuild, because
8775 these files are not using the root proejct tree, so this needs
8777 * gcc-interface/Make-lang.in: Update dependencies.
8779 2011-08-03 Yannick Moy <moy@adacore.com>
8781 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
8782 conditional expression in ALFA.
8783 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
8784 expressions as not in ALFA.
8786 2011-08-03 Robert Dewar <dewar@adacore.com>
8788 * a-cofove.adb: Minor reformatting.
8790 2011-08-03 Emmanuel Briot <briot@adacore.com>
8792 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
8793 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
8795 These packages are more logically placed in the Queue package, since
8796 they manipulate the queue. It is also likely that they can be adapted
8797 for gnatmake, thus sharing more code.
8798 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
8799 that we could move the above.
8801 2011-08-03 Emmanuel Briot <briot@adacore.com>
8803 * errutil.adb (Finalize): clean up the list of error messages on exit.
8804 Calling this subprogram multiple times will no longer show duplicate
8805 error messages on stderr.
8807 2011-08-03 Emmanuel Briot <briot@adacore.com>
8809 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
8810 Getopt_Switches when we have already define a command line
8813 2011-08-03 Yannick Moy <moy@adacore.com>
8815 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
8816 in ALFA. Instead, they are considered as assertions to prove.
8817 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
8818 nodes as not in ALFA. Instead, include conditional expressions in ALFA
8819 if they have no ELSE part, or if they occur in pre- and postconditions,
8820 where the Condition cannot have side-effects in ALFA
8821 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
8822 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
8823 Instead, include type conversion between scalar types in ALFA.
8824 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
8825 if-and-only-if its type is in ALFA.
8827 2011-08-03 Thomas Quinot <quinot@adacore.com>
8829 * scos.adb, get_scos.adb, put_scos.adb
8830 New code letter for decisions: G (entry guard)
8832 (Traverse_Subprogram_Body): Rename to...
8833 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
8834 (Traverse_Protected_Body): New subprogram
8835 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
8836 protected bodies and entry bodies.
8838 2011-08-03 Yannick Moy <moy@adacore.com>
8840 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
8841 entities with get/set subprograms, which is set on procedure entities
8842 generated by the compiler for a postcondition.
8843 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
8844 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
8845 entity for a declaration
8846 (Get_Unique_Entity_For_Decl): new function returning an entity which
8847 represents a declaration, so that matching spec and body have the same
8850 2011-08-03 Robert Dewar <dewar@adacore.com>
8852 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
8853 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
8855 2011-08-03 Yannick Moy <moy@adacore.com>
8857 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
8858 library-level because retriction No_Implicit_Dynamic_Code in the
8859 front-end prevents its definition as a local subprogram
8860 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
8861 for reuse in other contexts
8862 (Traverse_Declarations_Or_Statements,
8863 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
8864 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
8865 procedures take a callback parameter to be called on all declarations
8867 (Traverse_All_Compilation_Units): new generic function to traverse a
8868 compilation unit and call a callback parameter on all declarations
8870 2011-08-03 Javier Miranda <miranda@adacore.com>
8872 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
8873 in Java since they are always enclosed in a namespace that
8874 differentiates them, and overloaded entities are supported by the VM.
8876 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8878 * checks.adb (Determine_Range): If a computed bound of an operation is
8879 outside the range of the base type of the expression, and overflow
8880 checks are enabled, the result is unknown and cannot be used for any
8881 subsequent constant folding.
8882 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
8883 unknown, so is the result of the comparison.
8885 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8887 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
8888 From_Abort. When finalization was triggered by an abort, propagate
8889 Standard'Abort_Signal rather than Program_Error.
8890 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
8892 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
8893 From_Abort. When finalization was triggered by an abort, propagate
8894 Standard'Abort_Signal rather than Program_Error.
8895 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
8897 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
8898 Abort_Id. Update the calls to Build_Object_Declarations and
8899 Build_Raise_Statement to include Abort_Id.
8900 (Build_Adjust_Statements): New local variable Abort_Id. Update the
8901 calls to Build_Object_Declarations and Build_Raise_Statement to include
8903 (Build_Finalize_Statements): New local variable Abort_Id. Update the
8904 calls to Build_Object_Declarations and Build_Raise_Statement to include
8906 (Build_Components): Create an entity for Abort_Id when exceptions are
8907 allowed on the target.
8908 (Build_Finalizer): New local variable Abort_Id.
8909 (Build_Initialize_Statements): New local variable Abort_Id. Update the
8910 calls to Build_Object_Declarations and Build_Raise_Statement to include
8912 (Build_Object_Declarations): Add new formal Abort_Id. Create the
8913 declaration of flag Abort_Id to preserve the original abort status
8914 before finalization code is executed.
8915 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
8916 runtime routine Raise_From_Controlled_Operation.
8917 (Create_Finalizer): Update the call to Build_Raise_Statement to include
8918 Abort_Id. Update the call to Build_Object_Declarations to include
8919 Abort_Id. Update the layout of the finalizer body.
8920 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
8921 (Process_Transient_Objects): New local variable Abort_Id. Remove the
8922 clunky code to create all flags and objects related to
8923 exception propagation and replace it with a call to
8924 Build_Object_Declarations. Update the call to Build_Raise_Statement to
8926 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
8927 Add new formal Abort_Id and associated comment on its use.
8928 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
8930 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
8931 Remove the clunky code to create all flags and objects related to
8932 exception propagation and replace it with a call to
8933 Build_Object_Declarations. Update the call to Build_Raise_Statement.
8935 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
8937 * s-tassta.adb: Fix minor typos.
8939 2011-08-03 Robert Dewar <dewar@adacore.com>
8941 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
8942 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
8944 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8946 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
8947 to packages. This ensures that the finalizer body will not end up
8948 inside the freeze node.
8949 (Process_Declarations): Add code to detect whether a freeze node has a
8950 nested finalization collection.
8952 2011-08-03 Pascal Obry <obry@adacore.com>
8954 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
8955 (Current_Session): Return a not null access to Session_Type.
8956 (Default_Session): Likewise.
8958 2011-08-03 Robert Dewar <dewar@adacore.com>
8960 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
8961 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
8963 2011-08-03 Pascal Obry <obry@adacore.com>
8965 * g-awk.ads: Minor comment fix.
8967 2011-08-03 Sergey Rybin <rybin@adacore.com>
8969 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
8970 the tree structure related to discriminant constraints.
8971 Original_Discriminant cannot be used any more for computing the
8972 defining name for the reference to a discriminant.
8974 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8976 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
8977 function is not visibly tagged, this is not a dispatching call and
8978 therfore is not Tag_Indeterminate, even if the function is marked as
8979 dispatching on result.
8981 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8983 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
8984 (Expand_N_Free_Statement): Add a guard to protect against run-times
8985 which do not support controlled types.
8986 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
8987 against run-times which do not support controlled types.
8988 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
8989 against run-times which do not support controlled types.
8990 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
8991 against run-times which do not support controlled types.
8992 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
8993 protect against run-times which do not support controlled types.
8995 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
8997 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
8998 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
9000 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9002 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
9003 modified in the source, to prevent spurious warnings when compiling
9006 2011-08-03 Thomas Quinot <quinot@adacore.com>
9008 * a-except-2005.adb: Minor reformatting.
9010 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9012 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
9013 is a renaming declaration in the private part of a package, do not emit
9014 a warning that the with_clause could be moved because the renaming may
9015 be used in the body or in a child unit.
9017 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
9019 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
9020 Propagate the Comes_From_Source attribute from the original return
9021 object to the renaming.
9023 2011-08-03 Jose Ruiz <ruiz@adacore.com>
9025 * exp_ch7.adb (Build_Raise_Statement): Do not call
9026 Raise_From_Controlled_Operation when this routine is not present in
9027 the run-time library.
9028 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
9029 libraries (Ravenscar), tasks are non-terminating, and protected objects
9030 and tasks can only appear at library level, so we do not want
9031 finalization of protected objects nor tasks.
9032 * exp_intr.adb: Minor clarification in comment.
9033 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
9034 Gen_Output_File_C): Remove references to finalization of library-level
9035 objects when using restricted run-time libraries.
9037 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9039 * sem_ch3.adb (Build_Discriminant_Constraints): Set
9040 Original_Discriminant only if the parent type is a generic formal.
9042 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
9044 * exp_ch13.adb: Add with and use clause for Targparm;
9045 (Expand_N_Free_Statement): Prevent the generation of a custom
9046 Deallocate on .NET/JVM targets since this requires pools and address
9048 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
9049 .NET/JVM targets, attach the newly allocated object to the access
9050 type's finalization collection. Do not generate a call to
9051 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
9052 exist in the runtime.
9053 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
9054 create a custom Allocate for object that do not require initialization.
9055 Attach a newly allocated object to the access type's finalization
9056 collection on .NET/JVM.
9057 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
9058 assignment of controlled types on .NET/JVM. The two hidden pointers
9059 Prev and Next and stored and later restored after the assignment takes
9061 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
9062 kludge for .NET/JVM to recognize a particular piece of code coming from
9063 Heap_Management and change the call to Finalize into Deep_Finalize.
9064 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
9065 finalization collections on .NET/JVM only for types derived from
9066 Controlled. Separate the association of storage pools with a collection
9067 and only allow it on non-.NET/JVM targets.
9068 (Make_Attach_Call): New routine.
9069 (Make_Detach_Call): New routine.
9070 (Process_Object_Declarations): Suppress the generation of
9071 build-in-place return object clean up code on .NET/JVM since it uses
9073 * exp_ch7.ads (Make_Attach_Call): New routine.
9074 (Make_Detach_Call): New routine.
9075 * exp_intr.adb Add with and use clause for Targparm.
9076 (Expand_Unc_Deallocation): Detach a controlled object from a collection
9077 on .NET/JVM targets.
9078 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
9079 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
9080 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
9081 names used in finalization.
9083 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
9085 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
9086 (Attach, Detach): Lock the current task when chaining an object onto a
9089 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
9091 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
9092 Rewritten to create the message strings when the exception is not
9093 raised by an abort during finalization.
9094 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
9095 Raise_From_Controlled_Operation and update its associated comment.
9096 * a-fihema.ads, a-fihema.adb: New GNAT unit.
9097 Ada.Finalization.Heap_Management provides key functionality
9098 associated with controlled objects on the heap, their creation,
9099 finalization and reclamation. Type Finalization_Collection is
9100 effectively a wrapper which sits ontop of a storage pool and performs
9101 all necessary bookkeeping for all the objects it contains. Each
9102 access-to-controlled or access-to-class-wide type receives a collection
9103 as part of its expansion. The compiler generates buffer code and
9104 invokes Allocate / Deallocate to create and destroy allocated
9106 * a-finali.adb ("="): Removed.
9107 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
9108 fields Prev and Next.
9109 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
9110 A library unit with at least one controlled object on the library level
9111 has a special finalizer which is invoked by the binder. To signal this,
9112 ali files carry field PF.
9113 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
9114 associated comment on field usage.
9115 * a-tags.adb (Get_RC_Offset): Removed.
9116 (Needs_Finalization): New routine.
9117 * a-tags.ads: Update the structure of the GNAT dispatch tables.
9118 Dispatch tables now carry field Needs_Finalization which provides
9119 runtime indication whether a type is controlled or has controlled
9120 components or both. Remove field RC_Offset.
9121 (Get_RC_Offset): Removed along with its associated pragma Export.
9122 Since tagged types with controlled components no longer carry hidden
9123 field _controller, the special mechanism to retrieve its location is no
9125 (Needs_Finalization): New routine.
9126 * atree.ads, atree.adb (Elist24): New routine.
9127 (Set_Elist24): New routine.
9128 * atree.h: Add a define clause for Elist24.
9129 * bindgen.adb New library-level variable Lib_Final_Built.
9130 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
9131 presence of a VM target, the routine generates calls to the proper
9132 library finalization routine.
9133 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
9134 targets. Set the correct library finalization routine depending on
9135 whether the library has controlled objects or this is a VM compilation.
9136 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
9137 to library-level finalizers of compiled units in reverse order of
9138 elaboration. It also produces exception management code and reraises a
9139 potential exception after all units have been finalized.
9140 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
9141 library-level finalizers of compiled units in reverse order of
9143 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
9144 definitions of all library-level finalizers available to the compilation
9145 (Gen_Main_Ada): Directly call Adafinal which now contails all target
9147 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
9148 System.Standard_Library.Adafinal directly. If the library needs
9149 finalization actions, create the sequence of finalization calls.
9150 (Gen_Output_File_Ada): Alphabetize local variables and constants.
9151 Generate a with clause for System.Soft_Links when compiling for a VM.
9152 Remove the code which imports System.Standard_Library.Adafinal as
9153 Do_Finalize. Generate the library finalization routine.
9154 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
9155 If the library needs finalization actions, create all the definitions
9156 of library- level finalizers.
9157 (Has_Finalizer): New routine. Determines whether at least one compiled
9158 unit has a library-level finalizer.
9159 Add type Qualification_Mode.
9160 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
9161 * einfo.adb: New usage of field 15 as Return_Flag.
9162 Remove Finalization_Chain_Entity from the usages of field 19.
9163 Remove Associated_Final_Chain from the usages of field 23.
9164 New usage of field 23 as Associated_Collection.
9165 New usage of field 24 as Finalizer.
9166 New usage of flag 252 as Is_Processed_Transient.
9167 (Associated_Final_Chain): Removed.
9168 (Associated_Collection): New routine.
9169 (Finalization_Chain_Entity): Removed.
9170 (Finalizer): New routine.
9171 (Is_Finalizer): New routine.
9172 (Is_Processed_Transient): New routine.
9173 (Return_Flag): New routine.
9174 (Set_Associated_Final_Chain): Removed.
9175 (Set_Associated_Collection): New routine.
9176 (Set_Finalization_Chain_Entity): Removed.
9177 (Set_Finalizer): New routine.
9178 (Set_Is_Processed_Transient): New routine.
9179 (Set_Return_Flag): New routine.
9180 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
9182 (Write_Field8_Name): Alphabetize the output.
9183 (Write_Field11_Name): Alphabetize the output.
9184 (Write_Field12_Name): Alphabetize the output.
9185 (Write_Field13_Name): Alphabetize the output.
9186 (Write_Field14_Name): Alphabetize the output.
9187 (Write_Field15_Name): Alphabetize the output.
9188 (Write_Field16_Name): Alphabetize the output.
9189 (Write_Field17_Name): Alphabetize the output.
9190 (Write_Field18_Name): Alphabetize the output.
9191 (Write_Field19_Name): Alphabetize the output. Remove the output of
9192 Finalization_Chain_Entity.
9193 (Write_Field20_Name): Alphabetize the output.
9194 (Write_Field21_Name): Alphabetize the output.
9195 (Write_Field22_Name): Alphabetize the output.
9196 (Write_Field23_Name): Alphabetize the output. Remove the output of
9197 Associated_Final_Chain. Add output for Associated_Collection.
9198 (Write_Field24_Name): Alphabetize the output.
9199 (Write_Field25_Name): Add output for Finalizer.
9200 (Write_Field26_Name): Alphabetize the output.
9201 (Write_Field27_Name): Alphabetize the output.
9202 (Write_Field28_Name): Alphabetize the output.
9203 * einfo.ads: Add new field description for Associated_Collection and
9205 Remove Associated_Final_Chain and its uses in nodes.
9206 Remove Finalization_Chain_Entity and its uses in nodes.
9207 Add new field description for Finalizer and its uses in nodes.
9208 Add new synthesized attribute Is_Finalizer.
9209 Add new flag description for Is_Processed_Transient and its uses in
9211 Add new field description for Return_Flag and its uses in nodes.
9212 (Associated_Final_Chain): Removed along with its pragma Inline.
9213 (Associated_Collection): New routine and pragma Inline.
9214 (Finalization_Chain_Entity): Removed along with its pragma Inline.
9215 (Finalizer): New routine and pragma Inline.
9216 (Is_Finalizer): New routine and pragma Inline.
9217 (Is_Processed_Transient): New routine and pragma Inline.
9218 (Return_Flag): New routine and pragma Inline.
9219 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
9220 (Set_Associated_Collection): New routine and pragma Inline.
9221 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
9222 (Set_Finalizer): New routine and pragma Inline.
9223 (Set_Is_Processed_Transient): New routine and pragma Inline.
9224 (Set_Return_Flag): New routine and pragma Inline.
9225 * exp_aggr.adb: Alphabetize subprograms.
9226 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
9227 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
9228 associated comments. Remove local variables External_Final_List and
9230 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
9231 Ancestor. Remove the retrieval of finalization lists. Update the call to
9233 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
9234 lists. Update the call to Late_Expansion.
9235 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
9236 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
9237 (Gen_Assign): Remove the retrieval of the finalization list used to
9238 build the assignment. Update the calls to Make_Init_Call and
9240 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
9241 Remove the mechanism to determine attachment levels and finalization
9242 list retrieval. Remove the processing for coextensions.
9243 (Init_Controller): Removed. Controllers no longer exist.
9244 (Late_Expansion): Remove formals Flist and Obj along with their
9245 associated comments. Update the calls to Build_Record_Aggr_Code and
9246 Build_Array_Aggr_Code.
9247 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
9248 (Expand_N_Freeze_Entity): Add special processing for finalizers which
9249 appear in entry bodies, protected subprograms and task bodies.
9250 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
9251 * exp_ch3.adb (Add_Final_Chain): Removed.
9252 (Build_Array_Init_Proc): Alphabetize local variables.
9253 (Build_Assignment): Alphabetize local variables. Update the call to
9255 (Build_Class_Wide_Master): Rename local variables to better reflect
9257 (Build_Discriminant_Assignments): Code reformatting.
9258 (Build_Init_Call_Thru): Code reformatting.
9259 (Build_Init_Procedure): Code reformatting. Generate a special version
9260 of Deep_Finalize which is capable of finalizing all initialized
9261 components and ignore the rest.
9262 (Build_Init_Statements): Rename local variables to better reflect their
9264 Reimplement the mechanism to include the creation and update of an index
9265 variable called a "counter". It is used as a bookmark for tracing
9266 initialized and non-initialized components.
9267 (Build_Initialization_Call): Remove local variable Controller_Typ.
9268 Alphabetize all local variables. Remove the initialization of the
9269 record controller and update the call to Make_Init_Call.
9270 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
9271 New local variable Counter.
9272 (Constrain_Array): Alphabetize.
9273 (Expand_Freeze_Array_Type): Create a collection instead of a
9275 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
9276 Finalize_Address which is used in conjunction with allocated controlled
9278 (Expand_N_Object_Declaration): Remove the creation of a finalization
9279 list for anonymous access types. Update the calls to Make_Init_Call and
9281 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
9282 retrieval of finalization lists. Remove the expansion of the record
9283 controller. Create TSS primitive Finalize_Address used in conjunction
9284 with controlled objects on the heap. Create finalization collections
9285 for access-to-controlled record components.
9286 (Expand_Record_Controller): Removed.
9287 (Freeze_Type): Remove the freezing of record controllers. Freezing of
9288 class-wide types now requires additional processing. Create
9289 finalization collections for access-to-controlled types.
9290 (Increment_Counter): New routine.
9291 (Make_Counter): New routine.
9292 (Make_Eq_If): Remove the mention of Name_uController.
9293 (Make_Predefined_Primitive_Specs): There is no longer need to skip
9294 types coming from System.Finalization_Root.
9295 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
9296 (Predefined_Primitive_Bodies): There is no longer need to skip types
9297 coming from System.Finalization_Root.
9298 (Stream_Operation_OK): Do not generate stream routines for
9299 type Ada.Finalization.Heap_Management.Finalization_Collection.
9300 * exp_ch3.ads: Alphabetize subprograms.
9301 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
9302 Add with and use clause for Lib.
9303 (Complete_Coextension_Finalization): Removed.
9304 (Complete_Controlled_Allocation): New routine. Create a finalization
9305 collection for anonymous access-to-controlled types. Create a custom
9306 Allocate which interfaces with the back end and the machinery in
9308 (Expand_Allocator_Expression): Add necessary calls to
9309 Complete_Controlled_Allocation. Remove the retrieval of finalization
9310 lists. Update the calls to Make_Adjust_Call. Generate a call to
9311 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
9312 the associated collection.
9313 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
9314 Code clean up. Remove the retrieval of finalization lists and
9316 Update the call to Make_Init_Call. Generate a call to
9317 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
9318 the associated collection.
9319 (Get_Allocator_Final_List): Removed. Finalization lists are not
9321 (Suitable_Element): Remove the mention of Name_uController.
9322 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
9323 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
9324 the left hand side, carry out the assignment and adjust the left hand
9326 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
9327 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
9328 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
9329 BIP_Collection and BIPcollection.
9330 (Build_Heap_Allocator): New routine used to allocate the return object
9331 of a build-in-place function onto a collection.
9332 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
9333 (Expand_Call): Do not replace direct calls to Deep routines with their
9335 (Expand_N_Extended_Return_Statement): Give all variables shorter names
9336 and update their occurrences. Add a special return flag to monitor the
9337 [ab]normal execution of the function. The flag is set right before the
9339 Rewrite the mechanism used to allocate a build-in-place return object
9340 on the heap or on a storage pool.
9341 (Is_Direct_Deep_Call): New routine.
9342 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
9343 build-in-place function call instead of a final list. Build a call to
9344 Set_Finalize_Address_Ptr to decorate the associated collection.
9345 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
9346 order to name the build-in-place function call's result for later
9347 finalization. Add a collection to a build-in-place function call
9348 instead of a final list.
9349 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
9350 build-in-place function call instead of a final list. Remove the code
9351 which moves one final list and transforms it into the actual in a
9352 nested build-in-place call.
9353 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
9354 build-in-place function call instead of a final list.
9355 (Move_Final_List): Removed.
9356 (Needs_BIP_Collection): New routine.
9357 (Needs_BIP_Final_List): Removed.
9358 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
9359 enumeration type BIP_Formal_Kind.
9360 Update the related comment.
9361 (Needs_BIP_Collection): New routine.
9362 (Needs_BIP_Final_List): Removed.
9363 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
9364 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
9365 majority of subprograms in this unit. Add Name_Finalize_Address to
9366 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
9367 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
9368 statements for an array type.
9369 (Build_Adjust_Statements): Create the adjust statements for a record
9371 (Build_Cleanup_Statements): New routine. A procedure which given any
9372 construct containing asynchronous calls, references to _master, or is a
9373 task body, a task allocation or a protected body produces the necessary
9374 runtime calls to clean up these constructs.
9375 (Build_Exception_Handler): New routine.
9376 (Build_Final_List): Removed.
9377 (Build_Finalization_Collection): New routine. A core procedure which
9378 creates a collection to service heap allocated controlled objects
9379 associated with an access-to-controlled type.
9380 (Build_Finalize_Statements): Create the finalization statements for a
9382 (Build_Finalizer): New routine. A core procedure which given any
9383 construct with declarations and/or statements detects all objects which
9384 need any type of clean up (controlled objects, protected objects) and
9385 generates all necessary code to clean up the said objects in the proper
9387 (Build_Finalizer_Call): New routine.
9388 (Build_Initialize_Statements): Create the initialization statements for
9389 an array type. The generated routine contains code to finalize partially
9391 (Build_Object_Declarations): New routine.
9392 (Build_Raise_Statement): New routine.
9393 (Clean_Simple_Protected_Objects): Removed.
9394 (Controller_Component): Removed.
9395 (Enclosing_Function): New routine.
9396 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
9397 either declarations or statements or both.
9398 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
9399 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
9401 (Find_Final_List): Removed.
9402 (Global_Flist_Ref): Removed.
9403 (In_Finalization_Root): Removed.
9404 (Insert_Actions_In_Scope_Around): Determine the range of the transient
9405 scope in terms of tree nodes. Process all transient variables within
9407 (Make_Adjust_Call): Rewritten. There is no longer an attach call
9408 generated after the adjust.
9409 (Make_Attach_Call): Removed.
9410 (Make_Call): New routine.
9411 (Make_Clean): Removed.
9412 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
9414 (Make_Deep_Proc): Rewritten to generate the new profile signature used
9416 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
9418 (Make_Final_Call): Modified to simply create a call to either
9419 Deep_Finalize or Finalize.
9420 (Make_Finalize_Address_Body): New routine.
9421 (Make_Finalize_Address_Stmts): New routine. A function which produces
9422 TSS primitive Finalize_Address used in conjunction with heap allocated
9424 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
9425 (Make_Init_Call): Rewritten. There is no longer an attach call
9426 generated after initialization.
9427 (Make_Local_Deep_Finalize): New routine.
9428 (Make_Set_Finalize_Address_Ptr_Call): New routine.
9429 (Make_Transient_Block): Remove the finalization list retrieval and
9431 (Needs_Finalization): Moved to Exp_Util.
9432 (Parent_Field_Type): New routine.
9433 (Preprocess_Components): New routine.
9434 (Process_Transient_Objects): New routine.
9435 (Wrap_HSS_In_Block): New routine.
9436 (Wrap_Transient_Declaration): Remove finalization list management and
9437 controller insertion.
9438 (Wrap_Transient_Expression): Code reformatting.
9439 (Wrap_Transient_Statement): Code reformatting.
9440 * exp_ch7.ads (Build_Final_List): Removed.
9441 (Build_Finalization_Collection): New routine.
9442 (Build_Raise_Statement): New routine.
9443 (Controller_Component): Removed.
9444 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
9445 (Find_Final_List): Removed.
9446 (In_Finalization_Root): Removed.
9447 (Is_Simple_Protected_Type): Update related comment.
9448 (Make_Adjust_Call): New parameter profile and associated comments.
9449 (Make_Attach_Call): Removed.
9450 (Make_Final_Call): New parameter profile and associated comments.
9451 (Make_Finalize_Address_Body): New routine.
9452 (Make_Init_Call): New parameter profile and associated comments.
9453 (Make_Local_Deep_Finalize): New routine.
9454 (Make_Set_Finalize_Address_Ptr_Call): New routine.
9455 (Needs_Finalization): Moved to Exp_Util.
9456 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
9457 (Expand_N_Protected_Body): Remove the handling of finalization lists.
9458 (Find_Protection_Type): Moved to Exp_Util.
9459 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
9460 (Make_DT): Update sequence of dispatch table initialization. Remove the
9461 initialization of field RC_Offset. Add initialization of field Needs_
9463 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
9464 Reimplement how an object is first finalized, then deallocated.
9465 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
9467 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
9468 Register TSS_Finalize_Address with type TSS_Names.
9469 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
9470 procedure provides the interface between an allocation / deallocation
9471 and the support machinery in Ada.Finalization.Heap_Management.
9472 (Find_Init_Call): Code reformatting.
9473 (Find_Init_Call_In_List): Code reformatting.
9474 (Find_Protection_Type): Moved from Exp_Ch9.
9475 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
9476 (Has_Controlled_Coextensions): Removed.
9477 (Has_Controlled_Objects): New routine.
9478 (In_Library_Level_Package_Body): New routine.
9479 (Insert_Action_After): New routine.
9480 (Is_Finalizable_Transient): New routine. This predicate determines
9481 whether an object declaration is one of the many variants of controlled
9483 (Is_Null_Access_BIP_Func_Call): New routine.
9484 (Is_Non_BIP_Func_Call): New routine.
9485 (Is_Related_To_Func_Return): New routine.
9486 (Needs_Finalization): Moved from Exp_Ch7.
9487 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
9488 (Find_Protection_Type): Moved from Exp_Ch9.
9489 (Has_Controlled_Coextensions): Removed.
9490 (Has_Controlled_Objects): New routine.
9491 (In_Library_Level_Package_Body): New routine.
9492 (Insert_Action_After): New routine.
9493 (Is_Finalizable_Transient): New routine.
9494 (Is_Null_Access_BIP_Func_Call): New routine.
9495 (Is_Non_BIP_Func_Call): New routine.
9496 (Is_Related_To_Func_Return): New routine.
9497 (Needs_Finalization): Moved from Exp_ch7.
9498 * expander.adb (Expand): Add a case for N_Free_Statement.
9499 * freeze.adb (Freeze_All): Replace the generation of a finalization
9500 list with a collection for access-to-controlled types.
9501 (Freeze_Entity): Code reformatting.
9502 (Freeze_Record_Type): Remove the freezing of a record controller
9504 (Freeze_Subprogram): Code reformatting.
9505 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
9507 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
9508 has a library-level finalizer.
9509 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
9510 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
9511 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
9512 files. Add a-fihema to the list of object files.
9514 Alphabetize the associations in type Is_Parameterless_Attribute.
9515 * rtsfind.ads: Ada.Finalization_List.Controller and
9516 System.Finalization_Implementation are no longer a GNAT unit.
9517 Update the range of type Ada_Finalization_Child. Remove the following
9518 recoverable entities:
9520 RE_Attach_To_Final_List
9524 RE_Finalizable_Ptr_Ptr
9525 RE_Global_Final_List
9526 RE_Limited_Record_Controller
9529 RE_Record_Controller
9530 RE_Simple_List_Controller
9532 Add the following recoverable entities:
9534 RE_Add_Offset_To_Address
9538 RE_Exception_Identity
9539 RE_Finalization_Collection
9540 RE_Finalization_Collection_Ptr
9541 RE_Needs_Finalization
9542 RE_Save_Library_Occurrence
9543 RE_Set_Finalize_Address_Ptr
9544 RE_Set_Storage_Pool_Ptr
9546 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
9548 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
9549 (First_Stored_Discriminant): Remove the mention of Name_uController.
9550 * sem_aux.ads: Comment reformatting.
9551 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
9552 to redecorate an already existing class-wide type.
9553 (Decorate_Tagged_Type): New parameter profile and associated comment.
9554 Create a "shadow class-wide type" for a shadow entity.
9555 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
9556 of the final chain along with the associated comment.
9557 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
9558 Full_Desig and set it to the full view of the designated type.
9559 Initialize the finalization collection to empty.
9560 (Build_Derived_Record_Type): Alphabetize local variables. Code
9562 (Collect_Fixed_Components): Remove the mention of Name_uController.
9563 (Create_Constrained_Components): Remove the mention of Name_uController.
9564 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
9565 class-wide type of a shadow entity.
9566 (Process_Full_View): Update the machinery which marks type
9567 Limited_Controlled's entity as limited.
9568 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
9569 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
9570 list, instead make a collection build-in-place formal.
9571 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
9572 a designated type in order to establish a match between the renaming
9573 and the renamed entity.
9574 (Find_Selected_Component): Add guard to prevent spurious exceptions
9575 from being raised on .NET/JVM.
9576 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
9577 to the list of primitive that need special processing. Update arrays
9578 C_Names and D_Names.
9579 (Replace_Types): Handle class-wide types.
9580 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
9581 different parameter profile, look at the first formal.
9582 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
9583 use clauses for Exp_Util.
9584 * sem_res.adb: Remove with and use clauses for Elists.
9585 (Propagate_Coextensions): Removed.
9586 (Resolve_Allocator): Do not propagate the list of coextensions from one
9587 allocator to another.
9588 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
9589 Deaccessed_T to Desig_Typ.
9590 (Enter_Name): Remove the mention of Name_uController.
9591 (Gather_Components): Remove the mention of Name_uController.
9592 (Incomplete_Or_Private_View): New routine.
9593 (Is_Coextension_Root): Removed.
9594 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
9595 * sem_util.ads (Incomplete_Or_Private_View): New routine.
9596 (Is_Coextension_Root): Removed.
9597 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
9598 Controlled types are now derived from a null tagged record. Remove
9599 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
9600 * sinfo.adb (Coextensions): Removed.
9601 (Set_Coextensions): Removed.
9602 * sinfo.ads: Remove Coextensions from the explanation of node fields
9603 and its uses in nodes.
9604 Update the field usage of N_Allocator.
9605 (Coextensions): Removed along with its pragma Inline.
9606 (Set_Coextensions): Removed along with its pragma Inline.
9607 * snames.ads-tmpl: Remove names
9612 Name_uLocal_Final_List
9613 Name_Finalization_Root
9620 Name_Finalize_Address
9621 * s-pooglo.adb (Allocate): Add overriding indicator.
9622 (Deallocate): Add overriding indicator.
9623 (Storage_Size): Add overriding indicator.
9624 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
9625 than Finalize_Global_List.
9626 (Null_Finalize_Global_List): Removed.
9627 (Save_Library_Occurrence): New routine.
9628 * s-soflin.ads: Remove variable Finalize_Global_List along with its
9629 initialization. Add variable Finalize_Library_Objects along with its
9630 pragma Export. Add variables Library_Exception and
9631 Library_Exception_Set along with their pragma Export.
9632 (Null_Finalize_Global_List): Removed.
9633 (Save_Library_Occurrence): New routine.
9634 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
9635 rather than Finalize_Global_List.
9636 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
9637 of the constructed node.
9639 2011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9641 * link.c: Include "auto-host.h" before system headers.
9643 2011-08-03 Vincent Celier <celier@adacore.com>
9645 * make.adb (Gnatmake): Add to table Library_Projs only library projects
9646 that are not extended. Do not check if a library project that is
9647 extended should be regenerated. Do not add to table Library_Paths the
9648 libraries that are in extended projects. Link only with libraries that
9649 are in libray projects that are not extended.
9650 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
9651 for a library project that is extended.
9653 2011-08-03 Gary Dismukes <dismukes@adacore.com>
9655 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
9656 conforming subprogram renamings that appear to be completions if they
9657 are not fully conformant.
9658 Such renamings are homographs but not completions.
9659 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
9660 names in a subprogram renaming that appears in an instance.
9662 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9664 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
9665 not immutably limited, build actual subtype from expression to provide
9666 proper bounds to caller.
9668 2011-08-03 Gary Dismukes <dismukes@adacore.com>
9670 * sem_ch8.adb: Minor comment correction.
9672 2011-08-03 Thomas Quinot <quinot@adacore.com>
9674 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
9675 returning a limited array, use an extended return statement.
9677 2011-08-03 Vincent Celier <celier@adacore.com>
9679 * make.adb (Initialize): If --subdirs= is used, but no project file is
9680 specified, attempt to create the specify subdir if it does not already
9681 exist and use it as the object directory as if -D had been specified.
9683 2011-08-03 Arnaud Charlet <charlet@adacore.com>
9685 * s-tpopsp-vms.adb: New file.
9686 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
9687 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
9689 2011-08-03 Emmanuel Briot <briot@adacore.com>
9691 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
9694 2011-08-03 Yannick Moy <moy@adacore.com>
9696 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
9697 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
9698 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
9699 detect that an array has static bounds.
9701 2011-08-03 Thomas Quinot <quinot@adacore.com>
9703 * exp_dist.adb: Minor reformatting.
9705 2011-08-03 Arnaud Charlet <charlet@adacore.com>
9707 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
9708 (ATCB_Key): Removed, not always used.
9710 2011-08-03 Emmanuel Briot <briot@adacore.com>
9712 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
9713 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
9714 most remaining global variables.
9716 2011-08-03 Robert Dewar <dewar@adacore.com>
9718 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
9719 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
9722 2011-08-03 Javier Miranda <miranda@adacore.com>
9724 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
9725 that must be passed by copy in VM targets.
9727 2011-08-03 Emmanuel Briot <briot@adacore.com>
9729 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
9730 duplicates a similar htable now in the project tree.
9732 2011-08-03 Claire Dross <dross@adacore.com>
9734 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
9735 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
9736 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
9737 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
9738 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
9739 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
9740 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
9743 2011-08-03 Arnaud Charlet <charlet@adacore.com>
9745 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
9746 (ATCB_Key): Removed, not always used.
9747 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
9749 * s-tpopsp-tls.adb: New file.
9750 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
9751 x86/x64/ia64/powerpc/sparc Linux.
9753 2011-08-03 Arnaud Charlet <charlet@adacore.com>
9755 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
9756 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
9758 2011-08-03 Thomas Quinot <quinot@adacore.com>
9760 * rtsfind.ads, exp_dist.adb, exp_dist.ads
9761 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
9762 Fix type selection for mapping integer types to PolyORB types.
9764 2011-08-03 Bob Duff <duff@adacore.com>
9766 * sem_ch7.adb: Minor comment clarification.
9768 2011-08-03 Bob Duff <duff@adacore.com>
9770 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
9771 an error analyzing a choice, skip further processing. Further
9772 processing could cause a crash or cascade errors.
9774 2011-08-03 Emmanuel Briot <briot@adacore.com>
9776 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
9777 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
9778 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
9779 prj-env.ads (Shared_Project_Tree_Data): new type
9780 An aggregate project and its aggregated trees need to share the common
9781 data structures used for lists of strings, packages,... This makes the
9782 code simpler since otherwise we have to pass the root tree (also used
9783 for the configuration file data) in addition to the current project
9784 tree. This also avoids ambiguities as to which tree should be used.
9785 And finally this saves a bit of memory.
9786 (For_Every_Project_Imported): new parameter Tree.
9787 Since aggregated projects are using a different tree, we need to let
9788 the caller know which tree to use to manipulate the returned project.
9790 2011-08-03 Robert Dewar <dewar@adacore.com>
9792 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
9793 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
9794 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
9795 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
9797 2011-08-03 Javier Miranda <miranda@adacore.com>
9799 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
9800 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
9802 2011-08-03 Bob Duff <duff@adacore.com>
9804 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
9807 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
9809 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
9810 g-sehash.ads: Fix typo. Update header.
9812 2011-08-03 Thomas Quinot <quinot@adacore.com>
9814 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
9817 2011-08-03 Gary Dismukes <dismukes@adacore.com>
9819 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
9820 prefixes of private types along with records, since the selector may be
9822 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
9823 private types along with records, since the selector may be a
9826 2011-08-03 Emmanuel Briot <briot@adacore.com>
9828 * prj-pp.adb (Pretty_Print): Remove trailing blank line.
9830 2011-08-03 Javier Miranda <miranda@adacore.com>
9832 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
9833 Tagged_Type_Expansion.
9835 2011-08-03 Yannick Moy <moy@adacore.com>
9837 * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
9838 violation when the argument of concatenation is the name of a
9841 2011-08-03 Emmanuel Briot <briot@adacore.com>
9843 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
9844 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
9845 (Process_Declarative_Items): new parameter Child_Env.
9847 2011-08-03 Yannick Moy <moy@adacore.com>
9849 * alfa.ads: Update format of ALFA section in ALI file in order to
9850 add a mapping from bodies to specs when both are present.
9851 (ALFA_Scope_Record): Add components for spec file/scope.
9852 * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
9854 * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
9855 collected, fill in the spec information when relevant.
9856 * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
9859 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
9861 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
9862 code unit to decide whether to add internally generated subprograms.
9864 2011-08-03 Javier Miranda <miranda@adacore.com>
9866 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
9867 * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
9868 be handled by copy in VM targets.
9870 2011-08-03 Emmanuel Briot <briot@adacore.com>
9872 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
9873 code with Makeutl.Get_Switches.
9874 * prj-tree.adb: Update comment.
9876 2011-08-03 Thomas Quinot <quinot@adacore.com>
9878 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
9879 subprogram with a limited formal that does not support external
9882 2011-08-03 Yannick Moy <moy@adacore.com>
9884 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
9886 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
9887 not from current unit in two phases, because it is not possible to
9888 change the table while iterating over its content.
9889 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
9891 2011-08-03 Sergey Rybin <rybin@adacore.com>
9893 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
9894 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
9896 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9898 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
9899 and the component type is composite, this is ambiguous for predefined
9900 concatenation, but if the node is not overloaded and the entity is a use
9901 -defined function its profile can be used to resolve that aggregate.
9903 2011-08-03 Robert Dewar <dewar@adacore.com>
9905 * exp_ch4.adb: Minor code cleanup.
9907 2011-08-03 Thomas Quinot <quinot@adacore.com>
9909 * exp_dist.adb: Do not generate distribution stubs if serious errors
9910 have been diagnosed.
9912 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9914 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
9915 the first formal of a primitive operation, go to the base type to
9916 handle properly an access to a derived type with constrained
9918 * sem_type.adb (Disambiguate): an immediately visible operator hides a
9919 user-defined function that is only use-visible.
9921 2011-08-03 Robert Dewar <dewar@adacore.com>
9923 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
9924 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
9925 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
9926 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
9927 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
9928 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
9929 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
9930 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
9932 2011-08-03 Robert Dewar <dewar@adacore.com>
9934 * repinfo.adb (List_Mechanism): Add handling of
9935 Convention_Ada_Pass_By_XXX.
9936 * sem_mech.adb (Set_Mechanism): Ditto.
9937 * sem_prag.adb (Process_Convention): Add entries for
9938 Convention_Ada_Pass_By_XXX.
9939 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
9941 2011-08-03 Pascal Obry <obry@adacore.com>
9943 * makeutl.adb: Minor reformatting.
9945 2011-08-03 Vincent Celier <celier@adacore.com>
9948 (Get_File_Name) If the file cannot be found when there are no config
9949 pragmas file and May_Fail is True, return No_File instead of the file
9950 name, to be consistent.
9952 2011-08-03 Pascal Obry <obry@adacore.com>
9954 * adaint.c (__gnat_is_executable_file_attr): Avoid access
9957 2011-08-03 Javier Miranda <miranda@adacore.com>
9960 (Same_Representation): In VM targets the representation of arrays with
9961 aliased components differs from arrays with non-aliased components.
9963 2011-08-03 Emmanuel Briot <briot@adacore.com>
9965 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
9966 not systematically lower case attribute indexes that contain no "."
9967 Fix definition of several Naming attributes, which take
9968 a unit name as index and therefore should be case insensitive.
9969 Minor refactoring (reduce length of variable names).
9971 2011-08-03 Emmanuel Briot <briot@adacore.com>
9973 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
9975 2011-08-03 Emmanuel Briot <briot@adacore.com>
9977 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
9978 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
9979 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
9980 prj-tree.ads (Prj.Tree.Environment): new type.
9982 2011-08-03 Emmanuel Briot <briot@adacore.com>
9984 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
9985 prj-tree.adb, prj-tree.ads (Environment): new type.
9987 2011-08-03 Emmanuel Briot <briot@adacore.com>
9989 * prj-tree.ads: Remove unused variable.
9991 2011-08-03 Yannick Moy <moy@adacore.com>
9993 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
9994 issuing messages related to SPARK restriction violation.
9996 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9998 * sem_ch6.adb: guard against error nodes in return statements.
10000 2011-08-03 Arnaud Charlet <charlet@adacore.com>
10002 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
10003 a warning can only appear on a configuration file, so emit warning
10004 without further checks.
10006 2011-08-03 Arnaud Charlet <charlet@adacore.com>
10008 * s-interr.ads: add overriding keyword.
10010 2011-08-03 Geert Bosch <bosch@adacore.com>
10012 * exp_attr.adb: Fix minor typo.
10014 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10016 * par-ch4.adb: improve error recovery.
10018 2011-08-03 Emmanuel Briot <briot@adacore.com>
10020 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
10021 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
10022 to Errout_Handling.
10024 2011-08-03 Emmanuel Briot <briot@adacore.com>
10026 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
10027 "external" as an attribute name in aggregate projects.
10029 2011-08-03 Jose Ruiz <ruiz@adacore.com>
10031 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
10032 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
10033 from 0, so we need to adjust.
10035 2011-08-03 Emmanuel Briot <briot@adacore.com>
10037 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
10038 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
10040 2011-08-03 Yannick Moy <moy@adacore.com>
10042 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
10043 restriction on overloaded entity if the entity is not an operator.
10045 2011-08-03 Yannick Moy <moy@adacore.com>
10047 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
10048 restrict.ads: Rename remaining Check_Formal_Restriction* into
10049 Check_SPARK_Restriction*.
10051 2011-08-03 Emmanuel Briot <briot@adacore.com>
10053 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
10054 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
10056 (Project_Empty): removed
10057 (Empty_Project): new parameter Qualifier
10058 This is used to have fields specific to aggregate projects, cleaner
10059 New field to store the list of aggregated projects.
10060 (Check_Aggregate_Project): removed
10061 (Process_Aggregated_Projects, Free): new subprograms.
10063 2011-08-03 Olivier Hainque <hainque@adacore.com>
10065 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
10067 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10069 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
10070 explicit dereference of an unconstrained type, create a constrained
10071 subtype for it, as is done for function calls that return an
10072 unconstrained type.
10074 2011-08-03 Thomas Quinot <quinot@adacore.com>
10076 * g-pehage.adb (Finalize): Avoid possible double-free.
10078 2011-08-03 Steve Baird <baird@adacore.com>
10080 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
10081 Elab_Spec/Body attrs in CodePeer_Mode.
10083 2011-08-03 Javier Miranda <miranda@adacore.com>
10085 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
10086 low bound is not known at compile time but they have no others choice.
10087 Done because in this case the bounds can be obtained directly from the
10090 2011-08-03 Ed Falis <falis@adacore.com>
10092 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
10093 on VxWorks SMP. Remove unusable constant ANY_CPU.
10095 2011-08-03 Emmanuel Briot <briot@adacore.com>
10097 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
10098 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
10099 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
10100 Prj.Env.Initialize_Empty): new subprograms
10101 (Get_Env, Find_Project): remove parameter Target_Name.
10103 2011-08-03 Gary Dismukes <dismukes@adacore.com>
10105 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
10106 as a condition for the delayed call to Derived_Subprograms done for the
10107 case of the rewriting of a derived type that constrains the
10108 discriminants of its parent type.
10109 Avoids redundant subprogram derivations for private subtype derivations.
10111 2011-08-03 Javier Miranda <miranda@adacore.com>
10113 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
10114 Build_Record_Aggr_Code.
10115 (Build_Record_Aggr_Code): Add missing support to initialize hidden
10116 discriminants in extension aggregates.
10118 2011-08-03 Emmanuel Briot <briot@adacore.com>
10120 * prj-pp.adb (Print): also output project qualifiers, since in
10121 particular "aggregate" is mandatory in an aggregate project.
10123 2011-08-03 Emmanuel Briot <briot@adacore.com>
10125 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
10126 (Debug_Output): new function.
10128 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
10130 * gnat_ugn.texi: Document -Wstack-usage.
10131 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
10133 2011-08-03 Thomas Quinot <quinot@adacore.com>
10135 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
10136 have keyword LIMITED.
10138 2011-08-03 Yannick Moy <moy@adacore.com>
10140 * alfa.adb, alfa.ads, alfa_test.adb: New files.
10141 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
10142 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
10143 section (does not happen in compiler, only if code directly calls
10145 * get_alfa.adb, get_alfa.ads: New files.
10146 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
10148 * lib-xref-alfa.adb: New file.
10149 * lib-xref.adb, lib-xref.ads
10150 (Xref_Entry): redefine information needed in cross-references for ALFA.
10151 Push ALFA treatments in separated local package.
10152 (Enclosing_Subpragram_Or_Package): treat specially subprogram
10153 identifiers. Return entity of package body instead of spec. Return
10154 Empty for a scope with no location.
10155 (Generate_Reference): adapt to new components for ALFA information.
10156 Remove the need for D references on definitions.
10157 (Is_Local_Reference): moved to ALFA local package
10158 (Output_References): extract subfunction as Extract_Source_Name
10159 (Output_Local_References): remove procedure, replaced by filtering of
10160 cross-references in package ALFA and printing in Put_ALFA.
10161 (Write_Entity_Name): remove procedure
10162 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
10163 print exact name of entity as it appears in source file
10164 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
10165 * put_alfa.adb, put_alfa.ads: New files.
10166 * xref_lib.adb (Search_Xref): protect read of cross-references against
10167 reading other sections of the ALI file, in gnatxref
10168 (Search): protect read of cross-references against reading other
10169 sections of the ALI file, in gnatfind.
10170 * gcc-interface/Make-lang.in: Update dependencies.
10172 2011-08-03 Thomas Quinot <quinot@adacore.com>
10174 * sem_ch3.adb: Minor reformatting.
10176 2011-08-03 Jose Ruiz <ruiz@adacore.com>
10178 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
10179 raising an exception.
10181 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10183 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
10184 type, always use 1 as the lower bound or string, even if lower bound of
10185 context is not static, to handle properly null strings in a non-static
10188 2011-08-03 Bob Duff <duff@adacore.com>
10190 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
10191 always legal on the right-hand side of an assignment statement; there
10192 is always an applicable index constraint in this case. Therefore, the
10193 check for Pkind = N_Assignment_Statement is now unconditional -- it
10194 doesn't depend on whether Is_Constrained (Typ).
10196 2011-08-03 Robert Dewar <dewar@adacore.com>
10198 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
10200 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10202 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
10203 for an itype created within a generic unit.
10205 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
10207 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
10208 suppresses all inlining.
10210 2011-08-03 Robert Dewar <dewar@adacore.com>
10212 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
10213 exp_aggr.adb: Minor reformatting.
10215 2011-08-03 Thomas Quinot <quinot@adacore.com>
10217 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
10218 tagged assignment when discriminant checks are suppressed. This is
10219 useless and extremely costly in terms of static stack usage.
10221 2011-08-03 Bob Duff <duff@adacore.com>
10223 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
10224 of generics, because this leads to the wrong entity in the wrong scope,
10225 causing (e.g.) pragma Export_Procedure to get an error if the entity is
10227 (Process_Interface_Name): Follow Alias for instances of generics, to
10228 correct for the above change.
10230 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10232 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
10233 is an integer literal it is always safe to replace the reference. In
10234 addition, if the reference appears in the generated code for an object
10235 declaration it is necessary to copy because otherwise the reference
10236 might be to the uninitilized value of the discriminant of the object
10239 2011-08-03 Pascal Obry <obry@adacore.com>
10241 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
10242 ACL used, in this case we want to check for ending .exe, not .exe
10243 anywhere in the path.
10245 2011-08-03 Sergey Rybin <rybin@adacore.com>
10247 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
10248 the tree structure (semantic decoration of references to record
10251 2011-08-03 Gary Dismukes <dismukes@adacore.com>
10253 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
10254 choices of a named array aggregate, bail out when any choices are
10255 marked as Errors_Posted.
10257 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10259 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
10260 in which entity is frozen, to handle properly loop variables in
10263 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10265 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
10266 subtype is not static, compute the upper bound using attributes, to
10267 handle properly index types that are not integer types.
10269 2011-08-03 Bob Duff <duff@adacore.com>
10271 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
10272 Update copyright notice.
10274 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10276 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
10277 Original_Discriminant if within an instance.
10278 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
10280 2011-08-03 Thomas Quinot <quinot@adacore.com>
10282 * einfo.ads: Minor reformatting.
10284 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10286 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
10287 composite type with an unfrozen subcomponent, in the profile of a
10288 primitive operation.
10290 2011-08-03 Robert Dewar <dewar@adacore.com>
10292 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
10294 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10296 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
10297 unconstrained type with discriminants is initialized with an aggregate,
10298 use the constrained subtype of the aggregate as the type of the object,
10299 because it is immutable, and this allows the back-end to generate no
10300 code for the object declaration.
10302 2011-08-03 Robert Dewar <dewar@adacore.com>
10304 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
10305 comparison operand is variable, and turns out to be zero or negative.
10307 2011-08-03 Javier Miranda <miranda@adacore.com>
10310 (Expand_Dispatching_Constructor_Call): Disable expansion of
10311 code required for native targets. Done to avoid generating
10312 references to unavailable runtime entities in VM targets.
10314 (Expand_N_Object_Declaration): Add missing support to handle
10315 the explicit initialization of class-wide interface objects.
10318 2011-08-03 Matthew Heaney <heaney@adacore.com>
10320 * a-cobove.adb (Merge): Move source onto target, instead of using
10323 2011-08-03 Matthew Heaney <heaney@adacore.com>
10325 * a-cbdlli.adb (Splice): Move source items from first to last.
10327 2011-08-03 Yannick Moy <moy@adacore.com>
10329 * sem_util.ads: Add comment.
10331 2011-08-03 Javier Miranda <miranda@adacore.com>
10334 (Expand_Record_Aggregate): In VM targets disable the expansion into
10335 assignments of aggregates whose type is not known at compile time.
10337 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10339 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
10340 protected entries and task entries, to build the proper renaming
10341 declaration for entry formals, used in debugging.
10342 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
10343 parameters in the same way.
10345 2011-08-02 Robert Dewar <dewar@adacore.com>
10347 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
10348 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
10349 code reorganization.
10351 2011-08-02 Robert Dewar <dewar@adacore.com>
10353 * debug.adb: Debug flag d.P to suppress length comparison optimization
10354 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
10355 comparison of Length by comparing First/Last instead.
10357 2011-08-02 Matthew Heaney <heaney@adacore.com>
10359 * a-cobove.ads: Code clean up.
10361 2011-08-02 Vincent Celier <celier@adacore.com>
10363 * adaint.c (file_names_case_sensitive_cache): New static int.
10364 (__gnat_get_file_names_case_sensitive): Cache the return value in
10365 file_names_case_sensitive_cache at the first invocation, to avoid
10366 multiple calls to getenv.
10368 2011-08-02 Bob Duff <duff@adacore.com>
10370 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
10372 2011-08-02 Yannick Moy <moy@adacore.com>
10374 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
10375 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
10376 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
10377 indicate that we are in a precondition or postcondition. This is used in
10378 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
10379 decide whether to flag the spec or body of the current subprogram as
10382 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
10384 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
10386 * a-extiin.ads: New file.
10388 2011-08-02 Bob Duff <duff@adacore.com>
10390 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
10391 now raises Name_Error instead of Use_Error in certain cases. The other
10392 parts of this AI were already implemented properly.
10394 2011-08-02 Vincent Celier <celier@adacore.com>
10396 * link.c: Only import "auto-host.h" when building the gnattools.
10398 2011-08-02 Yannick Moy <moy@adacore.com>
10400 * sem_util.adb: Inter-unit inlining does not work for a subprogram
10401 which calls a local subprogram, so extract subprogram
10402 from Mark_Non_ALFA_Subprogram_Body.
10404 2011-08-02 Javier Miranda <miranda@adacore.com>
10407 (Extract_Dispatching_Call): If the type of the dispatching object is an
10408 access type then return an explicit dereference in the Object out-mode
10411 2011-08-02 Gary Dismukes <dismukes@adacore.com>
10413 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
10414 compatibility checks for all indexes of an array subtype, not just the
10415 first. Reset Has_Dynamic_Range_Check on the subtype before each
10416 potential check to ensure that Insert_Range_Checks will not elide any
10417 of the dynamic checks.
10419 2011-08-02 Yannick Moy <moy@adacore.com>
10421 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
10422 SPARK restriction at parsing time.
10423 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
10424 directive only if the SPARK restriction is set for this unit.
10426 2011-08-02 Yannick Moy <moy@adacore.com>
10428 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
10429 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
10430 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
10431 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
10432 Mark_Non_ALFA_Subprogram_Body.
10433 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
10436 2011-08-02 Yannick Moy <moy@adacore.com>
10438 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
10441 2011-08-02 Robert Dewar <dewar@adacore.com>
10443 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
10444 exp_ch3.adb: Minor reformatting.
10446 2011-08-02 Emmanuel Briot <briot@adacore.com>
10448 * adaint.c (__gnat_locate_exec_on_path): only returns executable
10449 files, not any regular file.
10450 (__gnat_locate_file_with_predicate): new subprogram.
10452 2011-08-02 Yannick Moy <moy@adacore.com>
10454 * sinfo.adb, sinfo.ads: Restrict the use of flags
10455 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
10456 nodes, plus N_Subtype_Declaration for the 2nd one.
10458 2011-08-02 Sergey Rybin <rybin@adacore.com>
10460 * gnat_rm.texi: Ramification of pragma Eliminate documentation
10461 - fix bugs in the description of Source_Trace;
10462 - get rid of UNIT_NAME;
10464 2011-08-02 Javier Miranda <miranda@adacore.com>
10467 (Build_Dispatching_Requeue): Adding support for VM targets
10468 since we cannot directly reference the Tag entity.
10469 * exp_sel.adb (Build_K): Adding support for VM targets.
10470 (Build_S_Assignment): Adding support for VM targets.
10472 (Default_Prim_Op_Position): In VM targets do not restrict availability
10473 of predefined interface primitives to compiling in Ada 2005 mode.
10474 (Is_Predefined_Interface_Primitive): In VM targets this service is not
10475 restricted to compiling in Ada 2005 mode.
10476 (Make_VM_TSD): Generate code that declares and initializes the OSD
10477 record. Needed to support dispatching calls through synchronized
10480 (Make_Predefined_Primitive_Specs): Enable generation of predefined
10481 primitives associated with synchronized interfaces.
10482 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
10483 primitives associated with synchronized interfaces.
10485 2011-08-02 Yannick Moy <moy@adacore.com>
10487 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
10488 statements hidden in SPARK if preceded by the HIDE directive
10489 (Parse_Exception_Handlers): mark each exception handler in a sequence of
10490 exception handlers as hidden in SPARK if preceded by the HIDE directive
10491 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
10492 if starting with the HIDE directive
10493 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
10494 starting with the HIDE directive; mark the declarations in a private
10495 part as hidden in SPARK if the private part starts with the HIDE
10497 * restrict.adb, restrict.ads
10498 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
10499 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
10500 argument node belongs to a part which is hidden in SPARK
10501 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
10502 parts in SPARK; protect the possibly costly call to
10503 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
10504 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
10505 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
10506 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
10508 (Scan): recognize special comment starting with '#' and followed by
10509 SPARK keyword "hide" as a HIDE directive.
10511 2011-08-02 Yannick Moy <moy@adacore.com>
10513 * types.ads, erroutc.ads: Minor reformatting.
10515 2011-08-02 Vincent Celier <celier@adacore.com>
10517 * link.c: Add response file support for cross platforms.
10519 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10521 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
10522 in an association, set parent field of copy before partial analysis.
10523 * sem_res.adb (Resolve_Slice): create reference to itype only when
10524 expansion is enabled.
10526 2011-08-02 Yannick Moy <moy@adacore.com>
10528 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
10529 for new flag denoting which subprogram bodies are in ALFA
10530 * restrict.adb, sem_ch7.adb: Update comment
10531 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
10532 sem_ch9.adb, sem_res.adb: Add calls to
10533 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
10534 * sem_ch6.adb (Analyze_Function_Return): add calls to
10535 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
10536 middle of the body, and extended return.
10537 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
10538 False when missing return.
10539 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
10540 to True for subprograms whose spec is in ALFA. Remove later on the flag
10541 on the entity used for a subprogram body when there exists a separate
10543 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
10544 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
10545 False, otherwise do nothing.
10547 2011-08-02 Robert Dewar <dewar@adacore.com>
10549 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
10551 2011-08-02 Yannick Moy <moy@adacore.com>
10553 * sem_ch4.ads: minor formatting.
10555 2011-08-02 Yannick Moy <moy@adacore.com>
10557 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
10558 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
10559 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
10560 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
10561 opt.ads: cleanup of SPARK mode
10563 2011-08-02 Yannick Moy <moy@adacore.com>
10565 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
10567 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
10568 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
10570 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
10571 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
10572 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
10573 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
10575 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
10577 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
10578 functions whose return type is not in ALFA.
10579 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
10581 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
10582 parameter's type is not in ALFA.
10583 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
10586 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10588 * sem_ch6 (Analyze_Expression_Function): treat the function as
10589 Inline_Always, and introduce a subprogram declaration for it when it is
10591 * inline.adb (Add_Inlined_Body): recognize bodies that come from
10592 expression functions, so that the back-end can determine whether they
10593 can in fact be inlined.
10594 * sem_util.adb (Is_Expression_Function): predicate to determine whether
10595 a function body comes from an expression function.
10597 2011-08-02 Gary Dismukes <dismukes@adacore.com>
10599 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
10600 null exclusions to test Can_Never_Be_Null on the anonymous access types
10601 of the formals rather than testing the formals themselves. Exclude this
10602 check in cases where the Old_Formal is marked as a controlling formal,
10603 to avoid issuing spurious errors for bodies completing dispatching
10604 operations (due to the flag not getting set on controlling access
10605 formals in body specs).
10606 (Find_Corresponding_Spec): When checking full and subtype conformance of
10607 subprogram bodies in instances, pass Designated and E in that order, for
10608 consistency with the expected order of the formals (New_Id followed by
10611 2011-08-02 Robert Dewar <dewar@adacore.com>
10613 * sem_ch8.adb: Minor reformatting.
10615 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10617 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
10618 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
10619 primitive operations of class-wide actuals.
10621 2011-08-02 Javier Miranda <miranda@adacore.com>
10623 * exp_atag.ads, exp_atag.adb
10624 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
10625 since its value is implicitly passed in argument Typ.
10626 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
10627 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
10628 Build_Common_Dispatching_Select_Statements.
10630 2011-08-02 Robert Dewar <dewar@adacore.com>
10632 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
10633 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
10634 Minor reformatting.
10636 2011-08-02 Robert Dewar <dewar@adacore.com>
10638 * sem_res.adb: Minor reformatting.
10639 * sem_prag.adb: Minor reformatting.
10641 2011-08-02 Javier Miranda <miranda@adacore.com>
10643 * exp_atag.adb, exp_atags.ads
10644 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
10645 by the tagged type Entity. Required to use this routine in the VM
10646 targets since we do not have available the Tag entity in the VM
10649 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
10650 Ada.Tags has not been previously loaded.
10652 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
10653 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
10655 (Enclosing_Dynamic_Scope): Add missing support to handle the full
10656 view of enclosing scopes. Required to handle enclosing scopes that
10657 are synchronized types whose full view is a task type.
10659 (Build_VM_TSDs): Minor code improvement to avoid generating and
10660 analyzing lists with empty nodes.
10661 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
10662 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
10663 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
10664 (Make_Disp_Timed_Select_Body): Add support for VM targets.
10665 (Make_Select_Specific_Data_Table): Add support for VM targets.
10666 (Make_VM_TSD): Generate code to initialize the SSD structure of
10669 2011-08-02 Yannick Moy <moy@adacore.com>
10671 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
10672 cross-references section in ALI.
10673 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
10674 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
10676 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
10677 subprogram or package entity of a node
10678 (Is_Local_Reference_Type): new function returns True for references
10679 selected in local cross-references.
10680 (Lt): function extracted from Lt in Output_References
10681 (Write_Entity_Name): function extracted from Output_References
10682 (Generate_Definition): generate reference with type 'D' for definition
10683 of objects (object declaration and parameter specification), with
10684 appropriate locations and units, for use in local cross-references.
10685 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
10686 references of type 'I' for initialization in object definition.
10687 (Output_References): move part of function Lt and procedure
10688 Write_Entity_Name outside of the body. Ignore references of types 'D'
10689 and 'I' introduced for local cross-references.
10690 (Output_Local_References): new procedure to output the local
10691 cross-references sections.
10692 (Lref_Entity_Status): new array defining whether an entity is a local
10693 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
10694 with 'I' type when initialization expression is present.
10695 * get_scos.adb, get_scos.ads: Correct comments and typos
10697 2011-08-02 Javier Miranda <miranda@adacore.com>
10699 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
10701 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
10703 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
10706 2011-08-02 Vincent Celier <celier@adacore.com>
10708 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
10709 (No_Space_Img): New function
10710 (Find_Excluded_Sources): When reading from a file, record the file name
10711 and the line number for each excluded source.
10712 (Mark_Excluded_Sources): When reporting an error, if the excluded
10713 sources were read from a file, include file name and line number in
10716 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10718 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
10720 2011-08-02 Robert Dewar <dewar@adacore.com>
10722 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
10724 2011-08-02 Javier Miranda <miranda@adacore.com>
10726 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
10727 generation of TSDs to the DOTNET compiler.
10728 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
10729 generation of TSDs to the DOTNET compiler.
10731 2011-08-02 Javier Miranda <miranda@adacore.com>
10733 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
10734 record of all the tagged types declared inside library level package
10735 declarations, library level package bodies or library level subprograms.
10736 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
10737 associated with a given tagged type.
10738 (Build_VM_TSDs): New subprogram.
10739 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
10740 compilation units that are subprograms.
10741 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
10742 compilation units that are package bodies.
10743 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
10744 units that are a package declaration or a package instantiation.
10745 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
10746 reorganization to improve the error generated by the frontend when the
10747 function Ada.Tags.Secondary_Tag is not available.
10748 * rtsfind.ads (RE_Register_TSD): New runtime entity.
10749 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
10751 2011-08-02 Javier Miranda <miranda@adacore.com>
10753 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
10755 2011-08-02 Robert Dewar <dewar@adacore.com>
10757 * s-imenne.ads: Minor reformatting.
10759 2011-08-02 Robert Dewar <dewar@adacore.com>
10761 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
10762 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
10763 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
10765 2011-08-02 Robert Dewar <dewar@adacore.com>
10767 * einfo.ads (Materialize_Entity): Document this is only for renamings
10768 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
10769 required debug information in the case where we transform the object
10770 declaration into a renaming declaration.
10771 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
10773 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
10774 Materialize_Entity.
10776 2011-08-02 Robert Dewar <dewar@adacore.com>
10778 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
10779 Suppress_Init_Procs.
10780 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
10781 Suppress_Initialization/Initialization_Suppressed.
10782 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
10783 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
10784 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
10785 * sem_prag.adb: New processing for pragma Suppress_Initialization.
10787 2011-08-02 Robert Dewar <dewar@adacore.com>
10789 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
10790 Minor reformatting.
10792 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10794 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
10795 only have inheritable classwide pre/postconditions.
10797 2011-08-02 Javier Miranda <miranda@adacore.com>
10799 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
10800 * rtsfind.ads (RE_Check_TSD): New runtime entity.
10801 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
10802 checks if the external tag of a type is the same as the external tag
10803 of some other declaration.
10805 2011-08-02 Thomas Quinot <quinot@adacore.com>
10807 * s-taskin.ads: Minor reformatting.
10809 2011-08-02 Emmanuel Briot <briot@adacore.com>
10811 * g-comlin.adb (Display_Help): swap the order in which it prints the
10812 short help and the general usage.
10814 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10816 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
10817 the aspect declarations and attach them to the generic copy for
10818 subsequent analysis.
10819 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
10820 declarations of the generic tree to the new subprogram declarations.
10821 * sem_attr.adb (Check_Precondition_Postcondition): recognize
10822 conditions that apply to a subprogram instance.
10824 2011-08-02 Robert Dewar <dewar@adacore.com>
10826 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
10828 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10830 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
10831 private type with a tagged full view is not derived in the immediate
10832 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
10834 2011-08-02 Robert Dewar <dewar@adacore.com>
10836 * exp_ch4.adb: Minor reformatting.
10838 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10840 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
10841 Ada2012 iterator, the loop will be rewritten during expansion into a
10842 while loop with a cursor and an element declaration. Do not analyze the
10843 body in this case, because if the container is for indefinite types the
10844 actual subtype of the elements will only be determined when the cursor
10845 declaration is analyzed.
10847 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10849 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
10850 size/alignment related attributes in CodePeer_Mode.
10852 2011-08-02 Gary Dismukes <dismukes@adacore.com>
10854 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
10855 Prepend_Element, since this can result in the operation getting the
10856 wrong slot in the full type's dispatch table if the full type has
10857 inherited operations. The incomplete type's operation will get added
10858 to the proper position in the full type's primitives
10859 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
10860 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
10861 dispatching operations, since there are cases where nonprimitive
10862 subprograms can get added to the list of incomplete dependents (such
10863 as subprograms in nested packages).
10864 * sem_ch6.adb (Process_Formals): First, remove test for being in a
10865 private part when determining whether to add a primitive with a
10866 parameter of a tagged incomplete type to the Private_Dependents list.
10867 Such primitives can also occur in the visible part, and should not have
10868 been excluded from being private dependents.
10869 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
10870 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
10871 list of a Taft-amendment incomplete type is a primitive before issuing
10872 an error that the full type must appear in the same unit. There are
10873 cases where nonprimitives can be in the list (such as subprograms in
10875 * sem_disp.adb (Derives_From): Use correct condition for checking that
10876 a formal's type is derived from the type of the corresponding formal in
10877 the parent subprogram (the condition was completely wrong). Add
10878 checking that was missing for controlling result types being derived
10879 from the result type of the parent operation.
10881 2011-08-02 Yannick Moy <moy@adacore.com>
10883 * errout.adb (First_Node): minor renaming
10884 * restrict.adb (Check_Formal_Restriction): put restriction warning on
10887 2011-08-02 Yannick Moy <moy@adacore.com>
10889 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
10890 before accessing operands.
10891 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
10892 decide whether an initialization expression respects SPARK rules, as
10893 the plain node is the expanded one. This allows for more valid warnings
10895 * gnat_rm.texi: Minor update.
10897 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10899 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
10902 2011-08-02 Robert Dewar <dewar@adacore.com>
10904 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
10906 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10908 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
10909 loop statements and the element renaming declaration with a block when
10910 the element type is controlled.
10912 2011-08-02 Yannick Moy <moy@adacore.com>
10914 * sinfo.ads: Minor formatting.
10916 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10918 * sem_aggr.adb (Add_Association): if the association has a box and no
10919 expression, use the Sloc of the aggregate itself for the new
10921 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
10924 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10926 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
10927 When a container is provided via a function call, generate a renaming
10928 of the function result. This avoids the creation of a transient scope
10929 and the premature finalization of the container.
10930 * exp_ch7.adb (Is_Container_Cursor): Removed.
10931 (Wrap_Transient_Declaration): Remove the supression of the finalization
10932 of the list controller when the declaration denotes a container cursor,
10935 2011-08-02 Yannick Moy <moy@adacore.com>
10937 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
10938 node is from source, instead of the original node being from source.
10940 (Resolve_Array_Aggregate): refine the check for a static expression, to
10941 recognize also static ranges
10942 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
10943 Array_Type_Declaration): postpone the test for the type being a subtype
10944 mark after the type has been resolved, so that component-selection and
10945 expanded-name are discriminated.
10946 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
10947 to distinguish the case of an iteration scheme, so that an error is
10948 issed on a non-static range in SPARK except in an iteration scheme.
10949 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
10950 In_Iter_Schm = True.
10951 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
10952 user-defined operators so that they are allowed in renaming
10954 (Find_Selected_Component): refine the check for prefixing of operators
10955 so that they are allowed in renaming. Move the checks for restrictions
10956 on selector name after analysis discriminated between
10957 component-selection and expanded-name.
10958 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
10959 concatenation argument of string type if it is static.
10960 * sem_util.adb, sem_util.ads
10961 (Check_Later_Vs_Basic_Declarations): add a new function
10962 Is_Later_Declarative_Item to decice which declarations are allowed as
10963 later items, in the two different modes Ada 83 and SPARK. In the SPARK
10964 mode, add that renamings are considered as later items.
10965 (Enclosing_Package): new function to return the enclosing package
10966 (Enter_Name): correct the rule for homonyms in SPARK
10967 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
10968 from source (result of expansion) to avoid issuing wrong warnings.
10970 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10972 * errout.adb: On anything but an expression First_Node returns its
10975 2011-08-02 Pascal Obry <obry@adacore.com>
10977 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
10979 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10981 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
10982 Set the associated loop as the related expression of internally
10984 * exp_ch7.adb (Is_Container_Cursor): New routine.
10985 (Wrap_Transient_Declaration): Supress the finalization of the list
10986 controller when the declaration denotes a container cursor.
10988 2011-08-02 Yannick Moy <moy@adacore.com>
10990 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
10992 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
10993 expression is a simple expression. This check cannot be performed in
10994 the semantics, so just drop it.
10995 (P_Index_Or_Discriminant_Constraint): move check that the index or
10996 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
10997 semantics. Other cases were previously checked in the semantics.
10998 * par-ch4.adb (P_Name): move checks that a selector name is not
10999 character literal or an operator symbol to Find_Selected_Component in
11001 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
11002 declarations are not placed after later declarations in a separate
11003 procedure in Sem_Util (possibly not the best choice?), to be used both
11004 during parsing, for Ada 83 mode, and during semantic analysis, for
11006 * par-endh.adb (Check_End): move check that end label is not missing
11007 to Process_End_Label in the semantics
11008 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
11009 the special case for SPARK restriction
11010 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
11011 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
11012 parameter Force to issue the error message even on internal node (used
11013 for generated end label). Call Check_Restriction to check when an error
11014 must be issued. In SPARK mode, issue an error message even if the
11015 restriction is not set.
11016 (Check_Restriction): new procedure with an additional out parameter to
11017 inform the caller that a message has been issued
11018 * sem_aggr.adb: Minor modification of message
11019 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
11020 instead of issuing an error message directly
11021 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
11022 declarations are not placed after later declarations, by calling
11023 Check_Later_Vs_Basic_Declarations
11024 (Analyze_Subtype_Declaration): move here the check that an index or
11025 discriminant constraint must be a subtype mark. Change the check that
11026 a subtype of String must start at one so that it works on subtype marks.
11027 * sem_ch4.adb (Analyze_Call): move here the check that a named
11028 association cannot follow a positional one in a call
11029 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
11030 instead of issuing an error message directly
11031 * sem_ch8.adb (Find_Selected_Component): move here the check that a
11032 selector name is not a character literal or an operator symbol. Move
11033 here the check that the prefix of an expanded name cannot be a
11034 subprogram or a loop statement.
11035 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
11036 procedure called from parsing and semantics to check that basic
11037 declarations are not placed after later declarations
11038 (Process_End_Label): move here the check that end label is not missing
11040 2011-08-02 Arnaud Charlet <charlet@adacore.com>
11042 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
11043 representation clause in codepeer mode, since it confuses CodePeer and
11044 does not bring useful info.
11046 2011-08-02 Ed Falis <falis@adacore.com>
11048 * init.c: initialize fp hw on MILS.
11050 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11052 * errout.adb (First_Node): for bodies, return the node itself (small
11053 optimization). For other nodes, do not check source_unit if the node
11054 comes from Standard.
11056 2011-08-02 Robert Dewar <dewar@adacore.com>
11058 * exp_ch3.adb: Minor comment additions.
11059 * sem_ch13.adb: Minor reformatting.
11061 2011-08-02 Pascal Obry <obry@adacore.com>
11063 * make.adb, makeutl.adb: Removes some superfluous directory separator.
11065 2011-08-02 Robert Dewar <dewar@adacore.com>
11067 * sem_attr.adb: Minor reformatting.
11069 2011-08-02 Robert Dewar <dewar@adacore.com>
11071 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
11072 (Has_Default_Component_Value): Removed
11073 * einfo.ads Comment updates
11074 (Has_Default_Aspect): Replaces Has_Default_Value
11075 (Has_Default_Component_Value): Removed
11077 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
11079 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
11080 (Get_Simple_Init_Val): Handle Default_Value aspect
11081 (Needs_Simple_Initialization): Handle Default_Value aspect
11082 * exp_ch3.ads: Needs_Simple_Initialization
11083 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
11084 * par-prag.adb (Pragma_Default[_Component]Value) Removed
11086 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
11087 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
11088 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
11090 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11092 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
11093 package containing iteration primitives.
11094 exp_ch5.adb (Expand_Iterator_Loop): ditto.
11096 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11098 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
11099 "of", pre-analyze expression in case it is a function call with
11100 finalization actions that must be placed ahead of the loop.
11101 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
11102 on an Ada2012 iterator, insert them ahead of the rewritten loop.
11104 2011-08-02 Geert Bosch <bosch@adacore.com>
11106 * cstand.adb (Create_Float_Types): Only consider C's long double for
11107 Long_Long_Float, in addition to double.
11109 2011-08-02 Robert Dewar <dewar@adacore.com>
11111 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
11112 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
11113 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
11114 Minor reformatting.
11116 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11118 * sem_attr.adb: handle properly 'Result when it is a prefix of an
11121 2011-08-02 Javier Miranda <miranda@adacore.com>
11123 * einfo.ads, einfo.adb
11124 (Original_Access_Type): Move this attribute to Node26 since there was
11125 an undocumented use of Node21 in E_Access_Subprogram_Type entities
11126 which causes conflicts and breaks the generation of the .NET compiler.
11127 (Interface_Name): Add missing documentation on JGNAT only uses of
11130 2011-08-02 Geert Bosch <bosch@adacore.com>
11132 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
11133 (Find_Back_End_Float_Type): Likewise
11134 (Create_Back_End_Float_Types): Likewise
11135 (Create_Float_Types): Likewise
11136 (Register_Float_Type): Likewise
11137 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
11138 Nlist and split out type selection in new local Find_Base_Type function.
11139 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
11141 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
11143 2011-08-02 Robert Dewar <dewar@adacore.com>
11145 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
11147 * opt.ads: Minor comment change.
11148 * sem_ch12.adb: Minor code reorganization.
11150 2011-08-02 Gary Dismukes <dismukes@adacore.com>
11152 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
11153 subtype's list of rep items to the list on the full subtype in the case
11154 where the lists are the same.
11156 2011-08-02 Geert Bosch <bosch@adacore.com>
11158 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
11159 using the one from System.Strings, which also deallocates all strings.
11161 2011-08-02 Geert Bosch <bosch@adacore.com>
11163 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
11165 * gcc-interface/Make-lang.in: Update dependencies.
11167 2011-08-02 Olivier Hainque <hainque@adacore.com>
11169 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
11172 2011-08-02 Javier Miranda <miranda@adacore.com>
11174 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
11175 associated with anonymous access to subprograms.
11177 2011-08-02 Geert Bosch <bosch@adacore.com>
11180 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
11181 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
11182 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
11183 (Add_Symbol_Definition): Move to switch-c.adb
11184 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
11185 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
11186 (Add_Symbol_Definition): Move to switch-c.adb.
11187 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
11189 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
11190 Move to warnsw.adb.
11191 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
11192 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
11193 Move to warnsw.adb.
11194 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
11195 (Add_Symbol_Definition): Moved from Prepcomp.
11196 * switch-c.ads: Update copyright notice. Use String_List instead of
11197 Argument_List, removing dependency on System.OS_Lib.
11199 2011-08-02 Yannick Moy <moy@adacore.com>
11201 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
11202 mode on initialization expression which does not respect SPARK
11204 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
11205 if the tree referenced by its argument represents an initialization
11206 expression in SPARK, suitable for initializing an object in an object
11209 2011-08-02 Javier Miranda <miranda@adacore.com>
11211 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
11212 internally generated access to subprogram with its associated protected
11214 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
11216 2011-08-02 Geert Bosch <bosch@adacore.com>
11218 * cstand.adb (Register_Float_Type): Print information about type to
11219 register, if the Debug_Flag_Dot_B is set.
11220 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
11221 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
11222 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
11223 with a requested precision of more than Max_Digits digits and no more
11224 than Max_Base_Digits digits, if a range specification is present and the
11225 Predefined_Float_Types list has a suitable type to derive from.
11226 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
11227 case of type completion with pragma Import
11229 (Process_Import_Predefined_Type): Processing to complete a type
11230 with pragma Import. Currently supports floating point types only.
11231 (Set_Convention_From_Pragma): Do nothing without underlying type.
11232 (Process_Convention): Guard against absence of underlying type,
11233 which may happen when importing incomplete types.
11234 (Process_Import_Or_Interface): Handle case of importing predefined
11235 types. Tweak error message.
11237 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11239 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
11240 functions to previous change. Reorganize code slightly.
11242 2011-08-02 Geert Bosch <bosch@adacore.com>
11244 * back_end.ads (Register_Type_Proc): New call back procedure type for
11245 allowing the back end to provide information about available types.
11246 (Register_Back_End_Types): New procedure to register back end types.
11247 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
11249 * cstand.adb (Back_End_Float_Types): New list for floating point types
11250 supported by the back end.
11251 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
11252 (Copy_Float_Type): New procedure to make new copies of predefined types.
11253 (Register_Float_Type): New call back procedure to populate the BEFT list
11254 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
11255 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
11256 (Create_Float_Types): New procedure to create entities for floating
11257 point types predefined in Standard, and put these and any remaining
11258 BEFTs on the Predefined_Float_Types list.
11259 * stand.ads (Predefined_Float_Types): New list for predefined floating
11260 point types that do not have declarations in package Standard.
11262 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11264 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
11265 entity node for the unit containing the parameter.
11266 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
11267 (Add_Inlined_Subprogram): Likewise.
11268 * gcc-interface/Make-lang.in: Update dependencies.
11270 2011-08-02 Thomas Quinot <quinot@adacore.com>
11272 * s-stusta.adb (Print): Make sure Pos is always initialized to a
11275 2011-08-02 Geert Bosch <bosch@adacore.com>
11277 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
11279 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11281 * sem_type.adb (Covers): Move trivial case to the top and reuse the
11282 computed value of Base_Type.
11284 2011-08-02 Yannick Moy <moy@adacore.com>
11286 * restrict.adb (Check_Restriction): issue an error for any use of
11287 class-wide, even if the No_Dispatch restriction is not set.
11288 * sem_aggr.adb: Correct typos in comments and messages in formal mode
11289 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
11290 when completing a private extension, the type named in the private part
11291 is not the same as that named in the visible part.
11292 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
11293 of an inherited primitive operations of a tagged type or type extension
11294 that returns the tagged type.
11295 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
11296 function which returns True for an implicit operation inherited by the
11297 derived type declaration for the argument type.
11298 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
11301 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11303 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
11304 Process_Bounds, to perform analysis with expansion of a range or an
11305 expression that is the iteration scheme for a loop.
11306 (Analyze_Iterator_Specification): If domain of iteration is given by a
11307 function call with a controlled result, as is the case if call returns
11308 a predefined container, ensure that finalization actions are properly
11310 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
11312 2011-08-02 Javier Miranda <miranda@adacore.com>
11314 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
11315 * gcc-interface/Make-lang.in: Update dependencies.
11317 2011-08-02 Javier Miranda <miranda@adacore.com>
11319 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
11320 determine if the analysis is performed using N or Original_Node (N).
11321 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
11322 functionality of routine Is_Variable avoids code duplication.
11323 * checks.adb (Determine_Range): Handle temporaries generated by
11324 Remove_Side_Effects.
11326 2011-08-02 Javier Miranda <miranda@adacore.com>
11328 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
11329 expansion of the condition. Required since the previous analysis was
11330 done with expansion disabled (see Resolve_Quantified_Expression) and
11331 hence checks were not inserted and record comparisons have not been
11334 2011-08-02 Ed Falis <falis@adacore.com>
11336 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
11339 2011-08-02 Bob Duff <duff@adacore.com>
11341 * opt.ads: Minor comment fix.
11343 2011-08-02 Bob Duff <duff@adacore.com>
11345 * sem_ch12.adb (Analyze_Package_Instantiation,
11346 Analyze_Subprogram_Instantiation): Turn off style checking while
11347 analyzing an instance. Whatever style checks that apply to the generic
11348 unit should apply, so it makes no sense to apply them in an instance.
11349 This was causing trouble when compiling an instance of a runtime
11350 unit that violates the -gnatyO switch.
11351 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
11352 one of the two case statements, causing spurious errors.
11354 2011-08-02 Robert Dewar <dewar@adacore.com>
11356 * uname.adb: Minor reformatting.
11357 * gnatcmd.adb: Minor reformatting.
11358 * exp_attr.adb: Minor reformatting.
11360 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11362 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
11363 No_Dispatching_Calls, do not look for the Assign primitive, because
11364 predefined primitives are not created in this case.
11366 2011-08-02 Bob Duff <duff@adacore.com>
11368 * stylesw.ads: Minor comment fixes.
11370 2011-08-02 Robert Dewar <dewar@adacore.com>
11372 * freeze.adb (Add_To_Result): New procedure.
11374 2011-08-02 Jose Ruiz <ruiz@adacore.com>
11376 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
11377 time, if the specific run-time routines for handling streams of strings
11378 are not available, use the default mechanism.
11380 2011-08-02 Arnaud Charlet <charlet@adacore.com>
11382 * s-regpat.ads: Fix typo.
11384 2011-08-02 Vincent Celier <celier@adacore.com>
11386 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
11387 not null, call it to create the in memory config project file without
11388 parsing an existing default config project file.
11390 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11392 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
11394 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11396 * sem_elim.adb: an abstract subprogram does not need an eliminate
11397 pragma for its descendant to be eliminable.
11399 2011-08-02 Ed Falis <falis@adacore.com>
11401 * init.c: revert to handling before previous checkin for VxWorks
11402 * s-intman-vxworks.adb: delete unnecessary declarations related to
11403 using Ada interrupt facilities for handling signals.
11404 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
11405 * s-intman-vxworks.ads: Import __gnat_install_handler as
11406 Initialize_Interrupts.
11407 * s-taprop-vxworks.adb: Delete Signal_Mask.
11408 (Abort_Handler): change construction of mask to unblock exception
11411 2011-08-02 Jerome Guitton <guitton@adacore.com>
11413 * a-except-2005.adb (Raise_From_Signal_Handler): Call
11414 Debug_Raise_Exception before propagation starts.
11416 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11418 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
11419 to Restriction_Check_Required.
11420 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
11421 * sem_res.adb (Resolve_Call): Likewise.
11422 * sem_attr.adb (Check_Stream_Attribute): Likewise.
11424 2011-08-02 Bob Duff <duff@adacore.com>
11426 * stylesw.ads: Update comment.
11427 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
11428 * errout.ads: Remove obsolete comment.
11430 2011-08-02 Javier Miranda <miranda@adacore.com>
11432 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
11433 (Set_Is_Safe_To_Reevaluate): new procedure.
11434 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
11435 assignment is allowed on safe-to-reevaluate variables.
11436 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
11437 temporary created to remove side effects in expressions that use
11438 the secondary stack as safe-to-reevaluate.
11439 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
11440 variables that are not true constants.
11442 2011-08-02 Robert Dewar <dewar@adacore.com>
11444 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
11445 sem_res.adb, sem_ch6.adb: Minor reformatting.
11447 2011-08-02 Jerome Guitton <guitton@adacore.com>
11449 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
11451 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11453 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
11454 not set Overridden_Operation if subprogram is an initialization
11457 2011-08-02 Yannick Moy <moy@adacore.com>
11459 * par-ch6.adb: Correct obsolete name in comments
11460 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
11461 which takes two message arguments (existing function takes one), with
11462 second message used for continuation.
11463 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
11464 block statements that originate from a source block statement, not
11465 generated block statements
11466 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
11467 symmetry with procedure case
11468 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
11469 function to issue an error in formal mode if a package specification
11470 contains more than one tagged type or type extension.
11471 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
11472 parameters matching formals of tagged types are objects (or ancestor
11473 type conversions of objects), not general expressions. Issue an error
11474 on view conversions that are not involving ancestor conversion of an
11476 (Resolve_Type_Conversion): in formal mode, issue an error on the
11477 operand of an ancestor type conversion which is not an object
11478 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
11479 procedure so that it works also for actuals of function calls
11480 (Is_Actual_Tagged_Parameter): new function which determines if its
11481 argument is an actual parameter of a formal of tagged type in a
11483 (Is_SPARK_Object_Reference): new function which determines if the tree
11484 referenced by its argument represents an object in SPARK
11486 2011-08-02 Robert Dewar <dewar@adacore.com>
11488 * sem_ch3.adb: Minor reformatting
11489 Minor comment addition
11490 Minor error msg text change
11492 2011-08-02 Javier Miranda <miranda@adacore.com>
11494 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
11495 function. Used to be more precise when we generate a variable plus one
11496 assignment to remove side effects in the evaluation of the Bound
11498 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
11499 of the bound expression to force its re-analysis and thus expand the
11500 associated transient scope (if required). Code cleanup replacing the
11501 previous code that declared the constant entity by an invocation to
11502 routine Force_Evaluation which centralizes this work in the frontend.
11504 2011-08-02 Robert Dewar <dewar@adacore.com>
11506 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
11507 (Base_Type): Now uses improved Is_Base_Type function
11508 * einfo.ads (Base_Type): Inline this function
11510 2011-08-02 Robert Dewar <dewar@adacore.com>
11512 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
11513 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
11515 2011-08-02 Arnaud Charlet <charlet@adacore.com>
11517 * gcc-interface/Make-lang.in: Update dependencies.
11518 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
11521 2011-08-02 Yannick Moy <moy@adacore.com>
11523 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
11524 non-simple expression used in delta constraint
11525 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
11526 index constraint which is not a subtype mark
11527 * par.adb: With and use Restrict
11528 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
11529 mode on component type which is not a subtype mark and default
11530 expression on component
11531 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
11532 of string which does not have a lower index bound equal to 1
11533 (Array_Type_Declaration): issue an error in formal mode on index or
11534 component type which is not a subtype mark, and on aliased keyword on
11536 (Derived_Type_Declaration): issue an error in formal mode on interface,
11537 limited or abstract type
11538 (Record_Type_Declaration): issue an error in formal mode on interface
11539 (Record_Type_Definition): issue an error in formal mode on tagged types
11540 and type extensions not declared in the specification of a library unit
11541 package; on null non-tagged record; on variant part
11543 2011-08-02 Vincent Celier <celier@adacore.com>
11545 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
11546 not declared for qualified library project when Library_Name is not
11547 declared, but Library_Dir is.
11549 2011-08-02 Robert Dewar <dewar@adacore.com>
11551 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
11552 pragmas (affects aspects [Component_]Default_Value
11553 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
11554 component type for the resolution
11556 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11558 * einfo.adb (Base_Type): Tune implementation for speed.
11560 2011-08-02 Robert Dewar <dewar@adacore.com>
11562 * freeze.adb: Minor reformatting.
11564 2011-08-02 Thomas Quinot <quinot@adacore.com>
11566 * scos.ads: Update comments.
11568 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11570 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
11571 base type, because the parent may be a subtype of a private type whose
11572 convention is established in a private part.
11574 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
11576 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
11577 statement in a block when the expansion of the return expression has
11578 created a finalization chain.
11579 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
11580 with the parent node.
11581 Add N_Extended_Return_Statement to handle the case where a transient
11582 object declaration appears in the Return_Object_Declarations list of
11583 an extended return statement.
11585 2011-08-02 Matthew Gingell <gingell@adacore.com>
11587 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
11588 unused parameter 'name'.
11590 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11592 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
11593 inherited operation, check whether its alias, which is the source
11594 operastion that it renames, has been marked eliminated.
11596 2011-08-02 Javier Miranda <miranda@adacore.com>
11598 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
11599 in-mode parameter whose type is an access type since it can be used to
11600 modify its designated object. Enforce code that handles as safe an
11601 access type that is not access-to-constant but it is the result of a
11602 previous removal of side-effects.
11603 (Remove_Side_Effects): Minor code reorganization of cases which require
11604 no action. Done to incorporate documentation on new cases uncovered
11605 working in this ticket: no action needed if this routine was invoked
11606 too early and the nodes are not yet decorated.
11607 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
11608 to routine Remove_Side_Effects by calls to Force_Evaluation since they
11609 were issued with actuals that are implicitly provided by
11612 2011-08-02 Robert Dewar <dewar@adacore.com>
11614 * sem_ch3.adb, sem_res.adb: Minor reformatting.
11616 2011-08-02 Yannick Moy <moy@adacore.com>
11618 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
11619 to issue an error in formal mode on attribute not supported in this mode
11620 (Analyze_Attribute): issue errors on standard attributes not supported
11622 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
11623 comment, and issue error in formal mode on modulus which is not a power
11625 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
11627 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
11629 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
11630 operator on modular type (except 'not').
11632 2011-08-02 Robert Dewar <dewar@adacore.com>
11634 * gnat_rm.texi: Minor reformatting.
11636 2011-08-02 Arnaud Charlet <charlet@adacore.com>
11638 * s-osinte-linux.ads: Minor comment update and reformatting.
11639 * i-cexten.ads: Make this unit pure, as for its parent.
11640 Will allow its usage in more contexts if needed.
11642 2011-08-02 Robert Dewar <dewar@adacore.com>
11644 * s-utf_32.ads: Minor comment fix.
11646 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11648 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
11649 operation of a tagged synchronized type, handle the case where the
11650 controlling argument is overloaded.
11652 2011-08-02 Yannick Moy <moy@adacore.com>
11654 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
11655 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
11656 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
11657 SPARK mode and formal verification mode on processing SPARK restriction
11658 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
11659 requiring consistency checking.
11661 2011-08-02 Robert Dewar <dewar@adacore.com>
11663 * sem_res.adb: Minor reformatting.
11665 2011-08-02 Robert Dewar <dewar@adacore.com>
11667 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
11668 a-cforse.ads: Remove unneeded with of Ada.Containers
11669 Remove commented out pragma Inline's
11670 Move specifications of new subprograms to the actual specs
11672 2011-08-02 Yannick Moy <moy@adacore.com>
11674 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
11675 a-cforse.ads: Update comments.
11677 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11679 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
11681 2011-08-02 Robert Dewar <dewar@adacore.com>
11683 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
11684 a-cforse.ads, a-cofove.ads: Minor reformatting.
11686 2011-08-02 Claire Dross <dross@adacore.com>
11688 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
11689 a-cofove.ads: Add comments.
11691 2011-08-02 Yannick Moy <moy@adacore.com>
11693 * gnat_rm.texi: Document formal containers.
11695 2011-08-02 Emmanuel Briot <briot@adacore.com>
11697 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
11698 are empty sections.
11700 2011-08-02 Robert Dewar <dewar@adacore.com>
11702 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
11705 2011-08-02 Robert Dewar <dewar@adacore.com>
11707 * aspects.adb: New aspects Default_Value and Default_Component_Value
11708 New format of Aspect_Names table checks for omitted entries
11709 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
11710 handling of boolean aspects for derived types.
11711 New aspects Default_Value and Default_Component_Value
11712 New format of Aspect_Names table checks for omitted entries
11713 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
11714 (Has_Default_Value): New flag
11715 (Has_Default_Component_Value): New flag
11716 (Has_Default_Value): New flag
11717 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
11719 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
11720 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
11721 Default_Value and Default_Component_Value
11722 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
11723 New aspects Default_Value and Default_Component_Value
11724 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
11725 * sprint.adb: Print N_Aspect_Specification node when called from gdb
11727 2011-08-02 Vincent Celier <celier@adacore.com>
11729 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
11730 inherit library kind.
11732 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11734 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
11735 Minor reformatting.
11737 2011-08-02 Robert Dewar <dewar@adacore.com>
11739 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
11741 2011-08-02 Yannick Moy <moy@adacore.com>
11743 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
11745 2011-08-02 Robert Dewar <dewar@adacore.com>
11747 * impunit.adb: Add comment.
11749 2011-08-02 Yannick Moy <moy@adacore.com>
11751 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
11752 qualification of aggregates in formal mode
11753 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
11755 (Resolve_Aggregate): complete the test that an aggregate is adequately
11756 qualified in formal mode
11758 2011-08-02 Pascal Obry <obry@adacore.com>
11760 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
11761 * mlib-prj.adb: Supress warning when compiling binder generated file.
11762 (Build_Library): Supress all warnings when compiling the binder
11765 2011-08-02 Yannick Moy <moy@adacore.com>
11767 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
11769 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
11770 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
11771 Add with/use clauses to make Check_Formal_Restriction visible
11773 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11775 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
11776 in-parameters when type of the generic formal is private in the generic
11777 spec and non-private in the body.
11779 2011-08-02 Claire Dross <dross@adacore.com>
11781 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
11782 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
11783 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
11784 * impunit.adb, Makefile.rtl: Take new files into account.
11786 2011-08-02 Robert Dewar <dewar@adacore.com>
11788 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
11789 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
11791 2011-08-02 Yannick Moy <moy@adacore.com>
11793 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
11795 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
11796 matching static array bounds, taking into account the special case of
11798 * sem_ch3.adb: Typo in comment.
11800 2011-08-02 Yannick Moy <moy@adacore.com>
11802 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
11803 which issues an error in formal mode if its argument node is originally
11805 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
11806 has a discriminant specification so that it does not include the case
11808 (Derived_Type_Declaration): move here the test that a derived type has a
11809 discriminant specification
11810 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
11811 first element of a component association before accessing its choices
11812 (presence of component association is not enough)
11813 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
11814 declaration is a library item before accessing the next element in a
11815 list, as library items are not member of lists
11816 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
11817 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
11818 Check_Formal_Restriction whenever possible.
11820 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11822 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
11823 reference when needed.
11825 2011-08-02 Bob Duff <duff@adacore.com>
11827 * gnat_ugn.texi: Fix typo.
11829 2011-08-02 Vincent Celier <celier@adacore.com>
11831 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
11832 archive file name. Do not use the full path name of archives for Open
11835 2011-08-02 Robert Dewar <dewar@adacore.com>
11837 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
11838 Analyze_Aspect_Specifications
11840 (Analyze_Aspect_Specifications): New handling for boolean aspects
11841 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
11842 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
11843 sequence for Analyze_Aspect_Specifications
11844 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
11845 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
11847 2011-08-02 Robert Dewar <dewar@adacore.com>
11849 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
11850 aspects, since these no longer exist.
11852 2011-08-02 Robert Dewar <dewar@adacore.com>
11854 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
11855 semicolon, do not try to see if there are aspects following it.
11856 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
11859 2011-08-02 Robert Dewar <dewar@adacore.com>
11861 * sem_ch8.adb, aspects.ads: Minor reformatting.
11863 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11865 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
11866 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
11868 (Analyze_Aspect_Specifications): ...here. Call above procedure.
11870 2011-08-02 Yannick Moy <moy@adacore.com>
11872 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
11873 mode on subprogram declaration outside of package specification, unless
11874 it is followed by a pragma Import
11875 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
11876 Access_Type_Declaration): issue error in formal mode on access type
11877 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
11879 (Analyze_Object_Declaration): issue error in formal mode on object
11880 declaration which does not respect SPARK restrictions
11881 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
11882 declaration which does not respect SPARK restrictions
11883 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
11884 error in formal mode on digits or delta constraint
11885 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
11886 decimal fixed point type
11887 (Derived_Type_Declaration): issue error in formal mode on derived type
11888 other than type extensions of tagged record types
11889 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
11890 with check on access definition
11891 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
11892 mode on protected definition.
11893 (Analyze_Task_Definition): issue error in formal mode on task definition
11895 2011-08-02 Robert Dewar <dewar@adacore.com>
11897 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
11899 2011-08-02 Javier Miranda <miranda@adacore.com>
11901 * sem_ch6.adb (Can_Override_Operator): New function.
11902 (Verify_Overriding_Indicator): Add missing code to check overriding
11903 indicator in operators. Fixes regression.
11904 (Check_Overriding_Indicator): Minor reformating after replacing the
11905 code that evaluates if the subprogram can override an operator by
11906 invocations to the above new function.
11908 (Write_Field26_Name): Add missing code to ensure that, following
11909 the documentation in einfo.ads, this field is not shown as attribute
11910 "Static_Initialization" on non-dispatching functions.
11912 2011-08-02 Jose Ruiz <ruiz@adacore.com>
11914 * sem_res.adb (Resolve_Call): A call to
11915 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
11916 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
11917 i.e., when the second parameter is of type Time_Span.
11919 2011-08-02 Vincent Celier <celier@adacore.com>
11921 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
11922 with an archive instead of -L<library dir> -l<library name>.
11924 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11926 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
11927 mark the base types In_Use in addition to making the operations
11930 2011-08-02 Ed Falis <falis@adacore.com>
11932 * init.c: add and setup __gnat_signal_mask for the exception signals
11933 * s-inmaop-vxworks.adb: new file.
11934 * s-intman-vxworks.adb: remove unnecessary initializations and
11936 * s-intman-vxworks.ads: remove unnecessary variable
11937 * s-taprop-vxworks.adb: simplify signal initialization
11939 2011-08-02 Robert Dewar <dewar@adacore.com>
11941 * sem_ch8.adb: Minor code reorganization, comment updates.
11943 2011-08-02 Robert Dewar <dewar@adacore.com>
11945 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
11946 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
11948 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
11949 (Matching_Static_Array_Bounds): Moved here from Sem_Res
11951 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11953 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
11954 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
11955 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
11956 use_type_clauses, to handle more efficiently use_type and use_all_type
11958 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
11959 Ada2012 Use_All_Type clause.
11960 (Use_Class_Wide_Operations): new procedure.
11962 2011-08-02 Robert Dewar <dewar@adacore.com>
11964 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
11965 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
11966 expression to expression function.
11968 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11970 * sem_ch4.adb: transform simple Ada2012 membership into equality only
11971 if types are compatible.
11973 2011-08-02 Yannick Moy <moy@adacore.com>
11975 * sem_res.adb (Matching_Static_Array_Bounds): new function which
11976 returns True if its argument array types have same dimension and same
11977 static bounds at each index.
11978 (Resolve_Actuals): issue an error in formal mode on actuals passed as
11979 OUT or IN OUT paramaters which are not view conversions in SPARK.
11980 (Resolve_Arithmetic_Op): issue an error in formal mode on
11981 multiplication or division with operands of fixed point types which are
11982 not qualified or explicitly converted.
11983 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
11984 Boolean or array type (except String) operands.
11985 (Resolve_Equality_Op): issue an error in formal mode on equality
11986 operators for array types other than String with non-matching static
11988 (Resolve_Logical_Op): issue an error in formal mode on logical operators
11989 for array types with non-matching static bounds. Factorize the code in
11990 Matching_Static_Array_Bounds.
11991 (Resolve_Qualified_Expression): issue an error in formal mode on
11992 qualified expressions for array types with non-matching static bounds.
11993 (Resolve_Type_Conversion): issue an error in formal mode on type
11994 conversion for array types with non-matching static bounds
11996 2011-08-02 Robert Dewar <dewar@adacore.com>
11998 * par-ch10.adb: Minor code reorganization (use Nkind_In).
12000 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12002 * par-ch9.adb: save location of entry for proper error message.
12004 2011-08-02 Javier Miranda <miranda@adacore.com>
12006 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
12007 (Use_Full_View) which permits this routine to climb through the
12008 ancestors using the full-view of private parents.
12009 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
12010 Use_Full_View to true in calls to Is_Ancestor.
12011 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
12012 true in call to Is_Ancestor.
12013 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
12014 Use_Full_View to true in call to Is_Ancestor.
12015 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
12016 call to Is_Ancestor.
12017 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
12018 Use_Full_View to true in calls to Is_Ancestor.
12019 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
12020 Make_Select_Specific_Data_Table, Register_Primitive,
12021 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
12022 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
12023 to true in call to Is_Ancestor.
12024 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
12025 Use_Full_View to true in calls to Is_Ancestor.
12027 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
12028 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
12030 2011-08-02 Robert Dewar <dewar@adacore.com>
12032 * gnat_rm.texi: Minor reformatting.
12033 * sem_prag.adb: Minor reformatting.
12035 2011-08-02 Tristan Gingold <gingold@adacore.com>
12037 * vms_data.ads: Add VMS qualifier for -gnateP.
12039 2011-08-02 Robert Dewar <dewar@adacore.com>
12041 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
12042 * par-ch7.adb (P_Package): Proper placement of aspects for package
12043 decl/instantiation.
12044 * par-endh.adb (Check_End): Ad Is_Sloc parameter
12045 (End_Statements): Add Is_Sloc parameterr
12046 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
12047 (Check_End): Ad Is_Sloc parameter
12048 (End_Statements): Add Is_Sloc parameterr
12050 2011-08-02 Vincent Celier <celier@adacore.com>
12052 * ug_words: Add VMS qualifier equivalent to -gnateP:
12053 /SYMBOL_PREPROCESSING.
12055 2011-08-02 Jose Ruiz <ruiz@adacore.com>
12057 * gnat-style.texi: For hexadecimal numeric literals the typical
12058 grouping of digits is 4 to represent 2 bytes.
12059 A procedure spec which is split into several lines is indented two
12062 2011-08-02 Yannick Moy <moy@adacore.com>
12064 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
12065 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
12066 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
12068 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
12069 choice in array aggregate
12070 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
12072 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
12073 positional and named aggregate for record, or others in record
12074 aggregate, or multiple choice in record aggregate
12075 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
12076 array operands to logical operations AND, OR and XOR do not have the
12077 same static lower and higher bounds
12078 * sem_ch5.adb, sinfo.ads: Correct typos in comments
12080 2011-08-01 Robert Dewar <dewar@adacore.com>
12082 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
12083 Replaces Last_Source_Node_In_Sequence.
12084 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
12085 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
12086 parens and blank in string (this was inconsistently implemented).
12088 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
12089 blank in string (this was inconsistently implemented).
12091 (Set_Global_Switches): Set formal mode switches appropriately
12092 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
12094 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
12095 call Set_Error_Msg_Lang to set "spark" as language name.
12096 * par.adb: Remove unnecessary call to set formal language for errout
12097 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
12098 appropriately and call Set_Error_Msg_Lang to set "spark" as language
12100 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
12101 calls to it, moved after resolution so that types are known
12102 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
12103 result of concatenation is not of type String
12104 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
12105 concatenation is not properly restricted
12106 * gnat_rm.texi: Add doc on pragma Spark_95.
12107 * gcc-interface/Makefile.in: Remove obsolete target pairs for
12108 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
12109 * gcc-interface/Make-lang.in: Update dependencies.
12111 2011-08-01 Javier Miranda <miranda@adacore.com>
12113 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
12114 condition that detects if the overridden operation must replace an
12117 2011-08-01 Javier Miranda <miranda@adacore.com>
12119 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
12120 code declarations inserted by Insert_Actions in each alternative of the
12121 N_Case_Expression node.
12123 2011-08-01 Robert Dewar <dewar@adacore.com>
12125 * sem_ch6.adb: Minor code reorganization.
12126 * sem_util.adb: Minor reformatting.
12128 2011-08-01 Pascal Obry <obry@adacore.com>
12130 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
12131 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
12133 2011-08-01 Yannick Moy <moy@adacore.com>
12135 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
12136 literal or operator symbol which is prefixed
12137 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
12138 mode on access attributes.
12139 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
12140 that concatenation operands are properly restricted in formal mode
12141 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
12142 Analyze_Concatenation_Operand. Issue an error in formal mode if the
12143 result of the concatenation has a type different from String.
12144 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
12145 Analyze_Quantified_Expression, Analyze_Slice,
12146 Analyze_Null): issue an error in formal mode on unsupported constructs
12148 (Analyze_Block_Statement): only issue error on source block statement
12149 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
12150 function which returns the last node in a list of nodes for which
12151 Comes_From_Source returns True, if any
12152 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
12153 Last_Source_Node_In_Sequence
12154 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
12155 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
12156 mode on unsupported constructs
12157 * sem_ch9.adb Do not return after issuing error in formal mode, as the
12158 rest of the actions may be needed later on since the error is marked as
12160 * sinfo.ads: Typos in comments.
12162 2011-08-01 Pascal Obry <obry@adacore.com>
12164 * projects.texi: Minor editing.
12166 2011-08-01 Yannick Moy <moy@adacore.com>
12168 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
12169 insertion character ~~
12170 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
12171 (Set_Error_Msg_Lang): new procedure which fixes the language for use
12172 with insertion character ~~
12173 (Set_Msg_Text): treat insertion character ~~
12174 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
12175 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
12176 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
12177 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
12178 errors related to the formal language restriction not serious
12179 (insertion character |).
12180 * par.adb (Par): set formal language for error messages if needed
12181 * sem_ch6.adb (Check_Missing_Return): take into account possible
12182 generated statements at the end of the function
12183 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
12184 enumeration value to define a new pragma SPARK_95
12185 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
12186 SPARK_Version): new type and variables to store the SPARK version
12188 (SPARK_Mode): return True when SPARK_Version is set
12189 * par-prag.adb: Correct indentation
12190 (Prag): take Pragma_SPARK_95 into account
12191 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
12194 2011-08-01 Robert Dewar <dewar@adacore.com>
12196 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
12197 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
12198 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
12200 2011-08-01 Pascal Obry <obry@adacore.com>
12202 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
12203 Target_Name to Get_Path call.
12204 (Parse_Single_Project): Likewise.
12205 (Post_Parse_Context_Clause): Likewise.
12206 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
12207 Call Initialise_Project_Path with the proper Target_Name.
12208 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
12210 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
12211 with the proper Target_Name.
12212 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
12213 Part.Parse routine.
12214 (Parse_Project_And_Apply_Config): Likewise.
12215 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
12216 This is fine as this part of the code is supporting only native
12218 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
12219 is fine as this part of the code is supporting only native compilation.
12221 2011-08-01 Yannick Moy <moy@adacore.com>
12223 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
12224 of homonym, unless the homonym is one of the cases allowed in SPARK
12225 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
12226 package declaration occurring after a body.
12228 2011-08-01 Robert Dewar <dewar@adacore.com>
12230 * checks.adb, exp_ch4.adb: Minor reformatting.
12232 2011-08-01 Javier Miranda <miranda@adacore.com>
12234 * einfo.ads (Access_Disp_Table): Fix documentation.
12235 (Dispatch_Table_Wrappers): Fix documentation.
12237 2011-08-01 Pascal Obry <obry@adacore.com>
12239 * prj-env.adb, prj-env.ads: Minor reformatting.
12241 2011-08-01 Yannick Moy <moy@adacore.com>
12243 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
12244 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
12245 procedures out of these packages.
12246 * errout.ads, errout.adb
12247 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
12248 procedures in of this package
12249 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
12250 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
12251 on misplaced later vs initial declarations, like in Ada 83
12252 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
12253 formal mode on attribute of private type whose full type declaration
12255 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
12256 package declaration inside a package specification
12257 (Analyze_Full_Type_Declaration): issue error in formal mode on
12258 controlled type or discriminant type
12259 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
12260 user-defined operator means that it should come from the source
12261 (New_Overloaded_Entity): issue error in formal mode on overloaded
12263 * sem_ch6.ads, sem_ch13.ads: typos in comments.
12265 2011-08-01 Thomas Quinot <quinot@adacore.com>
12267 * atree.adb: Minor reformatting.
12268 * checks.adb: Minor reformatting.
12270 2011-08-01 Vincent Celier <celier@adacore.com>
12272 * s-parame-vms-ia64.ads: Fix typo in comment
12274 * s-parame-vms-restrict.ads: Removed, unused.
12276 2011-08-01 Javier Miranda <miranda@adacore.com>
12279 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
12281 (Constrain_Index): Remove side effects in the evaluation of the bounds.
12282 * sem_ch3.ads, sem_ch3.adb
12283 (Is_Constant_Bound): New extended version of the subprogram that was
12284 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
12285 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
12286 * sem_aux.ads (Constant_Value): Fix typo in comment.
12287 * checks.adb (Generate_Index_Checks): New implementation which, for
12288 array objects with constant bounds, generates the runtime check
12289 referencing the bounds of the array type. For other cases this routine
12290 provides its previous behavior obtaining such values from the array
12292 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
12294 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
12295 we cannot have semantic interpretations of the new node.
12297 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12299 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
12302 2011-08-01 Arnaud Charlet <charlet@adacore.com>
12304 * sem_ch8.adb: Minor code editing.
12305 * s-vxwext.adb: Remove trailing space.
12306 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
12307 consistency with other files.
12309 2011-08-01 Thomas Quinot <quinot@adacore.com>
12311 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
12313 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12315 * par-ch10.adb: reject parameterized expressions as compilation unit.
12316 * sem_ch4.adb: handle properly conditional expression with overloaded
12317 then_clause and no else_clause.
12319 2011-08-01 Tristan Gingold <gingold@adacore.com>
12321 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
12322 like done by System.Aux_DEC.
12323 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
12325 2011-08-01 Yannick Moy <moy@adacore.com>
12327 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
12328 missing label at end of declaration (subprogram or package)
12329 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
12330 of positional and named parameter association
12331 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
12332 Error_Msg_SP which adds a prefix to the error message giving the name
12333 of the formal language analyzed
12334 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
12335 access result type in subprogram, unconstrained array as result type,.
12336 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
12338 * sem_ch8.adb: Code clean up.
12340 2011-08-01 Javier Miranda <miranda@adacore.com>
12342 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
12343 * einfo.ads (Access_Disp_Table): Fix documentation.
12344 (Dispatch_Table_Wrappers): Fix documentation.
12345 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
12346 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
12347 to enforce the documentation of this attribute.
12348 (Set_Is_Interface): Cleanup the assertion.
12349 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
12350 the Underlying_Type entity before reading attribute Access_Disp_Table.
12351 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
12352 Locate the Underlying_Type before reading attribute Access_Disp_Table.
12353 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
12354 the Underlying_Type entity before reading attribute Access_Disp_Table.
12355 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
12356 Locate the Underlying_Type entity before reading attribute
12359 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12361 * s-poosiz.ads: Additional overriding indicators.
12363 2011-08-01 Yannick Moy <moy@adacore.com>
12365 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
12367 (Analyze_Iteration_Scheme): issue error in formal mode when loop
12368 parameter specification does not include a subtype mark.
12369 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
12370 formal mode on abstract subprogram.
12371 (Analyze_Subprogram_Specification): issue error in formal mode on
12372 user-defined operator.
12373 (Process_Formals): issue error in formal mode on access parameter and
12374 default expression.
12375 * sem_ch9.adb (Analyze_Abort_Statement,
12376 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
12377 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
12378 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
12379 Analyze_Requeue, Analyze_Selective_Accept,
12380 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
12381 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
12382 issue error in formal mode on user-defined raise statement.
12384 2011-08-01 Thomas Quinot <quinot@adacore.com>
12386 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
12387 declaration being hidden when overriding an implicit inherited
12389 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
12390 (-gnats), do not complain about a source file that contains only a
12393 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12395 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
12396 variable if already set.
12398 2011-08-01 Arnaud Charlet <charlet@adacore.com>
12400 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
12401 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
12402 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
12403 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
12404 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
12405 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
12406 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
12407 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
12408 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
12409 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
12410 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
12411 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
12412 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
12413 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
12414 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
12415 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
12416 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
12417 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
12418 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
12419 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
12420 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
12421 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
12422 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
12423 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
12424 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
12425 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
12426 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
12427 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
12428 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
12429 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
12430 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
12431 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
12432 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
12433 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
12434 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
12435 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
12436 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
12437 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
12438 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
12439 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
12440 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
12441 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
12442 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
12443 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
12444 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
12445 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
12446 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
12447 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
12448 s-osinte-mingw.ads: Update to GPLv3 run-time license.
12449 Use GNAT instead of GNARL.
12451 2011-08-01 Bob Duff <duff@adacore.com>
12453 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
12454 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
12455 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
12458 2011-08-01 Yannick Moy <moy@adacore.com>
12460 * debug.adb (d.D) reverve flag for the SPARK mode
12461 (d.E) reverve flag for SPARK generation mode
12462 (d.F) reverve flag for Why generation mode
12463 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
12464 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
12465 functions which return True when the corresponding modes are set
12466 (Formal_Language): return "spark" or "alfa" when in formal verification
12468 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
12469 Error_Msg to prefix the error message with a tag giving the formal
12471 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
12472 message with a tag giving the formal language
12473 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
12475 (Analyze_Case_Statement): issue error in formal mode on case statement
12476 with a single "others" case alternative
12477 (Analyze_Exit_Statement): issue errors in formal mode on exit
12478 statements which do not respect SPARK restrictions
12479 (Analyze_Goto_Statement): issue error in formal mode on goto statement
12480 (Check_Unreachable_Code): always issue an error (not a warning) in
12481 formal mode on unreachable code (concerns both code after an infinite
12482 loop and after an unconditional jump, both not allowed in SPARK)
12483 * sem_ch6.adb (Analyze_Return_Statement): add call to
12484 Set_Return_Present for a procedure containing a return statement
12485 (already done for functions in Analyze_Function_Return)
12486 (Analyze_Function_Return): issue error in formal mode on extended
12487 return or if return is not last statement in function
12488 (Check_Missing_Return): issue error in formal mode if function does
12489 not end with return or if procedure contains a return
12490 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
12491 function to detect if there is an inner scope of its parameter S which
12494 2011-08-01 Thomas Quinot <quinot@adacore.com>
12496 * sem_ch6.ads: Minor reformatting.
12498 2011-08-01 Javier Miranda <miranda@adacore.com>
12500 * sem_util.adb (Abstract_Interface_List): Complete condition when
12501 processing private type declarations to avoid reading unavailable
12503 (Is_Synchronized_Tagged_Type): Complete condition when processing
12504 private extension declaration nodes to avoid reading unavailable
12507 2011-08-01 Thomas Quinot <quinot@adacore.com>
12509 * sem_ch3.adb: Minor reformatting.
12511 2011-08-01 Thomas Quinot <quinot@adacore.com>
12513 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
12514 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
12515 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
12516 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
12517 for VMS, instead parametrize the common implementation with
12518 System.Parameters declarations.
12520 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
12522 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
12524 2011-08-01 Tristan Gingold <gingold@adacore.com>
12526 * seh_init.c: Fix SEH handler installation on win64.
12528 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12530 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
12531 double analysis of an anonymous access to subprogram, because it can
12532 lead to improper sharing of profiles and a back-end crash.
12534 2011-08-01 Robert Dewar <dewar@adacore.com>
12536 * make.adb, sem_ch4.adb: Minor reformatting.
12537 * gcc-interface/Make-lang.in: Update dependencies.
12538 * sem_util.adb, exp_ch5.adb: Minor reformatting.
12540 2011-08-01 Arnaud Charlet <charlet@adacore.com>
12542 * gnat_rm.texi: Fix definition of Long_Integer.
12544 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12546 * exp_aggr.adb: check limit size of static aggregate unconditionally,
12547 to prevent storage exhaustion.
12548 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
12549 finalized is a function body, insert the cleanup code before the final
12550 return statement, to prevent spurious warnings.
12551 * s-pooglo.ads: add overriding indicator.
12553 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12555 * sem_ch4.adb (Operator_Check): improve error message when both a
12556 with_clause and a use_clause are needed to make operator usage legal.
12557 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
12558 determine whether a compilation unit is visible within an other,
12559 either through a with_clause in the current unit, or a with_clause in
12560 its library unit or one one of its parents.
12562 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12564 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
12565 over an arbitrary expression of an array or container type.
12566 * lib-xref.adb: clarify comment.
12568 2011-08-01 Bob Duff <duff@adacore.com>
12570 * einfo.ads: Minor reformatting.
12571 * debug.adb: Minor comment improvement.
12573 2011-08-01 Javier Miranda <miranda@adacore.com>
12575 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
12576 consider hidden subprograms as valid candidates.
12578 2011-08-01 Arnaud Charlet <charlet@adacore.com>
12580 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
12582 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
12584 * gnat_ugn.texi: Fix typo.
12586 2011-08-01 Robert Dewar <dewar@adacore.com>
12588 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
12589 lib-xref.adb: Minor reformatting
12591 2011-08-01 Gary Dismukes <dismukes@adacore.com>
12593 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
12594 when to generate a call to Move_Final_List.
12595 (Has_Controlled_Parts): Remove this function.
12597 2011-08-01 Geert Bosch <bosch@adacore.com>
12599 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
12600 "," in choice list.
12602 2011-08-01 Thomas Quinot <quinot@adacore.com>
12604 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
12605 explicit raise of a predefined exception as Comes_From_Source if the
12606 original N_Raise_Statement comes from source.
12608 2011-08-01 Robert Dewar <dewar@adacore.com>
12610 * sinfo.ads: Add comment.
12611 * sem_ch6.adb: Minor reformatting.
12613 2011-08-01 Robert Dewar <dewar@adacore.com>
12615 * freeze.adb (Freeze_Entity): Refine check for bad component size
12616 clause to avoid rejecting confirming clause when atomic/aliased present.
12618 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12620 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
12621 better determine whether an entity reference is a write.
12622 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
12624 * lib-xref.adb (Output_References): Do no suppress a read reference at
12625 the same location as an immediately preceeding modify-reference, to
12626 handle properly in-out actuals.
12628 2011-08-01 Tristan Gingold <gingold@adacore.com>
12630 * env.c (__gnat_setenv) [VMS]: Refine previous change.
12632 2011-08-01 Quentin Ochem <ochem@adacore.com>
12634 * i-cstrin.adb (New_String): Changed implementation, now uses only the
12635 heap to compute the result.
12637 2011-08-01 Robert Dewar <dewar@adacore.com>
12639 * atree.ads: Minor reformatting.
12641 2011-08-01 Emmanuel Briot <briot@adacore.com>
12643 * g-expect.adb (Get_Command_Output): Fix memory leak.
12645 2011-08-01 Geert Bosch <bosch@adacore.com>
12647 * cstand.adb (P_Float_Type): New procedure to print the definition of
12648 predefined fpt types.
12649 (P_Mixed_Name): New procedure to print a name using mixed case
12650 (Print_Standard): Use P_Float_Type for printing floating point types
12651 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
12652 precision IEEE float.
12654 2011-08-01 Thomas Quinot <quinot@adacore.com>
12656 * sem_ch3.adb: Minor reformatting.
12658 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12660 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
12661 the completion of a generic function, insert the new body rather than
12662 rewriting the original.
12664 2011-08-01 Yannick Moy <moy@adacore.com>
12666 * sinfo.ads, errout.ads: Typos in comments.
12668 2011-08-01 Robert Dewar <dewar@adacore.com>
12670 * par-endh.adb: Minor reformatting.
12672 2011-08-01 Robert Dewar <dewar@adacore.com>
12674 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
12675 (Pre_Post_Aspects): New subtype.
12676 * par-ch12.adb (P_Generic): New syntax for aspects in packages
12677 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
12678 * par-ch7.adb (P_Package): Remove Decl parameter
12679 (P_Package): Handle new syntax for aspects (before IS)
12680 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
12682 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
12683 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
12684 (P_Package): Remove Decl parameter
12685 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
12687 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
12689 * sem_util.ads, sem_util.adb (Static_Boolean): New function
12690 * sinfo.ads: Document new syntax for aspects in packages etc.
12691 * sprint.adb: Handle new syntax of aspects before IS in package
12693 2011-08-01 Thomas Quinot <quinot@adacore.com>
12695 * atree.ads: Minor reformatting.
12696 * sem_prag.adb: Minor reformatting.
12698 2011-08-01 Robert Dewar <dewar@adacore.com>
12700 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
12701 case expr alternative.
12703 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12705 * sem_ch12.adb: Fix typo.
12707 2011-08-01 Geert Bosch <bosch@adacore.com>
12709 * sem_prag.adb (Check_No_Link_Name): New procedure.
12710 (Process_Import_Or_Interface): Use Check_No_Link_Name.
12711 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
12712 instead of Standard_Long_Long_Float_Size global. Preparation for
12713 eventual removal of per type constants.
12714 * exp_util.ads (Get_Stream_Size): New function returning the stream
12715 size value of subtype E.
12716 * exp_util.adb (Get_Stream_Size): Implement new function.
12717 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
12719 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
12721 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
12723 2011-08-01 Geert Bosch <bosch@adacore.com>
12725 * cstand.adb: Fix comments.
12726 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
12727 count of arguments.
12729 2011-08-01 Robert Dewar <dewar@adacore.com>
12731 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
12733 2011-08-01 Geert Bosch <bosch@adacore.com>
12735 * atree.ads: Fix comment.
12737 2011-08-01 Robert Dewar <dewar@adacore.com>
12739 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
12740 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
12741 * par.adb: Add with for Namet.Sp.
12742 * par-tchk.adb: Minor reformatting.
12744 2011-08-01 Vincent Celier <celier@adacore.com>
12746 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
12747 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
12748 of the init procedure of a SAL.
12749 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
12752 2011-08-01 Thomas Quinot <quinot@adacore.com>
12754 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
12757 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12759 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
12761 2011-08-01 Thomas Quinot <quinot@adacore.com>
12763 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
12764 conformant with its spec (return True only for types that have
12765 an overriding Initialize primitive operation that prevents them from
12766 having preelaborable initialization).
12767 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
12768 initialization for controlled types in Ada 2005 or later mode.
12770 2011-08-01 Robert Dewar <dewar@adacore.com>
12772 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
12774 (Same_Aspect): New function.
12775 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
12776 Type_Invariant, Precondition, Postcondition.
12777 * snames.ads-tmpl: Add Name_Type_Invariant.
12779 2011-08-01 Robert Dewar <dewar@adacore.com>
12781 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
12783 (Freeze_All_Ent): Fix error in handling inherited aspects.
12784 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
12785 already analyzed, but don't skip entire processing of a declaration,
12786 that's wrong in some cases of declarations being rewritten.
12787 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
12788 Don't delay for integer, string literals
12789 Treat predicates in usual manner for delay, remove special case code,
12791 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
12792 (Build_Predicate_Function): Update saved expression in aspect
12793 (Build_Invariant_Procedure): Update saved expression in aspect
12794 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
12795 of replacement of discriminant references if the reference is simple.
12797 2011-08-01 Robert Dewar <dewar@adacore.com>
12799 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
12800 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
12801 Static_Predicate and Dynamic_Predicate.
12802 (Build_Predicate_Function): Add processing for Static_Predicate
12803 and Dynamic_Predicate.
12804 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
12805 (From_Static_Predicate): New flag
12806 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
12808 2011-08-01 Robert Dewar <dewar@adacore.com>
12810 * usage.adb: Documentation cleanup for Ada version modes in usage.
12811 * expander.adb: Minor reformatting.
12813 2011-08-01 Robert Dewar <dewar@adacore.com>
12815 * atree.ads: Minor comment fix.
12816 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
12817 a-witeio.ads, sem_prag.adb: Minor reformatting.
12819 2011-08-01 Doug Rupp <rupp@adacore.com>
12821 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
12822 pointers. Use descrip.h header file for convenience. Add some
12825 2011-08-01 Robert Dewar <dewar@adacore.com>
12827 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
12828 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
12829 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
12831 (Check_Aspect_At_End_Of_Declarations): New procedure
12832 (Analye_Aspect_Specification): Minor changes for above procedures
12833 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
12834 specification node as well.
12836 2011-08-01 Pascal Obry <obry@adacore.com>
12838 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
12839 Windows files. Use GetFilesAttributes() in this case to check for file
12840 existence instead of returning with an error code.
12842 2011-08-01 Vincent Celier <celier@adacore.com>
12844 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
12845 High is above Source length.
12847 2011-08-01 Robert Dewar <dewar@adacore.com>
12849 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
12851 2011-08-01 Robert Dewar <dewar@adacore.com>
12853 * aspects.ads (Boolean_Aspects): New subtype.
12854 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
12855 for derived types in cases where the parent type and derived type have
12857 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
12858 with aspects when parent type also has aspects.
12859 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
12860 boolean expression at this point).
12861 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
12862 accordance with final decision on the Ada 2012 feature.
12863 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
12865 2011-08-01 Matthew Heaney <heaney@adacore.com>
12867 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
12869 2011-08-01 Pascal Obry <obry@adacore.com>
12871 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
12872 Fix Replace_Slice when High is above current string size.
12873 (Replace_Slice): Fix DL computation when High is above current
12876 2011-08-01 Gary Dismukes <dismukes@adacore.com>
12878 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
12880 2011-08-01 Matthew Heaney <heaney@adacore.com>
12882 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
12885 2011-08-01 Pascal Obry <obry@adacore.com>
12887 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
12890 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12892 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
12893 access to protected subprograms in generic bodies.
12894 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
12895 protected type, indicate that the convention of the subprogram is
12896 Convention_Protected, because it may be used in subsequent declarations
12897 within the protected declaration.
12899 2011-08-01 Vincent Celier <celier@adacore.com>
12901 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
12902 and "final" procedures when the name of the library is "ada", to avoid
12903 duplicate symbols "adainit" and "adafinal" in executables.
12905 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12907 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
12908 quantified expression that appears within a postcondition and uses the
12909 Ada2012 'Result attribute.
12911 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12913 * init.c (__gnat_error_handler): Cast reason to int.
12914 (__gnat_install_handler): Explain sa_sigaction use.
12916 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
12918 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
12919 subprogram has copy-in copy-out parameters, try to promote the mode of
12920 the return type if it is passed in registers.
12922 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
12924 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
12925 left operand as addressable.
12927 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
12929 * gcc-interface/gigi.h (build_function_stub): Remove.
12930 (build_return_expr): Likewise.
12931 (convert_vms_descriptor): Declare.
12932 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
12933 (build_function_stub): Move to...
12934 * gcc-interface/utils2.c (build_return_expr): Move to...
12935 * gcc-interface/trans.c (build_function_stub): ...here.
12936 (build_return_expr): ...here.
12937 (Subprogram_Body_to_gnu): Add local variable for language_function.
12938 Disconnect the parameter attributes cache, if any, once done with it.
12939 Call end_subprog_body only after setting the end_locus.
12940 Build the stub associated with the function, if any, at the very end.
12941 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
12942 variables and streamline control flow.
12944 2011-07-23 Arnaud Charlet <charlet@adacore.com>
12947 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
12948 g-trasym-dwarf.adb.
12950 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12953 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
12954 Assign to act.sa_sigaction.
12955 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
12956 current->return_address to char * before arithmetic.
12958 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12960 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
12961 Correct argument types.
12962 Extract code from reason.
12963 (__gnat_install_handler): Assign to act.sa_sigaction.
12965 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
12967 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
12968 (GNAT1_OBJS): ...here.
12970 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
12973 * g-socthi-mingw.adb (Fill): Fix formatting.
12975 * gcc-interface/gigi.h: Move around comment.
12977 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
12980 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
12982 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
12985 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
12987 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
12989 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
12990 range comparison if Pmode is SImode.
12992 2011-07-12 Laurent GUERBY <laurent@guerby.net>
12993 Eric Botcazou <ebotcazou@adacore.com>
12995 * adadecode.c: Wrap up in extern "C" block.
12996 * adadecode.h: Likewise.
12997 * adaint.c: Likewise. Remove 'const' keyword.
12998 * adaint.h: Likewise.
12999 * argv.c: Likewise.
13000 * atree.h: Likewise.
13002 * cstreams.c: Likewise.
13004 * exit.c: Likewise.
13006 * final.c: Likewise.
13007 * init.c: Likewise.
13008 * initialize.c: Likewise.
13009 * link.c: Likewise.
13010 * namet.h: Likewise.
13011 * nlists.h: Likewise.
13012 * raise.c: Likewise.
13013 * raise.h: Likewise.
13014 * repinfo.h: Likewise.
13015 * seh_init.c: Likewise.
13016 * targext.c: Likewise.
13017 * tracebak.c: Likewise.
13018 * uintp.h: Likewise.
13019 * urealp.h: Likewise.
13020 * xeinfo.adb: Wrap up generated C code in extern "C" block.
13021 * xsinfo.adb: Likewise.
13022 * xsnamest.adb: Likewise.
13023 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
13024 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
13025 * gcc-interface/misc.c: Likewise.
13026 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
13027 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
13028 ada/targext.o here...
13029 (GNAT_ADA_OBJS): ...and not here.
13030 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
13031 (GNATBIND_OBJS): Reorder.
13033 2011-07-07 Richard Henderson <rth@redhat.com>
13035 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
13036 dwarf2out_frame_init.
13038 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
13040 * gcc-interface/misc.c (gnat_init): Tweak previous change.
13042 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13045 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
13047 2011-07-06 Richard Guenther <rguenther@suse.de>
13049 * gcc-interface/misc.c (gnat_init): Merge calls to
13050 build_common_tree_nodes and build_common_tree_nodes_2.
13051 Re-initialize boolean_false_node.
13053 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
13054 Olivier Hainque <hainque@adacore.com>
13055 Nicolas Setton <setton@adacore.com>
13057 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
13058 the type according to the ARTIFICIAL_P parameter.
13059 (create_type_decl): Likewise.
13060 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
13062 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
13064 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
13065 (gnatbind): Likewise.
13067 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13069 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
13071 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
13073 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
13074 local variable throughout. Remove useless call to Base_Type.
13075 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
13076 Take it also into account for the volatileness of the field. Set the
13077 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
13079 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
13081 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
13082 on a dereference built for a by-ref object if it has an address clause.
13084 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
13086 * einfo.ads (Address_Taken): Document use for the second argument of
13087 Asm_Input and Asm_Output attributes.
13088 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
13089 argument is an entity name, then set Address_Taken on it.
13090 <Attribute_Asm_Output>: Likewise.
13091 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
13092 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
13093 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
13094 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
13096 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
13098 PR middle-end/46500
13099 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
13101 2011-06-14 Joseph Myers <joseph@codesourcery.com>
13103 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
13104 (ada/utils.o): Update dependencies.
13105 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
13106 ../../../libcpp/libcpp.a.
13107 * gcc-interface/utils.c: Include common/common-target.h.
13108 (process_attributes): Use targetm_common.have_named_sections.
13110 2011-06-07 Richard Guenther <rguenther@suse.de>
13112 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
13115 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
13117 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
13118 TREE_THIS_NOTRAP flag.
13120 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
13122 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
13125 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
13127 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
13128 constants whose full view has discriminants specially.
13130 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
13132 * gcc-interface/utils.c: Include diagnostic.h.
13133 (gnat_write_global_declarations): Output debug information for all
13134 global type declarations before finalizing the compilation unit.
13135 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
13137 2011-05-25 Jakub Jelinek <jakub@redhat.com>
13139 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
13141 2011-05-25 Kai Tietz <ktietz@redhat.com>
13143 * adaint.c (__gnat_to_canonical_file_list_next): Use array
13144 initialization instead of const/none-const pointer assignment.
13146 2011-05-24 Joseph Myers <joseph@codesourcery.com>
13148 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
13149 $(EXTRA_GNAT1_OBJS).
13150 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
13151 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
13152 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
13153 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
13154 libcommon-target.a instead of prefix.o.
13156 2011-05-21 Joseph Myers <joseph@codesourcery.com>
13159 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
13161 2011-05-20 Joseph Myers <joseph@codesourcery.com>
13163 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
13164 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
13165 instead of version.o.
13167 2011-05-18 Kai Tietz <ktietz@redhat.com>
13169 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
13170 boolean_false_node instead of integer_zero_node.
13171 (convert_with_check): Likewise.
13172 * gcc-interface/decl.c (choices_to_gnu): Likewise.
13174 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
13176 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
13177 type of the parameter is an unconstrained array, convert the actual to
13178 the type of the formal in the In Out and Out cases as well.
13180 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
13182 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
13183 call build_function_type_array or build_varargs_function_type_array
13185 (create_subprog_type): Don't call build_function_type; call
13186 build_function_type_vec instead.
13188 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
13190 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
13191 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
13192 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
13194 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
13196 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
13198 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
13199 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
13201 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
13203 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
13205 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
13207 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
13208 instead of accessing TYPE_ARG_TYPES directly.
13209 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
13211 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
13214 * gcc-interface/gigi.h (get_variant_part): Declare.
13215 * gcc-interface/decl.c (get_variant_part): Make global.
13216 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
13217 types have the same constant size, are record types and T1 has a
13218 variant part while T2 doesn't.
13220 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
13222 * gcc-interface/utils.c (begin_subprog_body): Do not call
13224 (end_subprog_body): Likewise.
13226 2011-05-04 Richard Guenther <rguenther@suse.de>
13228 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
13230 (pos_to_constructor): Likewise.
13232 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
13233 Eric Botcazou <ebotcazou@adacore.com>
13235 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
13236 of build_function_type. Adjust calls to...
13237 (build_raise_check): ...this. Do not take a void_tree parameter.
13238 Call build_function_type_list instead of build_function_type.
13239 Fix head comment and swap couple of conditional blocks.
13241 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
13243 * gnatvsn.ads (Library_Version): Bump to 4.7.
13244 (Current_Year): Bump to 2011.
13246 2011-04-29 Michael Matz <matz@suse.de>
13248 * gcc-interface/misc.c (gnat_handle_option): Set
13249 warn_maybe_uninitialized.
13251 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
13253 * gnat_ugn.texi (Complexity Metrics Control): Update link to
13254 the Watson/McCabe paper.
13256 2011-04-23 Jim Meyering <meyering@redhat.com>
13258 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
13260 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
13262 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
13265 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
13267 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
13269 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
13270 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
13271 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
13272 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
13273 <all>: Do not set flags on the reused DECL node coming from an alias.
13274 Set DECL_IGNORED_P on the DECL node built for subprograms if they
13275 don't need debug info here...
13276 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
13277 (gigi): Adjust calls to create_subprog_decl.
13278 (build_raise_check): Likewise.
13279 (establish_gnat_vms_condition_handler): Likewise.
13280 (Compilation_Unit_to_gnu): Likewise.
13281 (gnat_to_gnu): Likewise.
13283 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
13285 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
13286 (NO_REORDER_ADAFLAGS): New variable.
13287 (EXTRA_GNATTOOLS): Always define.
13288 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
13289 Clean up and adjust list of files compiled with special options.
13290 * gcc-interface/Make-lang.in: Likewise.
13291 (ada/decl.o): Cosmetical change.
13292 (ada/misc.o): Remove dependency on $(PLUGIN_H).
13294 2011-04-20 Jim Meyering <meyering@redhat.com>
13296 * initialize.c (__gnat_initialize): Remove useless if-before-free.
13298 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
13300 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
13301 $(CFLAGS) on the link line.
13303 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
13305 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
13306 padded type built for the return type if it is unconstrained.
13308 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
13310 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
13312 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
13314 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
13315 before calling TREE_CHAIN.
13316 * gcc-interface/misc.c (gnat_init_ts): New function.
13317 (LANG_HOOKS_INIT_TS): Define.
13319 2011-04-12 Martin Jambor <mjambor@suse.cz>
13321 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
13322 instead of cgraph_node.
13324 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
13326 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
13327 alignment on fields of the RETURN type built for the Copy-In Copy-Out
13330 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
13332 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
13333 of aggregate types that contain a placeholder.
13335 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
13337 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
13339 (handle_type_generic_attribute): Likewise.
13341 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
13344 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
13346 2011-04-04 Kai Tietz <ktietz@redhat.com>
13349 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
13352 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13354 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
13355 type case, do not strip a padding type around the array type.
13357 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13359 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
13362 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13364 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
13365 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
13366 code for -feliminate-unused-debug-types.
13367 (gnat_post_options): Likewise.
13369 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13371 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
13372 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
13375 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13377 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
13378 DECL_ARTIFICIAL flag on enumeration types.
13380 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13382 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
13383 fat pointer types artificial unconditionally.
13384 <E_Array_Subtype>: Attach the base array type as a parallel type if it
13387 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13389 * gcc-interface/gigi.h (get_dummy_type): Declare.
13390 (build_dummy_unc_pointer_types): Likewise.
13391 (finish_fat_pointer_type): Likewise.
13392 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
13393 fat pointer type has been built, complete it in place.
13394 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
13395 and thin pointers. Remove useless variable.
13396 (finish_fat_pointer_type): Make global and move to...
13397 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
13398 (get_dummy_type): New function.
13399 (build_dummy_unc_pointer_types): Likewise.
13400 (gnat_pushdecl): Propage the name to the anonymous variants only.
13401 (update_pointer_to): Only adjust the pointer types in the unconstrained
13404 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13406 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
13407 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
13408 if this is a Taft amendment type and the full declaration is available.
13409 * gcc-interface/trans.c (process_type): Likewise.
13410 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
13411 (process_freeze_entity): Likewise.
13412 * gcc-interface/utils.c (dummy_global): New static variable.
13413 (gnat_write_global_declarations): If there are types declared as used
13414 at the global level, insert them in the global hash table.
13416 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13418 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
13419 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
13420 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
13422 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
13423 flag of the type accordingly.
13424 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
13426 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13428 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
13429 finalizing types when updating the pointers to the designated type.
13430 <all>: Finalize the deferred types even if we didn't defer processing
13431 of incomplete types in this invocation.
13433 2011-04-01 Olivier Hainque <hainque@adacore.com>
13434 Nicolas Setton <setton@adacore.com>
13435 Eric Botcazou <ebotcazou@adacore.com>
13437 * gcc-interface/misc.c (gnat_descriptive_type): New function.
13438 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
13440 2011-03-28 Kai Tietz <ktietz@redhat.com>
13442 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
13444 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
13445 * system-mingw.ads (System): Change ZCX_By_Default default to True.
13447 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
13449 2011-03-28 Tristan Gingold <gingold@adacore.com>
13452 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
13453 Use ada output of gnatbind.
13454 (ada/b_gnatb.adb): Ditto.
13455 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
13456 (ada.mostlyclean, ada.stage1)
13457 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
13458 (ada.stagefeedback): Adjust.
13459 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
13460 Use ada output of gnatbind.
13461 (b_gnatm.adb): Ditto.
13462 (b_gnatl.o, b_gnatm.o): New rules.
13464 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
13466 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
13467 for the padded type built to support a specified size or alignment.
13469 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
13471 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
13472 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
13473 unconditionally to the end of the unit when the designated type is
13475 <all>: Rename local variable. Attempt to un-defer types only and do it
13476 for limited_with'ed types as well.
13477 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
13478 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
13479 consistently and remove redundant call to finalize_from_with_types.
13481 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
13483 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
13484 subprograms without a previous spec declared in the same unit.
13485 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
13486 subprograms at the end of the unit instead of at the beginning.
13487 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
13488 isn't public for the special handling of non-inline functions nested
13489 inside inline external functions.
13491 2011-03-25 Jeff Law <law@redhat.com>
13493 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
13495 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
13497 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
13498 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
13499 to compute Set_Size_Depends_On_Discriminant.
13500 (Layout_Type): Call it on array types in back-end layout mode.
13501 * sem_util.adb (Requires_Transient_Scope): Return true for array
13502 types only if the size depends on the value of discriminants.
13503 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
13504 type if the RHS is a call to a function that returns an unconstrained
13505 type with default discriminant.
13507 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
13509 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
13510 non-conversion to the nominal result type at the end.
13512 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
13514 * gcc-interface/trans.c (create_temporary): New function taken from...
13515 (create_init_temporary): ...here. Call it.
13516 (call_to_gnu): Create the temporary for the return value early, if any.
13517 Create it for a function with copy-in/copy-out parameters if there is
13518 no target; in other cases of copy-in/copy-out, use another temporary.
13519 Push the new binding level lazily. Add and rename local variables.
13521 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
13523 * gcc-interface/decl.c (validate_size): Improve comments and tweak
13525 (set_rm_size): Likewise.
13527 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
13529 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
13530 for the padded type built in order to support a specified alignment.
13531 Fix incorrect formatting.
13533 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
13536 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
13538 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
13540 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
13541 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
13542 to the end of the list. Adjust recursive call. Rename local variable.
13543 If REORDER is true, reorder components of the record type.
13544 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
13545 components_to_record and adjust the parameter list.
13547 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
13549 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
13550 disabled, use the variable for bounds of loop iteration scheme.
13552 2011-03-21 Kai Tietz <ktietz@redhat.com>
13555 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
13557 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
13559 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
13560 out whether the expression is read-only. Short-circuit placeholder
13561 case and rename a couple of local variables.
13563 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
13565 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
13566 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
13567 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
13568 (convert): Deal with conversions from a smaller form type specially.
13570 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
13572 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
13573 its argument, except for the special -I- switch.
13575 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
13577 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
13580 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
13582 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
13584 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
13586 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
13588 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
13589 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
13590 instead of GNAT_FORMAL. Protect the expression against multiple uses.
13591 Do not generate the check directly, instead instantiate the template
13592 check present in the descriptor.
13593 (make_descriptor_field): Move around.
13594 (build_vms_descriptor32): Build a template check in the POINTER field.
13595 (build_vms_descriptor): Remove useless suffixes.
13596 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
13598 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
13601 * targext.c: Include target files if IN_RTS is defined.
13603 2011-01-26 Richard Guenther <rguenther@suse.de>
13606 * targext.c: Include config.h.
13607 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
13610 2011-01-04 Pascal Obry <obry@adacore.com>
13611 Eric Botcazou <ebotcazou@adacore.com>
13613 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
13615 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
13617 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
13618 end-of-case on the end label and its associated gotos, if any.
13620 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
13622 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
13623 expressions of the parameter cache within the statement group of
13624 the CICO mechanism.
13626 2011-01-04 Olivier Hainque <hainque@adacore.com>
13627 Eric Botcazou <ebotcazou@adacore.com>
13629 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
13630 (set_end_locus_from_node): New function.
13631 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
13632 make and the function end_locus.
13633 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
13634 for the elaboration subprogram.
13635 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
13636 set the end_locus of the expression as well.
13638 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
13641 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
13642 variables that are referenced in exception handlers volatile.
13646 Copyright (C) 2011 Free Software Foundation, Inc.
13648 Copying and distribution of this file, with or without modification,
13649 are permitted in any medium without royalty provided the copyright
13650 notice and this notice are preserved.
13652 * gnat_rm.texi: Ramification of pragma Eliminate documentation
13653 - fix bugs in the description of Source_Trace;
13654 - get rid of UNIT_NAME;
13656 2011-08-02 Javier Miranda <miranda@adacore.com>
13659 (Build_Dispatching_Requeue): Adding support for VM targets
13660 since we cannot directly reference the Tag entity.
13661 * exp_sel.adb (Build_K): Adding support for VM targets.
13662 (Build_S_Assignment): Adding support for VM targets.
13664 (Default_Prim_Op_Position): In VM targets do not restrict availability
13665 of predefined interface primitives to compiling in Ada 2005 mode.
13666 (Is_Predefined_Interface_Primitive): In VM targets this service is not
13667 restricted to compiling in Ada 2005 mode.
13668 (Make_VM_TSD): Generate code that declares and initializes the OSD
13669 record. Needed to support dispatching calls through synchronized
13672 (Make_Predefined_Primitive_Specs): Enable generation of predefined
13673 primitives associated with synchronized interfaces.
13674 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
13675 primitives associated with synchronized interfaces.
13677 2011-08-02 Yannick Moy <moy@adacore.com>
13679 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
13680 statements hidden in SPARK if preceded by the HIDE directive
13681 (Parse_Exception_Handlers): mark each exception handler in a sequence of
13682 exception handlers as hidden in SPARK if preceded by the HIDE directive
13683 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
13684 if starting with the HIDE directive
13685 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
13686 starting with the HIDE directive; mark the declarations in a private
13687 part as hidden in SPARK if the private part starts with the HIDE
13689 * restrict.adb, restrict.ads
13690 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
13691 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
13692 argument node belongs to a part which is hidden in SPARK
13693 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
13694 parts in SPARK; protect the possibly costly call to
13695 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
13696 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
13697 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
13698 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
13700 (Scan): recognize special comment starting with '#' and followed by
13701 SPARK keyword "hide" as a HIDE directive.
13703 2011-08-02 Yannick Moy <moy@adacore.com>
13705 * types.ads, erroutc.ads: Minor reformatting.
13707 2011-08-02 Vincent Celier <celier@adacore.com>
13709 * link.c: Add response file support for cross platforms.
13711 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13713 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
13714 in an association, set parent field of copy before partial analysis.
13715 * sem_res.adb (Resolve_Slice): create reference to itype only when
13716 expansion is enabled.
13718 2011-08-02 Yannick Moy <moy@adacore.com>
13720 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
13721 for new flag denoting which subprogram bodies are in ALFA
13722 * restrict.adb, sem_ch7.adb: Update comment
13723 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
13724 sem_ch9.adb, sem_res.adb: Add calls to
13725 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
13726 * sem_ch6.adb (Analyze_Function_Return): add calls to
13727 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
13728 middle of the body, and extended return.
13729 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
13730 False when missing return.
13731 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
13732 to True for subprograms whose spec is in ALFA. Remove later on the flag
13733 on the entity used for a subprogram body when there exists a separate
13735 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
13736 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
13737 False, otherwise do nothing.
13739 2011-08-02 Robert Dewar <dewar@adacore.com>
13741 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
13743 2011-08-02 Yannick Moy <moy@adacore.com>
13745 * sem_ch4.ads: minor formatting.
13747 2011-08-02 Yannick Moy <moy@adacore.com>
13749 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
13750 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
13751 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
13752 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
13753 opt.ads: cleanup of SPARK mode
13755 2011-08-02 Yannick Moy <moy@adacore.com>
13757 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
13759 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
13760 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
13762 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
13763 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
13764 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
13765 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
13767 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
13769 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
13770 functions whose return type is not in ALFA.
13771 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
13773 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
13774 parameter's type is not in ALFA.
13775 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
13778 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13780 * sem_ch6 (Analyze_Expression_Function): treat the function as
13781 Inline_Always, and introduce a subprogram declaration for it when it is
13783 * inline.adb (Add_Inlined_Body): recognize bodies that come from
13784 expression functions, so that the back-end can determine whether they
13785 can in fact be inlined.
13786 * sem_util.adb (Is_Expression_Function): predicate to determine whether
13787 a function body comes from an expression function.
13789 2011-08-02 Gary Dismukes <dismukes@adacore.com>
13791 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
13792 null exclusions to test Can_Never_Be_Null on the anonymous access types
13793 of the formals rather than testing the formals themselves. Exclude this
13794 check in cases where the Old_Formal is marked as a controlling formal,
13795 to avoid issuing spurious errors for bodies completing dispatching
13796 operations (due to the flag not getting set on controlling access
13797 formals in body specs).
13798 (Find_Corresponding_Spec): When checking full and subtype conformance of
13799 subprogram bodies in instances, pass Designated and E in that order, for
13800 consistency with the expected order of the formals (New_Id followed by
13803 2011-08-02 Robert Dewar <dewar@adacore.com>
13805 * sem_ch8.adb: Minor reformatting.
13807 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13809 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
13810 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
13811 primitive operations of class-wide actuals.
13813 2011-08-02 Javier Miranda <miranda@adacore.com>
13815 * exp_atag.ads, exp_atag.adb
13816 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
13817 since its value is implicitly passed in argument Typ.
13818 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
13819 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
13820 Build_Common_Dispatching_Select_Statements.
13822 2011-08-02 Robert Dewar <dewar@adacore.com>
13824 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
13825 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
13826 Minor reformatting.
13828 2011-08-02 Robert Dewar <dewar@adacore.com>
13830 * sem_res.adb: Minor reformatting.
13831 * sem_prag.adb: Minor reformatting.
13833 2011-08-02 Javier Miranda <miranda@adacore.com>
13835 * exp_atag.adb, exp_atags.ads
13836 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
13837 by the tagged type Entity. Required to use this routine in the VM
13838 targets since we do not have available the Tag entity in the VM
13841 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
13842 Ada.Tags has not been previously loaded.
13844 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
13845 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
13847 (Enclosing_Dynamic_Scope): Add missing support to handle the full
13848 view of enclosing scopes. Required to handle enclosing scopes that
13849 are synchronized types whose full view is a task type.
13851 (Build_VM_TSDs): Minor code improvement to avoid generating and
13852 analyzing lists with empty nodes.
13853 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
13854 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
13855 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
13856 (Make_Disp_Timed_Select_Body): Add support for VM targets.
13857 (Make_Select_Specific_Data_Table): Add support for VM targets.
13858 (Make_VM_TSD): Generate code to initialize the SSD structure of
13861 2011-08-02 Yannick Moy <moy@adacore.com>
13863 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
13864 cross-references section in ALI.
13865 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
13866 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
13868 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
13869 subprogram or package entity of a node
13870 (Is_Local_Reference_Type): new function returns True for references
13871 selected in local cross-references.
13872 (Lt): function extracted from Lt in Output_References
13873 (Write_Entity_Name): function extracted from Output_References
13874 (Generate_Definition): generate reference with type 'D' for definition
13875 of objects (object declaration and parameter specification), with
13876 appropriate locations and units, for use in local cross-references.
13877 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
13878 references of type 'I' for initialization in object definition.
13879 (Output_References): move part of function Lt and procedure
13880 Write_Entity_Name outside of the body. Ignore references of types 'D'
13881 and 'I' introduced for local cross-references.
13882 (Output_Local_References): new procedure to output the local
13883 cross-references sections.
13884 (Lref_Entity_Status): new array defining whether an entity is a local
13885 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
13886 with 'I' type when initialization expression is present.
13887 * get_scos.adb, get_scos.ads: Correct comments and typos
13889 2011-08-02 Javier Miranda <miranda@adacore.com>
13891 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
13893 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
13895 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
13898 2011-08-02 Vincent Celier <celier@adacore.com>
13900 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
13901 (No_Space_Img): New function
13902 (Find_Excluded_Sources): When reading from a file, record the file name
13903 and the line number for each excluded source.
13904 (Mark_Excluded_Sources): When reporting an error, if the excluded
13905 sources were read from a file, include file name and line number in
13908 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13910 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
13912 2011-08-02 Robert Dewar <dewar@adacore.com>
13914 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
13916 2011-08-02 Javier Miranda <miranda@adacore.com>
13918 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
13919 generation of TSDs to the DOTNET compiler.
13920 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
13921 generation of TSDs to the DOTNET compiler.
13923 2011-08-02 Javier Miranda <miranda@adacore.com>
13925 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
13926 record of all the tagged types declared inside library level package
13927 declarations, library level package bodies or library level subprograms.
13928 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
13929 associated with a given tagged type.
13930 (Build_VM_TSDs): New subprogram.
13931 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
13932 compilation units that are subprograms.
13933 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
13934 compilation units that are package bodies.
13935 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
13936 units that are a package declaration or a package instantiation.
13937 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
13938 reorganization to improve the error generated by the frontend when the
13939 function Ada.Tags.Secondary_Tag is not available.
13940 * rtsfind.ads (RE_Register_TSD): New runtime entity.
13941 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
13943 2011-08-02 Javier Miranda <miranda@adacore.com>
13945 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
13947 2011-08-02 Robert Dewar <dewar@adacore.com>
13949 * s-imenne.ads: Minor reformatting.
13951 2011-08-02 Robert Dewar <dewar@adacore.com>
13953 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
13954 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
13955 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
13957 2011-08-02 Robert Dewar <dewar@adacore.com>
13959 * einfo.ads (Materialize_Entity): Document this is only for renamings
13960 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
13961 required debug information in the case where we transform the object
13962 declaration into a renaming declaration.
13963 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
13965 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
13966 Materialize_Entity.
13968 2011-08-02 Robert Dewar <dewar@adacore.com>
13970 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
13971 Suppress_Init_Procs.
13972 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
13973 Suppress_Initialization/Initialization_Suppressed.
13974 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
13975 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
13976 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
13977 * sem_prag.adb: New processing for pragma Suppress_Initialization.
13979 2011-08-02 Robert Dewar <dewar@adacore.com>
13981 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
13982 Minor reformatting.
13984 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13986 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
13987 only have inheritable classwide pre/postconditions.
13989 2011-08-02 Javier Miranda <miranda@adacore.com>
13991 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
13992 * rtsfind.ads (RE_Check_TSD): New runtime entity.
13993 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
13994 checks if the external tag of a type is the same as the external tag
13995 of some other declaration.
13997 2011-08-02 Thomas Quinot <quinot@adacore.com>
13999 * s-taskin.ads: Minor reformatting.
14001 2011-08-02 Emmanuel Briot <briot@adacore.com>
14003 * g-comlin.adb (Display_Help): swap the order in which it prints the
14004 short help and the general usage.
14006 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14008 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
14009 the aspect declarations and attach them to the generic copy for
14010 subsequent analysis.
14011 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
14012 declarations of the generic tree to the new subprogram declarations.
14013 * sem_attr.adb (Check_Precondition_Postcondition): recognize
14014 conditions that apply to a subprogram instance.
14016 2011-08-02 Robert Dewar <dewar@adacore.com>
14018 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
14020 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14022 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
14023 private type with a tagged full view is not derived in the immediate
14024 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
14026 2011-08-02 Robert Dewar <dewar@adacore.com>
14028 * exp_ch4.adb: Minor reformatting.
14030 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14032 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
14033 Ada2012 iterator, the loop will be rewritten during expansion into a
14034 while loop with a cursor and an element declaration. Do not analyze the
14035 body in this case, because if the container is for indefinite types the
14036 actual subtype of the elements will only be determined when the cursor
14037 declaration is analyzed.
14039 2011-08-02 Arnaud Charlet <charlet@adacore.com>
14041 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
14042 size/alignment related attributes in CodePeer_Mode.
14044 2011-08-02 Gary Dismukes <dismukes@adacore.com>
14046 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
14047 Prepend_Element, since this can result in the operation getting the
14048 wrong slot in the full type's dispatch table if the full type has
14049 inherited operations. The incomplete type's operation will get added
14050 to the proper position in the full type's primitives
14051 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
14052 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
14053 dispatching operations, since there are cases where nonprimitive
14054 subprograms can get added to the list of incomplete dependents (such
14055 as subprograms in nested packages).
14056 * sem_ch6.adb (Process_Formals): First, remove test for being in a
14057 private part when determining whether to add a primitive with a
14058 parameter of a tagged incomplete type to the Private_Dependents list.
14059 Such primitives can also occur in the visible part, and should not have
14060 been excluded from being private dependents.
14061 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
14062 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
14063 list of a Taft-amendment incomplete type is a primitive before issuing
14064 an error that the full type must appear in the same unit. There are
14065 cases where nonprimitives can be in the list (such as subprograms in
14067 * sem_disp.adb (Derives_From): Use correct condition for checking that
14068 a formal's type is derived from the type of the corresponding formal in
14069 the parent subprogram (the condition was completely wrong). Add
14070 checking that was missing for controlling result types being derived
14071 from the result type of the parent operation.
14073 2011-08-02 Yannick Moy <moy@adacore.com>
14075 * errout.adb (First_Node): minor renaming
14076 * restrict.adb (Check_Formal_Restriction): put restriction warning on
14079 2011-08-02 Yannick Moy <moy@adacore.com>
14081 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
14082 before accessing operands.
14083 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
14084 decide whether an initialization expression respects SPARK rules, as
14085 the plain node is the expanded one. This allows for more valid warnings
14087 * gnat_rm.texi: Minor update.
14089 2011-08-02 Arnaud Charlet <charlet@adacore.com>
14091 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
14094 2011-08-02 Robert Dewar <dewar@adacore.com>
14096 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
14098 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
14100 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
14101 loop statements and the element renaming declaration with a block when
14102 the element type is controlled.
14104 2011-08-02 Yannick Moy <moy@adacore.com>
14106 * sinfo.ads: Minor formatting.
14108 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14110 * sem_aggr.adb (Add_Association): if the association has a box and no
14111 expression, use the Sloc of the aggregate itself for the new
14113 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
14116 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
14118 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
14119 When a container is provided via a function call, generate a renaming
14120 of the function result. This avoids the creation of a transient scope
14121 and the premature finalization of the container.
14122 * exp_ch7.adb (Is_Container_Cursor): Removed.
14123 (Wrap_Transient_Declaration): Remove the supression of the finalization
14124 of the list controller when the declaration denotes a container cursor,
14127 2011-08-02 Yannick Moy <moy@adacore.com>
14129 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
14130 node is from source, instead of the original node being from source.
14132 (Resolve_Array_Aggregate): refine the check for a static expression, to
14133 recognize also static ranges
14134 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
14135 Array_Type_Declaration): postpone the test for the type being a subtype
14136 mark after the type has been resolved, so that component-selection and
14137 expanded-name are discriminated.
14138 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
14139 to distinguish the case of an iteration scheme, so that an error is
14140 issed on a non-static range in SPARK except in an iteration scheme.
14141 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
14142 In_Iter_Schm = True.
14143 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
14144 user-defined operators so that they are allowed in renaming
14146 (Find_Selected_Component): refine the check for prefixing of operators
14147 so that they are allowed in renaming. Move the checks for restrictions
14148 on selector name after analysis discriminated between
14149 component-selection and expanded-name.
14150 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
14151 concatenation argument of string type if it is static.
14152 * sem_util.adb, sem_util.ads
14153 (Check_Later_Vs_Basic_Declarations): add a new function
14154 Is_Later_Declarative_Item to decice which declarations are allowed as
14155 later items, in the two different modes Ada 83 and SPARK. In the SPARK
14156 mode, add that renamings are considered as later items.
14157 (Enclosing_Package): new function to return the enclosing package
14158 (Enter_Name): correct the rule for homonyms in SPARK
14159 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
14160 from source (result of expansion) to avoid issuing wrong warnings.
14162 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14164 * errout.adb: On anything but an expression First_Node returns its
14167 2011-08-02 Pascal Obry <obry@adacore.com>
14169 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
14171 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
14173 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
14174 Set the associated loop as the related expression of internally
14176 * exp_ch7.adb (Is_Container_Cursor): New routine.
14177 (Wrap_Transient_Declaration): Supress the finalization of the list
14178 controller when the declaration denotes a container cursor.
14180 2011-08-02 Yannick Moy <moy@adacore.com>
14182 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
14184 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
14185 expression is a simple expression. This check cannot be performed in
14186 the semantics, so just drop it.
14187 (P_Index_Or_Discriminant_Constraint): move check that the index or
14188 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
14189 semantics. Other cases were previously checked in the semantics.
14190 * par-ch4.adb (P_Name): move checks that a selector name is not
14191 character literal or an operator symbol to Find_Selected_Component in
14193 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
14194 declarations are not placed after later declarations in a separate
14195 procedure in Sem_Util (possibly not the best choice?), to be used both
14196 during parsing, for Ada 83 mode, and during semantic analysis, for
14198 * par-endh.adb (Check_End): move check that end label is not missing
14199 to Process_End_Label in the semantics
14200 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
14201 the special case for SPARK restriction
14202 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
14203 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
14204 parameter Force to issue the error message even on internal node (used
14205 for generated end label). Call Check_Restriction to check when an error
14206 must be issued. In SPARK mode, issue an error message even if the
14207 restriction is not set.
14208 (Check_Restriction): new procedure with an additional out parameter to
14209 inform the caller that a message has been issued
14210 * sem_aggr.adb: Minor modification of message
14211 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
14212 instead of issuing an error message directly
14213 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
14214 declarations are not placed after later declarations, by calling
14215 Check_Later_Vs_Basic_Declarations
14216 (Analyze_Subtype_Declaration): move here the check that an index or
14217 discriminant constraint must be a subtype mark. Change the check that
14218 a subtype of String must start at one so that it works on subtype marks.
14219 * sem_ch4.adb (Analyze_Call): move here the check that a named
14220 association cannot follow a positional one in a call
14221 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
14222 instead of issuing an error message directly
14223 * sem_ch8.adb (Find_Selected_Component): move here the check that a
14224 selector name is not a character literal or an operator symbol. Move
14225 here the check that the prefix of an expanded name cannot be a
14226 subprogram or a loop statement.
14227 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
14228 procedure called from parsing and semantics to check that basic
14229 declarations are not placed after later declarations
14230 (Process_End_Label): move here the check that end label is not missing
14232 2011-08-02 Arnaud Charlet <charlet@adacore.com>
14234 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
14235 representation clause in codepeer mode, since it confuses CodePeer and
14236 does not bring useful info.
14238 2011-08-02 Ed Falis <falis@adacore.com>
14240 * init.c: initialize fp hw on MILS.
14242 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14244 * errout.adb (First_Node): for bodies, return the node itself (small
14245 optimization). For other nodes, do not check source_unit if the node
14246 comes from Standard.
14248 2011-08-02 Robert Dewar <dewar@adacore.com>
14250 * exp_ch3.adb: Minor comment additions.
14251 * sem_ch13.adb: Minor reformatting.
14253 2011-08-02 Pascal Obry <obry@adacore.com>
14255 * make.adb, makeutl.adb: Removes some superfluous directory separator.
14257 2011-08-02 Robert Dewar <dewar@adacore.com>
14259 * sem_attr.adb: Minor reformatting.
14261 2011-08-02 Robert Dewar <dewar@adacore.com>
14263 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
14264 (Has_Default_Component_Value): Removed
14265 * einfo.ads Comment updates
14266 (Has_Default_Aspect): Replaces Has_Default_Value
14267 (Has_Default_Component_Value): Removed
14269 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
14271 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
14272 (Get_Simple_Init_Val): Handle Default_Value aspect
14273 (Needs_Simple_Initialization): Handle Default_Value aspect
14274 * exp_ch3.ads: Needs_Simple_Initialization
14275 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
14276 * par-prag.adb (Pragma_Default[_Component]Value) Removed
14278 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
14279 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
14280 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
14282 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14284 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
14285 package containing iteration primitives.
14286 exp_ch5.adb (Expand_Iterator_Loop): ditto.
14288 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14290 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
14291 "of", pre-analyze expression in case it is a function call with
14292 finalization actions that must be placed ahead of the loop.
14293 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
14294 on an Ada2012 iterator, insert them ahead of the rewritten loop.
14296 2011-08-02 Geert Bosch <bosch@adacore.com>
14298 * cstand.adb (Create_Float_Types): Only consider C's long double for
14299 Long_Long_Float, in addition to double.
14301 2011-08-02 Robert Dewar <dewar@adacore.com>
14303 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
14304 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
14305 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
14306 Minor reformatting.
14308 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14310 * sem_attr.adb: handle properly 'Result when it is a prefix of an
14313 2011-08-02 Javier Miranda <miranda@adacore.com>
14315 * einfo.ads, einfo.adb
14316 (Original_Access_Type): Move this attribute to Node26 since there was
14317 an undocumented use of Node21 in E_Access_Subprogram_Type entities
14318 which causes conflicts and breaks the generation of the .NET compiler.
14319 (Interface_Name): Add missing documentation on JGNAT only uses of
14322 2011-08-02 Geert Bosch <bosch@adacore.com>
14324 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
14325 (Find_Back_End_Float_Type): Likewise
14326 (Create_Back_End_Float_Types): Likewise
14327 (Create_Float_Types): Likewise
14328 (Register_Float_Type): Likewise
14329 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
14330 Nlist and split out type selection in new local Find_Base_Type function.
14331 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
14333 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
14335 2011-08-02 Robert Dewar <dewar@adacore.com>
14337 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
14339 * opt.ads: Minor comment change.
14340 * sem_ch12.adb: Minor code reorganization.
14342 2011-08-02 Gary Dismukes <dismukes@adacore.com>
14344 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
14345 subtype's list of rep items to the list on the full subtype in the case
14346 where the lists are the same.
14348 2011-08-02 Geert Bosch <bosch@adacore.com>
14350 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
14351 using the one from System.Strings, which also deallocates all strings.
14353 2011-08-02 Geert Bosch <bosch@adacore.com>
14355 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
14357 * gcc-interface/Make-lang.in: Update dependencies.
14359 2011-08-02 Olivier Hainque <hainque@adacore.com>
14361 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
14364 2011-08-02 Javier Miranda <miranda@adacore.com>
14366 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
14367 associated with anonymous access to subprograms.
14369 2011-08-02 Geert Bosch <bosch@adacore.com>
14372 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
14373 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
14374 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
14375 (Add_Symbol_Definition): Move to switch-c.adb
14376 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
14377 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
14378 (Add_Symbol_Definition): Move to switch-c.adb.
14379 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
14381 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
14382 Move to warnsw.adb.
14383 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
14384 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
14385 Move to warnsw.adb.
14386 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
14387 (Add_Symbol_Definition): Moved from Prepcomp.
14388 * switch-c.ads: Update copyright notice. Use String_List instead of
14389 Argument_List, removing dependency on System.OS_Lib.
14391 2011-08-02 Yannick Moy <moy@adacore.com>
14393 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
14394 mode on initialization expression which does not respect SPARK
14396 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
14397 if the tree referenced by its argument represents an initialization
14398 expression in SPARK, suitable for initializing an object in an object
14401 2011-08-02 Javier Miranda <miranda@adacore.com>
14403 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
14404 internally generated access to subprogram with its associated protected
14406 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
14408 2011-08-02 Geert Bosch <bosch@adacore.com>
14410 * cstand.adb (Register_Float_Type): Print information about type to
14411 register, if the Debug_Flag_Dot_B is set.
14412 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
14413 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
14414 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
14415 with a requested precision of more than Max_Digits digits and no more
14416 than Max_Base_Digits digits, if a range specification is present and the
14417 Predefined_Float_Types list has a suitable type to derive from.
14418 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
14419 case of type completion with pragma Import
14421 (Process_Import_Predefined_Type): Processing to complete a type
14422 with pragma Import. Currently supports floating point types only.
14423 (Set_Convention_From_Pragma): Do nothing without underlying type.
14424 (Process_Convention): Guard against absence of underlying type,
14425 which may happen when importing incomplete types.
14426 (Process_Import_Or_Interface): Handle case of importing predefined
14427 types. Tweak error message.
14429 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
14431 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
14432 functions to previous change. Reorganize code slightly.
14434 2011-08-02 Geert Bosch <bosch@adacore.com>
14436 * back_end.ads (Register_Type_Proc): New call back procedure type for
14437 allowing the back end to provide information about available types.
14438 (Register_Back_End_Types): New procedure to register back end types.
14439 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
14441 * cstand.adb (Back_End_Float_Types): New list for floating point types
14442 supported by the back end.
14443 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
14444 (Copy_Float_Type): New procedure to make new copies of predefined types.
14445 (Register_Float_Type): New call back procedure to populate the BEFT list
14446 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
14447 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
14448 (Create_Float_Types): New procedure to create entities for floating
14449 point types predefined in Standard, and put these and any remaining
14450 BEFTs on the Predefined_Float_Types list.
14451 * stand.ads (Predefined_Float_Types): New list for predefined floating
14452 point types that do not have declarations in package Standard.
14454 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
14456 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
14457 entity node for the unit containing the parameter.
14458 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
14459 (Add_Inlined_Subprogram): Likewise.
14460 * gcc-interface/Make-lang.in: Update dependencies.
14462 2011-08-02 Thomas Quinot <quinot@adacore.com>
14464 * s-stusta.adb (Print): Make sure Pos is always initialized to a
14467 2011-08-02 Geert Bosch <bosch@adacore.com>
14469 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
14471 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
14473 * sem_type.adb (Covers): Move trivial case to the top and reuse the
14474 computed value of Base_Type.
14476 2011-08-02 Yannick Moy <moy@adacore.com>
14478 * restrict.adb (Check_Restriction): issue an error for any use of
14479 class-wide, even if the No_Dispatch restriction is not set.
14480 * sem_aggr.adb: Correct typos in comments and messages in formal mode
14481 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
14482 when completing a private extension, the type named in the private part
14483 is not the same as that named in the visible part.
14484 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
14485 of an inherited primitive operations of a tagged type or type extension
14486 that returns the tagged type.
14487 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
14488 function which returns True for an implicit operation inherited by the
14489 derived type declaration for the argument type.
14490 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
14493 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14495 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
14496 Process_Bounds, to perform analysis with expansion of a range or an
14497 expression that is the iteration scheme for a loop.
14498 (Analyze_Iterator_Specification): If domain of iteration is given by a
14499 function call with a controlled result, as is the case if call returns
14500 a predefined container, ensure that finalization actions are properly
14502 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
14504 2011-08-02 Javier Miranda <miranda@adacore.com>
14506 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
14507 * gcc-interface/Make-lang.in: Update dependencies.
14509 2011-08-02 Javier Miranda <miranda@adacore.com>
14511 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
14512 determine if the analysis is performed using N or Original_Node (N).
14513 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
14514 functionality of routine Is_Variable avoids code duplication.
14515 * checks.adb (Determine_Range): Handle temporaries generated by
14516 Remove_Side_Effects.
14518 2011-08-02 Javier Miranda <miranda@adacore.com>
14520 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
14521 expansion of the condition. Required since the previous analysis was
14522 done with expansion disabled (see Resolve_Quantified_Expression) and
14523 hence checks were not inserted and record comparisons have not been
14526 2011-08-02 Ed Falis <falis@adacore.com>
14528 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
14531 2011-08-02 Bob Duff <duff@adacore.com>
14533 * opt.ads: Minor comment fix.
14535 2011-08-02 Bob Duff <duff@adacore.com>
14537 * sem_ch12.adb (Analyze_Package_Instantiation,
14538 Analyze_Subprogram_Instantiation): Turn off style checking while
14539 analyzing an instance. Whatever style checks that apply to the generic
14540 unit should apply, so it makes no sense to apply them in an instance.
14541 This was causing trouble when compiling an instance of a runtime
14542 unit that violates the -gnatyO switch.
14543 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
14544 one of the two case statements, causing spurious errors.
14546 2011-08-02 Robert Dewar <dewar@adacore.com>
14548 * uname.adb: Minor reformatting.
14549 * gnatcmd.adb: Minor reformatting.
14550 * exp_attr.adb: Minor reformatting.
14552 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14554 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
14555 No_Dispatching_Calls, do not look for the Assign primitive, because
14556 predefined primitives are not created in this case.
14558 2011-08-02 Bob Duff <duff@adacore.com>
14560 * stylesw.ads: Minor comment fixes.
14562 2011-08-02 Robert Dewar <dewar@adacore.com>
14564 * freeze.adb (Add_To_Result): New procedure.
14566 2011-08-02 Jose Ruiz <ruiz@adacore.com>
14568 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
14569 time, if the specific run-time routines for handling streams of strings
14570 are not available, use the default mechanism.
14572 2011-08-02 Arnaud Charlet <charlet@adacore.com>
14574 * s-regpat.ads: Fix typo.
14576 2011-08-02 Vincent Celier <celier@adacore.com>
14578 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
14579 not null, call it to create the in memory config project file without
14580 parsing an existing default config project file.
14582 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
14584 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
14586 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14588 * sem_elim.adb: an abstract subprogram does not need an eliminate
14589 pragma for its descendant to be eliminable.
14591 2011-08-02 Ed Falis <falis@adacore.com>
14593 * init.c: revert to handling before previous checkin for VxWorks
14594 * s-intman-vxworks.adb: delete unnecessary declarations related to
14595 using Ada interrupt facilities for handling signals.
14596 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
14597 * s-intman-vxworks.ads: Import __gnat_install_handler as
14598 Initialize_Interrupts.
14599 * s-taprop-vxworks.adb: Delete Signal_Mask.
14600 (Abort_Handler): change construction of mask to unblock exception
14603 2011-08-02 Jerome Guitton <guitton@adacore.com>
14605 * a-except-2005.adb (Raise_From_Signal_Handler): Call
14606 Debug_Raise_Exception before propagation starts.
14608 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
14610 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
14611 to Restriction_Check_Required.
14612 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
14613 * sem_res.adb (Resolve_Call): Likewise.
14614 * sem_attr.adb (Check_Stream_Attribute): Likewise.
14616 2011-08-02 Bob Duff <duff@adacore.com>
14618 * stylesw.ads: Update comment.
14619 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
14620 * errout.ads: Remove obsolete comment.
14622 2011-08-02 Javier Miranda <miranda@adacore.com>
14624 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
14625 (Set_Is_Safe_To_Reevaluate): new procedure.
14626 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
14627 assignment is allowed on safe-to-reevaluate variables.
14628 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
14629 temporary created to remove side effects in expressions that use
14630 the secondary stack as safe-to-reevaluate.
14631 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
14632 variables that are not true constants.
14634 2011-08-02 Robert Dewar <dewar@adacore.com>
14636 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
14637 sem_res.adb, sem_ch6.adb: Minor reformatting.
14639 2011-08-02 Jerome Guitton <guitton@adacore.com>
14641 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
14643 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14645 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
14646 not set Overridden_Operation if subprogram is an initialization
14649 2011-08-02 Yannick Moy <moy@adacore.com>
14651 * par-ch6.adb: Correct obsolete name in comments
14652 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
14653 which takes two message arguments (existing function takes one), with
14654 second message used for continuation.
14655 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
14656 block statements that originate from a source block statement, not
14657 generated block statements
14658 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
14659 symmetry with procedure case
14660 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
14661 function to issue an error in formal mode if a package specification
14662 contains more than one tagged type or type extension.
14663 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
14664 parameters matching formals of tagged types are objects (or ancestor
14665 type conversions of objects), not general expressions. Issue an error
14666 on view conversions that are not involving ancestor conversion of an
14668 (Resolve_Type_Conversion): in formal mode, issue an error on the
14669 operand of an ancestor type conversion which is not an object
14670 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
14671 procedure so that it works also for actuals of function calls
14672 (Is_Actual_Tagged_Parameter): new function which determines if its
14673 argument is an actual parameter of a formal of tagged type in a
14675 (Is_SPARK_Object_Reference): new function which determines if the tree
14676 referenced by its argument represents an object in SPARK
14678 2011-08-02 Robert Dewar <dewar@adacore.com>
14680 * sem_ch3.adb: Minor reformatting
14681 Minor comment addition
14682 Minor error msg text change
14684 2011-08-02 Javier Miranda <miranda@adacore.com>
14686 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
14687 function. Used to be more precise when we generate a variable plus one
14688 assignment to remove side effects in the evaluation of the Bound
14690 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
14691 of the bound expression to force its re-analysis and thus expand the
14692 associated transient scope (if required). Code cleanup replacing the
14693 previous code that declared the constant entity by an invocation to
14694 routine Force_Evaluation which centralizes this work in the frontend.
14696 2011-08-02 Robert Dewar <dewar@adacore.com>
14698 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
14699 (Base_Type): Now uses improved Is_Base_Type function
14700 * einfo.ads (Base_Type): Inline this function
14702 2011-08-02 Robert Dewar <dewar@adacore.com>
14704 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
14705 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
14707 2011-08-02 Arnaud Charlet <charlet@adacore.com>
14709 * gcc-interface/Make-lang.in: Update dependencies.
14710 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
14713 2011-08-02 Yannick Moy <moy@adacore.com>
14715 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
14716 non-simple expression used in delta constraint
14717 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
14718 index constraint which is not a subtype mark
14719 * par.adb: With and use Restrict
14720 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
14721 mode on component type which is not a subtype mark and default
14722 expression on component
14723 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
14724 of string which does not have a lower index bound equal to 1
14725 (Array_Type_Declaration): issue an error in formal mode on index or
14726 component type which is not a subtype mark, and on aliased keyword on
14728 (Derived_Type_Declaration): issue an error in formal mode on interface,
14729 limited or abstract type
14730 (Record_Type_Declaration): issue an error in formal mode on interface
14731 (Record_Type_Definition): issue an error in formal mode on tagged types
14732 and type extensions not declared in the specification of a library unit
14733 package; on null non-tagged record; on variant part
14735 2011-08-02 Vincent Celier <celier@adacore.com>
14737 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
14738 not declared for qualified library project when Library_Name is not
14739 declared, but Library_Dir is.
14741 2011-08-02 Robert Dewar <dewar@adacore.com>
14743 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
14744 pragmas (affects aspects [Component_]Default_Value
14745 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
14746 component type for the resolution
14748 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
14750 * einfo.adb (Base_Type): Tune implementation for speed.
14752 2011-08-02 Robert Dewar <dewar@adacore.com>
14754 * freeze.adb: Minor reformatting.
14756 2011-08-02 Thomas Quinot <quinot@adacore.com>
14758 * scos.ads: Update comments.
14760 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14762 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
14763 base type, because the parent may be a subtype of a private type whose
14764 convention is established in a private part.
14766 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
14768 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
14769 statement in a block when the expansion of the return expression has
14770 created a finalization chain.
14771 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
14772 with the parent node.
14773 Add N_Extended_Return_Statement to handle the case where a transient
14774 object declaration appears in the Return_Object_Declarations list of
14775 an extended return statement.
14777 2011-08-02 Matthew Gingell <gingell@adacore.com>
14779 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
14780 unused parameter 'name'.
14782 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14784 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
14785 inherited operation, check whether its alias, which is the source
14786 operastion that it renames, has been marked eliminated.
14788 2011-08-02 Javier Miranda <miranda@adacore.com>
14790 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
14791 in-mode parameter whose type is an access type since it can be used to
14792 modify its designated object. Enforce code that handles as safe an
14793 access type that is not access-to-constant but it is the result of a
14794 previous removal of side-effects.
14795 (Remove_Side_Effects): Minor code reorganization of cases which require
14796 no action. Done to incorporate documentation on new cases uncovered
14797 working in this ticket: no action needed if this routine was invoked
14798 too early and the nodes are not yet decorated.
14799 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
14800 to routine Remove_Side_Effects by calls to Force_Evaluation since they
14801 were issued with actuals that are implicitly provided by
14804 2011-08-02 Robert Dewar <dewar@adacore.com>
14806 * sem_ch3.adb, sem_res.adb: Minor reformatting.
14808 2011-08-02 Yannick Moy <moy@adacore.com>
14810 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
14811 to issue an error in formal mode on attribute not supported in this mode
14812 (Analyze_Attribute): issue errors on standard attributes not supported
14814 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
14815 comment, and issue error in formal mode on modulus which is not a power
14817 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
14819 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
14821 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
14822 operator on modular type (except 'not').
14824 2011-08-02 Robert Dewar <dewar@adacore.com>
14826 * gnat_rm.texi: Minor reformatting.
14828 2011-08-02 Arnaud Charlet <charlet@adacore.com>
14830 * s-osinte-linux.ads: Minor comment update and reformatting.
14831 * i-cexten.ads: Make this unit pure, as for its parent.
14832 Will allow its usage in more contexts if needed.
14834 2011-08-02 Robert Dewar <dewar@adacore.com>
14836 * s-utf_32.ads: Minor comment fix.
14838 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14840 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
14841 operation of a tagged synchronized type, handle the case where the
14842 controlling argument is overloaded.
14844 2011-08-02 Yannick Moy <moy@adacore.com>
14846 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
14847 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
14848 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
14849 SPARK mode and formal verification mode on processing SPARK restriction
14850 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
14851 requiring consistency checking.
14853 2011-08-02 Robert Dewar <dewar@adacore.com>
14855 * sem_res.adb: Minor reformatting.
14857 2011-08-02 Robert Dewar <dewar@adacore.com>
14859 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
14860 a-cforse.ads: Remove unneeded with of Ada.Containers
14861 Remove commented out pragma Inline's
14862 Move specifications of new subprograms to the actual specs
14864 2011-08-02 Yannick Moy <moy@adacore.com>
14866 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
14867 a-cforse.ads: Update comments.
14869 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14871 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
14873 2011-08-02 Robert Dewar <dewar@adacore.com>
14875 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
14876 a-cforse.ads, a-cofove.ads: Minor reformatting.
14878 2011-08-02 Claire Dross <dross@adacore.com>
14880 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
14881 a-cofove.ads: Add comments.
14883 2011-08-02 Yannick Moy <moy@adacore.com>
14885 * gnat_rm.texi: Document formal containers.
14887 2011-08-02 Emmanuel Briot <briot@adacore.com>
14889 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
14890 are empty sections.
14892 2011-08-02 Robert Dewar <dewar@adacore.com>
14894 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
14897 2011-08-02 Robert Dewar <dewar@adacore.com>
14899 * aspects.adb: New aspects Default_Value and Default_Component_Value
14900 New format of Aspect_Names table checks for omitted entries
14901 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
14902 handling of boolean aspects for derived types.
14903 New aspects Default_Value and Default_Component_Value
14904 New format of Aspect_Names table checks for omitted entries
14905 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
14906 (Has_Default_Value): New flag
14907 (Has_Default_Component_Value): New flag
14908 (Has_Default_Value): New flag
14909 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
14911 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
14912 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
14913 Default_Value and Default_Component_Value
14914 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
14915 New aspects Default_Value and Default_Component_Value
14916 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
14917 * sprint.adb: Print N_Aspect_Specification node when called from gdb
14919 2011-08-02 Vincent Celier <celier@adacore.com>
14921 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
14922 inherit library kind.
14924 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14926 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
14927 Minor reformatting.
14929 2011-08-02 Robert Dewar <dewar@adacore.com>
14931 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
14933 2011-08-02 Yannick Moy <moy@adacore.com>
14935 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
14937 2011-08-02 Robert Dewar <dewar@adacore.com>
14939 * impunit.adb: Add comment.
14941 2011-08-02 Yannick Moy <moy@adacore.com>
14943 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
14944 qualification of aggregates in formal mode
14945 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
14947 (Resolve_Aggregate): complete the test that an aggregate is adequately
14948 qualified in formal mode
14950 2011-08-02 Pascal Obry <obry@adacore.com>
14952 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
14953 * mlib-prj.adb: Supress warning when compiling binder generated file.
14954 (Build_Library): Supress all warnings when compiling the binder
14957 2011-08-02 Yannick Moy <moy@adacore.com>
14959 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
14961 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
14962 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
14963 Add with/use clauses to make Check_Formal_Restriction visible
14965 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14967 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
14968 in-parameters when type of the generic formal is private in the generic
14969 spec and non-private in the body.
14971 2011-08-02 Claire Dross <dross@adacore.com>
14973 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
14974 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
14975 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
14976 * impunit.adb, Makefile.rtl: Take new files into account.
14978 2011-08-02 Robert Dewar <dewar@adacore.com>
14980 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
14981 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
14983 2011-08-02 Yannick Moy <moy@adacore.com>
14985 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
14987 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
14988 matching static array bounds, taking into account the special case of
14990 * sem_ch3.adb: Typo in comment.
14992 2011-08-02 Yannick Moy <moy@adacore.com>
14994 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
14995 which issues an error in formal mode if its argument node is originally
14997 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
14998 has a discriminant specification so that it does not include the case
15000 (Derived_Type_Declaration): move here the test that a derived type has a
15001 discriminant specification
15002 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
15003 first element of a component association before accessing its choices
15004 (presence of component association is not enough)
15005 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
15006 declaration is a library item before accessing the next element in a
15007 list, as library items are not member of lists
15008 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
15009 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
15010 Check_Formal_Restriction whenever possible.
15012 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15014 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
15015 reference when needed.
15017 2011-08-02 Bob Duff <duff@adacore.com>
15019 * gnat_ugn.texi: Fix typo.
15021 2011-08-02 Vincent Celier <celier@adacore.com>
15023 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
15024 archive file name. Do not use the full path name of archives for Open
15027 2011-08-02 Robert Dewar <dewar@adacore.com>
15029 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
15030 Analyze_Aspect_Specifications
15032 (Analyze_Aspect_Specifications): New handling for boolean aspects
15033 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
15034 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
15035 sequence for Analyze_Aspect_Specifications
15036 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
15037 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
15039 2011-08-02 Robert Dewar <dewar@adacore.com>
15041 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
15042 aspects, since these no longer exist.
15044 2011-08-02 Robert Dewar <dewar@adacore.com>
15046 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
15047 semicolon, do not try to see if there are aspects following it.
15048 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
15051 2011-08-02 Robert Dewar <dewar@adacore.com>
15053 * sem_ch8.adb, aspects.ads: Minor reformatting.
15055 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
15057 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
15058 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
15060 (Analyze_Aspect_Specifications): ...here. Call above procedure.
15062 2011-08-02 Yannick Moy <moy@adacore.com>
15064 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
15065 mode on subprogram declaration outside of package specification, unless
15066 it is followed by a pragma Import
15067 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
15068 Access_Type_Declaration): issue error in formal mode on access type
15069 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
15071 (Analyze_Object_Declaration): issue error in formal mode on object
15072 declaration which does not respect SPARK restrictions
15073 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
15074 declaration which does not respect SPARK restrictions
15075 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
15076 error in formal mode on digits or delta constraint
15077 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
15078 decimal fixed point type
15079 (Derived_Type_Declaration): issue error in formal mode on derived type
15080 other than type extensions of tagged record types
15081 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
15082 with check on access definition
15083 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
15084 mode on protected definition.
15085 (Analyze_Task_Definition): issue error in formal mode on task definition
15087 2011-08-02 Robert Dewar <dewar@adacore.com>
15089 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
15091 2011-08-02 Javier Miranda <miranda@adacore.com>
15093 * sem_ch6.adb (Can_Override_Operator): New function.
15094 (Verify_Overriding_Indicator): Add missing code to check overriding
15095 indicator in operators. Fixes regression.
15096 (Check_Overriding_Indicator): Minor reformating after replacing the
15097 code that evaluates if the subprogram can override an operator by
15098 invocations to the above new function.
15100 (Write_Field26_Name): Add missing code to ensure that, following
15101 the documentation in einfo.ads, this field is not shown as attribute
15102 "Static_Initialization" on non-dispatching functions.
15104 2011-08-02 Jose Ruiz <ruiz@adacore.com>
15106 * sem_res.adb (Resolve_Call): A call to
15107 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
15108 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
15109 i.e., when the second parameter is of type Time_Span.
15111 2011-08-02 Vincent Celier <celier@adacore.com>
15113 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
15114 with an archive instead of -L<library dir> -l<library name>.
15116 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15118 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
15119 mark the base types In_Use in addition to making the operations
15122 2011-08-02 Ed Falis <falis@adacore.com>
15124 * init.c: add and setup __gnat_signal_mask for the exception signals
15125 * s-inmaop-vxworks.adb: new file.
15126 * s-intman-vxworks.adb: remove unnecessary initializations and
15128 * s-intman-vxworks.ads: remove unnecessary variable
15129 * s-taprop-vxworks.adb: simplify signal initialization
15131 2011-08-02 Robert Dewar <dewar@adacore.com>
15133 * sem_ch8.adb: Minor code reorganization, comment updates.
15135 2011-08-02 Robert Dewar <dewar@adacore.com>
15137 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
15138 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
15140 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
15141 (Matching_Static_Array_Bounds): Moved here from Sem_Res
15143 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15145 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
15146 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
15147 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
15148 use_type_clauses, to handle more efficiently use_type and use_all_type
15150 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
15151 Ada2012 Use_All_Type clause.
15152 (Use_Class_Wide_Operations): new procedure.
15154 2011-08-02 Robert Dewar <dewar@adacore.com>
15156 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
15157 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
15158 expression to expression function.
15160 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15162 * sem_ch4.adb: transform simple Ada2012 membership into equality only
15163 if types are compatible.
15165 2011-08-02 Yannick Moy <moy@adacore.com>
15167 * sem_res.adb (Matching_Static_Array_Bounds): new function which
15168 returns True if its argument array types have same dimension and same
15169 static bounds at each index.
15170 (Resolve_Actuals): issue an error in formal mode on actuals passed as
15171 OUT or IN OUT paramaters which are not view conversions in SPARK.
15172 (Resolve_Arithmetic_Op): issue an error in formal mode on
15173 multiplication or division with operands of fixed point types which are
15174 not qualified or explicitly converted.
15175 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
15176 Boolean or array type (except String) operands.
15177 (Resolve_Equality_Op): issue an error in formal mode on equality
15178 operators for array types other than String with non-matching static
15180 (Resolve_Logical_Op): issue an error in formal mode on logical operators
15181 for array types with non-matching static bounds. Factorize the code in
15182 Matching_Static_Array_Bounds.
15183 (Resolve_Qualified_Expression): issue an error in formal mode on
15184 qualified expressions for array types with non-matching static bounds.
15185 (Resolve_Type_Conversion): issue an error in formal mode on type
15186 conversion for array types with non-matching static bounds
15188 2011-08-02 Robert Dewar <dewar@adacore.com>
15190 * par-ch10.adb: Minor code reorganization (use Nkind_In).
15192 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15194 * par-ch9.adb: save location of entry for proper error message.
15196 2011-08-02 Javier Miranda <miranda@adacore.com>
15198 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
15199 (Use_Full_View) which permits this routine to climb through the
15200 ancestors using the full-view of private parents.
15201 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
15202 Use_Full_View to true in calls to Is_Ancestor.
15203 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
15204 true in call to Is_Ancestor.
15205 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
15206 Use_Full_View to true in call to Is_Ancestor.
15207 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
15208 call to Is_Ancestor.
15209 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
15210 Use_Full_View to true in calls to Is_Ancestor.
15211 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
15212 Make_Select_Specific_Data_Table, Register_Primitive,
15213 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
15214 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
15215 to true in call to Is_Ancestor.
15216 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
15217 Use_Full_View to true in calls to Is_Ancestor.
15219 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
15220 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
15222 2011-08-02 Robert Dewar <dewar@adacore.com>
15224 * gnat_rm.texi: Minor reformatting.
15225 * sem_prag.adb: Minor reformatting.
15227 2011-08-02 Tristan Gingold <gingold@adacore.com>
15229 * vms_data.ads: Add VMS qualifier for -gnateP.
15231 2011-08-02 Robert Dewar <dewar@adacore.com>
15233 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
15234 * par-ch7.adb (P_Package): Proper placement of aspects for package
15235 decl/instantiation.
15236 * par-endh.adb (Check_End): Ad Is_Sloc parameter
15237 (End_Statements): Add Is_Sloc parameterr
15238 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
15239 (Check_End): Ad Is_Sloc parameter
15240 (End_Statements): Add Is_Sloc parameterr
15242 2011-08-02 Vincent Celier <celier@adacore.com>
15244 * ug_words: Add VMS qualifier equivalent to -gnateP:
15245 /SYMBOL_PREPROCESSING.
15247 2011-08-02 Jose Ruiz <ruiz@adacore.com>
15249 * gnat-style.texi: For hexadecimal numeric literals the typical
15250 grouping of digits is 4 to represent 2 bytes.
15251 A procedure spec which is split into several lines is indented two
15254 2011-08-02 Yannick Moy <moy@adacore.com>
15256 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
15257 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
15258 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
15260 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
15261 choice in array aggregate
15262 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
15264 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
15265 positional and named aggregate for record, or others in record
15266 aggregate, or multiple choice in record aggregate
15267 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
15268 array operands to logical operations AND, OR and XOR do not have the
15269 same static lower and higher bounds
15270 * sem_ch5.adb, sinfo.ads: Correct typos in comments
15272 2011-08-01 Robert Dewar <dewar@adacore.com>
15274 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
15275 Replaces Last_Source_Node_In_Sequence.
15276 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
15277 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
15278 parens and blank in string (this was inconsistently implemented).
15280 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
15281 blank in string (this was inconsistently implemented).
15283 (Set_Global_Switches): Set formal mode switches appropriately
15284 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
15286 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
15287 call Set_Error_Msg_Lang to set "spark" as language name.
15288 * par.adb: Remove unnecessary call to set formal language for errout
15289 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
15290 appropriately and call Set_Error_Msg_Lang to set "spark" as language
15292 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
15293 calls to it, moved after resolution so that types are known
15294 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
15295 result of concatenation is not of type String
15296 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
15297 concatenation is not properly restricted
15298 * gnat_rm.texi: Add doc on pragma Spark_95.
15299 * gcc-interface/Makefile.in: Remove obsolete target pairs for
15300 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
15301 * gcc-interface/Make-lang.in: Update dependencies.
15303 2011-08-01 Javier Miranda <miranda@adacore.com>
15305 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
15306 condition that detects if the overridden operation must replace an
15309 2011-08-01 Javier Miranda <miranda@adacore.com>
15311 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
15312 code declarations inserted by Insert_Actions in each alternative of the
15313 N_Case_Expression node.
15315 2011-08-01 Robert Dewar <dewar@adacore.com>
15317 * sem_ch6.adb: Minor code reorganization.
15318 * sem_util.adb: Minor reformatting.
15320 2011-08-01 Pascal Obry <obry@adacore.com>
15322 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
15323 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
15325 2011-08-01 Yannick Moy <moy@adacore.com>
15327 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
15328 literal or operator symbol which is prefixed
15329 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
15330 mode on access attributes.
15331 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
15332 that concatenation operands are properly restricted in formal mode
15333 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
15334 Analyze_Concatenation_Operand. Issue an error in formal mode if the
15335 result of the concatenation has a type different from String.
15336 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
15337 Analyze_Quantified_Expression, Analyze_Slice,
15338 Analyze_Null): issue an error in formal mode on unsupported constructs
15340 (Analyze_Block_Statement): only issue error on source block statement
15341 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
15342 function which returns the last node in a list of nodes for which
15343 Comes_From_Source returns True, if any
15344 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
15345 Last_Source_Node_In_Sequence
15346 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
15347 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
15348 mode on unsupported constructs
15349 * sem_ch9.adb Do not return after issuing error in formal mode, as the
15350 rest of the actions may be needed later on since the error is marked as
15352 * sinfo.ads: Typos in comments.
15354 2011-08-01 Pascal Obry <obry@adacore.com>
15356 * projects.texi: Minor editing.
15358 2011-08-01 Yannick Moy <moy@adacore.com>
15360 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
15361 insertion character ~~
15362 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
15363 (Set_Error_Msg_Lang): new procedure which fixes the language for use
15364 with insertion character ~~
15365 (Set_Msg_Text): treat insertion character ~~
15366 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
15367 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
15368 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
15369 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
15370 errors related to the formal language restriction not serious
15371 (insertion character |).
15372 * par.adb (Par): set formal language for error messages if needed
15373 * sem_ch6.adb (Check_Missing_Return): take into account possible
15374 generated statements at the end of the function
15375 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
15376 enumeration value to define a new pragma SPARK_95
15377 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
15378 SPARK_Version): new type and variables to store the SPARK version
15380 (SPARK_Mode): return True when SPARK_Version is set
15381 * par-prag.adb: Correct indentation
15382 (Prag): take Pragma_SPARK_95 into account
15383 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
15386 2011-08-01 Robert Dewar <dewar@adacore.com>
15388 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
15389 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
15390 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
15392 2011-08-01 Pascal Obry <obry@adacore.com>
15394 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
15395 Target_Name to Get_Path call.
15396 (Parse_Single_Project): Likewise.
15397 (Post_Parse_Context_Clause): Likewise.
15398 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
15399 Call Initialise_Project_Path with the proper Target_Name.
15400 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
15402 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
15403 with the proper Target_Name.
15404 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
15405 Part.Parse routine.
15406 (Parse_Project_And_Apply_Config): Likewise.
15407 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
15408 This is fine as this part of the code is supporting only native
15410 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
15411 is fine as this part of the code is supporting only native compilation.
15413 2011-08-01 Yannick Moy <moy@adacore.com>
15415 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
15416 of homonym, unless the homonym is one of the cases allowed in SPARK
15417 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
15418 package declaration occurring after a body.
15420 2011-08-01 Robert Dewar <dewar@adacore.com>
15422 * checks.adb, exp_ch4.adb: Minor reformatting.
15424 2011-08-01 Javier Miranda <miranda@adacore.com>
15426 * einfo.ads (Access_Disp_Table): Fix documentation.
15427 (Dispatch_Table_Wrappers): Fix documentation.
15429 2011-08-01 Pascal Obry <obry@adacore.com>
15431 * prj-env.adb, prj-env.ads: Minor reformatting.
15433 2011-08-01 Yannick Moy <moy@adacore.com>
15435 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
15436 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
15437 procedures out of these packages.
15438 * errout.ads, errout.adb
15439 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
15440 procedures in of this package
15441 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
15442 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
15443 on misplaced later vs initial declarations, like in Ada 83
15444 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
15445 formal mode on attribute of private type whose full type declaration
15447 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
15448 package declaration inside a package specification
15449 (Analyze_Full_Type_Declaration): issue error in formal mode on
15450 controlled type or discriminant type
15451 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
15452 user-defined operator means that it should come from the source
15453 (New_Overloaded_Entity): issue error in formal mode on overloaded
15455 * sem_ch6.ads, sem_ch13.ads: typos in comments.
15457 2011-08-01 Thomas Quinot <quinot@adacore.com>
15459 * atree.adb: Minor reformatting.
15460 * checks.adb: Minor reformatting.
15462 2011-08-01 Vincent Celier <celier@adacore.com>
15464 * s-parame-vms-ia64.ads: Fix typo in comment
15466 * s-parame-vms-restrict.ads: Removed, unused.
15468 2011-08-01 Javier Miranda <miranda@adacore.com>
15471 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
15473 (Constrain_Index): Remove side effects in the evaluation of the bounds.
15474 * sem_ch3.ads, sem_ch3.adb
15475 (Is_Constant_Bound): New extended version of the subprogram that was
15476 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
15477 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
15478 * sem_aux.ads (Constant_Value): Fix typo in comment.
15479 * checks.adb (Generate_Index_Checks): New implementation which, for
15480 array objects with constant bounds, generates the runtime check
15481 referencing the bounds of the array type. For other cases this routine
15482 provides its previous behavior obtaining such values from the array
15484 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
15486 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
15487 we cannot have semantic interpretations of the new node.
15489 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15491 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
15494 2011-08-01 Arnaud Charlet <charlet@adacore.com>
15496 * sem_ch8.adb: Minor code editing.
15497 * s-vxwext.adb: Remove trailing space.
15498 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
15499 consistency with other files.
15501 2011-08-01 Thomas Quinot <quinot@adacore.com>
15503 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
15505 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15507 * par-ch10.adb: reject parameterized expressions as compilation unit.
15508 * sem_ch4.adb: handle properly conditional expression with overloaded
15509 then_clause and no else_clause.
15511 2011-08-01 Tristan Gingold <gingold@adacore.com>
15513 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
15514 like done by System.Aux_DEC.
15515 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
15517 2011-08-01 Yannick Moy <moy@adacore.com>
15519 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
15520 missing label at end of declaration (subprogram or package)
15521 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
15522 of positional and named parameter association
15523 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
15524 Error_Msg_SP which adds a prefix to the error message giving the name
15525 of the formal language analyzed
15526 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
15527 access result type in subprogram, unconstrained array as result type,.
15528 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
15530 * sem_ch8.adb: Code clean up.
15532 2011-08-01 Javier Miranda <miranda@adacore.com>
15534 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
15535 * einfo.ads (Access_Disp_Table): Fix documentation.
15536 (Dispatch_Table_Wrappers): Fix documentation.
15537 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
15538 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
15539 to enforce the documentation of this attribute.
15540 (Set_Is_Interface): Cleanup the assertion.
15541 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
15542 the Underlying_Type entity before reading attribute Access_Disp_Table.
15543 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
15544 Locate the Underlying_Type before reading attribute Access_Disp_Table.
15545 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
15546 the Underlying_Type entity before reading attribute Access_Disp_Table.
15547 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
15548 Locate the Underlying_Type entity before reading attribute
15551 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15553 * s-poosiz.ads: Additional overriding indicators.
15555 2011-08-01 Yannick Moy <moy@adacore.com>
15557 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
15559 (Analyze_Iteration_Scheme): issue error in formal mode when loop
15560 parameter specification does not include a subtype mark.
15561 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
15562 formal mode on abstract subprogram.
15563 (Analyze_Subprogram_Specification): issue error in formal mode on
15564 user-defined operator.
15565 (Process_Formals): issue error in formal mode on access parameter and
15566 default expression.
15567 * sem_ch9.adb (Analyze_Abort_Statement,
15568 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
15569 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
15570 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
15571 Analyze_Requeue, Analyze_Selective_Accept,
15572 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
15573 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
15574 issue error in formal mode on user-defined raise statement.
15576 2011-08-01 Thomas Quinot <quinot@adacore.com>
15578 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
15579 declaration being hidden when overriding an implicit inherited
15581 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
15582 (-gnats), do not complain about a source file that contains only a
15585 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15587 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
15588 variable if already set.
15590 2011-08-01 Arnaud Charlet <charlet@adacore.com>
15592 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
15593 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
15594 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
15595 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
15596 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
15597 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
15598 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
15599 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
15600 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
15601 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
15602 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
15603 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
15604 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
15605 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
15606 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
15607 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
15608 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
15609 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
15610 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
15611 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
15612 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
15613 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
15614 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
15615 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
15616 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
15617 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
15618 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
15619 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
15620 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
15621 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
15622 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
15623 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
15624 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
15625 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
15626 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
15627 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
15628 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
15629 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
15630 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
15631 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
15632 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
15633 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
15634 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
15635 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
15636 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
15637 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
15638 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
15639 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
15640 s-osinte-mingw.ads: Update to GPLv3 run-time license.
15641 Use GNAT instead of GNARL.
15643 2011-08-01 Bob Duff <duff@adacore.com>
15645 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
15646 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
15647 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
15650 2011-08-01 Yannick Moy <moy@adacore.com>
15652 * debug.adb (d.D) reverve flag for the SPARK mode
15653 (d.E) reverve flag for SPARK generation mode
15654 (d.F) reverve flag for Why generation mode
15655 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
15656 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
15657 functions which return True when the corresponding modes are set
15658 (Formal_Language): return "spark" or "alfa" when in formal verification
15660 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
15661 Error_Msg to prefix the error message with a tag giving the formal
15663 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
15664 message with a tag giving the formal language
15665 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
15667 (Analyze_Case_Statement): issue error in formal mode on case statement
15668 with a single "others" case alternative
15669 (Analyze_Exit_Statement): issue errors in formal mode on exit
15670 statements which do not respect SPARK restrictions
15671 (Analyze_Goto_Statement): issue error in formal mode on goto statement
15672 (Check_Unreachable_Code): always issue an error (not a warning) in
15673 formal mode on unreachable code (concerns both code after an infinite
15674 loop and after an unconditional jump, both not allowed in SPARK)
15675 * sem_ch6.adb (Analyze_Return_Statement): add call to
15676 Set_Return_Present for a procedure containing a return statement
15677 (already done for functions in Analyze_Function_Return)
15678 (Analyze_Function_Return): issue error in formal mode on extended
15679 return or if return is not last statement in function
15680 (Check_Missing_Return): issue error in formal mode if function does
15681 not end with return or if procedure contains a return
15682 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
15683 function to detect if there is an inner scope of its parameter S which
15686 2011-08-01 Thomas Quinot <quinot@adacore.com>
15688 * sem_ch6.ads: Minor reformatting.
15690 2011-08-01 Javier Miranda <miranda@adacore.com>
15692 * sem_util.adb (Abstract_Interface_List): Complete condition when
15693 processing private type declarations to avoid reading unavailable
15695 (Is_Synchronized_Tagged_Type): Complete condition when processing
15696 private extension declaration nodes to avoid reading unavailable
15699 2011-08-01 Thomas Quinot <quinot@adacore.com>
15701 * sem_ch3.adb: Minor reformatting.
15703 2011-08-01 Thomas Quinot <quinot@adacore.com>
15705 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
15706 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
15707 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
15708 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
15709 for VMS, instead parametrize the common implementation with
15710 System.Parameters declarations.
15712 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
15714 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
15716 2011-08-01 Tristan Gingold <gingold@adacore.com>
15718 * seh_init.c: Fix SEH handler installation on win64.
15720 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15722 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
15723 double analysis of an anonymous access to subprogram, because it can
15724 lead to improper sharing of profiles and a back-end crash.
15726 2011-08-01 Robert Dewar <dewar@adacore.com>
15728 * make.adb, sem_ch4.adb: Minor reformatting.
15729 * gcc-interface/Make-lang.in: Update dependencies.
15730 * sem_util.adb, exp_ch5.adb: Minor reformatting.
15732 2011-08-01 Arnaud Charlet <charlet@adacore.com>
15734 * gnat_rm.texi: Fix definition of Long_Integer.
15736 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15738 * exp_aggr.adb: check limit size of static aggregate unconditionally,
15739 to prevent storage exhaustion.
15740 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
15741 finalized is a function body, insert the cleanup code before the final
15742 return statement, to prevent spurious warnings.
15743 * s-pooglo.ads: add overriding indicator.
15745 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15747 * sem_ch4.adb (Operator_Check): improve error message when both a
15748 with_clause and a use_clause are needed to make operator usage legal.
15749 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
15750 determine whether a compilation unit is visible within an other,
15751 either through a with_clause in the current unit, or a with_clause in
15752 its library unit or one one of its parents.
15754 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15756 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
15757 over an arbitrary expression of an array or container type.
15758 * lib-xref.adb: clarify comment.
15760 2011-08-01 Bob Duff <duff@adacore.com>
15762 * einfo.ads: Minor reformatting.
15763 * debug.adb: Minor comment improvement.
15765 2011-08-01 Javier Miranda <miranda@adacore.com>
15767 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
15768 consider hidden subprograms as valid candidates.
15770 2011-08-01 Arnaud Charlet <charlet@adacore.com>
15772 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
15774 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
15776 * gnat_ugn.texi: Fix typo.
15778 2011-08-01 Robert Dewar <dewar@adacore.com>
15780 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
15781 lib-xref.adb: Minor reformatting
15783 2011-08-01 Gary Dismukes <dismukes@adacore.com>
15785 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
15786 when to generate a call to Move_Final_List.
15787 (Has_Controlled_Parts): Remove this function.
15789 2011-08-01 Geert Bosch <bosch@adacore.com>
15791 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
15792 "," in choice list.
15794 2011-08-01 Thomas Quinot <quinot@adacore.com>
15796 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
15797 explicit raise of a predefined exception as Comes_From_Source if the
15798 original N_Raise_Statement comes from source.
15800 2011-08-01 Robert Dewar <dewar@adacore.com>
15802 * sinfo.ads: Add comment.
15803 * sem_ch6.adb: Minor reformatting.
15805 2011-08-01 Robert Dewar <dewar@adacore.com>
15807 * freeze.adb (Freeze_Entity): Refine check for bad component size
15808 clause to avoid rejecting confirming clause when atomic/aliased present.
15810 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15812 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
15813 better determine whether an entity reference is a write.
15814 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
15816 * lib-xref.adb (Output_References): Do no suppress a read reference at
15817 the same location as an immediately preceeding modify-reference, to
15818 handle properly in-out actuals.
15820 2011-08-01 Tristan Gingold <gingold@adacore.com>
15822 * env.c (__gnat_setenv) [VMS]: Refine previous change.
15824 2011-08-01 Quentin Ochem <ochem@adacore.com>
15826 * i-cstrin.adb (New_String): Changed implementation, now uses only the
15827 heap to compute the result.
15829 2011-08-01 Robert Dewar <dewar@adacore.com>
15831 * atree.ads: Minor reformatting.
15833 2011-08-01 Emmanuel Briot <briot@adacore.com>
15835 * g-expect.adb (Get_Command_Output): Fix memory leak.
15837 2011-08-01 Geert Bosch <bosch@adacore.com>
15839 * cstand.adb (P_Float_Type): New procedure to print the definition of
15840 predefined fpt types.
15841 (P_Mixed_Name): New procedure to print a name using mixed case
15842 (Print_Standard): Use P_Float_Type for printing floating point types
15843 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
15844 precision IEEE float.
15846 2011-08-01 Thomas Quinot <quinot@adacore.com>
15848 * sem_ch3.adb: Minor reformatting.
15850 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15852 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
15853 the completion of a generic function, insert the new body rather than
15854 rewriting the original.
15856 2011-08-01 Yannick Moy <moy@adacore.com>
15858 * sinfo.ads, errout.ads: Typos in comments.
15860 2011-08-01 Robert Dewar <dewar@adacore.com>
15862 * par-endh.adb: Minor reformatting.
15864 2011-08-01 Robert Dewar <dewar@adacore.com>
15866 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
15867 (Pre_Post_Aspects): New subtype.
15868 * par-ch12.adb (P_Generic): New syntax for aspects in packages
15869 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
15870 * par-ch7.adb (P_Package): Remove Decl parameter
15871 (P_Package): Handle new syntax for aspects (before IS)
15872 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
15874 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
15875 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
15876 (P_Package): Remove Decl parameter
15877 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
15879 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
15881 * sem_util.ads, sem_util.adb (Static_Boolean): New function
15882 * sinfo.ads: Document new syntax for aspects in packages etc.
15883 * sprint.adb: Handle new syntax of aspects before IS in package
15885 2011-08-01 Thomas Quinot <quinot@adacore.com>
15887 * atree.ads: Minor reformatting.
15888 * sem_prag.adb: Minor reformatting.
15890 2011-08-01 Robert Dewar <dewar@adacore.com>
15892 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
15893 case expr alternative.
15895 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15897 * sem_ch12.adb: Fix typo.
15899 2011-08-01 Geert Bosch <bosch@adacore.com>
15901 * sem_prag.adb (Check_No_Link_Name): New procedure.
15902 (Process_Import_Or_Interface): Use Check_No_Link_Name.
15903 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
15904 instead of Standard_Long_Long_Float_Size global. Preparation for
15905 eventual removal of per type constants.
15906 * exp_util.ads (Get_Stream_Size): New function returning the stream
15907 size value of subtype E.
15908 * exp_util.adb (Get_Stream_Size): Implement new function.
15909 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
15911 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
15913 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
15915 2011-08-01 Geert Bosch <bosch@adacore.com>
15917 * cstand.adb: Fix comments.
15918 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
15919 count of arguments.
15921 2011-08-01 Robert Dewar <dewar@adacore.com>
15923 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
15925 2011-08-01 Geert Bosch <bosch@adacore.com>
15927 * atree.ads: Fix comment.
15929 2011-08-01 Robert Dewar <dewar@adacore.com>
15931 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
15932 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
15933 * par.adb: Add with for Namet.Sp.
15934 * par-tchk.adb: Minor reformatting.
15936 2011-08-01 Vincent Celier <celier@adacore.com>
15938 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
15939 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
15940 of the init procedure of a SAL.
15941 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
15944 2011-08-01 Thomas Quinot <quinot@adacore.com>
15946 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
15949 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
15951 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
15953 2011-08-01 Thomas Quinot <quinot@adacore.com>
15955 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
15956 conformant with its spec (return True only for types that have
15957 an overriding Initialize primitive operation that prevents them from
15958 having preelaborable initialization).
15959 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
15960 initialization for controlled types in Ada 2005 or later mode.
15962 2011-08-01 Robert Dewar <dewar@adacore.com>
15964 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
15966 (Same_Aspect): New function.
15967 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
15968 Type_Invariant, Precondition, Postcondition.
15969 * snames.ads-tmpl: Add Name_Type_Invariant.
15971 2011-08-01 Robert Dewar <dewar@adacore.com>
15973 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
15975 (Freeze_All_Ent): Fix error in handling inherited aspects.
15976 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
15977 already analyzed, but don't skip entire processing of a declaration,
15978 that's wrong in some cases of declarations being rewritten.
15979 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
15980 Don't delay for integer, string literals
15981 Treat predicates in usual manner for delay, remove special case code,
15983 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
15984 (Build_Predicate_Function): Update saved expression in aspect
15985 (Build_Invariant_Procedure): Update saved expression in aspect
15986 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
15987 of replacement of discriminant references if the reference is simple.
15989 2011-08-01 Robert Dewar <dewar@adacore.com>
15991 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
15992 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
15993 Static_Predicate and Dynamic_Predicate.
15994 (Build_Predicate_Function): Add processing for Static_Predicate
15995 and Dynamic_Predicate.
15996 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
15997 (From_Static_Predicate): New flag
15998 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
16000 2011-08-01 Robert Dewar <dewar@adacore.com>
16002 * usage.adb: Documentation cleanup for Ada version modes in usage.
16003 * expander.adb: Minor reformatting.
16005 2011-08-01 Robert Dewar <dewar@adacore.com>
16007 * atree.ads: Minor comment fix.
16008 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
16009 a-witeio.ads, sem_prag.adb: Minor reformatting.
16011 2011-08-01 Doug Rupp <rupp@adacore.com>
16013 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
16014 pointers. Use descrip.h header file for convenience. Add some
16017 2011-08-01 Robert Dewar <dewar@adacore.com>
16019 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
16020 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
16021 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
16023 (Check_Aspect_At_End_Of_Declarations): New procedure
16024 (Analye_Aspect_Specification): Minor changes for above procedures
16025 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
16026 specification node as well.
16028 2011-08-01 Pascal Obry <obry@adacore.com>
16030 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
16031 Windows files. Use GetFilesAttributes() in this case to check for file
16032 existence instead of returning with an error code.
16034 2011-08-01 Vincent Celier <celier@adacore.com>
16036 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
16037 High is above Source length.
16039 2011-08-01 Robert Dewar <dewar@adacore.com>
16041 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
16043 2011-08-01 Robert Dewar <dewar@adacore.com>
16045 * aspects.ads (Boolean_Aspects): New subtype.
16046 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
16047 for derived types in cases where the parent type and derived type have
16049 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
16050 with aspects when parent type also has aspects.
16051 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
16052 boolean expression at this point).
16053 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
16054 accordance with final decision on the Ada 2012 feature.
16055 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
16057 2011-08-01 Matthew Heaney <heaney@adacore.com>
16059 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
16061 2011-08-01 Pascal Obry <obry@adacore.com>
16063 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
16064 Fix Replace_Slice when High is above current string size.
16065 (Replace_Slice): Fix DL computation when High is above current
16068 2011-08-01 Gary Dismukes <dismukes@adacore.com>
16070 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
16072 2011-08-01 Matthew Heaney <heaney@adacore.com>
16074 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
16077 2011-08-01 Pascal Obry <obry@adacore.com>
16079 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
16082 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16084 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
16085 access to protected subprograms in generic bodies.
16086 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
16087 protected type, indicate that the convention of the subprogram is
16088 Convention_Protected, because it may be used in subsequent declarations
16089 within the protected declaration.
16091 2011-08-01 Vincent Celier <celier@adacore.com>
16093 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
16094 and "final" procedures when the name of the library is "ada", to avoid
16095 duplicate symbols "adainit" and "adafinal" in executables.
16097 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16099 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
16100 quantified expression that appears within a postcondition and uses the
16101 Ada2012 'Result attribute.
16103 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16105 * init.c (__gnat_error_handler): Cast reason to int.
16106 (__gnat_install_handler): Explain sa_sigaction use.
16108 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
16110 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
16111 subprogram has copy-in copy-out parameters, try to promote the mode of
16112 the return type if it is passed in registers.
16114 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
16116 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
16117 left operand as addressable.
16119 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
16121 * gcc-interface/gigi.h (build_function_stub): Remove.
16122 (build_return_expr): Likewise.
16123 (convert_vms_descriptor): Declare.
16124 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
16125 (build_function_stub): Move to...
16126 * gcc-interface/utils2.c (build_return_expr): Move to...
16127 * gcc-interface/trans.c (build_function_stub): ...here.
16128 (build_return_expr): ...here.
16129 (Subprogram_Body_to_gnu): Add local variable for language_function.
16130 Disconnect the parameter attributes cache, if any, once done with it.
16131 Call end_subprog_body only after setting the end_locus.
16132 Build the stub associated with the function, if any, at the very end.
16133 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
16134 variables and streamline control flow.
16136 2011-07-23 Arnaud Charlet <charlet@adacore.com>
16139 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
16140 g-trasym-dwarf.adb.
16142 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16145 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
16146 Assign to act.sa_sigaction.
16147 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
16148 current->return_address to char * before arithmetic.
16150 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16152 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
16153 Correct argument types.
16154 Extract code from reason.
16155 (__gnat_install_handler): Assign to act.sa_sigaction.
16157 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
16159 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
16160 (GNAT1_OBJS): ...here.
16162 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
16165 * g-socthi-mingw.adb (Fill): Fix formatting.
16167 * gcc-interface/gigi.h: Move around comment.
16169 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
16172 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
16174 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
16177 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
16179 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
16181 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
16182 range comparison if Pmode is SImode.
16184 2011-07-12 Laurent GUERBY <laurent@guerby.net>
16185 Eric Botcazou <ebotcazou@adacore.com>
16187 * adadecode.c: Wrap up in extern "C" block.
16188 * adadecode.h: Likewise.
16189 * adaint.c: Likewise. Remove 'const' keyword.
16190 * adaint.h: Likewise.
16191 * argv.c: Likewise.
16192 * atree.h: Likewise.
16194 * cstreams.c: Likewise.
16196 * exit.c: Likewise.
16198 * final.c: Likewise.
16199 * init.c: Likewise.
16200 * initialize.c: Likewise.
16201 * link.c: Likewise.
16202 * namet.h: Likewise.
16203 * nlists.h: Likewise.
16204 * raise.c: Likewise.
16205 * raise.h: Likewise.
16206 * repinfo.h: Likewise.
16207 * seh_init.c: Likewise.
16208 * targext.c: Likewise.
16209 * tracebak.c: Likewise.
16210 * uintp.h: Likewise.
16211 * urealp.h: Likewise.
16212 * xeinfo.adb: Wrap up generated C code in extern "C" block.
16213 * xsinfo.adb: Likewise.
16214 * xsnamest.adb: Likewise.
16215 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
16216 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
16217 * gcc-interface/misc.c: Likewise.
16218 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
16219 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
16220 ada/targext.o here...
16221 (GNAT_ADA_OBJS): ...and not here.
16222 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
16223 (GNATBIND_OBJS): Reorder.
16225 2011-07-07 Richard Henderson <rth@redhat.com>
16227 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
16228 dwarf2out_frame_init.
16230 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
16232 * gcc-interface/misc.c (gnat_init): Tweak previous change.
16234 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16237 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
16239 2011-07-06 Richard Guenther <rguenther@suse.de>
16241 * gcc-interface/misc.c (gnat_init): Merge calls to
16242 build_common_tree_nodes and build_common_tree_nodes_2.
16243 Re-initialize boolean_false_node.
16245 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
16246 Olivier Hainque <hainque@adacore.com>
16247 Nicolas Setton <setton@adacore.com>
16249 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
16250 the type according to the ARTIFICIAL_P parameter.
16251 (create_type_decl): Likewise.
16252 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
16254 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
16256 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
16257 (gnatbind): Likewise.
16259 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16261 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
16263 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
16265 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
16266 local variable throughout. Remove useless call to Base_Type.
16267 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
16268 Take it also into account for the volatileness of the field. Set the
16269 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
16271 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
16273 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
16274 on a dereference built for a by-ref object if it has an address clause.
16276 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
16278 * einfo.ads (Address_Taken): Document use for the second argument of
16279 Asm_Input and Asm_Output attributes.
16280 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
16281 argument is an entity name, then set Address_Taken on it.
16282 <Attribute_Asm_Output>: Likewise.
16283 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
16284 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
16285 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
16286 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
16288 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
16290 PR middle-end/46500
16291 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
16293 2011-06-14 Joseph Myers <joseph@codesourcery.com>
16295 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
16296 (ada/utils.o): Update dependencies.
16297 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
16298 ../../../libcpp/libcpp.a.
16299 * gcc-interface/utils.c: Include common/common-target.h.
16300 (process_attributes): Use targetm_common.have_named_sections.
16302 2011-06-07 Richard Guenther <rguenther@suse.de>
16304 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
16307 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
16309 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
16310 TREE_THIS_NOTRAP flag.
16312 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
16314 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
16317 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
16319 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
16320 constants whose full view has discriminants specially.
16322 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
16324 * gcc-interface/utils.c: Include diagnostic.h.
16325 (gnat_write_global_declarations): Output debug information for all
16326 global type declarations before finalizing the compilation unit.
16327 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
16329 2011-05-25 Jakub Jelinek <jakub@redhat.com>
16331 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
16333 2011-05-25 Kai Tietz <ktietz@redhat.com>
16335 * adaint.c (__gnat_to_canonical_file_list_next): Use array
16336 initialization instead of const/none-const pointer assignment.
16338 2011-05-24 Joseph Myers <joseph@codesourcery.com>
16340 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
16341 $(EXTRA_GNAT1_OBJS).
16342 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
16343 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
16344 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
16345 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
16346 libcommon-target.a instead of prefix.o.
16348 2011-05-21 Joseph Myers <joseph@codesourcery.com>
16351 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
16353 2011-05-20 Joseph Myers <joseph@codesourcery.com>
16355 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
16356 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
16357 instead of version.o.
16359 2011-05-18 Kai Tietz <ktietz@redhat.com>
16361 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
16362 boolean_false_node instead of integer_zero_node.
16363 (convert_with_check): Likewise.
16364 * gcc-interface/decl.c (choices_to_gnu): Likewise.
16366 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
16368 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
16369 type of the parameter is an unconstrained array, convert the actual to
16370 the type of the formal in the In Out and Out cases as well.
16372 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
16374 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
16375 call build_function_type_array or build_varargs_function_type_array
16377 (create_subprog_type): Don't call build_function_type; call
16378 build_function_type_vec instead.
16380 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
16382 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
16383 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
16384 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
16386 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
16388 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
16390 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
16391 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
16393 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
16395 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
16397 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
16399 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
16400 instead of accessing TYPE_ARG_TYPES directly.
16401 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
16403 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
16406 * gcc-interface/gigi.h (get_variant_part): Declare.
16407 * gcc-interface/decl.c (get_variant_part): Make global.
16408 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
16409 types have the same constant size, are record types and T1 has a
16410 variant part while T2 doesn't.
16412 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
16414 * gcc-interface/utils.c (begin_subprog_body): Do not call
16416 (end_subprog_body): Likewise.
16418 2011-05-04 Richard Guenther <rguenther@suse.de>
16420 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
16422 (pos_to_constructor): Likewise.
16424 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
16425 Eric Botcazou <ebotcazou@adacore.com>
16427 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
16428 of build_function_type. Adjust calls to...
16429 (build_raise_check): ...this. Do not take a void_tree parameter.
16430 Call build_function_type_list instead of build_function_type.
16431 Fix head comment and swap couple of conditional blocks.
16433 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
16435 * gnatvsn.ads (Library_Version): Bump to 4.7.
16436 (Current_Year): Bump to 2011.
16438 2011-04-29 Michael Matz <matz@suse.de>
16440 * gcc-interface/misc.c (gnat_handle_option): Set
16441 warn_maybe_uninitialized.
16443 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
16445 * gnat_ugn.texi (Complexity Metrics Control): Update link to
16446 the Watson/McCabe paper.
16448 2011-04-23 Jim Meyering <meyering@redhat.com>
16450 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
16452 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
16454 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
16457 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
16459 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
16461 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
16462 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
16463 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
16464 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
16465 <all>: Do not set flags on the reused DECL node coming from an alias.
16466 Set DECL_IGNORED_P on the DECL node built for subprograms if they
16467 don't need debug info here...
16468 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
16469 (gigi): Adjust calls to create_subprog_decl.
16470 (build_raise_check): Likewise.
16471 (establish_gnat_vms_condition_handler): Likewise.
16472 (Compilation_Unit_to_gnu): Likewise.
16473 (gnat_to_gnu): Likewise.
16475 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
16477 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
16478 (NO_REORDER_ADAFLAGS): New variable.
16479 (EXTRA_GNATTOOLS): Always define.
16480 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
16481 Clean up and adjust list of files compiled with special options.
16482 * gcc-interface/Make-lang.in: Likewise.
16483 (ada/decl.o): Cosmetical change.
16484 (ada/misc.o): Remove dependency on $(PLUGIN_H).
16486 2011-04-20 Jim Meyering <meyering@redhat.com>
16488 * initialize.c (__gnat_initialize): Remove useless if-before-free.
16490 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
16492 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
16493 $(CFLAGS) on the link line.
16495 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
16497 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
16498 padded type built for the return type if it is unconstrained.
16500 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
16502 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
16504 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
16506 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
16507 before calling TREE_CHAIN.
16508 * gcc-interface/misc.c (gnat_init_ts): New function.
16509 (LANG_HOOKS_INIT_TS): Define.
16511 2011-04-12 Martin Jambor <mjambor@suse.cz>
16513 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
16514 instead of cgraph_node.
16516 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
16518 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
16519 alignment on fields of the RETURN type built for the Copy-In Copy-Out
16522 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
16524 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
16525 of aggregate types that contain a placeholder.
16527 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
16529 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
16531 (handle_type_generic_attribute): Likewise.
16533 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
16536 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
16538 2011-04-04 Kai Tietz <ktietz@redhat.com>
16541 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
16544 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
16546 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
16547 type case, do not strip a padding type around the array type.
16549 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
16551 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
16554 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
16556 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
16557 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
16558 code for -feliminate-unused-debug-types.
16559 (gnat_post_options): Likewise.
16561 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
16563 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
16564 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
16567 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
16569 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
16570 DECL_ARTIFICIAL flag on enumeration types.
16572 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
16574 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
16575 fat pointer types artificial unconditionally.
16576 <E_Array_Subtype>: Attach the base array type as a parallel type if it
16579 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
16581 * gcc-interface/gigi.h (get_dummy_type): Declare.
16582 (build_dummy_unc_pointer_types): Likewise.
16583 (finish_fat_pointer_type): Likewise.
16584 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
16585 fat pointer type has been built, complete it in place.
16586 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
16587 and thin pointers. Remove useless variable.
16588 (finish_fat_pointer_type): Make global and move to...
16589 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
16590 (get_dummy_type): New function.
16591 (build_dummy_unc_pointer_types): Likewise.
16592 (gnat_pushdecl): Propage the name to the anonymous variants only.
16593 (update_pointer_to): Only adjust the pointer types in the unconstrained
16596 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
16598 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
16599 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
16600 if this is a Taft amendment type and the full declaration is available.
16601 * gcc-interface/trans.c (process_type): Likewise.
16602 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
16603 (process_freeze_entity): Likewise.
16604 * gcc-interface/utils.c (dummy_global): New static variable.
16605 (gnat_write_global_declarations): If there are types declared as used
16606 at the global level, insert them in the global hash table.
16608 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
16610 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
16611 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
16612 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
16614 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
16615 flag of the type accordingly.
16616 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
16618 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
16620 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
16621 finalizing types when updating the pointers to the designated type.
16622 <all>: Finalize the deferred types even if we didn't defer processing
16623 of incomplete types in this invocation.
16625 2011-04-01 Olivier Hainque <hainque@adacore.com>
16626 Nicolas Setton <setton@adacore.com>
16627 Eric Botcazou <ebotcazou@adacore.com>
16629 * gcc-interface/misc.c (gnat_descriptive_type): New function.
16630 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
16632 2011-03-28 Kai Tietz <ktietz@redhat.com>
16634 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
16636 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
16637 * system-mingw.ads (System): Change ZCX_By_Default default to True.
16639 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
16641 2011-03-28 Tristan Gingold <gingold@adacore.com>
16644 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
16645 Use ada output of gnatbind.
16646 (ada/b_gnatb.adb): Ditto.
16647 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
16648 (ada.mostlyclean, ada.stage1)
16649 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
16650 (ada.stagefeedback): Adjust.
16651 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
16652 Use ada output of gnatbind.
16653 (b_gnatm.adb): Ditto.
16654 (b_gnatl.o, b_gnatm.o): New rules.
16656 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
16658 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
16659 for the padded type built to support a specified size or alignment.
16661 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
16663 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
16664 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
16665 unconditionally to the end of the unit when the designated type is
16667 <all>: Rename local variable. Attempt to un-defer types only and do it
16668 for limited_with'ed types as well.
16669 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
16670 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
16671 consistently and remove redundant call to finalize_from_with_types.
16673 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
16675 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
16676 subprograms without a previous spec declared in the same unit.
16677 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
16678 subprograms at the end of the unit instead of at the beginning.
16679 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
16680 isn't public for the special handling of non-inline functions nested
16681 inside inline external functions.
16683 2011-03-25 Jeff Law <law@redhat.com>
16685 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
16687 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
16689 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
16690 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
16691 to compute Set_Size_Depends_On_Discriminant.
16692 (Layout_Type): Call it on array types in back-end layout mode.
16693 * sem_util.adb (Requires_Transient_Scope): Return true for array
16694 types only if the size depends on the value of discriminants.
16695 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
16696 type if the RHS is a call to a function that returns an unconstrained
16697 type with default discriminant.
16699 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
16701 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
16702 non-conversion to the nominal result type at the end.
16704 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
16706 * gcc-interface/trans.c (create_temporary): New function taken from...
16707 (create_init_temporary): ...here. Call it.
16708 (call_to_gnu): Create the temporary for the return value early, if any.
16709 Create it for a function with copy-in/copy-out parameters if there is
16710 no target; in other cases of copy-in/copy-out, use another temporary.
16711 Push the new binding level lazily. Add and rename local variables.
16713 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
16715 * gcc-interface/decl.c (validate_size): Improve comments and tweak
16717 (set_rm_size): Likewise.
16719 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
16721 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
16722 for the padded type built in order to support a specified alignment.
16723 Fix incorrect formatting.
16725 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
16728 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
16730 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
16732 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
16733 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
16734 to the end of the list. Adjust recursive call. Rename local variable.
16735 If REORDER is true, reorder components of the record type.
16736 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
16737 components_to_record and adjust the parameter list.
16739 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
16741 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
16742 disabled, use the variable for bounds of loop iteration scheme.
16744 2011-03-21 Kai Tietz <ktietz@redhat.com>
16747 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
16749 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
16751 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
16752 out whether the expression is read-only. Short-circuit placeholder
16753 case and rename a couple of local variables.
16755 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
16757 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
16758 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
16759 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
16760 (convert): Deal with conversions from a smaller form type specially.
16762 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
16764 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
16765 its argument, except for the special -I- switch.
16767 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
16769 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
16772 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
16774 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
16776 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
16778 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
16780 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
16781 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
16782 instead of GNAT_FORMAL. Protect the expression against multiple uses.
16783 Do not generate the check directly, instead instantiate the template
16784 check present in the descriptor.
16785 (make_descriptor_field): Move around.
16786 (build_vms_descriptor32): Build a template check in the POINTER field.
16787 (build_vms_descriptor): Remove useless suffixes.
16788 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
16790 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
16793 * targext.c: Include target files if IN_RTS is defined.
16795 2011-01-26 Richard Guenther <rguenther@suse.de>
16798 * targext.c: Include config.h.
16799 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
16802 2011-01-04 Pascal Obry <obry@adacore.com>
16803 Eric Botcazou <ebotcazou@adacore.com>
16805 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
16807 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
16809 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
16810 end-of-case on the end label and its associated gotos, if any.
16812 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
16814 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
16815 expressions of the parameter cache within the statement group of
16816 the CICO mechanism.
16818 2011-01-04 Olivier Hainque <hainque@adacore.com>
16819 Eric Botcazou <ebotcazou@adacore.com>
16821 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
16822 (set_end_locus_from_node): New function.
16823 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
16824 make and the function end_locus.
16825 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
16826 for the elaboration subprogram.
16827 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
16828 set the end_locus of the expression as well.
16830 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
16833 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
16834 variables that are referenced in exception handlers volatile.
16838 Copyright (C) 2011 Free Software Foundation, Inc.
16840 Copying and distribution of this file, with or without modification,
16841 are permitted in any medium without royalty provided the copyright
16842 notice and this notice are preserved.