1 2011-12-02 Bob Duff <duff@adacore.com>
3 * gnat_ugn.texi: Clarify usage of -p binder switch.
5 2011-12-02 Javier Miranda <miranda@adacore.com>
7 * sem_util.ads, sem_util.adb, sem_aux.ads, sem_aux.adb
8 (Effectively_Has_Constrained_Partial_View): Moved to sem_aux
9 (In_Generic_Body): Moved to sem_aux.
10 (Unit_Declaration_Node): Moved to sem_aux.
11 * einfo.ads (Effectively_Has_Constrained_Partial_View): Complete
13 * exp_attr.adb, live.adb, sem_ch10.adb, checks.adb, sem.adb,
14 rtsfind.adb, sem_attr.adb, sem_elab.adb, exp_ch4.adb, sem_ch4.adb,
15 exp_ch13.adb: Add with-clause on Sem_Aux.
17 2011-12-02 Yannick Moy <moy@adacore.com>
19 * sem_util.adb (Unique_Name): Reach through Unique_Entity to
20 get the name of the entity.
21 (Unique_Entity): Correct case for subprogram stubs.
23 2011-12-02 Yannick Moy <moy@adacore.com>
25 * sem_ch3.adb (Check_Initialization): Do not emit warning on
26 initialization of limited type object in Alfa mode.
28 2011-12-02 Robert Dewar <dewar@adacore.com>
30 * sinfo.ads: Minor reformatting.
31 * gnat_ugn.texi: Fix confusion in use of term "type name".
33 2011-12-02 Robert Dewar <dewar@adacore.com>
35 * sem_ch6.adb: Minor change in error message.
37 2011-12-02 Robert Dewar <dewar@adacore.com>
39 * sem_ch9.adb, prj-part.adb, vms_data.ads, sem_ch8.adb: Minor
42 2011-12-02 Javier Miranda <miranda@adacore.com>
44 * sem_ch3.adb (Constrain_Access): Enable on Ada 2005 mode the
45 static check of the rule of general access types whose designated
46 type has discriminants.
47 * sem_util.ads, sem_util.adb
48 (Effectively_Has_Constrained_Partial_View): New subprogram.
49 (In_Generic_Body): New subprogram.
50 * einfo.ads (Has_Constrained_Partial_View): Adding documentation.
51 * sem_prag.adb (Inside_Generic_Body): Removed. Replaced by new
52 subprogram In_Generic_Body.
53 * exp_attr.adb, checks.adb, sem_attr.adb, exp_ch4.adb,
54 sem_ch4.adb: In addition, this patch replaces the occurrences of
55 Has_Constrained_Partial_View by
56 Effectively_Has_Constrained_Partial_View.
58 2011-12-02 Matthew Heaney <heaney@adacore.com>
60 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Iterator): Rename
62 (Finalize): Remove unnecessary access check.
63 (First): Forward to First_Child.
64 (Last): Forward to Last_Child.
65 (Iterate): Check preconditions for parent node parameter.
66 (Next): Forward to Next_Sibling.
67 (Previous): Forward to Previous_Sibling.
69 2011-12-02 Robert Dewar <dewar@adacore.com>
71 * a-coinve.adb, a-coorma.adb, freeze.adb, a-coorse.adb, a-comutr.adb,
72 a-coormu.adb, a-convec.adb: Minor reformatting.
74 2011-12-02 Matthew Heaney <heaney@adacore.com>
76 * a-coormu.ads, a-ciormu.ads: Declare iterator factory function.
77 * a-ciormu.adb, a-ciormu.adb (Iterator): Declare concrete
79 (Finalize): Decrement busy counter.
80 (First, Last): Cursor return value depends on iterator node value.
81 (Iterate): Use start position as iterator node value.
82 (Next, Previous): Forward to corresponding cursor-based operation.
84 2011-12-02 Robert Dewar <dewar@adacore.com>
86 * a-cborma.adb, a-cbhama.adb, a-cbdlli.adb, a-cbmutr.adb,
87 a-cbhase.adb, a-cdlili.adb, a-cihama.adb, a-ciorse.adb, a-cidlli.adb,
88 a-cimutr.adb, a-cihase.adb, a-cohama.adb, a-cborse.adb,
89 a-ciorma.adb, a-cobove.adb: Minor reformatting.
91 2011-12-01 Jakub Jelinek <jakub@redhat.com>
94 * gcc-interface/Make-lang.in: Initialize RTS_DIR with = instead of :=.
96 2011-11-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
98 * s-taprop-tru64.adb (Create_Task): Use Unrestricted_Access.
100 2011-11-23 Thomas Quinot <quinot@adacore.com>
102 * thread.c, s-oscons-tmplt.c: Generate __gnat_pthread_condattr_setup
103 only on platforms where this is required, as determined by
106 2011-11-23 Ed Schonberg <schonberg@adacore.com>
108 * sem_ch9.adb: No check on entry index if error on index.
110 2011-11-23 Gary Dismukes <dismukes@adacore.com>
112 * sem_ch6.adb (Analyze_Return_Statement): Improve error messages for
113 return statements nested inside an extended_return_statement.
114 * gcc-interface/Make-lang.in: Update dependencies.
115 * gcc-interface/Makefile.in (MISCLIB): Add -lutil for BSD targets.
117 2011-11-23 Ed Schonberg <schonberg@adacore.com>
119 * freeze.adb (Freeze_All_Ent): An incomplete type is not
120 frozen by a subprogram body that does not come from source.
122 2011-11-23 Pascal Obry <obry@adacore.com>
124 * s-oscons-tmplt.c: Add PTY_Library constant. It contains
125 the library for pseudo terminal support.
126 * g-exptty.ads: Add pseudo-terminal library into a Linker_Options
129 2011-11-23 Ed Schonberg <schonberg@adacore.com>
131 * sem_ch9.adb: No check on entry family index if generic.
133 2011-11-23 Thomas Quinot <quinot@adacore.com>
135 * sem_ch9.adb, s-taprop.ads, s-taprop-hpux-dce.adb, s-taprop-irix.adb,
136 s-taprop-posix.adb, s-taprop-rtx.adb, s-taprop-solaris.adb,
137 s-taprop-tru64.adb, s-taprop-vxworks.adb: Move dependency on
138 System.OS_Constants from shared spec of
139 System.Tasking.Primitive_Operations to the specific body variants
140 that really require this dependency.
142 2011-11-23 Ed Schonberg <schonberg@adacore.com>
144 * sem_ch8.adb (Analyze_Subprogram_Renaming_Declaration):
145 If the declaration has aspects, analyze them so they can be
148 2011-11-23 Hristian Kirtchev <kirtchev@adacore.com>
150 * a-comutr.adb, a-coorma.adb, a-coorse.adb, a-convec.adb, a-cihase.adb,
151 a-cimutr.adb, a-coinve.adb, a-ciorma.adb, a-ciorse.adb, a-cobove.adb,
152 a-cohama.adb, a-cihama.adb, a-cidlli.adb, a-cdlili.adb, a-cbhama.adb,
153 a-cbhase.adb, a-cbmutr.adb, a-cborma.adb, a-cborse.adb, a-cbdlli.adb:
154 Add with and use clause for Ada.Finalization. Type
155 Iterator and Child_Iterator are now derived from Limited_Controlled.
156 (Finalize): New routine.
157 (Iterate): Add a renaming of counter Busy and
158 increment it. Update the return aggregate.
159 (Iterate_Children): Add a renaming of
160 counter Busy and increment it. Update the return aggregate.
161 (Iterate_Subtree): Add a renaming of counter Busy and increment
162 it. Update the return aggregate.
163 * a-cdlili.ads, a-cidlli.ads: Type List_Access is now a general access
165 * a-cihama.ads: Type Map_Access is now a general access type.
166 * a-comutr.ads, a-cimutr.ads: Use type Natural for the two locks
167 associated with the tree.
168 * a-cohama.ads: Type Map_Access is now a general access type.
169 * a-coinve.ads, a-convec.ads: Type Vector_Access is now a general
171 * exp_ch5.adb (Expand_Iterator_Loop): Do not create a block
172 to wrap the loop as this is done at an earlier step, during
173 analysis. The declarations of the iterator and the cursor use
174 the usual Insert_Action mechanism when added into the tree.
175 * sem_ch5.adb (Analyze_Loop_Statement): Remove local constant
176 Loop_Statement and replace all respective uses by N. Add local
177 constant Loc. Preanalyze the loop iterator to discover whether
178 it is a container iterator and if it is, wrap the loop in a
179 block. This ensures that any controlled temporaries produced
180 by the iteration scheme share the same lifetime of the loop.
181 (Is_Container_Iterator): New routine.
182 (Is_Wrapped_In_Block): New routine.
183 (Pre_Analyze_Range): Move spec and body to the library level.
185 2011-11-23 Sergey Rybin <rybin@adacore.com frybin>
187 * gnat_ugn.texi, vms_data.ads: Add documentation for new gnatpp option
188 that controls casing of type and subtype names.
190 2011-11-23 Yannick Moy <moy@adacore.com>
192 * sem_ch3.adb: Minor addition of comments.
194 2011-11-23 Thomas Quinot <quinot@adacore.com>
196 * prj-part.adb (Extension_Withs): New global variable,
197 contains the head of the list of WITH clauses from the EXTENDS
198 ALL projects for which virtual packages are being created.
199 (Look_For_Virtual_Projects_For): When recursing through
200 an EXTENDS ALL, add the WITH clauses of the extending
201 project to Extension_Withs. When adding a project to the
202 Virtual_Hash, record the associated Extension_Withs list.
203 (Create_Virtual_Extending_Project): Add a copy of the appropriate
204 Extension_Withs to the virtual project.
206 2011-11-23 Thomas Quinot <quinot@adacore.com>
208 * mlib-tgt-specific-vxworks.adb: Minor reformatting.
210 2011-11-23 Thomas Quinot <quinot@adacore.com>
212 * Make-generated.in (Sdefault.Target_Name): Set to
213 $(target_noncanonical) instead of $(target) for consistency.
215 2011-11-23 Matthew Heaney <heaney@adacore.com>
217 * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb (Iterator): Declared
218 Iterator type as limited (First, Last): Cursor return value
219 depends on iterator node value (Iterate): Use start position as
220 iterator node value (Next, Previous): Forward to corresponding
221 cursor-based operation.
223 2011-11-23 Matthew Heaney <heaney@adacore.com>
225 * a-coorse.ads, a-ciorse.ads, a-cborse.ads (Set_Iterator_Interfaces):
226 Renamed from Ordered_Set_Iterator_Interfaces.
227 * a-coorse.adb, a-ciorse.adb, a-cborse.adb (Iterator): Declared
228 Iterator type as limited (First, Last): Cursor return value
229 depends on iterator node value (Iterate): Use start position as
230 iterator node value (Next, Previous): Forward to corresponding
231 cursor-based operation.
232 * a-cohase.ads, a-cohase.adb: Implemented forward iterator.
233 * a-cihase.adb, a-cbhase.adb (Iterator): Removed unnecessary
234 node component (First, Next): Forward call to corresponding
235 cursor-based operation (Iterate): Representation of iterator no
236 longer has node component
238 2011-11-23 Hristian Kirtchev <kirtchev@adacore.com>
240 * exp_intr.adb (Expand_Unc_Deallocation): Ensure that the
241 dereference has a proper type before the side effect removal
243 * sem_ch3.adb (Analyze_Subtype_Declaration): Handle a rare case
244 where the base type of the subtype is a private itype created
245 to act as the partial view of a constrained record type. This
246 scenario manifests with equivalent class-wide types for records
247 with unknown discriminants.
249 2011-11-23 Jerome Guitton <guitton@adacore.com>
251 * s-osprim-vxworks.adb (Clock): Use Clock_RT_Ada.
253 2011-11-23 Thomas Quinot <quinot@adacore.com>
255 * s-oscons-tmplt.c: Fix unbalanced preprocessor directives Minor
256 reformatting/reorganization.
258 2011-11-23 Thomas Quinot <quinot@adacore.com>
260 * g-htable.ads: Remove old comments.
262 2011-11-23 Thomas Quinot <quinot@adacore.com>
264 * exp_imgv.adb: Minor reformatting.
266 2011-11-23 Robert Dewar <dewar@adacore.com>
268 * sem_ch9.adb (Analyze_Entry_Declaration): Check for entry
269 family bounds out of range.
271 2011-11-23 Matthew Heaney <heaney@adacore.com>
273 * a-cohama.adb, a-cihama.adb, a-cbhama.adb (Iterator): Declare
274 type as limited, and remove node component.
275 (First, Next): Forward call to corresponding cursor-based operation.
276 (Iterate): Representation of iterator no longer has node component.
278 2011-11-23 Yannick Moy <moy@adacore.com>
280 * exp_util.adb: Revert previous change to remove side-effects in Alfa
281 mode, which is not the correct thing to do for renamings.
283 2011-11-23 Thomas Quinot <quinot@adacore.com>
285 * s-osinte-hpux.ads, s-taprop-vxworks.adb, s-taprop-tru64.adb,
286 s-osinte-vxworks.ads, s-osinte-aix.ads, s-osinte-lynxos.ads,
287 s-osinte-solaris-posix.ads, s-taprop-solaris.adb, a-exetim-posix.adb,
288 s-osinte-irix.ads, s-osinte-solaris.ads, s-oscons-tmplt.c,
289 s-taprop-irix.adb, s-osinte-hpux-dce.ads, Makefile.rtl,
290 s-osinte-tru64.ads, s-osinte-darwin.ads, s-taprop.ads,
291 s-osinte-freebsd.ads, s-osinte-lynxos-3.ads, s-taprop-hpux-dce.adb,
292 s-taprop-posix.adb: Remove hard-coded clock ids;
293 instead, generate them in System.OS_Constants.
294 (System.OS_Constants.CLOCK_RT_Ada): New constant denoting the
295 id of the clock providing Ada.Real_Time.Monotonic_Clock.
296 * thread.c: New file.
297 (__gnat_pthread_condattr_setup): New function. For platforms where
298 CLOCK_RT_Ada is not CLOCK_REALTIME, set appropriate condition
301 2011-11-23 Yannick Moy <moy@adacore.com>
303 * sem_ch3.adb: Restore the use of Expander_Active instead of
304 Full_Expander_Active, so that the evaluation is forced in Alfa
305 mode too. Otherwise, we end up with an unexpected insertion in a
306 place where it is not supposed to happen, on default parameters
309 2011-11-23 Thomas Quinot <quinot@adacore.com>
311 * prj-pp.adb, prj-pp.ads: Minor new addition: wrapper procedure "wpr"
312 for Pretty_Print, for use from within gdb.
314 2011-11-23 Ed Schonberg <schonberg@adacore.com>
316 * exp_ch5.adb (Expand_Iterator_Loop): Wrap the expanded loop
317 and the cursor declarations in a block, so that the loop variable
318 is local to the construct.
320 2011-11-23 Matthew Heaney <heaney@adacore.com>
322 * a-coorma.ads, a-ciorma.ads, a-cborma.ads (Iterate): Returns
323 type Reversible_Iterator'Class.
324 * a-coorma.adb, a-ciorma.adb, a-cborma.adb (Iterator):
325 Declare type as limited.
326 (First, Last): Return value depends on iterator's start node value.
327 (Next, Previous): Call corresponding Cursor-based operation.
328 (Iterate): Indicate whether complete or partial iteration
330 2011-11-23 Robert Dewar <dewar@adacore.com>
332 * errout.adb: Minor reformattin (Finalize): Take templates into
333 account for warning suppression.
334 * errout.ads (Set_Specific_Warning_Off): Add Used parameter.
335 * erroutc.adb: Minor reformatting (Finalize): Take generic
336 templates into account for warning suppress.
337 * erroutc.ads (Set_Specific_Warning_Off): Add Used parameter.
338 * sem_prag.adb: Minor reformatting (Analyze_Pragma,
339 case Warnings): Provide Used parameter in call to
340 Set_Specific_Warnings_Off (to deal with generic template case).
342 2011-11-23 Pascal Obry <obry@adacore.com>
344 * sem_prag.adb (Process_Convention): Better error message for
345 stdcall convention on dispatching calls.
347 2011-11-23 Gary Dismukes <dismukes@adacore.com>
349 * sem_ch4.adb, sem_ch13.adb: Minor reformatting.
351 2011-11-23 Javier Miranda <miranda@adacore.com>
353 * exp_ch6.adb (Expand_Simple_Function_Return): Add missing
354 implicit type conversion when the returned object is allocated
355 in the secondary stack and the type of the returned object is
356 an interface. Done to force generation of displacement of the
359 2011-11-23 Pascal Obry <obry@adacore.com>
361 * impunit.adb: Add g-exptty and g-tty units.
363 2011-11-23 Robert Dewar <dewar@adacore.com>
365 * exp_imgv.adb: Minor code reorganization (use Make_Temporary).
367 2011-11-23 Robert Dewar <dewar@adacore.com>
369 * exp_util.adb, par-ch6.adb, sem_res.adb, par-util.adb: Minor
372 2011-11-23 Yannick Moy <moy@adacore.com>
374 * sem_ch13.adb (Analyze_Aspect_Specifications): Place error on
375 line of precondition/ postcondition/invariant.
377 2011-11-23 Pascal Obry <obry@adacore.com>
379 * g-exptty.ads, g-exptty.adb, g-tty.ads, g-tty.adb,
380 terminals.c: New files.
381 Makefile.rtl: Add these new files.
382 * gnat_rm.texi: Add documentation for GNAT.Expect.TTY.
383 * gcc-interface/Makefile.in: Add g-exptty, g-tty, terminals.o
384 * gcc-interface/Make-lang.in: Update dependencies.
386 2011-11-21 Robert Dewar <dewar@adacore.com>
388 * exp_imgv.adb (Expand_Width_Attribute): Handle case of Discard_Names.
389 * sem_attr.adb (Eval_Attribute, case Width): Ditto.
391 2011-11-21 Thomas Quinot <quinot@adacore.com>
393 * sinfo.ads: Minor reformatting.
395 2011-11-21 Yannick Moy <moy@adacore.com>
397 * exp_util.adb: Minor reformatting. Update comments.
399 2011-11-21 Robert Dewar <dewar@adacore.com>
401 * exp_prag.adb, exp_util.adb, sinfo.ads, sem_res.adb, s-stposu.adb,
402 sem_attr.adb, s-stposu.ads, s-taprop-solaris.adb, s-taprop-irix.adb,
403 sem_ch6.adb: Minor reformatting.
405 2011-11-21 Arnaud Charlet <charlet@adacore.com>
407 * s-taprop-irix.adb, s-taprop-solaris.adb (Create_Task): Use
408 Unrestricted_Access to deal with fact that we properly detect the
409 error if Access is used.
410 * gcc-interface/Make-lang.in: Update dependencies.
412 2011-11-21 Yannick Moy <moy@adacore.com>
414 * exp_prag.adb (Expand_Pragma_Check): Place error on first character
416 * sem_res.adb (Resolve_Short_Circuit): Place error on first
417 character of expression.
419 2011-11-21 Yannick Moy <moy@adacore.com>
421 * exp_util.adb (Remove_Side_Effects): Do nothing in Alfa mode.
423 2011-11-21 Hristian Kirtchev <kirtchev@adacore.com>
425 * exp_attr.adb (Expand_N_Attribute_Reference, case
426 Max_Size_In_Storage_Elements): Account for the size of the
427 hidden list header which precedes controlled objects allocated
429 * rtsfind.ads: Add RE_Header_Size_With_Padding to the runtime
431 * sinfo.adb (Header_Size_Added): New routine.
432 (Set_Header_Size_Added): New routine.
433 * sinfo.ads: Add flag Controlled_Header_Added along with
435 (Header_Size_Added): New inlined routine.
436 (Set_Header_Size_Added): New inlined routine.
437 * s-stposu.adb (Allocate_Any_Controlled): Use
438 Header_Size_With_Padding to calculate the proper
440 (Deallocate_Any_Controlled): Use
441 Header_Size_With_Padding to calculate the proper size
442 of the header. (Header_Size_With_Padding): New routine.
443 (Nearest_Multiple_Rounded_Up): Removed along with its uses.
444 * s-stposu.ads (Header_Size_With_Padding): New routine.
446 2011-11-21 Ed Schonberg <schonberg@adacore.com>
448 * aspects.adb: Aspect specifications are allowed on renaming
450 * par-ch6.adb (P_Subprogram): Parse aspect specifications in a
451 subprogram renaming declaration
453 2011-11-21 Tristan Gingold <gingold@adacore.com>
455 * env.c: Remove unused declaration.
457 2011-11-21 Pascal Obry <obry@adacore.com>
459 * s-os_lib.ads: Minor style fix.
461 2011-11-21 Pascal Obry <obry@adacore.com>
463 * adaint.c (__gnat_dup2): When fd are stdout, stdin or stderr and
464 identical, do nothing on Windows XP.
466 2011-11-21 Yannick Moy <moy@adacore.com>
468 * sem_ch3.adb (Constrain_Index, Process_Range_Expr_In_Decl):
469 Use Full_Expander_Active instead of Expander_Active to control
470 the forced evaluation of expressions for the sake of generating
473 2011-11-21 Thomas Quinot <quinot@adacore.com>
475 * init.c: On FreeBSD, stack checking failures may raise SIGBUS.
477 2011-11-21 Tristan Gingold <gingold@adacore.com>
479 * sysdep.c (mode_read_text, mode_write_text, mode_append_text,
480 mode_read_binary, mode_write_binary, mode_append_binary,
481 mode_read_text_plus, mode_write_text_plus, mode_append_text_plus,
482 mode_read_binary_plus, mode_write_binary_plus,
483 mode_append_binary_plus): Remove unused declarations.
485 2011-11-21 Yannick Moy <moy@adacore.com>
487 * gnat_rm.texi: Minor rewording.
489 2011-11-21 Hristian Kirtchev <kirtchev@adacore.com>
491 * exp_imgv.adb (Expand_Width_Attribute): Emit
492 an error message rather than a warning when pragma Discard_Names
493 prevents the computation of 'Width. Do not emit an error through
496 2011-11-21 Javier Miranda <miranda@adacore.com>
498 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add
499 implicit type conversion when the type of the allocator is an
500 interface. Done to force generation of displacement of the "this"
501 pointer when required.
503 2011-11-21 Ed Schonberg <schonberg@adacore.com>
505 * sinfo.ads, sinfo.adb: Corresponding_Spec applies to expression
506 functions, and is set when the expression is a completion of a
507 previous declaration.
508 * sem_ch6.adb (Analyze_Expression_Function): To determine properly
509 whether an expression function completes a previous declaration,
510 use Find_Corresponding_Spec, as when analyzing a subprogram body.
512 2011-11-21 Steve Baird <baird@adacore.com>
514 * sem_util.adb (Deepest_Type_Access_Level): Improve comment.
515 (Type_Access_Level): Improve comment.
517 2011-11-21 Eric Botcazou <ebotcazou@adacore.com>
519 * gcc-interface/Makefile.in (INCLUDES_FOR_SUBDIR): Add $(fsrcdir) by
520 means of -iquote unconditionally.
522 2011-11-21 Robert Dewar <dewar@adacore.com>
524 * sem_ch3.adb, sem_util.adb, sem_res.adb, sem_attr.adb: Minor
527 2011-11-21 Arnaud Charlet <charlet@adacore.com>
529 * s-taprop-posix.adb (Create_Task): Use Unrestricted_Access
530 to deal with fact that we properly detect the error if Access
533 2011-11-21 Steve Baird <baird@adacore.com>
535 * sem_util.ads: Update comment describing function
536 Deepest_Access_Level.
537 * sem_util.adb (Deepest_Type_Access_Level): Return Int'Last for a
539 (Type_Access_Level): Return library level
540 for a generic formal type.
541 * sem_attr.adb (Resolve_Attribute): Replace two Type_Access_Level
542 calls with calls to Deepest_Type_Access_Level.
543 * sem_ch3.adb (Analyze_Component_Declaration): replace a
544 Type_Access_Level call with a call to Deepest_Type_Access_Level.
545 * sem_res.adb (Resolve_Allocator.Check_Allocator_Discrim_Accessibility):
546 Replace three Type_Access_Level calls with calls to
547 Deepest_Type_Access_Level.
548 (Resolve_Allocator): Replace a Type_Access_Level call with a call to
549 Deepest_Type_Access_Level.
550 (Valid_Conversion.Valid_Array_Conversion): Replace a
551 Type_Access_Level call with a call to Deepest_Type_Access_Level.
553 2011-11-21 Robert Dewar <dewar@adacore.com>
555 * sem_ch3.adb, s-taprop-vms.adb, opt.ads: Minor reformatting.
557 2011-11-21 Robert Dewar <dewar@adacore.com>
559 * sinput.ads: Minor comment fix.
561 2011-11-21 Robert Dewar <dewar@adacore.com>
563 * exp_attr.adb (Expand_N_Attribute_Reference, case First_Bit,
564 Last_Bit, Position): Handle 2005 case.
566 2011-11-21 Robert Dewar <dewar@adacore.com>
568 * s-atocou-builtin.adb (Decrement): Use Unrestricted_Access
569 to deal with fact that we properly detect the error if Access
571 (Increment): Same fix.
572 * s-taprop-linux.adb (Create_Task): Use Unrestricted_Access
573 to deal with fact that we properly detect the error if Access
575 * sem_util.adb (Is_Volatile_Object): Properly record that A.B is
576 volatile if the B component is volatile. This affects the check
577 for passing such a by reference volatile actual to a non-volatile
578 formal (which should be illegal)
580 2011-11-21 Robert Dewar <dewar@adacore.com>
582 * freeze.adb (Freeze_Enumeration_Type): Make sure to set both
583 size and alignment for foreign convention enumeration types.
584 * layout.adb (Set_Elem_Alignment): Redo setting of alignment
587 2011-11-21 Yannick Moy <moy@adacore.com>
589 * checks.adb (Apply_Access_Check, Apply_Arithmetic_Overflow_Check,
590 Apply_Discriminant_Check, Apply_Divide_Check,
591 Apply_Selected_Length_Checks, Apply_Selected_Range_Checks,
592 Build_Discriminant_Checks, Insert_Range_Checks, Selected_Length_Checks,
593 Selected_Range_Checks): Replace reference to Expander_Active
594 with reference to Full_Expander_Active, so that expansion of
595 checks is not performed in Alfa mode
597 2011-11-21 Tristan Gingold <gingold@adacore.com>
599 * s-taprop-vms.adb (Create_Task): Use Unrestricted_Access to deal with
600 fact that we properly detect the error if Access is used.
602 2011-11-21 Hristian Kirtchev <kirtchev@adacore.com>
604 * par-ch4.adb (P_Quantified_Expression): Add an Ada 2012 check.
606 2011-11-21 Hristian Kirtchev <kirtchev@adacore.com>
608 * exp_imgv.adb: Add with and use clause for Errout.
609 (Expand_Width_Attribute): Emit a warning when in
610 configurable run-time mode to provide a better diagnostic message.
612 2011-11-21 Hristian Kirtchev <kirtchev@adacore.com>
614 * s-finmas.adb (Finalize): Add comment concerning double finalization.
616 2011-11-21 Ed Schonberg <schonberg@adacore.com>
618 * sem_ch3.adb (Access_Definition): If the access definition
619 is itself the return type of an access to function definition
620 which is ultimately the return type of an access to subprogram
621 declaration, its scope is the enclosing scope of the ultimate
622 access to subprogram.
624 2011-11-21 Steve Baird <baird@adacore.com>
626 * sem_res.adb (Valid_Conversion): If a conversion was legal
627 in the body of a generic, then the corresponding conversion is
628 legal in the expanded body of an instance of the generic.
630 2011-11-21 Robert Dewar <dewar@adacore.com>
632 * sem_ch3.adb: Minor reformatting.
634 2011-11-21 Robert Dewar <dewar@adacore.com>
636 * s-utf_32.adb (Is_UTF_32_Line_Terminator): Recognize NEL as
638 * sinput.ads: Add section on Handling of Source Line Terminators.
639 * types.ads (Line_Terminator): Adjust comments.
641 2011-11-21 Robert Dewar <dewar@adacore.com>
643 * frontend.adb (Frontend): Capture restrictions from config files
644 * lib-load.adb (Load_Unit): Save/set/restore restriction pragma
646 * lib-xref.adb (Generate_Reference): Fix handling of obsolescent
647 references. This was noticed during debugging, but it is not
648 known if it causes real bugs.
649 * restrict.ads, restrict.adb: New routines to save/set/restore
650 non-partition-wide restrictions.
651 * s-rident.ads: Comment changes for new handling of
653 * sem.adb (Sem): Save/Set/Restore non-partition-wide restrictions
654 * sem_ch10.adb (Analyze_Compilation_Unit): Remove incomplete
655 attempt to save/restore non-partition-wide restrictions (now
656 this work is all done in Sem).
657 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
658 Special handling for restriction No_Elaboration_Code.
660 2011-11-21 Robert Dewar <dewar@adacore.com>
662 * gnat_ugn.texi: Document new handling of restrictions pragmas.
664 2011-11-21 Pascal Obry <obry@adacore.com>
666 * s-taprop-linux.adb (Initialize_Lock): Do not allocate a cond
667 attribute as not needed.
669 2011-11-21 Robert Dewar <dewar@adacore.com>
671 * sem_prag.adb: Minor reformatting.
673 2011-11-21 Pascal Obry <obry@adacore.com>
675 * gnat_rm.texi: Document restriction for stdcall convention on
678 2011-11-21 Pascal Obry <obry@adacore.com>
680 * sem_prag.adb (Process_Convention): A dispatching call cannot
681 have a stdcall calling convention.
683 2011-11-21 Pascal Obry <obry@adacore.com>
685 * s-taprop-linux.adb (Initialize_Lock): Do not allocate a
686 mutex attribute as not needed.
687 (Initialize_TCB): Likewise.
688 (Initialize): Likewise.
690 2011-11-21 Robert Dewar <dewar@adacore.com>
692 * sem_ch6.adb (Is_Public_Subprogram_For): New procedure
693 (Process_PPCs): Invariants only apply to public subprograms.
695 2011-11-21 Robert Dewar <dewar@adacore.com>
697 * sem_util.adb, sem_util.ads, sem_attr.adb, restrict.adb,
698 restrict.ads: Fix for No_Implicit_Aliasing in the renames case.
700 2011-11-21 Robert Dewar <dewar@adacore.com>
702 * a-finali.ads: Use pragma Pure_12 for this unit
703 * aspects.adb: Add aspect Pure_12
704 * aspects.ads: Add aspect Pure_12
705 * opt.ads: Add note on Pure_12
706 * par-prag.adb: Add dummy entry for Pure_12
707 * sem_prag.adb: Implement Pure_12 pragma
708 * snames.ads-tmpl: Add Entry for Pure_12
710 2011-11-21 Sergey Rybin <rybin@adacore.com frybin>
712 * vms_data.ads: Add qualifiers for new gnatpp options
713 '--call_threshold' and '--par_threshold".
714 * gnat_ugn.texi: Add description for new gnatpp options
715 '--call_threshold' and '--par_threshold".
717 2011-11-21 Robert Dewar <dewar@adacore.com>
719 * lib.ads: Minor reformatting.
721 2011-11-21 Robert Dewar <dewar@adacore.com>
723 * lib-load.ads: Add comment.
725 2011-11-21 Gary Dismukes <dismukes@adacore.com>
727 * sem_elab.adb: Minor reformatting
729 2011-11-21 Robert Dewar <dewar@adacore.com>
731 * exp_ch6.adb: Minor reformatting.
733 2011-11-21 Ed Schonberg <schonberg@adacore.com>
735 * sem_ch12.adb (Check_Formal_Package_Instance): If a formal
736 subprogram of the formal package is covered by an others
737 association with a box initialization, no check is needed
738 against the actual in the instantiation of the formal package.
740 2011-11-21 Robert Dewar <dewar@adacore.com>
742 * sem_elab.adb (Check_Internal_Call_Continue): Suppress junk
743 elab warning from within precondition/postcondition etc.
745 2011-11-21 Ed Schonberg <schonberg@adacore.com>
747 * exp_ch6.adb (Expand_Actuals): In Ada 2012, a function call
748 with out parameters may generate assignments to force constraint
749 checks. These checks must be properly placed in the code after the
750 declaration or statement that contains the call.
752 2011-11-21 Fedor Rybin <frybin@adacore.com>
754 * gnat_ugn.texi: Adding info on current gnattest limitations an
755 support of -X option.
757 2011-11-21 Robert Dewar <dewar@adacore.com>
759 * a-cfdlli.adb, a-cbdlli.adb: Minor reformatting.
761 2011-11-20 Robert Dewar <dewar@adacore.com>
763 * exp_ch6.adb, exp_util.adb: Minor reformatting
765 2011-11-20 Eric Botcazou <ebotcazou@adacore.com>
767 * sinfo.ads (Reference): Document that it is OK to set
768 Is_Known_Non_Null on a temporary initialized to a N_Reference
771 2011-11-20 Matthew Heaney <heaney@adacore.com>
773 * a-cbdlli.adb, a-cfdlli.adb (Move): Set Last component to 0
776 2011-11-20 Eric Botcazou <ebotcazou@adacore.com>
778 * exp_ch6.adb (Make_Build_In_Place_Call_In_Assignment):
779 Declare NEW_EXPR local variable and attach the
780 temporary to it. Set Is_Known_Non_Null on the temporary.
781 (Make_Build_In_Place_Call_In_Object_Declaration): Likewise.
782 * exp_util.adb (Remove_Side_Effects): Set Is_Known_Non_Null on
783 the temporary created to hold the 'Reference of the expression,
785 * checks.adb (Install_Null_Excluding_Check): Bail out for the
786 Get_Current_Excep.all.all idiom generated by the expander.
788 2011-11-20 Eric Botcazou <ebotcazou@adacore.com>
790 * gcc-interface/trans.c (struct language_function): Add GNAT_RET.
791 (f_gnat_ret): New macro.
792 (struct nrv_data): Add GNAT_RET.
793 (finalize_nrv_unc_r): New helper function.
794 (finalize_nrv): Add GNAT_RET parameter. Copy it into DATA. If the
795 function returns unconstrained, use finalize_nrv_unc_r as callback.
796 (return_value_ok_for_nrv_p): Test the alignment of RET_OBJ only if
798 (Subprogram_Body_to_gnu): Pass GNAT_RET to finalize_nrv.
799 (gnat_to_gnu) <N_Return_Statement>: In the return-unconstrained case,
800 if optimization is enabled, record candidates for the Named Return
803 2011-11-20 Eric Botcazou <ebotcazou@adacore.com>
805 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Add comment.
806 (gnat_to_gnu) <N_Return_Statement>: Add 'else' to avoid doing a useless
807 test. Tweak default case.
808 <N_Goto_Statement>: Use better formatting.
809 * gcc-interface/utils2.c (maybe_wrap_malloc): Use INIT_EXPR instead of
810 MODIFY_EXPR to initialize the storage.
811 (build_allocator): Likewise.
813 2011-11-20 Eric Botcazou <ebotcazou@adacore.com>
815 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Adjust
816 call to components_to_record.
817 (components_to_record): Add FIRST_FREE_POS parameter. For the variant
818 part, reuse enclosing union even if there is a representation clause
819 on the Unchecked_Union. If there is a variant part, compute the new
820 first free position, if any. Adjust call to self. Use a single field
821 directly only if it hasn't got a representation clause or is placed at
822 offset zero. Create the variant part at offset 0 if all the fields
823 down to this level have a rep clause. Do not chain the variant part
824 immediately and adjust downstream.
825 Do not test ALL_REP before moving the fields without rep clause to the
826 previous level. Call create_rep_part to create the REP part and force
827 a minimum size on it if necessary. Do not chain it immediately.
828 Create a fake REP part if there are fields without rep clause that need
829 to be laid out starting from FIRST_FREE_POS.
830 At the end, chain the REP part and then the variant part.
831 (create_rep_part): New function.
832 (get_rep_part): Minor tweak.
833 * gcc-interface/utils.c (tree_code_for_record_type): Minor tweak.
835 2011-11-18 Iain Sandoe <iains@gcc.gnu.org>
838 * init.c (__gnat_error_handler) [Darwin]: Move workaround to the
839 bug filed as radar #10302855 from __gnat_error_handler to...
840 (__gnat_adjust_context_for_raise) [Darwin]: ...here. New function.
841 (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE) [Darwin]: Define.
843 2011-11-18 Tristan Gingold <gingold@adacore.com>
844 Iain Sandoe <iains@gcc.gnu.org>
847 * mlib-tgt-specific-darwin.adb (Archive_Indexer_Options): Remove.
848 * gcc-interface/Makefile.in (darwin): Remove ranlib special-casing.
850 2011-11-12 Iain Sandoe <iains@gcc.gnu.org>
852 * gcc-interface/Makefile.in (stamp-gnatlib-$(RTSDIR)): Don't link
854 (OSCONS_CPP, OSCONS_EXTRACT): New.
855 (./bldtools/oscons/xoscons): New target.
856 ($(RTSDIR)/s-oscons.ads): Likewise.
857 (gnatlib): Depend on $(RTSDIR)/s-oscons.ads.
858 * gcc-interface/Make-lang.in (ada/s-oscons.ads) Remove as dependency.
859 * Make-generated.in: Remove machinery to generate xoscons and
862 2011-11-10 Eric Botcazou <ebotcazou@adacore.com>
864 * fe.h (Serious_Errors_Detected): New macro.
865 * gcc-interface/gigi.h (build_atomic_load): Declare.
866 (build_atomic_store): Likewise.
867 * gcc-interface/trans.c (atomic_sync_required_p): New predicate.
868 (call_to_gnu): Add ATOMIC_SYNC parameter. Use local variable.
869 Build an atomic load for an In or In Out parameter if needed.
870 Build an atomic store for the assignment of an Out parameter if needed.
871 Build an atomic store to the target if ATOMIC_SYNC is true.
872 (present_in_lhs_or_actual_p): New predicate.
873 (gnat_to_gnu) <N_Identifier>: Build an atomic load if needed.
874 <N_Explicit_Dereference>: Likewise.
875 <N_Indexed_Component>: Likewise.
876 <N_Selected_Component>: Likewise.
877 <N_Assignment_Statement>: Adjust call to call_to_gnu.
878 Build an atomic store to the LHS if needed.
879 <N_Function_Call>: Adjust call to call_to_gnu.
880 * gcc-interface/utils2.c: Include toplev.h.
881 (resolve_atomic_size): New static function.
882 (build_atomic_load): New function.
883 (build_atomic_store): Likewise.
884 * gcc-interface/Make-lang.in (ada/utils2.o): Add toplev.h.
886 2011-11-07 Olivier Hainque <hainque@adacore.com>
888 * sigtramp-ppcvxw.c: Add general comments.
889 (CFI_COMMON_REGS): Remove rule for r1, as in other unwinders. Add
890 rules for r2 to r13, plus CTR and XER.
891 (CFA_REG): New, register number used to hold the local CFA.
892 (CFI_DEF_CFA, SIGTRAMP_BODY): Use it.
893 Make that 15, not 14, with documentation.
894 (TCR): Undef before definition, preventing conflict with reg number in
897 2011-11-07 Robert Dewar <dewar@adacore.com>
899 * exp_util.ads, exp_alfa.adb, a-cohama.adb, a-cohama.ads, sem_ch4.adb,
900 aspects.ads, exp_ch8.adb, exp_ch8.ads, atree.ads: Minor reformatting.
901 * gcc-interface/Make-lang.in: Update dependencies.
903 2011-11-07 Ed Schonberg <schonberg@adacore.com>
905 * exp_ch6.adb: A tagged type is a legal actual for an aliased
908 2011-11-07 Pascal Obry <obry@adacore.com>
910 * g-socket.adb, g-socket.ads: Minor reformatting.
912 2011-11-07 Robert Dewar <dewar@adacore.com>
914 * sem_res.adb (Resolve_Actuals): Minor error message improvement.
916 2011-11-07 Robert Dewar <dewar@adacore.com>
918 * gnat_ugn.texi: Add discussion of default mode handling of
919 source representation with no -gnatW option given, in particular
920 noting that NEL (next line) is not recognized in this context.
922 2011-11-07 Yannick Moy <moy@adacore.com>
924 * sem_util.adb (Note_Possible_Modification): In Alfa mode,
925 generate a reference for a modification even when the modification
926 does not come from source.
928 2011-11-07 Ed Schonberg <schonberg@adacore.com>
930 * exp_ch5.adb (Expand_Iterator_Loop): For the "of" iterator form,
931 use the indexing attributes rather than the Element function,
932 to obtain variable references.
933 * sem_ch4.adb (Try_Container_Indexing): Code cleanup. Use
934 Find_Aspect rather than iterating over representation
935 items. Improve error message.
936 * a-cohama.adb, a-cohama.ads Update to latest RM, with two versions
937 of Reference functions.
939 2011-11-07 Yannick Moy <moy@adacore.com>
941 * sem_util.adb (Unique_Entity): For a parameter on a subprogram
942 body that has a corresponding parameter on the subprogram
943 declaration, define the unique entity as being the declaration
946 2011-11-07 Ed Schonberg <schonberg@adacore.com>
948 * sem_ch6.adb (Analyze_Return_Type): In Ada 2012 mode, if the
949 return type of a function is the class-wide type of an incomplete
950 type T, T can be a Taft-amendment type and does not have to be
951 completed in the current private part.
953 2011-11-07 Ed Schonberg <schonberg@adacore.com>
955 * aspects.ads (Inherited_Aspect): Map that indicates type aspects
956 that are inherited by default, and apply to the class-wide type
958 * aspects.adb (Find_Aspect): If the entity is class-wide and the
959 aspect is inherited, use the aspect of the specific type.
961 2011-11-07 Hristian Kirtchev <kirtchev@adacore.com>
963 * exp_alfa.adb: Remove with and use clause for
964 Exp_Ch8. Add with and use clause for Exp_Util.
965 Remove local constant Disable_Processing_Of_Renamings.
966 (Expand_Alfa_N_Object_Renaming_Declaration): The expansion of
967 object renamings has been reenabled.
968 (Expand_Possible_Renaming):
969 The expansion of identifier and expanded names has been
970 reenabled. Perform the substitutions only for entities that
972 * exp_ch8.ads, exp_ch8.adb (Evaluate_Name): Moved to Exp_Util.
973 * exp_util.adb (Evaluate_Name): Moved from Exp_Ch8.
974 (Remove_Side_Effects): Alphabetize local variables. Add a guard
975 to avoid the infinite expansion of an expression in Alfa mode. Add
976 processing for function calls in Alfa mode.
977 * exp_util.ads (Evaliate_Name): Moved from Exp_Ch8.
979 2011-11-07 Ed Schonberg <schonberg@adacore.com>
981 * freeze.adb (Freeze_Entity): If the entity is an access to
982 subprogram whose designated type is itself a subprogram type,
983 its own return type must be decorated with size information.
985 2011-11-04 Arnaud Charlet <charlet@adacore.com>
987 * gcc-interface/Make-lang.in: Update dependencies.
989 2011-11-04 Robert Dewar <dewar@adacore.com>
991 * sprint.adb (Sprint_Node_Actual, case Qualified_Expression):
992 Avoid junk semicolon after argument of machine code Asm operand.
994 2011-11-04 Robert Dewar <dewar@adacore.com>
996 * exp_ch11.adb (Generate_Push_Pop): Inhibit push/pop nodes in
997 CodePeer mode or if restriction No_Exception_Handlers is present.
998 * exp_ch6.adb (Expand_N_Subprogram_Body): (Inhibit push/pop
999 nodes in CodePeer mode or if restriction No_Exception_Handlers
1002 2011-11-04 Robert Dewar <dewar@adacore.com>
1004 * s-tassta.adb, atree.ads, errout.adb, sinput.adb: Minor reformatting.
1006 2011-11-04 Ed Schonberg <schonberg@adacore.com>
1008 * sem_ch6.adb (Analyze_Subprogram_Specification): The
1009 specification is legal if it is a function that returns an
1010 abstract type, if it comes from an attribute renaming of a stream
1011 attribute of an abstract type.
1013 2011-11-04 Gary Dismukes <dismukes@adacore.com>
1015 * exp_util.adb (Is_Possibly_Unaligned_Object): In case of indexed
1016 components, check whether recursively check whether the prefix
1017 denotes an unaligned object.
1019 2011-11-04 Ed Schonberg <schonberg@adacore.com>
1021 * sem_prag.adb (Analyze_Pragma, case Debug): The argument of
1022 the pragma is legal if it is an expanded name that denotes a
1023 procedure that be can called without parameters.
1025 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
1027 * gnat_ugn.texi (Performance Considerations) <Vectorization
1028 of loops>: New sub-section. <Other Optimization Switches>:
1031 2011-11-04 Robert Dewar <dewar@adacore.com>
1033 * gnat_rm.texi: Minor reformatting.
1035 2011-11-04 Matthew Heaney <heaney@adacore.com>
1037 * a-convec.adb, a-coinve.adb, a-cobove.adb (Merge): Raise PE
1038 when Target and Source denote same non-empty object
1039 * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb (Merge): Ditto
1041 2011-11-04 Robert Dewar <dewar@adacore.com>
1043 * exp_attr.adb: Minor reformatting.
1045 2011-11-04 Ed Schonberg <schonberg@adacore.com>
1047 * exp_ch5.adb (Expand_Assign_Record): Do not generate a
1048 discriminant assignment within an initialization proc if the
1049 record is an unchecked union, as it can only come from the
1050 initialization of an unchecked union component.
1052 2011-11-04 Robert Dewar <dewar@adacore.com>
1054 * gnat_ugn.texi: Minor reformatting.
1056 2011-11-04 Robert Dewar <dewar@adacore.com>
1058 * par-labl.adb (Rewrite_As_Loop): Generate info msg rather than
1061 2011-11-04 Robert Dewar <dewar@adacore.com>
1063 * exp_ch4.adb: Minor code reorganization (remove junk obsolete
1066 2011-11-04 Hristian Kirtchev <kirtchev@adacore.com>
1068 * exp_alfa.adb: Add local constant
1069 Disable_Processing_Of_Renamings;
1070 (Expand_Alfa_N_Object_Renaming_Declaration): Disable
1071 the name evaluation of object renamings for now.
1072 (Expand_Potential_Renaming): Do not perform the substitution
1074 * exp_util.adb (Remove_Side_Effects): Remove processing for
1075 functions with side effects in Alfa mode.
1077 2011-11-04 Gary Dismukes <dismukes@adacore.com>
1079 * bindgen.adb (Gen_Elab_Calls): In the case
1080 of the AAMP target, set elaboration entities to 1 rather than
1083 2011-11-04 Ed Schonberg <schonberg@adacore.com>
1085 * sem_ch10.adb (Install_Limited_With_Unit): To establish the
1086 proper entities on the ancestors of a child unit that appear
1087 in a limited_with clause, follow the unit links because the
1088 units are not analyzed and scope information is incomplete.
1090 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
1092 * exp_ch4.adb (Expand_N_Selected_Component): Refine code
1093 setting the Atomic_Sync_Required flag to detect one more case.
1094 * exp_util.adb (Activate_Atomic_Synchronization): Refine code
1095 setting the Atomic_Sync_Required flag to exclude more cases,
1096 depending on the parent of the node to be examined.
1098 2011-11-04 Bob Duff <duff@adacore.com>
1100 * g-excact.adb: Minor: use named notation.
1102 2011-11-04 Ed Schonberg <schonberg@adacore.com>
1104 * sem_ch5.adb: Improve error messages for illegal iterators.
1106 2011-11-04 Hristian Kirtchev <kirtchev@adacore.com>
1108 * exp_alfa.adb: Add with and use clauses for Exp_Ch8 and
1110 (Expand_Alfa): Alphabetize cases on first choice. Add
1111 processing for object renaming declarations, identifiers and
1113 (Expand_Alfa_N_In): Remove useless return.
1114 (Expand_Alfa_N_Object_Renaming_Declaration): New routine.
1115 (Expand_Potential_Renaming): New routine.
1116 * exp_ch8.adb (Evaluate_Name): Moved to the top level.
1117 (Expand_N_Object_Declaration): Alphabetize local variables. Move
1118 Evaluate_Name out to the top level.
1119 * exp_ch8.ads (Evaluate_Name): Moved from body to package spec.
1120 * exp_util.adb (Remove_Side_Effects): Add processing for
1121 functions with side effects in Alfa mode.
1123 2011-11-04 Hristian Kirtchev <kirtchev@adacore.com>
1125 * gnat_rm.texi: Add entries for
1126 restrictions No_Relative_Delay, No_Requeue_Statements and
1127 No_Stream_Optimizations.
1129 2011-11-04 Ed Schonberg <schonberg@adacore.com>
1131 * sem_ch4.adb: Set type of entity in prefixed call, for
1132 completeness in a generic context.
1134 2011-11-04 Yannick Moy <moy@adacore.com>
1136 * sem_prag.adb: Minor refactoring (renaming of a parameter).
1138 2011-11-04 Robert Dewar <dewar@adacore.com>
1140 * atree.ads: Minor reformatting.
1142 2011-11-04 Robert Dewar <dewar@adacore.com>
1144 * checks.adb (Atomic_Synchronization_Disabled): Check -gnatd.d
1146 * exp_ch2.adb (Expand_Entity_Reference): Use
1147 Activate_Atomic_Synchronization
1148 * exp_ch4.adb (Expand_N_Explicit_Dereference): Use
1149 Activate_Atomic_Synchronization (Expand_N_Indexed_Compoonent):
1150 Activate_Atomic_Synchronization (Expand_N_Selected_Component):
1151 Use Activate_Atomic_Synchronization
1152 * exp_util.ads, exp_util.adb (Activate_Atomic_Synchronization): New
1154 * sinfo.ads, sinfo.adb (Atomic_Sync_Required): Can now apply to
1155 N_Selected_Component node
1157 2011-11-04 Robert Dewar <dewar@adacore.com>
1159 * sem_prag.adb, atree.ads, prj-env.adb, prj-env.ads: Minor reformatting.
1161 2011-11-04 Yannick Moy <moy@adacore.com>
1163 * atree.adb, atree.ads (Set_Original_Node): New set procedure.
1164 * sem_ch13.adb (Analyze_Aspect_Specifications/Pre_Post_Aspects):
1165 In ASIS mode, no splitting of aspects between conjuncts.
1166 (Analyze_Aspect_Specifications/Aspect_Test_Case): Make pragma
1167 expressions refer to the original aspect expressions through
1168 the Original_Node link. This is used in semantic analysis for
1169 ASIS mode, so that the original expression also gets analyzed.
1170 * sem_prag.adb (Preanalyze_TC_Args,
1171 Check_Precondition_Postcondition,
1172 Analyze_Pragma/Pragma_Test_Case): In ASIS mode, for a pragma
1173 generated from a source aspect, also analyze the original aspect
1175 (Check_Expr_Is_Static_Expression): New procedure
1176 similar to existing procedure Check_Arg_Is_Static_Expression,
1177 except called on expression inside pragma.
1179 2011-11-04 Tristan Gingold <gingold@adacore.com>
1181 * prj-env.adb, prj-env.ads (Find_Name_In_Path): New function, from
1182 Find_Project.Try_Path_Name.
1183 (Find_Project): Use Find_Name_In_Path to implement Try_Path_Name.
1185 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
1187 * s-atocou.ads (Atomic_Counter): Remove redundant pragma Volatile.
1189 2011-11-04 Pascal Obry <obry@adacore.com>
1191 * projects.texi: Add short description for qualifiers aggregate
1192 and aggregate library.
1194 2011-11-04 Matthew Heaney <heaney@adacore.com>
1196 * Makefile.rtl, impunit.adb: Added a-cogeso.ad[sb]
1197 * a-cgaaso.adb: Replaced implementation with instantiation
1199 * a-cogeso.ad[sb] This is the new Ada 2012 unit
1200 Ada.Containers.Generic_Sort
1202 2011-11-04 Robert Dewar <dewar@adacore.com>
1204 * exp_ch2.adb (Expand_Entity_Reference): Do not set
1205 Atomic_Sync_Required for the case of a prefix of an attribute.
1206 * exp_ch4.adb (Expand_N_Explicit_Dereference): May require
1207 atomic synchronization
1208 (Expand_N_Indexed_Component): Ditto.
1209 (Expand_B_Selected_Component): Ditto.
1210 * sem_prag.adb (Process_Suppress_Unsuppress):
1211 Disable/Enable_Atomic_Synchronization can now occur for array
1212 types with pragma Atomic_Components.
1213 * sinfo.ads, sinfo.adb (Atomic_Sync_Required): Can now occur on
1214 N_Explicit_Dereference nodes and on N_Indexed_Component nodes.
1216 2011-11-04 Gary Dismukes <dismukes@adacore.com>
1218 * gnat_ugn.texi: Editorial corrections for gnattest section.
1220 2011-11-04 Robert Dewar <dewar@adacore.com>
1222 * sem_prag.adb: Minor reformatting.
1223 * gnat_rm.texi: Update documentation for pragma Warnings (Off,
1225 * exp_ch2.adb (Expand_Entity_Reference): Only set
1226 Atomic_Sync_Required on entities that are variables. Doesn't
1227 make any sense on anything else.
1229 2011-11-04 Robert Dewar <dewar@adacore.com>
1231 * exp_ch2.adb (Expand_Entity_Reference): Extend handling of
1232 atomic sync to type case.
1233 * sem_prag.adb (Process_Suppress_Unsuppress): Atomic Sync can
1236 2011-11-04 Robert Dewar <dewar@adacore.com>
1238 * sem_warn.adb (Warn_On_Useless_Assignment): More accurate test
1240 * gcc-interface/Make-lang.in: Update dependencies.
1242 2011-11-04 Robert Dewar <dewar@adacore.com>
1244 * sem_prag.adb: Detect more cases of Long_Float inconsistencies at
1247 2011-11-04 Matthew Heaney <heaney@adacore.com>
1249 * Makefile.rtl, impunit.adb: Added a-sfecin.ads,
1250 * a-sfhcin.ads, a-sflcin.ads, a-sbecin.ad[sb], a-sbhcin.ad[sb],
1251 a-sblcin.ad[sb], a-suecin.ad[sb], a-suhcin.ad[sb], a-sulcin.ad[sb]
1252 * a-sfecin.ads, a-sfhcin.ads, a-sflcin.ads, a-sbecin.ad[sb],
1253 a-sbhcin.ad[sb], a-sblcin.ad[sb], a-suecin.ad[sb], a-suhcin.ad[sb],
1254 a-sulcin.ad[sb]: New files.
1256 2011-11-04 Geert Bosch <bosch@adacore.com>
1258 * i-forbla-unimplemented.ads, s-gecola.adb, s-gecola.ads,
1259 s-gerebl.adb, s-gerebl.ads, i-forbla.adb, i-forbla.ads,
1260 i-forlap.ads, i-forbla-darwin.adb, s-gecobl.adb, s-gecobl.ads,
1261 s-gerela.adb, s-gerela.ads: Remove partial interface to BLAS/LAPACK.
1262 * gcc-interface/Makefile.in: Remove libgnala and related objects.
1264 2011-11-04 Matthew Heaney <heaney@adacore.com>
1266 * a-cdlili.ad[sb], a-cidlli.ad[sb], a-coorse.ad[sb], a-ciorse.ad[sb],
1267 a-coorma.ad[sb], a-ciorma.ad[sb], a-coormu.ad[sb], a-ciormu.ad[sb],
1268 a-cohama.ad[sb], a-cihama.ad[sb], a-cohase.ad[sb], a-cihase.ad[sb],
1269 a-convec.ad[sb], a-coinve.ad[sb] (Assign, Copy): New operations
1272 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
1274 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Do not assert
1275 that the type of the parameters isn't dummy in type_annotate_only mode.
1277 2011-11-04 Robert Dewar <dewar@adacore.com>
1279 * sem_ch12.adb: Minor reformatting
1281 2011-11-04 Gary Dismukes <dismukes@adacore.com>
1283 * bindgen.adb (Gen_Elab_Calls): In the case of the AAMP target,
1284 initialize elaboration entities to zero when specs are processed.
1286 2011-10-28 Iain Sandoe <iains@gcc.gnu.org>
1287 Eric Botcazou <ebotcazou@adacore.com>
1290 * init.c (__gnat_error_handler) [Darwin]: Apply a work-around to the
1291 bug filed as radar #10302855 (inconsistent unwind data for sigtramp).
1293 2011-10-28 Eric Botcazou <ebotcazou@adacore.com>
1296 * gcc-interface/Makefile.in (SYMDEPS): Delete.
1297 (LIBICONV): New variable.
1298 (LIBICONV_DEP): Likewise.
1299 (LIBS): Add $(LIBICONV).
1300 (LIBDEPS): Add $(LIBICONV_DEP).
1301 (EXTRA_GNATTOOLS_OBJS): Merge into...
1302 (TOOLS_LIBS): ...this. Add $(LIBICONV).
1304 2011-10-26 Eric Botcazou <ebotcazou@adacore.com>
1306 * gcc-interface/decl.c (elaborate_expression_1): Add EXPR_PUBLIC_P local
1307 variable. Always create the elaboration variable, if any, as constant.
1309 2011-10-26 Eric Botcazou <ebotcazou@adacore.com>
1311 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Try to
1312 make a packable type for fields of union types as well.
1313 <is_type>: Use RECORD_OR_UNION_TYPE_P predicate.
1314 (gnat_to_gnu_component_type): Try to make a packable type for fields
1315 of union types as well.
1316 (make_packable_type): Use RECORD_OR_UNION_TYPE_P predicate.
1317 (maybe_pad_type): Try to make a packable type for fields of union types
1319 (gnat_to_gnu_field): Likewise.
1320 (is_variable_size): Use RECORD_OR_UNION_TYPE_P predicate.
1321 (set_rm_size): Likewise.
1322 (rm_size): Likewise.
1323 * gcc-interface/misc.c (gnat_type_max_size): Likewise.
1324 * gcc-interface/trans.c (add_decl_expr): Likewise.
1325 * gcc-interface/utils.c (finish_record_type): Likewise.
1326 * gcc-interface/utils2.c (build_simple_component_ref): Likewise.
1328 2011-10-26 Eric Botcazou <ebotcazou@adacore.com>
1330 * gcc-interface/decl.c (gnat_to_gnu_field): Always check components
1331 declared as atomic. Move around conditionally executed code.
1333 2011-10-24 Robert Dewar <dewar@adacore.com>
1335 * sem.adb (Initialize): Fix bug that blew up if called a second time.
1337 2011-10-24 Robert Dewar <dewar@adacore.com>
1339 * tb-alvxw.c, tracebak.c, expect.c, initflt.c, tb-alvms.c,
1340 tb-ivms.c, tb-gcc.c: Update headers to GPL 3.
1342 2011-10-24 Robert Dewar <dewar@adacore.com>
1344 * sem_prag.adb (Analyze_Pragma, case Debug): Give proper pragma
1347 2011-10-24 Hristian Kirtchev <kirtchev@adacore.com>
1349 * gnat_rm.texi: Add an entry for restriction No_Finalization.
1351 2011-10-24 Ed Schonberg <schonberg@adacore.com>
1353 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): If the
1354 current instance is within the one that contains the generic,
1355 the freeze node for the current one must appear in the current
1356 declarative part. Ditto if the current instance is within another
1357 package instance. In both of these cases the freeze node of the
1358 previous instance is not relevant.
1360 2011-10-24 Gary Dismukes <dismukes@adacore.com>
1362 * switch-m.adb (Normalize_Compiler_Switches): Add recognition
1363 of AAMP-specific switches -univ and -aamp_target.
1365 2011-10-24 Robert Dewar <dewar@adacore.com>
1367 * a-tienau.adb (Put): Deal properly with limited line length.
1369 2011-10-24 Robert Dewar <dewar@adacore.com>
1371 * sem_warn.adb, sem_ch12.adb: Minor reformatting.
1373 2011-10-24 Tristan Gingold <gingold@adacore.com>
1375 * gcc-interface/Makefile.in: Use GNU ld switches to generate map files
1378 2011-10-24 Ed Schonberg <schonberg@adacore.com>
1380 * sem_ch12.adb (Earlier): make available globally. If both
1381 nodes have the same sloc, the freeze node that does not come
1382 from source is the later one.
1383 (True_Parent): Make available globally.
1384 (Previous_Instance): Subsidiary of
1385 Insert_Freeze_Node_For_Instance, to check whether the generic
1386 parent of the current instance is declared within a previous
1387 instance in the same unit or declarative part, in which case the
1388 freeze nodes of both instances must appear in order to prevent
1389 elaboration problems in gigi.
1390 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): A stub is a
1391 freeze point, and the freeze node of a preceding instantiation
1392 must be inserted before it.
1394 2011-10-24 Robert Dewar <dewar@adacore.com>
1396 * checks.ads, checks.adb: Add handling of Synchronization_Check
1397 * debug.adb: Add doc for -gnatd.d and -gnatd.e (disable/enable
1399 * exp_ch2.adb (Expand_Entity_Reference): Set Atomic_Sync_Required
1400 flag Minor code reorganization.
1401 * opt.ads (Warn_On_Atomic_Synchronization): New switch.
1402 * par-prag.adb: Add dummy entries for pragma
1403 Disable/Enable_Atomic_Synchronization.
1404 * sem_prag.adb (Process_Suppress_Unsuppress): Handle
1405 case of Atomic_Synchronization specially (not suppressed
1406 by All_Checks, cannot be set from Source).
1407 (Pragma Disable/Enable_Atomic_Synchronization): Add processing.
1408 * sinfo.ads, sinfo.adb: Add Atomic_Sync_Required flag
1409 * snames.ads-tmpl: Add entry for Atomic_Synchronization Add
1410 entry for pragma Disable/Enable_Atomic_Synchronization
1411 * switch-c.adb: The -gnatp switch does not disable
1412 Atomic_Synchronization Add -gnatep switch to disable
1413 Atomic_Synchronization.
1414 * types.ads: Add entry for Synchronization_Check
1415 * usage.adb: Add line for -gnated switch
1416 * warnsw.adb: Settings for Warn_On_Atomic_Synchronization
1418 2011-10-24 Geert Bosch <bosch@adacore.com>
1420 * s-gearop.adb (Back_Substitute): Avoid overflow if matrix bounds start
1423 2011-10-24 Robert Dewar <dewar@adacore.com>
1425 * sem_ch12.adb, s-gearop.adb: Minor reformatting.
1427 2011-10-24 Robert Dewar <dewar@adacore.com>
1429 * warnsw.adb: Add some missing warnings to Set_GNAT_Mode_Warnings.
1430 * warnsw.ads: Add comments to Set_GNAT_Mode_Warnings.
1432 2011-10-24 Emmanuel Briot <briot@adacore.com>
1434 * prj-proc.adb (Process_Expression_Variable_Decl): No special
1435 handling for Project_Path unless it is an attribute.
1437 2011-10-24 Javier Miranda <miranda@adacore.com>
1439 * sem_ch12.adb (Check_Hidden_Primitives): New subprogram.
1440 (Install_Hidden_Primitives): New subprogram.
1441 (Restore_Hidden_Primitives): New subprogram.
1442 (Analyze_Formal_Package_Declaration,
1443 Analyze_Package_Instantiation, Analyze_Subprogram_Instantiation):
1444 Invoke Check_Hidden_Primitives after every call to
1445 Analyze_Associations, and invoke Restore_Hidden_Primitives to
1446 restore their visibility after processing the instantiation.
1447 (Instantiate_Package_Body): Install visible primitives before
1448 analyzing the instantiation and uninstall them to restore their
1449 visibility when the instantiation has been analyzed.
1450 * sem_util.ads, sem_util.adb (Add_Suffix): New subprogram
1451 (Remove_Suffix): New subprogram
1452 * sem_ch3.adb (Derive_Subprogram): When handling
1453 a derived subprogram for the instantiation of a formal derived
1454 tagged type, inherit the dispatching attributes from the actual
1455 subprogram (not from the parent type).
1457 2011-10-24 Vasiliy Fofanov <fofanov@adacore.com>
1459 * gnat_ugn.texi: Document explicit use of XDECGNAT library.
1461 2011-10-24 Hristian Kirtchev <kirtchev@adacore.com>
1463 * exp_ch3.adb (Build_Assignment): Add local constant N_Loc and
1465 (Build_Discriminant_Assignments): Add local variable D_Loc and update
1467 (Build_Init_Statements): Add local variables Comp_Loc, Decl_Loc and
1468 Var_Loc and update their uses.
1469 (Build_Record_Init_Proc): Code reformatting.
1470 (Increment_Counter): Add formal parameter Loc.
1471 (Make_Counter): Add formal parameter Loc.
1473 2011-10-24 Eric Botcazou <ebotcazou@adacore.com>
1475 * sem_disp.adb (Covers_Some_Interface): Fix typo.
1477 2011-10-24 Matthew Heaney <heaney@adacore.com>
1479 * a-cuprqu.adb, a-cbprqu.adb (Dequeue_Only_High_Priority): Fix sense
1482 2011-10-24 Yannick Moy <moy@adacore.com>
1484 * sem_ch13.adb (Analyze_Aspect_Specifications/Aspect_Test_Case):
1485 Translate arguments in positional notation into pragma argument
1486 association arguments for the generated pragma.
1488 2011-10-24 Arnaud Charlet <charlet@adacore.com>
1490 * exp_ch5.adb: Fix minor typo.
1492 2011-10-24 Ed Schonberg <schonberg@adacore.com>
1494 * sem_ch3.adb (Is_Visible_Component): Refine predicate for
1495 the case of a component reference in an instance body, when the
1496 enclosing type is private.
1498 2011-10-24 Sergey Rybin <rybin@adacore.com frybin>
1500 * gnat_ugn.texi: For gnatelim, move the note about using the GNAT
1501 driver for getting the project support into gnatelim section.
1503 2011-10-24 Robert Dewar <dewar@adacore.com>
1505 * gnat_rm.texi: Minor correction to documentation on address clause.
1507 2011-10-24 Hristian Kirtchev <kirtchev@adacore.com>
1509 * s-finmas.adb (Attach): Synchronize and call the unprotected version.
1510 (Attach_Unprotected): New routine.
1511 (Delete_Finalize_Address): Removed.
1512 (Delete_Finalize_Address_Unprotected): New routine.
1513 (Detach): Synchronize and call the unprotected version.
1514 (Detach_Unprotected): Remove locking.
1515 (Finalize): Add various comment on synchronization. Lock the critical
1516 region and call the unprotected versions of routines.
1517 (Finalize_Address): Removed.
1518 (Finalize_Address_Unprotected): New routine.
1519 (Set_Finalize_Address): Synchronize and call
1520 the unprotected version.
1521 (Set_Finalize_Address_Unprotected): New routine.
1522 (Set_Heterogeneous_Finalize_Address): Removed.
1523 (Set_Heterogeneous_Finalize_Address_Unprotected): New routine.
1524 (Set_Is_Heterogeneous): Add comment on synchronization and
1526 * s-finmas.ads: Flag Finalization_Started is no longer atomic
1527 because synchronization uses task locking / unlocking.
1528 (Attach): Add comment on usage.
1529 (Attach_Unprotected): New routine.
1530 (Delete_Finalize_Address): Renamed to
1531 Delete_Finalize_Address_Unprotected.
1532 (Detach): Add comment on usage.
1533 (Detach_Unprotected): New routine.
1534 (Finalize_Address): Renamed to Finalize_Address_Unprotected.
1535 (Set_Finalize_Address): Add comment on usage.
1536 (Set_Finalize_Address_Unprotected): New routine.
1537 (Set_Heterogeneous_Finalize_Address): Renamed to
1538 Set_Heterogeneous_Finalize_Address_Unprotected.
1539 * s-stposu.adb (Allocate_Any_Controlled): Add local variable
1540 Allocation_Locked. Add various comments on synchronization. Lock
1541 the critical region and call the unprotected version of
1543 (Deallocate_Any_Controlled): Add various comments on
1544 synchronization. Lock the critical region and call the unprotected
1545 version of routines.
1547 2011-10-24 Ed Schonberg <schonberg@adacore.com>
1549 * sem_ch3.adb (Set_Fixed_Range): The bounds of a fixed point type
1550 are universal and must carry the corresponding type.
1551 * sem_eval.adb (Check_Non_Static_Context): If the type of the
1552 expression is universal real, as may be the case for a fixed point
1553 expression with constant operands in the context of a conversion,
1554 there is nothing to check.
1555 * s-finmas.adb: Minor reformatting
1557 2011-10-23 Eric Botcazou <ebotcazou@adacore.com>
1559 * gcc-interface/decl.c (create_concat_name): Add explicit cast.
1561 2011-10-20 Eric Botcazou <ebotcazou@adacore.com>
1563 * gcc-interface/Make-lang.in (GNATLIBFLAGS, GNATLIBCFLAGS, THREAD_KIND,
1564 TRACE): Reintroduce.
1565 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o,
1566 ada/initialize.o, ada/raise.o): Reintroduce explicit compilation rules.
1568 2011-10-20 Eric Botcazou <ebotcazou@adacore.com>
1570 * gcc-interface/trans.c (lhs_or_actual_p): New predicate.
1571 (unchecked_conversion_nop): Use it.
1572 (gnat_to_gnu): Likewise.
1574 2011-10-20 Eric Botcazou <ebotcazou@adacore.com>
1576 * back_end.adb (Call_Back_End): Pass the maximum logical line number
1577 instead of the maximum physical line number to gigi.
1578 * gcc-interface/trans.c (Sloc_to_locus): Cope with line zero.
1580 2011-10-16 Tom Tromey <tromey@redhat.com>
1581 Dodji Seketeli <dodji@redhat.com>
1583 * gcc-interface/trans.c (gigi, Sloc_to_locus): Adjust to use the new
1584 public ordinary map interface.
1586 2011-10-16 Tristan Gingold <gingold@adacore.com>
1588 * link.c (_AIX): Add support for GNU ld.
1590 2011-10-16 Fedor Rybin <frybin@adacore.com>
1592 * gnat_ugn.texi: Fixing gnattest example names in the doc.
1593 Adding explanation to additional tests usage.
1595 2011-10-16 Robert Dewar <dewar@adacore.com>
1597 * exp_ch6.adb, sem_ch6.adb: Minor reformatting.
1599 2011-10-16 Eric Botcazou <ebotcazou@adacore.com>
1601 * a-convec.adb: Fix minor inconsistencies.
1603 2011-10-16 Matthew Heaney <heaney@adacore.com>
1605 * a-cusyqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cbprqu.ads (package
1606 Implementation): Specify pragma Implementation_Defined.
1608 2011-10-15 Nicolas Roche <roche@adacore.com>
1610 * gcc-interface/lang-specs.h: Ensure -mrtp switch is passed when using
1611 either rtp-smp or ravenscar-cert-rtp runtimes.
1613 2011-10-15 Bob Duff <duff@adacore.com>
1615 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call):
1616 Do not create a pool formal on unless RE_Root_Storage_Pool_Ptr
1618 (Expand_N_Extended_Return_Statement): Do not create a renaming of the
1619 build-in-place pool parameter unless RE_Root_Storage_Pool_Ptr is
1621 (Make_Build_In_Place_Call_In_Allocator): Add the user-defined
1622 pool only if RE_Root_Storage_Pool_Ptr is available.
1623 (Make_Build_In_Place_Call_In_Object_Declaration): Do not add a
1624 pool actual unless RE_Root_Storage_Pool_Ptr is available.
1625 * sem_ch6.adb (Create_Extra_Formals): Add build-in-place pool
1626 formal only if RE_Root_Storage_Pool_Ptr is available.
1628 2011-10-15 Matthew Heaney <heaney@adacore.com>
1630 * a-cusyqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cbprqu.ads (Queue
1631 type): Specify Priority aspect for protected type.
1633 2011-10-14 Ed Schonberg <schonberg@adacore.com>
1635 * exp_disp.adb (Check_Premature_Freezing): If an untagged type
1636 is a generic actual, it is a subtype of a type that was frozen
1637 by the instantiation, and even if not marked frozen it does not
1638 affect the construction of the dispatch table.
1640 2011-10-14 Robert Dewar <dewar@adacore.com>
1642 * make.adb, mlib-utl.adb, sem_util.adb, sem_ch4.adb: Minor code
1644 * s-rident.ads: Add missing Compiler_Unit pragma.
1646 2011-10-14 Gary Dismukes <dismukes@adacore.com>
1648 * sem_res.adb: Minor reformatting.
1650 2011-10-14 Hristian Kirtchev <kirtchev@adacore.com>
1652 * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call):
1653 Code and comment reformatting. Use BIP_Task_Master
1654 when creating a _master.
1655 (BIP_Formal_Suffix): Code reformatting. Correct the case for
1657 (Make_Build_In_Place_Call_In_Object_Declaration): Use
1658 BIP_Task_Master when creating a reference to the enclosing
1659 function's _master formal.
1660 (Move_Activation_Chain): Use BIP_Task_Master when creating a reference
1662 * exp_ch6.ads: Change BIP_Master to BIP_Task_Master.
1663 (Needs_BIP_Finalization_Master): Alphabetized.
1664 * sem_ch6.adb (Create_Extra_Formals): Update the usage of
1667 2011-10-14 Ed Schonberg <schonberg@adacore.com>
1669 * par-ch6.adb (P_Return_Object_Declaration): In Ada 2012 mode,
1670 reject an aliased keyword on the object declaration of an extended
1671 return statement. In older versions of the language indicate
1672 that this is illegal in the standard.
1674 2011-10-14 Pascal Obry <obry@adacore.com>
1676 * sem_util.adb, sem_ch4.adb: Minor reformatting.
1678 2011-10-14 Ed Schonberg <schonberg@adacore.com>
1680 * sem_ch13.adb: Recognize properly procedure calls that are
1681 transformed into code statements.
1683 2011-10-14 Vincent Celier <celier@adacore.com>
1685 * projects.texi: Minor fix in project example.
1687 2011-10-14 Ed Schonberg <schonberg@adacore.com>
1689 * sem_util.adb: Return objects are aliased if their type is
1690 immutably limited as per AI05-0053.
1692 2011-10-14 Gary Dismukes <dismukes@adacore.com>
1694 * exp_ch4.adb (Expand_N_Op_And): Remove Short_Circuit_And_Or
1695 expansion code (moved to sem_res) (Expand_N_Op_Or): Remove
1696 Short_Circuit_And_Or expansion code (moved to sem_res).
1697 * sem_res.adb (Resolve_Logical_Op): Add code to rewrite Boolean
1698 "and" and "or" operators as short-circuit "and then" and "or
1699 else", when pragma Short_Circuit_And_Or is active.
1701 2011-10-13 Robert Dewar <dewar@adacore.com>
1703 * sem_ch9.adb, sem_util.adb, sem_util.ads, exp_ch6.adb, sem_ch4.adb,
1704 sem_ch6.adb, exp_ch3.adb: Minor reformatting.
1706 2011-10-13 Arnaud Charlet <charlet@adacore.com>
1708 * Makefile.rtl (GNATRTL_NONTASKING_OBJS): Add a-ngcoar.o.
1710 2011-10-13 Jerome Guitton <guitton@adacore.com>
1712 * sysdep.c (__gnat_get_task_options): Re-enable VX_SPE_TASK on vThreads
1714 2011-10-13 Eric Botcazou <ebotcazou@adacore.com>
1716 * a-convec.ads (Cursor): Minor reformatting.
1717 * a-convec.adb (Next): Fix minor inconsistencies.
1718 (Previous): Likewise.
1720 2011-10-13 Ed Schonberg <schonberg@adacore.com>
1722 * sem_util.ads, sem_util.adb (Available_Full_View_Of_Component):
1723 New predicate to determine whether some operations on an array
1724 type are available when the full view of its component may differ
1725 from the view of the point of the array declaration.
1726 * sem_ch4.adb (Find_Equality_Types): Use
1727 Available_Full_View_Of_Component.
1728 * sem_type.adb (Valid_Boolean_Arg, Valid_Comparison_Arg): Ditto
1730 2011-10-13 Ed Schonberg <schonberg@adacore.com>
1732 * sem_ch9.adb: Analyze aspects while discriminants of protected
1735 2011-10-13 Geert Bosch <bosch@adacore.com>
1737 * Makefile.rtl (GNATRTL_TASKING_OBJECTS): Add
1738 a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o, as these no
1739 longer depend on an external library.
1740 * gcc-interface/Makefile.in (GNATRTL_LINEARALGEBRA_OBJS): Remove
1741 a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o.
1742 Update dependencies.
1743 * gcc-interface/Make-lang.in: Update dependencies.
1745 2011-10-13 Cyrille Comar <comar@adacore.com>
1747 * gnat_ugn.texi: Minor editing.
1749 2011-10-13 Vincent Celier <celier@adacore.com>
1751 * projects.texi: Add documentation on packages and attributes
1752 that are inherited from a project being extended into the
1755 2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
1757 * exp_ch3.adb (Build_Master): Rewritten.
1758 (Expand_N_Full_Type_Declaration): Reformat the declarative
1759 region. Update the call to Build_Master_Renaming.
1760 (Expand_Previous_Access_Type): Rewritten.
1761 * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call):
1762 Add local constant Result_Subt and update related usage.
1763 (Expand_N_Extended_Return_Statement): Add local constant
1764 Result_Subt and update related usage.
1765 * exp_ch9.adb (Build_Activation_Chain): Rewritten to use the
1766 new context detection mechanism.
1767 (Build_Class_Wide_Master):
1768 Use Insert_Action to add the renaming into the tree.
1769 (Build_Master_Entity): Rewritten to use the new context detection
1771 (Build_Master_Renaming): Add formal parameter Ins_Nod
1772 and related usage. Use Insert_Action to add the renaming into the
1774 (Find_Enclosing_Context): New subsidiary routine. Rather
1775 than relying on enclosing scopes, this routine looks at the
1776 tree structure to figure out the proper context for a _master
1777 or a _chain. This approach eliminates the issues with transient
1778 scopes which have not been converted into blocks.
1779 * exp_ch9.ads (Build_Master_Entity): Change parameter profile
1780 to better reflect the new usage. Update the related comment.
1781 (Build_Master_Renaming): Add formal parameter Ins_Nod. Update
1782 the comment on usage.
1783 * sem_ch3.adb (Access_Definition): Update the calls to
1784 Build_Master_Entity and Build_Master_Renaming.
1785 * sem_ch6.adb (Create_Extra_Formals): Add local variable
1786 Full_Subt. Code reformatting.
1787 * sem_util.adb (Is_Iterator): Alphabetized.
1788 (Is_LHS): Alphabetized.
1789 (Is_Limited_Class_Wide_Type): New routine.
1790 * sem_util.ads (Is_Limited_Class_Wide_Type): New routine.
1792 2011-10-13 Geert Bosch <bosch@adacore.com>
1794 * a-ngrear.adb (Solve): Make generic and move to
1795 System.Generic_Array_Operations.
1796 * s-gearop.ads (Matrix_Vector_Solution, Matrix_Matrix_Solution):
1797 New generic solvers to compute a vector resp. matrix Y such
1798 that A * Y = X, approximately.
1799 * s-gearop.adb (Matrix_Vector_Solution, Matrix_Matrix_Solution):
1800 Implement using Forward_Eliminate and Back_Substitute
1801 * a-ngcoar.adb: Reimplement in pure Ada to remove dependencies
1803 * a-ngcoar.ads ("abs"): Fix return type to be real.
1805 2011-10-13 Eric Botcazou <ebotcazou@adacore.com>
1808 * s-linux-alpha.ads: Do not "with" Interfaces.C.
1809 * s-linux-sparc.ads: Likewise.
1811 2011-10-13 Geert Bosch <bosch@adacore.com>
1813 * s-gearop.ads (Forward_Eliminate): Add "abs" formal function
1815 * s-gearop.adb (Forward_Eliminate): Remove local "abs" function
1817 * a-ngrear.adb (Forward_Eliminate): Adjust instantiation for
1820 2011-10-13 Geert Bosch <bosch@adacore.com>
1822 * a-ngrear.adb, s-gearop.adb, s-gearop.ads (Sqrt): Make generic and
1823 move to System.Generic_Array_Operations.
1825 2011-10-13 Geert Bosch <bosch@adacore.com>
1827 * a-ngrear.adb ("abs"): Adjust for modified L2_Norm generic
1828 * s-gearop.ads (L2_Norm): Change profile to be suitable for
1830 * s-gearop.adb (L2_Norm): Reimplement using direct definition,
1833 2011-10-13 Robert Dewar <dewar@adacore.com>
1835 * exp_ch5.adb, sem_ch3.adb, impunit.adb, impunit.ads, sem_type.adb,
1836 prj-proc.adb, exp_ch9.adb, s-regpat.adb, sem_ch10.adb, sem_prag.adb,
1837 sem_ch12.adb, freeze.adb, sem_attr.adb, sem_attr.ads, gnatlink.adb,
1838 par-ch6.adb, exp_ch6.adb, sem_ch4.adb, sem_ch6.adb, sem_ch8.adb,
1839 par-util.adb, sem_ch13.adb, lib-xref.adb, g-trasym.adb, g-trasym.ads,
1840 exp_aggr.adb, s-taprop-posix.adb: Minor reformatting.
1842 2011-10-13 Geert Bosch <bosch@adacore.com>
1844 * s-gearop.adb: Minor comment additions.
1846 2011-10-13 Fedor Rybin <frybin@adacore.com>
1848 * gnat_ugn.texi: Add gnattest section.
1850 2011-10-13 Ed Schonberg <schonberg@adacore.com>
1852 * freeze.adb: Do not create body of renaming if declaration has
1855 2011-10-13 Olivier Hainque <hainque@adacore.com>
1857 * init.c (__gnat_error_handler - vxworks case): Restrict sigtramp calls
1858 further, to the ppc+kernel case only.
1860 2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
1862 * exp_ch4.adb (Expand_N_Allocator): Comment reformatting.
1863 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call):
1864 Do not create a pool formal on .NET/JVM.
1865 (Expand_N_Extended_Return_Statement): Alphabetize local
1866 variables. Do not create a renaming of the build-in-place pool
1867 parameter on .NET/JVM. (Make_Build_In_Place_Call_In_Allocator):
1868 Add the user-defined pool only on non-VM targets.
1869 (Make_Build_In_Place_Call_In_Object_Declaration): Alphabetize
1870 local variables. Do not add a pool actual on .NET/JVM.
1871 * sem_ch6.adb: Add with and use clause for Targparm.
1872 (Create_Extra_Formals): Add build-in-place pool formal only on
1874 * rtsfind.ads: Alphabetize entries.
1876 2011-10-13 Sergey Rybin <rybin@adacore.com>
1878 * gnat_ugn.texi: Minor correction.
1880 2011-10-13 Ed Schonberg <schonberg@adacore.com>
1882 * sem_ch8.adb: Minor error message improvement.
1884 2011-10-13 Robert Dewar <dewar@adacore.com>
1886 * a-cbprqu.adb, a-ciorma.adb, exp_ch3.adb: Minor reformatting.
1888 2011-10-13 Gary Dismukes <dismukes@adacore.com>
1890 * exp_ch5.adb (Expand_N_Loop_Statement): For the transformation
1891 of a for loop for an enumeration type with an enumeration rep
1892 clause, which involves moving the original loop parameter into
1893 a nested block, the loop parameter's entity must be removed from
1894 the entity list of the loop scope.
1896 2011-10-13 Bob Duff <duff@adacore.com>
1898 * exp_ch6.ads (BIP_Storage_Pool): New "extra implicit parameter"
1899 that gets passed in the same cases where BIP_Alloc_Form is passed
1900 (caller-unknown-size results). BIP_Storage_Pool is used when
1901 BIP_Alloc_Form = User_Storage_Pool. In that case, a pointer
1902 to the user-defined storage pool is passed at the call site,
1903 and this pool is used in callee to allocate the result.
1904 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call): New
1905 version of Add_Alloc_Form_Actual_To_Build_In_Place_Call. Passes
1906 the additional BIP_Storage_Pool actual.
1907 (Expand_N_Extended_Return_Statement): Allocate the function
1908 result using the user-defined storage pool, if BIP_Alloc_Form =
1910 * sem_ch6.adb: Add the "extra formal" for BIP_Storage_Pool.
1911 * exp_ch4.adb: Don't overwrite storage pool set by
1912 Expand_N_Extended_Return_Statement.
1913 * s-stopoo.ads, rtsfind.ads (Root_Storage_Pool_Ptr): New type,
1914 for use in build-in-place function calls within allocators
1915 where the access type has a user-defined storage pool.
1917 2011-10-13 Sergey Rybin <rybin@adacore.com>
1919 * gnat_ugn.texi, vms_data.ads: Add an option to control enumeration
1922 2011-10-13 Nicolas Roche <roche@adacore.com>
1924 * gnatlink.adb: Ensure that -mrtp is passed when runtime name ends
1927 2011-10-13 Ed Schonberg <schonberg@adacore.com>
1929 * sem_prag.adb (Analyze_Pragma, case Unchecked_Union): Take into
1930 account that an unchecked union type can be limited.
1932 2011-10-13 Olivier Hainque <hainque@adacore.com>
1934 * init.c (__gnat_error_handler) <VxWorks version>: Add comments on
1935 the use of the signal trampoline for PPC in the sjlj case as well.
1936 Add legitimate casts, preventing compile time warnings on the
1937 (sighandler *) profile.
1939 2011-10-13 Yannick Moy <moy@adacore.com>
1941 * sem_aggr.adb (Resolve_Aggr_Expr): Always perform semantic analysis
1944 2011-10-13 Ed Schonberg <schonberg@adacore.com>
1946 * sem_ch3.adb (OK_For_Limited_Init_In_05): Conditional and case
1947 expressions are legal limited return values if each one of their
1948 dependent expressions are legal.
1950 2011-10-13 Ed Schonberg <schonberg@adacore.com>
1952 * sem_ch6.adb (Analyze_Procedure_Call_Statement): In Ada 2012 mode,
1953 if the prefix of the call is a qualified expression, rewrite as
1955 * sem_ch13.adb (Analyze_Code_Statement): In Ada 2012 mode, the
1956 code statement is legal if it is a rewriting of a procedure call.
1958 2011-10-13 Ed Schonberg <schonberg@adacore.com>
1960 * exp_aggr.adb (Flatten): If a component association has a box,
1961 assume that aggregate is not static.
1962 (Safe_Aggregate): If a component association in a non-limited
1963 aggregate has a box, assume that it cannot be expanded in place.
1965 2011-10-13 Vincent Celier <celier@adacore.com>
1967 * prj-conf.adb (Get_Or_Create_Configuration_File): Call
1968 Process_Project_Tree_Phase_1 with Packages_To_Check.
1969 (Process_Project_And_Apply_Config): Ditto
1970 * prj-part.ads, prj-part.adb, prj-pars.ads, prj-pars.adb (Parse):
1971 Remove default for argument Packages_To_Check.
1972 * prj-proc.adb (Recursive_Process): New argument
1975 (Process_Project_Tree_Phase_1): Ditto.
1976 (Recursive_Project.Process_Aggregated_Projects): Call
1977 Prj.Part.Parse and Process_Project_Tree_Phase_1 with
1979 * prj-proc.ads (Process): New argument Packages_To_Check
1980 (Process_Project_Tree_Phase_1): Ditto
1982 2011-10-13 Arnaud Charlet <charlet@adacore.com>
1984 * gcc-interface/Makefile.in: Fix typo.
1986 2011-10-13 Ed Schonberg <schonberg@adacore.com>
1988 * sem_ch12.adb (Analyze_Formal_{Floating_Type,
1989 Signed_Integer_Type, Decimal_Fixed_Point_Type, Discrete_Type}):
1990 Use sloc of defining identifier of farmal type declaration,
1991 as sloc of generated internal entity, to prevent misplaced
1994 2011-10-13 Ed Schonberg <schonberg@adacore.com>
1996 * sem_intr.adb (Check_Intrinsic_Operator): Check that type
1997 is fully defined before checking that it is a numeric type.
1999 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2001 * sem_aggr.adb (Resolve_Record_Aggregate): If a component
2002 association for component X has a box, then X is covered in the
2003 aggregate even if there is not default value for X in the type
2004 declaration, and X has to be default-initialized.
2006 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2008 * sem_attr.adb (Check_Enum_Image, Analyze_Attribute case 'Value): Mark
2009 literals as referenced only if reference is in current source unit.
2011 2011-10-13 Matthew Heaney <heaney@adacore.com>
2013 * a-csquin.ads (Enque, Dequeue): Mark interface operations as entries.
2015 2011-10-13 Olivier Hainque <hainque@adacore.com>
2017 * sigtramp.h: New file. Prototype and spec of the signal
2018 trampoline to be called by an established handler to provide
2019 dwarf call frame info before the real signal processing code.
2020 * sigtramp-ppcvxw.c: New file. Implementation of the signal
2021 trampoline for ppc-vxworks.
2022 * init.c (vxworks section): Use it for ppc.
2024 2011-10-13 Thomas Quinot <quinot@adacore.com>
2026 * par-ch2.adb, par.adb, par-util.adb, par-ch3.adb
2027 (Check_Future_Identifier): New subprogram,
2028 factors duplicated code from Par.Ch2.P_Identifier and
2029 Par.Ch3.P_Defining_Identifier.
2031 2011-10-13 Thomas Quinot <quinot@adacore.com>
2033 * s-taprop-posix.adb (Initialize): Always raise Storage_Error
2034 if we fail to initialize CV attributes or CV.
2036 2011-10-13 Thomas Quinot <quinot@adacore.com>
2038 * s-tasren.adb (Timed_Selective_Wait, case
2039 Accept_Alternative_Selected): Use Defer_Abort_Nestable, since
2040 we know abortion is already deferred.
2042 2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
2044 * exp_ch3.adb (Build_Class_Wide_Master): Moved to exp_ch9.
2045 (Build_Master_Renaming (function)): Removed.
2046 (Build_Master_Renaming (procedure)): Moved to exp_ch9.
2047 (Expand_Full_Type_Declaration): Alphabetize
2048 variables. Reformatting of code and comments. Rewrite the
2049 section on processing of anonymous access-to-task types in
2051 * exp_ch3.ads (Build_Class_Wide_Master): Moved to exp_ch9.
2052 (Build_Master_Renaming): Moved to exp_ch9.
2053 * exp_ch9.adb (Build_Class_Wide_Master): Moved from exp_ch3.
2054 (Build_Master_Entity): Add formal parameter
2055 Use_Current. Reformatting of code and comments.
2056 (Build_Master_Renaming): Moved from exp_ch3.
2057 * exp_ch9.ads (Build_Class_Wide_Master): Moved from
2058 exp_ch3. Update comment on usage.
2059 (Build_Master_Entity):
2060 Add formal parameter Use_Current. Update comment on usage.
2061 (Build_Master_Renaming): Moved from exp_ch3.
2062 * sem_ch3.adb (Access_Definition): Remove redundant code to
2063 create a _master and a renaming.
2065 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2067 * lib-xref.adb: Do no emit reference to overridden operation,
2068 if it is internally generated.
2070 2011-10-13 Vincent Celier <celier@adacore.com>
2072 * bindgen.adb: Remove any processing related to g-trasym
2073 * Makefile.rtl: Add g-trasym.o to GNATRTL_NONTASKING_OBJS
2074 * mlib-prj.adb: Remove any processing related to g-trasym.
2076 2011-10-12 Eric Botcazou <ebotcazou@adacore.com>
2078 * sem_util.adb (Denotes_Same_Prefix): Fix fatal warning.
2079 * gcc-interface/Make-lang.in (WARN_ADAFLAGS): New.
2080 (ALL_ADAFLAGS): Include WARN_ADAFLAGS.
2081 (ADA_FLAGS_TO_PASS): Likewise.
2082 (COMMON_FLAGS_TO_PASS): New.
2083 (ADA_TOOLS_FLAGS_TO_PASS): Use COMMON_FLAGS_TO_PASS. In the regular
2084 native case, also use FLAGS_TO_PASS and ADA_FLAGS_TO_PASS.
2085 (gnatlib): Use COMMON_FLAGS_TO_PASS.
2086 (ada.install-common): Likewise.
2087 (install-gnatlib): Likewise.
2088 (install-gnatlib-obj): Likewise.
2089 (gnattools): Use ADA_TOOLS_FLAGS_TO_PASS for gnattools1 as well.
2090 (gnat-cross): Delete.
2091 (gnatboot): Likewise.
2092 (gnatboot2): Likewise.
2093 (gnatboot3): Likewise.
2094 (gnatstage1): Likewise.
2095 (gnatstage2): Likewise.
2096 * gcc-interface/Makefile.in (SOME_ADAFLAGS): Likewise.
2097 (MOST_ADAFLAGS): Likewise.
2098 (LOOSE_CFLAGS): Likewise.
2099 (gnat-cross): Likewise.
2100 (GNATLIBFLAGS): Add -W -Wall.
2101 (GNATLIBCFLAGS_FOR_C): Likewise.
2102 * gcc-interface/lang.opt: Remove C-specific warnings. Add doc lines.
2103 * gcc-interface/misc.c (gnat_handle_option): Remove obsolete cases.
2105 2011-10-12 Eric Botcazou <ebotcazou@adacore.com>
2107 * gcc-interface/trans.c (Attribute_to_gnu): Use remove_conversions.
2108 (push_range_check_info): Likewise.
2109 (gnat_to_gnu) <N_Code_Statement>: Likewise.
2110 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: Likewise.
2111 (gnat_invariant_expr): Likewise.
2112 * gcc-interface/utils.c (compute_related_constant): Likewise.
2113 (max_size): Fix handling of SAVE_EXPR.
2114 (remove_conversions): Fix formatting.
2116 2011-10-12 Eric Botcazou <ebotcazou@adacore.com>
2118 * gcc-interface/ada-tree.h (DECL_LOOP_PARM_P): New flag.
2119 (DECL_INDUCTION_VAR): New macro.
2120 (SET_DECL_INDUCTION_VAR): Likewise.
2121 * gcc-interface/gigi.h (convert_to_index_type): Declare.
2122 (gnat_invariant_expr): Likewise.
2123 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: If this is a loop
2124 parameter, set DECL_LOOP_PARM_P on it.
2125 * gcc-interface/misc.c (gnat_print_decl) <VAR_DECL>: If DECL_LOOP_PARM_P
2126 is set, print DECL_INDUCTION_VAR instead of DECL_RENAMED_OBJECT.
2127 * gcc-interface/trans.c (gnu_loop_label_stack): Delete.
2128 (struct range_check_info_d): New type.
2129 (struct loop_info_d): Likewise.
2130 (gnu_loop_stack): New stack.
2131 (Identifier_to_gnu): Set TREE_READONLY flag on the first dereference
2132 built for a by-double-ref read-only parameter. If DECL_LOOP_PARM_P
2133 is set, do not test DECL_RENAMED_OBJECT.
2134 (push_range_check_info): New function.
2135 (Loop_Statement_to_gnu): Push a new struct loop_info_d instead of just
2136 the label. Reference the label and the iteration variable from it.
2137 Build the special induction variable in the unsigned version of the
2138 size type, if it is larger than the base type. And attach it to the
2139 iteration variable if the latter isn't by-ref. In the iteration scheme
2140 case, initialize the invariant conditions in front of the loop if
2141 deemed profitable. Use gnu_loop_stack.
2142 (gnat_to_gnu) <N_Exit_Statement>: Use gnu_loop_stack.
2143 <N_Raise_Constraint_Error>: Always process the reason. In the range
2144 check and related cases, and if loop unswitching is enabled, compute
2145 invariant conditions and push this information onto the stack.
2146 Do not translate again the condition if it has been already translated.
2147 * gcc-interface/utils.c (record_global_renaming_pointer): Assert that
2148 DECL_LOOP_PARM_P isn't set.
2149 (convert_to_index_type): New function.
2150 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Use it in order
2151 to convert the index from the base index type to sizetype.
2152 (gnat_invariant_expr): New function.
2154 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
2156 * gcc-interface/utils.c (def_builtin_1): Delete old interface with
2157 two parallel arrays to hold standard builtin declarations, and
2158 replace it with a function based interface that can support
2159 creating builtins on the fly in the future.
2160 * gcc-interface/trans.c (Exception_Handler_to_gnu_zcx): Ditto.
2161 (gnat_to_gnu): Ditto.
2163 2011-10-07 Eric Botcazou <ebotcazou@adacore.com>
2166 * gcc-interface/gigi.h (gnat_pushdecl): Adjust comment.
2167 * gcc-interface/utils.c (global_context): New variable.
2168 (gnat_pushdecl): Initialize it and set it as the DECL_CONTEXT of DECLs
2169 that are either public external or at top level. Use "No" macro.
2170 (end_subprog_body): Call decl_function_context.
2171 (rest_of_subprog_body_compilation): Likewise.
2173 2011-10-07 Eric Botcazou <ebotcazou@adacore.com>
2175 * gcc-interface/gigi.h (gnat_useless_type_conversion): Declare.
2176 (rest_of_subprog_body_compilation): Likewise.
2177 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: For renaming,
2178 test for useless conversions by means of gnat_useless_type_conversion.
2179 * gcc-interface/trans.c: Include bitmap.h and cgraph.h.
2180 (language_function): Add named_ret_val and other_ret_val.
2181 (f_named_ret_val): New macro.
2182 (f_other_ret_val): Likewise.
2183 (gigi): Call rest_of_subprog_body_compilation.
2184 (struct nrv_data): New structure.
2185 (is_nrv_p): New predicate.
2186 (prune_nrv_r): New helper function.
2187 (prune_nrv_in_block): New function.
2188 (finalize_nrv_r): New helper function.
2189 (finalize_nrv): New function.
2190 (return_value_ok_for_nrv_p): New predicate.
2191 (build_return_expr): If optimization is enabled, record candidates for
2192 the Named Return Value optimization.
2193 (build_function_stub): Call rest_of_subprog_body_compilation.
2194 (Subprogram_Body_to_gnu): If optimization is enabled and there are
2195 candidates, finalize the Named Return Value optimization.
2196 Call rest_of_subprog_body_compilation.
2197 (call_to_gnu): At the end, if a return value is needed, simplify the
2198 result before wrapping it up in a COMPOUND_EXPR.
2199 * gcc-interface/utils.c (end_subprog_body): Split into...
2200 (rest_of_subprog_body_compilation): ...this. New function.
2201 (gnat_useless_type_conversion): Likewise.
2203 2011-10-06 Thomas Quinot <quinot@adacore.com>
2205 * einfo.ads, exp_attr.adb, exp_ch3.adb, exp_ch4.adb, exp_ch7.adb,
2206 exp_ch9.adb, exp_ch9.ads, exp_strm.adb, exp_util.adb, freeze.adb,
2207 g-debpoo.ads, opt.ads, par-ch12.adb, par-ch2.adb, par-ch3.adb,
2208 par-ch5.adb, par-ch6.adb, sem_aggr.adb, sem_attr.adb, sem_cat.adb,
2209 sem_ch10.adb, sem_ch12.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
2210 sem_ch6.adb, sem_intr.adb, sem_res.ads, sem_type.adb, sem_util.adb,
2211 s-regpat.adb, s-tpopde-vms.ads: Minor reformatting.
2212 * s-osinte-freebsd.ads: Fix for tasking failures on FreeBSD.
2214 2011-10-06 Ed Schonberg <schonberg@adacore.com>
2216 * a-cihase.adb, a-ciorma.adb: Avoid accessibility checks in container
2219 2011-10-06 Matthew Heaney <heaney@adacore.com>
2221 * a-cuprqu.ads, a-cuprqu.adb, a-cbprqu.ads, a-cbprqu.adb
2222 (Dequeue_Only_High_Priority): Protected procedure now implemented.
2224 2011-10-06 Vincent Celier <celier@adacore.com>
2226 * g-trasym.adb: Replace old implementation with the default
2227 implementation that returns list of addresses as "0x...".
2228 * g-trasym.ads: Update the list of platforms with the full
2229 capability. Indicate that there is a default implementation
2230 for other platforms.
2231 * g-trasym-unimplemented.ads, g-trasym-unimplemented.adb: Remove.
2232 * gcc-interface/Makefile.in: Remove g-trasym-unimplemented, as there
2233 is now a default implementation for all platforms without the full
2236 2011-10-06 Robert Dewar <dewar@adacore.com>
2238 * a-ciorse.adb, a-cihase.adb, a-cihase.ads, a-coorse.adb,
2239 a-cborse.adb, a-comutr.adb, a-ciorma.adb, a-cbmutr.adb,
2240 a-cbmutr.ads, a-cbhase.adb, a-cbhase.ads: Minor reformatting and code
2241 reorganization (use conditional expressions).
2243 2011-10-06 Robert Dewar <dewar@adacore.com>
2245 * sem_res.adb (Resolve_Arithmetic_Op): Fix bad warning for
2246 floating divide by zero.
2248 2011-10-06 Ed Schonberg <schonberg@adacore.com>
2250 * sem_ch6.adb: Limited interfaces that are not immutably limited
2251 are OK in return statements.
2253 2011-09-30 Iain Sandoe <iains@gcc.gnu.org>
2255 * gcc-interface/Makefile.in (Darwin): Partial reversion of previous
2256 change to powerpc section.
2258 2011-09-29 Iain Sandoe <iains@gcc.gnu.org>
2260 * gcc-interface/Makefile.in (Darwin): Factor LIBGNAT_TARGET_PAIRS
2263 2011-09-27 Ed Schonberg <schonberg@adacore.com>
2265 * a-cbhase.adb, a-cbhase.ads, a-cborse.adb, a-cborse.ads,
2266 a-cihase.adb, a-cihase.ads, a-ciorse.adb, a-ciorse.ads,
2267 a-coorse.adb, a-coorse.ads: Add iterator machinery to bounded sets and
2269 * a-coorma.ads: Minor reformmating.
2270 * einfo.ads: Improve the comment describing the
2271 Directly_Designated_Type function.
2272 * a-ciorma.adb, a-ciorma.ads: Add iterator machinery to indefinite
2274 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
2277 2011-09-27 Robert Dewar <dewar@adacore.com>
2279 * a-comutr.ads: Minor reformatting.
2281 2011-09-27 Ed Schonberg <schonberg@adacore.com>
2283 * a-cimutr.adb, a-cimutr.ads, a-cbmutr.adb, a-cbmutr.ads: Add children
2284 iterators to multiway trees.
2286 2011-09-27 Yannick Moy <moy@adacore.com>
2288 * debug.adb (d.D): New option for strict Alfa mode.
2289 * opt.ads (Strict_Alfa_Mode): New flag to interpret compiler
2290 permissions as strictly as possible.
2291 * sem_ch3.adb (Signed_Integer_Type_Declaration): In non-strict
2292 Alfa mode, now, interpret ranges of base types like GNAT does; in
2293 strict mode, simply change the range of the implicit base Itype.
2294 * gnat1drv.adb: Update comments. Set Strict_Alfa_Mode.
2296 2011-09-27 Robert Dewar <dewar@adacore.com>
2298 * exp_ch9.adb: Minor comment fixes.
2300 2011-09-27 Ed Schonberg <schonberg@adacore.com>
2302 * a-comutr.adb, a-comutr.ads: Add children iterators on multiway
2305 2011-09-27 Eric Botcazou <ebotcazou@adacore.com>
2307 * checks.adb (Apply_Scalar_Range_Check): Use Designated_Type
2308 instead of Directly_Designated_Type in the indirect array case.
2310 2011-09-27 Robert Dewar <dewar@adacore.com>
2312 * exp_util.adb, exp_aggr.adb: Minor reformatting.
2314 2011-09-27 Ed Schonberg <schonberg@adacore.com>
2316 * sinfo.ads, par-ch3.adb: Minor comment update: aspect specification
2317 on subtype declarations.
2318 * exp_aggr.adb: Minor comment update.
2320 2011-09-27 Eric Botcazou <ebotcazou@adacore.com>
2322 * exp_util.adb (Safe_Prefixed_Reference): Remove always-false
2323 test in the N_Explicit_Dereference case. Fold double logical
2324 negation in the special loop case and conditionalize it on
2325 Variable_Ref being true.
2327 2011-09-27 Ed Schonberg <schonberg@adacore.com>
2329 * sem_ch4.adb (Analyze_Selected_Component): If the prefix is a
2330 single protected object and the selector is a discriminant or an
2331 entry family, this is a non-overloaded candidate interpretation,
2332 and possible primitive operations of the type must not be
2335 2011-09-27 Arnaud Charlet <charlet@adacore.com>
2337 * s-taspri-posix-noaltstack.ads (Lock): Mark fields aliased.
2339 2011-09-27 Pascal Obry <obry@adacore.com>
2341 * s-osinte-hpux.ads, s-osinte-aix.ads, s-osinte-solaris-posix.ads,
2342 s-osinte-irix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads:
2343 Add dummy definitions for pthread_rwlock_t
2344 and pthread_rwlockattr_t on all POSIX platforms.
2345 * s-taprop-irix.adb, s-taprop-posix.adb (Initialize_Lock): Fix lock
2347 (Finalize_Lock): Likewise.
2348 (Write_Lock): Likewise.
2351 2011-09-27 Tristan Gingold <gingold@adacore.com>
2353 * s-tassta.adb (Task_Wrapper): Increase Guard_Page_Size value for
2356 2011-09-27 Pascal Obry <obry@adacore.com>
2358 * s-osinte-hpux.ads, s-taprop-vxworks.adb, s-taspri-vxworks.ads,
2359 s-taprop-tru64.adb, s-osinte-aix.ads, s-taspri-posix-noaltstack.ads,
2360 s-taspri-mingw.ads, s-taprop-vms.adb, s-tpoben.adb, s-tpoben.ads,
2361 s-taprop-mingw.adb, s-taprob.adb, s-taprob.ads,
2362 s-osinte-solaris-posix.ads, s-taprop-solaris.adb, s-taspri-solaris.ads,
2363 s-osinte-irix.ads, s-taprop-irix.adb, s-osinte-darwin.ads,
2364 s-taspri-dummy.ads, s-taspri-posix.ads, s-taprop.ads,
2365 s-taspri-vms.ads, s-osinte-freebsd.ads, s-taprop-hpux-dce.adb,
2366 s-taspri-hpux-dce.ads, s-taspri-tru64.ads, s-taprop-dummy.adb,
2367 s-taprop-posix.adb: Revert previous changes.
2368 (Lock): Now a record containing the two possible lock
2369 (mutex and read/write) defined in OS_Interface.
2370 * s-taprop-linux.adb (Finalize_Protection): Use r/w lock for
2372 (Initialize_Protection): Likewise.
2374 (Lock_Read_Only): Likewise.
2377 2011-09-27 Pascal Obry <obry@adacore.com>
2379 * s-taspri-posix-noaltstack.ads (RW_Lock): This type is now defined as
2380 OS_Interface.pthread_rwlock_t.
2382 2011-09-27 Robert Dewar <dewar@adacore.com>
2384 * exp_ch9.adb, a-cimutr.adb, a-cimutr.ads, gnat1drv.adb, a-comutr.adb,
2385 a-comutr.ads, exp_dist.adb, a-cbmutr.adb, a-cbmutr.ads,
2386 sem_ch5.adb, sem_util.adb: Minor reformatting.
2388 2011-09-27 Pascal Obry <obry@adacore.com>
2390 * s-taprop.ads (Initialize_Lock)[RW_Lock]: New spec for r/w lock.
2391 (Finalize_Lock)[RW_Lock]: Likewise.
2392 (Write_Lock)[RW_Lock]: Likewise.
2393 (Unlock)[RW_Lock]: Likewise.
2394 (Read_Lock): Define L as RW_Lock (instead of Lock).
2395 * s-taprop-linux.adb (Initialize_Lock)[RW_Lock]: New
2396 routine for r/w lock.
2397 (Finalize_Lock)[RW_Lock]: Likewise.
2398 (Write_Lock)[RW_Lock]: Likewise.
2399 (Unlock)[RW_Lock]: Likewise.
2400 (Read_Lock): Define L as RW_Lock (instead of Lock).
2402 * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
2403 s-taprop-mingw.adb, s-taprop-solaris.adb, s-taprop-irix.adb,
2404 s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
2405 (Initialize_Lock)[RW_Lock]: Same implementation as corresponding
2406 routine for standard lock.
2407 (Finalize_Lock)[RW_Lock]: Likewise.
2408 (Write_Lock)[RW_Lock]: Likewise.
2409 (Unlock)[RW_Lock]: Likewise.
2410 (Read_Lock): Define L as RW_Lock (instead of Lock).
2411 * s-taprob.ads, s-tpoben.ads (Protection): Add RWL (RW_Lock)
2412 in the record definition.
2413 * s-taprob.adb, s-taproben.adb (Finalize_Protection): Use r/w
2414 lock for 'R' locking policy.
2415 (Initialize_Protection): Likewise.
2417 (Lock_Read_Only): Likewise.
2419 * s-taspri-posix.ads (RW_Lock): New type defined as
2420 OS_Interface.pthread_rwlock_t.
2422 * s-taspri-vxworks.ads, s-taspri-posix-noaltstack.ads,
2423 s-taspri-mingw.ads, s-taspri-solaris.ads, s-taspri-dummy.ads,
2424 s-taspri-posix.ads, s-taspri-vms.ads, s-taspri-hpux-dce.ads,
2425 s-taspri-tru64.ads (RW_Lock): New type defined as alias to Lock.
2427 2011-09-27 Pascal Obry <obry@adacore.com>
2429 * exp_ch9.adb, s-taspri-posix.ads: Minor reformatting.
2431 2011-09-27 Pascal Obry <obry@adacore.com>
2433 * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
2434 s-osinte-hpux.ads, s-osinte-irix.ads,
2435 s-osinte-solaris-posix.ads (pthread_rwlock_t): New definition alias of
2437 (pthread_rwlockattr_t): New definition alias of pthread_mutexattr_t.
2438 * s-osinte-linux.ads (pthread_rwlock_t, pthread_rwlockattr_t,
2439 pthread_rwlockattr_init, pthread_rwlockattr_destroy,
2440 pthread_rwlockattr_setkind_np, pthread_rwlock_init,
2441 pthread_rwlock_destroy, pthread_rwlock_rdlock,
2442 pthread_rwlock_wrlock, pthread_rwlock_unlock): New.
2444 2011-09-27 Pascal Obry <obry@adacore.com>
2446 * rtsfind.ads: Add RE_Lock_Read_Only into rtsfind circuitry.
2447 (RE_Id): Add RE_Lock_Read_Only.
2448 (RE_Unit_Table): Likewise.
2449 * sem_prag.adb (Process_Convention): Change Pragma_Locking_Policy
2450 to lift restriction on first character. Handle now the
2451 Name_Concurrent_Readers_Locking where policy character is set to
2453 * snames.ads-tmpl (Name_Concurrent_Readers_Locking): New
2455 * exp_ch9.adb (Build_Protected_Subprogram_Body): Generate a
2456 read only lock for function in protected object.
2457 * s-taprob.ads (Lock_Read_Only): Remove obsolete comment as
2458 this routine is now used.
2460 2011-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2462 * s-atocou-x86.adb (Decrement): Use %;.
2463 (Increment): Likewise.
2465 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
2467 * gcc-interface/utils2.c (build_allocator): Set TREE_THIS_NOTRAP on the
2468 dereference of the pointer to the storage area. Remove useless type
2469 conversions and factor out common code.
2471 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
2473 * gcc-interface/utils.c (maybe_unconstrained_array): Declare TYPE local
2474 variable and use it throughout.
2475 <UNCONSTRAINED_ARRAY_TYPE>: Add 'break' at the end.
2476 <RECORD_TYPE>: Do not unconditionally convert to the unpadded type as a
2477 first step. Also convert to the unpadded type as a last step.
2479 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
2481 * gcc-interface/gigi.h (create_subprog_decl): Replace TREE_CHAIN with
2482 DECL_CHAIN in comment.
2483 * gcc-interface/trans.c (gigi): Likewise.
2484 (Attribute_to_gnu): Likewise.
2485 (build_function_stub): Likewise.
2486 (gnat_to_gnu): Likewise.
2487 * gcc-interface/utils.c (create_subprog_decl): Likewise.
2488 (convert_vms_descriptor64): Likewise.
2489 (convert_vms_descriptor32): Likewise.
2491 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
2493 * gcc-interface/trans.c (assoc_to_constructor): Minor tweaks.
2494 * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting
2495 issues. Use COMPLETE_TYPE_P in assertion. Also set TREE_READONLY if
2496 the type of the record is TYPE_READONLY.
2498 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
2499 Robert Dewar <dewar@adacore.com>
2501 * sem_ch6.adb (Set_Formal_Mode): Set Can_Never_Be_Null on an IN or IN
2502 OUT formal parameter which is of an null-exclusion access subtype.
2504 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
2506 * gcc-interface/ada-tree.h (DECL_CAN_NEVER_BE_NULL_P): New macro.
2507 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Set the flag.
2508 (gnat_to_gnu_param): Likewise.
2509 * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Invoke
2510 maybe_unconstrained_array instead of doing the work manually.
2511 (maybe_unconstrained_array): Propagate the TREE_THIS_NOTRAP flag.
2512 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: If operand
2513 is a DECL with the flag, set TREE_THIS_NOTRAP on the reference.
2514 (gnat_stabilize_reference_1): Propagate the TREE_THIS_NOTRAP flag.
2515 (gnat_stabilize_reference): Likewise.
2517 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
2519 * gcc-interface/ada-tree.h (TYPE_NULL_BOUNDS): New macro.
2520 (SET_TYPE_NULL_BOUNDS): Likewise.
2521 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Set again
2522 TREE_THIS_NOTRAP on the INDIRECT_REF node built for the template.
2523 * gcc-interface/trans.c (Identifier_to_gnu): Return initializers of fat
2525 * gcc-interface/utils.c (create_var_decl_1): If the object is external,
2526 check that the initializer is a valid constant expression for use in
2527 initializing a static variable. Add missing guard.
2528 (update_pointer_to): Adjust TYPE_NULL_BOUNDS if set.
2529 (convert_to_fat_pointer): In the null fat pointer case, build a valid
2530 pointer for the bounds.
2531 * gcc-interface/utils2.c (compare_fat_pointers): New function.
2532 (build_binary_op) <EQ_EXPR>: Call it to compare fat pointers.
2534 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
2536 * gcc-interface/ada-tree.h (TREE_THIS_NOTRAP): Redefine.
2537 * gcc-interface/trans.c (Identifier_to_gnu): Factor out common code in
2538 the by-ref case. Do not set TREE_READONLY on a renamed object. Set
2539 TREE_THIS_NOTRAP on UNCONSTRAINED_ARRAY_REF nodes.
2540 (Attribute_to_gnu) <Attr_Length>: Expand the use of the parameter cache
2541 to the indirect case.
2542 * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Preserve
2543 the TREE_THIS_NOTRAP flag.
2545 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
2547 * gcc-interface/trans.c (Loop_Statement_to_gnu): In the case of an
2548 iteration scheme, always generate the do-while form if optimization
2549 is enabled. Use more straightforward test at the end.
2551 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
2553 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Subtype>: Use
2554 XNEW instead of xmalloc. Do not build useless pointer type.
2555 <E_Anonymous_Access_Subprogram_Type>: Use XNEW instead of xmalloc.
2556 * gcc-interface/trans.c (gnat_to_gnu) <N_Raise_Constraint_Error>: Tidy.
2557 * gcc-interface/utils2.c (build_unary_op): Remove local variable.
2559 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
2561 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not promote
2562 the alignment if this doesn't prevent BLKmode access to the object.
2564 2011-09-24 Iain Sandoe <iains@gcc.gnu.org>
2566 * gcc-interface/Makefile.in (darwin): Do not issue the
2567 '-flat_namespace' linker flag during Ada build.
2568 * mlib-tgt-specific-darwin.adb: Remove '-flat_namespace' flag from the
2569 default shared library options.
2571 2011-09-19 Alexandre Oliva <aoliva@redhat.com>
2573 * gcc-interface/decl.c (annotate_value): Look up expression for
2574 insertion in the cache at the end.
2576 2011-09-19 Arnaud Charlet <charlet@adacore.com>
2578 * gcc-interface/Make-lang.in: Update dependencies.
2580 2011-09-19 Steve Baird <baird@adacore.com>
2582 * snames.ads-tmpl: Move declaration of Name_Annotate into range of
2583 configuration pragma names so that Is_Configuration_Pragma_Name
2584 will return True for Name_Annotate. Make corresponding change in
2585 Pragma_Id enumeration type. This is needed to allow an Annotate
2586 pragma to occur in a configuration pragma file (typically,
2588 * gnat_ugn.texi: Add Annotate to the list of configuration pragmas.
2589 * gnat_rm.texi: Note that pragma Annotate may be used as a
2590 configuration pragma.
2592 2011-09-19 Ed Schonberg <schonberg@adacore.com>
2594 * a-cbmutr.adb, a-cbmutr.ads, a-cimutr.adb, a-cimutr.ads,
2595 a-comutr.adb, a-comutr.ads: Add iterator machinery for multiway trees.
2597 2011-09-19 Yannick Moy <moy@adacore.com>
2599 * exp_alfa.adb, exp_alfa.ads (Expand_Alfa_N_In): New function
2600 for expansion of set membership.
2601 (Expand_Alfa): Call expansion for N_In and N_Not_In nodes.
2602 * exp_ch4.adb, exp_ch4.ads (Expand_Set_Membership): Make procedure
2603 visible for use in Alfa expansion.
2604 * sem_ch5.adb (Analyze_Iterator_Specification): Introduce loop
2605 variable in Alfa mode.
2607 2011-09-19 Thomas Quinot <quinot@adacore.com>
2609 * s-osinte-darwin.ads: Change SIGADAABRT on Darwin to SIGABRT.
2611 2011-09-19 Thomas Quinot <quinot@adacore.com>
2613 * exp_ch9.adb: Minor reformatting.
2615 2011-09-19 Hristian Kirtchev <kirtchev@adacore.com>
2617 * freeze.adb (Build_Renamed_Body): Generic subprograms
2618 instantiations cannot be poperly inlined by the compiler, do
2619 not set the Body_To_Inline attribute in such cases.
2620 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Inherit all
2621 inlining-related flags from the generic subprogram declaration.
2623 2011-09-19 Thomas Quinot <quinot@adacore.com>
2625 * exp_dist.adb, rtsfind.ads, sem_util.adb, sem_util.ads
2626 (Build_Stub_Type): Remove, instead copy components from
2627 System.Partition_Interface.RACW_Stub_Type.
2628 (RPC_Receiver_Decl): Remainder of code from old Build_Stub_Type routine.
2629 (Copy_Component_List): New subprogram.
2631 2011-09-19 Yannick Moy <moy@adacore.com>
2633 * lib-xref.adb (Generate_Reference): Ignore references to
2634 constants in Standard.
2636 2011-09-19 Robert Dewar <dewar@adacore.com>
2638 * err_vars.ads, errout.ads: Minor reformatting.
2640 2011-09-19 Robert Dewar <dewar@adacore.com>
2642 * aspects.ads (Impl_Defined_Aspects): New array
2643 * lib-writ.adb (No_Dependences): New name for No_Dependence
2644 * restrict.adb (No_Dependences): New name for No_Dependence
2645 (Check_Restriction_No_Specification_Of_Aspect): New
2647 (Set_Restriction_No_Specification_Of_Aspect): New procedure
2648 (Restricted_Profile_Result): New variable
2649 (No_Specification_Of_Aspects): New variable
2650 (No_Specification_Of_Aspect_Warning): New variable
2651 * restrict.ads (No_Dependences): New name for No_Dependence
2652 (Check_Restriction_No_Specification_Of_Aspect): New procedure
2653 (Set_Restriction_No_Specification_Of_Aspect): New procedure
2654 * s-rident.ads: Add restriction
2655 No_Implementation_Aspect_Specifications, this is also added to
2656 the No_Implementation_Extensions profile.
2657 * sem_ch13.adb (Analyze_Aspect_Specifications): Check
2658 No_Implementation_Defined_Aspects
2659 (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
2660 * sem_prag.adb (Analyze_Aspect_Specifications): Check
2661 No_Implementation_Aspects
2662 (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
2663 * snames.ads-tmpl (Name_No_Specification_Of_Aspect): New name
2665 2011-09-19 Yannick Moy <moy@adacore.com>
2667 * lib-xref.adb (Generate_Reference): Take into account multiple
2668 renamings for Alfa refs.
2670 2011-09-19 Thomas Quinot <quinot@adacore.com>
2672 * g-socthi-mingw.adb: Minor reformatting.
2674 2011-09-19 Yannick Moy <moy@adacore.com>
2676 * gnat1drv.adb (Adjust_Global_Switches): Set tagged type
2677 expansion to False in mode Alfa
2679 2011-09-19 Pascal Obry <obry@adacore.com>
2681 * mingw32.h: Remove obsolete code needed for old versions
2684 2011-09-19 Robert Dewar <dewar@adacore.com>
2686 * errout.ads: Minor reformatting.
2688 2011-09-19 Ed Schonberg <schonberg@adacore.com>
2690 * sem_ch6.adb (Analyze_Expression_Function): When the expression
2691 function is transformed into a declaration and a body, insert
2692 body at the end of the declarative part, to prevent premature
2693 freeze actions, and preserve original specification in the
2694 subprogram declaration.
2696 2011-09-19 Vincent Celier <celier@adacore.com>
2698 * projects.texi: Minor editing.
2700 2011-09-19 Robert Dewar <dewar@adacore.com>
2702 * sem_aggr.adb, lib-writ.ads, s-restri.ads, sem_ch6.adb,
2703 exp_aggr.adb: Minor reformatting.
2705 2011-09-19 Yannick Moy <moy@adacore.com>
2707 * lib-xref.adb (Generate_Reference): Change entity referenced
2708 to underlying object if any, or else reference to the HEAP.
2710 2011-09-15 Arnaud Charlet <charlet@adacore.com>
2712 * gcc-interface/Make-lang.in: Update dependencies.
2714 2011-09-15 Robert Dewar <dewar@adacore.com>
2716 * tree_io.ads: Minor reformatting.
2717 * a-intnam.ads: Fix bad header.
2719 2011-09-15 Thomas Quinot <quinot@adacore.com>
2721 * a-exexpr-gcc.adb: Minor reformatting.
2723 2011-09-15 Yannick Moy <moy@adacore.com>
2725 * sem_ch6.adb: Propagate information that an expression function comes
2726 from source (otherwise references to this entity are not stored).
2728 2011-09-15 Robert Dewar <dewar@adacore.com>
2730 * a-cdlili.adb, a-coinve.adb, a-stzunb-shared.ads, a-suezst.adb,
2731 a-suenco.adb, a-stwiun-shared.ads, a-cobove.adb, a-convec.adb,
2732 a-btgbso.adb, a-cbdlli.adb, a-suewst.adb: Minor reformatting.
2734 2011-09-15 Ed Schonberg <schonberg@adacore.com>
2736 * sem_ch6.adb (Analyze_Expression_Function): Code cleanup:
2737 if the expression function is not a completion, create a
2738 new specification for the generated declaration, and keep the
2739 original specification in the generated body. Shorter code also
2740 ensures that proper warnings are generated for unused formals
2743 2011-09-15 Sergey Rybin <rybin@adacore.com>
2745 * tree_io.ads: Update ASIS_Version_Number because of the changes
2746 in the tree structures for expression functions.
2748 2011-09-15 Arnaud Charlet <charlet@adacore.com>
2750 * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
2751 s-osinte-hpux.ads, s-osinte-lynxos.ads, s-osinte-solaris-posix.ads,
2752 s-taprop-posix.adb (CLOCK_MONOTONIC): New constant.
2753 (CLOCK_REALTIME): Fix wrong value on some OSes.
2754 * s-taprop-posix.adb (Monotonic_Clock): Use CLOCK_MONOTONIC.
2756 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
2758 * gcc-interface/utils.c (maybe_unconstrained_array): In the reference
2759 to unconstrained array case, deal with each branch of a COND_EXPR.
2760 * gcc-interface/utils2.c (build_allocator): Deal with each branch of
2761 a COND_EXPR in the initializer, if present.
2763 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
2765 * gcc-interface/decl.c (maybe_pad_type): Do not try to change the form
2766 of an addressable type.
2767 * gcc-interface/trans.c (gnat_gimplify_expr) <VIEW_CONVERT_EXPR>: New.
2768 Deal with those cases for which creating a temporary is mandatory.
2770 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
2772 * gcc-interface/trans.c (call_to_gnu): Use local variable. Make sure
2773 this is a real formal parameter before testing whether it is by ref.
2775 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
2777 * gcc-interface/gigi.h (build_call_0_expr): Delete.
2778 (build_call_1_expr): Likewise.
2779 (build_call_2_expr): Likewise.
2780 (build_call_n_expr): New prototype.
2781 * gcc-interface/decl.c (gnat_to_gnu_entity): Use build_call_n_expr.
2782 * gcc-interface/trans.c (establish_gnat_vms_condition_handler): Ditto.
2783 (Handled_Sequence_Of_Statements_to_gnu): Likewise.
2784 (Exception_Handler_to_gnu_zcx): Likewise.
2785 (gnat_to_gnu): Likewise.
2786 (build_binary_op_trapv): Likewise.
2787 * gcc-interface/utils2.c (build_call_0_expr): Delete.
2788 (build_call_1_expr): Likewise.
2789 (build_call_2_expr): Likewise.
2790 (build_call_n_expr): New function.
2791 (build_call_raise): Use build_call_n_expr.
2792 (build_call_raise_range): Likewise.
2793 (build_call_raise_column): Likewise.
2794 (build_call_alloc_dealloc_proc): Likewise.
2795 (maybe_wrap_malloc): Likewise.
2796 (maybe_wrap_free): Likewise.
2798 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
2800 * gcc-interface/trans.c (build_return_expr): Use void_type_node for
2802 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Assert that
2803 the result type is null if ENABLE_CHECKING. Set operation_type at the
2804 end unconditionally if not set in the previous cases.
2805 Use build2 and void_type_node for MODIFY_EXPR.
2806 (build_allocator): Use NULL_TREE for MODIFY_EXPR.
2808 2011-09-08 Eric Botcazou <ebotcazou@adacore.com>
2810 * gcc-interface/utils.c (unchecked_convert): Use a field of the right
2811 precision when converting to or from an integral type whose precision
2812 is not equal to its size.
2814 2011-09-08 Iain Sandoe <iains@gcc.gnu.org>
2816 * traceback.c (Darwin) USE_GCC_UNWINDER for Darwin versions >= 8.
2818 2011-09-07 Iain Sandoe <iains@gcc.gnu.org>
2820 * gcc-interface/Makefile.in (darwin): Provide powerpc64 system
2822 * system-darwin-ppc64.ads: New file.
2824 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
2826 * gcc-interface/Makefile.in (gnatlib-shared-darwin): Remove
2829 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
2831 * gcc-interface/Makefile.in (darwin, SO_OPTS): Provide architecture
2832 size switches to the link phase for shared libs.
2834 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
2836 * gcc-interface/Makefile.in (x86_64 darwin arch): Adjust
2837 LIBGNAT_TARGET_PAIRS for x86 and x86_64 variants.
2839 2011-09-06 Arnaud Charlet <charlet@adacore.com>
2841 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in
2842 (gnattools, regnattools, cross-gnattools, canadian-gnattools,
2843 gnatlib, gnatlib-sjlj, gnatlib-zcx, gnatlib-shared, gnatlib_and_tools):
2845 (TOOLS_FLAGS_TO_PASS): New.
2846 (../stamp-tools): Reintroduce, to avoid merge conflicts.
2848 2011-09-06 Robert Dewar <dewar@adacore.com>
2850 * sem_ch10.adb, impunit.ads, impunit.adb (Not_Impl_Defined_Unit): New
2851 name for Is_RM_Defined_Unit. Also several fixes to this unit.
2853 2011-09-06 Robert Dewar <dewar@adacore.com>
2855 * impunit.ads, impunit.adb (Is_RM_Defined_Unit): New function.
2856 * s-rident.ads: New restriction No_Implementation_Units
2857 (this restriction is also part of the profile
2858 No_Implementation_Extensions)
2859 * sem_ch10.adb (Analyze_With_Clause): Add check for
2860 No_Implementation_Units restriction.
2862 2011-09-06 Jerome Guitton <guitton@adacore.com>
2864 * sysdep.c (__gnat_get_task_options): Disable VX_SPE_TASK
2867 2011-09-06 Thomas Quinot <quinot@adacore.com>
2869 * s-solita.adb: Minor reformatting.
2871 2011-09-06 Ed Schonberg <schonberg@adacore.com>
2873 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The body that
2874 is a rewriting of an expression function does not freeze previous
2877 2011-09-06 Robert Dewar <dewar@adacore.com>
2879 * impunit.adb (Is_Known_Unit): Fix bad handling of Ada 2012 case
2881 2011-09-06 Tristan Gingold <gingold@adacore.com>
2883 * gcc-interface/Makefile.in: Handle e500v2-wrs-vxworksae like
2884 powerpc-wrs-vxworksae.
2886 2011-09-06 Thomas Quinot <quinot@adacore.com>
2888 * s-os_lib.ads (Spawn): Minor documentation clarification,
2889 Success is True for a zero exit status.
2891 2011-09-06 Ed Schonberg <schonberg@adacore.com>
2893 * sem_ch5.adb: Add message for common iterator error.
2895 2011-09-06 Ed Schonberg <schonberg@adacore.com>
2897 * exp_ch3.adb (Build_Initialization_Call): If the target is a
2898 selected component discriminated by a current instance, replace
2899 the constraint with a reference to the target object, regardless
2900 of whether the context is an init_proc.
2902 2011-09-06 Robert Dewar <dewar@adacore.com>
2904 * exp_attr.adb: Descriptor_Size is never static.
2906 2011-09-06 Robert Dewar <dewar@adacore.com>
2908 * gnat_ugn.texi: Add documentation for LSLOC metric in gnatmetric
2910 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2912 * gnat_rm.texi: Clarify that attribute Descriptor_Size is
2915 2011-09-06 Ed Schonberg <schonberg@adacore.com>
2917 * sem_res.adb (Resolve): An expression that is the body of an
2918 expression function does not freeze.
2920 2011-09-06 Matthew Heaney <heaney@adacore.com>
2922 * a-csquin.ads, a-cusyqu.adb, a-cbprqu.adb, a-cbsyqu.adb,
2923 a-cuprqu.adb: Changed copyright notice to indicate current
2926 2011-09-06 Vincent Celier <celier@adacore.com>
2928 * prj.adb: Minor spelling error fix in comment
2929 * sem_res.adb: Minor reformatting
2931 2011-09-06 Pascal Obry <obry@adacore.com>
2933 * sysdep.c (winflush_nt): Removed as not needed anymore.
2934 (winflush_95): Likewise.
2935 (winflush_init): Likewise.
2936 (winflush_function): Likewise.
2937 (getc_immediate_common): Remove call to winflush_function.
2939 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2941 * exp_attr.adb (Expand_N_Attribute_Reference): Rewrite the
2942 processing for Descriptor_Size.
2943 * gnat_rm.texi: Rephrase the wording for attribute Descriptor_Size
2944 to account for its broader usage.
2945 * sem_attr.adb (Analyze_Attribute): Change the error detection
2946 circuitry for Descriptor_Size as the attribute is now applicable
2949 2011-09-06 Robert Dewar <dewar@adacore.com>
2951 * sem_attr.adb, prj-nmsc.adb, exp_aggr.adb: Minor reformatting.
2953 2011-09-06 Ed Schonberg <schonberg@adacore.com>
2955 * lib-xref.adb (OK_To_Set_Referenced): A reference to a formal
2956 in a parameter association must not set the Referenced flag on
2958 * prj-nmsc.adb (Check_File_Naming_Schemes): Remove useless formal
2960 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2962 * gnat_rm.texi: Add a section on attribute Descriptor_Size
2964 2011-09-06 Arnaud Charlet <charlet@adacore.com>
2966 * gcc-interface/Makefile.in (common-tools, gnatmake-re,
2967 gnatlink-re): Speed up by using -j0.
2969 2011-09-06 Yannick Moy <moy@adacore.com>
2971 * sem_ch13.adb (Analyze_Aspect_Specifications): Call
2972 Set_Corresponding_Aspect when creating pragma from aspect.
2973 (Add_Predicates): Use new field Corresponding_Aspect.
2974 * sem_prag.adb (Analyze_Pragma): Make Pname hold source aspect
2975 name when present, for the purpose of issuing error messages;
2976 remove local procedure Error_Pragma_Arg_Alternate_Name.
2977 * sinfo.adb, sinfo.ads (Corresponding_Aspect): New field in
2979 (From_Dynamic_Predicate, From_Static_Predicate): Remove fields from
2982 2011-09-06 Robert Dewar <dewar@adacore.com>
2984 * checks.adb, s-except.ads, g-socket.adb: Minor reformatting.
2986 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2988 * exp_ch6.adb (Build_Heap_Allocator): Add new
2989 local variable Desig_Typ. Code and comment reformatting. Add
2990 machinery to ensure that the allocation uses a fat pointer when
2991 the type of the return object is a constrained array and the
2992 function return type is an unconstrained array.
2994 2011-09-06 Vincent Celier <celier@adacore.com>
2996 * make.adb, prj-part.adb, prj-nmsc.adb: Remove unused formal
2997 parameters in subprograms.
2999 2011-09-06 Arnaud Charlet <charlet@adacore.com>
3001 * s-taprop-mingw.adb (Finalize_TCB): Fix typo.
3003 2011-09-06 Thomas Quinot <quinot@adacore.com>
3005 * s-taprop-vxworks.adb, s-tpoaal.adb, s-tpopsp-vxworks.adb
3006 (System.Tasking.Primitive_Operations.Specific.Delete): Remove
3008 (System.Tasking.Primitive_Operations.Specific.Set): If argument
3009 is null, destroy task specific data, to make API consistent with
3010 other platforms, and thus compatible with the shared version
3012 (System.Tasking.Primitive_Operations.ATCB_Allocation.Free_ATCB):
3013 Document the above assumption.
3015 2011-09-06 Ed Schonberg <schonberg@adacore.com>
3017 * exp_ch6.adb (Expand_Inlined_Call): Fix use of uninitialized
3018 variable for type of return value when return type is
3019 unconstrained and context is an assignment.
3021 2011-09-06 Ed Schonberg <schonberg@adacore.com>
3023 * sem_ch8.adb (Check_Class_Wide_Actual): Do not generate body of
3024 class-wide operation if expansion is not enabled.
3026 2011-09-06 Eric Botcazou <ebotcazou@adacore.com>
3028 * checks.adb (Apply_Scalar_Range_Check): Deal with access
3031 2011-09-06 Yannick Moy <moy@adacore.com>
3033 * sem_ch13.adb (Analyze_Aspect_Specifications, case
3034 Aspect_Invariant): Do not issue error at this point on illegal
3035 pragma placement, as this is checked later on when analyzing
3036 the corresponding pragma.
3037 * sem_prag.adb (Error_Pragma_Arg_Alternate_Name): New procedure
3038 similar to Error_Pragma_Arg, except the source name of the
3039 aspect/pragma to use in warnings may be equal to parameter
3040 Alt_Name (Analyze_Pragma, case Pragma_Invariant): refine error
3041 message to distinguish source name of pragma/aspect, and whether
3042 the illegality resides in the type being public, or being private
3043 without a public declaration
3045 2011-09-06 Thomas Quinot <quinot@adacore.com>
3047 * g-socket.adb (Check_For_Fd_Set): On Windows, no need for bitmap
3048 size check (fd_set is implemented differently on that platform).
3050 2011-09-06 Thomas Quinot <quinot@adacore.com>
3052 * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
3053 s-tpoaal.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
3054 s-taprop-solaris.adb, s-taprop-irix.adb, s-taprop.ads,
3055 s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
3056 (ATCB_Allocation): New subpackage of
3057 System.Tasking.Primitive_Operations, shared across all targets
3058 with full tasking runtime.
3059 (ATCB_Allocation.New_ATCB): Moved there (from target specific
3061 (ATCB_Allocation.Free_ATCB): New subprogram. Deallocate an ATCB,
3062 taking care of establishing a local temporary ATCB if the one
3063 being deallocated is Self, to avoid a reference to the freed
3064 ATCB in Abort_Undefer.
3066 2011-09-06 Thomas Quinot <quinot@adacore.com>
3068 * s-tassta.adb, s-taskin.ads (Free_Task): If the task is not
3069 terminated, mark it for deallocation upon termination.
3070 (Terminate_Task): Call Free_Task again if the task is marked
3071 for automatic deallocation upon termination.
3073 2011-09-06 Robert Dewar <dewar@adacore.com>
3075 * a-cbprqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cusyqu.ads,
3076 a-intnam-aix.ads, a-intnam-darwin.ads, a-intnam-dummy.ads,
3077 a-intnam-freebsd.ads, a-intnam-hpux.ads, a-intnam-irix.ads,
3078 a-intnam-linux.ads, a-intnam-lynxos.ads, a-intnam-mingw.ads,
3079 a-intnam-solaris.ads, a-intnam-tru64.ads,
3080 a-intnam-vms.ads, a-intnam-vxworks.ads, a-intnam.ads, interfac.ads,
3081 cstand.adb, s-maccod.ads: Mark all entities as Implementation_Defined
3082 * einfo.ads, einfo.adb (Is_Implementation_Defined): New flag
3083 * par-prag.adb: Add dummy entry for pragma Implementation_Defined
3084 * s-rident.ads: Add new restriction No_Implementation_Identifiers
3085 Add new profile No_Implementation_Extensions
3086 * sem_prag.adb: Implement pragma Implementation_Defined Implement
3087 profile No_Implementation_Extensions
3088 * sem_util.adb: Minor reformatting (Set_Entity_With_Style_Check):
3089 Check violation of restriction No_Implementation_Identifiers
3090 * snames.ads-tmpl: Add entries for pragma Implementation_Defined
3091 Add entry for Name_No_Implementation_Extensions
3093 2011-09-06 Robert Dewar <dewar@adacore.com>
3095 * impunit.ads: Minor reformatting.
3097 2011-09-06 Robert Dewar <dewar@adacore.com>
3099 * ali.adb, sem_ch13.adb, lib-xref.adb: Minor reformatting.
3101 2011-09-06 Pascal Obry <obry@adacore.com>
3103 * s-osinte-linux.ads, s-oscons-tmplt.c: Use oscons to define sigset_t
3106 2011-09-06 Robert Dewar <dewar@adacore.com>
3108 * g-socket.adb: Minor reformatting
3110 2011-09-06 Javier Miranda <miranda@adacore.com>
3112 * ali.adb (Scan_ALI): Add missing support to load references of
3113 entities imported from other languages.
3114 * ali.ads (Xref_Record): Adding new fields to store the language and
3115 name of an imported entity.
3116 * lib-xref.adb (Output_Import_Export_Info): Fix typo
3119 2011-09-06 Ed Schonberg <schonberg@adacore.com>
3121 * sem_prag.adb (Analyze_Pragma, case Type_Invariant): A type invariant
3122 is allowed on a full type declaration if it is the completion of
3123 a private declarations.
3124 * sem_ch13.adb (Analyze_Aspect_Specifications): An invariant
3125 aspect is allowed on a full type declaration in the private part
3128 2011-09-06 Robert Dewar <dewar@adacore.com>
3130 * sem_ch8.ads: Minor reformatting
3132 2011-09-06 Thomas Quinot <quinot@adacore.com>
3134 * s-oscons-tmplt.c, g-socket.adb (GNAT.Sockets.Clear,Set,Is_Set):
3135 Guard against socket values that are not in [0;FD_SETSIZE[
3137 2011-09-06 Robert Dewar <dewar@adacore.com>
3139 * s-osinte-linux.ads, a-iteint.ads, exp_ch6.adb, s-solita.adb: Minor
3142 2011-09-06 Arnaud Charlet <charlet@adacore.com>
3144 * s-linux-alpha.ads: Minor reformatting
3145 * s-oscons-tmplt.c: Fix generated comments in s-oscons template.
3146 Use sizeof instead of corresponding C defines in s-oscons template.
3148 2011-09-06 Vadim Godunko <godunko@adacore.com>
3150 * a-convec.ads, a-iteint.ads: Minor reformatting.
3152 2011-09-06 Vincent Celier <celier@adacore.com>
3154 * projects.texi: Add menus and @node lines.
3156 2011-09-06 Ed Schonberg <schonberg@adacore.com>
3158 * exp_ch6.adb (Expand_Inlined_Call): Handle properly the case
3159 where the return type is an unconstrained array and the context
3160 is an assignment. Optimize the case when the target of the
3161 assignment is a selected component.
3163 2011-09-06 Arnaud Charlet <charlet@adacore.com>
3165 * s-solita.adb: Update comments.
3167 2011-09-06 Pascal Obry <obry@adacore.com>
3169 * s-linux.ads, s-linux-alpha.ads, s-linux-hppa.ads, s-linux-mipsel.ads,
3170 s-linux-sparc.ads: Remove hard coded and now wrong definitions.
3171 * s-oscons-tmplt.c: Add support for generating pthread related
3172 types size on GNU/Linux as done for Darwin.
3173 * s-osinte-linux.ads: Use s-oscons to define the pthread types.
3175 2011-09-06 Robert Dewar <dewar@adacore.com>
3177 * exp_ch6.adb: Fix minor typo.
3179 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
3181 * exp_ch7.adb: Remove with and use clauses for Get_Targ.
3182 (Alignment_Of): Moved to the body of Nearest_Multiple_Rounded_Up.
3183 (Double_Size_Of): Alphabetized. Update the comment on usage.
3184 (Make_Finalize_Address_Stmts): Update comments and reformat code.
3185 (Nearest_Multiple_Rounded_Up): New routine.
3186 (Size_Of): Update comment on usage. The generated expression now
3187 accounts for alignment gaps by rounding the size of the type to the
3188 nearest multiple rounded up of the type's alignment.
3190 2011-09-06 Robert Dewar <dewar@adacore.com>
3192 * exp_ch7.adb, g-comlin.adb: Minor reformatting.
3194 2011-09-06 Steve Baird <baird@adacore.com>
3196 * exp_ch4.adb (Expand_Allocator_Expression): Look through
3197 derived subprograms in checking for presence of an
3198 Extra_Accessibility_Of_Result formal parameter.
3199 * exp_ch6.adb (Expand_Call): Look through derived subprograms in
3200 checking for presence of an Extra_Accessibility_Of_Result formal
3202 (Expand_Call.Add_Actual_Parameter): Fix a bug in the
3203 case where the Parameter_Associatiations attribute is already set,
3204 but set to an empty list.
3205 (Needs_Result_Accessibility_Level):
3206 Unconditionally return False. This is a temporary
3207 change, disabling the Extra_Accessibility_Of_Result
3209 (Expand_Simple_Function_Return): Check for
3210 Extra_Accessibility_Of_Result parameter's presence instead of
3211 testing Ada_Version when generating a runtime accessibility
3212 check which makes use of the parameter.
3214 2011-09-06 Ed Schonberg <schonberg@adacore.com>
3216 * exp_ch4.adb (Expand_N_Case_Expression): Actions created for the
3217 expression in a given case alternative must be attached to the
3218 statement list of the ccrresponding case statement alternative
3219 They cannot be propagated ahead of the case statement, because
3220 the validity of the expression that generated the action may
3221 hold only for that alternative.
3223 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
3225 * exp_ch7.adb: Remove with and use clauses for Get_Targ.
3226 (Alignment_Of): Remove the code for strict alignment targets.
3227 (Double_Alignment_Of): Removed.
3228 (Double_Size_Of): New routine.
3229 (Make_Finalize_Address_Stmts): Change the
3230 calculation of the dope's size. Update relevant comments.
3231 (Size_Of): New routine.
3233 2011-09-06 Steve Baird <baird@adacore.com>
3235 * einfo.ads (Extra_Accessibility): Update associated comment to use
3236 the term "present" correctly ("present" just means that it is not
3237 an error to query the value of the attribute - it does not imply
3238 that the value must be non-null).
3239 (Extra_Constrained): Ditto.
3240 (Is_Visible_Formal): Ditto.
3241 (Extra_Accessibility_Of_Result) Ditto; also add Inline pragma.
3242 (Set_Extra_Accessibility_Of_Result): Add Inline pragma.
3243 * exp_ch4.adb (Expand_Allocator_Expression): Improve a comment.
3244 * exp_ch6.adb (Expand_Call): The callee may require an
3245 Extra_Accessibility_Of_Result actual parameter even if Ada_Version
3246 < Ada_2012. This can occur if the callee is exported from a Gnat
3247 runtimes unit. Also improve a comment.
3249 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
3251 * exp_ch7.adb: Add with and use clauses for Get_Targ.
3252 (Alignment_Of): Rename formal parameter Some_Typ
3253 to Typ, update related comment. Use the allocator alignment on
3254 strict alignment targets such as SPARC.
3255 (Double_Alignment_Of): Rename formal parameter Some_Typ to Typ, update
3258 2011-09-06 Gary Dismukes <dismukes@adacore.com>
3260 * sem_ch9.adb (Check_Interfaces): Test
3261 Is_Limited_Type rather than Is_Limited_Record when checking that
3262 the partial view of a synchronized full view must be limited.
3264 2011-09-06 Emmanuel Briot <briot@adacore.com>
3266 * g-comlin.adb (Free): Fix memory leak.
3268 2011-09-06 Robert Dewar <dewar@adacore.com>
3270 * sem_util.adb, exp_ch6.adb: Minor reformatting and code reorganization.
3272 2011-09-06 Steve Baird <baird@adacore.com>
3274 * einfo.ads (Extra_Accessibility_Of_Result): New function; in the
3275 (Ada2012) cases described in AI05-0234 where the accessibility
3276 level of a function result is "determined by the point of
3277 call", an implicit parameter representing that accessibility
3278 level is passed in. Extra_Accessibilty_Of_Result yields this
3279 additional formal parameter. Extra_Accessibility_Of_Result
3280 is analogous to the existing Extra_Accessibility
3281 function used in the implementation of access parameters.
3282 (Set_Extra_Accessibility_Of_Result): New procedure; sets
3283 Extra_Accessibility_Of_Result attribute.
3284 * einfo.adb (Extra_Accessibility_Of_Result): New function.
3285 (Set_Extra_Accessibility_Of_Result): New procedure.
3286 (Write_Field19_Name): Display Extra_Accessibilty_Of_Result attribute.
3287 * sem_util.adb (Dynamic_Accessibility_Level): Set Etype of
3288 an accessibility level literal to Natural; introduce a nested
3289 function, Make_Level_Literal, to do this.
3290 * exp_ch6.ads (Needs_Result_Accessibility_Level): New function;
3291 determines whether a given function (or access-to-function
3292 type) needs to have an implicitly-declared accessibility-level
3293 parameter added to its profile.
3294 (Add_Extra_Actual_To_Call): Export an existing procedure which was
3295 previously declared in the body of Exp_Ch6.
3296 * exp_ch6.adb (Add_Extra_Actual_To_Call): Export declaration by moving
3298 (Has_Unconstrained_Access_Discriminants): New Function; a
3299 predicate on subtype entities which returns True if the given
3300 subtype is unconstrained and has one or more access discriminants.
3301 (Expand_Call): When expanding a call to a function which takes an
3302 Extra_Accessibility_Of_Result parameter, pass in the appropriate
3303 actual parameter value. In the case of a function call which is
3304 used to initialize an allocator, this may not be possible because
3305 the Etype of the allocator may not have been set yet. In this
3306 case, we defer passing in the parameter and handle it later in
3307 Expand_Allocator_Expression.
3308 (Expand_Simple_Function_Return): When returning from a function which
3309 returns an unconstrained subtype having at least one access
3310 discriminant, generate the accessibility check needed to ensure that
3311 the function result will not outlive any objects designated by its
3313 (Needs_Result_Accessibility_Level): New function; see exp_ch6.ads
3315 * exp_ch4.adb (Expand_Allocator_Expression): When a function call
3316 is used to initialize an allocator, we may need to pass in "the
3317 accessibility level determined by the point of call" (AI05-0234)
3318 to the function. Expand_Call, where such actual parameters are
3319 usually generated, is too early in this case because the Etype of
3320 the allocator (which is used in determining the level to be passed
3321 in) may not have been set yet when Expand_Call executes. Instead,
3322 we generate code to pass in the appropriate actual parameter
3323 in Expand_Allocator_Expression.
3324 * sem_ch6.adb (Create_Extra_Formals): Create
3325 the new Extra_Accessibility_Of_Result formal if
3326 Needs_Result_Accessibility_Level returns True. This includes the
3327 introduction of a nested procedure, Check_Against_Result_Level.
3329 2011-09-06 Arnaud Charlet <charlet@adacore.com>
3331 * gcc-interface/Makefile.in (X86_TARGET_PAIRS): Remove duplicate
3334 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
3336 * s-finmas.adb (Set_Finalize_Address): Explain the reason
3337 for the synchronization. Move the test for null from
3338 s-stposu.Allocate_Any_Controlled to this routine since the check
3339 needs to be protected too.
3340 (Set_Heterogeneous_Finalize_Address): Explain the reason for the
3341 synchronization code.
3342 * s-finmas.ads (Set_Heterogeneous_Finalize_Address): Add comment
3343 explaining the context in which this routine is used.
3344 * s-stposu.adb (Allocate_Any_Controlled): Move the test for null
3345 to s-finmas.Set_Finalize_Address.
3347 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3349 * einfo.ads: Document that itypes have no parent field.
3351 2011-09-05 Robert Dewar <dewar@adacore.com>
3353 * rtsfind.adb (Check_CRT): Check for overloaded entity
3354 * rtsfind.ads: Document that entities to be found by rtsfind
3355 cannot be overloaded
3356 * s-taenca.adb, s-tasren.adb, s-tpobop.adb, s-tpoben.ads, s-tpoben.adb
3357 (Lock_Entries_With_Status): New name for Lock_Entries with two
3358 arguments (changed to meet rtsfind no overloading rule).
3360 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
3362 * s-finmas.adb (Set_Finalize_Address (Address,
3363 Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
3364 (Set_Finalize_Address (in out Finalization_Master,
3365 Finalize_Address_Ptr): Add synchronization code.
3366 * s-finmas.ads (Set_Finalize_Address (Address,
3367 Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
3368 * s-stposu.adb (Allocate_Any_Controlled): Update the call to
3369 Set_Finalize_Address for the heterogeneous case.
3371 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3373 * sem_ch3.adb: Undo previous change, not suitable after all.
3375 2011-09-05 Robert Dewar <dewar@adacore.com>
3377 * einfo.ads: Minor comment clarification.
3379 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
3381 * exp_ch6.adb (Move_Activation_Chain): Rewritten. The routine
3382 no longer needs to search through the entities of the return
3383 statement scope to find the _chain.
3384 * sem_ch5.adb: Add with and use clauses for Exp_Ch6 and Sem_Ch6.
3385 (Analyze_Block_Statement): Add local variable
3386 Is_BIP_Return_Statement. Add machinery to install all entities
3387 produced by the expansion of the return object declaration.
3388 (Install_Return_Entities): New routine.
3389 * sem_ch6.ads, sem_ch6.adb (Install_Entity): Moved from body to spec.
3391 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3393 * sem_ch10.adb (Analyze_Context): Apply simple fixup if context
3394 of subunit is incomplete.
3395 (Analyze_Proper_Body): If parent spec is not available, do not
3398 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3400 * sem_disp.adb (Find_Controlling_Arg): Add checks for
3401 interface type conversions, that are expanded into dereferences.
3403 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
3405 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
3406 Examine the parameter and return profile of a subprogram and swap
3407 any incomplete types coming from a limited context with their
3408 corresponding non-limited views.
3409 (Exchange_Limited_Views): New routine.
3411 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3413 * sem_ch3.adb (Prepare_Private_Subtype_Completion): Set parent
3414 of internal entity to the subtype declaration, so that when
3415 entities are subsequently exchanged in a package body, the tree
3416 remains properly formatted for ASIS.
3418 2011-09-05 Johannes Kanig <kanig@adacore.com>
3420 * g-comlin.adb (Set_Usage): Additional optional argument to set help
3422 (Display_Help): display the user given help message, if available.
3424 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3426 * sem_ch3.adb (OK_For_Limited_Init_In_05): The expression
3427 is legal if the original node is an identifier that is a
3428 parameterless function call.
3430 2011-09-05 Pascal Obry <obry@adacore.com>
3432 * prj-nmsc.adb: Minor reformatting.
3433 Add support for standalone aggregate library.
3434 (Check_Stand_Alone_Library): Handle standalone aggregate library.
3435 * projects.texi: Fix documentation for aggregate library projects.
3437 2011-09-05 Robert Dewar <dewar@adacore.com>
3439 * sem_ch6.adb: Minor reformatting.
3441 2011-09-05 Matthew Gingell <gingell@adacore.com>
3443 * s-tassta.adb (Task_Wrapper): Ensure that we don't try to write the
3444 stack guard page on PPC Linux. This patch ensures the 64K guard page at
3445 the bottom of the stack is not overwritten.
3447 2011-09-05 Thomas Quinot <quinot@adacore.com>
3449 * exp_intr.adb, s-tasini.adb: Minor reformatting.
3451 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3453 * sem_ch3.adb (Access_Definition): If an access type declaration
3454 appears in a child unit, the scope of whatever anonymous type
3455 may be generated is the child unit itself.
3457 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3459 * sem_ch6.adb (Analyze_Expression_Function): Do not set
3460 Comes_From_Source on rewritten body.
3461 (Analyze_Subprogram_Body_Helper): Check that the original node for
3462 the body comes from source, when determining whether expansion
3463 of a protected operation is needed.
3465 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3467 * exp_aggr.adb (Replace_Type): If the target of the assignment is
3468 a selected component and the right-hand side is a self-referential
3469 access, the proper prefix of the rewritten attribute is a copy
3470 of the left-hand side, not of its prefix.
3472 2011-09-05 Robert Dewar <dewar@adacore.com>
3474 * sem_ch5.adb: Minor reformatting.
3475 * sem_ch3.adb: Minor code clean up.
3477 2011-09-05 Jose Ruiz <ruiz@adacore.com>
3479 * exp_ch9.adb (Make_Initialize_Protection): The fact that
3480 restriction No_Dynamic_Attachment is in effect or not should
3481 not influence the default priority associated to a protected
3482 object. With this change, when the restriction is in effect (as
3483 is the case for the Ravenscar profile) the default priority of
3484 a protected object with an interrupt handler is in the range of
3485 interrupt priorities (Default_Interrupt_Priority) as required
3488 2011-09-05 Arnaud Charlet <charlet@adacore.com>
3490 * a-iteint.ads: Fix header.
3492 2011-09-05 Vincent Celier <celier@adacore.com>
3494 * prj-conf.adb (Do_Autoconf): Make sure Obj_Dir always ends
3495 with a directory separator to avoid output such as:
3496 "/path/to/objauto.cgpr" has been deleted.
3498 2011-09-05 Robert Dewar <dewar@adacore.com>
3500 * sem_ch3.adb: Minor reformatting.
3502 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3504 * sem_ch5.adb: Better error message.
3506 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
3508 * exp_aggr.adb: Add with and use clause for Exp_Ch6.
3509 (Expand_Array_Aggregate): Detect a special case of an aggregate
3510 which contains tasks in the context of an unexpanded return
3511 statement of a build-in-place function.
3512 * exp_ch6.adb: Add with and use clause for Exp_Aggr.
3513 (Expand_N_Extended_Return_Statement): Detect a delayed aggregate
3514 which contains tasks and expand it now that the original simple
3515 return statement has been rewritten.
3516 * exp_ch9.adb (Build_Activation_Chain_Entity): Code
3517 reformatting. Do not create a chain for an extended return
3518 statement if one is already available.
3519 (Has_Activation_Chain): New routine.
3521 2011-09-05 Marc Sango <sango@adacore.com>
3523 * sem_ch3.adb (Analyze_Object_Declaration): Remove
3524 the wrong test and add the correct test to detect the violation
3525 of illegal use of unconstrained string type in SPARK mode.
3527 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3529 * sem_ch5.adb (Analyze_Iteration_Specification): Improve error
3530 message on an iterator over an array.
3532 2011-09-05 Robert Dewar <dewar@adacore.com>
3534 * lib-xref-alfa.adb: Minor reformatting.
3536 2011-09-05 Robert Dewar <dewar@adacore.com>
3538 * sem_ch3.adb, sem_res.adb, par.adb, par-ch6.adb, g-comlin.adb,
3539 exp_ch6.adb, lib-xref-alfa.adb: Minor reformatting.
3541 2011-09-05 Gary Dismukes <dismukes@adacore.com>
3543 * exp_ch7.adb, exp_ch6.adb: Minor reformatting.
3545 2011-09-05 Johannes Kanig <kanig@adacore.com>
3547 * lib-xref-alfa.adb: Update comments.
3549 2011-09-05 Thomas Quinot <quinot@adacore.com>
3551 * sem_res.adb: Minor reformatting
3553 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3555 * exp_ch6.adb (Build_In_Place_Formal): If extra formals are not
3556 present, create them now. Needed in case the return type was
3557 a limited view in the function declaration.
3558 (Make_Build_In_Place_Call_In_Allocator): If return type contains
3559 tasks, build the activation chain for it. Pass a reference to
3560 the Master_Id in call to Add_Task_Actuals_To_Build_In_Place call.
3561 * exp_ch7.adb (Make_Set_Finalize_Address_Call): Clean up interface
3562 with build_in_place calls.
3563 * sem_ch9.adb (Analyze_Task_Type_Declaration): If partial view was
3564 incomplete, inatialize its Corresponding_Record_Type component.
3565 * sem_ch10.adb (Build_Chain): Initialize Private_Dependents field
3568 2011-09-05 Johannes Kanig <kanig@adacore.com>
3570 * lib-xref-alfa.adb (Is_Alfa_Reference): Filter constants from effect
3573 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3575 * par-ch6.adb (P_Subprogram): In Ada2012 mode, if the subprogram
3576 appears within a package specification and the token after "IS"
3577 is not a parenthesis, assume that this is an unparenthesized
3578 expression function, even if the token appears in a line by
3580 * par.adb: Clarify use of Labl field of scope stack in error
3583 2011-09-05 Bob Duff <duff@adacore.com>
3585 * sem_res.adb (Resolve_Intrinsic_Operator): Use unchecked
3586 conversions instead of normal type conversions in all cases where a
3587 type conversion would be illegal. In particular, use unchecked
3588 conversions when the operand types are private.
3590 2011-09-05 Johannes Kanig <kanig@adacore.com>
3592 * lib-xref-alfa.adb (Is_Alfa_Reference): Never declare effects on
3593 objects of task type or protected type.
3595 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3597 * sem_ch6.adb (Analyze_Expression_Function): If the expression
3598 function comes from source, indicate that so does its rewriting,
3599 so it is compatible with any subsequent expansion of the
3600 subprogram body (e.g. when it is a protected operation).
3601 * sem_ch4.adb: minor reformatting
3603 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
3605 * lib.adb (Check_Same_Extended_Unit): Comment rewriting. Use
3606 Get_Source_Unit rather than Get_Code_Unit as instantiation unfolding
3607 may lead to wrong ancestor package in the case of instantiated subunit
3608 bodies. If a subunit is instantiated, follow the chain of instantiations
3609 rather than the stub structure.
3611 2011-09-02 Robert Dewar <dewar@adacore.com>
3613 * sem_ch4.adb, sem_ch6.adb: Minor reformatting.
3614 * gcc-interface/Make-lang.in: Update dependencies.
3616 2011-09-02 Marc Sango <sango@adacore.com>
3618 * sem_ch3.adb (Analyze_Object_Declaration): Change
3619 comment and add additional check to differentiate constant of
3620 type string from others unconstrained type.
3622 2011-09-02 Ed Schonberg <schonberg@adacore.com>
3624 * sinfo.ads, sinfo.adb: New semantic attribute Premature_Use,
3625 present in incomplete type declarations to refine the error
3626 message the full declaration is in the same unit.
3627 * sem_ch4.adb (Analyze_Selected_Component): If the prefix is of
3628 an incomplete type, set the Premature_Use for additional message.
3629 * sem_ch3.adb (Find_Type_Name): If partial view is incomplete
3630 and Premature_Use is set, place additional information at the
3631 point of premature use.
3633 2011-09-02 Bob Duff <duff@adacore.com>
3635 * sem_ch6.adb: (Check_Post_State): Suppress warning
3636 "postcondition refers only to pre-state" when the expression has not
3637 yet been analyzed, because it causes false alarms. This can happen when
3638 the postcondition contains a quantified expression, because those are
3639 analyzed later. This is a temporary/partial fix.
3640 (Process_Post_Conditions): Minor: change wording of warning.
3642 2011-09-02 Marc Sango <sango@adacore.com>
3644 * sem_ch3.adb (Analyze_Object_Declaration): Detect the violation of
3645 illegal use of unconstrained string type in SPARK mode.
3646 * sem_res.adb (Analyze_Operator_Symbol): Set the
3647 right place where the string operand of concatenation should be
3648 violate in SPARK mode.
3650 2011-09-02 Robert Dewar <dewar@adacore.com>
3652 * sem_prag.adb, sem_util.adb, sem_ch6.adb, prj-nmsc.adb,
3653 exp_ch3.adb: Minor reformatting.
3655 2011-09-02 Vincent Celier <celier@adacore.com>
3657 * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Declare "gcc"
3658 as the compiler driver so Is_Compilable returns True for sources.
3659 * prj-nmsc.adb (Override_Kind): When Kind is Sep, set the source
3662 2011-09-02 Ed Schonberg <schonberg@adacore.com>
3664 * sem_prag.adb (Analyze_PPC_In_Decl_Part): for a class-wide
3665 condition, a reference to a controlling formal must be interpreted
3666 as having the class-wide type (or an access to such) so that the
3667 inherited condition can be properly applied to any overriding
3668 operation (see ARM12 6.6.1 (7)).
3670 2011-09-02 Tristan Gingold <gingold@adacore.com>
3672 * init.c (__gnat_is_vms_v7): Fix case and add prototype
3675 2011-09-02 Javier Miranda <miranda@adacore.com>
3677 * exp_ch3.adb (Expand_N_Object_Declaration): Do not copy the
3678 initializing expression of a class-wide interface object declaration
3679 if its type is limited.
3681 2011-09-02 Johannes Kanig <kanig@adacore.com>
3683 * sem_util.adb (Unique_Name): To obtain a unique name for enumeration
3684 literals, take into account the type name; the type is *not*
3685 the scope for an enumeration literal.
3687 2011-09-02 Ed Schonberg <schonberg@adacore.com>
3689 * sem_ch6.adb (Check_Overriding_Indicator): add special check
3690 to reject an overriding indicator on a user-defined Adjust
3691 subprogram for a limited controlled type.
3693 2011-09-02 Ed Schonberg <schonberg@adacore.com>
3695 * sem_res.adb (Resolve_Actuals): add missing call to Resolve
3696 for an actual that is a function call returning an unconstrained
3697 limited controlled type.
3699 2011-09-02 Tristan Gingold <gingold@adacore.com>
3701 * g-socthi-vms.adb (c_sendmsg, c_recvmsg): Use unpacked msg if on vms 7
3703 2011-09-02 Johannes Kanig <kanig@adacore.com>
3705 * alfa.ads (Name_Of_Heap_Variable): Change value of the HEAP variable
3706 from "HEAP" to __HEAP Change comment that refers to that variable
3707 * put_alfa.adb: Change comment that refers to that variable
3709 2011-09-02 Robert Dewar <dewar@adacore.com>
3711 * exp_ch4.adb, exp_ch6.adb, prj-nmsc.adb: Minor reformatting.
3713 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
3715 * exp_util.adb (Extract_Renamed_Object): Renamed to
3716 Find_Renamed_Object. This routine has been reimplemented and now uses
3717 tree traversal to locate a renamed object.
3718 (Is_Aliased): Replace call to Extract_Renamed_Object with
3719 Find_Renamed_Object.
3721 2011-09-02 Tristan Gingold <gingold@adacore.com>
3723 * init.c: (__gnat_is_vms_v7): New function.
3725 2011-09-02 Olivier Hainque <hainque@adacore.com>
3727 * tracebak.c (STOP_FRAME, ppc elf/vxworks case): Stop on frames
3728 that have a misaligned backchain, necessarily bogus.
3730 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
3732 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not create
3733 TSS routine Finalize_Address when compiling in Alfa mode.
3734 (Expand_Freeze_Record_Type): Do not create TSS routine
3735 Finalize_Address when compiling in Alfa mode.
3736 * exp_ch4.adb (Expand_Allocator_Expression): Do not produce a
3737 call to Set_Finalize_Address in Alfa mode because Finalize_Address is
3739 (Expand_N_Allocator): Do not produce a call to
3740 Set_Finalize_Address in Alfa mode because Finalize_Address is not built.
3741 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Do not
3742 produce a call to primitive Set_Finalize_Address in Alfa mode because
3743 Finalize_Address is not built.
3744 * exp_ch7.adb (Build_Finalization_Master): Do not create
3745 finalization masters in Afa mode since they are not needed.
3746 (Build_Finalizer): Do not create scope and library-level
3747 finalizers in Alfa mode since they are not needed.
3748 * exp_util.adb (Build_Allocate_Deallocate_Proc): Do not expand
3749 "new" and "free" when applied to controlled objects in Alfa mode since
3752 2011-09-02 Vincent Celier <celier@adacore.com>
3754 * prj-nmsc.db: (Check_Stand_Alone_Library): For SALs, allow
3755 only library names with the syntax of Ada identifiers, to avoid errors
3756 when compiling the binder generated files.
3757 * projects.texi: Document restriction on SAL library names
3759 2011-09-02 Thomas Quinot <quinot@adacore.com>
3761 * a-chtgbo.adb: Minor comment fix.
3763 2011-09-02 Robert Dewar <dewar@adacore.com>
3765 * lib-xref.adb: Minor reformatting
3767 2011-09-02 Vincent Celier <celier@adacore.com>
3769 * bindusg.adb, clean.adb, gnatchop.adb, gnatfind.adb, gnatlink.adb,
3770 gnatls.adb, gnatname.adb, gnatxref.adb, gprep.adb, makeusg.adb: Add
3771 --version and --help in usage.
3772 * switch.ads, switch.adb (Display_Usage_Version_And_Help): New procedure
3774 2011-09-02 Bob Duff <duff@adacore.com>
3776 * lib-xref.adb: (Hash): Avoid use of 'Mod attribute, because old
3777 compilers don't understand it.
3779 2011-09-02 Gary Dismukes <dismukes@adacore.com>
3781 * exp_attr.adb (Expand_N_Attribute_Reference): Pass the
3782 underlying subtype rather than its base type on the call to
3783 Build_Record_Or_Elementary_Input_Function, so that any
3784 constraints on a discriminated subtype will be available for
3785 doing the check required by AI05-0192.
3786 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
3787 If the prefix subtype of the 'Input attribute is a constrained
3788 discriminated subtype, then check each constrained discriminant value
3789 against the corresponding value read from the stream.
3791 2011-09-02 Yannick Moy <moy@adacore.com>
3793 * usage.adb, warnsw.adb, sem_ch6.adb, opt.ads: Disable by default
3794 warnings on suspicious contracts, and enable them with -gnatwa.
3796 2011-09-02 Robert Dewar <dewar@adacore.com>
3798 * exp_util.adb, exp_ch9.adb, sem_attr.adb, sem_ch6.adb: Minor
3801 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
3803 * exp_ch9.adb (Install_Private_Data_Declarations): Add guards
3804 which ensure that restriction No_Dynamic_Attachment has not been
3806 (Make_Initialize_Protection): Protected types with attach or
3807 interrupt handlers must not violate restriction No_Dynamic_Attachment.
3808 * exp_util.adb (Corresponding_Runtime_Package): Add a guard
3809 which ensures that restriction No_Dynamic_Attachment has not been
3811 * sem_attr.adb: (Eval_Attribute): Transform
3812 VAX_Float_Type'First and 'Last into references to
3813 the temporaries which store the corresponding bounds. The
3814 transformation is needed since the back end cannot evaluate
3815 'First and 'Last on VAX.
3816 (Is_VAX_Float): New routine.
3818 2011-09-02 Ed Schonberg <schonberg@adacore.com>
3820 * sem_ch12.adb (Analyze_Subprogram_Instantiation): If the
3821 generic unit is not intrinsic and has an explicit convention,
3822 the instance inherits it.
3824 2011-09-02 Robert Dewar <dewar@adacore.com>
3826 * prj-dect.adb, prj-env.adb, prj-nmsc.adb, prj-proc.adb, prj-tree.adb,
3827 prj.adb, prj.ads, sem_ch5.adb: Minor reformatting.
3829 2011-09-02 Thomas Quinot <quinot@adacore.com>
3831 * sem_attr.adb (Analyze_Attribute, case Unrestriced_Access):
3832 Guard against a prefix that is an N_Has_Entity but has no
3835 2011-09-02 Yannick Moy <moy@adacore.com>
3837 * lib-xref-alfa.adb (Is_Alfa_Reference): Ignore IN parameters in Alfa
3840 2011-09-02 Yannick Moy <moy@adacore.com>
3842 * opt.ads (Warn_On_Suspicious_Contract): New warning flag.
3843 * sem_ch3.adb (Analyze_Declarations): Call checker for suspicious
3845 * sem_ch6.adb, sem_ch6.ads (Check_Subprogram_Contract): New
3846 procedure looking for suspicious postconditions.
3847 * usage.adb (Usage): New options -gnatw.t and -gnatw.T.
3848 * warnsw.adb (Set_Dot_Warning_Switch): Take into account new
3849 options -gnatw.t and -gnatw.T.
3851 2011-09-02 Pascal Obry <obry@adacore.com>
3853 * prj.adb: Minor code refactoring. Move check for null project in
3855 * projects.texi: Fix minor typos.
3857 2011-09-02 Ed Schonberg <schonberg@adacore.com>
3859 * sem_ch5.adb (Analyze_Iterator_Specification): If the domain
3860 of iteration is an expression, its value must be captured in a
3861 renaming declaration, so that modification of the elements is
3862 propagated to the original container.
3864 2011-09-02 Pascal Obry <obry@adacore.com>
3866 * prj-proc.adb, prj.adb, makeutl.adb, makeutl.ads, prj-dect.adb,
3867 prj-nmsc.adb, prj-util.adb, prj-conf.adb, prj-env.adb,
3868 prj-tree.adb: Minor reformatting and style fixes.
3870 2011-09-02 Robert Dewar <dewar@adacore.com>
3872 * s-rident.ads: Add new restriction No_Implicit_Aliasing
3873 * sem_attr.adb: (Analyze_Access_Attribute): Deal with
3874 No_Implicit_Aliasing
3875 (Analyze_Attribute, case Address): ditto
3876 (Analyze_Attribute, case Unrestricted_Access): ditto
3877 * sem_util.ads, sem_util.adb: (Is_Aliased_View): Handle
3878 No_Implicit_Aliasing restriction.
3879 * gnat_rm.texi: Add documentation for No_Implicit_Aliasing
3881 2011-09-02 Ed Schonberg <schonberg@adacore.com>
3883 * exp_util.adb: (Possible_Bit_Aligned_Object): If the object
3884 is an unchecked conversion, apply test to its expression.
3886 2011-09-02 Javier Miranda <miranda@adacore.com>
3888 * sem_ch3.adb (Check_Abstract_Overriding): When
3889 traversing the chain of aliased subprograms avoid reporting a
3890 redundant error on the current entity.
3892 2011-09-02 Sergey Rybin <rybin@adacore.com>
3894 * gnat_ugn.texi: Minor clean up.
3896 2011-09-02 Bob Duff <duff@adacore.com>
3898 * s-htable.adb (Set_If_Not_Present): Use renaming
3899 instead of ":=", because the type Key is limited in the generic (even
3900 if not in the instances).
3902 2011-09-02 Robert Dewar <dewar@adacore.com>
3904 * exp_util.adb, sem_ch10.adb, sem_attr.adb, s-htable.adb,
3905 g-comlin.adb, g-comlin.ads, lib-xref-alfa.adb, lib-xref.adb: Minor
3908 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
3910 * sem_ch3.adb: (Set_Anonymous_Type): Associate the itype of an
3911 inherited component with the enclosing derived type. Code reformatting.
3913 2011-09-02 Gary Dismukes <dismukes@adacore.com>
3915 * checks.adb: (Determine_Range): Add test of OK1 to prevent the early
3916 return done when overflow checks are enabled, since comparisons against
3917 Lor and Hir should not be done when OK1 is False.
3919 2011-09-02 Gary Dismukes <dismukes@adacore.com>
3921 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
3922 Add new formal Master_Exp. When present, add that expression to the
3923 call as an extra actual.
3924 (Make_Build_In_Place_Call_In_Object_Declaration): Add variable
3925 Fmaster_Actual and in the case of a BIP call initializing a return
3926 object of an enclosing BIP function set it to a
3927 new reference to the implicit finalization master
3928 formal of the enclosing function. Fmaster_Actual is
3929 then passed to the new formal Master_Exp on the call to
3930 Add_Finalization_Master_Actual_To_Build_ In_Place_Call. Move
3931 initializations of Enclosing_Func to its declaration.
3933 2011-09-02 Thomas Quinot <quinot@adacore.com>
3935 * csets.ads: Minor reformatting
3937 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
3939 * exp_aggr.adb: (Get_Constraint_Association): Add code to retrieve
3940 the full view of a private type coming from an instantiation.
3941 * exp_ch4.adb: (Current_Anonymous_Master): Reimplement the search
3942 loop to iterate over the declarations rather than use the
3943 First_Entity / Next_Entity scheme.
3945 2011-09-02 Ed Schonberg <schonberg@adacore.com>
3947 * sem_attr.adb: (Analyze_Attribute, case 'Range): when expanding
3948 X'range (N) into X'First (N) .. X'Last (N), do not share the
3949 dimension indicator N, if present. Even though it is a static
3950 constant, its source location may be modified when printing
3951 expanded code under -gnatDL, and node sharing will lead to chaos
3952 in Sprint on large files, by generating a sloc value that does
3953 not correspond to any source file.
3955 2011-09-02 Bob Duff <duff@adacore.com>
3957 * einfo.adb: (Has_Xref_Entry): Do not call
3958 Implementation_Base_Type. Lib.Xref has been
3959 rewritten to avoid the need for it, and it was costly.
3960 * s-htable.ads,s-htable.adb: (Present,Set_If_Not_Present): New
3961 functions in support of efficient xref.
3962 * lib-xref-alfa.adb: Misc changes related to Key component of
3964 * lib-xref.adb: (Add_Entry,etc): Speed improvement.
3965 (New_Entry): Call Implementation_Base_Type, because Has_Xref_Entry
3966 no longer does. This is the one place where it is needed.
3968 2011-09-02 Johannes Kanig <kanig@adacore.com>
3970 * g-comlin.adb (Getopt): New optional argument Concatenate to have
3971 similar interface as the other Getopt function.
3973 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
3975 * exp_ch4.adb: (Expand_Allocator_Expression): Do not generate
3976 a call to Set_Finalize_Address if there is no allocator available.
3977 * exp_util.adb: (Build_Allocate_Deallocate_Proc): Account for
3978 a case of allocator expansion where the allocator is not expanded but
3979 needs a custom allocate routine. Code reformatting.
3980 (Is_Finalizable_Transient): Remove local variables Has_Rens and
3981 Ren_Obj. Code reformatting.
3982 (Is_Renamed): Renamed to Is_Aliased. Add code to detect aliasing
3983 through the use of 'reference.
3984 * sem_ch4.adb: (Analyze_Allocator): Detect allocators generated
3985 as part of build-in-place expansion. They are intentionally marked as
3986 coming from source, but their parents are not.
3988 2011-09-02 Ed Schonberg <schonberg@adacore.com>
3990 * sem_ch10.adb (Analyze_With_Clause): If the library unit
3991 is the generated subprogram declaration for a child unit body
3992 that acts as spec, use the original body in the with_clause,
3993 to prevent binding errors.
3995 2011-09-02 Vincent Celier <celier@adacore.com>
3997 * gnat_ugn.texi: Adapt documentation of -gnateInnn to new VMS
3998 qualifier /MULTI_UNIT_INDEX=
4000 2011-09-02 Johannes Kanig <kanig@adacore.com>
4002 * g-comlin.adb (Getopt): Return when switch is dealt with automatically,
4003 instead of calling the callback function
4005 2011-09-02 Robert Dewar <dewar@adacore.com>
4007 * prj-proc.adb, prj.ads, sem_util.adb, s-taprop-linux.adb,
4008 prj-nmsc.adb, prj-util.ads, prj-env.adb: Minor reformatting.
4010 2011-09-02 Vincent Celier <celier@adacore.com>
4012 * prj-nmsc.adb: (Find_Sources): When the list of sources is
4013 explicitly declared in an extending project, do not warn if a source
4014 for an inherited naming exception is not found.
4016 2011-09-02 Gary Dismukes <dismukes@adacore.com>
4018 * exp_ch6.adb: (Is_Build_In_Place_Function_Call): Return False if
4019 expansion is inactive.
4021 2011-09-02 Ed Schonberg <schonberg@adacore.com>
4023 * sem_util.adb (Note_Possible_Modification): If the entity
4024 being modified is the renaming generated for an Ada2012 iterator
4025 element, the enclosing container or array is modified as well.
4027 2011-09-02 Jose Ruiz <ruiz@adacore.com>
4029 * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB,
4030 Initialize): Define and initialize the
4031 mutex attributes and condition variable attributes locally.
4033 2011-09-02 Vincent Celier <celier@adacore.com>
4035 * prj-nmsc.adb (Check_File): Mark as Locally_Removed a naming
4036 exception replaced in an extending project.
4037 (Check_Object): No error when the other source is locally removed.
4039 2011-09-02 Yannick Moy <moy@adacore.com>
4041 * exp_ch6.adb (Is_Build_In_Place_Function_Call): in Alfa mode, allow
4044 2011-08-31 Arnaud Charlet <charlet@adacore.com>
4046 * gcc-interface/Makefile.in: Clean up handling of x86 and x86-64
4048 * gcc-interface/Make-lang.in: Update dependencies.
4050 2011-09-01 Robert Dewar <dewar@adacore.com>
4052 * sem_ch3.adb, s-taprop-linux.adb, gnatls.adb: Minor reformatting.
4054 2011-09-01 Jose Ruiz <ruiz@adacore.com>
4056 * adaint.h (__gnat_cpu_free): Fix the name of this profile.
4057 * adaint.c (__gnat_cpu_alloc, __gnat_cpu_alloc_size, __gnat_cpu_free,
4058 __gnat_cpu_zero, __gnat_cpu_set): Create version of these subprograms
4059 specific for systems where their glibc version does not define the
4060 routines to handle dynamically allocated CPU sets.
4062 2011-09-01 Vincent Celier <celier@adacore.com>
4064 * prj-proc.adb, prj.ads, prj-nmsc.adb, prj-util.adb, prj-util.ads,
4065 prj-env.adb: Implement inheritance of naming exceptions in extending
4068 2011-09-01 Romain Berrendonner <berrendo@adacore.com>
4070 * gnatls.adb: Display simple message instead of content of
4073 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
4075 * sem_ch3.adb: (Build_Derived_Record_Type) Remove the kludgy update of
4076 access discriminant and anonymous access component scopes.
4077 (Inherit_Component): Reuse the itype of an access discriminant
4078 or anonymous access component by copying it in order to set the proper
4079 scope. This is done only when the parent and the derived type
4080 are in different scopes.
4081 (Set_Anonymous_Etype): New routine.
4083 2011-09-01 Robert Dewar <dewar@adacore.com>
4085 * a-convec.adb: Minor reformatting throughout.
4087 2011-09-01 Jose Ruiz <ruiz@adacore.com>
4089 * adaint.c, adaint.h (__gnat_cpu_alloc, __gnat_cpu_alloc_size,
4090 __gnat_cpu_set_free): Create these wrappers around the CPU_ALLOC,
4091 CPU_ALLOC_SIZE and CPU_FREE linux macros.
4092 (__gnat_cpu_zero, __gnat_cpu_set): Use the CPU_ZERO_S and
4093 CPU_SET_S respectively because we are now using dynamically allocated
4094 CPU sets which are more portable across different glibc versions.
4095 * s-osinte-linux.ads (cpu_set_t_ptr, CPU_ALLOC, CPU_ALLOC_SIZE,
4096 CPU_FREE): Add this type and subprograms to be able to create cpu_set_t
4097 masks dynamically according to the number of processors in the target
4099 (CPU_ZERO, CPU_SET): They are now mapped to the CPU_ZERO_S and CPU_SET_S
4100 respectively, so we need to pass the size of the masks as
4102 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use dynamically
4103 created cpu_set_t masks
4104 with the number of processors available in the target platform,
4105 instead of static bit arrays. It enhances portability because
4106 it uses the information from the target platform.
4107 * sem_ch8.adb: (Attribute_Renaming): When checking whether we
4108 are using a restricted run-time library, use the flag
4109 Configurable_Run_Time_Mode instead of Restricted_Profile.
4111 2011-09-01 Vincent Celier <celier@adacore.com>
4113 * ug_words: Add /MULTI_UNIT_INDEX= -> -gnateI
4114 * vms_data.ads: Add new VMS qualifier equivalent for -gnateInnn
4116 2011-09-01 Nicolas Roche <roche@adacore.com>
4118 * adaint.c (__gnat_tmp_name): Don't use tmpnam function from the system
4119 on VxWorks in kernel mode.
4121 2011-09-01 Jose Ruiz <ruiz@adacore.com>
4123 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use the linux
4124 macros for handling CPU sets (CPU_ZERO, CPU_SET) instead of modifying
4125 directly the bit array.
4126 * s-osinte-linux.ads (CPU_ZERO, CPU_SET): Import these wrappers around
4127 the linux macros with the same name.
4128 * adaint.h, adaint.c (__gnat_cpu_zero, __gnat_cpu_set): Create these
4129 wrappers around the CPU_ZERO and CPU_SET linux macros.
4131 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
4133 * exp_ch7.adb (Find_Insertion_List): Removed.
4134 (Process_Transient_Objects): Insert the declarations of the hook
4135 access type and the hook object before the associated transient object.
4137 2011-09-01 Jose Ruiz <ruiz@adacore.com>
4139 * sem_ch8.adb (Attribute_Renaming): Add missing check to avoid loading
4140 package System.Aux_Dec when using restricted run-time libraries which
4141 do not have this package.
4143 2011-09-01 Tristan Gingold <gingold@adacore.com>
4145 * s-vaflop-vms-alpha.adb: Remove pragma optimize, useless.
4147 2011-09-01 Bob Duff <duff@adacore.com>
4149 * sem_attr.adb (Analyze_Access_Attribute): Do not call
4150 Kill_Current_Values for P'Unrestricted_Access, where P is library level
4152 2011-09-01 Thomas Quinot <quinot@adacore.com>
4154 * exp_ch5.adb: Minor reformatting
4155 * gnat_ugn.texi: Fix minor typos.
4156 * gcc-interface/Make-lang.in: Update dependencies.
4158 2011-09-01 Robert Dewar <dewar@adacore.com>
4160 * inline.adb, sem_aggr.adb: Minor reformatting.
4162 2011-09-01 Ed Schonberg <schonberg@adacore.com>
4164 * a-convec.adb: Proper handling of cursors for Ada2012 iterators.
4166 2011-09-01 Robert Dewar <dewar@adacore.com>
4168 * prj-proc.adb, exp_ch6.adb, prj-env.adb: Minor reformatting.
4170 2011-09-01 Bob Duff <duff@adacore.com>
4172 * sem_aggr.adb (Resolve_Aggregate): Need to treat "in instance
4173 body" the same as "in inlined body", because visibility shouldn't
4176 2011-09-01 Eric Botcazou <ebotcazou@adacore.com>
4178 * inline.adb (Add_Inlined_Body): Refine previous change.
4180 2011-09-01 Gary Dismukes <dismukes@adacore.com>
4182 * exp_ch6.ads (Needs_BIP_Alloc_Form): New utility function.
4183 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
4184 Test for case where call
4185 initializes an object of a return statement before testing for
4186 a constrained call, to ensure that all such cases get handled
4187 by simply passing on the caller's parameters. Also, in that
4188 case call Needs_BIP_Alloc_Form to determine whether to pass on
4189 the BIP_Alloc_Form parameter of the enclosing function rather
4190 than testing Is_Constrained. Add similar tests for the return
4191 of a BIP call to later processing to ensure consistent handling.
4192 (Needs_BIP_Alloc_Form): New utility function.
4193 * sem_ch6.adb: (Create_Extra_Formals): Replace test for adding
4194 a BIP_Alloc_Form formal with call to new utility function
4195 Needs_BIP_Alloc_Form.
4197 2011-09-01 Pascal Obry <obry@adacore.com>
4199 * prj-part.adb: Minor reformatting.
4201 2011-09-01 Vincent Celier <celier@adacore.com>
4203 * prj-env.adb (Create_Mapping_File.Process): Encode the upper
4204 half character in the unit name.
4206 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
4208 * exp_ch4.adb: Minor code and comment reformatting.
4210 2011-09-01 Thomas Quinot <quinot@adacore.com>
4212 * exp_ch6.adb (Expand_Inlined_Call): Remove redundant tests
4213 for Is_Limited_Type and Is_Tagged_Type in condition checking
4214 for by-reference type.
4215 * inline.adb (Add_Inlined_Body): Only exclude init_procs. Other
4216 subprograms may have a completion because of a previous
4217 Inline_Always clause, but the enclosing package must be marked
4218 inlined for the subprogram body to become visible to the backend.
4220 2011-09-01 Thomas Quinot <quinot@adacore.com>
4222 * sem_aux.adb, exp_ch4.adb: Minor reformatting
4224 2011-09-01 Pascal Obry <obry@adacore.com>
4226 * prj-proc.adb, prj.ads, sinput-p.adb: Minor reformatting.
4228 2011-09-01 Ed Schonberg <schonberg@adacore.com>
4230 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Generate references to
4231 the formals of a subprogram stub that acts as a spec.
4233 2011-09-01 Ed Schonberg <schonberg@adacore.com>
4235 * exp_ch6.adb (Expand_Inlined_Call): If an actual is a by_reference
4236 type, declare a renaming for it, not an object declaration.
4238 2011-09-01 Yannick Moy <moy@adacore.com>
4240 * ali-util.adb, ali-util.ads (Read_Withed_ALIs): Add parameter
4241 Ignore_Errors to ignore failures to read ALI files when True.
4243 2011-09-01 Javier Miranda <miranda@adacore.com>
4245 * exp_ch3.adb (Expand_N_Object_Declaration): Handle non-default
4246 constructor calls associated with non-tagged record types.
4248 2011-09-01 Robert Dewar <dewar@adacore.com>
4250 * g-socthi-vms.adb: Minor reformatting.
4252 2011-09-01 Nicolas Roche <roche@adacore.com>
4254 * sysdep.c: Don't use macro functions for stdio functions on VxWorks
4255 in order to avoid impact of imcompatible changes.
4256 * cstreams.c: Likewise
4258 * aux-io.c: Likewise
4260 2011-09-01 Yannick Moy <moy@adacore.com>
4262 * lib-writ.adb (Write_With_Lines): Always output complete information
4263 on "with" line in Alfa mode, as this is required by formal verification
4266 2011-09-01 Tristan Gingold <gingold@adacore.com>
4268 * g-socthi-vms.adb: Add comments.
4270 2011-09-01 Pascal Obry <obry@adacore.com>
4272 * prj.ads: Minor reformatting.
4274 2011-09-01 Vincent Celier <celier@adacore.com>
4276 * prj-env.adb (Create_Config_Pragmas_File.Check): Put all naming
4277 exceptions in the config pragmas file.
4279 2011-09-01 Tristan Gingold <gingold@adacore.com>
4281 * gnat_ugn.texi: Document GNAT_STACK_SIZE on IVMS.
4283 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
4285 * exp_ch7.adb (Find_Insertion_List): New routine.
4286 (Process_Transient_Objects): Add code to handle the abnormal
4287 finalization of a controlled transient associated with a subprogram
4288 call. Since transients are cleaned up right after the associated
4289 context, an exception raised during a subprogram call may bypass the
4292 2011-09-01 Robert Dewar <dewar@adacore.com>
4294 * exp_ch6.adb (Expand_Call): Check actual for aliased parameter is
4297 2011-09-01 Robert Dewar <dewar@adacore.com>
4299 * exp_ch4.adb, a-exexda.adb: Minor reformatting.
4301 2011-09-01 Robert Dewar <dewar@adacore.com>
4303 * s-taskin.ads, s-tassta.adb, sem_ch13.adb: Minor reformatting.
4305 2011-09-01 Thomas Quinot <quinot@adacore.com>
4307 * Makefile.rtl: Move s-oscons.o from GNATRTL_TASKING_OBJS to
4308 GNATRTL_NONTASKING_OBJS.
4310 2011-09-01 Robert Dewar <dewar@adacore.com>
4312 * einfo.ads (Is_Aliased): Fix existing documentation and add note on
4313 possibility of this flag being set for formals in Ada 2012 mode.
4314 * par-ch6.adb (P_Formal_Part): Handle aliased for parameters for Ada
4316 * sem_ch6.adb (Process_Formals): Handle aliased parameters in Ada 2012
4318 * sinfo.adb (Aliased_Present): Allowed in N_Parameter_Specification for
4320 * sinfo.ads (Aliased_Present): Allowed in N_Parameter_Specification for
4323 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
4325 * exp_ch4.adb (Find_Insertion_Node): New routine. Determines the proper
4326 insertion node in a tree of nested Expression_With_Actions nodes.
4327 (Process_Transient_Object): In the case where a complex if statement
4328 has been converted into nested Expression_With_Actions nodes, the
4329 "hook" object and the associated access type must be inserted before
4330 the top most Expression_With_Actions.
4332 2011-09-01 Robert Dewar <dewar@adacore.com>
4334 * a-cbprqu.adb, a-cbprqu.ads, a-cuprqu.adb, a-cuprqu.ads,
4335 a-cbsyqu.adb, a-cbsyqu.ads: Minor reformatting.
4337 2011-09-01 Ed Schonberg <schonberg@adacore.com>
4339 * sem_attr.adb: Conditionalize aliasing predicates to Ada2012.
4341 2011-09-01 Jose Ruiz <ruiz@adacore.com>
4343 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the CPU
4345 * aspects.adb (Canonical_Aspect): Add entry for the CPU aspect.
4346 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the CPU aspect
4347 in a similar way as we do for the Priority or Dispatching_Domain aspect.
4348 * s-mudido-affinity.adb (Dispatching_Domain_Tasks,
4349 Dispatching_Domains_Frozen): Move this local data to package
4350 System.Tasking because with the CPU aspect we need to have access
4351 to this data when creating the task in System.Tasking.Stages.Create_Task
4352 * s-taskin.ads (Dispatching_Domain_Tasks, Dispatching_Domains_Frozen):
4353 Move these variables from the body of
4354 System.Multiprocessors.Dispatching_Domains because with the CPU aspect
4355 we need to have access to this data when creating the task in
4356 System.Tasking.Stages.Create_Task.
4357 * s-taskin.adb (Initialize): Signal the allocation of the environment
4358 task to a CPU, if any, so that we know whether the CPU can be
4359 transferred to a different dispatching domain.
4360 * s-tassta.adb (Create_Task): Check whether the CPU to which this task
4361 is being allocated belongs to the dispatching domain where the task
4362 lives. Signal the allocation of the task to a CPU, if any, so that we
4363 know whether the CPU can be transferred to a different dispatching
4366 2011-09-01 Ed Schonberg <schonberg@adacore.com>
4368 * exp_attr.adb, sem_attr.adb, snames.ads-tmpl: Implementation of
4369 attributes Same_Storage and Overlaps_Storage.
4371 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
4373 * exp_strm.adb: Remove with and use clause for Opt.
4374 (Build_Array_Input_Function): Remove the version-dependent generation
4375 of the return statement. The Ada 2005 tree is now the default.
4377 2011-09-01 Yannick Moy <moy@adacore.com>
4379 * put_alfa.adb: Unconditionnally write files in Alfa section, so that
4380 it is never empty when compiling in Alfa mode.
4382 2011-09-01 Robert Dewar <dewar@adacore.com>
4384 * sem_aggr.adb, sem_ch3.adb, a-direct.adb, s-taprop-vxworks.adb,
4385 comperr.adb, exp_ch9.adb, exp_pakd.adb, sem_ch12.adb, freeze.adb,
4386 s-taprop-mingw.adb, s-taprop-linux.adb, s-taprop-solaris.adb,
4387 gnat1drv.adb, a-rbtgbo.adb, exp_dist.adb: Minor reformatting
4389 2011-09-01 Matthew Heaney <heaney@adacore.com>
4391 * Makefile.rtl, impunit.adb: Add a-csquin.ads, a-cusyqu.ad[sb],
4392 a-cuprqu.ad[sb], a-cbsyqu.ad[sb], a-cbprqu.ad[sb]
4393 * a-csquin.ads: New Ada 2012 unit that specifies the queue interface
4394 * a-cusyqu.ads, a-cusyqu.adb: New Ada 2012 unit that specifies the
4395 unbounded queue container.
4396 * a-cbsyqu.ads, a-cbsyqu.adb: New Ada 2012 unit that specifies the
4397 bounded queue container.
4398 * a-cuprqu.ads, a-cuprqu.adb: New Ada 2012 unit that specifies the
4399 unbounded priority queue container.
4400 * a-cbprqu.ads, a-cbprqu.adb: New Ada 2012 unit that specifies the
4401 bounded priority queue container.
4403 2011-08-31 Pascal Obry <obry@adacore.com>
4405 * a-direct.adb: Do not try to create an UNC path on Windows.
4406 (Create_Path): Skip leading computer name in UNC path if any.
4408 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
4410 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): Remove the
4411 version-dependent generation of the return statement. The Ada 2005 tree
4414 2011-08-31 Thomas Quinot <quinot@adacore.com>
4416 * rtsfind.ads, exp_dist.adb (Find_Numeric_Representation): Predefined
4417 types Stream_Element_Offset and Storage_Offset have a different native
4418 type depending on whether the platform is 32 or 64 bits. When
4419 exchanging them, always convert to 64 bits.
4421 2011-08-31 Yannick Moy <moy@adacore.com>
4423 * debug.adb: Reserve debug option -gnatd.E for passing gnatprove option
4424 --force-alfa to gnat2why.
4426 2011-08-31 Ed Schonberg <schonberg@adacore.com>
4428 * sem_ch12.adb (Save_References): If the node has aspects, save
4429 references within the corresponding expressions in a separate step,
4430 because the aspects are not directly in the tree for the declaration
4431 to which they belong.
4433 2011-08-31 Arnaud Charlet <charlet@adacore.com>
4435 * freeze.adb (Freeze_Record_Type): Omit test on variable size component
4436 in CodePeer mode, since representation clauses are partially ignored.
4437 * gcc-interface/Make-lang.in: Update dependencies.
4439 2011-08-31 Jose Ruiz <ruiz@adacore.com>
4441 * s-taprop-vxworks.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
4442 s-taprop-solaris.adb (Create_Task): Not_A_Specific_CPU can be assigned
4443 to any dispatching domain.
4445 2011-08-31 Thomas Quinot <quinot@adacore.com>
4447 * exp_ch4.adb: Minor reformatting.
4449 2011-08-31 Bob Duff <duff@adacore.com>
4451 * sem_ch6.adb (Get_Generic_Parent_Type): Don't query Subtype_Indication
4452 on nodes for which it is not defined.
4453 (Is_Non_Overriding_Operation): Exit the loop when we find a generic
4456 2011-08-31 Bob Duff <duff@adacore.com>
4458 * sem_ch3.adb (Process_Full_View): Disable legality check if
4459 In_Instance, to avoid spurious errors.
4460 * sem_ch12.adb (Validate_Derived_Type_Instance): Disable legality check
4461 if In_Instance, to avoid spurious errors.
4463 2011-08-31 Pascal Obry <obry@adacore.com>
4465 * a-direct.adb: Use Dir_Seps everywhere to properly handle all
4466 directory speparators.
4467 (Compose): Use Dir_Seps to handle both forms.
4468 (Create_Path): Use Dir_Seps instead of explicit check, no semantic
4470 (Extension): Use Dir_Seps to handle both forms.
4472 2011-08-31 Pascal Obry <obry@adacore.com>
4474 * prj-conf.adb: Minor reformatting.
4476 2011-08-31 Jose Ruiz <ruiz@adacore.com>
4478 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the
4479 dispatching domain aspect.
4480 * aspects.adb (Canonical_Aspect): Add entry for the dispatching domain
4482 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the
4483 Dispatching_Domain aspect in a similar way as we do for the Priority
4485 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Add the
4486 Dispatching_Domain component if a Dispatching_Domain pragma or aspect
4488 (Make_Task_Create_Call): Add the Dispatching_Domain when creating a task
4489 * par-prag.adb (Prag): Add Pragma_Dispatching_Domain as a known pragma.
4490 * sem_prag.adb (Analyze_Pragma): Check the correctness of a pragma
4491 Dispatching_Domain and add it to the task definition.
4492 (Sig_Flags): Add Pragma_Dispatching_Domain.
4493 * rtsfind.ads, rtsfind.adb (RTU_Id, RE_Id, Get_Unit_Name): Add the
4494 support to find the types Dispatching_Domain and
4495 Dispatching_Domain_Access.
4496 * sinfo.ads, sinfo.adb (Has_Pragma_Dispatching_Domain,
4497 Set_Has_Pragma_Dispatching_Domain): Add these subprograms to set and
4498 query the availability of a pragma Dispatching_Domain.
4499 * snames.ads-tmpl (Name_uDispatching_Domain): Add this name required by
4500 the expander to pass the Dispatching_Domain when creating a task.
4501 (Name_Dispatching_Domain): Add this new name for a pragma.
4502 (Pragma_Id): Add the new Pragma_Dispatching_Domain.
4503 * s-tassta.ads, s-tassta.adb (Create_Task): Set the domain to which the
4504 task has been allocated at creation time.
4505 * s-tarest.adb (Create_Restricted_Task): The dispatching domain using
4506 Ravenscar is always null.
4507 * s-taskin.ads, s-taskin.adb (Initialize_ATCB): Set the domain to which
4508 the task has been allocated at creation time.
4509 * s-tporft.adb (Register_Foreign_Thread): A foreign task will not have
4510 a specific dispatching domain.
4511 * s-taprop-linux.adb, s-taprop-solaris.adb, s-taprop-vxworks.adb,
4512 s-taprop-mingw.adb (Create_Task): Check whether both Dispatching_Domain
4513 and CPU are specified for the task, and the CPU value is not contained
4514 within the range of processors for the domain.
4516 2011-08-31 Vincent Celier <celier@adacore.com>
4518 * make.adb (Original_Gcc) : New constant String_Access.
4519 (Gnatmake): For VM targets, do not use VM version of the compiler if
4520 --GCC= has been specified.
4522 2011-08-31 Thomas Quinot <quinot@adacore.com>
4524 * sem_ch5.adb: Minor reformatting.
4526 2011-08-31 Ed Schonberg <schonberg@adacore.com>
4528 * exp_pakd.adb (Convert_To_PAT_Type): If prefix is a function call, do
4531 2011-08-31 Bob Duff <duff@adacore.com>
4533 * exp_ch4.adb (Expand_N_Selected_Component): Use the full type, in case
4534 the access type is private; we don't care about privacy in expansion.
4536 2011-08-31 Ed Schonberg <schonberg@adacore.com>
4538 * sem_aggr.adb (Resolve_Aggregate): In an instance, ignore aggregate
4539 subcomponents tnat may be limited, because they originate in view
4540 conflicts. If the original aggregate is legal and the actuals are
4541 legal, the aggregate itself is legal.
4543 2011-08-31 Matthew Heaney <heaney@adacore.com>
4545 * a-rbtgbo.adb (Clear_Tree): Assert representation invariant for lock
4548 2011-08-31 Ed Schonberg <schonberg@adacore.com>
4550 * sem_ch5.adb: Set kind of loop parameter properly, to preserve all
4553 2011-08-31 Jose Ruiz <ruiz@adacore.com>
4555 * sem_ch13.adb (Analyze_Aspect_Specifications): For the Priority and
4556 Interrupt_Priority aspects, force the analysis of the aspect expression
4557 (when building the equivalent pragma). Otherwise, its analysis is done
4558 too late, after the task or protected object has been created.
4559 * sem_ch9.adb (Analyze_Single_Protected_Declaration,
4560 Analyze_Single_Task_Declaration): Remove the code to move the aspects
4561 to the object declaration because they are needed in the type
4564 2011-08-31 Robert Dewar <dewar@adacore.com>
4566 * exp_ch5.adb, exp_ch7.ads, sem_ch5.adb, put_scos.adb, s-rannum.adb,
4567 a-rbtgbo.adb, exp_intr.adb, a-cbdlli.adb, a-cbdlli.ads: Minor
4570 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
4572 * exp_util.adb (Find_Protection_Type): Do not look for fields _object
4573 if the corresponding type is malformed due to restriction violations.
4575 2011-08-31 Robert Dewar <dewar@adacore.com>
4577 * s-ransee.ads, s-ransee.adb: Minor reformatting.
4579 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
4581 * exp_ch4.adb (Expand_N_Allocator): Correct faulty condition which
4582 would cause the generation of Set_Finalize_Address if the target is a
4583 VM and the designated type is not derived from [Limited_]Controlled.
4585 2011-08-31 Arnaud Charlet <charlet@adacore.com>
4587 * comperr.adb, comperr.ads, gnat1drv.adb (Delete_SCIL_Files): New
4589 (Compiler_Abort, Gnat1drv): Call Delete_SCIL_Files in codepeer mode in
4590 case of a compilation error.
4592 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
4594 * init.c (__gnat_error_handler): Standardize the stack overflow or
4595 erroneous memory access message.
4596 * seh_init.c (__gnat_SEH_error_handler): Standardize the stack overflow
4597 or erroneous memory access message.
4599 2011-08-31 Robert Dewar <dewar@adacore.com>
4601 * sem_ch4.adb: Minor reformatting.
4602 * sem_ch6.adb: Minor code reorganization (use Ekind_In).
4604 2011-08-31 Thomas Quinot <quinot@adacore.com>
4606 * scos.ads: Minor documentation clarification.
4607 * put_scos.adb: Do not generate SCO unit header line for a unit that
4610 2011-08-31 Robert Dewar <dewar@adacore.com>
4612 * a-rbtgbo.adb, alfa_test.adb: Minor reformatting.
4614 2011-08-31 Tristan Gingold <gingold@adacore.com>
4616 * exp_ch7.ads, exp_ch7.adb (Finalization_Exception_Data): New type to
4617 hold variables between these following subprograms.
4618 (Build_Exception_Handler, Build_Object_Declarations,
4619 Build_Raise_Statement): Use the above type as parameter.
4620 Make the above adjustments.
4621 * exp_intr.adb (Expand_Unc_Deallocation): Adjust.
4623 2011-08-31 Pascal Obry <obry@adacore.com>
4625 * projects.texi: Minor reformatting.
4627 2011-08-31 Tristan Gingold <gingold@adacore.com>
4629 * s-ransee.ads, s-ransee.adb: Add system.random_seed unit.
4630 * s-rannum.adb (Reset): Use Get_Seed from s-ransee.
4632 2011-08-31 Ed Schonberg <schonberg@adacore.com>
4634 * exp_ch5.adb: Minor code cleanup.
4635 * sem_ch5.adb (Analyze_Iteration_Scheme): Set ekind of loop variable to
4636 prevent cascaded errors.
4637 (Analyze_Loop_Statement): In semantics-only mode, introduce loop
4638 variable of an iterator specification in current scope.
4639 * sem_ch6.adb (Analyze_Return_Statement, Find_what_It_Apples_To): Skip
4640 postconditions on the stack, as they contain no return statements.
4642 2011-08-31 Yannick Moy <moy@adacore.com>
4644 * exp_alfa.adb (Expand_Alfa_N_Package_Declaration,
4645 Expand_Alfa_N_Subprogram_Body): Remove useless procedures which simply
4646 call Qualify_Entity_Names.
4647 (Expand_Alfa): call Qualify_Entity_Names in more cases
4648 * lib-xref-alfa.adb: Take into account system package.
4649 * sem_prag.adb Take into account restrictions in Alfa mode, contrary to
4650 CodePeer mode in which we are interested in finding bugs even if
4651 compiler cannot compile source.
4652 * sem_util.adb, sem_util.ads (Unique_Entity): Take into account case of
4655 2011-08-31 Gary Dismukes <dismukes@adacore.com>
4657 * sem_ch3.adb (Constrain_Concurrent): Retrieve Base_Type of the subtype
4658 denoted by the subtype mark to ensure getting the concurrent type in
4659 the case where the subtype mark denotes a private subtype of a
4660 concurrent type (needed when using -gnatc).
4661 (Process_Subtype): For the processing specific to type kinds, case on
4662 the Base_Type kind of the Subtype_Mark_Id, to handle cases where the
4663 subtype denotes a private subtype whose base type is nonprivate (needed
4664 for subtypes of private fulfilled by task types when compiling with
4667 2011-08-31 Gary Dismukes <dismukes@adacore.com>
4669 * sem_disp.adb (Check_Dispatching_Operation): Bypass registration of
4670 late primitives that override interface operations when the full
4671 expander is not active, to avoid blowups in Register_Primitive when
4672 types don't have associated secondary dispatch tables.
4674 2011-08-31 Yannick Moy <moy@adacore.com>
4676 * alfa_test.adb: Code clean up.
4678 2011-08-31 Marc Sango <sango@adacore.com>
4680 * restrict.adb (Check_SPARK_Restriction): Change Comes_From_Source (N)
4681 by Comes_From_Source (Original_Node (N)) in order to treat also the
4682 nodes which have been rewritten.
4683 * sem_ch4.adb (Analyze_Explicit_Dereference, Analyze_Slice): Guard the
4684 explicit dereference and slice violation in spark mode on the nodes
4685 coming only from the source code.
4687 2011-08-31 Robert Dewar <dewar@adacore.com>
4689 * exp_ch5.adb, exp_alfa.ads, prj.ads, sem_attr.adb,
4690 lib-xref-alfa.adb: Minor reformatting.
4692 2011-08-31 Matthew Heaney <heaney@adacore.com>
4694 * a-crbltr.ads (Tree_Type): Default-initialize the Nodes component.
4696 2011-08-31 Javier Miranda <miranda@adacore.com>
4698 * sem_ch4.adb (Try_Object_Operation): Addition of one formal to search
4699 only for class-wide subprograms conflicting with entities of concurrent
4702 2011-08-31 Matthew Heaney <heaney@adacore.com>
4704 * a-rbtgbo.adb (Generic_Allocate): Initialize pointer components of
4707 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
4709 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): Provide a more
4710 general description of the routine.
4712 2011-08-31 Ed Schonberg <schonberg@adacore.com>
4714 * a-cbdlli.adb, a-cbdlli.ads: Add iterator machinery to bounded
4715 doubly-linked lists.
4717 2011-08-31 Gary Dismukes <dismukes@adacore.com>
4719 * exp_ch5.adb (Expand_N_Assignment_Statement): When a discriminant
4720 check is needed for a left-hand side that is a dereference, and the
4721 base type is private without discriminants (whereas the full type does
4722 have discriminants), an extra retrieval of the underlying type may be
4723 needed in the case where the subtype is a record subtype whose base
4724 type is private. Update comments.
4726 2011-08-31 Javier Miranda <miranda@adacore.com>
4728 * sem_ch4.adb (Try_Object_Operation): When a dispatching primitive is
4729 found check if there is a class-wide subprogram covering the primitive.
4731 2011-08-31 Yannick Moy <moy@adacore.com>
4733 * sem_res.adb: Further cases where full expansion test is needed,
4734 rather than expansion test.
4736 2011-08-31 Pascal Obry <obry@adacore.com>
4738 * prj-attr.adb: Fix Source_File_Switches attribute kind (must be a list)
4740 2011-08-31 Ed Schonberg <schonberg@adacore.com>
4742 * exp_ch5.adb: Handle iterators over derived container types.
4744 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
4746 * einfo.ads, einfo.adb: Add new flag Has_Anonymous_Master.
4747 (Has_Anonymous_Master): New routine.
4748 (Set_Has_Anonymous_Master): New routine.
4749 (Write_Entity_Flags): Add an entry for Has_Anonymous_Master.
4750 * exp_ch4.adb: Add with and use clause for Sem_Ch8.
4751 (Current_Anonymous_Master): New routine.
4752 (Current_Unit_First_Declaration): Removed.
4753 (Current_Unit_Scope): Removed.
4754 (Expand_N_Allocator): Anonymous access-to-controlled types now chain
4755 their objects on a per-unit heterogeneous finalization master.
4757 2011-08-31 Matthew Heaney <heaney@adacore.com>
4759 * a-cbhama.adb, a-cbhase.adb (Insert): Check for zero-length buckets
4762 2011-08-31 Jose Ruiz <ruiz@adacore.com>
4764 * s-taprop-linux.adb (Create_Task): Avoid changing the affinity mask
4767 2011-08-31 Gary Dismukes <dismukes@adacore.com>
4769 * sem_disp.adb (Propagate_Tag): Return without propagating in the case
4770 where the actual is an unexpanded call to 'Input.
4772 2011-08-31 Yannick Moy <moy@adacore.com>
4774 * sem_ch4.adb: Code clean up.
4776 2011-08-31 Yannick Moy <moy@adacore.com>
4778 * exp_alfa.adb, exp_alfa.ads: Minor correction of copyright notice.
4780 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
4782 * exp_ch7.adb (Build_Array_Deep_Procs): Do not generate Deep_Finalize
4783 and TSS primitive Finalize_Address if finalization is suppressed.
4784 (Build_Record_Deep_Procs): Do not generate Deep_Finalize and TSS
4785 primitive Finalize_Address if finalization is suppressed.
4787 2011-08-31 Jose Ruiz <ruiz@adacore.com>
4789 * s-mudido-affinity.adb, s-taprop-linux.adb, s-taprop-mingw.adb,
4790 s-taprop-solaris.adb, s-taprop-vxworks.adb (Set_Task_Affinity): Make
4791 sure that the underlying task has already been created before trying
4792 to change its affinity.
4793 (Set_CPU): Use the term processor instead of CPU, as we do in
4796 2011-08-31 Vincent Celier <celier@adacore.com>
4798 * prj-attr.adb: New Compiler attribute Source_File_Switches.
4799 * prj-nmsc.adb (Process_Compiler): Process attribute
4800 Source_File_Switches.
4801 * prj.ads (Language_Config): New name list component
4802 Name_Source_File_Switches.
4803 * snames.ads-tmpl (Name_Source_File_Switches): New standard name.
4805 2011-08-31 Ed Schonberg <schonberg@adacore.com>
4807 * sem_attr.adb (Analyze_Attribute, case 'Old): If prefix may be a
4808 discriminated component of an actual, expand at once to prevent
4809 ouf-of-order references with generated subtypes.
4811 2011-08-31 Yannick Moy <moy@adacore.com>
4813 * lib-xref-alfa.adb (Add_Alfa_Xrefs): Do not take into account read
4814 reference to operator in Alfa xrefs.
4816 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
4818 * sem_ch12.adb (Freeze_Subprogram_Body): Add code to handle the case
4819 where the parent instance was frozen before the current instance due to
4820 the presence of a source body. Update calls to Insert_After_Last_Decl.
4821 (Insert_After_Last_Decl): Renamed to Insert_Freeze_Node_For_Instance.
4822 Update the comment which illustrates the purpose of the routine.
4823 Package instances are now frozen by source bodies which appear after
4824 the instance. This ensures that entities coming from within the
4825 instance are available for use in the said bodies.
4826 (Install_Body): Add code to handle the case where the parent instance
4827 was frozen before the current instance due to the presence of a source
4828 body. Update calls to Insert_After_Last_Decl.
4830 2011-08-31 Jose Ruiz <ruiz@adacore.com>
4832 * s-taprop-linux.adb (Set_Task_Affinity): Avoid the use of anonymous
4834 * affinity.c (__gnat_set_affinity_mask): Declare index variable.
4836 2011-08-31 Yannick Moy <moy@adacore.com>
4838 * sem_ch8.adb (Analyze_Subprogram_Renaming): Refine expander test in
4840 * alfa.adb, alfa.ads, alfa_test.adb, ali.adb, debug.adb, errout.adb,
4841 errout.ads, erroutc.adb, expander.adb, exp_ch4.adb, exp_ch7.adb,
4842 freeze.adb, get_alfa.adb, get_alfa.ads, gnat1drv.adb, lib-writ.adb,
4843 lib-writ.ads, lib-xref.adb, lib-xref.ads, lib-xref-alfa.adb, opt.adb,
4844 opt.ads, put_alfa.adb, put_alfa.ads, restrict.adb, sem_ch12.adb,
4845 sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
4846 sem_prag.adb, sem_res.adb, sem_util.adb: Minor reformatting, renaming
4847 ALFA in Alfa (we dropped acronym).
4848 * einfo.adb (Primitive_Operations): Correctly return list of primitive
4849 operations in a case where it returned previously No_Elist.
4851 2011-08-31 Robert Dewar <dewar@adacore.com>
4853 * s-taprop-vxworks.adb, sem_ch5.adb, s-taprop-tru64.adb, exp_alfa.adb,
4854 s-taprop-vms.adb, bindgen.adb, s-mudido.adb, s-mudido.ads,
4855 sem_res.adb, expander.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
4856 s-taprop-solaris.adb, s-mudido-affinity.adb, vms_conv.adb,
4857 s-taprop-irix.adb, s-taprop.ads, s-taskin.adb, s-taskin.ads,
4858 s-taprop-hpux-dce.adb, a-chtgbo.adb, s-taprop-posix.adb: Minor
4861 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
4863 * sem_ch12 (Check_Private_View): Revert previous change.
4864 * sem_res.adb (Conversion_Check): Do not emit the error message if the
4865 conversion is in a generic instance.
4867 2011-08-31 Matthew Heaney <heaney@adacore.com>
4869 * a-cbhase.adb (Symmetric_Difference): Dereference correct node array.
4870 * a-chtgbo.adb (Free): Allow 0 as index value.
4872 2011-08-31 Matthew Heaney <heaney@adacore.com>
4874 * a-cborma.adb (Insert): Add comment to explain why no element
4877 2011-08-31 Gary Dismukes <dismukes@adacore.com>
4879 * sem_util.adb (Find_Body_Discriminal): Test whether the scope of the
4880 spec discriminant is already a concurrent type, in which case just use
4881 it, otherwise fetch the Corresponding_Concurrent_Type as before.
4883 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
4885 * system-irix-n64.ads, system-linux-armeb.ads, system-linux-armel.ads,
4886 system-linux-mips.ads, system-linux-mipsel.ads,
4887 system-linux-mips64el.ads, system-linux-ppc64.ads,
4888 system-linux-sparcv9.ads, system-rtems.ads: Remove GCC_ZCX_Support.
4890 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
4892 * gcc-interface/ada-tree.h (TYPE_EXTRA_SUBTYPE_P): Add internal check.
4893 * gcc-interface/utils2.c (build_binary_op): Tighten condition.
4894 (build_unary_op): Likewise.
4896 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
4898 * raise-gcc.c: Do not include coretypes.h and tm.h.
4899 (setup_to_install): Remove test for compiler macro.
4900 * targext.c: Document use for the library.
4901 * gcc-interface/Makefile.in: Fix comment on the use of IN_GCC.
4903 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
4905 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not convert
4906 the expression to the nominal type if the latter is a record type with
4907 a variant part and the type of the former is a record type without one.
4909 2011-08-30 Yannick Moy <moy@adacore.com>
4911 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
4912 expansion in Alfa mode.
4913 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public
4914 * exp_alfa.adb, exp_alfa.ads: New package defining light expansion for
4916 * gnat1drv.adb (Adjust_Global_Switches): Update Comment.
4917 * sem_res.adb: Ditto.
4918 * gcc-interface/Make-lang.in: Update dependencies.
4920 2011-08-30 Thomas Quinot <quinot@adacore.com>
4922 * g-socket.ads: Minor documentation adjustment.
4924 2011-08-30 Robert Dewar <dewar@adacore.com>
4926 * exp_ch9.adb, s-tassta.adb, s-secsta.adb: Minor reformatting.
4928 2011-08-30 Yannick Moy <moy@adacore.com>
4930 * exp_ch6_light.adb, exp_ch6_light.ads, exp_attr_light.adb,
4931 exp_attr_light.ads, exp_ch7_light.adb, exp_ch7_light.ads,
4932 exp_light.adb, exp_light.ads, exp_prag.adb, expander.adb,
4933 gnat1drv.adb, exp_ch11.adb, exp_ch6.adb, exp_ch6.ads, exp_aggr.adb:
4934 Revert change which introduced files for "light"
4935 expansion, to be replaced by a single file for Alfa expansion.
4937 2011-08-30 Robert Dewar <dewar@adacore.com>
4939 * opt.ads, s-soflin.adb, exp_ch9.adb, sem_res.adb: Update comment.
4940 Minor code reorg/reformatting.
4942 2011-08-30 Yannick Moy <moy@adacore.com>
4944 * opt.adb, opt.ads (Full_Expander_Active): New function defines a
4945 common shorthand for (Expander_Active and not ALFA_Mode) that can be
4946 used for testing full expansion, that is active expansion not in the
4947 reduced mode for Alfa
4948 * exp_ch4.adb, exp_ch9.adb, exp_disp.adb, sem_ch10.adb, sem_ch12.adb,
4949 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Use newly defined "flag" instead
4950 of the verbose (Expander_Active and not ALFA_Mode)
4952 2011-08-30 Tristan Gingold <gingold@adacore.com>
4954 * s-parame-vms-alpha.ads, s-parame-hpux.ads, s-tassta.adb,
4955 s-tarest.adb, s-parame-vms-ia64.ads, s-soflin.adb, s-secsta.adb,
4956 s-secsta.ads, s-parame.ads, s-parame-vxworks.ads, s-parame-ae653.ads:
4957 Renames Ratio to Percentage, and Sec_Stack_Ratio to Sec_Stack_Percentage
4959 2011-08-30 Gary Dismukes <dismukes@adacore.com>
4961 * sem_res.adb (Valid_Conversion): Revise test for implicit anonymous
4962 access conversions to check that the conversion is a rewritten node,
4963 rather than just having Comes_From_Source set to False, which wasn't
4966 2011-08-30 Robert Dewar <dewar@adacore.com>
4968 * exp_ch9.adb, sem_ch9.adb, sem_ch6.adb, exp_disp.adb,
4969 g-socket.ads: Minor reformatting.
4971 2011-08-30 Thomas Quinot <quinot@adacore.com>
4973 * sem_util.adb: Minor reformatting.
4975 2011-08-30 Tristan Gingold <gingold@adacore.com>
4977 * raise-gcc.c: Never catch exception if _UA_FORCE_UNWIND flag is set,
4978 to be compliant with the ABI.
4980 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
4982 * sem_ch12.adb (Check_Private_View): Exchange the private and full view
4983 of a designated type when the related access type is an actual in an
4984 instance. This ensures that the full view of designated type is
4985 available when inside the body of the instance.
4987 2011-08-30 Ed Schonberg <schonberg@adacore.com>
4989 * sem_util.adb (May_Be_Lvalue): To determine whether a reference may be
4990 in a position to be modified, a slice is treated like an indexed
4993 2011-08-30 Thomas Quinot <quinot@adacore.com>
4995 * s-oscons-tmplt.c, g-socket.ads: Adjust maximum allowed value for
4996 field tv_sec in struct timeval.
4998 2011-08-30 Yannick Moy <moy@adacore.com>
5000 * exp_ch9.adb, exp_disp.adb, sem_ch9.adb, sem_res.adb: Protect several
5001 blocks of code doing full expansion, previously only guarded by
5002 Expander_Active, by anding the test that ALFA_Mode is not set
5004 2011-08-30 Ed Schonberg <schonberg@adacore.com>
5006 * sem_ch6.adb (Analyze_Return_Type): If the return type is incomplete,
5007 add the function to the list of private dependents, for subsequent
5008 legality check on Taft amendment types.
5009 * sem_ch12.adb (Analyze_Formal_Incomplete_Type): Initialize
5010 Private_Dependents, as for other incomplete types.
5011 * sem_util.adb (Wrong_Type): Avoid cascaded errors when a
5012 Taft-amendment type is used as the return type of a function.
5014 2011-08-30 Javier Miranda <miranda@adacore.com>
5016 * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup: replace code
5017 which emits an error by a call to a new routine which report the error.
5018 * exp_ch9.adb (Build_Wrapper_Spec): Build the wrapper even if the
5019 entity does not cover an existing interface.
5020 * errout.ads, errout.adb (Error_Msg_PT): New routine. Used to factorize
5022 * sem_ch6.adb (Check_Conformance): Add specific error for wrappers of
5023 protected procedures or entries whose mode is not conformant.
5024 (Check_Synchronized_Overriding): Code cleanup: replace code which emits
5025 an error by a call to a new routine which report the error.
5027 2011-08-30 Robert Dewar <dewar@adacore.com>
5029 * gnat_rm.texi: Minor change.
5030 * exp_attr_light.adb: Minor reformatting.
5032 2011-08-30 Ed Schonberg <schonberg@adacore.com>
5034 * sem_ch3.adb: Patch inheritance of aspects in
5035 Complete_Private_Subtype, to avoid infinite loop.
5037 2011-08-30 Javier Miranda <miranda@adacore.com>
5039 * sem_ch3.adb (Add_Internal_Interface_Entities): If serious errors have
5040 been reported and a subprogram covering an interface primitive is not
5041 found then skip generating the internal entity. Done to avoid crashing
5043 (Check_Abstract_Overriding): Change text of error of wrong formal of
5044 protected subprogram or entry. Done for consistency to emit exactly the
5045 same error reported by Check_Synchronized_Overriding. In addition, the
5046 error is restricted to protected types (bug found working on AI05-0090)
5048 2011-08-30 Yannick Moy <moy@adacore.com>
5050 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
5051 expansion in Alfa mode.
5052 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public.
5053 * exp_light.adb, exp_light.ads: New package defining light expansion.
5054 * expander.adb (Expand): Call light expansion in Alfa mode
5055 * exp_ch6_light.adb, exp_ch6_light.ads: Light expansion of chapter 6
5057 * exp_ch7_light.adb, exp_ch7_light.ads: Light expansion of chapter 7
5059 * exp_attr_light.adb, exp_attr_light.ads: Light expansion of attributes
5060 * gnat1drv.adb (Adjust_Global_Switches): Comment
5062 2011-08-30 Yannick Moy <moy@adacore.com>
5064 * lib-xref-alfa.adb: Minor refactoring.
5066 2011-08-30 Yannick Moy <moy@adacore.com>
5068 * exp_ch9.adb (Expand_Entry_Barrier): Do not perform expansion in Alfa
5070 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not perform
5071 expansion in Alfa mode.
5072 * sem_ch9.adb (Analyze_Entry_Body): Do not perform expansion in Alfa
5075 2011-08-30 Robert Dewar <dewar@adacore.com>
5077 * debug_a.adb: Update comment.
5079 2011-08-30 Robert Dewar <dewar@adacore.com>
5081 * exp_ch5.adb, sem_ch3.adb, sem_ch5.adb, einfo.adb, checks.adb,
5082 sem_util.adb, sem_util.ads, sem_res.adb, s-stposu.adb, sem_attr.adb,
5083 exp_ch4.adb, exp_ch6.adb, lib-xref-alfa.adb,
5084 sem_ch8.adb, sem_disp.adb, exp_ch3.adb: Minor reformatting
5086 2011-08-30 Robert Dewar <dewar@adacore.com>
5088 * gnat_rm.texi: Add section on C.6(16) implementation advice for pragma
5091 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
5093 * exp_ch3.adb (Expand_Freeze_Array_Type): Correct the call to
5094 Build_Finalization_Master by supplying an insertion node and enclosing
5095 scope. In its old version, the call did not generate a finalization
5097 (Expand_Freeze_Record_Type): Add local variable Has_AACC. Add code to
5098 recognize anonymous access-to-controlled components. Rewrite the
5099 machinery which creates finalization masters to service anonymous
5100 access-to-controlled components of a record type. In its current state,
5101 only one heterogeneous master is necessary to handle multiple anonymous
5103 (Freeze_Type): Comment reformatting.
5104 * rtsfind.ads: Add RE_Set_Is_Heterogeneous to tables RE_Id and
5106 * s-stposu.adb (Allocate_Any_Controlled): Rewrite the machinery which
5107 associates TSS primitive Finalize_Address with either the master itself
5108 or with the internal hash table depending on the mode of operation of
5111 2011-08-30 Javier Miranda <miranda@adacore.com>
5113 * exp_ch3.adb (Make_Eq_If): If the etype of the _parent component is an
5114 interface type then do not generate code to compare this component.
5115 Required since they have no components and their equality operator is
5118 2011-08-30 Steve Baird <baird@adacore.com>
5120 * sem_util.ads (Deepest_Type_Access_Level): New function; for the type
5121 of a saooaaat (i.e, a stand-alone object of an anonymous access type),
5122 returns the (static) accessibility level of the object. Otherwise, the
5123 same as Type_Access_Level.
5124 (Dynamic_Accessibility_Level): New function; given an expression which
5125 could occur as the rhs of an assignment to a saooaaat (i.e., an
5126 expression of an access-to-object type), return the new value for the
5127 saooaaat's associated Extra_Accessibility object.
5128 (Effective_Extra_Accessibility): New function; same as
5129 Einfo.Extra_Accessibility except that object renames are looked through.
5131 (Deepest_Type_Access_Level): New function; see sem_util.ads description.
5132 (Dynamic_Accessibility_Level): New function; see sem_util.ads
5134 (Effective_Extra_Accessibility): New function; see sem_util.ads
5136 * einfo.ads (Is_Local_Anonymous_Access): Update comments.
5137 (Extra_Accessibility): Update comments.
5138 (Init_Object_Size_Align): New procedure; same as Init_Size_Align
5139 except RM_Size field (which is only for types) is unaffected.
5141 (Extra_Accessibility): Expand domain to allow objects, not just formals.
5142 (Set_Extra_Accessibility): Expand domain to allow objects, not just
5144 (Init_Size): Add assertion that we are not trashing the
5145 Extra_Accessibility attribute of an object.
5146 (Init_Size_Align): Add assertion that we are not trashing the
5147 Extra_Accessibility attribute of an object.
5148 (Init_Object_Size_Align): New procedure; see einfo.ads description.
5149 * sem_ch3.adb (Find_Type_Of_Object): Set Is_Local_Anonymous_Access
5150 differently for the type of a (non-library-level) saooaaat depending
5151 whether Ada_Version < Ada_2012. This is the only point where Ada_Version
5152 is queried in this set of changes - everything else (in particular,
5153 setting of the Extra_Accessibility attribute in exp_ch3.adb) is
5154 driven off of the setting of the Is_Local_Anonymous_Access attribute.
5155 The special treatment of library-level saooaaats is an optimization,
5156 not required for correctnesss. This is based on the observation that the
5157 Ada2012 rules (static and dynamic) for saooaaats turn out to be
5158 equivalent to the Ada2005 rules in the case of a library-level saooaaat.
5160 (Expand_N_Object_Declaration): If Is_Local_Anonymous_Access is
5161 false for the type of a saooaaat, declare and initialize its
5162 accessibility level object and set the Extra_Accessibility attribute
5163 of the saooaaat to refer to this object.
5164 * checks.adb (Apply_Accessibility_Check): Add Ada 2012 saooaaat support.
5165 * exp_ch4.adb (Expand_N_In): Replace some Extra_Accessibility calls with
5166 calls to Effective_Extra_Accessibility in order to support
5167 renames of saooaaats.
5168 (Expand_N_Type_Conversion): Add new local function,
5169 Has_Extra_Accessibility, and call it when determining whether an
5170 accessibility check is needed.
5171 It returns True iff Present (Effective_Extra_Accessibility (Id)) would
5172 evaluate to True (without raising an exception).
5174 (Expand_N_Assignment_Statement): When assigning to an Ada2012
5175 saooaaat, update its associated Extra_Accessibility object (if
5176 it has one). This includes an accessibility check.
5177 * exp_ch6.adb (Add_Call_By_Copy_Code): When parameter copy-back updates
5178 a saooaaat, update its Extra_Accessibility object too (if it
5180 (Expand_Call): Replace a couple of calls to Type_Access_Level
5181 with calls to Dynamic_Access_Level to handle cases where
5182 passing a literal (any literal) is incorrect.
5183 * sem_attr.adb (Resolve_Attribute): Handle the static accessibility
5184 checks associated with "Saooaat := Some_Object'Access;"; this must
5185 be rejected if Some_Object is declared in a more nested scope
5187 * sem_ch5.adb (Analyze_Assignment): Force accessibility checking for an
5188 assignment to a saooaaat even if Is_Local_Anonymous_Access
5189 returns False for its type (indicating a 2012-style saooaaat).
5191 (Analyze_Object_Renaming): Replace a call to Init_Size_Align
5192 (which is only appropriate for objects, not types) with a call
5193 of Init_Object_Size_Align in order to avoid trashing the
5194 Extra_Accessibility attribute of a rename (the two attributes
5197 (Valid_Conversion) Replace six calls to Type_Access_Level with
5198 calls to Deepest_Type_Access_Level. This is a bit tricky. For an
5199 Ada2012 non-library-level saooaaat, the former returns library level
5200 while the latter returns the (static) accessibility level of the
5201 saooaaat. A type conversion to the anonymous type of a saooaaat
5202 can only occur as part of an assignment to the saooaaat, so we
5203 know that such a conversion must be in a lhs context, so Deepest
5204 yields the result that we need. If such a conversion could occur,
5205 say, as the operand of an equality operator, then this might not
5206 be right. Also add a test so that static accessibilty checks are
5207 performed for converting to a saooaaat's type even if
5208 Is_Local_Anonymous_Access yields False for the type.
5210 2011-08-30 Javier Miranda <miranda@adacore.com>
5212 * sem_disp.adb (Check_Dispatching_Operation): Complete condition that
5213 controls generation of a warning associated with late declaration of
5214 dispatching functions. Required to avoid generating spurious
5217 2011-08-30 Gary Dismukes <dismukes@adacore.com>
5219 * sem_ch6.adb (Check_Return_Subtype_Indication): Issue error if the
5220 return object has an anonymous access type and the function's type is
5221 a named access type.
5222 * sem_ch8.adb (Analyze_Object_Renaming): Suppress error about renaming
5223 conversions on implicit conversions, since such conversions can occur
5224 for anonymous access cases due to expansion. Issue error for attempt
5225 to rename an anonymous expression as an object of a named access type.
5226 * sem_res.ads (Valid_Conversion): Add defaulted parameter Report_Errs,
5227 to indicate whether this function should report errors on invalid
5229 * sem_res.adb (Resolve): For Ada 2012, in the case where the type of
5230 the expression is of an anonymous access type and the expected type is
5231 a named general access type, rewrite the expression as a type
5232 conversion, unless this is an expression of a membership test.
5233 (Valid_Conversion.Error_Msg_N): New procedure that conditions the
5234 calling of Error_Msg_N on new formal Report_Errs.
5235 (Valid_Conversion.Error_Msg_NE): New procedure that conditions the
5236 calling of Error_Msg_NE on new formal Report_Errs.
5237 (Valid_Conversion): Move declaration of this function to the package
5238 spec, to allow calls from membership test processing. For Ada 2012,
5239 enforce legality restrictions on implicit conversions of anonymous
5240 access values to general access types, disallowing such conversions in
5241 cases where the expression has a dynamic accessibility level (access
5242 parameters, stand-alone anonymous access objects, or a component of a
5243 dereference of one of the first two cases).
5244 * sem_type.adb (Covers): For Ada 2012, allow an anonymous access type
5245 in the context of a named general access expected type.
5246 * exp_ch4.adb Add with and use of Exp_Ch2.
5247 (Expand_N_In): Add processing for membership tests applied to
5248 expressions of an anonymous access type. First, Valid_Conversion is
5249 called to check whether the test is statically False, and then the
5250 conversion is expanded to test that the expression's accessibility
5251 level is no deeper than that of the tested type. In the case of
5252 anonymous access-to-tagged types, a tagged membership test is applied
5254 (Tagged_Membership): Extend to handle access type cases, applying the
5255 test to the designated types.
5256 * exp_ch6.adb (Expand_Call): When creating an extra actual for an
5257 accessibility level, and the actual is a 'Access applied to a current
5258 instance, pass the accessibility level of the type of the current
5259 instance rather than applying Object_Access_Level to the prefix. Add a
5260 ??? comment, since this level isn't quite right either (will eventually
5261 need to pass an implicit level parameter to init procs).
5263 2011-08-30 Bob Duff <duff@adacore.com>
5265 * s-taskin.ads: Minor comment fix.
5267 2011-08-30 Ed Schonberg <schonberg@adacore.com>
5269 * sem_res.adb (Check_Parameterless_Call): If the node is a selected
5270 component and the selector is a dispatching operation, check if it is
5271 a prefixed call before rewriting as a parameterless function call.
5273 2011-08-29 Jakub Jelinek <jakub@redhat.com>
5275 * gcc-interface/Makefile.in (../stamp-gnatlib1-$(RTSDIR)): Copy
5276 tsystem.h into $(RTSDIR) instead of rts.
5278 2011-08-29 Robert Dewar <dewar@adacore.com>
5280 * sem_ch10.adb, a-coorse.adb, exp_dist.adb, exp_ch3.adb: Minor
5282 * gcc-interface/Make-lang.in: Update dependencies.
5284 2011-08-29 Yannick Moy <moy@adacore.com>
5286 * alfa.ads (Name_Of_Heap_Variable): New constant name.
5287 * lib-xref-alfa.adb, lib-xref.adb, lib-xref.ads (Drefs): New global
5288 table to hold dereferences.
5289 (Add_ALFA_Xrefs): Take into account dereferences as special
5290 reads/writes to the variable "HEAP".
5291 (Enclosing_Subprogram_Or_Package): Move subprogram here.
5292 (Generate_Dereference): New procedure to store a read/write dereferencew
5294 * put_alfa.adb (Put_ALFA): Use different default than (0,0) used for
5295 the special "HEAP" var.
5296 * sem_ch4.adb (Analyze_Explicit_Dereference): Store read dereference
5298 * sem_util.adb (Note_Possible_Modification): Store write dereference
5301 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5303 * exp_ch3.adb (Freeze_Type): Generate an accessibility check which
5304 ensures that the level of the subpool access type is not deeper than
5305 that of the pool object.
5306 * sem_util.adb (Object_Access_Level): Expand to handle defining
5308 * sem_res.adb (Resolve_Allocator): Add a guard to avoid examining the
5309 subpool handle name of a rewritten allocator.
5311 2011-08-29 Robert Dewar <dewar@adacore.com>
5313 * impunit.adb, exp_ch4.adb, s-finmas.adb: Minor reformatting.
5315 2011-08-29 Thomas Quinot <quinot@adacore.com>
5317 * exp_dist.adb (TC_Rec_Add_Process_Element): For a choice with multiple
5318 values, we generate multiple triples of parameters in the TypeCode.
5319 Bump Choice_Index for each such triple so that a subsequent default
5320 choice is associated with the correct index in the typecode.
5322 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5324 * a-cdlili.adb (Iterate): Initialize properly an iterator over a null
5326 (First, Last): Handle properly an iterator over a null container.
5328 2011-08-29 Bob Duff <duff@adacore.com>
5330 * sem_ch10.adb (Analyze_With_Clause,Install_Withed_Unit): Abandon
5331 processing if we run across a node with no Scope. This can happen if
5332 we're with-ing an library-level instance, and that instance got errors
5333 that caused "instantiation abandoned".
5334 * sem_util.adb (Unit_Declaration_Node): Make it more robust, by raising
5335 an exception instead of using Assert, so it won't go into an infinite
5336 loop, even when assertions are turned off.
5338 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5340 * a-coorse.adb: Proper handling of empty ordered sets.
5342 2011-08-29 Johannes Kanig <kanig@adacore.com>
5344 * debug.adb: Add comments.
5346 2011-08-29 Thomas Quinot <quinot@adacore.com>
5348 * a-except.adb, a-except-2005.adb: Minor comment rewording and
5351 2011-08-29 Yannick Moy <moy@adacore.com>
5353 * sem_ch3.adb (Array_Type_Declaration): Remove insertion of
5354 declaration for Itypes in Alfa mode.
5356 2011-08-29 Robert Dewar <dewar@adacore.com>
5358 * a-cdlili.ads, a-coinve.ads, a-coorma.adb, a-coorma.ads, s-tassta.adb,
5359 a-cborma.adb, a-cborma.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
5360 a-cborse.ads, a-cobove.adb, a-cobove.ads, a-cbhase.ads: Minor
5363 2011-08-29 Tristan Gingold <gingold@adacore.com>
5365 * exp_ch7.adb, exp_ch7.ads (Build_Exception_Handler): Move its spec to
5367 * exp_intr.adb (Expand_Unc_Deallocation): Use Build_Exception_Handler.
5368 * a-except.adb, a-except-2005.adb (Rcheck_22): Do not defer aborts
5371 2011-08-29 Robert Dewar <dewar@adacore.com>
5373 * a-cbhama.adb, a-cbhama.ads: Minor reformatting.
5375 2011-08-29 Javier Miranda <miranda@adacore.com>
5377 * sem_ch8.adb (Analyze_Subprogram_Renaming): Complete support for
5378 renamings of formal subprograms when the actual for a formal type is
5381 2011-08-29 Matthew Heaney <heaney@adacore.com>
5383 * a-cbhama.ads, a-cbhase.ads (Move): Clear Source following assignment
5386 2011-08-29 Matthew Heaney <heaney@adacore.com>
5388 * a-cborma.ads, a-cborse.ads (Cursor): Default-initialize all
5389 components of record type.
5390 * a-cborma.adb, a-cborse.adb (Move): Clear Source following assignmentw
5393 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5395 * a-cbhama.adb, a-cbhama.ads, a-cborma.adb, a-cborma.ads, a-cobove.adb,
5396 a-cobove.ads, a-coorma.adb, a-coorma.ads: Add iterator machinery to
5399 2011-08-29 Robert Dewar <dewar@adacore.com>
5401 * sem_ch3.adb, sem_util.adb, gnat1drv.adb, s-parint.ads: Minor
5404 2011-08-29 Matthew Heaney <heaney@adacore.com>
5406 * a-cbhama.ads, a-cbhase.ads (Cursor): Default-initialize all
5407 components of record type.
5409 2011-08-29 Bob Duff <duff@adacore.com>
5411 * s-tassta.adb (Task_Wrapper): Handle and ignore exceptions propagated
5412 by the termination handler.
5414 2011-08-29 Yannick Moy <moy@adacore.com>
5416 * sem_ch3.adb (Array_Type_Declaration): Create declarations for Itypes
5417 created in Alfa mode, instead of inserting artificial declarations of
5418 non-Itypes in the tree.
5419 * sem_util.adb, sem_util.ads (Itype_Has_Declaration): New function to
5420 know if an Itype has a corresponding declaration, as defined in
5423 2011-08-29 Yannick Moy <moy@adacore.com>
5425 * gnat1drv.adb: Minor rewrite.
5427 2011-08-29 Bob Duff <duff@adacore.com>
5429 * s-tasuti.adb (Make_Passive): Work around race condition in
5430 Make_Independent, which can cause Wait_Count to be zero. So instead of
5431 asserting that Wait_Count > 0, and then decrementing it, decrement it
5432 only if Wait_Count > 0.
5433 * s-taskin.ads (Wait_Count, Alive_Count, Awake_Count): All of these
5434 should be nonnegative, so declare them Natural instead of Integer.
5436 2011-08-29 Robert Dewar <dewar@adacore.com>
5438 * exp_ch5.adb, sem_ch3.adb, a-cihama.adb, a-cihama.ads, exp_ch7.adb,
5439 sem_ch5.adb, a-ciorse.adb, a-ciorse.ads, sem_ch12.adb, a-cidlli.adb,
5440 a-cidlli.ads, sem_util.adb, sem_res.adb, gnat1drv.adb, a-except.adb,
5441 a-except.ads, a-except-2005.ads, sem_ch4.adb, exp_disp.adb,
5442 exp_aggr.adb, sem_ch13.adb, par-ch3.adb: Minor reformatting.
5444 2011-08-29 Tristan Gingold <gingold@adacore.com>
5446 * s-auxdec-vms-alpha.adb: Add comments, remove some HT before labels.
5448 2011-08-29 Vadim Godunko <godunko@adacore.com>
5450 * s-parint.ads: Minor comment clarification.
5452 2011-08-29 Vincent Celier <celier@adacore.com>
5454 * prj.adb (Initialize): Make sure that new reserved words after Ada 95
5455 may be used as identifiers.
5457 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5459 * a-coinho.ads: Minor reformating.
5461 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5463 * exp_ch5.adb (Expand_Iterator_Loop): Handle properly a loop over a
5464 container of a derived type.
5466 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5468 * a-cidlli.adb, a-cidlli.ads, a-cihama.adb, a-cihama.ads,
5469 a-ciorse.adb, a-ciorse.ads: Add iterator machinery to containers.
5471 2011-08-29 Pascal Obry <obry@adacore.com>
5473 * exp_disp.adb: Minor comment fix.
5474 (Make_Disp_Asynchronous_Select_Body): Properly initialize out parameters
5475 to avoid warnings when compiling with -Wall.
5476 (Make_Disp_Conditional_Select_Body): Likewise.
5477 (Make_Disp_Timed_Select_Body): Likewise.
5479 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5481 * sem_ch12.adb (Analyze_Formal_Subprogram_Declaration): If default is
5482 an entity name, generate reference for it.
5484 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5486 * exp_ch5.adb (Expand_Iterator_Loop): Uniform handling of "X of S"
5488 * sem_util.adb (Is_Iterator, Is_Reversible_Iterator): Yield True for
5489 the class-wide type.
5490 * sem_ch5.adb: Move some rewriting to the expander, where it belongs.
5492 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5494 * sem_ch8.adb (Check_Constrained_Object): Do not create an actual
5495 subtype for an object whose type is an unconstrained union.
5497 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5499 * par-ch3.adb (P_Array_Type_Definiation, P_Component_Items): "aliased"
5500 is allowed in a component definition, by AI95-406.
5502 2011-08-29 Matthew Heaney <heaney@adacore.com>
5504 * a-chtgbo.adb (Generic_Iteration): Use correct overloading of Next.
5506 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5508 * a-except-2005.adb: Alphabetize all routines.
5509 (Triggered_By_Abort): New routine.
5510 * a-except-2005.ads (Triggered_By_Abort): New routine.
5511 * a-except.adb Alphabetize all routines.
5512 (Triggered_By_Abort): New routine.
5513 * a-except.ads (Triggered_By_Abort): New routine.
5514 * exp_ch7.adb: Update all comments involving the detection of aborts in
5516 (Build_Object_Declarations): Do not generate code to detect the
5517 presence of an abort at the start of finalization code, use a runtime
5519 * rtsfind.ads: Add RE_Triggered_By_Abort to tables RE_Id and
5521 * sem_res.adb (Resolve_Allocator): Emit a warning when attempting to
5522 allocate a task on a subpool.
5523 * s-stposu.adb: Add library-level flag Finalize_Address_Table_In_Use.
5524 The flag disables all actions related to the maintenance of
5525 Finalize_Address_Table when subpools are not in use.
5526 (Allocate_Any_Controlled): Signal the machinery that subpools are in
5528 (Deallocate_Any_Controlled): Do not call Delete_Finalize_Address which
5529 performs costly task locking when subpools are not in use.
5531 2011-08-29 Yannick Moy <moy@adacore.com>
5533 * gnat1drv.adb (Adjust_Global_Switches): Restore expansion of tagged
5534 types and dispatching calls in Alfa mode.
5535 * lib-xref-alfa.adb (Collect_ALFA): Rewrite computation of
5536 correspondance between body and spec scopes, to reuse utility functions
5537 (Traverse_Declarations_Or_Statements): Protect access to body for stub
5538 by testing the presence of the library unit for the body
5539 * sem_ch6.adb (Set_Actual_Subtypes): take into account that in Alfa
5540 mode the expansion of accept statements is skipped
5541 * sem_util.adb, sem_util.ads (Unique_Entity): New function returning
5542 the unique entity corresponding to the one returned by
5543 Unique_Defining_Entity applied to the enclosing declaration of the
5546 2011-08-29 Bob Duff <duff@adacore.com>
5548 * treepr.ads: Improve debugging facilities. pn(x) no longer crashes in
5549 gdb when x is not a node (it can be a node list, name_id, etc). pp is
5550 an alias for pn. ppp is an alias for pt.
5552 2011-08-29 Javier Miranda <miranda@adacore.com>
5554 * exp_aggr.adb (Expand_Record_Aggregate): Use the top-level enclosing
5555 aggregate to take a consistent decision on the need to convert into
5556 assignments aggregates that initialize constant objects.
5558 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5560 * exp_ch4.adb (Expand_Allocator_Expression): Add a call to
5561 Build_Allocate_Deallocate_Proc in order to handle allocation of
5562 non-controlled objects on subpools.
5563 * impunit.adb: Remove s-finmas and s-spsufi since they were never meant
5564 to be end-user visible.
5565 * s-finmas.adb: Add with and use clause for System.HTable.
5566 Add an instantiation of Simple_HTable which provides a mapping between
5567 the address of a controlled object and the corresponding
5568 Finalize_Address used to clean up the object. The table is used when a
5569 master is operating in heterogeneous mode.
5570 (Attach): Explain why the input node is not verified on being already
5572 (Delete_Finalize_Address): New routine.
5573 (Detach): Add pragma Assert which ensures that a node is already
5575 (Finalize): Add local variable Cleanup. Rewrite the iteration scheme
5576 since nodes are no longer removed on traversal. Explain why node
5577 detachment is undesirable in this case.
5578 (Get_Finalize_Address): New routine.
5579 (Hash): New routine.
5580 (Is_Empty_List): Removed.
5581 (pm): Renamed to Print_Master. Add output for discriminant
5583 Comment reformatting.
5584 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
5585 * s-finmas.ads: Various comments additions / improvements.
5586 Type Finalization_Master has a discriminant which determines the mode of
5588 (Delete_Finalize_Address): New routine.
5589 (Get_Finalize_Address): New routine.
5590 (pm): Renamed to Print_Master.
5591 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
5592 * s-stposu.adb: Add with clause for System.Address_Image; Add with and
5593 use clause for System.IO.
5594 (Allocate_Any_Controlled): Add machinery to set TSS primitive
5595 Finalize_Address depending on the mode of allocation and the mode of
5597 (Deallocate_Any_Controlled): Remove the relation pair object -
5598 Finalize_Address regardless of the master mode. Add comment explaining
5600 (Detach): Ensure that fields Prev and Next are null after detachment.
5601 (Finalize_Pool): Remove local variable Next_Ptr. Rewrite the iteration
5602 scheme to check whether the list of subpools is empty. There is no
5603 longer need to store the next subpool or advance the current pointer.
5604 (Is_Empty_List): New routine.
5605 (Print_Pool): New routine.
5606 (Print_Subpool): New routine.
5607 * s-stposu.ads: Various comments additions / improvements.
5608 Field Master of type Root_Subpool is now a heterogeneous collection.
5609 (Print_Pool): New routine.
5610 (Print_Subpool): New routine.
5612 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5614 * exp_ch5.adb (Expand_N_Iterator_Loop): Implement Ada2012 loop iterator
5615 forms, using aspects of container types.
5616 * sem_ch3.adb (Find_Type_Name): Preserve Has_Delayed_Aspects and
5617 Has_Implicit_Dereference flags, that may be set on the partial view.
5618 * sem_ch4.adb (Process_Overloaded_Indexed_Component): Prefix may be a
5619 container type with an indexing aspect.
5620 (Analyze_Quantified_Expression): Analyze construct with expansion
5621 disabled, because it will be rewritten as a loop during expansion.
5622 (Try_Container_Indexing): The prefix itself may be a container type
5623 with an indexing aspect, as with a vector of vectors.
5624 * sem_ch5.adb (Analyze_Iteration_Scheme): In a generic context, analyze
5625 the original doamin of iteration, for name capture.
5626 (Analyze_Iterator_Specification): If the domain is an expression that
5627 needs finalization, create a separate declaration for it.
5628 For an iterator with "of" retrieve default iterator info from aspect of
5629 container type. For "in" iterator, retrieve type of Iterate function.
5630 * sem_ch13.adb (Check_Iterator_Function): Fix typo.
5631 (Check_Aspect_At_End_Of_Declaration): Make type unfrozen before
5632 analysis, to prevent spurious errors about late attributes.
5633 * sprint.adb: Handle quantified expression with either loop or iterator
5635 * a-convec.ads, a-convec.adb: Iterate function returns a reversible
5638 2011-08-29 Vincent Celier <celier@adacore.com>
5640 * make.adb (Scan_Make_Arg): Take any option as is in packages Compiler,
5641 Binder or Linker of the main project file.
5643 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5645 * inline.adb (Add_Scopes_To_Clean): Exclude any entity within a generic
5648 2011-08-29 Yannick Moy <moy@adacore.com>
5650 * exp_ch9.adb: Partial revert of previous change for Alfa mode
5652 2011-08-29 Yannick Moy <moy@adacore.com>
5654 * exp_ch11.adb: Minor expansion of comment.
5656 2011-08-29 Yannick Moy <moy@adacore.com>
5658 * lib-xref-alfa.adb (Add_ALFA_Scope): Treat generic entities.
5660 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5662 * sem_res.adb (Resolve_Arithmetic_Op): If the node has a universal
5663 interpretation, set the type before resolving the operands, because
5664 legality checks on an exponention operand need to know the type of the
5667 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5669 * sem_ch12.adb (Analyze_Package_Instantiation): Do not set delayed
5670 cleanups on a master if the instance is within a generic unit.
5671 Complement to the corresponding fix to inline.adb for K520-030.
5673 2011-08-29 Tristan Gingold <gingold@adacore.com>
5675 * exp_ch7.adb (Build_Raise_Statement): Raise PE instead of the current
5677 * exp_intr.adb: Minor comment fix.
5679 2011-08-29 Bob Duff <duff@adacore.com>
5681 * sem_ch13.adb (Analyze_Aspect_Specifications): Fix cases where
5682 Delay_Required was used as an uninitialized variable.
5684 2011-08-29 Robert Dewar <dewar@adacore.com>
5686 * a-cdlili.adb, a-cdlili.ads, a-coinve.adb, a-coinve.ads,
5687 sem_util.adb, sem_util.ads, a-cohama.adb, a-cohama.ads, a-coorse.adb,
5688 a-coorse.ads, aspects.ads, sem_ch8.adb: Minor reformatting.
5690 2011-08-29 Thomas Quinot <quinot@adacore.com>
5692 * system-freebsd-x86_64.ads (Backend_Overflow_Checks): Set true True.
5693 Remove unused variables.
5695 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5697 * sem_res.adb: Remove Build_Explicit_Dereference.
5698 * sem_util.adb, sem_util.ads (Build_Explicit_Dereference): Moved here
5699 from sem_res.adb, used in analysis of additional constructs.
5700 (Is_Iterator, Is_Reversible_Iterator): New predicates for Ada2012
5701 expansion of iterators.
5702 (Is_Object_Reference): Recognize variables rewritten as explicit
5703 dereferences in Ada2012.
5704 * snames.ads-tmpl: Add Has_Element, Forward_Iterator,
5705 Reversible_Iterator names, for expansion of Ada2012 iterators.
5706 * aspects.ads, aspects.adb (Find_Aspect): Utility.
5707 * a-cdlili.ads, a-cdlili.adb: Add new iterator machinery to doubly
5708 linked list container.
5709 * a-coinve.ads, a-coinve.adb: Ditto for indefinite vector containers.
5710 * a-coorse.ads, a-coorse.adb: Ditto for ordered sets.
5712 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5714 * a-cohama.adb, a-cohama.ads: Add iterator primitives to hashed map
5717 2011-08-29 Vincent Celier <celier@adacore.com>
5719 * make.adb (Gnatmake): Get the maximum number of simultaneous
5720 compilation processes after the Builder switches has been scanned, as
5721 there may include -jnn.
5723 2011-08-29 Matthew Heaney <heaney@adacore.com>
5725 * a-chtgbo.adb (Generic_Equal): Use correct overloading of Next.
5727 2011-08-29 Tristan Gingold <gingold@adacore.com>
5729 * gnatcmd.adb (GNATCmd): On OpenVMS, truncate the length of
5730 GNAT_DRIVER_COMMAND_LINE to 255.
5732 2011-08-29 Pascal Obry <obry@adacore.com>
5734 * freeze.adb, sem_ch8.adb, a-convec.adb, a-convec.ads: Minor
5735 reformatting and style fix (class attribute casing).
5737 2011-08-29 Yannick Moy <moy@adacore.com>
5739 * exp_ch11.adb: Yet another case where expansion should be common
5740 between CodePeer and Alfa.
5742 2011-08-29 Yannick Moy <moy@adacore.com>
5744 * exp_ch9.adb: Partial revert of previous change for Alfa mode.
5746 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5748 * sem_ch6.adb (Matches_Limited_With_View): The limited views of an
5749 incomplete type and its completion match.
5751 2011-08-29 Yannick Moy <moy@adacore.com>
5753 * exp_ch13.adb: Adjust previous change.
5755 2011-08-29 Robert Dewar <dewar@adacore.com>
5757 * sem_prag.adb, prj.adb, sem_util.adb, sem_res.adb, gnat1drv.adb,
5758 exp_ch4.adb, sem_ch8.adb: Minor code reorganization
5761 2011-08-29 Emmanuel Briot <briot@adacore.com>
5763 * make.adb, prj.adb, prj.ads (Compute_All_Imported_Projects): Also
5764 initialize aggregated projects.
5766 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5768 * sem_ch8.adb (Find_Renamed_Entity): Within an instance, use scope
5769 depth of candidates to resolve a potentially spurious ambiguity between
5770 two visible subprograms.
5772 2011-08-29 Yannick Moy <moy@adacore.com>
5774 * sem_prag.adb (Analyze_Pragma): Allow Test_Case pragma without
5776 * sem_util.adb (Get_Ensures_From_Test_Case_Pragma,
5777 Get_Requires_From_Test_Case_Pragma): Allow Test_Case pragma without
5780 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5782 * gnat1drv.adb (Adjust_Global_Switches): Improve previous change.
5785 2011-08-29 Thomas Quinot <quinot@adacore.com>
5787 * sem_res.adb: Minor reformatting.
5789 2011-08-29 Johannes Kanig <kanig@adacore.com>
5791 * exp_ch4.adb (Expand_Quantified_Expression): Do not expand in ALFA
5793 * gnat1drv.adb (Adjust_Global_Switches): Set
5794 Use_Expressions_With_Actions to False in ALFA mode.
5795 * sem_res.adb (Resolve_Quantified_Expression): Simpler treatment in
5798 2011-08-29 Yannick Moy <moy@adacore.com>
5800 * exp_ch13.adb (Expand_N_Freeze_Entity): Do nothing in Alfa mode.
5801 * exp_ch9.adb: Do not expand tasking constructs in Alfa mode.
5802 * gnat1drv.adb (Adjust_Global_Switches): Suppress the expansion of
5803 tagged types and dispatching calls in Alfa mode.
5805 2011-08-29 Javier Miranda <miranda@adacore.com>
5807 * sem_ch3.adb (Process_Discriminants): Add missing check to ensure that
5808 we do not report an error on an Empty node.
5810 2011-08-29 Geert Bosch <bosch@adacore.com>
5812 * Makefile.rtl (GNATRTL_NONTASKING_OBJECTS): Add a-nllrar.o,
5813 a-nlrear.o and a-nurear.o.
5815 2011-08-29 Robert Dewar <dewar@adacore.com>
5817 * freeze.adb: Minor code reorganization.
5819 * sem_util.adb, errout.adb, exp_ch11.adb, a-ngrear.adb, s-gearop.adb,
5820 sem_ch6.adb: Minor reformatting
5822 2011-08-29 Tristan Gingold <gingold@adacore.com>
5824 * s-except.ads, s-except.adb: Provide dummy body.
5826 2011-08-29 Yannick Moy <moy@adacore.com>
5828 * sem_warn.adb (Within_Postcondition): Take into account the case of
5829 an Ensures component in a Test_Case.
5831 2011-08-29 Tristan Gingold <gingold@adacore.com>
5833 * s-excdeb.ads, s-excdeb.adb: New files, created from s-except.
5834 * rtsfind.ads (RTU_Id): Replaces System_Exceptions by
5835 System_Exceptions_Debug
5836 (RE_Unit_Table): Search RE_Local_Raise in System_Exceptions_Debug
5837 * a-except.adb: With and use System.Exceptions_Debug instead of
5839 * a-except-2005.adb: Likewise.
5840 * s-assert.adb: Likewise.
5841 * s-except.adb, s-except.ads: Move debugging hooks to s-excdeb.
5842 * Makefile.rtl: Add s-excdeb. Adjust compilation rule.
5843 * gcc-interfaces/Makefile.in, gcc-interface/Make-lang.in: Add
5844 s-excdeb. Update dependencies.
5845 (GNATRTL_LINEARALGEBRA_OBJS): Remove a-nlrear.o a-nurear.o a-nllrar.o
5846 as these no longer need external libraries.
5848 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5850 * sem_res.adb (Resolve_Op_Expon): Additional check to reject an
5851 exponentiation operator on universal values in a context that requires
5854 2011-08-29 Tristan Gingold <gingold@adacore.com>
5856 * raise-gcc.c (personnality_routine): Fix thinko. Set Ada occurrence
5857 before calling notify_handled_exception.
5858 * a-exextr.adb: Fix comment.
5860 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5862 * exp_ch4.adb (Expand_Allocator_Expression): Add code to set attribute
5863 Finalize_Address of the access type's finalization master.
5864 (Expand_N_Allocator): Add code to set attribute Finalize_Address of the
5865 access type's finalization master. Add a guard to prevent
5866 Associated_Storage_Pool from being set on .NET/JVM.
5867 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add code to set
5868 attribute Finalize_Address of the access type's finalization master.
5869 * exp_ch7.adb (Make_Finalize_Address_Call): New routine.
5870 * exp_ch7.ads (Make_Finalize_Address_Call): New routine.
5871 * rtsfind.ads: Add RE_Set_Finalize_Address to tables RE_Id and
5873 * s-finmas.adb: Add with clause for System.Address_Image. Add with and
5874 use clause for System.IO
5875 (Detach): Relax the assertion, to be reinstated later.
5876 (Finalize): Rewrite the iteration loop to avoid pointer comparison.
5877 Relax the assertion on Finalize_Address, to be reinstated later.
5878 (Is_Empty_List): New routine.
5879 (pm): New debug routine.
5880 (Set_Finalize_Address): New routine.
5881 * s-finmas.ads (pm): New debug routine.
5882 (Set_Finalize_Address): New routine.
5883 * s-stposu.adb (Allocate_Any_Controlled): Code reformatting.
5885 2011-08-29 Tristan Gingold <gingold@adacore.com>
5887 * a-exexpr-gcc.adb (GCC_Exception_Access, GNAT_GCC_Exception_Access):
5888 Remove convention C.
5890 2011-08-29 Tristan Gingold <gingold@adacore.com>
5892 * s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove.
5893 (Initialize_TCB): Remove Exc_Stack_Ptr initialization.
5894 (Finalize_TCB): Remove its finalization.
5895 (Initialize): Remove assignment of GET_Exc_Stack_Addr
5896 * s-soflin.adb (NT_Exc_Stack): Remove
5897 (Get_Exc_Stack_Addr_NT): Likewise.
5898 (Get_Exc_Stack_Addr_Soft): Likewise.
5899 * s-soflin.ads (Get_Exc_Stack_Addr_NT): Remove.
5900 (Get_Exc_Stack_Addr): Likewise.
5901 (Get_Exc_Stack_Addr_Soft): Likewise
5902 * s-taspri-vms.ads (Exc_Stack_T): Remove.
5903 (Exc_Stack_Ptr_T): Likewise.
5904 (Private_Data): Remove Exc_Stack_Ptr component.
5906 2011-08-29 Tristan Gingold <gingold@adacore.com>
5908 * raise-gcc.c (get_ip_from_context): New function. Factorize code.
5910 2011-08-29 Tristan Gingold <gingold@adacore.com>
5912 * gnat_ugn.texi: Fix aix and x86-solaris info for run-time.
5914 2011-08-29 Geert Bosch <bosch@adacore.com>
5916 * s-gearop.ads (Back_Substitute, Diagonal, Forward_Eliminate,
5917 L2_Norm, Swap_Column): New generic subprograms
5918 * s-gearop.adb (Back_Substitute, Diagonal, Forward_Eliminate,
5919 L2_Norm, Swap_Column): Implement new subprograms in order to
5920 eliminate dependency on BLAS and LAPACK libraries in
5921 Ada.Numerics.Generic_Real_Arrays and eventually also the complex
5922 version. Forward_Eliminate/Back_Substitute can be used to put a
5923 matrix in row echelon or reduced row echelon form using partial
5925 * a-ngrear.adb: (Back_Substitute, Diagonal, Forward_Eleminate,
5926 Swap_Column): Instantiate from System.Generic_Array_Operations.
5927 ("*", "abs"): Implement by instantiation from Generic_Array_Operations.
5928 (Sqrt): Local function for simple computation of square root without
5929 adding dependencies on Generic_Elementary_Functions.
5930 (Swap): New subprogram to exchange floating point numbers.
5931 (Inverse): Reimplement using Jordan-Gauss elimination.
5932 (Jacobi): New procedure implementing Jacobi's method for computation
5933 of eigensystems, based on Rutishauser's implementation.
5934 (L2_Norm): Implement directly using the inner product.
5935 (Sort_Eigensystem): Sort eigenvalue/eigenvector pairs in order of
5936 decreasing eigenvalue as required by the Ada RM.
5937 (Swap_Column): New helper procedure for Sort_Eigensystem.
5938 Remove with of System.Generic_Real_BLAS and System.Generic_Real_LAPACK.
5939 Add with of Ada.Containers.Generic_Anonymous_Array_Sort, for
5942 2011-08-29 Thomas Quinot <quinot@adacore.com>
5944 * put_scos.adb (Put_SCOs): Do not emit a newline for an empty
5947 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5949 * s-finmas.adb (Finalize): Check Finalize_Address of the master rather
5950 than the current node.
5951 * s-finmas.ads: Move field Finalize_Address from type FM_Node to
5952 Finalization_Master. The list headers have two fields instead of three.
5953 This should fix alignment issue but subpool allocations are now
5954 unusable. Alphabetize subprograms.
5955 * s-stposu.adb (Allocate_Any_Controlled): Use the offset rather than
5956 the size of the header when converting the beginning of the object to
5957 a FM_Node. Set the master's Finalize_Address attribute if not already
5959 (Deallocate_Any_Controlled): Use the offset rather than the size of the
5960 header when converting the beginning of the object to a FM_Node.
5962 2011-08-29 Gary Dismukes <dismukes@adacore.com>
5964 * exp_ch11.adb (Expand_N_Raise_Statement): Don't suppress expansion of
5965 reraise when compiling for CodePeer.
5967 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5969 * a-iteint.ads, Makefile.rtl: Add missing compilation of a-iteint.ads,
5970 now needed by a-convec.adb. Fix warning.
5972 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5974 * exp_util.adb (Build_Allocate_Deallocate_Proc): Add a guard for the
5975 processing of TSS routine Finalize_Address when compiling in
5978 2011-08-29 Thomas Quinot <quinot@adacore.com>
5980 * a-strunb.ads, einfo.ads, g-comlin.ads, sem_ch6.adb,
5981 sem_warn.adb: Minor reformatting.
5983 2011-08-29 Emmanuel Briot <briot@adacore.com>
5985 * prj-conf.adb (Get_Config_Switches): Also collect the list of
5986 languages from aggregated projects.
5988 2011-08-29 Yannick Moy <moy@adacore.com>
5990 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Declarations_Or_Statements,
5991 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
5992 Traverse_Package_Declaration, Traverse_Subprogram_Body,
5993 Traverse_Compilation_Unit): Add a parameter Inside_Stubs so that bodies
5994 for stubs are traversed too when parameter is set
5995 (Traverse_All_Compilation_Units): Traverse without going inside stubs
5996 (Traverse_Declarations_Or_Statements): Do the special traversing for
5997 stubs when required.
5998 * sem_util.adb, sem_util.ads (Get_Body_From_Stub): New function to
5999 return subprogram or package body from stub.
6000 (Is_Subprogram_Stub_Without_Prior_Declaration): New function to detect
6001 stubs without prior subprogram decl.
6003 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
6005 * gnat_ugn.texi: Fix typo.
6007 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
6009 * s-stposu.adb (Allocate_Any_Controlled): Reimplement the mechanism
6010 which accounts for size vs alignment issues and calculates the size of
6012 (Deallocate_Any_Controlled): Ditto.
6013 (Nearest_Multiple_Rounded_Up): New routine.
6015 2011-08-29 Tristan Gingold <gingold@adacore.com>
6017 * a-exstat.adb (String_To_EO): Do no set Cleanup_Flag.
6018 * a-exexda.adb (Set_Exception_C_Msg): Ditto.
6019 (Set_Exception_Msg): Ditto.
6020 * a-exexpr-gcc.adb (Setup_Current_Excep): Ditto. Do not set
6022 * a-except.adb, a-except-2005.adb (Save_Occurrence_No_Private): Remove.
6023 Use Save_Occurrence instead of Save_Occurrence_No_Private.
6024 (Raise_With_Msg): Remove Cleanup_Flag.
6025 * a-except.ads, a-except-2005.ads (Exception_Occurrence): Remove
6026 Clean_Flag and Private_Data components.
6028 2011-08-29 Yannick Moy <moy@adacore.com>
6030 * freeze.adb (Freeze_Record_Type): Ignore packing in Alfa mode, like
6032 * sem_ch3.adb (Signed_Integer_Type_Declaration): Correct the generation
6033 of an explicitly declared type, so that the base types of the original
6034 type and this generated type are the same, and a "type" (not a subtype
6036 * errout.adb (Special_Msg_Delete): Do not issue messages "Size too
6037 small" in Alfa mode, like in CodePeer mode.
6038 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore rep
6039 clauses in Alfa mode.
6041 2011-08-29 Javier Miranda <miranda@adacore.com>
6043 * exp_ch6.ads, exp_ch6.adb (Is_Null_Procedure): Move the spec of this
6044 function to the package spec.
6045 * sem_ch6.adb (Find_Corresponding_Spec, New_Overloaded_Entity): For
6046 internally generated bodies of null procedures locate the internally
6047 generated spec enforcing mode conformance.
6048 (Is_Interface_Conformant): Ensure that the controlling formal of the
6051 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6053 * sem_prag.adb (Analyze_Pragma, case Inline): In an instance, do not
6054 reject the pragma if it appears to apply to a formal subprogram.
6056 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6058 * exp_ch4.adb (Expand_Allocator_Expression): Use consistent name for
6059 inner expression, to prevent double evaluation.
6061 2011-08-29 Tristan Gingold <gingold@adacore.com>
6063 * a-exexpr.adb (Propagate_Exception): Remove all the parameters as
6065 * a-exexpr-gcc.adb (Propagate_Exception): Ditto.
6066 * a-except-2005.adb (Propagate_Exception): Adjust spec.
6067 (Raise_Current_Excep): Adjust call.
6068 (Raise_From_Signal_Handler): Call now simply call Raise_Current_Excep.
6070 2011-08-29 Thomas Quinot <quinot@adacore.com>
6072 * exp_disp.adb: Minor reformatting.
6074 2011-08-29 Tristan Gingold <gingold@adacore.com>
6076 * a-exexpr.adb (Setup_Exception): Removed.
6077 * a-exexpr-gcc.adb (Setup_Exception): Removed.
6078 * a-except.adb (Exception_Propagation): Removed.
6079 * a-except-2005.adb (Setup_Exception): Removed.
6080 (Reraise): Remove call to Setup_Exception.
6081 (Reraise_Occurrence): Ditto.
6082 (Reraise_Occurrence_Always): Ditto.
6083 (Reraise_Occurrence_No_Defer): Ditto.
6084 (Transfer_Occurrence): Ditto.
6085 * a-exexda.adb (Set_Exception_C_Msg): Remove call to Setup_Exception.
6086 (Set_Exception_Msg): Ditto.
6088 2011-08-29 Robert Dewar <dewar@adacore.com>
6090 * a-convec.adb, exp_disp.adb: Minor reformatting.
6092 2011-08-29 Tristan Gingold <gingold@adacore.com>
6094 * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C.
6096 2011-08-29 Gary Dismukes <dismukes@adacore.com>
6098 * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set
6099 Exception_Handlers to No_List instead of Empty_List in the case where
6100 there are no handlers.
6102 2011-08-29 Tristan Gingold <gingold@adacore.com>
6104 * gcc-interface/gigi.h (enum standard_datatypes): Add
6105 ADT_reraise_zcx_decl
6106 (reraise_zcx_decl): New macro.
6107 * gcc-interface/trans.c (gnu_incoming_exc_ptr): New variable.
6108 (gigi): Set reraise_zcx_decl.
6109 (Exception_Handler_to_gnu_zcx): Save and restore gnu_incoming_exc_ptr.
6110 (gnat_to_gnu): Handle N_Raise_Statement.
6112 2011-08-29 Robert Dewar <dewar@adacore.com>
6114 * sem_ch6.adb, exp_ch3.adb, s-stposu.adb, a-undesu.ads,
6115 a-undesu.adb: Minor reformatting.
6117 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6119 * exp_disp.adb (Check_Premature_Freezing): When building a dispatch
6120 table, accept an unfrozen untagged component if it is an actual for a
6121 formal incomplete type.
6122 * a-convec.ads, a-convec.adb: Instantiate Ada.Iterator_Interfaces to
6123 provide new iterator forms over vectors.
6124 Introduce type Iterator in package body to implement operations of
6125 Reversible_Iterator interface.
6126 * a-iteint.ads: Make package pure so it is usable with new container
6127 packages, that are categorized Remote_Types.
6129 2011-08-29 Robert Dewar <dewar@adacore.com>
6131 * a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting.
6133 2011-08-29 Bob Duff <duff@adacore.com>
6135 * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case
6136 of <>, because this is the routine that checks for dimensionality
6137 errors (for example, for a two-dimensional array, (others => <>) should
6138 be (others => (others => <>)).
6140 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
6142 * impunit.adb: Add new run-time units.
6143 * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb,
6144 s-stposu.ads, s-stposu.adb: Code clean up.
6145 Handle protected class-wide or task class-wide types
6146 Handle C/C++/CIL/Java types.
6147 * s-spsufi.adb, s-spsufi.ads: New files.
6149 2011-08-29 Yannick Moy <moy@adacore.com>
6151 * sem_ch13.adb (Analyze_Aspect_Specifications): Reject test-case on
6152 library-level subprogram.
6153 * sem_prag.adb (Check_Test_Case): Stricter rules for test-case
6155 (Analyze_Pragma): Change name "Normal" for "Nominal" in test-case
6157 * snames.ads-tmpl: Change name "Normal" for "Nominal" in test-case
6159 * gnat_rm.texi: Update doc for Test_Case pragma.
6161 2011-08-29 Tristan Gingold <gingold@adacore.com>
6163 * a-exexpr-gcc.adb (Unwind_Exception): Remove default value, made it
6165 (GCC_Exception_Access): New type.
6166 (Unwind_DeleteException): New imported procedure
6167 (Foreign_Exception): Import it.
6168 (GNAT_GCC_Exception): Simply have the occurrence inside.
6169 (To_GCC_Exception): New function.
6170 (To_GNAT_GCC_Exception): New function.
6171 (GNAT_GCC_Exception_Cleanup): New procedure..
6172 (Propagate_GCC_Exception): New procedure.
6173 (Reraise_GCC_Exception): New procedure.
6174 (Setup_Current_Excep): New procedure.
6175 (CleanupUnwind_Handler): Change type of UW_Exception parameter.
6176 (Unwind_RaiseException): Ditto.
6177 (Unwind_ForcedUnwind): Ditto.
6179 (Begin_Handler): Change type of parameter.
6180 (End_Handler): Ditto. Now delete the exception if still present.
6181 (Setup_Key): Removed.
6182 (Is_Setup_And_Not_Propagated): Removed.
6183 (Set_Setup_And_Not_Propagated): Ditto.
6184 (Clear_Setup_And_Not_Propagated): Ditto.
6185 (Save_Occurrence_And_Private): Ditto.
6186 (EID_For): Add 'not null' constraint on parameter.
6187 (Setup_Exception): Does nothing.
6188 (Propagate_Exception): Simplified.
6189 * exp_ch11.adb (Expand_N_Raise_Statement): In back-end exception model,
6190 re-raise is not expanded anymore.
6191 * s-except.ads (Foreign_Exception): New exception - placeholder for
6193 * raise-gcc.c (__gnat_setup_current_excep): Declare
6194 (CXX_EXCEPTION_CLASS): Define (not yet used)
6195 (GNAT_EXCEPTION_CLASS): Define.
6196 (is_handled_by): Handle foreign exceptions.
6197 (PERSONALITY_FUNCTION): Call __gnat_setup_current_excep.
6199 2011-08-29 Jose Ruiz <ruiz@adacore.com>
6201 * a-synbar.adb (Synchronous_Barrier): Some additional clarification.
6203 2011-08-29 Thomas Quinot <quinot@adacore.com>
6205 * a-synbar-posix.adb: Minor reformatting.
6207 2011-08-29 Jose Ruiz <ruiz@adacore.com>
6209 * a-exetim-posix.adb, a-exetim-mingw.adb, a-exetim-mingw.ads,
6210 a-exetim-default.ads (Interrupt_Clocks_Supported,
6211 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
6212 definitions to be compliant with AI-0171. The target systems do not
6213 support separate account for the execution time of interrupt handlers.
6215 2011-08-29 Jose Ruiz <ruiz@adacore.com>
6217 * a-synbar.adb (Wait): Change the order of evaluation of the conditions
6218 in the barrier to put first the easiest to evaluate (and the one which
6219 will be True more often). More efficient.
6221 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
6223 * s-atocou-x86.adb: Fix constraint in machine code insertion.
6225 2011-08-29 Bob Duff <duff@adacore.com>
6227 * aspects.ads, aspects.adb: Add new aspects for various pragmas and
6228 attributes that are now aspects, as specified by AI05-0229-1.
6229 * sem_ch13.adb (Analyze_Aspect_Specifications,
6230 Check_Aspect_At_Freeze_Point): Analyze the new aspects. Turn them into
6231 pragmas or attribute references, as appropriate.
6233 2011-08-29 Robert Dewar <dewar@adacore.com>
6235 * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
6236 a-synbar-posix.ads: Minor reformatting.
6238 2011-08-29 Yannick Moy <moy@adacore.com>
6240 * snames.ads-tmpl: Add name Force.
6242 2011-08-29 Pascal Obry <obry@adacore.com>
6244 * prj-nmsc.adb: Minor reformatting.
6246 2011-08-29 Jose Ruiz <ruiz@adacore.com>
6248 * a-exetim.ads (Interrupt_Clocks_Supported,
6249 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
6250 definitions to be compliant with AI-0171.
6252 2011-08-29 Robert Dewar <dewar@adacore.com>
6254 * a-ngelfu.adb: Add comments.
6256 2011-08-29 Geert Bosch <bosch@adacore.com>
6258 * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
6259 the closest machine number to Pi / 2.0.
6261 2011-08-29 Jose Ruiz <ruiz@adacore.com>
6263 * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
6264 package Ada.Synchronous_Barriers.
6265 * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
6266 Add new specs and bodies for Ada.Synchronous_Barriers. There is a
6267 default implementation using protected objects and another one
6268 a-synbar-posix using POSIX barriers as the underlying support.
6269 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
6270 x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
6271 Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
6272 Clean up dependencies.
6273 * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
6275 2011-08-29 Robert Dewar <dewar@adacore.com>
6277 * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
6278 exp_dist.adb: Minor code reorganization.
6281 2011-08-29 Thomas Quinot <quinot@adacore.com>
6283 * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
6284 primitive operation must support external streaming if it is not a
6285 controlling access result.
6287 2011-08-29 Thomas Quinot <quinot@adacore.com>
6289 * sinfo.ads, sem_ch7.adb: Minor reformatting.
6291 2011-08-29 Bob Duff <duff@adacore.com>
6293 * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
6294 restriction on allocators, as required by AI05-0013-1.
6295 * restrict.ads: Minor comment fix.
6297 2011-08-29 Tristan Gingold <gingold@adacore.com>
6299 * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
6300 (To_Jmpbuf_Address): Ditto
6301 (builtin_longjmp): Ditto
6303 2011-08-29 Thomas Quinot <quinot@adacore.com>
6305 * sem_res.adb: Minor reformatting.
6307 2011-08-29 Vincent Celier <celier@adacore.com>
6309 * make.adb (Gnatmake): Move special processing for VM targets after the
6310 call to Get_Target_Parameters.
6312 2011-08-29 Thomas Quinot <quinot@adacore.com>
6314 * sem_ch12.adb, par-ch12.adb: Minor reformatting.
6316 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
6318 * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
6319 where an anonymous access discriminant of a limited designated type
6320 appears in a non-immutably limited discriminated type and issue an
6321 error message. Add local variable Desig_T and replace all occurrences
6324 2011-08-29 Jose Ruiz <ruiz@adacore.com>
6326 * a-rttiev.adb (Set_Handler): Update comment to indicate that our
6327 implementation is compliant to RM D.15(15/2) after the modification
6328 imposed by AI05-0094-1 (binding interpretation).
6330 2011-08-29 Robert Dewar <dewar@adacore.com>
6332 * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
6333 s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
6335 2011-08-29 Thomas Quinot <quinot@adacore.com>
6337 * par-endh.adb (Check_End): For an END where it is mandatory to repeat
6338 the scope name, do not report a missing label as a style violation (it
6339 will be diagnosed as an illegality).
6340 * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
6341 variant records: Get_Enum_Lit_From_Pos already returns a usage
6342 occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
6343 on Expr in Integer_Literal case so that it can be used by
6346 2011-08-29 Tristan Gingold <gingold@adacore.com>
6348 * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
6350 * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
6351 (Build_Abort_Block_Handler): New function to build an Abort_Signal
6353 * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
6354 Build_Abort_Block_Handler to build the exception handler. Do not
6355 undefer aborts for the Abort_Signal exception handler if back-end
6356 exception mechanism.
6357 * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
6358 back_end exceptions for all others and abort_signal.
6359 * s-except.ads (ZCX_By_Default): New constant.
6360 * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
6361 (Raise_Exception_Always): Ditto.
6362 (Raise_From_Signal_Handler): Ditto.
6363 (Raise_With_Location_And_Msg): Ditto.
6364 (Raise_With_Msg): Ditto.
6366 (Reraise_Occurence): Ditto.
6367 (Reraise_Occurrence_Always): Ditto.
6368 * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
6369 * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
6371 2011-08-29 Thomas Quinot <quinot@adacore.com>
6373 * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
6375 2011-08-29 Robert Dewar <dewar@adacore.com>
6377 * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
6378 Minor code reorganization.
6380 2011-08-29 Bob Duff <duff@adacore.com>
6382 * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
6383 2012, not just Ada 2005.
6385 2011-08-29 Vincent Celier <celier@adacore.com>
6387 * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
6388 with a project file or with gprbuid, if -gnatep= is specified, the
6389 builder may need to be invoked with -x.
6391 2011-08-29 Tristan Gingold <gingold@adacore.com>
6393 * a-exexpr-gcc.adb: Minor comment fix.
6395 2011-08-29 Robert Dewar <dewar@adacore.com>
6397 * sem_ch8.adb: Minor reformatting.
6399 2011-08-29 Bob Duff <duff@adacore.com>
6401 * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
6402 * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
6403 treating "some" as unreserved in earlier Ada versions. This is now
6404 handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
6405 rather than Name_Some, since Tok_Some is now recognized as reserved.
6406 * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
6408 * scans.ads: Minor comment fixes.
6409 * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
6410 for other language versions.
6411 * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
6412 treating "some" as unreserved in earlier Ada versions. This is now
6413 handled in Snames.Is_Keyword_Name.
6414 * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
6416 (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
6417 unreserved in earlier Ada versions. This is now handled in
6418 Snames.Is_Keyword_Name.
6419 * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
6420 words as for other language versions.
6421 * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
6422 Ada 2012, not just Ada 2005.
6424 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6426 * sem_ch13.adb: Additional semantic checks for aspects involved in
6429 2011-08-29 Matthew Heaney <heaney@adacore.com>
6431 * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
6432 a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
6433 Container parameter.
6434 (Ancestor_Find): ditto.
6436 2011-08-29 Thomas Quinot <quinot@adacore.com>
6438 * par-endh.adb: Minor reformatting.
6440 2011-08-29 Tristan Gingold <gingold@adacore.com>
6442 * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
6443 (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
6444 (Adjust_N_CLeanups_For): Remove.
6445 (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
6447 (Propgate_Exception): Adjust.
6448 * raise-gcc.c: Add a few static/const.
6449 (Adjust_N_Cleanups_For): Remove declaration.
6450 (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
6452 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6454 * sem_ch8.adb: Use type of function return when rewriting as object
6457 2011-08-29 Gary Dismukes <dismukes@adacore.com>
6459 * sem_type.adb: Minor reformatting.
6461 2011-08-29 Robert Dewar <dewar@adacore.com>
6463 * makeutl.adb: Minor reformatting.
6465 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6467 * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
6468 function call of a limited type, the expansion of the renaming is
6469 complicated by the presence of various temporaries and subtypes that
6470 capture constraints of the renamed object.
6471 Rewrite node as an object declaration, whose expansion is simpler.
6472 Given that the object is limited there is no copy involved and no
6475 2011-08-29 Robert Dewar <dewar@adacore.com>
6477 * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
6478 freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
6480 2011-08-29 Tristan Gingold <gingold@adacore.com>
6482 * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
6483 system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
6484 system-linux-hppa.ads, system-linux-s390.ads,
6485 system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
6486 system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
6487 system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
6488 system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
6489 system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
6490 system-solaris-sparc.ads, system-lynxos-x86.ads,
6491 system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
6492 system-solaris-x86_64.ads, system-mingw-x86_64.ads,
6493 system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
6494 system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
6495 system-vxworks-x86.ads: Remove GCC_ZCX_Support.
6496 * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
6497 s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
6498 * opt.ads: Adjust comment.
6499 * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
6500 * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
6501 * system.ads: Move GCC_ZCX_Support to obsolete entries.
6503 2011-08-29 Emmanuel Briot <briot@adacore.com>
6505 * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
6506 file name is specified on the gnatmake or gprbuild command line, and
6507 before we search for that file in the project.
6509 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6511 * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
6512 used to determine whether a possible interpretation for an overloadable
6513 entity is declared within the current instantiation and should be
6514 included in the candidate set.
6516 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
6518 * gnat_rm.texi, gnat_ugn.texi: Clean ups.
6520 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6522 * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
6523 access subtype is access_to_subprogram, when applying checks for
6526 2011-08-29 Matthew Heaney <heaney@adacore.com>
6528 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
6529 for sibling when common parent.
6531 2011-08-29 Thomas Quinot <quinot@adacore.com>
6533 * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
6536 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6538 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
6539 for the return type when in ASIS mode.
6541 2011-08-29 Vincent Celier <celier@adacore.com>
6543 * make.adb (Gnatmake): Get the default search dirs, then the target
6544 parameters after getting the Builder switches, as the Builder switches
6545 may include --RTS= and that could change the default search dirs.
6547 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
6549 * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
6550 Make_Final_Call. Move the processing for class-wide types before the
6551 processing for derivations from [Limited_]Controlled.
6552 (Make_Final_Call): Move the processing for class-wide types before the
6553 processing for derivations from [Limited_]Controlled.
6554 * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
6555 Add code to account for alignments larger than the list header. Add a
6556 comment illustrating the structure of the allocated object + padding +
6558 (Deallocate_Any_Controlled): Add code to account for alignments larger
6559 than the list header.
6561 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6563 * sinfo.ads, sinfo.adb: New node kind
6564 N_Formal_Incomplete_Type_Definition, related flags.
6565 par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
6566 Parse formal incomplete types.
6567 * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
6569 * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
6570 Formal incomplete types do not need completion.
6571 * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
6572 Validate_Incomplete_Type_Instance): New procedures to handle formal
6574 * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
6575 that corresponds to a formal incomplete type.
6576 * sprint.adb: Handle formal incomplete type declarations.
6577 * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
6580 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
6582 * a-fihema.ads, a-fihema.adb: Unit removed.
6583 * a-undesu.ads, a-undesu.adb: New unit implementing
6584 Ada.Unchecked_Deallocate_Subpool.
6585 * einfo.adb: Remove Associated_Collection from the node usage.
6586 Add Finalization_Master to the node usage.
6587 (Associated_Collection): Removed.
6588 (Finalization_Master): New routine.
6589 (Set_Associated_Collection): Removed.
6590 (Set_Finalization_Master): New routine.
6591 (Write_Field23_Name): Remove Associated_Collection from the output. Add
6592 Finalization_Master to the output.
6593 * einfo.ads: Remove attribute Associated_Collection and its uses in
6595 Add new attribute Finalization_Master along with its uses in entitites.
6596 (Associated_Collection): Removed along with its pragma import.
6597 (Finalization_Master): New routine along with a pragma import.
6598 (Set_Associated_Collection): Removed along with its pragma import.
6599 (Set_Finalization_Master): New routine along with a pragma import.
6600 * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
6601 Build_Finalization_Collection with Build_Finalization_Master.
6602 (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
6603 before the bodies of the predefined routines. Add comment explaining
6604 this. Replace call to Build_Finalization_Collection with
6605 Build_Finalization_Master.
6606 (Freeze_Type): Replace call to Build_Finalization_Collection with
6607 Build_Finalization_Master.
6608 (Make_Finalize_Address_Body): Comment reformatting.
6609 (Make_Predefined_Primitive_Specs): Code reformatting.
6610 (Stream_Operation_OK): Update comment mentioning finalization
6611 collections. Replace RE_Finalization_Collection with
6612 RE_Finalization_Master.
6613 * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
6614 Associated_Collection with Finalization_Master. Replace call to
6615 Build_Finalization_Collection with Build_Finalization_Master.
6616 (Expand_Allocator_Expression): Replace call to Associated_Collection
6617 with Finalization_Master. Replace call to Set_Associated_Collection with
6618 Set_Finalization_Master. Remove the generation of
6619 Set_Finalize_Address_Ptr.
6620 (Expand_N_Allocator): Replace call to Associated_Collection with
6621 Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
6622 * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
6623 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
6624 comment on usage. Replace call to Needs_BIP_Collection with
6625 Needs_BIP_Finalization_Master Remplace BIP_Collection with
6626 BIP_Finalization_Master. Update all comments which mention finalization
6627 collections. Replace Associated_Collection with
6628 Finalization_Master. Replace Build_Finalization_Collection with
6629 Build_Finalization_Master.
6630 (BIP_Formal_Suffix): Update BIP_Collection's case.
6631 (Build_Heap_Allocator): Update the related comment. Rename local
6632 variable Collect to Fin_Mas_Id and update its occurrences. Update
6633 comments which mention finalization collections. Replace
6634 Set_Associated_Collection with Set_Finalization_Master.
6635 (Expand_Call): Update the code which detects a special piece of library
6637 (Make_Build_In_Place_Call_In_Allocator): Replace the call to
6638 Add_Collection_Actual_To_Build_In_Place_Call with
6639 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
6640 which generates a call to Make_Set_Finalize_Address_Ptr_Call.
6641 (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
6642 Add_Collection_Actual_To_Build_In_Place_Call with
6643 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
6644 (Make_Build_In_Place_Call_In_Assignment): Replace call to
6645 Add_Collection_Actual_To_Build_In_Place_Call with
6646 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
6647 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
6648 * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
6649 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
6650 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
6651 Rename local variable Collect to Fin_Mas_Id and update its occurrences.
6652 Replace call to Set_Associated_Collection with Set_Finalization_Master.
6653 (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
6654 Replace the call to Associated_Collection with Finalization_Master.
6655 Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
6656 Update the way finalization master names are generated. Update the
6657 retrieval of the correct access type which will carry the pool and
6659 (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
6660 (Make_Finalize_Address_Body): Abstract types do not need
6661 Finalize_Address. Code reformatting.
6662 (Make_Finalize_Address_Stmts): Update comment on usage.
6663 (Make_Set_Finalize_Address_Ptr_Call): Removed.
6664 (Process_Declarations): Update comments.
6665 * exp_ch7.ads (Build_Finalization_Collection): Renamed to
6666 Build_Finalization_Master. Update associated comment.
6667 (Make_Set_Finalize_Address_Ptr_Call): Removed.
6668 * exp_ch13.adb: Update comments which mention finalization collections.
6669 (Expand_N_Free_Statement): Replace the call to Associated_Collection
6670 with Finalization_Master.
6671 * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
6672 create calls to routines Allocate_Any_Controlled and
6673 Deallocate_Any_Controlled.
6674 (Find_Finalize_Address): New routine.
6675 (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
6677 (Requires_Cleanup_Actions): Update the comment on freeze node
6679 * exp_util.ads: Remove comment on generated code for
6680 Build_Allocate_Deallocate_Proc. The code is now quite complex and it
6681 is better to simply look in the body.
6682 * freeze.adb (Freeze_All): Update the comment of finalization
6683 collections. Replace the call to Associated_Collection with
6684 Finalization_Master. Replace the call to Build_Finalization_Collection
6685 with Build_Finalization_Master.
6686 * impunit.adb: Add a-undesu and s-stposu to the list of units.
6687 * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
6689 * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
6690 Ada.Finalization. Add processing for children of System.Storage_Pools.
6691 * rtsfind.ads: Remove the naming of second level children of
6693 Remove Ada_Finalization_Heap_Management from the list of units.
6694 Remove subtype Ada_Finalization_Child.
6695 Remove the following subprogram entities:
6699 RE_Finalization_Collection
6700 RE_Finalization_Collection_Ptr
6701 RE_Set_Finalize_Address_Ptr
6703 Add the naming of second level children of System.Storage_Pools.
6704 Add System_Finalization_Masters and System_Storage_Pools_Subpools to
6706 Add subtype System_Storage_Pools_Child.
6707 Add the following subprogram entities to System.Finalization_Masters:
6709 RE_Finalization_Master
6710 RE_Finalization_Master_Ptr
6712 Add the following subprogram entities to System.Storage_Pools.Subpools:
6714 RE_Allocate_Any_Controlled
6715 RE_Deallocate_Any_Controlled
6716 RE_Root_Storage_Pool_With_Subpools
6720 Move the following subprogram entities from
6721 Ada.Finalization.Heap_Management to System.Finalization_Masters:
6723 RE_Add_Offset_To_Address
6728 * sem_ch3.adb (Access_Type_Declaration): Replace the call to
6729 Set_Associated_Collection with Set_Finalization_Master.
6730 * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
6731 BIP_Finalization_Master is created.
6732 * s-finmas.adb: New unit System.Finalization_Masters.
6733 * s-finmas.ads: New unit System.Finalization_Masters.
6734 * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
6735 * s-stposu.ads, s-stposu.adb: New unit implementing
6736 System.Storage_Pools.Subpools.
6738 2011-08-29 Bob Duff <duff@adacore.com>
6740 * tbuild.adb: Add assertion.
6742 2011-08-29 Thomas Quinot <quinot@adacore.com>
6744 * s-pooglo.adb: Minor reformatting.
6746 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6748 * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
6749 an indexed component of a packed array whose element type is a record
6750 with a representation clause different from that of the right-hand
6751 side, generate a temporary to minimuze the number of bit-field
6752 operations generated.
6754 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6756 * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
6757 declarations, and thus are likely insertion points for actions.
6759 2011-08-29 Bob Duff <duff@adacore.com>
6761 * einfo.ads: Minor comment fix.
6763 2011-08-29 Robert Dewar <dewar@adacore.com>
6765 * frontend.adb, gnat1drv.adb: Minor reformatting.
6767 2011-08-29 Tristan Gingold <gingold@adacore.com>
6769 * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
6770 * a-fihema.adb (Allocate, Deallocate): Ditto. Possibly add padding
6771 space in front of the header.
6773 2011-08-29 Johannes Kanig <kanig@adacore.com>
6775 * frontend.adb (Frontend): Exit after creating Standard package when
6776 -gnatd.H is present.
6777 * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
6780 2011-08-29 Robert Dewar <dewar@adacore.com>
6782 * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
6783 makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
6784 snames.ads-tmpl: Minor reformatting.
6786 2011-08-29 Philippe Gil <gil@adacore.com>
6788 * prj.adb (Reset_Units_In_Table): New procedure.
6789 Reset units to avoid access to freed memory.
6791 2011-08-29 Thomas Quinot <quinot@adacore.com>
6793 * get_scos.adb: When reading a P statement SCO without a pragma name
6794 (from an older ALI file), ensure that the Pragma_Name component is set
6795 to Unknown_Pragma (not left uninitialized).
6797 2011-08-29 Vincent Celier <celier@adacore.com>
6799 * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
6800 modified to compute correctly the object path of a SAL project that is
6801 extending another library project.
6802 (Write_Path_File): New procedure.
6803 * makeutl.ads (Directories): New table moved from Buildgpr
6804 (Get_Directories): New procedure moved from Buildgpr
6805 (Write_Path_File): New procedure
6806 * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
6807 paths before binding SALs, instead of Set_Ada_Paths.
6808 * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
6810 * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
6811 (Current_Source_Path_File_Of): New function
6812 (Set_Current_Object_Path_File_Of): New procedure
6813 (Current_Source_Object_File_Of): New function
6814 (Set_Current_Object_Path_File_Of): New procedure
6815 * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
6816 (Current_Source_Path_File_Of): New function
6817 (Set_Current_Object_Path_File_Of): New procedure
6818 (Current_Source_Object_File_Of): New function
6819 (Set_Current_Object_Path_File_Of): New procedure
6821 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6823 * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
6824 packed entity, use a bit-field assignment only if there is no change of
6827 2011-08-29 Thomas Quinot <quinot@adacore.com>
6829 * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
6830 Is_RTU instead of using Chars comparisons.
6832 2011-08-29 Thomas Quinot <quinot@adacore.com>
6834 * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
6835 temporary object if the actual is constrained, and the discriminants
6836 read from the stream don't match.
6838 2011-08-29 Tristan Gingold <gingold@adacore.com>
6840 * sem_attr.adb, exp_attr.adb: Add handling of
6841 Attribute_System_Allocator_Alignment
6842 * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
6843 Attribute_System_Allocator_Alignment.
6844 * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
6845 * gcc-interface/targtyps.c, gcc-interface/utils2.c,
6846 gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
6847 get_target_system_allocator_alignment.
6849 2011-08-29 Arnaud Charlet <charlet@adacore.com>
6851 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
6854 2011-08-29 Arnaud Charlet <charlet@adacore.com>
6856 * exp_ch3.adb (In_Runtime): Fix typo.
6858 2011-08-29 Bob Duff <duff@adacore.com>
6860 * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
6862 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6864 * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
6865 and a separate tag assignment is generated, ensure that the tag
6866 assignment is analyzed.
6868 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6870 * atree.ads, atree.adb (Copy_Separate_List): New function that applies
6871 Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
6872 of statement lists that may contain local declarations.
6873 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
6874 duplicate the triggering statements needed for the expansion of this
6875 construct, when the trigger is a dispatching call to a synchronized
6878 2011-08-29 Arnaud Charlet <charlet@adacore.com>
6880 * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
6881 * bindgen.adb: Add comments.
6882 * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
6885 2011-08-29 Robert Dewar <dewar@adacore.com>
6887 * exp_attr.adb: Minor reformatting.
6888 Minor code reorganization and commenting.
6889 * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
6892 2011-08-29 Thomas Quinot <quinot@adacore.com>
6894 * get_scos.adb: Ignore chaining indicators not currently supported
6897 2011-08-29 Arnaud Charlet <charlet@adacore.com>
6899 * system.ads: Minor editing.
6901 2011-08-29 Arnaud Charlet <charlet@adacore.com>
6903 * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
6905 * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
6906 Attribute_Elab_Subp_Body.
6907 * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
6908 * sem_util.adb: Update comments.
6910 2011-08-29 Thomas Quinot <quinot@adacore.com>
6912 * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
6913 pragma name for each SCO statement corresponding to a pragma.
6915 2011-08-29 Arnaud Charlet <charlet@adacore.com>
6917 * opt.ads: Minor editing.
6919 2011-08-29 Yannick Moy <moy@adacore.com>
6921 * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
6922 that only made sense for CodePeer mode.
6924 2011-08-29 Jose Ruiz <ruiz@adacore.com>
6926 * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
6927 which is no longer used.
6928 * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
6929 handling of the 64-bit division check.
6930 * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
6932 * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
6935 2011-08-29 Thomas Quinot <quinot@adacore.com>
6937 * get_scos.adb: Minor reformatting.
6939 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
6941 * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
6942 statement list is wrapped in a block, the block is explicitly analyzed
6943 in order to properly redecorate the entities and create a servicing
6946 2011-08-29 Tristan Gingold <gingold@adacore.com>
6948 * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
6949 (Set_Zero_Cost_Handling): Remove.
6951 2011-08-29 Thomas Quinot <quinot@adacore.com>
6953 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
6955 2011-08-29 Geert Bosch <bosch@adacore.com>
6957 * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
6958 instruction, as the latter may produce -0.0, which is not a valid VAX
6960 (Neg_G): Likewise for VAX F float.
6962 2011-08-29 Robert Dewar <dewar@adacore.com>
6964 * exp_util.adb: Minor reformatting.
6966 2011-08-29 Yannick Moy <moy@adacore.com>
6968 * sem_ch3.adb: Minor comment update.
6970 2011-08-29 Thomas Quinot <quinot@adacore.com>
6972 * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
6975 2011-08-29 Thomas Quinot <quinot@adacore.com>
6977 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
6978 current statement sequence on a generic instantiation or a subprogram
6981 2011-08-29 Robert Dewar <dewar@adacore.com>
6983 * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
6986 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
6988 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
6989 Correct the check which involves the freeze node of a controlled or
6990 access-to-controlled type.
6992 2011-08-29 Geert Bosch <bosch@adacore.com>
6994 * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
6996 * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
6999 2011-08-29 Yannick Moy <moy@adacore.com>
7001 * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
7002 for every index type and component type that is not a subtype_mark.
7003 (Process_Subtype): Set Etype of subtype.
7005 2011-08-29 Robert Dewar <dewar@adacore.com>
7007 * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
7008 reorganization. Minor reformatting.
7010 2011-08-29 Steve Baird <baird@adacore.com>
7012 * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
7013 for CodePeer and ALFA modes.
7015 2011-08-29 Ed Schonberg <schonberg@adacore.com>
7017 * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
7018 that comes from an enclosing scope if it is not the renaming of an
7019 actual, to handle properly a spurious ambiguity in an instance.
7021 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
7023 * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
7024 (Alignment_Check_For_Size_Change): ...this. Add SIZE parameter and
7025 use it instead of the Esize of the first parameter.
7026 (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
7028 <Size>: Likewise. Call it for composite types on the RM size.
7030 2011-08-29 Yannick Moy <moy@adacore.com>
7032 * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
7033 * sem_util.adb (Unique_Name): Correct behaviour for names of
7036 2011-08-29 Yannick Moy <moy@adacore.com>
7038 * sem_prag.adb (Check_Precondition_Postcondition): In formal
7039 verification mode, analyze pragma expression for correctness, for
7040 pre/post on library-level subprogram, as it is not expanded later.
7042 2011-08-29 Yannick Moy <moy@adacore.com>
7044 * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
7045 in formal verification.
7047 2011-08-29 Thomas Quinot <quinot@adacore.com>
7049 * sem_util.adb: Minor reformatting.
7050 * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
7052 * par_sco.ads, par_sco.adb: Update comments.
7054 2011-08-29 Yannick Moy <moy@adacore.com>
7056 * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
7057 associated getter/setter.
7058 * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
7060 2011-08-29 Vincent Celier <celier@adacore.com>
7062 * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
7063 * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
7064 with declarations for Language_Kind and Dependency_Kind for Ada.
7065 * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
7066 (Process_Compiler): Take into account the new attributes Dependency_Kind
7068 (Check_Configuration): Check if language kind is unit based, not if the
7069 language name is Ada.
7070 (Process_Exceptions_Unit_Based): Ditto
7071 (Add_Language): Remove default additions of language and dependency kind
7072 * prj.ads: Minor comment change
7073 * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
7075 2011-08-29 Johannes Kanig <kanig@adacore.com>
7077 * debug.adb: Update comments.
7079 2011-08-24 Joseph Myers <joseph@codesourcery.com>
7081 * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
7082 (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
7083 (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
7084 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
7085 (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
7087 2011-08-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7089 * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
7090 (GNATLIBCFLAGS_FOR_C): Replace
7091 TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
7092 (gnatlib-shared-default, gnatlib-shared-dual-win32)
7093 (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
7094 (gnatlib-sjlj, gnatlib-zcx): Likewise.
7096 2011-08-07 Eric Botcazou <ebotcazou@adacore.com>
7098 * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
7100 * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
7102 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
7104 2011-08-05 Nicolas Roche <roche@adacore.com>
7106 * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
7107 libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
7109 * gcc-interface/Make-lang.in: Add support for canadian cross setting.
7111 2011-08-05 Matthew Heaney <heaney@adacore.com>
7113 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
7114 subprogram bodies declared out-of-order.
7116 2011-08-05 Yannick Moy <moy@adacore.com>
7118 * sem_util.adb (Unique_Name): only prefix with "standard" the names of
7119 entities directly in package Standard, otherwise skip the standard
7122 2011-08-05 Robert Dewar <dewar@adacore.com>
7124 * a-cbmutr.adb: Minor reformatting
7125 (Allocate_Node): refactor node allocation algorithm
7127 2011-08-05 Robert Dewar <dewar@adacore.com>
7129 * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
7130 * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
7132 (Analyze_Pragma, case Check_Policy): Ditto.
7133 * sem_prag.ads (Check_Disabled): New function
7134 * snames.ads-tmpl: Add Name_Disable.
7136 2011-08-05 Robert Dewar <dewar@adacore.com>
7138 * gnat_rm.texi: Document implementation-defined policy DISABLE for
7139 pragmas Assertion_Policy, Check_Policy, Debug_Policy.
7141 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7143 * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
7144 that appears in a generic formal part and applies to a formal
7147 2011-08-05 Robert Dewar <dewar@adacore.com>
7149 * a-cbmutr.ads: Minor reformatting.
7151 2011-08-05 Matthew Heaney <heaney@adacore.com>
7153 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
7154 to check count, check sign of value instead.
7155 * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
7156 (Copy_Subtree): allocate copy of source element
7157 (Equal_Subtree): compare elements, not access objects
7159 2011-08-05 Vincent Celier <celier@adacore.com>
7161 * gnat_ugn.texi: Fix VMS alternative.
7163 2011-08-05 Thomas Quinot <quinot@adacore.com>
7165 * sem_ch11.adb: Add comment.
7167 2011-08-05 Robert Dewar <dewar@adacore.com>
7169 * exp_util.adb: Minor comment fix.
7171 2011-08-05 Robert Dewar <dewar@adacore.com>
7173 * scng.adb (Error_Unterminated_String): Improve flag position when
7176 2011-08-05 Matthew Heaney <heaney@adacore.com>
7178 * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
7180 * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
7181 multiway tree containers.
7183 2011-08-05 Robert Dewar <dewar@adacore.com>
7185 * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
7186 * stylesw.adb: Implement -gnatyC to control comment spacing
7187 * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
7189 * usage.adb: Add line for -gnatyC.
7191 2011-08-05 Robert Dewar <dewar@adacore.com>
7193 * gnat_ugn.texi: Document -gnatyC.
7194 * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
7195 synonym for COMMENTS2).
7197 2011-08-05 Robert Dewar <dewar@adacore.com>
7199 * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
7200 a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
7201 sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
7202 a-comutr.ads, lib-xref.adb: Minor reformatting.
7204 2011-08-05 Robert Dewar <dewar@adacore.com>
7206 * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
7207 warning if there is an exception handler present.
7209 2011-08-05 Pascal Obry <obry@adacore.com>
7211 * a-iteint.ads: Fix copyright year.
7213 2011-08-05 Thomas Quinot <quinot@adacore.com>
7215 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
7216 statement SCO for a USE clause or a representation clause.
7218 2011-08-05 Yannick Moy <moy@adacore.com>
7220 * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
7221 between body and spec for stub.
7222 (Detect_And_Add_ALFA_Scope): take into account subprogram stub
7223 * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
7224 pragma precondition or postcondition, for which the enclosing
7225 subprogram or package in the AST is not the desired one, return empty.
7227 2011-08-05 Thomas Quinot <quinot@adacore.com>
7229 * g-expect.adb: Minor reformatting.
7231 2011-08-05 Bob Duff <duff@adacore.com>
7233 * a-fihema.adb: Comment out OS_Lib.
7235 2011-08-05 Matthew Heaney <heaney@adacore.com>
7237 * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
7238 (unbounded multiway tree containers) and a-iteint.ads.
7239 * a-comutr.ads, a-comutr.adb:
7240 This is the new Ada 2012 unit for unbounded multiway tree containers
7241 * a-cimutr.ads, a-cimutr.adb
7242 This is the new Ada 2012 unit for indefinite multiway tree containers
7243 * a-iteint.ads: New file.
7245 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7247 * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
7249 2011-08-05 Bob Duff <duff@adacore.com>
7251 * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
7253 * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
7255 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7257 * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
7258 general indexing aspects of Ada2012. Called when analyzing indexed
7259 components when other interpretations fail.
7260 * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
7261 in an expression context where overloading is meaningful. This excludes
7262 the occurrence in an aspect specification (efficiency only).
7263 * sem_attr.adb (Analyze_Attribute): indicate that the attributes
7264 related to iterators can be set by an attribute specification, but
7266 * sem_ch13.adb (Analyze_Aspect_Specifications): handle
7267 Constant_Indexing and Variable_Indexing.
7268 (Check_Indexing_Functions): New procedure to perform legality checks.
7269 Additional semantic checks at end of declarations.
7271 2011-08-05 Sergey Rybin <rybin@adacore.com>
7273 * tree_io.ads: Update ASIS_Version_Number because of the change of the
7274 order of calling Tree_Write/Tree_Read routines made for aspects.
7276 2011-08-05 Bob Duff <duff@adacore.com>
7278 * a-fihema.adb (Finalize): Fix race condition.
7280 2011-08-05 Yannick Moy <moy@adacore.com>
7282 * sem_ch12.adb (Analyze_Package_Instantiation,
7283 Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
7286 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7288 * sem_type.adb (Specific_Type): in an instance, the type-specific
7289 operand of an equality check that involves null may have a private
7290 type. Use full view to determine legality of construct.
7292 2011-08-05 Vincent Celier <celier@adacore.com>
7294 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
7295 delete or close the file when the call to gnatmake was successful.
7297 2011-08-05 Yannick Moy <moy@adacore.com>
7299 * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
7300 Global_Discard_Names.
7302 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7304 * sinfo.ads: comments on use of entity field for aspect specifications.
7306 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7308 * sem_ch12.adb (Reset_Entity): If the entity field of the associated
7309 node is not itself an entity but a selected component, it is a
7310 rewritten parameterless call to an en enclosing synchronized operation,
7311 and this expansion will be performed again in the instance, so there is
7312 no global information to preserve.
7314 2011-08-05 Javier Miranda <miranda@adacore.com>
7316 * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
7317 for renamings of predefined primitives.
7318 (In_Predef_Prims_DT): New subprogram.
7320 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7322 * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
7323 possible interpretation of name is a reference type, add an
7324 interpretation that is the designated type of the reference
7325 discriminant of that type.
7326 * sem_res.adb (resolve): If the interpretation imposed by context is an
7327 implicit dereference, rewrite the node as the deference of the
7328 reference discriminant.
7329 * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
7330 Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
7331 parent type or base type.
7332 * sem_ch4.adb (Process_Indexed_Component,
7333 Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
7334 Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
7335 Check for implicit dereference.
7336 (List_Operand_Interps): Indicate when an implicit dereference is
7338 * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
7340 2011-08-05 Thomas Quinot <quinot@adacore.com>
7342 * scos.ads: Update documentation of SCO table. Pragma statements can now
7343 be marked as disabled (using 'p' instead of 'P' as the statement kind).
7344 * par_sco.ads, par_sco.adb: Implement the above change.
7345 (Process_Decisions_Defer): Generate a P decision for the first parameter
7346 of a dyadic pragma Debug.
7347 * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
7349 * put_scos.adb: Code simplification based on above change.
7351 2011-08-05 Robert Dewar <dewar@adacore.com>
7353 * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
7354 bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
7355 a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
7356 prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
7358 2011-08-05 Bob Duff <duff@adacore.com>
7360 * a-stunau.ads, g-spipat.adb: Update comments.
7362 2011-08-05 Bob Duff <duff@adacore.com>
7364 * a-fihema.ads: Minor comment fix.
7365 * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
7367 (Attach, Detach): Remove some unnecessary code.
7368 (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
7370 2011-08-05 Bob Duff <duff@adacore.com>
7372 * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
7373 allocation for Objects component. This simplifies the code somewhat. It
7374 is also a little more efficient in the not-so-unusual case where there
7375 are no controlled objects allocated.
7376 Make Finalization_Started flag atomic.
7377 (Finalize): Avoid unnecessary detachment of items from the list.
7378 (pcol): Minor cleanup.
7380 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7382 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
7383 package whose name is the same as that of the generic unit, or its
7386 2011-08-05 Bob Duff <duff@adacore.com>
7388 * a-fihema.adb, a-fihema.ads: Minor comment improvements.
7389 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
7390 Minor comment fixes.
7392 2011-08-05 Arnaud Charlet <charlet@adacore.com>
7394 * make.adb (Linking_Phase): No longer need to set source search path
7395 before calling gnatlink in CodePeer mode.
7396 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
7397 gcc in CodePeer mode, since the binder generated file no longer has a
7399 * switch.ads, switch.adb (Is_Language_Switch): Removed.
7400 * switch-c.adb: Update comment.
7402 2011-08-05 Thomas Quinot <quinot@adacore.com>
7404 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
7406 2011-08-05 Nicolas Roche <roche@adacore.com>
7408 * gnat_ugn.texi: Fix minor syntax error issue.
7410 2011-08-05 Vincent Celier <celier@adacore.com>
7412 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
7413 delete or close the file when the call to gnatmake returns a non
7414 successful return code.
7416 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7418 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
7419 check, indicate that the copy of the original node does not come from
7420 source, to prevent an infinite recursion of the expansion.
7422 2011-08-05 Johannes Kanig <kanig@adacore.com>
7424 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
7425 VC generation for subprogram bodies.
7427 2011-08-05 Yannick Moy <moy@adacore.com>
7430 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
7431 the base type with the smallest allowed base type.
7433 2011-08-05 Sergey Rybin <rybin@adacore.com>
7435 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
7438 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7440 * sem_ch12.ads: minor comment updates.
7442 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7444 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
7445 instantiation and a formal package the compiler generates a package
7446 renaming declaration so that the generic name within the declaration
7447 is interpreted as a renaming of the instance. At the end of a formal
7448 package declaration, this renaming must become invisible.
7450 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
7452 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
7453 comparison and rely on concrete entities instead.
7455 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7457 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
7458 and discriminants, to indicate that the type has an access discriminant
7459 that supports implicit dereference.
7460 * snames.ads-tmpl: Add names of aspects and attributes related to
7461 Ada2012 iterators: constant_indexing, default_iterator,
7462 iterator_element, implicit_dereference, variable_indexing.
7463 * aspects.ads, aspects.adb: entries for iterator-related aspects.
7464 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
7465 iterator-related aspects.
7466 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
7468 2011-08-05 Sergey Rybin <rybin@adacore.com>
7470 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
7471 metrics in gnatmetric to cover new kinds of coupling mentrics.
7473 2011-08-05 Steve Baird <baird@adacore.com>
7475 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
7476 of calling the user-defined main subprogram.
7477 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode
7478 is set) Call_Main_Subprogram ahead of, as opposed to
7480 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
7481 generation of a "with" of the user-defined main subprogram.
7482 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
7483 (which is now called from Gen_Main instead).
7485 2011-08-05 Emmanuel Briot <briot@adacore.com>
7487 * projects.texi: Added reference to the Makefile package.
7489 2011-08-05 Thomas Quinot <quinot@adacore.com>
7491 * exp_ch7.adb: Minor comment rewording.
7493 2011-08-05 Ed Falis <falis@adacore.com>
7495 * env.c: Fix comment.
7497 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
7499 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
7500 character comparison and rely on concrete entities instead.
7502 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7504 * sem_ch3.adb: (Check_Private_Overriding): better error message,
7505 suggested by AI95-0068.
7507 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
7509 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
7510 the two potential initialization calls. This accounts for any
7511 access-before-elaboration checks which may precede the initialization
7513 (Next_Suitable_Statement): New routine. Returns the next real statement
7514 after the input node while skipping generated checks.
7515 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
7516 with comment on usage.
7517 Do not generate Elaborate_All when the trigger is a finalization call
7518 coming from a type init proc.
7519 (Check_Elab_Call): Propagate the initialization procedure context to
7520 subsequent calls to Check_A_Call.
7521 (Check_Internal_Call_Continue): Propagate the initialization procedure
7522 context to subsequent calls to Check_Elab_Call.
7523 (Is_Finalization_Procedure): New routine. Returns True if the input
7524 entity denotes a [Deep_]Finalize routine.
7525 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
7526 along with comment on usage.
7528 2011-08-05 Vadim Godunko <godunko@adacore.com>
7530 * s-atocou.ads: Add list of supported platforms.
7532 2011-08-05 Yannick Moy <moy@adacore.com>
7534 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
7536 * opt.ads (Disable_ALI_File): new Boolean flag
7537 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
7539 2011-08-05 Ed Falis <falis@adacore.com>
7541 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
7542 environ is properly defined.
7544 2011-08-05 Vincent Celier <celier@adacore.com>
7546 * make.adb (Compilation_Phase): Exit immediately when all objects have
7547 been found up to date, to avoid multiple exit messages.
7548 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
7549 same project for languages with no compiler.
7550 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
7552 2011-08-05 Robert Dewar <dewar@adacore.com>
7554 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
7555 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
7556 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
7557 s-atocou-builtin.adb: Minor reformatting.
7559 2011-08-05 Yannick Moy <moy@adacore.com>
7561 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
7562 if the node to wrap is a pragma check, this node and enclosed
7563 expression are not expanded, so do not apply any transformations here.
7564 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
7565 introducing transient scopes.
7567 2011-08-05 Jose Ruiz <ruiz@adacore.com>
7569 * adaint.c (__gnat_set_writable, __gnat_set_readable,
7570 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
7571 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
7572 routine is available, so we use the default implementation of these
7574 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
7575 support for copying attributes on VxWorks 6.
7577 2011-08-05 Yannick Moy <moy@adacore.com>
7579 * debug.adb: Remove use of -gnatd.D.
7580 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
7581 * opt.ads: Simplify variables for ALFA mode, to keep one only
7582 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
7585 2011-08-05 Vincent Celier <celier@adacore.com>
7587 * prj-conf.adb (Do_Autoconf): Look also for --RTS in
7588 Builder'Default_Switches.
7590 2011-08-05 Vincent Celier <celier@adacore.com>
7592 * makeusg.adb: Add lines for --create-map-file switches.
7594 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7596 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
7597 profile is incomplete and the full view is available, replace it with
7599 * sem_ch6.adb (Possible_Freeze): if a type in the profile is
7600 incomplete, freezing the subprogram is delayed until the full view is
7602 * sem_type.adb (Disambiguate): an ambiguity between a user-defined
7603 fixed-point multiplication operator and the predefined operator is
7604 resolved in favor of the user-defined one.
7606 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7608 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
7611 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7613 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
7614 whether a type lacks user-defined Read or Write operations, or has a
7615 component that lacks them.
7616 * sem_attr.adb (Check_Stream_Attribute): if restriction
7617 No_Default_Stream_Attributes is active, verify that all subcomponent
7618 types of the target have user-defined stream operations, and report
7620 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
7621 * exp_strm.adb: Build_Elementary_Input_Call,
7622 Build_Elementary_Write_Call): remove checks for restriction
7623 No_Default_Stream_Attributes, now checked in semantics.
7625 2011-08-04 Vincent Celier <celier@adacore.com>
7627 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
7628 switches on the command line, look for all valid --RTS switches in the
7629 Builder switches and for each language use the first runtime name found
7630 to invoke gprconfig.
7631 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
7632 command line and there is no auto-configuration.
7633 (Runtime_Name_Set_For): New function.
7635 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7637 * exp_ch7.adb (Build_Object_Declarations): Do not generate the
7638 elaborate initialization expression for variable Abort when processing
7639 a package body or a declaration.
7640 (Create_Finalizer): Propagate the package context when creating the
7641 exception-related variables.
7642 * exp_ch7.ads (Build_Object_Declarations): New formal parameter
7643 For_Package along with usage comment.
7645 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7647 * gcc-interface/Makefile.in: Clean up targets.
7648 Enable new package for atomic counters and copy-on-write implementation
7649 of unbounded strings on x86 platforms.
7650 * gcc-interface/Make-lang.in: Update dependencies.
7652 2011-08-04 Robert Dewar <dewar@adacore.com>
7654 * exp_ch7.adb: Minor reformatting.
7656 2011-08-04 Robert Dewar <dewar@adacore.com>
7658 * exp_strm.adb: Minor reformatting.
7660 2011-08-04 Vadim Godunko <godunko@adacore.com>
7662 * s-atocou.adb: Replace by dummy version and use on targets where atomic
7663 operations are not supported.
7664 * s-atocou-builtin.adb: Renamed from s-atocou.adb.
7665 * s-atocou-x86.adb: New file.
7666 * Makefile.rtl: Add s-atocou.o file
7668 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7670 * make.adb (Compile): Move setting of CodePeer_Mode to ...
7671 (Compilation_Phase): ... here.
7672 (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
7674 2011-08-04 Thomas Quinot <quinot@adacore.com>
7676 * Make-generated.in: Fix minor typo in comment.
7678 2011-08-04 Thomas Quinot <quinot@adacore.com>
7680 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
7683 2011-08-04 Robert Dewar <dewar@adacore.com>
7685 * a-coinho.adb: Minor reformatting.
7687 2011-08-04 Robert Dewar <dewar@adacore.com>
7689 * a-coinho.ads: Minor reformatting.
7691 2011-08-04 Vadim Godunko <godunko@adacore.com>
7693 * s-atocou.ads, s-atocou.adb: New files.
7694 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
7695 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
7696 direct use of GCC's atomic builtins and replace them by use of new
7697 atomic counter package.
7699 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7701 * exp_strm.adb: better error message for No_Default_Stream_Attributes.
7703 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7705 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
7706 with a call to Get_External_Tag.
7707 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
7708 subprogram usage. Remove the guard against package declarations and
7709 bodies since Build_Cleanup_Statements is no longer invoked in that
7711 (Build_Components): Initialize Tagged_Type_Stmts when the context
7712 contains at least one library-level tagged type.
7713 (Build_Finalizer): New local variables Has_Tagged_Types and
7714 Tagged_Type_Stmts along with associated comments on usage. Update the
7715 logic to include tagged type processing.
7716 (Create_Finalizer): Insert all library-level tagged type unregistration
7717 code before the jump block circuitry.
7718 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
7719 (Expand_N_Package_Declaration): Remove the call to
7720 Build_Cleanup_Statements.
7721 (Process_Tagged_Type_Declaration): New routine. Generate a call to
7722 unregister the external tag of a tagged type.
7723 (Processing_Actions): Reimplemented to handle tagged types.
7724 (Process_Declarations): Detect the declaration of a library-level
7725 tagged type and carry out the appropriate actions.
7726 (Unregister_Tagged_Types): Removed. The machinery has been directly
7727 merged with Build_Finalizer.
7729 2011-08-04 Robert Dewar <dewar@adacore.com>
7731 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
7732 gnatls.adb, exp_ch3.adb: Minor reformatting.
7734 2011-08-04 Marc Sango <sango@adacore.com>
7736 * sem_attr.adb (Analyze_Attribute): Replace the message
7737 "invisible attribute of}" of the spark restriction violation in
7738 attribute reference by the simple message "invisible attribute of type".
7739 Indeed, the node value Error_Msg_Node_1 used is in conflit with the
7740 two insertion characters: '&' and '}'.
7742 2011-08-04 Vadim Godunko <godunko@adacore.com>
7744 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
7745 * a-coinho.ads, a-coinho.adb: New file.
7746 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
7748 2011-08-04 Nicolas Roche <roche@adacore.com>
7750 * alfa_test.adb: Not all ali files are containing alfa information even
7751 if compiled with -gnatd.F. So suppress warning about missing ALFA
7754 2011-08-04 Yannick Moy <moy@adacore.com>
7756 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
7758 * put_alfa.adb: Check that scope name is not empty.
7760 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7762 * exp_ch3.adb (Stream_Operation_Ok): new predicate
7763 Needs_Elementary_Stream_Operation, to determine whether user-defined
7764 Read and Write attributes are available for the elementary components
7765 of the given type. If only the predefined attributes are available,
7766 then when restriction No_Default_Stream_Attributes is active the
7767 predefined stream attributes for the composite type cannot be created.
7769 2011-08-04 Robert Dewar <dewar@adacore.com>
7771 * bindgen.adb: Fix obsolete comments and names from Ada/C days.
7772 Put routines in alpha order
7774 2011-08-04 Jose Ruiz <ruiz@adacore.com>
7776 * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
7777 * gcc-interface/Make-lang.in: Update dependencies.
7779 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7781 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
7782 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
7785 2011-08-04 Robert Dewar <dewar@adacore.com>
7787 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
7788 lib-xref-alfa.adb: Minor reformatting.
7790 2011-08-04 Marc Sango <sango@adacore.com>
7792 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
7793 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
7794 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
7797 2011-08-04 Tristan Gingold <gingold@adacore.com>
7799 * bindgen.adb (Gen_Adainit_C): Remove.
7800 (Gen_Adafinal_C): Ditto.
7801 (Gen_Elab_Externals_C): Ditto.
7802 (Gen_Elab_Calls_C): Ditto.
7803 (Gen_Elab_Order_C): Ditto.
7804 (Gen_Elab_Defs_C): Ditto.
7805 (Gen_Finalize_Library_C): Ditto.
7806 (Gen_Finalize_Library_Defs_C): Ditto.
7807 (Gen_Main_C): Ditto.
7808 (Gen_Output_File_C): Ditto.
7809 (Gen_Restrictions_C): Ditto.
7810 (Gen_Versions_C): Ditto.
7811 (Write_Info_Ada_C): Ditto.
7812 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
7813 (Gen_Output_File): Do not force Ada_Bind_File anymore.
7814 Always call Gen_Output_File_Ada.
7815 * gnatlink.adb (Begin_Info): Now a constant.
7817 (Ada_Bind_File): Remove
7818 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases.
7819 * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
7820 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
7821 * opt.ads (Ada_Bind_File): Remove.
7823 2011-08-04 Thomas Quinot <quinot@adacore.com>
7825 * projects.texi: Document target-specific directory in default project
7828 2011-08-04 Thomas Quinot <quinot@adacore.com>
7830 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
7833 2011-08-04 Yannick Moy <moy@adacore.com>
7835 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
7836 opt.ads, lib-xref.ads: Code clean up.
7838 2011-08-04 Yannick Moy <moy@adacore.com>
7840 * gnat_rm.texi: Update description of Test_Case
7841 * gnat_ugn.texi: Typo.
7843 2011-08-04 Ed Falis <falis@adacore.com>
7845 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
7847 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7849 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
7850 it is of type Root_Controlled. This action eliminates fields Prev and
7851 Next from type equality.
7853 2011-08-04 Yannick Moy <moy@adacore.com>
7855 * lib-xref-alfa.adb: Correct typo.
7857 2011-08-04 Matthew Heaney <heaney@adacore.com>
7859 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
7862 2011-08-04 Yannick Moy <moy@adacore.com>
7864 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
7865 (Analyze_Pragma): allow static string expression for name of Test_Case,
7866 instead of simply string literals.
7867 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
7870 2011-08-04 Vincent Celier <celier@adacore.com>
7872 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
7873 case suffixes to find truncated main sources.
7875 2011-08-04 Tristan Gingold <gingold@adacore.com>
7877 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
7878 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
7879 (Compute_Current_Task): Ditto.
7881 2011-08-04 Tristan Gingold <gingold@adacore.com>
7883 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
7885 2011-08-04 Yannick Moy <moy@adacore.com>
7887 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
7888 library-level constant.
7889 (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
7890 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
7891 used as selector of parameter association, in ALFA mode.
7893 2011-08-04 Robert Dewar <dewar@adacore.com>
7895 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
7896 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
7899 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7901 * make.adb (Linking_Phase): Set source search path before calling
7902 gnatlink in CodePeer mode.
7904 2011-08-04 Javier Miranda <miranda@adacore.com>
7906 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
7907 Remove code which takes care of building TSDs.
7908 * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
7909 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
7910 the accessibility check in VM targets.
7911 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
7912 (Building_Static_DT): Now returns false for VM targets.
7913 (Build_VM_TSDs): Removed.
7914 (Expand_Interface_Conversion): Generate missing runtime check for
7915 conversions to interface types whose target type is unknown at compile
7917 (Make_VM_TSD): Add missing code to disable the generation of calls to
7918 Check_TSD if the tagged type is not defined at library level, or not
7919 has a representation clause specifying its external tag, or -gnatdQ is
7921 * exp_disp.ads (Build_VM_TSDs): Removed.
7922 (Make_VM_TSDs): Spec relocated from exp_disp.adb
7923 * sem_disp.adb (Check_Dispatching_Operation): No code required to
7924 register primitives in the dispatch tables in VM targets.
7925 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
7926 initialization of class-wide interface objects in VM targets.
7927 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
7930 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
7932 * gnatlink.adb (Gnatlink): Correct missleading error message displayed
7933 when dotnet-ld cannot be found.
7935 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7937 * bindgen.adb: Simplify significantly generation of binder body file in
7939 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
7940 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
7943 2011-08-04 Yannick Moy <moy@adacore.com>
7945 * sem_prag.adb, sem.ads: Code cleanup.
7947 2011-08-04 Tristan Gingold <gingold@adacore.com>
7949 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
7950 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
7951 results if possible.
7952 * s-stusta.adb (Print): Adjust after changes in s-stausa.
7953 * gnat_ugn.texi: Update dynamic stack usage section.
7955 2011-08-04 Steve Baird <baird@adacore.com>
7957 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
7958 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
7959 contains only a call to the user-defined main subprogram.
7960 (Gen_Main_Ada) - If CodePeer_Mode is set, then
7961 call the "wrapper" subprogram instead of directly
7962 calling the user-defined main subprogram.
7964 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7966 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
7967 alternatives of a case statement for controlled objects. Rename local
7968 variable A to Dead_Alt.
7969 (Expand_N_If_Statement): Check the then and else statements of an if
7970 statement for controlled objects. Check the then statements of all
7971 elsif parts of an if statement for controlled objects.
7972 (Expand_N_Loop_Statement): Check the statements of a loop for controlled
7974 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
7975 detects a loop associated with the expansion of an array object.
7976 Augment the processing of the loop statements to account for a possible
7977 wrap done by Process_Statements_For_Controlled_Objects.
7978 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
7979 statements and abortable part of an asynchronous select for controlled
7981 (Expand_N_Conditional_Entry_Call): Check the else statements of a
7982 conditional entry call for controlled objects.
7983 (Expand_N_Selective_Accept): Check the alternatives of a selective
7984 accept for controlled objects.
7985 (Expand_N_Timed_Entry_Call): Check the entry call and delay
7986 alternatives of a timed entry call for controlled objects.
7987 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
7988 exception handler for controlled objects.
7989 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
7990 Add formal parameter Nested_Constructs along with its associated
7992 (Requires_Cleanup_Actions (Node_Id)): Update all calls to
7993 Requires_Cleanup_Actions.
7994 (Process_Statements_For_Controlled_Objects): New routine.
7995 * exp_util.ads (Process_Statements_For_Controlled_Objects): New
7996 routine. Inspect a node which contains a non-handled sequence of
7997 statements for controlled objects. If such an object is found, the
7998 statements are wrapped in a block.
8000 2011-08-04 Bob Duff <duff@adacore.com>
8002 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
8003 need to compare with Class_Wide_Type (T2), in order to get at the
8004 original class-wide type node.
8005 * sem_type.ads (Covers): Improve the comment.
8006 * einfo.ads (Class_Wide_Type): Improve the comment.
8007 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
8008 the type of the Deref.
8010 2011-08-04 Yannick Moy <moy@adacore.com>
8012 * gnat_rm.texi: Document that Test_Case pragma can only appear on
8013 separate declarations.
8014 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
8015 check identifier of pragma argument.
8016 (Chain_TC): check that no other test case associated to the same entity
8017 share the same name.
8018 (Check_Test_Case): disallow test case inside subprogram body
8019 (Analyze_Pragma): correct call to check identifier and not argument
8020 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
8021 function gets name from test case pragma.
8023 2011-08-04 Yannick Moy <moy@adacore.com>
8025 * gnat_rm.texi: Document new pragma and aspect.
8026 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
8027 (No_Duplicates_Allowed): new constant array defining whether duplicates
8028 aspects of each kind can appear on the same declaration.
8029 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
8030 field, which points to a node holding the previous Spec_PPC_List.
8031 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
8032 through the indirection with Contract.
8033 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
8034 * par-prag.adb (Prag): do nothing on Test_Case pragma
8035 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
8037 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
8038 component Ensures of Test_Case.
8039 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
8040 (Analyze_Generic_Subprogram_Declaration,
8041 Analyze_Subprogram_Instantiation,
8042 Analyze_Abstract_Subprogram_Declaration,
8043 Analyze_Subprogram_Body_Helper,
8044 Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
8045 insert contract in subprogram node at point of definition
8047 (Aspect_Loop): do not raise error on duplicate Test_Case aspect
8048 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
8049 corresponding pragma
8050 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
8051 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
8052 similar to the analysis of pre/post
8053 (Derive_Subprogram): insert contract in subprogram node at point of
8055 * sem_prag.adb, sem_prag.ads
8056 (Check_Arg_Is_String_Literal, Check_Identifier):
8057 new checking procedures to be called in treatment of pragmas
8058 (Check_Test_Case): new procedure to check that a Test_Case aspect or
8059 pragma is well-formed. This does not check currently that 'Result is
8060 used only in the Ensures component of a Test_Case.
8061 (Analyze_Pragma): add case for Test_Case
8062 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
8063 components of a Test_Case.
8064 (Preanalyze_TC_Args): new procedure to preanalyze the boolean
8065 expressions in the 3rd (and 4th if present) arguments of a Test_Case
8066 pragma, treated as spec expressions.
8067 (Sig_Flags): add value -1 for Test_Case.
8068 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
8069 Get_Requires_From_Test_Case_Pragma): getters for both expression
8070 components of a Test_Case.
8071 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
8072 indirection between an entry or [generic] subprogram entity and its
8073 pre/post + test-cases.
8074 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
8075 get/set for fields of an N_Contract node.
8076 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
8077 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
8078 names and pragma for Test_Case.
8079 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
8081 2011-08-04 Vincent Celier <celier@adacore.com>
8083 * gnat_ugn.texi: Improve documentation of gnatmake switch
8084 --source-info-file=.
8086 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8088 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
8089 type). Initialize Atyp to the appropriate type which is later checked
8090 for completion. Rewrite the assertion associated with private type
8093 2011-08-04 Ed Falis <falis@adacore.com>
8095 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
8096 initialize the number of CPUs.
8098 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8100 * sem_type.adb (Disambiguate): New subsidiary routine
8101 In_Same_Declaration_List, to implement AI05-0020: a user-defined
8102 equality on an anonymous access type whose designated type is private
8103 does not lead to an ambiguity with the universal access equality
8104 operator in the body or child units of the defining package. The same
8105 is true for a multiplication operator on a private type completed with
8108 2011-08-04 Javier Miranda <miranda@adacore.com>
8110 * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
8111 (Normalize_Scalars_Config): Removed.
8113 (Register_Opt_Config_Switches): Remove registering config values of
8114 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
8115 (Restore_Opt_Config_Switches): Remove code which restores the values of
8116 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
8117 Init_Or_Norm_Scalars.
8118 (Save_Opt_Config_Switches): Remove code which saves values of
8119 Init_Or_Norm_Scalars and Normalize_Scalars.
8120 (Set_Opt_Config_Switches): Remove code which restores config values of
8121 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
8122 Init_Or_Norm_Scalars.
8124 2011-08-04 Yannick Moy <moy@adacore.com>
8126 * frontend.adb (Frontend): remove previous patch to avoid full
8127 qualification in ALFA mode.
8128 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
8129 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
8130 unique name for an entity, which could be used to identify the entity
8131 across compilation units.
8133 2011-08-04 Thomas Quinot <quinot@adacore.com>
8136 (Initialize_Default_Project_Path): Add target specific directory
8137 ($prefix/$target/lib/gnat) in front of project path in all cases
8138 (making gnatmake's behaviour consistent with gprbuild).
8139 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
8140 Pass target name from Sdefault to project subsystem.
8141 * gnatls.adb: Show new target specific default project directory.
8143 2011-08-04 Johannes Kanig <kanig@adacore.com>
8145 * cstand.adb: Add Information to Identifier in Standard
8146 (Identifer_For): Set Entity to the corresponding entity
8148 2011-08-04 Sergey Rybin <rybin@adacore.com>
8150 * gnat_ugn.texi: Update doc on gnatcheck.
8152 2011-08-04 Yannick Moy <moy@adacore.com>
8154 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
8157 2011-08-04 Yannick Moy <moy@adacore.com>
8159 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
8160 performing expansion.
8161 * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
8162 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
8163 it is not called in ALFA mode.
8165 2011-08-04 Emmanuel Briot <briot@adacore.com>
8167 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
8168 after all, so removed.
8170 2011-08-04 Sergey Rybin <rybin@adacore.com>
8172 * vms_data.ads: Add missing VMS qualifiers.
8174 2011-08-04 Emmanuel Briot <briot@adacore.com>
8176 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
8177 the list of files on the command line after processing it through
8180 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8182 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
8183 processing for .NET/JVM. These targets can now benefit from
8184 Raise_From_Controlled_Operation and they share the same processing with
8186 (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
8187 These targets need transient scopes in order to properly finalize short
8188 lived controlled objects.
8189 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
8190 NET/JVM. These targets can now benefit from
8191 Raise_From_Controlled_Operation and they share the same processing with
8194 2011-08-04 Geert Bosch <bosch@adacore.com>
8196 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
8198 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8200 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
8201 Expand_Record_Aggregate, to determine whether aggregate must be
8202 expanded into assignments. This is the case if the ancestor part is
8203 private, regarless of the setting of the flag Has_Private_Ancestor.
8205 2011-08-04 Ed Falis <falis@adacore.com>
8207 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
8209 2011-08-04 Bob Duff <duff@adacore.com>
8211 * sinfo.ads: Fix comment.
8213 2011-08-04 Steve Baird <baird@adacore.com>
8215 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
8216 choose a package name in much the same way as is
8217 done for JGNAT when VM_Target /= No_VM, except that
8218 a slightly more distinctive prefix string is used.
8220 2011-08-04 Emmanuel Briot <briot@adacore.com>
8222 * makeutl.adb (Complete_Mains): no longer accept unit names on the
8223 gnatmake command line.
8224 This behavior was never documented (and was supported only because of
8225 an early bug in the code). This case might lead to ambiguous cases
8226 (between unit names and truncated base names without suffixes).
8228 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8230 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
8231 Remove the external tag of a tagged type from the internal hash table.
8232 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
8233 expanded usage of the routine. Strenghten the check for Is_Master. Add
8234 processing for tagged types.
8235 (Build_Finalizer): Create all the necessary lists used in finalizer
8236 creation when the processed context is a package that may contain
8238 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
8239 Requires_Cleanup_Actions.
8240 (Expand_N_Package_Body): Package bodies may need clean up code
8241 depending on whether they contain tagged types.
8242 (Expand_N_Package_Declaration): Package declarations may need clean up
8243 code depending on whether they contain tagged types.
8244 (Unregister_Tagged_Types): New routine. Search through a list of
8245 declarations or statements, looking for non-abstract Ada tagged types.
8246 For each such type, generate code to unregister the external tag.
8247 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
8248 Requires_Cleanup_Actions.
8249 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
8250 through a list of declarations or statements looking for non-abstract
8251 Ada tagged types or controlled objects.
8252 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
8253 Requires_Cleanup_Actions.
8254 (Has_Controlled_Objects (List_Id, Boolean)): Removed.
8255 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
8258 2011-08-04 Vincent Celier <celier@adacore.com>
8260 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
8261 has Ada sources, not project Project, because if the root project
8262 Project has no sources of its own, all projects will be deemed without
8265 2011-08-04 Gary Dismukes <dismukes@adacore.com>
8267 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
8268 of the No_Param_Proc acc-to-subp type used for initialization of
8269 __gnat_finalize_library_objects so that it's declared at library level
8270 rather than nested inside of the adainit routine.
8272 2011-08-04 Javier Miranda <miranda@adacore.com>
8274 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
8275 if the tagged type has a representation clause which specifies its
8278 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8280 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
8281 Remove previous procedure with that name.
8282 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
8284 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
8285 subtype mark, the ancestor cannot have unknown discriminants.
8286 (Resolve_Record_Aggregate): if the type has invisible components
8287 because of a private ancestor, the aggregate is illegal.
8289 2011-08-04 Vincent Celier <celier@adacore.com>
8291 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
8292 account switches -gnat2005, -gnat12 and -gnat2012.
8294 2011-08-04 Bob Duff <duff@adacore.com>
8296 * s-tasdeb.ads: Minor comment fix.
8298 2011-08-04 Arnaud Charlet <charlet@adacore.com>
8300 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
8302 * switch.ads, switch.adb (Is_Language_Switch): New function.
8304 2011-08-04 Vincent Celier <celier@adacore.com>
8306 * switch-c.adb: Minor comment addition.
8308 2011-08-04 Vincent Celier <celier@adacore.com>
8310 * vms_conv.adb (Process_Argument): Fail graciously when qualifier
8311 ending with '=' is followed by a space (missing file name).
8313 2011-08-04 Pascal Obry <obry@adacore.com>
8315 * g-regist.ads: Fix size of HKEY on x86_64-windows.
8317 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8319 * sem_ch12.adb (Analyze_Associations): New routine
8320 Check_Overloaded_Formal_Subprogram to reject a formal package when
8321 there is a named association or a box initialisation for an overloaded
8322 formal subprogram of the corresponding generic.
8324 2011-08-04 Yannick Moy <moy@adacore.com>
8326 * alfa.ads (ALFA_Xref_Record): add component for type of entity
8327 * get_alfa.adb, put_alfa.adb: Read and write new component of
8329 * lib-xref-alfa.adb (Collect_ALFA): generate new component.
8331 2011-08-04 Pascal Obry <obry@adacore.com>
8333 * urealp.adb: Minor reformatting.
8335 2011-08-04 Tristan Gingold <gingold@adacore.com>
8337 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
8338 Handle the case when Cleanup_Protected_Object returns Empty.
8340 2011-08-04 Yannick Moy <moy@adacore.com>
8342 * frontend.adb (Frontend): only qualify names in non-ALFA mode
8344 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8346 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
8347 call, ignore functions.
8349 2011-08-04 Geert Bosch <bosch@adacore.com>
8351 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
8354 2011-08-04 Emmanuel Briot <briot@adacore.com>
8356 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
8357 as an index for Builder'Switches. This conforms to the documentation.
8358 * make.adb (Insert_Project_Sources): avoid duplicate code
8360 2011-08-04 Emmanuel Briot <briot@adacore.com>
8362 * makeutl.adb (Complete_Mains): if the user has passed a relative file
8363 name on the command line (for instance "../dummy"), never assume it can
8366 2011-08-04 Tristan Gingold <gingold@adacore.com>
8368 * bindgen.adb: Remove code the reference or create the
8369 Break_Start/__gnat_break_start procedure.
8370 * s-stalib.adb (Break_Start): Removed.
8372 2011-08-04 Emmanuel Briot <briot@adacore.com>
8374 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
8375 shared with gprbuild.
8377 2011-08-04 Yannick Moy <moy@adacore.com>
8379 * par-ch4.adb (P_Primary): preferentially issue an error message about
8380 a missing parenthesis arount a conditional or case expression in Ada
8381 2012 mode, if we detect that the alignment is not correct for a
8384 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8386 * exp_ch7.adb (Process_Declarations): Do not consider the result of a
8387 tag-to-class-wide conversion as needing finalization actions.
8388 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
8389 a tag-to-class-wide conversion as needing finalization actions.
8390 (Is_Finalizable_Transient): The result of a tag-to-class-wide
8391 conversion does not need finalization actions.
8392 (Is_Tag_To_CW_Conversion): New routine.
8393 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
8394 whether an object is the result of a tag-to-class-wide conversion.
8396 2011-08-04 Yannick Moy <moy@adacore.com>
8398 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
8399 the left-hand-side and right-hand-side of a conjunct are inserted when
8400 translating a pre- or postcondition
8401 * sem_ch6.adb: Correct typo in comment
8403 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8405 * gnat_rm.texi: Ravenscar does not prohibit dependence on
8406 Unchecked_Conversion and Unchecked_Deallocation.
8408 2011-08-04 Thomas Quinot <quinot@adacore.com>
8410 * make.adb: Minor reformatting.
8412 2011-08-04 Emmanuel Briot <briot@adacore.com>
8414 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
8415 sources in the project and its imported projects, but not in the whole
8418 2011-08-04 Emmanuel Briot <briot@adacore.com>
8420 * make.adb: Remove debug trace.
8422 2011-08-04 Vincent Celier <celier@adacore.com>
8424 * makeutl.adb (Do_Complete): Get the absolute path name of a relative
8425 path in canonical form, to be able to compare path names on platforms
8426 such as Windows or Darwin.
8428 2011-08-04 Thomas Quinot <quinot@adacore.com>
8430 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
8431 For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
8432 * scos.ads: Update documentation accordingly.
8433 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
8436 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8438 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
8439 attribute only if prefix type is scalar.
8441 2011-08-04 Emmanuel Briot <briot@adacore.com>
8443 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
8444 in gnatmake for specifying mains on the command line that do not belong
8445 to the main project. These mains must currently all belong to the same
8447 (Ultimate_Extension_Of): removed, since duplicated
8448 Ultimate_Extending_Project.
8450 2011-08-04 Arnaud Charlet <charlet@adacore.com>
8452 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
8454 (CodePeer_Mode_String): New.
8455 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
8457 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
8458 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
8459 mode, since no useful elaboration subprogram is needed by CodePeer.
8460 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
8461 In this mode, compile binder file with -gnatC and do stop after this
8464 2011-08-04 Vincent Celier <celier@adacore.com>
8466 * exp_ch7.adb: Minor comment fix.
8468 2011-08-04 Robert Dewar <dewar@adacore.com>
8470 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
8471 exp_ch4.adb, makeutl.adb: Minor reformatting.
8473 2011-08-04 Emmanuel Briot <briot@adacore.com>
8475 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
8476 Create several new subprograms to move code out of Make. This makes the
8477 code more readable, removes code duplication, and is a preparation work
8478 for adding support for aggregate projects.
8480 2011-08-04 Tristan Gingold <gingold@adacore.com>
8482 * s-po32gl.ads, s-po32gl.adb: New files.
8483 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
8484 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
8485 (Build_Finalization_Collection): Use it.
8486 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
8487 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
8489 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
8490 * gcc-interface/Make-lang.in: Update dependencies.
8492 2011-08-04 Emmanuel Briot <briot@adacore.com>
8494 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
8497 2011-08-04 Emmanuel Briot <briot@adacore.com>
8499 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
8500 command line is not a file name, also check whether it could be a unit
8503 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
8505 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
8506 the header of the finalization routine.
8507 If the unit has no finalizer but is a body whose spec has one, then
8508 generate the decrement of the elaboration entity only.
8509 If the unit has a finalizer and is a spec, then do not generate the
8510 decrement of the elaboration entity.
8511 (Gen_Finalize_Library_C): Likewise.
8513 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8515 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
8516 (Bounds_Size_Expression): Removed.
8517 (Double_Alignment_Of): New subsidiary routine.
8518 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
8519 for a hole in the dope vector of unconstrained arrays due to different
8520 index and element alignments.
8522 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8524 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
8525 raise program_error because body has not been seen yet.
8527 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8529 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
8532 2011-08-04 Vincent Celier <celier@adacore.com>
8534 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
8536 2011-08-04 Yannick Moy <moy@adacore.com>
8538 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
8539 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
8541 2011-08-04 Thomas Quinot <quinot@adacore.com>
8543 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
8544 instantiation in RCI.
8546 2011-08-04 Emmanuel Briot <briot@adacore.com>
8548 * make.adb: Share more code with gprbuild
8550 2011-08-04 Emmanuel Briot <briot@adacore.com>
8552 * projects.texi: Added documentation for the IDE'Gnat project file
8555 2011-08-04 Nicolas Roche <roche@adacore.com>
8557 * gnat_rm.texi: Minor editing.
8559 2011-08-04 Javier Miranda <miranda@adacore.com>
8561 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
8562 and the library case for VM targets.
8563 (Gen_Adainit_Ada): Likewise.
8565 2011-08-04 Robert Dewar <dewar@adacore.com>
8567 * g-altive.ads: Minor comment updates.
8568 * prj-nmsc.adb: Minor reformatting.
8570 2011-08-04 Javier Miranda <miranda@adacore.com>
8573 (Normalize_Scalars_Config): Value of the configuration switch set by
8574 pragma Normalize_Scalars when it appears in the gnat.adc file.
8575 (Normalize_Scalars): New field for record Config_Switches_Type. Used
8576 to save and restore settings of this pragma.
8578 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
8579 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
8581 2011-08-04 Vincent Celier <celier@adacore.com>
8583 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
8585 2011-08-04 Arnaud Charlet <charlet@adacore.com>
8587 * makeutl.adb: Minor reformatting.
8589 2011-08-04 Olivier Hainque <hainque@adacore.com>
8591 * g-altive.ads: Update comments to reflect that only the soft
8592 binding is available today.
8594 2011-08-04 Robert Dewar <dewar@adacore.com>
8596 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
8597 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
8598 * gcc-interface/Make-lang.in: Update dependencies.
8600 2011-08-04 Arnaud Charlet <charlet@adacore.com>
8602 * prj-env.adb: Remove local debug traces.
8604 2011-08-04 Yannick Moy <moy@adacore.com>
8606 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
8607 was used instead of Hi_OK, which could cause a read of an uninitialized
8608 value later on. Detected while working on the new warning.
8609 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
8611 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
8612 in more cases, in order to detect more unreferenced values.
8613 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
8614 object for expression, if any.
8616 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
8618 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
8619 the operand types instead of the Esize.
8621 2011-08-04 Steve Baird <baird@adacore.com>
8623 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
8624 enable CodePeer_Mode.
8625 * bindusg.adb (Display): Add help message describing -P binder switch.
8626 * gnat_ugn.texi: Document -P binder switch.
8627 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
8628 user-defined main program directly.
8629 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
8630 user-defined main program in the context clause of the package body.
8632 2011-08-04 Yannick Moy <moy@adacore.com>
8634 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
8635 duplicate of Defining_Entity
8636 (Get_Unique_Entity_For_Decl): rename function into
8637 Unique_Defining_Entity
8638 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
8639 (Formal_Proof_On): remove synthesized flag
8640 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
8641 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
8642 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
8643 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
8644 Annotate (Formal_Proof)
8646 2011-08-04 Emmanuel Briot <briot@adacore.com>
8648 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
8649 source files with non-standard naming schemes, in imported projects
8651 2011-08-04 Emmanuel Briot <briot@adacore.com>
8653 * makeutl.adb (Complete_Mains): when a multi-unit source file is
8654 specified on the gprbuild command line, we need to compile all units
8655 within that file, not just the first one we find
8656 Fix error message for mains that are not found.
8658 2011-08-04 Thomas Quinot <quinot@adacore.com>
8660 * sem_ch6.adb: Update comment.
8661 * sem_ch12.adb: Minor reformatting.
8663 2011-08-04 Bob Duff <duff@adacore.com>
8665 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
8666 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
8667 race condition whose symptom is to fail to lock Parent. That, in turn,
8668 causes Parent.Awake_Count to be accessed without locking Parent, which
8669 causes another race condition whose symptom is that Parent.Awake_Count
8670 can be off by 1 (either too high or too low). The solution is to lock
8671 Parent unconditionally, and then lock Acceptor, before reading
8672 Acceptor.Terminate_Alternative.
8674 2011-08-04 Arnaud Charlet <charlet@adacore.com>
8676 * debug.adb: Update comment.
8678 2011-08-04 Robert Dewar <dewar@adacore.com>
8680 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
8681 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
8682 exp_ch6.adb: Minor reformatting.
8684 2011-08-04 Gary Dismukes <dismukes@adacore.com>
8686 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
8689 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8691 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
8693 2011-08-04 Thomas Quinot <quinot@adacore.com>
8695 * sinfo.ads: Minor reformatting.
8697 2011-08-04 Emmanuel Briot <briot@adacore.com>
8699 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
8700 even if there is no location.
8702 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8704 * sem_res.adb, sem_ch4.adb: move check for restriction
8705 No_Task_Hierarchy to resolve_allocator.
8707 2011-08-04 Thomas Quinot <quinot@adacore.com>
8709 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
8710 This flag of N_Pragma nodes is not used, remove it as well as all of
8711 the associated circuitry.
8713 2011-08-04 Javier Miranda <miranda@adacore.com>
8715 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
8716 runtime check on duplicated externa tags
8717 * debug.adb Document switch -gnatdQ.
8719 2011-08-04 Gary Dismukes <dismukes@adacore.com>
8721 * a-fihema.ads: Minor typo fix.
8723 2011-08-04 Yannick Moy <moy@adacore.com>
8725 * sem_ch10.adb: Minor comment update.
8727 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8729 * einfo.adb: Update the node field usage to reflect the renaming of
8730 Return_Flag to Return_ Flag_Or_Transient_Decl.
8731 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
8732 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
8733 (Write_Field15_Name): Change Return_Flag to
8734 Return_Flag_Or_Transient_Decl.
8735 * einfo.ads: Rename node field Return_Flag to
8736 Return_Flag_Or_Transient_Decl. Update the associated comment and all
8737 occurrences in entities.
8738 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
8739 associated Inline pragma.
8740 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
8741 associated Inline pragma.
8742 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
8744 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
8745 Return_Flag and Set_Return_Flag.
8746 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
8747 objects generated for controlled transients declared inside an
8748 Exception_With_Actions. Update the calls to Return_Flag.
8749 (Process_Object_Declaration): Add code to add a null guard for hook
8750 objects generated for controlled transients declared inside an
8751 Exception_With_Actions. Update related comment.
8752 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
8753 objects generated for controlled transients declared inside an
8754 Exception_With_Actions. Update the calls to Return_Flag.
8755 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
8757 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8759 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
8760 positional aggregate.
8762 2011-08-04 Vincent Celier <celier@adacore.com>
8764 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
8765 SLOC only for pragmas.
8767 2011-08-04 Emmanuel Briot <briot@adacore.com>
8769 * projects.texi: Minor typo fix.
8771 2011-08-04 Emmanuel Briot <briot@adacore.com>
8773 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
8774 on case-sensitive file systems.
8776 2011-08-04 Thomas Quinot <quinot@adacore.com>
8778 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
8779 nested in a disabled pragma.
8780 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
8781 enclosing pragma, if any, for X decisions.
8783 2011-08-04 Thomas Quinot <quinot@adacore.com>
8785 * sem_prag.adb: Minor reformatting.
8787 2011-08-04 Vincent Celier <celier@adacore.com>
8789 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
8790 allowed in no run time mode.
8792 2011-08-04 Vincent Celier <celier@adacore.com>
8794 * make.adb (Check): When -gnatc is used, check for the source file
8795 inside the ALI file with a canonical case file name.
8797 2011-08-04 Emmanuel Briot <briot@adacore.com>
8799 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
8800 overriding the separator.
8802 2011-08-04 Robert Dewar <dewar@adacore.com>
8804 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
8805 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
8807 2011-08-04 Robert Dewar <dewar@adacore.com>
8809 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
8811 2011-08-04 Yannick Moy <moy@adacore.com>
8813 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
8814 'Result only appears in postcondition of function.
8816 2011-08-04 Thomas Quinot <quinot@adacore.com>
8818 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
8819 external tag, include the value of the external tag in the exception
8822 2011-08-04 Yannick Moy <moy@adacore.com>
8824 * sem_attr.adb (Result): modify error message for misplaced 'Result
8826 2011-08-04 Sergey Rybin <rybin@adacore.com>
8828 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
8829 clear that the second argument must be an identifier.
8831 2011-08-04 Thomas Quinot <quinot@adacore.com>
8833 * exp_ch9.adb (Build_Barrier_Function): When compiling with
8834 -fpreserve-control-flow, insert an IF statement on the barrier
8835 condition to ensure that a conditional branch instruction is generated.
8837 2011-08-04 Emmanuel Briot <briot@adacore.com>
8839 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
8840 (Processing_Flags.Ignore_Missing_With): new flag.
8842 2011-08-04 Emmanuel Briot <briot@adacore.com>
8844 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
8845 Source_List_File on case-insensitive systems where the file is actually
8846 on a case-sensitive file system (NFS,...).
8848 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8850 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
8851 function return contains a controlled [extension] aggregate and the
8852 return statement is not part of a handled sequence of statements, wrap
8853 the return in a block. This ensures that all controlled temporaries
8854 generated during aggregate resolution will be picked up by the
8855 finalization machinery.
8857 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8859 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
8860 components, freeze type before resolution, to ensure that default
8861 initializations are present for all components.
8862 * sem_res.adb (Resolve_Actuals): the designated object of an
8863 accces-to-constant type is a legal actual in a call to an
8864 initialization procedure.
8866 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8868 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
8869 N_Unchecked_Type_Conversion to the possible containers of a renamed
8872 2011-08-04 Yannick Moy <moy@adacore.com>
8874 * par-ch13.adb (Aspect_Specifications_Present): recognize
8875 "with Identifier'Class =>" as an aspect, so that a meaningful warning
8876 is issued in Strict mode.
8877 * par.adb: Fix typos in comments.
8879 2011-08-04 Yannick Moy <moy@adacore.com>
8881 * sem_attr.adb (Result): modify error message to take into account Post
8882 aspect when compiling Ada 2012 (or newer) code.
8884 2011-08-04 Nicolas Roche <roche@adacore.com>
8886 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
8887 remove need for GCC exceptions.
8889 2011-08-04 Vincent Celier <celier@adacore.com>
8891 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
8892 project, not the source file name.
8893 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
8894 excluded, continue looking. This excluded source will only be returned
8895 if there is no other source with the same base name that is not locally
8898 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8900 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
8901 private and one of the operands is a real literal, use a qualified
8902 expression rather than a conversion which is not meaningful to the
8905 2011-08-04 Yannick Moy <moy@adacore.com>
8907 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
8908 corresponding aspect X'Class are allowed, proceed with analysis of the
8909 aspect instead of skipping it.
8911 2011-08-04 Tristan Gingold <gingold@adacore.com>
8913 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
8914 This will allow to have an Ada implementation for the subprogram.
8916 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8918 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
8919 completion and aspects are present, apply them to the entity for the
8920 type which is currently the partial view, but which is the one that
8922 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
8923 applies to a partial view, indicate that the full view has predicates
8924 and delayed aspects.
8925 (Replace_Type_Reference): Handle properly predicates that apply to the
8926 full view of a private completion.
8928 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
8930 * layout.adb (Layout_Type): For composite types, do not set Esize.
8931 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
8933 (Size_Known): Look at the RM size of components instead of the Esize.
8934 (Freeze_Record_Type): Look at the RM size instead of the Esize to
8935 issue warning and activate Implicit_Packing.
8936 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
8937 if the Esize is not known.
8938 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
8939 for elementary types only.
8940 (Analyze_Record_Representation_Clause): Look at the RM size instead
8941 of the Esize to issue errors.
8942 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
8944 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
8946 Look at the RM size instead of the Esize for types if the latter is
8948 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
8950 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8952 * sem_type.adb: proper handling of equality not involving anonymous
8955 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8957 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
8958 Vis_Decls. When creating a library-level finalizer for a package spec,
8959 both the declaration and body of the finalizer are inserted either in
8960 the visible or private declarations of the package spec.
8962 2011-08-04 Javier Miranda <miranda@adacore.com>
8964 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
8965 use of the full-view of a type when invoking Is_Ancestor.
8966 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
8967 the full-view of private parents is requested, then use also the
8968 full-view of the parent of the first derivation.
8970 2011-08-04 Tristan Gingold <gingold@adacore.com>
8972 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
8973 instead of the locally imported procedure.
8974 * s-taprop-mingw.adb (Enter_Task): Ditto.
8975 * s-valrea.adb (Scan_Real): Ditto.
8976 * s-imgrea.adb (Set_Image_Real): Ditto.
8977 * s-flocon.ads: Make the package pure.
8979 2011-08-04 Thomas Quinot <quinot@adacore.com>
8981 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
8982 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
8983 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
8984 New subprogram, moved here from...
8985 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
8986 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
8987 rewriting of the last argument into a procedure call statement here...
8988 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
8991 2011-08-04 Thomas Quinot <quinot@adacore.com>
8993 * par_sco.adb: Minor reformatting.
8995 2011-08-04 Robert Dewar <dewar@adacore.com>
8997 * erroutc.adb: Minor reformatting.
8999 2011-08-04 Thomas Quinot <quinot@adacore.com>
9001 * par_sco.adb: Comment update.
9003 2011-08-04 Tristan Gingold <gingold@adacore.com>
9005 * s-flocon.ads: New file.
9006 * g-flocon.ads: Now a renaming of s-flocon.
9007 * Makefile.rtl: Add s-flocon.o
9009 2011-08-04 Javier Miranda <miranda@adacore.com>
9011 * exp_strm.adb (Build_Array_Input_Function): if the array type is
9012 constrained, do not attempt to build a subtype of it.
9014 2011-08-04 Yannick Moy <moy@adacore.com>
9016 * errout.ads Change comments: remove 'R'M as an example where quotes
9017 are needed; add ALFA as another case where quotes are not needed
9018 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
9019 case where quotes are not needed.
9020 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
9021 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
9022 Remove all occurrences of 'A'L'F'A
9024 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9026 * sem_ch13.adb: check legality of invariant pragma.
9028 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
9030 * bindgen.adb: Add comments.
9032 2011-08-04 Yannick Moy <moy@adacore.com>
9034 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
9036 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
9037 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
9039 2011-08-04 Robert Dewar <dewar@adacore.com>
9041 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
9042 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
9043 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
9045 2011-08-04 Thomas Quinot <quinot@adacore.com>
9047 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
9049 2011-08-04 Thomas Quinot <quinot@adacore.com>
9052 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
9055 2011-08-04 Robert Dewar <dewar@adacore.com>
9057 * einfo.ads, exp_ch4.adb: Minor reformatting.
9059 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
9061 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
9063 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9065 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
9066 type in all cases to compute list of primitive operations, because full
9067 view may be an itype that is not attached to the list of declarations.
9069 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
9071 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
9072 library has already been finalized.
9073 (Gen_Adafinal_C): Likewise.
9074 (Gen_Adainit_Ada): Generate an early return if the library has
9075 already been elaborated.
9076 (Gen_Adainit_C): Likewise.
9077 (Gen_Output_File_Ada): Generate an elaboration flag.
9078 (Gen_Output_File_C): Likewise.
9080 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9082 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
9083 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
9084 built in the first place.
9085 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
9086 for CodePeer because Finalize_Address was not built to begin with.
9087 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
9089 2011-08-04 Pascal Obry <obry@adacore.com>
9091 * adaint.c (__gnat_tmp_name): Use current process id to create temp
9092 filenames, this ensures unicity of filenames across processes.
9094 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9096 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
9097 Raise_Controlled to Raise_From_Controlled_Operation. Update the
9098 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
9099 Add False as the actual to From_Abort in the generated call to
9100 Raise_From_Controlled_Operation.
9102 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
9104 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
9105 so that the ali file name can be retrieved from outside of this package.
9106 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
9107 doing nothing in the general case, but used to update the object file
9108 timestamp if directly generated by the backend.
9109 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
9110 to a later time than the ali file one.
9112 2011-08-04 Yannick Moy <moy@adacore.com>
9114 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
9115 entities whose body contains an Annotate pragma which forces formal
9117 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
9118 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
9119 Mark_Non_ALFA_Subprogram to pass in a message and node.
9120 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
9121 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
9122 surrounding subprogram.
9123 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
9124 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
9125 as not in ALFA is annotated with Formal_Proof being On, then an error
9126 is issued based on the additional parameters for message and node.
9127 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
9128 * gcc-interface/Make-lang.in: Update dependencies.
9130 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9132 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
9133 Finalize_Address when CodePeer is enabled.
9135 2011-08-04 Pascal Obry <obry@adacore.com>
9137 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
9138 the latter returns a pointer to a static buffer which is deallocated
9139 at the end of the routine.
9141 2011-08-04 Yannick Moy <moy@adacore.com>
9143 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
9144 after index creation; mark unconstrained base array type generated as
9145 being in/not in ALFA as well
9146 (Make_Index): mark subtype created as in/not in ALFA
9147 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
9148 over a loop as in/not in ALFA, depending on its type and form of loop
9151 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9153 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
9154 directly to False on .NET and JVM.
9156 2011-08-04 Yannick Moy <moy@adacore.com>
9158 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
9159 constraint that subtype must come from source code to be in ALFA, so
9160 that anonymous subtypes can be in ALFA too.
9162 2011-08-04 Yannick Moy <moy@adacore.com>
9164 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
9165 reference for ALFA mode.
9166 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
9167 procedure public so as to use it from formal verification back-end.
9169 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
9171 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
9172 invalid checks of the Parameter, making Remove_Switch not working
9175 2011-08-04 Arnaud Charlet <charlet@adacore.com>
9177 * targparm.ads: Update header: no run-time exception is needed on this
9180 2011-08-04 Vincent Celier <celier@adacore.com>
9182 * a-fihema.adb: Use System.IO instead of GNAT.IO
9184 2011-08-04 Thomas Quinot <quinot@adacore.com>
9186 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
9187 are forbidden in Compiler_Unit mode.
9189 2011-08-04 Robert Dewar <dewar@adacore.com>
9191 * sem_util.adb: Minor reformatting.
9193 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9195 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
9196 library-level finalizers.
9197 (Gen_Finalize_Library_C): Update the import string for library-level
9199 (Gen_Finalize_Library_Defs_C): Update the definition name of a
9200 library-level finalizer.
9201 * exp_ch7.adb: Remove with and use clauses for Stringt.
9202 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
9203 Spec_Decl. Add local variable Body_Id. The names of library-level
9204 finalizers are now manually fully qualified and are no longer external.
9205 A single name is now capable of servicing .NET, JVM and non-VM targets.
9206 Pragma Export is no longer required to provide visibility for the name.
9207 (Create_Finalizer_String): Removed.
9208 (New_Finalizer_Name): New routine which mimics New_..._Name.
9210 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
9212 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
9213 elaboration counter to Standard_Short_Integer.
9214 * sem_util.adb (Build_Elaboration_Entity): Likewise.
9215 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
9216 (Gen_Elab_Externals_C): Likewise.
9218 2011-08-04 Ed Falis <falis@adacore.com>
9220 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
9221 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
9222 system-vxworks-mips.ads, system-vxworks-x86.ads
9223 (Always_Compatible_Rep): set to False for all VxWorks targets.
9225 2011-08-04 Robert Dewar <dewar@adacore.com>
9227 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
9228 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
9229 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
9230 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
9231 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
9232 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
9233 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
9234 Minor reformatting and code reorganization.
9236 2011-08-04 Emmanuel Briot <briot@adacore.com>
9238 * projects.texi: Added doc for aggregate projects.
9240 2011-08-04 Emmanuel Briot <briot@adacore.com>
9242 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
9243 Add support for overriding the Project_Path in aggregate projects.
9245 2011-08-04 Robert Dewar <dewar@adacore.com>
9247 * a-cofove.ads: Minor reformatting.
9249 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9251 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
9252 on the generated code.
9253 (Build_Finalize_Statements): Update the comment on the generated code.
9254 (Build_Initialize_Statements): Update the comment on the generated code.
9255 (Build_Object_Declarations): Add local variable Result. The object
9256 declarations are now built in sequence.
9257 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
9260 2011-08-04 Robert Dewar <dewar@adacore.com>
9262 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
9264 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
9266 * einfo.ads (Elaboration_Entity): Document new definition and use.
9267 (Elaboration_Entity_Required): Adjust to above change.
9268 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
9269 * exp_ch12.adb: And with and use for Snames.
9270 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
9271 * exp_util.adb (Set_Elaboration_Flag): Likewise.
9272 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
9273 <Check_Unit_Name>: Deal with N_Expanded_Name.
9274 <Attribute_Elaborated>: Extend to all unit names.
9275 * sem_elab.adb: And with and use for Uintp.
9276 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
9277 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
9278 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
9279 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
9280 from Gen_Adainit_Ada.
9281 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
9282 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
9283 case, do not call System.Standard_Library.Adafinal; instead call
9284 finalize_library if needed.
9285 (Gen_Adafinal_C): Likewise.
9286 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
9287 non-main program case.
9288 (Gen_Adainit_C): Generate a couple of external declarations here.
9289 In the main program case, set SSL.Finalize_Library_Objects.
9290 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
9291 (Gen_Elab_Calls_C): Likewise.
9292 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
9293 (Gen_Finalize_Library_C): Likewise. Generate a full function.
9294 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
9296 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
9297 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
9299 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
9300 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
9301 of external declarations. Call Gen_Finalize_Library_C.
9303 2011-08-04 Emmanuel Briot <briot@adacore.com>
9305 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
9306 Compute_Compilation_Phases): new subprogram.
9307 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
9308 The number of mains as well as the various compilation phases that
9309 need to be run are now project tree specific, since various
9310 aggregated trees might have different requirements. In particular,
9311 they do not all require bind or link phases.
9313 2011-08-04 Emmanuel Briot <briot@adacore.com>
9315 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
9316 (Project_Tree_Appdata): New type.
9317 It is now possible to associate application-specific data to a project
9318 tree. In particular, this is used in the gprbuild builder to avoid a
9319 number of global tables and htables, especially now that there can be
9320 several project trees loaded at once because of aggregate projects.
9321 (Debug_Name): new procedure.
9322 * projects.texi: Clarify syntax of "**" for Source_Dirs
9324 2011-08-03 Emmanuel Briot <briot@adacore.com>
9326 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
9327 the "roots" for a main.
9328 (Fill_From_Project): add support for aggregate projects. Main units
9329 in aggregated projects are now automatically added in the list of
9330 files to build (although this fails later on in gprbuild, because
9331 these files are not using the root proejct tree, so this needs
9333 * gcc-interface/Make-lang.in: Update dependencies.
9335 2011-08-03 Yannick Moy <moy@adacore.com>
9337 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
9338 conditional expression in ALFA.
9339 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
9340 expressions as not in ALFA.
9342 2011-08-03 Robert Dewar <dewar@adacore.com>
9344 * a-cofove.adb: Minor reformatting.
9346 2011-08-03 Emmanuel Briot <briot@adacore.com>
9348 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
9349 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
9351 These packages are more logically placed in the Queue package, since
9352 they manipulate the queue. It is also likely that they can be adapted
9353 for gnatmake, thus sharing more code.
9354 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
9355 that we could move the above.
9357 2011-08-03 Emmanuel Briot <briot@adacore.com>
9359 * errutil.adb (Finalize): clean up the list of error messages on exit.
9360 Calling this subprogram multiple times will no longer show duplicate
9361 error messages on stderr.
9363 2011-08-03 Emmanuel Briot <briot@adacore.com>
9365 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
9366 Getopt_Switches when we have already define a command line
9369 2011-08-03 Yannick Moy <moy@adacore.com>
9371 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
9372 in ALFA. Instead, they are considered as assertions to prove.
9373 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
9374 nodes as not in ALFA. Instead, include conditional expressions in ALFA
9375 if they have no ELSE part, or if they occur in pre- and postconditions,
9376 where the Condition cannot have side-effects in ALFA
9377 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
9378 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
9379 Instead, include type conversion between scalar types in ALFA.
9380 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
9381 if-and-only-if its type is in ALFA.
9383 2011-08-03 Thomas Quinot <quinot@adacore.com>
9385 * scos.adb, get_scos.adb, put_scos.adb
9386 New code letter for decisions: G (entry guard)
9388 (Traverse_Subprogram_Body): Rename to...
9389 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
9390 (Traverse_Protected_Body): New subprogram
9391 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
9392 protected bodies and entry bodies.
9394 2011-08-03 Yannick Moy <moy@adacore.com>
9396 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
9397 entities with get/set subprograms, which is set on procedure entities
9398 generated by the compiler for a postcondition.
9399 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
9400 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
9401 entity for a declaration
9402 (Get_Unique_Entity_For_Decl): new function returning an entity which
9403 represents a declaration, so that matching spec and body have the same
9406 2011-08-03 Robert Dewar <dewar@adacore.com>
9408 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
9409 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
9411 2011-08-03 Yannick Moy <moy@adacore.com>
9413 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
9414 library-level because retriction No_Implicit_Dynamic_Code in the
9415 front-end prevents its definition as a local subprogram
9416 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
9417 for reuse in other contexts
9418 (Traverse_Declarations_Or_Statements,
9419 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
9420 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
9421 procedures take a callback parameter to be called on all declarations
9423 (Traverse_All_Compilation_Units): new generic function to traverse a
9424 compilation unit and call a callback parameter on all declarations
9426 2011-08-03 Javier Miranda <miranda@adacore.com>
9428 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
9429 in Java since they are always enclosed in a namespace that
9430 differentiates them, and overloaded entities are supported by the VM.
9432 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9434 * checks.adb (Determine_Range): If a computed bound of an operation is
9435 outside the range of the base type of the expression, and overflow
9436 checks are enabled, the result is unknown and cannot be used for any
9437 subsequent constant folding.
9438 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
9439 unknown, so is the result of the comparison.
9441 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
9443 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
9444 From_Abort. When finalization was triggered by an abort, propagate
9445 Standard'Abort_Signal rather than Program_Error.
9446 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
9448 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
9449 From_Abort. When finalization was triggered by an abort, propagate
9450 Standard'Abort_Signal rather than Program_Error.
9451 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
9453 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
9454 Abort_Id. Update the calls to Build_Object_Declarations and
9455 Build_Raise_Statement to include Abort_Id.
9456 (Build_Adjust_Statements): New local variable Abort_Id. Update the
9457 calls to Build_Object_Declarations and Build_Raise_Statement to include
9459 (Build_Finalize_Statements): New local variable Abort_Id. Update the
9460 calls to Build_Object_Declarations and Build_Raise_Statement to include
9462 (Build_Components): Create an entity for Abort_Id when exceptions are
9463 allowed on the target.
9464 (Build_Finalizer): New local variable Abort_Id.
9465 (Build_Initialize_Statements): New local variable Abort_Id. Update the
9466 calls to Build_Object_Declarations and Build_Raise_Statement to include
9468 (Build_Object_Declarations): Add new formal Abort_Id. Create the
9469 declaration of flag Abort_Id to preserve the original abort status
9470 before finalization code is executed.
9471 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
9472 runtime routine Raise_From_Controlled_Operation.
9473 (Create_Finalizer): Update the call to Build_Raise_Statement to include
9474 Abort_Id. Update the call to Build_Object_Declarations to include
9475 Abort_Id. Update the layout of the finalizer body.
9476 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
9477 (Process_Transient_Objects): New local variable Abort_Id. Remove the
9478 clunky code to create all flags and objects related to
9479 exception propagation and replace it with a call to
9480 Build_Object_Declarations. Update the call to Build_Raise_Statement to
9482 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
9483 Add new formal Abort_Id and associated comment on its use.
9484 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
9486 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
9487 Remove the clunky code to create all flags and objects related to
9488 exception propagation and replace it with a call to
9489 Build_Object_Declarations. Update the call to Build_Raise_Statement.
9491 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
9493 * s-tassta.adb: Fix minor typos.
9495 2011-08-03 Robert Dewar <dewar@adacore.com>
9497 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
9498 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
9500 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
9502 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
9503 to packages. This ensures that the finalizer body will not end up
9504 inside the freeze node.
9505 (Process_Declarations): Add code to detect whether a freeze node has a
9506 nested finalization collection.
9508 2011-08-03 Pascal Obry <obry@adacore.com>
9510 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
9511 (Current_Session): Return a not null access to Session_Type.
9512 (Default_Session): Likewise.
9514 2011-08-03 Robert Dewar <dewar@adacore.com>
9516 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
9517 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
9519 2011-08-03 Pascal Obry <obry@adacore.com>
9521 * g-awk.ads: Minor comment fix.
9523 2011-08-03 Sergey Rybin <rybin@adacore.com>
9525 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
9526 the tree structure related to discriminant constraints.
9527 Original_Discriminant cannot be used any more for computing the
9528 defining name for the reference to a discriminant.
9530 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9532 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
9533 function is not visibly tagged, this is not a dispatching call and
9534 therfore is not Tag_Indeterminate, even if the function is marked as
9535 dispatching on result.
9537 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
9539 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
9540 (Expand_N_Free_Statement): Add a guard to protect against run-times
9541 which do not support controlled types.
9542 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
9543 against run-times which do not support controlled types.
9544 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
9545 against run-times which do not support controlled types.
9546 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
9547 against run-times which do not support controlled types.
9548 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
9549 protect against run-times which do not support controlled types.
9551 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
9553 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
9554 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
9556 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9558 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
9559 modified in the source, to prevent spurious warnings when compiling
9562 2011-08-03 Thomas Quinot <quinot@adacore.com>
9564 * a-except-2005.adb: Minor reformatting.
9566 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9568 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
9569 is a renaming declaration in the private part of a package, do not emit
9570 a warning that the with_clause could be moved because the renaming may
9571 be used in the body or in a child unit.
9573 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
9575 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
9576 Propagate the Comes_From_Source attribute from the original return
9577 object to the renaming.
9579 2011-08-03 Jose Ruiz <ruiz@adacore.com>
9581 * exp_ch7.adb (Build_Raise_Statement): Do not call
9582 Raise_From_Controlled_Operation when this routine is not present in
9583 the run-time library.
9584 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
9585 libraries (Ravenscar), tasks are non-terminating, and protected objects
9586 and tasks can only appear at library level, so we do not want
9587 finalization of protected objects nor tasks.
9588 * exp_intr.adb: Minor clarification in comment.
9589 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
9590 Gen_Output_File_C): Remove references to finalization of library-level
9591 objects when using restricted run-time libraries.
9593 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9595 * sem_ch3.adb (Build_Discriminant_Constraints): Set
9596 Original_Discriminant only if the parent type is a generic formal.
9598 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
9600 * exp_ch13.adb: Add with and use clause for Targparm;
9601 (Expand_N_Free_Statement): Prevent the generation of a custom
9602 Deallocate on .NET/JVM targets since this requires pools and address
9604 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
9605 .NET/JVM targets, attach the newly allocated object to the access
9606 type's finalization collection. Do not generate a call to
9607 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
9608 exist in the runtime.
9609 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
9610 create a custom Allocate for object that do not require initialization.
9611 Attach a newly allocated object to the access type's finalization
9612 collection on .NET/JVM.
9613 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
9614 assignment of controlled types on .NET/JVM. The two hidden pointers
9615 Prev and Next and stored and later restored after the assignment takes
9617 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
9618 kludge for .NET/JVM to recognize a particular piece of code coming from
9619 Heap_Management and change the call to Finalize into Deep_Finalize.
9620 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
9621 finalization collections on .NET/JVM only for types derived from
9622 Controlled. Separate the association of storage pools with a collection
9623 and only allow it on non-.NET/JVM targets.
9624 (Make_Attach_Call): New routine.
9625 (Make_Detach_Call): New routine.
9626 (Process_Object_Declarations): Suppress the generation of
9627 build-in-place return object clean up code on .NET/JVM since it uses
9629 * exp_ch7.ads (Make_Attach_Call): New routine.
9630 (Make_Detach_Call): New routine.
9631 * exp_intr.adb Add with and use clause for Targparm.
9632 (Expand_Unc_Deallocation): Detach a controlled object from a collection
9633 on .NET/JVM targets.
9634 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
9635 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
9636 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
9637 names used in finalization.
9639 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
9641 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
9642 (Attach, Detach): Lock the current task when chaining an object onto a
9645 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
9647 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
9648 Rewritten to create the message strings when the exception is not
9649 raised by an abort during finalization.
9650 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
9651 Raise_From_Controlled_Operation and update its associated comment.
9652 * a-fihema.ads, a-fihema.adb: New GNAT unit.
9653 Ada.Finalization.Heap_Management provides key functionality
9654 associated with controlled objects on the heap, their creation,
9655 finalization and reclamation. Type Finalization_Collection is
9656 effectively a wrapper which sits ontop of a storage pool and performs
9657 all necessary bookkeeping for all the objects it contains. Each
9658 access-to-controlled or access-to-class-wide type receives a collection
9659 as part of its expansion. The compiler generates buffer code and
9660 invokes Allocate / Deallocate to create and destroy allocated
9662 * a-finali.adb ("="): Removed.
9663 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
9664 fields Prev and Next.
9665 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
9666 A library unit with at least one controlled object on the library level
9667 has a special finalizer which is invoked by the binder. To signal this,
9668 ali files carry field PF.
9669 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
9670 associated comment on field usage.
9671 * a-tags.adb (Get_RC_Offset): Removed.
9672 (Needs_Finalization): New routine.
9673 * a-tags.ads: Update the structure of the GNAT dispatch tables.
9674 Dispatch tables now carry field Needs_Finalization which provides
9675 runtime indication whether a type is controlled or has controlled
9676 components or both. Remove field RC_Offset.
9677 (Get_RC_Offset): Removed along with its associated pragma Export.
9678 Since tagged types with controlled components no longer carry hidden
9679 field _controller, the special mechanism to retrieve its location is no
9681 (Needs_Finalization): New routine.
9682 * atree.ads, atree.adb (Elist24): New routine.
9683 (Set_Elist24): New routine.
9684 * atree.h: Add a define clause for Elist24.
9685 * bindgen.adb New library-level variable Lib_Final_Built.
9686 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
9687 presence of a VM target, the routine generates calls to the proper
9688 library finalization routine.
9689 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
9690 targets. Set the correct library finalization routine depending on
9691 whether the library has controlled objects or this is a VM compilation.
9692 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
9693 to library-level finalizers of compiled units in reverse order of
9694 elaboration. It also produces exception management code and reraises a
9695 potential exception after all units have been finalized.
9696 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
9697 library-level finalizers of compiled units in reverse order of
9699 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
9700 definitions of all library-level finalizers available to the compilation
9701 (Gen_Main_Ada): Directly call Adafinal which now contails all target
9703 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
9704 System.Standard_Library.Adafinal directly. If the library needs
9705 finalization actions, create the sequence of finalization calls.
9706 (Gen_Output_File_Ada): Alphabetize local variables and constants.
9707 Generate a with clause for System.Soft_Links when compiling for a VM.
9708 Remove the code which imports System.Standard_Library.Adafinal as
9709 Do_Finalize. Generate the library finalization routine.
9710 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
9711 If the library needs finalization actions, create all the definitions
9712 of library- level finalizers.
9713 (Has_Finalizer): New routine. Determines whether at least one compiled
9714 unit has a library-level finalizer.
9715 Add type Qualification_Mode.
9716 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
9717 * einfo.adb: New usage of field 15 as Return_Flag.
9718 Remove Finalization_Chain_Entity from the usages of field 19.
9719 Remove Associated_Final_Chain from the usages of field 23.
9720 New usage of field 23 as Associated_Collection.
9721 New usage of field 24 as Finalizer.
9722 New usage of flag 252 as Is_Processed_Transient.
9723 (Associated_Final_Chain): Removed.
9724 (Associated_Collection): New routine.
9725 (Finalization_Chain_Entity): Removed.
9726 (Finalizer): New routine.
9727 (Is_Finalizer): New routine.
9728 (Is_Processed_Transient): New routine.
9729 (Return_Flag): New routine.
9730 (Set_Associated_Final_Chain): Removed.
9731 (Set_Associated_Collection): New routine.
9732 (Set_Finalization_Chain_Entity): Removed.
9733 (Set_Finalizer): New routine.
9734 (Set_Is_Processed_Transient): New routine.
9735 (Set_Return_Flag): New routine.
9736 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
9738 (Write_Field8_Name): Alphabetize the output.
9739 (Write_Field11_Name): Alphabetize the output.
9740 (Write_Field12_Name): Alphabetize the output.
9741 (Write_Field13_Name): Alphabetize the output.
9742 (Write_Field14_Name): Alphabetize the output.
9743 (Write_Field15_Name): Alphabetize the output.
9744 (Write_Field16_Name): Alphabetize the output.
9745 (Write_Field17_Name): Alphabetize the output.
9746 (Write_Field18_Name): Alphabetize the output.
9747 (Write_Field19_Name): Alphabetize the output. Remove the output of
9748 Finalization_Chain_Entity.
9749 (Write_Field20_Name): Alphabetize the output.
9750 (Write_Field21_Name): Alphabetize the output.
9751 (Write_Field22_Name): Alphabetize the output.
9752 (Write_Field23_Name): Alphabetize the output. Remove the output of
9753 Associated_Final_Chain. Add output for Associated_Collection.
9754 (Write_Field24_Name): Alphabetize the output.
9755 (Write_Field25_Name): Add output for Finalizer.
9756 (Write_Field26_Name): Alphabetize the output.
9757 (Write_Field27_Name): Alphabetize the output.
9758 (Write_Field28_Name): Alphabetize the output.
9759 * einfo.ads: Add new field description for Associated_Collection and
9761 Remove Associated_Final_Chain and its uses in nodes.
9762 Remove Finalization_Chain_Entity and its uses in nodes.
9763 Add new field description for Finalizer and its uses in nodes.
9764 Add new synthesized attribute Is_Finalizer.
9765 Add new flag description for Is_Processed_Transient and its uses in
9767 Add new field description for Return_Flag and its uses in nodes.
9768 (Associated_Final_Chain): Removed along with its pragma Inline.
9769 (Associated_Collection): New routine and pragma Inline.
9770 (Finalization_Chain_Entity): Removed along with its pragma Inline.
9771 (Finalizer): New routine and pragma Inline.
9772 (Is_Finalizer): New routine and pragma Inline.
9773 (Is_Processed_Transient): New routine and pragma Inline.
9774 (Return_Flag): New routine and pragma Inline.
9775 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
9776 (Set_Associated_Collection): New routine and pragma Inline.
9777 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
9778 (Set_Finalizer): New routine and pragma Inline.
9779 (Set_Is_Processed_Transient): New routine and pragma Inline.
9780 (Set_Return_Flag): New routine and pragma Inline.
9781 * exp_aggr.adb: Alphabetize subprograms.
9782 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
9783 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
9784 associated comments. Remove local variables External_Final_List and
9786 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
9787 Ancestor. Remove the retrieval of finalization lists. Update the call to
9789 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
9790 lists. Update the call to Late_Expansion.
9791 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
9792 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
9793 (Gen_Assign): Remove the retrieval of the finalization list used to
9794 build the assignment. Update the calls to Make_Init_Call and
9796 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
9797 Remove the mechanism to determine attachment levels and finalization
9798 list retrieval. Remove the processing for coextensions.
9799 (Init_Controller): Removed. Controllers no longer exist.
9800 (Late_Expansion): Remove formals Flist and Obj along with their
9801 associated comments. Update the calls to Build_Record_Aggr_Code and
9802 Build_Array_Aggr_Code.
9803 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
9804 (Expand_N_Freeze_Entity): Add special processing for finalizers which
9805 appear in entry bodies, protected subprograms and task bodies.
9806 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
9807 * exp_ch3.adb (Add_Final_Chain): Removed.
9808 (Build_Array_Init_Proc): Alphabetize local variables.
9809 (Build_Assignment): Alphabetize local variables. Update the call to
9811 (Build_Class_Wide_Master): Rename local variables to better reflect
9813 (Build_Discriminant_Assignments): Code reformatting.
9814 (Build_Init_Call_Thru): Code reformatting.
9815 (Build_Init_Procedure): Code reformatting. Generate a special version
9816 of Deep_Finalize which is capable of finalizing all initialized
9817 components and ignore the rest.
9818 (Build_Init_Statements): Rename local variables to better reflect their
9820 Reimplement the mechanism to include the creation and update of an index
9821 variable called a "counter". It is used as a bookmark for tracing
9822 initialized and non-initialized components.
9823 (Build_Initialization_Call): Remove local variable Controller_Typ.
9824 Alphabetize all local variables. Remove the initialization of the
9825 record controller and update the call to Make_Init_Call.
9826 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
9827 New local variable Counter.
9828 (Constrain_Array): Alphabetize.
9829 (Expand_Freeze_Array_Type): Create a collection instead of a
9831 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
9832 Finalize_Address which is used in conjunction with allocated controlled
9834 (Expand_N_Object_Declaration): Remove the creation of a finalization
9835 list for anonymous access types. Update the calls to Make_Init_Call and
9837 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
9838 retrieval of finalization lists. Remove the expansion of the record
9839 controller. Create TSS primitive Finalize_Address used in conjunction
9840 with controlled objects on the heap. Create finalization collections
9841 for access-to-controlled record components.
9842 (Expand_Record_Controller): Removed.
9843 (Freeze_Type): Remove the freezing of record controllers. Freezing of
9844 class-wide types now requires additional processing. Create
9845 finalization collections for access-to-controlled types.
9846 (Increment_Counter): New routine.
9847 (Make_Counter): New routine.
9848 (Make_Eq_If): Remove the mention of Name_uController.
9849 (Make_Predefined_Primitive_Specs): There is no longer need to skip
9850 types coming from System.Finalization_Root.
9851 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
9852 (Predefined_Primitive_Bodies): There is no longer need to skip types
9853 coming from System.Finalization_Root.
9854 (Stream_Operation_OK): Do not generate stream routines for
9855 type Ada.Finalization.Heap_Management.Finalization_Collection.
9856 * exp_ch3.ads: Alphabetize subprograms.
9857 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
9858 Add with and use clause for Lib.
9859 (Complete_Coextension_Finalization): Removed.
9860 (Complete_Controlled_Allocation): New routine. Create a finalization
9861 collection for anonymous access-to-controlled types. Create a custom
9862 Allocate which interfaces with the back end and the machinery in
9864 (Expand_Allocator_Expression): Add necessary calls to
9865 Complete_Controlled_Allocation. Remove the retrieval of finalization
9866 lists. Update the calls to Make_Adjust_Call. Generate a call to
9867 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
9868 the associated collection.
9869 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
9870 Code clean up. Remove the retrieval of finalization lists and
9872 Update the call to Make_Init_Call. Generate a call to
9873 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
9874 the associated collection.
9875 (Get_Allocator_Final_List): Removed. Finalization lists are not
9877 (Suitable_Element): Remove the mention of Name_uController.
9878 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
9879 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
9880 the left hand side, carry out the assignment and adjust the left hand
9882 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
9883 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
9884 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
9885 BIP_Collection and BIPcollection.
9886 (Build_Heap_Allocator): New routine used to allocate the return object
9887 of a build-in-place function onto a collection.
9888 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
9889 (Expand_Call): Do not replace direct calls to Deep routines with their
9891 (Expand_N_Extended_Return_Statement): Give all variables shorter names
9892 and update their occurrences. Add a special return flag to monitor the
9893 [ab]normal execution of the function. The flag is set right before the
9895 Rewrite the mechanism used to allocate a build-in-place return object
9896 on the heap or on a storage pool.
9897 (Is_Direct_Deep_Call): New routine.
9898 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
9899 build-in-place function call instead of a final list. Build a call to
9900 Set_Finalize_Address_Ptr to decorate the associated collection.
9901 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
9902 order to name the build-in-place function call's result for later
9903 finalization. Add a collection to a build-in-place function call
9904 instead of a final list.
9905 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
9906 build-in-place function call instead of a final list. Remove the code
9907 which moves one final list and transforms it into the actual in a
9908 nested build-in-place call.
9909 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
9910 build-in-place function call instead of a final list.
9911 (Move_Final_List): Removed.
9912 (Needs_BIP_Collection): New routine.
9913 (Needs_BIP_Final_List): Removed.
9914 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
9915 enumeration type BIP_Formal_Kind.
9916 Update the related comment.
9917 (Needs_BIP_Collection): New routine.
9918 (Needs_BIP_Final_List): Removed.
9919 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
9920 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
9921 majority of subprograms in this unit. Add Name_Finalize_Address to
9922 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
9923 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
9924 statements for an array type.
9925 (Build_Adjust_Statements): Create the adjust statements for a record
9927 (Build_Cleanup_Statements): New routine. A procedure which given any
9928 construct containing asynchronous calls, references to _master, or is a
9929 task body, a task allocation or a protected body produces the necessary
9930 runtime calls to clean up these constructs.
9931 (Build_Exception_Handler): New routine.
9932 (Build_Final_List): Removed.
9933 (Build_Finalization_Collection): New routine. A core procedure which
9934 creates a collection to service heap allocated controlled objects
9935 associated with an access-to-controlled type.
9936 (Build_Finalize_Statements): Create the finalization statements for a
9938 (Build_Finalizer): New routine. A core procedure which given any
9939 construct with declarations and/or statements detects all objects which
9940 need any type of clean up (controlled objects, protected objects) and
9941 generates all necessary code to clean up the said objects in the proper
9943 (Build_Finalizer_Call): New routine.
9944 (Build_Initialize_Statements): Create the initialization statements for
9945 an array type. The generated routine contains code to finalize partially
9947 (Build_Object_Declarations): New routine.
9948 (Build_Raise_Statement): New routine.
9949 (Clean_Simple_Protected_Objects): Removed.
9950 (Controller_Component): Removed.
9951 (Enclosing_Function): New routine.
9952 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
9953 either declarations or statements or both.
9954 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
9955 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
9957 (Find_Final_List): Removed.
9958 (Global_Flist_Ref): Removed.
9959 (In_Finalization_Root): Removed.
9960 (Insert_Actions_In_Scope_Around): Determine the range of the transient
9961 scope in terms of tree nodes. Process all transient variables within
9963 (Make_Adjust_Call): Rewritten. There is no longer an attach call
9964 generated after the adjust.
9965 (Make_Attach_Call): Removed.
9966 (Make_Call): New routine.
9967 (Make_Clean): Removed.
9968 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
9970 (Make_Deep_Proc): Rewritten to generate the new profile signature used
9972 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
9974 (Make_Final_Call): Modified to simply create a call to either
9975 Deep_Finalize or Finalize.
9976 (Make_Finalize_Address_Body): New routine.
9977 (Make_Finalize_Address_Stmts): New routine. A function which produces
9978 TSS primitive Finalize_Address used in conjunction with heap allocated
9980 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
9981 (Make_Init_Call): Rewritten. There is no longer an attach call
9982 generated after initialization.
9983 (Make_Local_Deep_Finalize): New routine.
9984 (Make_Set_Finalize_Address_Ptr_Call): New routine.
9985 (Make_Transient_Block): Remove the finalization list retrieval and
9987 (Needs_Finalization): Moved to Exp_Util.
9988 (Parent_Field_Type): New routine.
9989 (Preprocess_Components): New routine.
9990 (Process_Transient_Objects): New routine.
9991 (Wrap_HSS_In_Block): New routine.
9992 (Wrap_Transient_Declaration): Remove finalization list management and
9993 controller insertion.
9994 (Wrap_Transient_Expression): Code reformatting.
9995 (Wrap_Transient_Statement): Code reformatting.
9996 * exp_ch7.ads (Build_Final_List): Removed.
9997 (Build_Finalization_Collection): New routine.
9998 (Build_Raise_Statement): New routine.
9999 (Controller_Component): Removed.
10000 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
10001 (Find_Final_List): Removed.
10002 (In_Finalization_Root): Removed.
10003 (Is_Simple_Protected_Type): Update related comment.
10004 (Make_Adjust_Call): New parameter profile and associated comments.
10005 (Make_Attach_Call): Removed.
10006 (Make_Final_Call): New parameter profile and associated comments.
10007 (Make_Finalize_Address_Body): New routine.
10008 (Make_Init_Call): New parameter profile and associated comments.
10009 (Make_Local_Deep_Finalize): New routine.
10010 (Make_Set_Finalize_Address_Ptr_Call): New routine.
10011 (Needs_Finalization): Moved to Exp_Util.
10012 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
10013 (Expand_N_Protected_Body): Remove the handling of finalization lists.
10014 (Find_Protection_Type): Moved to Exp_Util.
10015 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
10016 (Make_DT): Update sequence of dispatch table initialization. Remove the
10017 initialization of field RC_Offset. Add initialization of field Needs_
10019 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
10020 Reimplement how an object is first finalized, then deallocated.
10021 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
10023 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
10024 Register TSS_Finalize_Address with type TSS_Names.
10025 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
10026 procedure provides the interface between an allocation / deallocation
10027 and the support machinery in Ada.Finalization.Heap_Management.
10028 (Find_Init_Call): Code reformatting.
10029 (Find_Init_Call_In_List): Code reformatting.
10030 (Find_Protection_Type): Moved from Exp_Ch9.
10031 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
10032 (Has_Controlled_Coextensions): Removed.
10033 (Has_Controlled_Objects): New routine.
10034 (In_Library_Level_Package_Body): New routine.
10035 (Insert_Action_After): New routine.
10036 (Is_Finalizable_Transient): New routine. This predicate determines
10037 whether an object declaration is one of the many variants of controlled
10039 (Is_Null_Access_BIP_Func_Call): New routine.
10040 (Is_Non_BIP_Func_Call): New routine.
10041 (Is_Related_To_Func_Return): New routine.
10042 (Needs_Finalization): Moved from Exp_Ch7.
10043 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
10044 (Find_Protection_Type): Moved from Exp_Ch9.
10045 (Has_Controlled_Coextensions): Removed.
10046 (Has_Controlled_Objects): New routine.
10047 (In_Library_Level_Package_Body): New routine.
10048 (Insert_Action_After): New routine.
10049 (Is_Finalizable_Transient): New routine.
10050 (Is_Null_Access_BIP_Func_Call): New routine.
10051 (Is_Non_BIP_Func_Call): New routine.
10052 (Is_Related_To_Func_Return): New routine.
10053 (Needs_Finalization): Moved from Exp_ch7.
10054 * expander.adb (Expand): Add a case for N_Free_Statement.
10055 * freeze.adb (Freeze_All): Replace the generation of a finalization
10056 list with a collection for access-to-controlled types.
10057 (Freeze_Entity): Code reformatting.
10058 (Freeze_Record_Type): Remove the freezing of a record controller
10060 (Freeze_Subprogram): Code reformatting.
10061 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
10063 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
10064 has a library-level finalizer.
10065 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
10066 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
10067 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
10068 files. Add a-fihema to the list of object files.
10070 Alphabetize the associations in type Is_Parameterless_Attribute.
10071 * rtsfind.ads: Ada.Finalization_List.Controller and
10072 System.Finalization_Implementation are no longer a GNAT unit.
10073 Update the range of type Ada_Finalization_Child. Remove the following
10074 recoverable entities:
10076 RE_Attach_To_Final_List
10080 RE_Finalizable_Ptr_Ptr
10081 RE_Global_Final_List
10082 RE_Limited_Record_Controller
10085 RE_Record_Controller
10086 RE_Simple_List_Controller
10088 Add the following recoverable entities:
10090 RE_Add_Offset_To_Address
10094 RE_Exception_Identity
10095 RE_Finalization_Collection
10096 RE_Finalization_Collection_Ptr
10097 RE_Needs_Finalization
10098 RE_Save_Library_Occurrence
10099 RE_Set_Finalize_Address_Ptr
10100 RE_Set_Storage_Pool_Ptr
10102 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
10104 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
10105 (First_Stored_Discriminant): Remove the mention of Name_uController.
10106 * sem_aux.ads: Comment reformatting.
10107 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
10108 to redecorate an already existing class-wide type.
10109 (Decorate_Tagged_Type): New parameter profile and associated comment.
10110 Create a "shadow class-wide type" for a shadow entity.
10111 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
10112 of the final chain along with the associated comment.
10113 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
10114 Full_Desig and set it to the full view of the designated type.
10115 Initialize the finalization collection to empty.
10116 (Build_Derived_Record_Type): Alphabetize local variables. Code
10118 (Collect_Fixed_Components): Remove the mention of Name_uController.
10119 (Create_Constrained_Components): Remove the mention of Name_uController.
10120 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
10121 class-wide type of a shadow entity.
10122 (Process_Full_View): Update the machinery which marks type
10123 Limited_Controlled's entity as limited.
10124 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
10125 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
10126 list, instead make a collection build-in-place formal.
10127 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
10128 a designated type in order to establish a match between the renaming
10129 and the renamed entity.
10130 (Find_Selected_Component): Add guard to prevent spurious exceptions
10131 from being raised on .NET/JVM.
10132 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
10133 to the list of primitive that need special processing. Update arrays
10134 C_Names and D_Names.
10135 (Replace_Types): Handle class-wide types.
10136 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
10137 different parameter profile, look at the first formal.
10138 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
10139 use clauses for Exp_Util.
10140 * sem_res.adb: Remove with and use clauses for Elists.
10141 (Propagate_Coextensions): Removed.
10142 (Resolve_Allocator): Do not propagate the list of coextensions from one
10143 allocator to another.
10144 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
10145 Deaccessed_T to Desig_Typ.
10146 (Enter_Name): Remove the mention of Name_uController.
10147 (Gather_Components): Remove the mention of Name_uController.
10148 (Incomplete_Or_Private_View): New routine.
10149 (Is_Coextension_Root): Removed.
10150 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
10151 * sem_util.ads (Incomplete_Or_Private_View): New routine.
10152 (Is_Coextension_Root): Removed.
10153 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
10154 Controlled types are now derived from a null tagged record. Remove
10155 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
10156 * sinfo.adb (Coextensions): Removed.
10157 (Set_Coextensions): Removed.
10158 * sinfo.ads: Remove Coextensions from the explanation of node fields
10159 and its uses in nodes.
10160 Update the field usage of N_Allocator.
10161 (Coextensions): Removed along with its pragma Inline.
10162 (Set_Coextensions): Removed along with its pragma Inline.
10163 * snames.ads-tmpl: Remove names
10168 Name_uLocal_Final_List
10169 Name_Finalization_Root
10176 Name_Finalize_Address
10177 * s-pooglo.adb (Allocate): Add overriding indicator.
10178 (Deallocate): Add overriding indicator.
10179 (Storage_Size): Add overriding indicator.
10180 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
10181 than Finalize_Global_List.
10182 (Null_Finalize_Global_List): Removed.
10183 (Save_Library_Occurrence): New routine.
10184 * s-soflin.ads: Remove variable Finalize_Global_List along with its
10185 initialization. Add variable Finalize_Library_Objects along with its
10186 pragma Export. Add variables Library_Exception and
10187 Library_Exception_Set along with their pragma Export.
10188 (Null_Finalize_Global_List): Removed.
10189 (Save_Library_Occurrence): New routine.
10190 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
10191 rather than Finalize_Global_List.
10192 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
10193 of the constructed node.
10195 2011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10197 * link.c: Include "auto-host.h" before system headers.
10199 2011-08-03 Vincent Celier <celier@adacore.com>
10201 * make.adb (Gnatmake): Add to table Library_Projs only library projects
10202 that are not extended. Do not check if a library project that is
10203 extended should be regenerated. Do not add to table Library_Paths the
10204 libraries that are in extended projects. Link only with libraries that
10205 are in libray projects that are not extended.
10206 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
10207 for a library project that is extended.
10209 2011-08-03 Gary Dismukes <dismukes@adacore.com>
10211 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
10212 conforming subprogram renamings that appear to be completions if they
10213 are not fully conformant.
10214 Such renamings are homographs but not completions.
10215 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
10216 names in a subprogram renaming that appears in an instance.
10218 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10220 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
10221 not immutably limited, build actual subtype from expression to provide
10222 proper bounds to caller.
10224 2011-08-03 Gary Dismukes <dismukes@adacore.com>
10226 * sem_ch8.adb: Minor comment correction.
10228 2011-08-03 Thomas Quinot <quinot@adacore.com>
10230 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
10231 returning a limited array, use an extended return statement.
10233 2011-08-03 Vincent Celier <celier@adacore.com>
10235 * make.adb (Initialize): If --subdirs= is used, but no project file is
10236 specified, attempt to create the specify subdir if it does not already
10237 exist and use it as the object directory as if -D had been specified.
10239 2011-08-03 Arnaud Charlet <charlet@adacore.com>
10241 * s-tpopsp-vms.adb: New file.
10242 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
10243 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
10245 2011-08-03 Emmanuel Briot <briot@adacore.com>
10247 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
10250 2011-08-03 Yannick Moy <moy@adacore.com>
10252 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
10253 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
10254 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
10255 detect that an array has static bounds.
10257 2011-08-03 Thomas Quinot <quinot@adacore.com>
10259 * exp_dist.adb: Minor reformatting.
10261 2011-08-03 Arnaud Charlet <charlet@adacore.com>
10263 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
10264 (ATCB_Key): Removed, not always used.
10266 2011-08-03 Emmanuel Briot <briot@adacore.com>
10268 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
10269 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
10270 most remaining global variables.
10272 2011-08-03 Robert Dewar <dewar@adacore.com>
10274 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
10275 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
10278 2011-08-03 Javier Miranda <miranda@adacore.com>
10280 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
10281 that must be passed by copy in VM targets.
10283 2011-08-03 Emmanuel Briot <briot@adacore.com>
10285 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
10286 duplicates a similar htable now in the project tree.
10288 2011-08-03 Claire Dross <dross@adacore.com>
10290 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
10291 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
10292 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
10293 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
10294 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
10295 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
10296 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
10299 2011-08-03 Arnaud Charlet <charlet@adacore.com>
10301 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
10302 (ATCB_Key): Removed, not always used.
10303 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
10304 s-taprop-posix.adb.
10305 * s-tpopsp-tls.adb: New file.
10306 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
10307 x86/x64/ia64/powerpc/sparc Linux.
10309 2011-08-03 Arnaud Charlet <charlet@adacore.com>
10311 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
10312 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
10314 2011-08-03 Thomas Quinot <quinot@adacore.com>
10316 * rtsfind.ads, exp_dist.adb, exp_dist.ads
10317 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
10318 Fix type selection for mapping integer types to PolyORB types.
10320 2011-08-03 Bob Duff <duff@adacore.com>
10322 * sem_ch7.adb: Minor comment clarification.
10324 2011-08-03 Bob Duff <duff@adacore.com>
10326 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
10327 an error analyzing a choice, skip further processing. Further
10328 processing could cause a crash or cascade errors.
10330 2011-08-03 Emmanuel Briot <briot@adacore.com>
10332 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
10333 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
10334 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
10335 prj-env.ads (Shared_Project_Tree_Data): new type
10336 An aggregate project and its aggregated trees need to share the common
10337 data structures used for lists of strings, packages,... This makes the
10338 code simpler since otherwise we have to pass the root tree (also used
10339 for the configuration file data) in addition to the current project
10340 tree. This also avoids ambiguities as to which tree should be used.
10341 And finally this saves a bit of memory.
10342 (For_Every_Project_Imported): new parameter Tree.
10343 Since aggregated projects are using a different tree, we need to let
10344 the caller know which tree to use to manipulate the returned project.
10346 2011-08-03 Robert Dewar <dewar@adacore.com>
10348 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
10349 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
10350 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
10351 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
10353 2011-08-03 Javier Miranda <miranda@adacore.com>
10355 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
10356 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
10358 2011-08-03 Bob Duff <duff@adacore.com>
10360 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
10363 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
10365 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
10366 g-sehash.ads: Fix typo. Update header.
10368 2011-08-03 Thomas Quinot <quinot@adacore.com>
10370 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
10373 2011-08-03 Gary Dismukes <dismukes@adacore.com>
10375 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
10376 prefixes of private types along with records, since the selector may be
10378 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
10379 private types along with records, since the selector may be a
10382 2011-08-03 Emmanuel Briot <briot@adacore.com>
10384 * prj-pp.adb (Pretty_Print): Remove trailing blank line.
10386 2011-08-03 Javier Miranda <miranda@adacore.com>
10388 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
10389 Tagged_Type_Expansion.
10391 2011-08-03 Yannick Moy <moy@adacore.com>
10393 * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
10394 violation when the argument of concatenation is the name of a
10397 2011-08-03 Emmanuel Briot <briot@adacore.com>
10399 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
10400 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
10401 (Process_Declarative_Items): new parameter Child_Env.
10403 2011-08-03 Yannick Moy <moy@adacore.com>
10405 * alfa.ads: Update format of ALFA section in ALI file in order to
10406 add a mapping from bodies to specs when both are present.
10407 (ALFA_Scope_Record): Add components for spec file/scope.
10408 * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
10410 * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
10411 collected, fill in the spec information when relevant.
10412 * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
10415 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
10417 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
10418 code unit to decide whether to add internally generated subprograms.
10420 2011-08-03 Javier Miranda <miranda@adacore.com>
10422 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
10423 * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
10424 be handled by copy in VM targets.
10426 2011-08-03 Emmanuel Briot <briot@adacore.com>
10428 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
10429 code with Makeutl.Get_Switches.
10430 * prj-tree.adb: Update comment.
10432 2011-08-03 Thomas Quinot <quinot@adacore.com>
10434 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
10435 subprogram with a limited formal that does not support external
10438 2011-08-03 Yannick Moy <moy@adacore.com>
10440 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
10442 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
10443 not from current unit in two phases, because it is not possible to
10444 change the table while iterating over its content.
10445 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
10447 2011-08-03 Sergey Rybin <rybin@adacore.com>
10449 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
10450 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
10452 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10454 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
10455 and the component type is composite, this is ambiguous for predefined
10456 concatenation, but if the node is not overloaded and the entity is a use
10457 -defined function its profile can be used to resolve that aggregate.
10459 2011-08-03 Robert Dewar <dewar@adacore.com>
10461 * exp_ch4.adb: Minor code cleanup.
10463 2011-08-03 Thomas Quinot <quinot@adacore.com>
10465 * exp_dist.adb: Do not generate distribution stubs if serious errors
10466 have been diagnosed.
10468 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10470 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
10471 the first formal of a primitive operation, go to the base type to
10472 handle properly an access to a derived type with constrained
10474 * sem_type.adb (Disambiguate): an immediately visible operator hides a
10475 user-defined function that is only use-visible.
10477 2011-08-03 Robert Dewar <dewar@adacore.com>
10479 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
10480 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
10481 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
10482 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
10483 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
10484 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
10485 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
10486 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
10488 2011-08-03 Robert Dewar <dewar@adacore.com>
10490 * repinfo.adb (List_Mechanism): Add handling of
10491 Convention_Ada_Pass_By_XXX.
10492 * sem_mech.adb (Set_Mechanism): Ditto.
10493 * sem_prag.adb (Process_Convention): Add entries for
10494 Convention_Ada_Pass_By_XXX.
10495 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
10497 2011-08-03 Pascal Obry <obry@adacore.com>
10499 * makeutl.adb: Minor reformatting.
10501 2011-08-03 Vincent Celier <celier@adacore.com>
10504 (Get_File_Name) If the file cannot be found when there are no config
10505 pragmas file and May_Fail is True, return No_File instead of the file
10506 name, to be consistent.
10508 2011-08-03 Pascal Obry <obry@adacore.com>
10510 * adaint.c (__gnat_is_executable_file_attr): Avoid access
10513 2011-08-03 Javier Miranda <miranda@adacore.com>
10516 (Same_Representation): In VM targets the representation of arrays with
10517 aliased components differs from arrays with non-aliased components.
10519 2011-08-03 Emmanuel Briot <briot@adacore.com>
10521 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
10522 not systematically lower case attribute indexes that contain no "."
10523 Fix definition of several Naming attributes, which take
10524 a unit name as index and therefore should be case insensitive.
10525 Minor refactoring (reduce length of variable names).
10527 2011-08-03 Emmanuel Briot <briot@adacore.com>
10529 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
10531 2011-08-03 Emmanuel Briot <briot@adacore.com>
10533 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
10534 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
10535 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
10536 prj-tree.ads (Prj.Tree.Environment): new type.
10538 2011-08-03 Emmanuel Briot <briot@adacore.com>
10540 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
10541 prj-tree.adb, prj-tree.ads (Environment): new type.
10543 2011-08-03 Emmanuel Briot <briot@adacore.com>
10545 * prj-tree.ads: Remove unused variable.
10547 2011-08-03 Yannick Moy <moy@adacore.com>
10549 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
10550 issuing messages related to SPARK restriction violation.
10552 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10554 * sem_ch6.adb: guard against error nodes in return statements.
10556 2011-08-03 Arnaud Charlet <charlet@adacore.com>
10558 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
10559 a warning can only appear on a configuration file, so emit warning
10560 without further checks.
10562 2011-08-03 Arnaud Charlet <charlet@adacore.com>
10564 * s-interr.ads: add overriding keyword.
10566 2011-08-03 Geert Bosch <bosch@adacore.com>
10568 * exp_attr.adb: Fix minor typo.
10570 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10572 * par-ch4.adb: improve error recovery.
10574 2011-08-03 Emmanuel Briot <briot@adacore.com>
10576 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
10577 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
10578 to Errout_Handling.
10580 2011-08-03 Emmanuel Briot <briot@adacore.com>
10582 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
10583 "external" as an attribute name in aggregate projects.
10585 2011-08-03 Jose Ruiz <ruiz@adacore.com>
10587 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
10588 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
10589 from 0, so we need to adjust.
10591 2011-08-03 Emmanuel Briot <briot@adacore.com>
10593 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
10594 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
10596 2011-08-03 Yannick Moy <moy@adacore.com>
10598 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
10599 restriction on overloaded entity if the entity is not an operator.
10601 2011-08-03 Yannick Moy <moy@adacore.com>
10603 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
10604 restrict.ads: Rename remaining Check_Formal_Restriction* into
10605 Check_SPARK_Restriction*.
10607 2011-08-03 Emmanuel Briot <briot@adacore.com>
10609 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
10610 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
10612 (Project_Empty): removed
10613 (Empty_Project): new parameter Qualifier
10614 This is used to have fields specific to aggregate projects, cleaner
10615 New field to store the list of aggregated projects.
10616 (Check_Aggregate_Project): removed
10617 (Process_Aggregated_Projects, Free): new subprograms.
10619 2011-08-03 Olivier Hainque <hainque@adacore.com>
10621 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
10623 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10625 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
10626 explicit dereference of an unconstrained type, create a constrained
10627 subtype for it, as is done for function calls that return an
10628 unconstrained type.
10630 2011-08-03 Thomas Quinot <quinot@adacore.com>
10632 * g-pehage.adb (Finalize): Avoid possible double-free.
10634 2011-08-03 Steve Baird <baird@adacore.com>
10636 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
10637 Elab_Spec/Body attrs in CodePeer_Mode.
10639 2011-08-03 Javier Miranda <miranda@adacore.com>
10641 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
10642 low bound is not known at compile time but they have no others choice.
10643 Done because in this case the bounds can be obtained directly from the
10646 2011-08-03 Ed Falis <falis@adacore.com>
10648 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
10649 on VxWorks SMP. Remove unusable constant ANY_CPU.
10651 2011-08-03 Emmanuel Briot <briot@adacore.com>
10653 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
10654 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
10655 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
10656 Prj.Env.Initialize_Empty): new subprograms
10657 (Get_Env, Find_Project): remove parameter Target_Name.
10659 2011-08-03 Gary Dismukes <dismukes@adacore.com>
10661 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
10662 as a condition for the delayed call to Derived_Subprograms done for the
10663 case of the rewriting of a derived type that constrains the
10664 discriminants of its parent type.
10665 Avoids redundant subprogram derivations for private subtype derivations.
10667 2011-08-03 Javier Miranda <miranda@adacore.com>
10669 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
10670 Build_Record_Aggr_Code.
10671 (Build_Record_Aggr_Code): Add missing support to initialize hidden
10672 discriminants in extension aggregates.
10674 2011-08-03 Emmanuel Briot <briot@adacore.com>
10676 * prj-pp.adb (Print): also output project qualifiers, since in
10677 particular "aggregate" is mandatory in an aggregate project.
10679 2011-08-03 Emmanuel Briot <briot@adacore.com>
10681 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
10682 (Debug_Output): new function.
10684 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
10686 * gnat_ugn.texi: Document -Wstack-usage.
10687 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
10689 2011-08-03 Thomas Quinot <quinot@adacore.com>
10691 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
10692 have keyword LIMITED.
10694 2011-08-03 Yannick Moy <moy@adacore.com>
10696 * alfa.adb, alfa.ads, alfa_test.adb: New files.
10697 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
10698 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
10699 section (does not happen in compiler, only if code directly calls
10701 * get_alfa.adb, get_alfa.ads: New files.
10702 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
10704 * lib-xref-alfa.adb: New file.
10705 * lib-xref.adb, lib-xref.ads
10706 (Xref_Entry): redefine information needed in cross-references for ALFA.
10707 Push ALFA treatments in separated local package.
10708 (Enclosing_Subpragram_Or_Package): treat specially subprogram
10709 identifiers. Return entity of package body instead of spec. Return
10710 Empty for a scope with no location.
10711 (Generate_Reference): adapt to new components for ALFA information.
10712 Remove the need for D references on definitions.
10713 (Is_Local_Reference): moved to ALFA local package
10714 (Output_References): extract subfunction as Extract_Source_Name
10715 (Output_Local_References): remove procedure, replaced by filtering of
10716 cross-references in package ALFA and printing in Put_ALFA.
10717 (Write_Entity_Name): remove procedure
10718 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
10719 print exact name of entity as it appears in source file
10720 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
10721 * put_alfa.adb, put_alfa.ads: New files.
10722 * xref_lib.adb (Search_Xref): protect read of cross-references against
10723 reading other sections of the ALI file, in gnatxref
10724 (Search): protect read of cross-references against reading other
10725 sections of the ALI file, in gnatfind.
10726 * gcc-interface/Make-lang.in: Update dependencies.
10728 2011-08-03 Thomas Quinot <quinot@adacore.com>
10730 * sem_ch3.adb: Minor reformatting.
10732 2011-08-03 Jose Ruiz <ruiz@adacore.com>
10734 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
10735 raising an exception.
10737 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10739 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
10740 type, always use 1 as the lower bound or string, even if lower bound of
10741 context is not static, to handle properly null strings in a non-static
10744 2011-08-03 Bob Duff <duff@adacore.com>
10746 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
10747 always legal on the right-hand side of an assignment statement; there
10748 is always an applicable index constraint in this case. Therefore, the
10749 check for Pkind = N_Assignment_Statement is now unconditional -- it
10750 doesn't depend on whether Is_Constrained (Typ).
10752 2011-08-03 Robert Dewar <dewar@adacore.com>
10754 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
10756 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10758 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
10759 for an itype created within a generic unit.
10761 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
10763 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
10764 suppresses all inlining.
10766 2011-08-03 Robert Dewar <dewar@adacore.com>
10768 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
10769 exp_aggr.adb: Minor reformatting.
10771 2011-08-03 Thomas Quinot <quinot@adacore.com>
10773 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
10774 tagged assignment when discriminant checks are suppressed. This is
10775 useless and extremely costly in terms of static stack usage.
10777 2011-08-03 Bob Duff <duff@adacore.com>
10779 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
10780 of generics, because this leads to the wrong entity in the wrong scope,
10781 causing (e.g.) pragma Export_Procedure to get an error if the entity is
10783 (Process_Interface_Name): Follow Alias for instances of generics, to
10784 correct for the above change.
10786 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10788 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
10789 is an integer literal it is always safe to replace the reference. In
10790 addition, if the reference appears in the generated code for an object
10791 declaration it is necessary to copy because otherwise the reference
10792 might be to the uninitilized value of the discriminant of the object
10795 2011-08-03 Pascal Obry <obry@adacore.com>
10797 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
10798 ACL used, in this case we want to check for ending .exe, not .exe
10799 anywhere in the path.
10801 2011-08-03 Sergey Rybin <rybin@adacore.com>
10803 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
10804 the tree structure (semantic decoration of references to record
10807 2011-08-03 Gary Dismukes <dismukes@adacore.com>
10809 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
10810 choices of a named array aggregate, bail out when any choices are
10811 marked as Errors_Posted.
10813 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10815 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
10816 in which entity is frozen, to handle properly loop variables in
10819 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10821 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
10822 subtype is not static, compute the upper bound using attributes, to
10823 handle properly index types that are not integer types.
10825 2011-08-03 Bob Duff <duff@adacore.com>
10827 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
10828 Update copyright notice.
10830 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10832 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
10833 Original_Discriminant if within an instance.
10834 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
10836 2011-08-03 Thomas Quinot <quinot@adacore.com>
10838 * einfo.ads: Minor reformatting.
10840 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10842 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
10843 composite type with an unfrozen subcomponent, in the profile of a
10844 primitive operation.
10846 2011-08-03 Robert Dewar <dewar@adacore.com>
10848 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
10850 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10852 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
10853 unconstrained type with discriminants is initialized with an aggregate,
10854 use the constrained subtype of the aggregate as the type of the object,
10855 because it is immutable, and this allows the back-end to generate no
10856 code for the object declaration.
10858 2011-08-03 Robert Dewar <dewar@adacore.com>
10860 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
10861 comparison operand is variable, and turns out to be zero or negative.
10863 2011-08-03 Javier Miranda <miranda@adacore.com>
10866 (Expand_Dispatching_Constructor_Call): Disable expansion of
10867 code required for native targets. Done to avoid generating
10868 references to unavailable runtime entities in VM targets.
10870 (Expand_N_Object_Declaration): Add missing support to handle
10871 the explicit initialization of class-wide interface objects.
10874 2011-08-03 Matthew Heaney <heaney@adacore.com>
10876 * a-cobove.adb (Merge): Move source onto target, instead of using
10879 2011-08-03 Matthew Heaney <heaney@adacore.com>
10881 * a-cbdlli.adb (Splice): Move source items from first to last.
10883 2011-08-03 Yannick Moy <moy@adacore.com>
10885 * sem_util.ads: Add comment.
10887 2011-08-03 Javier Miranda <miranda@adacore.com>
10890 (Expand_Record_Aggregate): In VM targets disable the expansion into
10891 assignments of aggregates whose type is not known at compile time.
10893 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10895 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
10896 protected entries and task entries, to build the proper renaming
10897 declaration for entry formals, used in debugging.
10898 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
10899 parameters in the same way.
10901 2011-08-02 Robert Dewar <dewar@adacore.com>
10903 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
10904 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
10905 code reorganization.
10907 2011-08-02 Robert Dewar <dewar@adacore.com>
10909 * debug.adb: Debug flag d.P to suppress length comparison optimization
10910 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
10911 comparison of Length by comparing First/Last instead.
10913 2011-08-02 Matthew Heaney <heaney@adacore.com>
10915 * a-cobove.ads: Code clean up.
10917 2011-08-02 Vincent Celier <celier@adacore.com>
10919 * adaint.c (file_names_case_sensitive_cache): New static int.
10920 (__gnat_get_file_names_case_sensitive): Cache the return value in
10921 file_names_case_sensitive_cache at the first invocation, to avoid
10922 multiple calls to getenv.
10924 2011-08-02 Bob Duff <duff@adacore.com>
10926 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
10928 2011-08-02 Yannick Moy <moy@adacore.com>
10930 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
10931 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
10932 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
10933 indicate that we are in a precondition or postcondition. This is used in
10934 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
10935 decide whether to flag the spec or body of the current subprogram as
10938 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
10940 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
10942 * a-extiin.ads: New file.
10944 2011-08-02 Bob Duff <duff@adacore.com>
10946 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
10947 now raises Name_Error instead of Use_Error in certain cases. The other
10948 parts of this AI were already implemented properly.
10950 2011-08-02 Vincent Celier <celier@adacore.com>
10952 * link.c: Only import "auto-host.h" when building the gnattools.
10954 2011-08-02 Yannick Moy <moy@adacore.com>
10956 * sem_util.adb: Inter-unit inlining does not work for a subprogram
10957 which calls a local subprogram, so extract subprogram
10958 from Mark_Non_ALFA_Subprogram_Body.
10960 2011-08-02 Javier Miranda <miranda@adacore.com>
10963 (Extract_Dispatching_Call): If the type of the dispatching object is an
10964 access type then return an explicit dereference in the Object out-mode
10967 2011-08-02 Gary Dismukes <dismukes@adacore.com>
10969 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
10970 compatibility checks for all indexes of an array subtype, not just the
10971 first. Reset Has_Dynamic_Range_Check on the subtype before each
10972 potential check to ensure that Insert_Range_Checks will not elide any
10973 of the dynamic checks.
10975 2011-08-02 Yannick Moy <moy@adacore.com>
10977 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
10978 SPARK restriction at parsing time.
10979 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
10980 directive only if the SPARK restriction is set for this unit.
10982 2011-08-02 Yannick Moy <moy@adacore.com>
10984 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
10985 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
10986 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
10987 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
10988 Mark_Non_ALFA_Subprogram_Body.
10989 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
10992 2011-08-02 Yannick Moy <moy@adacore.com>
10994 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
10997 2011-08-02 Robert Dewar <dewar@adacore.com>
10999 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
11000 exp_ch3.adb: Minor reformatting.
11002 2011-08-02 Emmanuel Briot <briot@adacore.com>
11004 * adaint.c (__gnat_locate_exec_on_path): only returns executable
11005 files, not any regular file.
11006 (__gnat_locate_file_with_predicate): new subprogram.
11008 2011-08-02 Yannick Moy <moy@adacore.com>
11010 * sinfo.adb, sinfo.ads: Restrict the use of flags
11011 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
11012 nodes, plus N_Subtype_Declaration for the 2nd one.
11014 2011-08-02 Sergey Rybin <rybin@adacore.com>
11016 * gnat_rm.texi: Ramification of pragma Eliminate documentation
11017 - fix bugs in the description of Source_Trace;
11018 - get rid of UNIT_NAME;
11020 2011-08-02 Javier Miranda <miranda@adacore.com>
11023 (Build_Dispatching_Requeue): Adding support for VM targets
11024 since we cannot directly reference the Tag entity.
11025 * exp_sel.adb (Build_K): Adding support for VM targets.
11026 (Build_S_Assignment): Adding support for VM targets.
11028 (Default_Prim_Op_Position): In VM targets do not restrict availability
11029 of predefined interface primitives to compiling in Ada 2005 mode.
11030 (Is_Predefined_Interface_Primitive): In VM targets this service is not
11031 restricted to compiling in Ada 2005 mode.
11032 (Make_VM_TSD): Generate code that declares and initializes the OSD
11033 record. Needed to support dispatching calls through synchronized
11036 (Make_Predefined_Primitive_Specs): Enable generation of predefined
11037 primitives associated with synchronized interfaces.
11038 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
11039 primitives associated with synchronized interfaces.
11041 2011-08-02 Yannick Moy <moy@adacore.com>
11043 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
11044 statements hidden in SPARK if preceded by the HIDE directive
11045 (Parse_Exception_Handlers): mark each exception handler in a sequence of
11046 exception handlers as hidden in SPARK if preceded by the HIDE directive
11047 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
11048 if starting with the HIDE directive
11049 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
11050 starting with the HIDE directive; mark the declarations in a private
11051 part as hidden in SPARK if the private part starts with the HIDE
11053 * restrict.adb, restrict.ads
11054 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
11055 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
11056 argument node belongs to a part which is hidden in SPARK
11057 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
11058 parts in SPARK; protect the possibly costly call to
11059 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
11060 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
11061 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
11062 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
11064 (Scan): recognize special comment starting with '#' and followed by
11065 SPARK keyword "hide" as a HIDE directive.
11067 2011-08-02 Yannick Moy <moy@adacore.com>
11069 * types.ads, erroutc.ads: Minor reformatting.
11071 2011-08-02 Vincent Celier <celier@adacore.com>
11073 * link.c: Add response file support for cross platforms.
11075 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11077 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
11078 in an association, set parent field of copy before partial analysis.
11079 * sem_res.adb (Resolve_Slice): create reference to itype only when
11080 expansion is enabled.
11082 2011-08-02 Yannick Moy <moy@adacore.com>
11084 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
11085 for new flag denoting which subprogram bodies are in ALFA
11086 * restrict.adb, sem_ch7.adb: Update comment
11087 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
11088 sem_ch9.adb, sem_res.adb: Add calls to
11089 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
11090 * sem_ch6.adb (Analyze_Function_Return): add calls to
11091 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
11092 middle of the body, and extended return.
11093 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
11094 False when missing return.
11095 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
11096 to True for subprograms whose spec is in ALFA. Remove later on the flag
11097 on the entity used for a subprogram body when there exists a separate
11099 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
11100 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
11101 False, otherwise do nothing.
11103 2011-08-02 Robert Dewar <dewar@adacore.com>
11105 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
11107 2011-08-02 Yannick Moy <moy@adacore.com>
11109 * sem_ch4.ads: minor formatting.
11111 2011-08-02 Yannick Moy <moy@adacore.com>
11113 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
11114 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
11115 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
11116 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
11117 opt.ads: cleanup of SPARK mode
11119 2011-08-02 Yannick Moy <moy@adacore.com>
11121 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
11123 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
11124 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
11126 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
11127 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
11128 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
11129 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
11131 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
11133 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
11134 functions whose return type is not in ALFA.
11135 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
11137 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
11138 parameter's type is not in ALFA.
11139 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
11142 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11144 * sem_ch6 (Analyze_Expression_Function): treat the function as
11145 Inline_Always, and introduce a subprogram declaration for it when it is
11147 * inline.adb (Add_Inlined_Body): recognize bodies that come from
11148 expression functions, so that the back-end can determine whether they
11149 can in fact be inlined.
11150 * sem_util.adb (Is_Expression_Function): predicate to determine whether
11151 a function body comes from an expression function.
11153 2011-08-02 Gary Dismukes <dismukes@adacore.com>
11155 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
11156 null exclusions to test Can_Never_Be_Null on the anonymous access types
11157 of the formals rather than testing the formals themselves. Exclude this
11158 check in cases where the Old_Formal is marked as a controlling formal,
11159 to avoid issuing spurious errors for bodies completing dispatching
11160 operations (due to the flag not getting set on controlling access
11161 formals in body specs).
11162 (Find_Corresponding_Spec): When checking full and subtype conformance of
11163 subprogram bodies in instances, pass Designated and E in that order, for
11164 consistency with the expected order of the formals (New_Id followed by
11167 2011-08-02 Robert Dewar <dewar@adacore.com>
11169 * sem_ch8.adb: Minor reformatting.
11171 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11173 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
11174 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
11175 primitive operations of class-wide actuals.
11177 2011-08-02 Javier Miranda <miranda@adacore.com>
11179 * exp_atag.ads, exp_atag.adb
11180 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
11181 since its value is implicitly passed in argument Typ.
11182 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
11183 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
11184 Build_Common_Dispatching_Select_Statements.
11186 2011-08-02 Robert Dewar <dewar@adacore.com>
11188 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
11189 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
11190 Minor reformatting.
11192 2011-08-02 Robert Dewar <dewar@adacore.com>
11194 * sem_res.adb: Minor reformatting.
11195 * sem_prag.adb: Minor reformatting.
11197 2011-08-02 Javier Miranda <miranda@adacore.com>
11199 * exp_atag.adb, exp_atags.ads
11200 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
11201 by the tagged type Entity. Required to use this routine in the VM
11202 targets since we do not have available the Tag entity in the VM
11205 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
11206 Ada.Tags has not been previously loaded.
11208 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
11209 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
11211 (Enclosing_Dynamic_Scope): Add missing support to handle the full
11212 view of enclosing scopes. Required to handle enclosing scopes that
11213 are synchronized types whose full view is a task type.
11215 (Build_VM_TSDs): Minor code improvement to avoid generating and
11216 analyzing lists with empty nodes.
11217 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
11218 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
11219 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
11220 (Make_Disp_Timed_Select_Body): Add support for VM targets.
11221 (Make_Select_Specific_Data_Table): Add support for VM targets.
11222 (Make_VM_TSD): Generate code to initialize the SSD structure of
11225 2011-08-02 Yannick Moy <moy@adacore.com>
11227 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
11228 cross-references section in ALI.
11229 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
11230 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
11232 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
11233 subprogram or package entity of a node
11234 (Is_Local_Reference_Type): new function returns True for references
11235 selected in local cross-references.
11236 (Lt): function extracted from Lt in Output_References
11237 (Write_Entity_Name): function extracted from Output_References
11238 (Generate_Definition): generate reference with type 'D' for definition
11239 of objects (object declaration and parameter specification), with
11240 appropriate locations and units, for use in local cross-references.
11241 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
11242 references of type 'I' for initialization in object definition.
11243 (Output_References): move part of function Lt and procedure
11244 Write_Entity_Name outside of the body. Ignore references of types 'D'
11245 and 'I' introduced for local cross-references.
11246 (Output_Local_References): new procedure to output the local
11247 cross-references sections.
11248 (Lref_Entity_Status): new array defining whether an entity is a local
11249 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
11250 with 'I' type when initialization expression is present.
11251 * get_scos.adb, get_scos.ads: Correct comments and typos
11253 2011-08-02 Javier Miranda <miranda@adacore.com>
11255 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
11257 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
11259 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
11262 2011-08-02 Vincent Celier <celier@adacore.com>
11264 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
11265 (No_Space_Img): New function
11266 (Find_Excluded_Sources): When reading from a file, record the file name
11267 and the line number for each excluded source.
11268 (Mark_Excluded_Sources): When reporting an error, if the excluded
11269 sources were read from a file, include file name and line number in
11272 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11274 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
11276 2011-08-02 Robert Dewar <dewar@adacore.com>
11278 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
11280 2011-08-02 Javier Miranda <miranda@adacore.com>
11282 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
11283 generation of TSDs to the DOTNET compiler.
11284 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
11285 generation of TSDs to the DOTNET compiler.
11287 2011-08-02 Javier Miranda <miranda@adacore.com>
11289 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
11290 record of all the tagged types declared inside library level package
11291 declarations, library level package bodies or library level subprograms.
11292 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
11293 associated with a given tagged type.
11294 (Build_VM_TSDs): New subprogram.
11295 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
11296 compilation units that are subprograms.
11297 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
11298 compilation units that are package bodies.
11299 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
11300 units that are a package declaration or a package instantiation.
11301 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
11302 reorganization to improve the error generated by the frontend when the
11303 function Ada.Tags.Secondary_Tag is not available.
11304 * rtsfind.ads (RE_Register_TSD): New runtime entity.
11305 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
11307 2011-08-02 Javier Miranda <miranda@adacore.com>
11309 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
11311 2011-08-02 Robert Dewar <dewar@adacore.com>
11313 * s-imenne.ads: Minor reformatting.
11315 2011-08-02 Robert Dewar <dewar@adacore.com>
11317 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
11318 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
11319 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
11321 2011-08-02 Robert Dewar <dewar@adacore.com>
11323 * einfo.ads (Materialize_Entity): Document this is only for renamings
11324 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
11325 required debug information in the case where we transform the object
11326 declaration into a renaming declaration.
11327 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
11329 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
11330 Materialize_Entity.
11332 2011-08-02 Robert Dewar <dewar@adacore.com>
11334 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
11335 Suppress_Init_Procs.
11336 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
11337 Suppress_Initialization/Initialization_Suppressed.
11338 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
11339 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
11340 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
11341 * sem_prag.adb: New processing for pragma Suppress_Initialization.
11343 2011-08-02 Robert Dewar <dewar@adacore.com>
11345 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
11346 Minor reformatting.
11348 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11350 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
11351 only have inheritable classwide pre/postconditions.
11353 2011-08-02 Javier Miranda <miranda@adacore.com>
11355 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
11356 * rtsfind.ads (RE_Check_TSD): New runtime entity.
11357 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
11358 checks if the external tag of a type is the same as the external tag
11359 of some other declaration.
11361 2011-08-02 Thomas Quinot <quinot@adacore.com>
11363 * s-taskin.ads: Minor reformatting.
11365 2011-08-02 Emmanuel Briot <briot@adacore.com>
11367 * g-comlin.adb (Display_Help): swap the order in which it prints the
11368 short help and the general usage.
11370 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11372 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
11373 the aspect declarations and attach them to the generic copy for
11374 subsequent analysis.
11375 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
11376 declarations of the generic tree to the new subprogram declarations.
11377 * sem_attr.adb (Check_Precondition_Postcondition): recognize
11378 conditions that apply to a subprogram instance.
11380 2011-08-02 Robert Dewar <dewar@adacore.com>
11382 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
11384 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11386 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
11387 private type with a tagged full view is not derived in the immediate
11388 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
11390 2011-08-02 Robert Dewar <dewar@adacore.com>
11392 * exp_ch4.adb: Minor reformatting.
11394 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11396 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
11397 Ada2012 iterator, the loop will be rewritten during expansion into a
11398 while loop with a cursor and an element declaration. Do not analyze the
11399 body in this case, because if the container is for indefinite types the
11400 actual subtype of the elements will only be determined when the cursor
11401 declaration is analyzed.
11403 2011-08-02 Arnaud Charlet <charlet@adacore.com>
11405 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
11406 size/alignment related attributes in CodePeer_Mode.
11408 2011-08-02 Gary Dismukes <dismukes@adacore.com>
11410 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
11411 Prepend_Element, since this can result in the operation getting the
11412 wrong slot in the full type's dispatch table if the full type has
11413 inherited operations. The incomplete type's operation will get added
11414 to the proper position in the full type's primitives
11415 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
11416 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
11417 dispatching operations, since there are cases where nonprimitive
11418 subprograms can get added to the list of incomplete dependents (such
11419 as subprograms in nested packages).
11420 * sem_ch6.adb (Process_Formals): First, remove test for being in a
11421 private part when determining whether to add a primitive with a
11422 parameter of a tagged incomplete type to the Private_Dependents list.
11423 Such primitives can also occur in the visible part, and should not have
11424 been excluded from being private dependents.
11425 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
11426 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
11427 list of a Taft-amendment incomplete type is a primitive before issuing
11428 an error that the full type must appear in the same unit. There are
11429 cases where nonprimitives can be in the list (such as subprograms in
11431 * sem_disp.adb (Derives_From): Use correct condition for checking that
11432 a formal's type is derived from the type of the corresponding formal in
11433 the parent subprogram (the condition was completely wrong). Add
11434 checking that was missing for controlling result types being derived
11435 from the result type of the parent operation.
11437 2011-08-02 Yannick Moy <moy@adacore.com>
11439 * errout.adb (First_Node): minor renaming
11440 * restrict.adb (Check_Formal_Restriction): put restriction warning on
11443 2011-08-02 Yannick Moy <moy@adacore.com>
11445 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
11446 before accessing operands.
11447 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
11448 decide whether an initialization expression respects SPARK rules, as
11449 the plain node is the expanded one. This allows for more valid warnings
11451 * gnat_rm.texi: Minor update.
11453 2011-08-02 Arnaud Charlet <charlet@adacore.com>
11455 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
11458 2011-08-02 Robert Dewar <dewar@adacore.com>
11460 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
11462 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
11464 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
11465 loop statements and the element renaming declaration with a block when
11466 the element type is controlled.
11468 2011-08-02 Yannick Moy <moy@adacore.com>
11470 * sinfo.ads: Minor formatting.
11472 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11474 * sem_aggr.adb (Add_Association): if the association has a box and no
11475 expression, use the Sloc of the aggregate itself for the new
11477 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
11480 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
11482 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
11483 When a container is provided via a function call, generate a renaming
11484 of the function result. This avoids the creation of a transient scope
11485 and the premature finalization of the container.
11486 * exp_ch7.adb (Is_Container_Cursor): Removed.
11487 (Wrap_Transient_Declaration): Remove the supression of the finalization
11488 of the list controller when the declaration denotes a container cursor,
11491 2011-08-02 Yannick Moy <moy@adacore.com>
11493 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
11494 node is from source, instead of the original node being from source.
11496 (Resolve_Array_Aggregate): refine the check for a static expression, to
11497 recognize also static ranges
11498 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
11499 Array_Type_Declaration): postpone the test for the type being a subtype
11500 mark after the type has been resolved, so that component-selection and
11501 expanded-name are discriminated.
11502 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
11503 to distinguish the case of an iteration scheme, so that an error is
11504 issed on a non-static range in SPARK except in an iteration scheme.
11505 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
11506 In_Iter_Schm = True.
11507 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
11508 user-defined operators so that they are allowed in renaming
11510 (Find_Selected_Component): refine the check for prefixing of operators
11511 so that they are allowed in renaming. Move the checks for restrictions
11512 on selector name after analysis discriminated between
11513 component-selection and expanded-name.
11514 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
11515 concatenation argument of string type if it is static.
11516 * sem_util.adb, sem_util.ads
11517 (Check_Later_Vs_Basic_Declarations): add a new function
11518 Is_Later_Declarative_Item to decice which declarations are allowed as
11519 later items, in the two different modes Ada 83 and SPARK. In the SPARK
11520 mode, add that renamings are considered as later items.
11521 (Enclosing_Package): new function to return the enclosing package
11522 (Enter_Name): correct the rule for homonyms in SPARK
11523 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
11524 from source (result of expansion) to avoid issuing wrong warnings.
11526 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11528 * errout.adb: On anything but an expression First_Node returns its
11531 2011-08-02 Pascal Obry <obry@adacore.com>
11533 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
11535 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
11537 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
11538 Set the associated loop as the related expression of internally
11540 * exp_ch7.adb (Is_Container_Cursor): New routine.
11541 (Wrap_Transient_Declaration): Supress the finalization of the list
11542 controller when the declaration denotes a container cursor.
11544 2011-08-02 Yannick Moy <moy@adacore.com>
11546 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
11548 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
11549 expression is a simple expression. This check cannot be performed in
11550 the semantics, so just drop it.
11551 (P_Index_Or_Discriminant_Constraint): move check that the index or
11552 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
11553 semantics. Other cases were previously checked in the semantics.
11554 * par-ch4.adb (P_Name): move checks that a selector name is not
11555 character literal or an operator symbol to Find_Selected_Component in
11557 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
11558 declarations are not placed after later declarations in a separate
11559 procedure in Sem_Util (possibly not the best choice?), to be used both
11560 during parsing, for Ada 83 mode, and during semantic analysis, for
11562 * par-endh.adb (Check_End): move check that end label is not missing
11563 to Process_End_Label in the semantics
11564 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
11565 the special case for SPARK restriction
11566 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
11567 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
11568 parameter Force to issue the error message even on internal node (used
11569 for generated end label). Call Check_Restriction to check when an error
11570 must be issued. In SPARK mode, issue an error message even if the
11571 restriction is not set.
11572 (Check_Restriction): new procedure with an additional out parameter to
11573 inform the caller that a message has been issued
11574 * sem_aggr.adb: Minor modification of message
11575 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
11576 instead of issuing an error message directly
11577 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
11578 declarations are not placed after later declarations, by calling
11579 Check_Later_Vs_Basic_Declarations
11580 (Analyze_Subtype_Declaration): move here the check that an index or
11581 discriminant constraint must be a subtype mark. Change the check that
11582 a subtype of String must start at one so that it works on subtype marks.
11583 * sem_ch4.adb (Analyze_Call): move here the check that a named
11584 association cannot follow a positional one in a call
11585 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
11586 instead of issuing an error message directly
11587 * sem_ch8.adb (Find_Selected_Component): move here the check that a
11588 selector name is not a character literal or an operator symbol. Move
11589 here the check that the prefix of an expanded name cannot be a
11590 subprogram or a loop statement.
11591 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
11592 procedure called from parsing and semantics to check that basic
11593 declarations are not placed after later declarations
11594 (Process_End_Label): move here the check that end label is not missing
11596 2011-08-02 Arnaud Charlet <charlet@adacore.com>
11598 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
11599 representation clause in codepeer mode, since it confuses CodePeer and
11600 does not bring useful info.
11602 2011-08-02 Ed Falis <falis@adacore.com>
11604 * init.c: initialize fp hw on MILS.
11606 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11608 * errout.adb (First_Node): for bodies, return the node itself (small
11609 optimization). For other nodes, do not check source_unit if the node
11610 comes from Standard.
11612 2011-08-02 Robert Dewar <dewar@adacore.com>
11614 * exp_ch3.adb: Minor comment additions.
11615 * sem_ch13.adb: Minor reformatting.
11617 2011-08-02 Pascal Obry <obry@adacore.com>
11619 * make.adb, makeutl.adb: Removes some superfluous directory separator.
11621 2011-08-02 Robert Dewar <dewar@adacore.com>
11623 * sem_attr.adb: Minor reformatting.
11625 2011-08-02 Robert Dewar <dewar@adacore.com>
11627 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
11628 (Has_Default_Component_Value): Removed
11629 * einfo.ads Comment updates
11630 (Has_Default_Aspect): Replaces Has_Default_Value
11631 (Has_Default_Component_Value): Removed
11633 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
11635 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
11636 (Get_Simple_Init_Val): Handle Default_Value aspect
11637 (Needs_Simple_Initialization): Handle Default_Value aspect
11638 * exp_ch3.ads: Needs_Simple_Initialization
11639 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
11640 * par-prag.adb (Pragma_Default[_Component]Value) Removed
11642 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
11643 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
11644 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
11646 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11648 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
11649 package containing iteration primitives.
11650 exp_ch5.adb (Expand_Iterator_Loop): ditto.
11652 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11654 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
11655 "of", pre-analyze expression in case it is a function call with
11656 finalization actions that must be placed ahead of the loop.
11657 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
11658 on an Ada2012 iterator, insert them ahead of the rewritten loop.
11660 2011-08-02 Geert Bosch <bosch@adacore.com>
11662 * cstand.adb (Create_Float_Types): Only consider C's long double for
11663 Long_Long_Float, in addition to double.
11665 2011-08-02 Robert Dewar <dewar@adacore.com>
11667 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
11668 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
11669 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
11670 Minor reformatting.
11672 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11674 * sem_attr.adb: handle properly 'Result when it is a prefix of an
11677 2011-08-02 Javier Miranda <miranda@adacore.com>
11679 * einfo.ads, einfo.adb
11680 (Original_Access_Type): Move this attribute to Node26 since there was
11681 an undocumented use of Node21 in E_Access_Subprogram_Type entities
11682 which causes conflicts and breaks the generation of the .NET compiler.
11683 (Interface_Name): Add missing documentation on JGNAT only uses of
11686 2011-08-02 Geert Bosch <bosch@adacore.com>
11688 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
11689 (Find_Back_End_Float_Type): Likewise
11690 (Create_Back_End_Float_Types): Likewise
11691 (Create_Float_Types): Likewise
11692 (Register_Float_Type): Likewise
11693 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
11694 Nlist and split out type selection in new local Find_Base_Type function.
11695 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
11697 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
11699 2011-08-02 Robert Dewar <dewar@adacore.com>
11701 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
11703 * opt.ads: Minor comment change.
11704 * sem_ch12.adb: Minor code reorganization.
11706 2011-08-02 Gary Dismukes <dismukes@adacore.com>
11708 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
11709 subtype's list of rep items to the list on the full subtype in the case
11710 where the lists are the same.
11712 2011-08-02 Geert Bosch <bosch@adacore.com>
11714 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
11715 using the one from System.Strings, which also deallocates all strings.
11717 2011-08-02 Geert Bosch <bosch@adacore.com>
11719 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
11721 * gcc-interface/Make-lang.in: Update dependencies.
11723 2011-08-02 Olivier Hainque <hainque@adacore.com>
11725 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
11728 2011-08-02 Javier Miranda <miranda@adacore.com>
11730 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
11731 associated with anonymous access to subprograms.
11733 2011-08-02 Geert Bosch <bosch@adacore.com>
11736 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
11737 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
11738 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
11739 (Add_Symbol_Definition): Move to switch-c.adb
11740 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
11741 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
11742 (Add_Symbol_Definition): Move to switch-c.adb.
11743 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
11745 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
11746 Move to warnsw.adb.
11747 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
11748 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
11749 Move to warnsw.adb.
11750 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
11751 (Add_Symbol_Definition): Moved from Prepcomp.
11752 * switch-c.ads: Update copyright notice. Use String_List instead of
11753 Argument_List, removing dependency on System.OS_Lib.
11755 2011-08-02 Yannick Moy <moy@adacore.com>
11757 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
11758 mode on initialization expression which does not respect SPARK
11760 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
11761 if the tree referenced by its argument represents an initialization
11762 expression in SPARK, suitable for initializing an object in an object
11765 2011-08-02 Javier Miranda <miranda@adacore.com>
11767 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
11768 internally generated access to subprogram with its associated protected
11770 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
11772 2011-08-02 Geert Bosch <bosch@adacore.com>
11774 * cstand.adb (Register_Float_Type): Print information about type to
11775 register, if the Debug_Flag_Dot_B is set.
11776 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
11777 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
11778 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
11779 with a requested precision of more than Max_Digits digits and no more
11780 than Max_Base_Digits digits, if a range specification is present and the
11781 Predefined_Float_Types list has a suitable type to derive from.
11782 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
11783 case of type completion with pragma Import
11785 (Process_Import_Predefined_Type): Processing to complete a type
11786 with pragma Import. Currently supports floating point types only.
11787 (Set_Convention_From_Pragma): Do nothing without underlying type.
11788 (Process_Convention): Guard against absence of underlying type,
11789 which may happen when importing incomplete types.
11790 (Process_Import_Or_Interface): Handle case of importing predefined
11791 types. Tweak error message.
11793 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11795 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
11796 functions to previous change. Reorganize code slightly.
11798 2011-08-02 Geert Bosch <bosch@adacore.com>
11800 * back_end.ads (Register_Type_Proc): New call back procedure type for
11801 allowing the back end to provide information about available types.
11802 (Register_Back_End_Types): New procedure to register back end types.
11803 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
11805 * cstand.adb (Back_End_Float_Types): New list for floating point types
11806 supported by the back end.
11807 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
11808 (Copy_Float_Type): New procedure to make new copies of predefined types.
11809 (Register_Float_Type): New call back procedure to populate the BEFT list
11810 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
11811 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
11812 (Create_Float_Types): New procedure to create entities for floating
11813 point types predefined in Standard, and put these and any remaining
11814 BEFTs on the Predefined_Float_Types list.
11815 * stand.ads (Predefined_Float_Types): New list for predefined floating
11816 point types that do not have declarations in package Standard.
11818 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11820 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
11821 entity node for the unit containing the parameter.
11822 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
11823 (Add_Inlined_Subprogram): Likewise.
11824 * gcc-interface/Make-lang.in: Update dependencies.
11826 2011-08-02 Thomas Quinot <quinot@adacore.com>
11828 * s-stusta.adb (Print): Make sure Pos is always initialized to a
11831 2011-08-02 Geert Bosch <bosch@adacore.com>
11833 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
11835 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11837 * sem_type.adb (Covers): Move trivial case to the top and reuse the
11838 computed value of Base_Type.
11840 2011-08-02 Yannick Moy <moy@adacore.com>
11842 * restrict.adb (Check_Restriction): issue an error for any use of
11843 class-wide, even if the No_Dispatch restriction is not set.
11844 * sem_aggr.adb: Correct typos in comments and messages in formal mode
11845 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
11846 when completing a private extension, the type named in the private part
11847 is not the same as that named in the visible part.
11848 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
11849 of an inherited primitive operations of a tagged type or type extension
11850 that returns the tagged type.
11851 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
11852 function which returns True for an implicit operation inherited by the
11853 derived type declaration for the argument type.
11854 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
11857 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11859 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
11860 Process_Bounds, to perform analysis with expansion of a range or an
11861 expression that is the iteration scheme for a loop.
11862 (Analyze_Iterator_Specification): If domain of iteration is given by a
11863 function call with a controlled result, as is the case if call returns
11864 a predefined container, ensure that finalization actions are properly
11866 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
11868 2011-08-02 Javier Miranda <miranda@adacore.com>
11870 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
11871 * gcc-interface/Make-lang.in: Update dependencies.
11873 2011-08-02 Javier Miranda <miranda@adacore.com>
11875 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
11876 determine if the analysis is performed using N or Original_Node (N).
11877 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
11878 functionality of routine Is_Variable avoids code duplication.
11879 * checks.adb (Determine_Range): Handle temporaries generated by
11880 Remove_Side_Effects.
11882 2011-08-02 Javier Miranda <miranda@adacore.com>
11884 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
11885 expansion of the condition. Required since the previous analysis was
11886 done with expansion disabled (see Resolve_Quantified_Expression) and
11887 hence checks were not inserted and record comparisons have not been
11890 2011-08-02 Ed Falis <falis@adacore.com>
11892 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
11895 2011-08-02 Bob Duff <duff@adacore.com>
11897 * opt.ads: Minor comment fix.
11899 2011-08-02 Bob Duff <duff@adacore.com>
11901 * sem_ch12.adb (Analyze_Package_Instantiation,
11902 Analyze_Subprogram_Instantiation): Turn off style checking while
11903 analyzing an instance. Whatever style checks that apply to the generic
11904 unit should apply, so it makes no sense to apply them in an instance.
11905 This was causing trouble when compiling an instance of a runtime
11906 unit that violates the -gnatyO switch.
11907 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
11908 one of the two case statements, causing spurious errors.
11910 2011-08-02 Robert Dewar <dewar@adacore.com>
11912 * uname.adb: Minor reformatting.
11913 * gnatcmd.adb: Minor reformatting.
11914 * exp_attr.adb: Minor reformatting.
11916 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11918 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
11919 No_Dispatching_Calls, do not look for the Assign primitive, because
11920 predefined primitives are not created in this case.
11922 2011-08-02 Bob Duff <duff@adacore.com>
11924 * stylesw.ads: Minor comment fixes.
11926 2011-08-02 Robert Dewar <dewar@adacore.com>
11928 * freeze.adb (Add_To_Result): New procedure.
11930 2011-08-02 Jose Ruiz <ruiz@adacore.com>
11932 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
11933 time, if the specific run-time routines for handling streams of strings
11934 are not available, use the default mechanism.
11936 2011-08-02 Arnaud Charlet <charlet@adacore.com>
11938 * s-regpat.ads: Fix typo.
11940 2011-08-02 Vincent Celier <celier@adacore.com>
11942 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
11943 not null, call it to create the in memory config project file without
11944 parsing an existing default config project file.
11946 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11948 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
11950 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11952 * sem_elim.adb: an abstract subprogram does not need an eliminate
11953 pragma for its descendant to be eliminable.
11955 2011-08-02 Ed Falis <falis@adacore.com>
11957 * init.c: revert to handling before previous checkin for VxWorks
11958 * s-intman-vxworks.adb: delete unnecessary declarations related to
11959 using Ada interrupt facilities for handling signals.
11960 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
11961 * s-intman-vxworks.ads: Import __gnat_install_handler as
11962 Initialize_Interrupts.
11963 * s-taprop-vxworks.adb: Delete Signal_Mask.
11964 (Abort_Handler): change construction of mask to unblock exception
11967 2011-08-02 Jerome Guitton <guitton@adacore.com>
11969 * a-except-2005.adb (Raise_From_Signal_Handler): Call
11970 Debug_Raise_Exception before propagation starts.
11972 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11974 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
11975 to Restriction_Check_Required.
11976 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
11977 * sem_res.adb (Resolve_Call): Likewise.
11978 * sem_attr.adb (Check_Stream_Attribute): Likewise.
11980 2011-08-02 Bob Duff <duff@adacore.com>
11982 * stylesw.ads: Update comment.
11983 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
11984 * errout.ads: Remove obsolete comment.
11986 2011-08-02 Javier Miranda <miranda@adacore.com>
11988 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
11989 (Set_Is_Safe_To_Reevaluate): new procedure.
11990 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
11991 assignment is allowed on safe-to-reevaluate variables.
11992 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
11993 temporary created to remove side effects in expressions that use
11994 the secondary stack as safe-to-reevaluate.
11995 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
11996 variables that are not true constants.
11998 2011-08-02 Robert Dewar <dewar@adacore.com>
12000 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
12001 sem_res.adb, sem_ch6.adb: Minor reformatting.
12003 2011-08-02 Jerome Guitton <guitton@adacore.com>
12005 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
12007 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12009 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
12010 not set Overridden_Operation if subprogram is an initialization
12013 2011-08-02 Yannick Moy <moy@adacore.com>
12015 * par-ch6.adb: Correct obsolete name in comments
12016 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
12017 which takes two message arguments (existing function takes one), with
12018 second message used for continuation.
12019 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
12020 block statements that originate from a source block statement, not
12021 generated block statements
12022 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
12023 symmetry with procedure case
12024 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
12025 function to issue an error in formal mode if a package specification
12026 contains more than one tagged type or type extension.
12027 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
12028 parameters matching formals of tagged types are objects (or ancestor
12029 type conversions of objects), not general expressions. Issue an error
12030 on view conversions that are not involving ancestor conversion of an
12032 (Resolve_Type_Conversion): in formal mode, issue an error on the
12033 operand of an ancestor type conversion which is not an object
12034 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
12035 procedure so that it works also for actuals of function calls
12036 (Is_Actual_Tagged_Parameter): new function which determines if its
12037 argument is an actual parameter of a formal of tagged type in a
12039 (Is_SPARK_Object_Reference): new function which determines if the tree
12040 referenced by its argument represents an object in SPARK
12042 2011-08-02 Robert Dewar <dewar@adacore.com>
12044 * sem_ch3.adb: Minor reformatting
12045 Minor comment addition
12046 Minor error msg text change
12048 2011-08-02 Javier Miranda <miranda@adacore.com>
12050 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
12051 function. Used to be more precise when we generate a variable plus one
12052 assignment to remove side effects in the evaluation of the Bound
12054 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
12055 of the bound expression to force its re-analysis and thus expand the
12056 associated transient scope (if required). Code cleanup replacing the
12057 previous code that declared the constant entity by an invocation to
12058 routine Force_Evaluation which centralizes this work in the frontend.
12060 2011-08-02 Robert Dewar <dewar@adacore.com>
12062 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
12063 (Base_Type): Now uses improved Is_Base_Type function
12064 * einfo.ads (Base_Type): Inline this function
12066 2011-08-02 Robert Dewar <dewar@adacore.com>
12068 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
12069 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
12071 2011-08-02 Arnaud Charlet <charlet@adacore.com>
12073 * gcc-interface/Make-lang.in: Update dependencies.
12074 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
12077 2011-08-02 Yannick Moy <moy@adacore.com>
12079 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
12080 non-simple expression used in delta constraint
12081 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
12082 index constraint which is not a subtype mark
12083 * par.adb: With and use Restrict
12084 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
12085 mode on component type which is not a subtype mark and default
12086 expression on component
12087 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
12088 of string which does not have a lower index bound equal to 1
12089 (Array_Type_Declaration): issue an error in formal mode on index or
12090 component type which is not a subtype mark, and on aliased keyword on
12092 (Derived_Type_Declaration): issue an error in formal mode on interface,
12093 limited or abstract type
12094 (Record_Type_Declaration): issue an error in formal mode on interface
12095 (Record_Type_Definition): issue an error in formal mode on tagged types
12096 and type extensions not declared in the specification of a library unit
12097 package; on null non-tagged record; on variant part
12099 2011-08-02 Vincent Celier <celier@adacore.com>
12101 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
12102 not declared for qualified library project when Library_Name is not
12103 declared, but Library_Dir is.
12105 2011-08-02 Robert Dewar <dewar@adacore.com>
12107 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
12108 pragmas (affects aspects [Component_]Default_Value
12109 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
12110 component type for the resolution
12112 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12114 * einfo.adb (Base_Type): Tune implementation for speed.
12116 2011-08-02 Robert Dewar <dewar@adacore.com>
12118 * freeze.adb: Minor reformatting.
12120 2011-08-02 Thomas Quinot <quinot@adacore.com>
12122 * scos.ads: Update comments.
12124 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12126 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
12127 base type, because the parent may be a subtype of a private type whose
12128 convention is established in a private part.
12130 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
12132 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
12133 statement in a block when the expansion of the return expression has
12134 created a finalization chain.
12135 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
12136 with the parent node.
12137 Add N_Extended_Return_Statement to handle the case where a transient
12138 object declaration appears in the Return_Object_Declarations list of
12139 an extended return statement.
12141 2011-08-02 Matthew Gingell <gingell@adacore.com>
12143 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
12144 unused parameter 'name'.
12146 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12148 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
12149 inherited operation, check whether its alias, which is the source
12150 operastion that it renames, has been marked eliminated.
12152 2011-08-02 Javier Miranda <miranda@adacore.com>
12154 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
12155 in-mode parameter whose type is an access type since it can be used to
12156 modify its designated object. Enforce code that handles as safe an
12157 access type that is not access-to-constant but it is the result of a
12158 previous removal of side-effects.
12159 (Remove_Side_Effects): Minor code reorganization of cases which require
12160 no action. Done to incorporate documentation on new cases uncovered
12161 working in this ticket: no action needed if this routine was invoked
12162 too early and the nodes are not yet decorated.
12163 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
12164 to routine Remove_Side_Effects by calls to Force_Evaluation since they
12165 were issued with actuals that are implicitly provided by
12168 2011-08-02 Robert Dewar <dewar@adacore.com>
12170 * sem_ch3.adb, sem_res.adb: Minor reformatting.
12172 2011-08-02 Yannick Moy <moy@adacore.com>
12174 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
12175 to issue an error in formal mode on attribute not supported in this mode
12176 (Analyze_Attribute): issue errors on standard attributes not supported
12178 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
12179 comment, and issue error in formal mode on modulus which is not a power
12181 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
12183 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
12185 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
12186 operator on modular type (except 'not').
12188 2011-08-02 Robert Dewar <dewar@adacore.com>
12190 * gnat_rm.texi: Minor reformatting.
12192 2011-08-02 Arnaud Charlet <charlet@adacore.com>
12194 * s-osinte-linux.ads: Minor comment update and reformatting.
12195 * i-cexten.ads: Make this unit pure, as for its parent.
12196 Will allow its usage in more contexts if needed.
12198 2011-08-02 Robert Dewar <dewar@adacore.com>
12200 * s-utf_32.ads: Minor comment fix.
12202 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12204 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
12205 operation of a tagged synchronized type, handle the case where the
12206 controlling argument is overloaded.
12208 2011-08-02 Yannick Moy <moy@adacore.com>
12210 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
12211 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
12212 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
12213 SPARK mode and formal verification mode on processing SPARK restriction
12214 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
12215 requiring consistency checking.
12217 2011-08-02 Robert Dewar <dewar@adacore.com>
12219 * sem_res.adb: Minor reformatting.
12221 2011-08-02 Robert Dewar <dewar@adacore.com>
12223 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
12224 a-cforse.ads: Remove unneeded with of Ada.Containers
12225 Remove commented out pragma Inline's
12226 Move specifications of new subprograms to the actual specs
12228 2011-08-02 Yannick Moy <moy@adacore.com>
12230 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
12231 a-cforse.ads: Update comments.
12233 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12235 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
12237 2011-08-02 Robert Dewar <dewar@adacore.com>
12239 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
12240 a-cforse.ads, a-cofove.ads: Minor reformatting.
12242 2011-08-02 Claire Dross <dross@adacore.com>
12244 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
12245 a-cofove.ads: Add comments.
12247 2011-08-02 Yannick Moy <moy@adacore.com>
12249 * gnat_rm.texi: Document formal containers.
12251 2011-08-02 Emmanuel Briot <briot@adacore.com>
12253 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
12254 are empty sections.
12256 2011-08-02 Robert Dewar <dewar@adacore.com>
12258 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
12261 2011-08-02 Robert Dewar <dewar@adacore.com>
12263 * aspects.adb: New aspects Default_Value and Default_Component_Value
12264 New format of Aspect_Names table checks for omitted entries
12265 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
12266 handling of boolean aspects for derived types.
12267 New aspects Default_Value and Default_Component_Value
12268 New format of Aspect_Names table checks for omitted entries
12269 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
12270 (Has_Default_Value): New flag
12271 (Has_Default_Component_Value): New flag
12272 (Has_Default_Value): New flag
12273 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
12275 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
12276 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
12277 Default_Value and Default_Component_Value
12278 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
12279 New aspects Default_Value and Default_Component_Value
12280 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
12281 * sprint.adb: Print N_Aspect_Specification node when called from gdb
12283 2011-08-02 Vincent Celier <celier@adacore.com>
12285 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
12286 inherit library kind.
12288 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12290 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
12291 Minor reformatting.
12293 2011-08-02 Robert Dewar <dewar@adacore.com>
12295 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
12297 2011-08-02 Yannick Moy <moy@adacore.com>
12299 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
12301 2011-08-02 Robert Dewar <dewar@adacore.com>
12303 * impunit.adb: Add comment.
12305 2011-08-02 Yannick Moy <moy@adacore.com>
12307 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
12308 qualification of aggregates in formal mode
12309 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
12311 (Resolve_Aggregate): complete the test that an aggregate is adequately
12312 qualified in formal mode
12314 2011-08-02 Pascal Obry <obry@adacore.com>
12316 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
12317 * mlib-prj.adb: Supress warning when compiling binder generated file.
12318 (Build_Library): Supress all warnings when compiling the binder
12321 2011-08-02 Yannick Moy <moy@adacore.com>
12323 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
12325 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
12326 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
12327 Add with/use clauses to make Check_Formal_Restriction visible
12329 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12331 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
12332 in-parameters when type of the generic formal is private in the generic
12333 spec and non-private in the body.
12335 2011-08-02 Claire Dross <dross@adacore.com>
12337 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
12338 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
12339 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
12340 * impunit.adb, Makefile.rtl: Take new files into account.
12342 2011-08-02 Robert Dewar <dewar@adacore.com>
12344 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
12345 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
12347 2011-08-02 Yannick Moy <moy@adacore.com>
12349 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
12351 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
12352 matching static array bounds, taking into account the special case of
12354 * sem_ch3.adb: Typo in comment.
12356 2011-08-02 Yannick Moy <moy@adacore.com>
12358 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
12359 which issues an error in formal mode if its argument node is originally
12361 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
12362 has a discriminant specification so that it does not include the case
12364 (Derived_Type_Declaration): move here the test that a derived type has a
12365 discriminant specification
12366 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
12367 first element of a component association before accessing its choices
12368 (presence of component association is not enough)
12369 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
12370 declaration is a library item before accessing the next element in a
12371 list, as library items are not member of lists
12372 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
12373 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
12374 Check_Formal_Restriction whenever possible.
12376 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12378 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
12379 reference when needed.
12381 2011-08-02 Bob Duff <duff@adacore.com>
12383 * gnat_ugn.texi: Fix typo.
12385 2011-08-02 Vincent Celier <celier@adacore.com>
12387 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
12388 archive file name. Do not use the full path name of archives for Open
12391 2011-08-02 Robert Dewar <dewar@adacore.com>
12393 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
12394 Analyze_Aspect_Specifications
12396 (Analyze_Aspect_Specifications): New handling for boolean aspects
12397 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
12398 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
12399 sequence for Analyze_Aspect_Specifications
12400 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
12401 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
12403 2011-08-02 Robert Dewar <dewar@adacore.com>
12405 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
12406 aspects, since these no longer exist.
12408 2011-08-02 Robert Dewar <dewar@adacore.com>
12410 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
12411 semicolon, do not try to see if there are aspects following it.
12412 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
12415 2011-08-02 Robert Dewar <dewar@adacore.com>
12417 * sem_ch8.adb, aspects.ads: Minor reformatting.
12419 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12421 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
12422 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
12424 (Analyze_Aspect_Specifications): ...here. Call above procedure.
12426 2011-08-02 Yannick Moy <moy@adacore.com>
12428 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
12429 mode on subprogram declaration outside of package specification, unless
12430 it is followed by a pragma Import
12431 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
12432 Access_Type_Declaration): issue error in formal mode on access type
12433 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
12435 (Analyze_Object_Declaration): issue error in formal mode on object
12436 declaration which does not respect SPARK restrictions
12437 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
12438 declaration which does not respect SPARK restrictions
12439 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
12440 error in formal mode on digits or delta constraint
12441 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
12442 decimal fixed point type
12443 (Derived_Type_Declaration): issue error in formal mode on derived type
12444 other than type extensions of tagged record types
12445 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
12446 with check on access definition
12447 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
12448 mode on protected definition.
12449 (Analyze_Task_Definition): issue error in formal mode on task definition
12451 2011-08-02 Robert Dewar <dewar@adacore.com>
12453 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
12455 2011-08-02 Javier Miranda <miranda@adacore.com>
12457 * sem_ch6.adb (Can_Override_Operator): New function.
12458 (Verify_Overriding_Indicator): Add missing code to check overriding
12459 indicator in operators. Fixes regression.
12460 (Check_Overriding_Indicator): Minor reformating after replacing the
12461 code that evaluates if the subprogram can override an operator by
12462 invocations to the above new function.
12464 (Write_Field26_Name): Add missing code to ensure that, following
12465 the documentation in einfo.ads, this field is not shown as attribute
12466 "Static_Initialization" on non-dispatching functions.
12468 2011-08-02 Jose Ruiz <ruiz@adacore.com>
12470 * sem_res.adb (Resolve_Call): A call to
12471 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
12472 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
12473 i.e., when the second parameter is of type Time_Span.
12475 2011-08-02 Vincent Celier <celier@adacore.com>
12477 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
12478 with an archive instead of -L<library dir> -l<library name>.
12480 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12482 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
12483 mark the base types In_Use in addition to making the operations
12486 2011-08-02 Ed Falis <falis@adacore.com>
12488 * init.c: add and setup __gnat_signal_mask for the exception signals
12489 * s-inmaop-vxworks.adb: new file.
12490 * s-intman-vxworks.adb: remove unnecessary initializations and
12492 * s-intman-vxworks.ads: remove unnecessary variable
12493 * s-taprop-vxworks.adb: simplify signal initialization
12495 2011-08-02 Robert Dewar <dewar@adacore.com>
12497 * sem_ch8.adb: Minor code reorganization, comment updates.
12499 2011-08-02 Robert Dewar <dewar@adacore.com>
12501 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
12502 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
12504 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
12505 (Matching_Static_Array_Bounds): Moved here from Sem_Res
12507 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12509 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
12510 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
12511 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
12512 use_type_clauses, to handle more efficiently use_type and use_all_type
12514 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
12515 Ada2012 Use_All_Type clause.
12516 (Use_Class_Wide_Operations): new procedure.
12518 2011-08-02 Robert Dewar <dewar@adacore.com>
12520 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
12521 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
12522 expression to expression function.
12524 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12526 * sem_ch4.adb: transform simple Ada2012 membership into equality only
12527 if types are compatible.
12529 2011-08-02 Yannick Moy <moy@adacore.com>
12531 * sem_res.adb (Matching_Static_Array_Bounds): new function which
12532 returns True if its argument array types have same dimension and same
12533 static bounds at each index.
12534 (Resolve_Actuals): issue an error in formal mode on actuals passed as
12535 OUT or IN OUT paramaters which are not view conversions in SPARK.
12536 (Resolve_Arithmetic_Op): issue an error in formal mode on
12537 multiplication or division with operands of fixed point types which are
12538 not qualified or explicitly converted.
12539 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
12540 Boolean or array type (except String) operands.
12541 (Resolve_Equality_Op): issue an error in formal mode on equality
12542 operators for array types other than String with non-matching static
12544 (Resolve_Logical_Op): issue an error in formal mode on logical operators
12545 for array types with non-matching static bounds. Factorize the code in
12546 Matching_Static_Array_Bounds.
12547 (Resolve_Qualified_Expression): issue an error in formal mode on
12548 qualified expressions for array types with non-matching static bounds.
12549 (Resolve_Type_Conversion): issue an error in formal mode on type
12550 conversion for array types with non-matching static bounds
12552 2011-08-02 Robert Dewar <dewar@adacore.com>
12554 * par-ch10.adb: Minor code reorganization (use Nkind_In).
12556 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12558 * par-ch9.adb: save location of entry for proper error message.
12560 2011-08-02 Javier Miranda <miranda@adacore.com>
12562 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
12563 (Use_Full_View) which permits this routine to climb through the
12564 ancestors using the full-view of private parents.
12565 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
12566 Use_Full_View to true in calls to Is_Ancestor.
12567 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
12568 true in call to Is_Ancestor.
12569 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
12570 Use_Full_View to true in call to Is_Ancestor.
12571 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
12572 call to Is_Ancestor.
12573 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
12574 Use_Full_View to true in calls to Is_Ancestor.
12575 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
12576 Make_Select_Specific_Data_Table, Register_Primitive,
12577 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
12578 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
12579 to true in call to Is_Ancestor.
12580 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
12581 Use_Full_View to true in calls to Is_Ancestor.
12583 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
12584 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
12586 2011-08-02 Robert Dewar <dewar@adacore.com>
12588 * gnat_rm.texi: Minor reformatting.
12589 * sem_prag.adb: Minor reformatting.
12591 2011-08-02 Tristan Gingold <gingold@adacore.com>
12593 * vms_data.ads: Add VMS qualifier for -gnateP.
12595 2011-08-02 Robert Dewar <dewar@adacore.com>
12597 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
12598 * par-ch7.adb (P_Package): Proper placement of aspects for package
12599 decl/instantiation.
12600 * par-endh.adb (Check_End): Ad Is_Sloc parameter
12601 (End_Statements): Add Is_Sloc parameterr
12602 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
12603 (Check_End): Ad Is_Sloc parameter
12604 (End_Statements): Add Is_Sloc parameterr
12606 2011-08-02 Vincent Celier <celier@adacore.com>
12608 * ug_words: Add VMS qualifier equivalent to -gnateP:
12609 /SYMBOL_PREPROCESSING.
12611 2011-08-02 Jose Ruiz <ruiz@adacore.com>
12613 * gnat-style.texi: For hexadecimal numeric literals the typical
12614 grouping of digits is 4 to represent 2 bytes.
12615 A procedure spec which is split into several lines is indented two
12618 2011-08-02 Yannick Moy <moy@adacore.com>
12620 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
12621 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
12622 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
12624 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
12625 choice in array aggregate
12626 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
12628 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
12629 positional and named aggregate for record, or others in record
12630 aggregate, or multiple choice in record aggregate
12631 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
12632 array operands to logical operations AND, OR and XOR do not have the
12633 same static lower and higher bounds
12634 * sem_ch5.adb, sinfo.ads: Correct typos in comments
12636 2011-08-01 Robert Dewar <dewar@adacore.com>
12638 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
12639 Replaces Last_Source_Node_In_Sequence.
12640 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
12641 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
12642 parens and blank in string (this was inconsistently implemented).
12644 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
12645 blank in string (this was inconsistently implemented).
12647 (Set_Global_Switches): Set formal mode switches appropriately
12648 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
12650 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
12651 call Set_Error_Msg_Lang to set "spark" as language name.
12652 * par.adb: Remove unnecessary call to set formal language for errout
12653 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
12654 appropriately and call Set_Error_Msg_Lang to set "spark" as language
12656 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
12657 calls to it, moved after resolution so that types are known
12658 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
12659 result of concatenation is not of type String
12660 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
12661 concatenation is not properly restricted
12662 * gnat_rm.texi: Add doc on pragma Spark_95.
12663 * gcc-interface/Makefile.in: Remove obsolete target pairs for
12664 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
12665 * gcc-interface/Make-lang.in: Update dependencies.
12667 2011-08-01 Javier Miranda <miranda@adacore.com>
12669 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
12670 condition that detects if the overridden operation must replace an
12673 2011-08-01 Javier Miranda <miranda@adacore.com>
12675 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
12676 code declarations inserted by Insert_Actions in each alternative of the
12677 N_Case_Expression node.
12679 2011-08-01 Robert Dewar <dewar@adacore.com>
12681 * sem_ch6.adb: Minor code reorganization.
12682 * sem_util.adb: Minor reformatting.
12684 2011-08-01 Pascal Obry <obry@adacore.com>
12686 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
12687 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
12689 2011-08-01 Yannick Moy <moy@adacore.com>
12691 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
12692 literal or operator symbol which is prefixed
12693 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
12694 mode on access attributes.
12695 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
12696 that concatenation operands are properly restricted in formal mode
12697 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
12698 Analyze_Concatenation_Operand. Issue an error in formal mode if the
12699 result of the concatenation has a type different from String.
12700 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
12701 Analyze_Quantified_Expression, Analyze_Slice,
12702 Analyze_Null): issue an error in formal mode on unsupported constructs
12704 (Analyze_Block_Statement): only issue error on source block statement
12705 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
12706 function which returns the last node in a list of nodes for which
12707 Comes_From_Source returns True, if any
12708 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
12709 Last_Source_Node_In_Sequence
12710 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
12711 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
12712 mode on unsupported constructs
12713 * sem_ch9.adb Do not return after issuing error in formal mode, as the
12714 rest of the actions may be needed later on since the error is marked as
12716 * sinfo.ads: Typos in comments.
12718 2011-08-01 Pascal Obry <obry@adacore.com>
12720 * projects.texi: Minor editing.
12722 2011-08-01 Yannick Moy <moy@adacore.com>
12724 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
12725 insertion character ~~
12726 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
12727 (Set_Error_Msg_Lang): new procedure which fixes the language for use
12728 with insertion character ~~
12729 (Set_Msg_Text): treat insertion character ~~
12730 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
12731 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
12732 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
12733 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
12734 errors related to the formal language restriction not serious
12735 (insertion character |).
12736 * par.adb (Par): set formal language for error messages if needed
12737 * sem_ch6.adb (Check_Missing_Return): take into account possible
12738 generated statements at the end of the function
12739 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
12740 enumeration value to define a new pragma SPARK_95
12741 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
12742 SPARK_Version): new type and variables to store the SPARK version
12744 (SPARK_Mode): return True when SPARK_Version is set
12745 * par-prag.adb: Correct indentation
12746 (Prag): take Pragma_SPARK_95 into account
12747 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
12750 2011-08-01 Robert Dewar <dewar@adacore.com>
12752 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
12753 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
12754 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
12756 2011-08-01 Pascal Obry <obry@adacore.com>
12758 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
12759 Target_Name to Get_Path call.
12760 (Parse_Single_Project): Likewise.
12761 (Post_Parse_Context_Clause): Likewise.
12762 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
12763 Call Initialise_Project_Path with the proper Target_Name.
12764 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
12766 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
12767 with the proper Target_Name.
12768 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
12769 Part.Parse routine.
12770 (Parse_Project_And_Apply_Config): Likewise.
12771 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
12772 This is fine as this part of the code is supporting only native
12774 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
12775 is fine as this part of the code is supporting only native compilation.
12777 2011-08-01 Yannick Moy <moy@adacore.com>
12779 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
12780 of homonym, unless the homonym is one of the cases allowed in SPARK
12781 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
12782 package declaration occurring after a body.
12784 2011-08-01 Robert Dewar <dewar@adacore.com>
12786 * checks.adb, exp_ch4.adb: Minor reformatting.
12788 2011-08-01 Javier Miranda <miranda@adacore.com>
12790 * einfo.ads (Access_Disp_Table): Fix documentation.
12791 (Dispatch_Table_Wrappers): Fix documentation.
12793 2011-08-01 Pascal Obry <obry@adacore.com>
12795 * prj-env.adb, prj-env.ads: Minor reformatting.
12797 2011-08-01 Yannick Moy <moy@adacore.com>
12799 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
12800 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
12801 procedures out of these packages.
12802 * errout.ads, errout.adb
12803 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
12804 procedures in of this package
12805 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
12806 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
12807 on misplaced later vs initial declarations, like in Ada 83
12808 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
12809 formal mode on attribute of private type whose full type declaration
12811 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
12812 package declaration inside a package specification
12813 (Analyze_Full_Type_Declaration): issue error in formal mode on
12814 controlled type or discriminant type
12815 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
12816 user-defined operator means that it should come from the source
12817 (New_Overloaded_Entity): issue error in formal mode on overloaded
12819 * sem_ch6.ads, sem_ch13.ads: typos in comments.
12821 2011-08-01 Thomas Quinot <quinot@adacore.com>
12823 * atree.adb: Minor reformatting.
12824 * checks.adb: Minor reformatting.
12826 2011-08-01 Vincent Celier <celier@adacore.com>
12828 * s-parame-vms-ia64.ads: Fix typo in comment
12830 * s-parame-vms-restrict.ads: Removed, unused.
12832 2011-08-01 Javier Miranda <miranda@adacore.com>
12835 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
12837 (Constrain_Index): Remove side effects in the evaluation of the bounds.
12838 * sem_ch3.ads, sem_ch3.adb
12839 (Is_Constant_Bound): New extended version of the subprogram that was
12840 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
12841 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
12842 * sem_aux.ads (Constant_Value): Fix typo in comment.
12843 * checks.adb (Generate_Index_Checks): New implementation which, for
12844 array objects with constant bounds, generates the runtime check
12845 referencing the bounds of the array type. For other cases this routine
12846 provides its previous behavior obtaining such values from the array
12848 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
12850 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
12851 we cannot have semantic interpretations of the new node.
12853 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12855 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
12858 2011-08-01 Arnaud Charlet <charlet@adacore.com>
12860 * sem_ch8.adb: Minor code editing.
12861 * s-vxwext.adb: Remove trailing space.
12862 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
12863 consistency with other files.
12865 2011-08-01 Thomas Quinot <quinot@adacore.com>
12867 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
12869 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12871 * par-ch10.adb: reject parameterized expressions as compilation unit.
12872 * sem_ch4.adb: handle properly conditional expression with overloaded
12873 then_clause and no else_clause.
12875 2011-08-01 Tristan Gingold <gingold@adacore.com>
12877 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
12878 like done by System.Aux_DEC.
12879 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
12881 2011-08-01 Yannick Moy <moy@adacore.com>
12883 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
12884 missing label at end of declaration (subprogram or package)
12885 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
12886 of positional and named parameter association
12887 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
12888 Error_Msg_SP which adds a prefix to the error message giving the name
12889 of the formal language analyzed
12890 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
12891 access result type in subprogram, unconstrained array as result type,.
12892 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
12894 * sem_ch8.adb: Code clean up.
12896 2011-08-01 Javier Miranda <miranda@adacore.com>
12898 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
12899 * einfo.ads (Access_Disp_Table): Fix documentation.
12900 (Dispatch_Table_Wrappers): Fix documentation.
12901 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
12902 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
12903 to enforce the documentation of this attribute.
12904 (Set_Is_Interface): Cleanup the assertion.
12905 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
12906 the Underlying_Type entity before reading attribute Access_Disp_Table.
12907 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
12908 Locate the Underlying_Type before reading attribute Access_Disp_Table.
12909 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
12910 the Underlying_Type entity before reading attribute Access_Disp_Table.
12911 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
12912 Locate the Underlying_Type entity before reading attribute
12915 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12917 * s-poosiz.ads: Additional overriding indicators.
12919 2011-08-01 Yannick Moy <moy@adacore.com>
12921 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
12923 (Analyze_Iteration_Scheme): issue error in formal mode when loop
12924 parameter specification does not include a subtype mark.
12925 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
12926 formal mode on abstract subprogram.
12927 (Analyze_Subprogram_Specification): issue error in formal mode on
12928 user-defined operator.
12929 (Process_Formals): issue error in formal mode on access parameter and
12930 default expression.
12931 * sem_ch9.adb (Analyze_Abort_Statement,
12932 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
12933 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
12934 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
12935 Analyze_Requeue, Analyze_Selective_Accept,
12936 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
12937 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
12938 issue error in formal mode on user-defined raise statement.
12940 2011-08-01 Thomas Quinot <quinot@adacore.com>
12942 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
12943 declaration being hidden when overriding an implicit inherited
12945 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
12946 (-gnats), do not complain about a source file that contains only a
12949 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12951 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
12952 variable if already set.
12954 2011-08-01 Arnaud Charlet <charlet@adacore.com>
12956 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
12957 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
12958 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
12959 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
12960 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
12961 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
12962 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
12963 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
12964 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
12965 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
12966 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
12967 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
12968 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
12969 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
12970 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
12971 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
12972 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
12973 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
12974 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
12975 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
12976 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
12977 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
12978 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
12979 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
12980 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
12981 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
12982 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
12983 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
12984 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
12985 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
12986 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
12987 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
12988 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
12989 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
12990 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
12991 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
12992 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
12993 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
12994 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
12995 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
12996 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
12997 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
12998 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
12999 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
13000 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
13001 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
13002 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
13003 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
13004 s-osinte-mingw.ads: Update to GPLv3 run-time license.
13005 Use GNAT instead of GNARL.
13007 2011-08-01 Bob Duff <duff@adacore.com>
13009 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
13010 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
13011 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
13014 2011-08-01 Yannick Moy <moy@adacore.com>
13016 * debug.adb (d.D) reverve flag for the SPARK mode
13017 (d.E) reverve flag for SPARK generation mode
13018 (d.F) reverve flag for Why generation mode
13019 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
13020 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
13021 functions which return True when the corresponding modes are set
13022 (Formal_Language): return "spark" or "alfa" when in formal verification
13024 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
13025 Error_Msg to prefix the error message with a tag giving the formal
13027 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
13028 message with a tag giving the formal language
13029 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
13031 (Analyze_Case_Statement): issue error in formal mode on case statement
13032 with a single "others" case alternative
13033 (Analyze_Exit_Statement): issue errors in formal mode on exit
13034 statements which do not respect SPARK restrictions
13035 (Analyze_Goto_Statement): issue error in formal mode on goto statement
13036 (Check_Unreachable_Code): always issue an error (not a warning) in
13037 formal mode on unreachable code (concerns both code after an infinite
13038 loop and after an unconditional jump, both not allowed in SPARK)
13039 * sem_ch6.adb (Analyze_Return_Statement): add call to
13040 Set_Return_Present for a procedure containing a return statement
13041 (already done for functions in Analyze_Function_Return)
13042 (Analyze_Function_Return): issue error in formal mode on extended
13043 return or if return is not last statement in function
13044 (Check_Missing_Return): issue error in formal mode if function does
13045 not end with return or if procedure contains a return
13046 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
13047 function to detect if there is an inner scope of its parameter S which
13050 2011-08-01 Thomas Quinot <quinot@adacore.com>
13052 * sem_ch6.ads: Minor reformatting.
13054 2011-08-01 Javier Miranda <miranda@adacore.com>
13056 * sem_util.adb (Abstract_Interface_List): Complete condition when
13057 processing private type declarations to avoid reading unavailable
13059 (Is_Synchronized_Tagged_Type): Complete condition when processing
13060 private extension declaration nodes to avoid reading unavailable
13063 2011-08-01 Thomas Quinot <quinot@adacore.com>
13065 * sem_ch3.adb: Minor reformatting.
13067 2011-08-01 Thomas Quinot <quinot@adacore.com>
13069 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
13070 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
13071 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
13072 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
13073 for VMS, instead parametrize the common implementation with
13074 System.Parameters declarations.
13076 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
13078 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
13080 2011-08-01 Tristan Gingold <gingold@adacore.com>
13082 * seh_init.c: Fix SEH handler installation on win64.
13084 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13086 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
13087 double analysis of an anonymous access to subprogram, because it can
13088 lead to improper sharing of profiles and a back-end crash.
13090 2011-08-01 Robert Dewar <dewar@adacore.com>
13092 * make.adb, sem_ch4.adb: Minor reformatting.
13093 * gcc-interface/Make-lang.in: Update dependencies.
13094 * sem_util.adb, exp_ch5.adb: Minor reformatting.
13096 2011-08-01 Arnaud Charlet <charlet@adacore.com>
13098 * gnat_rm.texi: Fix definition of Long_Integer.
13100 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13102 * exp_aggr.adb: check limit size of static aggregate unconditionally,
13103 to prevent storage exhaustion.
13104 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
13105 finalized is a function body, insert the cleanup code before the final
13106 return statement, to prevent spurious warnings.
13107 * s-pooglo.ads: add overriding indicator.
13109 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13111 * sem_ch4.adb (Operator_Check): improve error message when both a
13112 with_clause and a use_clause are needed to make operator usage legal.
13113 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
13114 determine whether a compilation unit is visible within an other,
13115 either through a with_clause in the current unit, or a with_clause in
13116 its library unit or one one of its parents.
13118 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13120 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
13121 over an arbitrary expression of an array or container type.
13122 * lib-xref.adb: clarify comment.
13124 2011-08-01 Bob Duff <duff@adacore.com>
13126 * einfo.ads: Minor reformatting.
13127 * debug.adb: Minor comment improvement.
13129 2011-08-01 Javier Miranda <miranda@adacore.com>
13131 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
13132 consider hidden subprograms as valid candidates.
13134 2011-08-01 Arnaud Charlet <charlet@adacore.com>
13136 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
13138 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
13140 * gnat_ugn.texi: Fix typo.
13142 2011-08-01 Robert Dewar <dewar@adacore.com>
13144 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
13145 lib-xref.adb: Minor reformatting
13147 2011-08-01 Gary Dismukes <dismukes@adacore.com>
13149 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
13150 when to generate a call to Move_Final_List.
13151 (Has_Controlled_Parts): Remove this function.
13153 2011-08-01 Geert Bosch <bosch@adacore.com>
13155 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
13156 "," in choice list.
13158 2011-08-01 Thomas Quinot <quinot@adacore.com>
13160 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
13161 explicit raise of a predefined exception as Comes_From_Source if the
13162 original N_Raise_Statement comes from source.
13164 2011-08-01 Robert Dewar <dewar@adacore.com>
13166 * sinfo.ads: Add comment.
13167 * sem_ch6.adb: Minor reformatting.
13169 2011-08-01 Robert Dewar <dewar@adacore.com>
13171 * freeze.adb (Freeze_Entity): Refine check for bad component size
13172 clause to avoid rejecting confirming clause when atomic/aliased present.
13174 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13176 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
13177 better determine whether an entity reference is a write.
13178 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
13180 * lib-xref.adb (Output_References): Do no suppress a read reference at
13181 the same location as an immediately preceeding modify-reference, to
13182 handle properly in-out actuals.
13184 2011-08-01 Tristan Gingold <gingold@adacore.com>
13186 * env.c (__gnat_setenv) [VMS]: Refine previous change.
13188 2011-08-01 Quentin Ochem <ochem@adacore.com>
13190 * i-cstrin.adb (New_String): Changed implementation, now uses only the
13191 heap to compute the result.
13193 2011-08-01 Robert Dewar <dewar@adacore.com>
13195 * atree.ads: Minor reformatting.
13197 2011-08-01 Emmanuel Briot <briot@adacore.com>
13199 * g-expect.adb (Get_Command_Output): Fix memory leak.
13201 2011-08-01 Geert Bosch <bosch@adacore.com>
13203 * cstand.adb (P_Float_Type): New procedure to print the definition of
13204 predefined fpt types.
13205 (P_Mixed_Name): New procedure to print a name using mixed case
13206 (Print_Standard): Use P_Float_Type for printing floating point types
13207 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
13208 precision IEEE float.
13210 2011-08-01 Thomas Quinot <quinot@adacore.com>
13212 * sem_ch3.adb: Minor reformatting.
13214 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13216 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
13217 the completion of a generic function, insert the new body rather than
13218 rewriting the original.
13220 2011-08-01 Yannick Moy <moy@adacore.com>
13222 * sinfo.ads, errout.ads: Typos in comments.
13224 2011-08-01 Robert Dewar <dewar@adacore.com>
13226 * par-endh.adb: Minor reformatting.
13228 2011-08-01 Robert Dewar <dewar@adacore.com>
13230 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
13231 (Pre_Post_Aspects): New subtype.
13232 * par-ch12.adb (P_Generic): New syntax for aspects in packages
13233 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
13234 * par-ch7.adb (P_Package): Remove Decl parameter
13235 (P_Package): Handle new syntax for aspects (before IS)
13236 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
13238 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
13239 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
13240 (P_Package): Remove Decl parameter
13241 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
13243 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
13245 * sem_util.ads, sem_util.adb (Static_Boolean): New function
13246 * sinfo.ads: Document new syntax for aspects in packages etc.
13247 * sprint.adb: Handle new syntax of aspects before IS in package
13249 2011-08-01 Thomas Quinot <quinot@adacore.com>
13251 * atree.ads: Minor reformatting.
13252 * sem_prag.adb: Minor reformatting.
13254 2011-08-01 Robert Dewar <dewar@adacore.com>
13256 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
13257 case expr alternative.
13259 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13261 * sem_ch12.adb: Fix typo.
13263 2011-08-01 Geert Bosch <bosch@adacore.com>
13265 * sem_prag.adb (Check_No_Link_Name): New procedure.
13266 (Process_Import_Or_Interface): Use Check_No_Link_Name.
13267 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
13268 instead of Standard_Long_Long_Float_Size global. Preparation for
13269 eventual removal of per type constants.
13270 * exp_util.ads (Get_Stream_Size): New function returning the stream
13271 size value of subtype E.
13272 * exp_util.adb (Get_Stream_Size): Implement new function.
13273 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
13275 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
13277 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
13279 2011-08-01 Geert Bosch <bosch@adacore.com>
13281 * cstand.adb: Fix comments.
13282 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
13283 count of arguments.
13285 2011-08-01 Robert Dewar <dewar@adacore.com>
13287 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
13289 2011-08-01 Geert Bosch <bosch@adacore.com>
13291 * atree.ads: Fix comment.
13293 2011-08-01 Robert Dewar <dewar@adacore.com>
13295 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
13296 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
13297 * par.adb: Add with for Namet.Sp.
13298 * par-tchk.adb: Minor reformatting.
13300 2011-08-01 Vincent Celier <celier@adacore.com>
13302 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
13303 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
13304 of the init procedure of a SAL.
13305 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
13308 2011-08-01 Thomas Quinot <quinot@adacore.com>
13310 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
13313 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13315 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
13317 2011-08-01 Thomas Quinot <quinot@adacore.com>
13319 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
13320 conformant with its spec (return True only for types that have
13321 an overriding Initialize primitive operation that prevents them from
13322 having preelaborable initialization).
13323 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
13324 initialization for controlled types in Ada 2005 or later mode.
13326 2011-08-01 Robert Dewar <dewar@adacore.com>
13328 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
13330 (Same_Aspect): New function.
13331 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
13332 Type_Invariant, Precondition, Postcondition.
13333 * snames.ads-tmpl: Add Name_Type_Invariant.
13335 2011-08-01 Robert Dewar <dewar@adacore.com>
13337 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
13339 (Freeze_All_Ent): Fix error in handling inherited aspects.
13340 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
13341 already analyzed, but don't skip entire processing of a declaration,
13342 that's wrong in some cases of declarations being rewritten.
13343 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
13344 Don't delay for integer, string literals
13345 Treat predicates in usual manner for delay, remove special case code,
13347 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
13348 (Build_Predicate_Function): Update saved expression in aspect
13349 (Build_Invariant_Procedure): Update saved expression in aspect
13350 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
13351 of replacement of discriminant references if the reference is simple.
13353 2011-08-01 Robert Dewar <dewar@adacore.com>
13355 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
13356 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
13357 Static_Predicate and Dynamic_Predicate.
13358 (Build_Predicate_Function): Add processing for Static_Predicate
13359 and Dynamic_Predicate.
13360 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
13361 (From_Static_Predicate): New flag
13362 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
13364 2011-08-01 Robert Dewar <dewar@adacore.com>
13366 * usage.adb: Documentation cleanup for Ada version modes in usage.
13367 * expander.adb: Minor reformatting.
13369 2011-08-01 Robert Dewar <dewar@adacore.com>
13371 * atree.ads: Minor comment fix.
13372 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
13373 a-witeio.ads, sem_prag.adb: Minor reformatting.
13375 2011-08-01 Doug Rupp <rupp@adacore.com>
13377 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
13378 pointers. Use descrip.h header file for convenience. Add some
13381 2011-08-01 Robert Dewar <dewar@adacore.com>
13383 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
13384 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
13385 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
13387 (Check_Aspect_At_End_Of_Declarations): New procedure
13388 (Analye_Aspect_Specification): Minor changes for above procedures
13389 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
13390 specification node as well.
13392 2011-08-01 Pascal Obry <obry@adacore.com>
13394 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
13395 Windows files. Use GetFilesAttributes() in this case to check for file
13396 existence instead of returning with an error code.
13398 2011-08-01 Vincent Celier <celier@adacore.com>
13400 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
13401 High is above Source length.
13403 2011-08-01 Robert Dewar <dewar@adacore.com>
13405 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
13407 2011-08-01 Robert Dewar <dewar@adacore.com>
13409 * aspects.ads (Boolean_Aspects): New subtype.
13410 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
13411 for derived types in cases where the parent type and derived type have
13413 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
13414 with aspects when parent type also has aspects.
13415 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
13416 boolean expression at this point).
13417 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
13418 accordance with final decision on the Ada 2012 feature.
13419 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
13421 2011-08-01 Matthew Heaney <heaney@adacore.com>
13423 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
13425 2011-08-01 Pascal Obry <obry@adacore.com>
13427 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
13428 Fix Replace_Slice when High is above current string size.
13429 (Replace_Slice): Fix DL computation when High is above current
13432 2011-08-01 Gary Dismukes <dismukes@adacore.com>
13434 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
13436 2011-08-01 Matthew Heaney <heaney@adacore.com>
13438 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
13441 2011-08-01 Pascal Obry <obry@adacore.com>
13443 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
13446 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13448 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
13449 access to protected subprograms in generic bodies.
13450 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
13451 protected type, indicate that the convention of the subprogram is
13452 Convention_Protected, because it may be used in subsequent declarations
13453 within the protected declaration.
13455 2011-08-01 Vincent Celier <celier@adacore.com>
13457 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
13458 and "final" procedures when the name of the library is "ada", to avoid
13459 duplicate symbols "adainit" and "adafinal" in executables.
13461 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13463 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
13464 quantified expression that appears within a postcondition and uses the
13465 Ada2012 'Result attribute.
13467 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13469 * init.c (__gnat_error_handler): Cast reason to int.
13470 (__gnat_install_handler): Explain sa_sigaction use.
13472 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
13474 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
13475 subprogram has copy-in copy-out parameters, try to promote the mode of
13476 the return type if it is passed in registers.
13478 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
13480 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
13481 left operand as addressable.
13483 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
13485 * gcc-interface/gigi.h (build_function_stub): Remove.
13486 (build_return_expr): Likewise.
13487 (convert_vms_descriptor): Declare.
13488 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
13489 (build_function_stub): Move to...
13490 * gcc-interface/utils2.c (build_return_expr): Move to...
13491 * gcc-interface/trans.c (build_function_stub): ...here.
13492 (build_return_expr): ...here.
13493 (Subprogram_Body_to_gnu): Add local variable for language_function.
13494 Disconnect the parameter attributes cache, if any, once done with it.
13495 Call end_subprog_body only after setting the end_locus.
13496 Build the stub associated with the function, if any, at the very end.
13497 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
13498 variables and streamline control flow.
13500 2011-07-23 Arnaud Charlet <charlet@adacore.com>
13503 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
13504 g-trasym-dwarf.adb.
13506 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13509 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
13510 Assign to act.sa_sigaction.
13511 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
13512 current->return_address to char * before arithmetic.
13514 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13516 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
13517 Correct argument types.
13518 Extract code from reason.
13519 (__gnat_install_handler): Assign to act.sa_sigaction.
13521 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
13523 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
13524 (GNAT1_OBJS): ...here.
13526 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
13529 * g-socthi-mingw.adb (Fill): Fix formatting.
13531 * gcc-interface/gigi.h: Move around comment.
13533 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
13536 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
13538 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
13541 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
13543 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
13545 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
13546 range comparison if Pmode is SImode.
13548 2011-07-12 Laurent GUERBY <laurent@guerby.net>
13549 Eric Botcazou <ebotcazou@adacore.com>
13551 * adadecode.c: Wrap up in extern "C" block.
13552 * adadecode.h: Likewise.
13553 * adaint.c: Likewise. Remove 'const' keyword.
13554 * adaint.h: Likewise.
13555 * argv.c: Likewise.
13556 * atree.h: Likewise.
13558 * cstreams.c: Likewise.
13560 * exit.c: Likewise.
13562 * final.c: Likewise.
13563 * init.c: Likewise.
13564 * initialize.c: Likewise.
13565 * link.c: Likewise.
13566 * namet.h: Likewise.
13567 * nlists.h: Likewise.
13568 * raise.c: Likewise.
13569 * raise.h: Likewise.
13570 * repinfo.h: Likewise.
13571 * seh_init.c: Likewise.
13572 * targext.c: Likewise.
13573 * tracebak.c: Likewise.
13574 * uintp.h: Likewise.
13575 * urealp.h: Likewise.
13576 * xeinfo.adb: Wrap up generated C code in extern "C" block.
13577 * xsinfo.adb: Likewise.
13578 * xsnamest.adb: Likewise.
13579 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
13580 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
13581 * gcc-interface/misc.c: Likewise.
13582 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
13583 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
13584 ada/targext.o here...
13585 (GNAT_ADA_OBJS): ...and not here.
13586 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
13587 (GNATBIND_OBJS): Reorder.
13589 2011-07-07 Richard Henderson <rth@redhat.com>
13591 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
13592 dwarf2out_frame_init.
13594 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
13596 * gcc-interface/misc.c (gnat_init): Tweak previous change.
13598 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13601 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
13603 2011-07-06 Richard Guenther <rguenther@suse.de>
13605 * gcc-interface/misc.c (gnat_init): Merge calls to
13606 build_common_tree_nodes and build_common_tree_nodes_2.
13607 Re-initialize boolean_false_node.
13609 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
13610 Olivier Hainque <hainque@adacore.com>
13611 Nicolas Setton <setton@adacore.com>
13613 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
13614 the type according to the ARTIFICIAL_P parameter.
13615 (create_type_decl): Likewise.
13616 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
13618 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
13620 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
13621 (gnatbind): Likewise.
13623 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13625 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
13627 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
13629 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
13630 local variable throughout. Remove useless call to Base_Type.
13631 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
13632 Take it also into account for the volatileness of the field. Set the
13633 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
13635 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
13637 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
13638 on a dereference built for a by-ref object if it has an address clause.
13640 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
13642 * einfo.ads (Address_Taken): Document use for the second argument of
13643 Asm_Input and Asm_Output attributes.
13644 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
13645 argument is an entity name, then set Address_Taken on it.
13646 <Attribute_Asm_Output>: Likewise.
13647 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
13648 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
13649 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
13650 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
13652 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
13654 PR middle-end/46500
13655 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
13657 2011-06-14 Joseph Myers <joseph@codesourcery.com>
13659 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
13660 (ada/utils.o): Update dependencies.
13661 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
13662 ../../../libcpp/libcpp.a.
13663 * gcc-interface/utils.c: Include common/common-target.h.
13664 (process_attributes): Use targetm_common.have_named_sections.
13666 2011-06-07 Richard Guenther <rguenther@suse.de>
13668 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
13671 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
13673 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
13674 TREE_THIS_NOTRAP flag.
13676 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
13678 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
13681 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
13683 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
13684 constants whose full view has discriminants specially.
13686 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
13688 * gcc-interface/utils.c: Include diagnostic.h.
13689 (gnat_write_global_declarations): Output debug information for all
13690 global type declarations before finalizing the compilation unit.
13691 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
13693 2011-05-25 Jakub Jelinek <jakub@redhat.com>
13695 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
13697 2011-05-25 Kai Tietz <ktietz@redhat.com>
13699 * adaint.c (__gnat_to_canonical_file_list_next): Use array
13700 initialization instead of const/none-const pointer assignment.
13702 2011-05-24 Joseph Myers <joseph@codesourcery.com>
13704 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
13705 $(EXTRA_GNAT1_OBJS).
13706 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
13707 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
13708 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
13709 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
13710 libcommon-target.a instead of prefix.o.
13712 2011-05-21 Joseph Myers <joseph@codesourcery.com>
13715 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
13717 2011-05-20 Joseph Myers <joseph@codesourcery.com>
13719 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
13720 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
13721 instead of version.o.
13723 2011-05-18 Kai Tietz <ktietz@redhat.com>
13725 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
13726 boolean_false_node instead of integer_zero_node.
13727 (convert_with_check): Likewise.
13728 * gcc-interface/decl.c (choices_to_gnu): Likewise.
13730 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
13732 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
13733 type of the parameter is an unconstrained array, convert the actual to
13734 the type of the formal in the In Out and Out cases as well.
13736 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
13738 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
13739 call build_function_type_array or build_varargs_function_type_array
13741 (create_subprog_type): Don't call build_function_type; call
13742 build_function_type_vec instead.
13744 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
13746 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
13747 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
13748 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
13750 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
13752 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
13754 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
13755 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
13757 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
13759 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
13761 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
13763 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
13764 instead of accessing TYPE_ARG_TYPES directly.
13765 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
13767 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
13770 * gcc-interface/gigi.h (get_variant_part): Declare.
13771 * gcc-interface/decl.c (get_variant_part): Make global.
13772 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
13773 types have the same constant size, are record types and T1 has a
13774 variant part while T2 doesn't.
13776 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
13778 * gcc-interface/utils.c (begin_subprog_body): Do not call
13780 (end_subprog_body): Likewise.
13782 2011-05-04 Richard Guenther <rguenther@suse.de>
13784 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
13786 (pos_to_constructor): Likewise.
13788 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
13789 Eric Botcazou <ebotcazou@adacore.com>
13791 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
13792 of build_function_type. Adjust calls to...
13793 (build_raise_check): ...this. Do not take a void_tree parameter.
13794 Call build_function_type_list instead of build_function_type.
13795 Fix head comment and swap couple of conditional blocks.
13797 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
13799 * gnatvsn.ads (Library_Version): Bump to 4.7.
13800 (Current_Year): Bump to 2011.
13802 2011-04-29 Michael Matz <matz@suse.de>
13804 * gcc-interface/misc.c (gnat_handle_option): Set
13805 warn_maybe_uninitialized.
13807 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
13809 * gnat_ugn.texi (Complexity Metrics Control): Update link to
13810 the Watson/McCabe paper.
13812 2011-04-23 Jim Meyering <meyering@redhat.com>
13814 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
13816 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
13818 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
13821 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
13823 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
13825 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
13826 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
13827 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
13828 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
13829 <all>: Do not set flags on the reused DECL node coming from an alias.
13830 Set DECL_IGNORED_P on the DECL node built for subprograms if they
13831 don't need debug info here...
13832 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
13833 (gigi): Adjust calls to create_subprog_decl.
13834 (build_raise_check): Likewise.
13835 (establish_gnat_vms_condition_handler): Likewise.
13836 (Compilation_Unit_to_gnu): Likewise.
13837 (gnat_to_gnu): Likewise.
13839 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
13841 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
13842 (NO_REORDER_ADAFLAGS): New variable.
13843 (EXTRA_GNATTOOLS): Always define.
13844 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
13845 Clean up and adjust list of files compiled with special options.
13846 * gcc-interface/Make-lang.in: Likewise.
13847 (ada/decl.o): Cosmetical change.
13848 (ada/misc.o): Remove dependency on $(PLUGIN_H).
13850 2011-04-20 Jim Meyering <meyering@redhat.com>
13852 * initialize.c (__gnat_initialize): Remove useless if-before-free.
13854 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
13856 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
13857 $(CFLAGS) on the link line.
13859 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
13861 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
13862 padded type built for the return type if it is unconstrained.
13864 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
13866 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
13868 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
13870 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
13871 before calling TREE_CHAIN.
13872 * gcc-interface/misc.c (gnat_init_ts): New function.
13873 (LANG_HOOKS_INIT_TS): Define.
13875 2011-04-12 Martin Jambor <mjambor@suse.cz>
13877 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
13878 instead of cgraph_node.
13880 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
13882 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
13883 alignment on fields of the RETURN type built for the Copy-In Copy-Out
13886 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
13888 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
13889 of aggregate types that contain a placeholder.
13891 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
13893 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
13895 (handle_type_generic_attribute): Likewise.
13897 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
13900 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
13902 2011-04-04 Kai Tietz <ktietz@redhat.com>
13905 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
13908 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13910 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
13911 type case, do not strip a padding type around the array type.
13913 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13915 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
13918 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13920 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
13921 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
13922 code for -feliminate-unused-debug-types.
13923 (gnat_post_options): Likewise.
13925 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13927 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
13928 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
13931 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13933 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
13934 DECL_ARTIFICIAL flag on enumeration types.
13936 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13938 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
13939 fat pointer types artificial unconditionally.
13940 <E_Array_Subtype>: Attach the base array type as a parallel type if it
13943 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13945 * gcc-interface/gigi.h (get_dummy_type): Declare.
13946 (build_dummy_unc_pointer_types): Likewise.
13947 (finish_fat_pointer_type): Likewise.
13948 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
13949 fat pointer type has been built, complete it in place.
13950 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
13951 and thin pointers. Remove useless variable.
13952 (finish_fat_pointer_type): Make global and move to...
13953 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
13954 (get_dummy_type): New function.
13955 (build_dummy_unc_pointer_types): Likewise.
13956 (gnat_pushdecl): Propage the name to the anonymous variants only.
13957 (update_pointer_to): Only adjust the pointer types in the unconstrained
13960 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13962 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
13963 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
13964 if this is a Taft amendment type and the full declaration is available.
13965 * gcc-interface/trans.c (process_type): Likewise.
13966 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
13967 (process_freeze_entity): Likewise.
13968 * gcc-interface/utils.c (dummy_global): New static variable.
13969 (gnat_write_global_declarations): If there are types declared as used
13970 at the global level, insert them in the global hash table.
13972 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13974 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
13975 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
13976 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
13978 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
13979 flag of the type accordingly.
13980 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
13982 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13984 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
13985 finalizing types when updating the pointers to the designated type.
13986 <all>: Finalize the deferred types even if we didn't defer processing
13987 of incomplete types in this invocation.
13989 2011-04-01 Olivier Hainque <hainque@adacore.com>
13990 Nicolas Setton <setton@adacore.com>
13991 Eric Botcazou <ebotcazou@adacore.com>
13993 * gcc-interface/misc.c (gnat_descriptive_type): New function.
13994 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
13996 2011-03-28 Kai Tietz <ktietz@redhat.com>
13998 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
14000 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
14001 * system-mingw.ads (System): Change ZCX_By_Default default to True.
14003 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
14005 2011-03-28 Tristan Gingold <gingold@adacore.com>
14008 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
14009 Use ada output of gnatbind.
14010 (ada/b_gnatb.adb): Ditto.
14011 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
14012 (ada.mostlyclean, ada.stage1)
14013 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
14014 (ada.stagefeedback): Adjust.
14015 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
14016 Use ada output of gnatbind.
14017 (b_gnatm.adb): Ditto.
14018 (b_gnatl.o, b_gnatm.o): New rules.
14020 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
14022 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
14023 for the padded type built to support a specified size or alignment.
14025 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
14027 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
14028 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
14029 unconditionally to the end of the unit when the designated type is
14031 <all>: Rename local variable. Attempt to un-defer types only and do it
14032 for limited_with'ed types as well.
14033 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
14034 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
14035 consistently and remove redundant call to finalize_from_with_types.
14037 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
14039 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
14040 subprograms without a previous spec declared in the same unit.
14041 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
14042 subprograms at the end of the unit instead of at the beginning.
14043 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
14044 isn't public for the special handling of non-inline functions nested
14045 inside inline external functions.
14047 2011-03-25 Jeff Law <law@redhat.com>
14049 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
14051 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
14053 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
14054 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
14055 to compute Set_Size_Depends_On_Discriminant.
14056 (Layout_Type): Call it on array types in back-end layout mode.
14057 * sem_util.adb (Requires_Transient_Scope): Return true for array
14058 types only if the size depends on the value of discriminants.
14059 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
14060 type if the RHS is a call to a function that returns an unconstrained
14061 type with default discriminant.
14063 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
14065 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
14066 non-conversion to the nominal result type at the end.
14068 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
14070 * gcc-interface/trans.c (create_temporary): New function taken from...
14071 (create_init_temporary): ...here. Call it.
14072 (call_to_gnu): Create the temporary for the return value early, if any.
14073 Create it for a function with copy-in/copy-out parameters if there is
14074 no target; in other cases of copy-in/copy-out, use another temporary.
14075 Push the new binding level lazily. Add and rename local variables.
14077 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
14079 * gcc-interface/decl.c (validate_size): Improve comments and tweak
14081 (set_rm_size): Likewise.
14083 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
14085 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
14086 for the padded type built in order to support a specified alignment.
14087 Fix incorrect formatting.
14089 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
14092 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
14094 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
14096 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
14097 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
14098 to the end of the list. Adjust recursive call. Rename local variable.
14099 If REORDER is true, reorder components of the record type.
14100 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
14101 components_to_record and adjust the parameter list.
14103 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
14105 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
14106 disabled, use the variable for bounds of loop iteration scheme.
14108 2011-03-21 Kai Tietz <ktietz@redhat.com>
14111 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
14113 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
14115 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
14116 out whether the expression is read-only. Short-circuit placeholder
14117 case and rename a couple of local variables.
14119 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
14121 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
14122 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
14123 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
14124 (convert): Deal with conversions from a smaller form type specially.
14126 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
14128 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
14129 its argument, except for the special -I- switch.
14131 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
14133 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
14136 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
14138 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
14140 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
14142 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
14144 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
14145 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
14146 instead of GNAT_FORMAL. Protect the expression against multiple uses.
14147 Do not generate the check directly, instead instantiate the template
14148 check present in the descriptor.
14149 (make_descriptor_field): Move around.
14150 (build_vms_descriptor32): Build a template check in the POINTER field.
14151 (build_vms_descriptor): Remove useless suffixes.
14152 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
14154 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
14157 * targext.c: Include target files if IN_RTS is defined.
14159 2011-01-26 Richard Guenther <rguenther@suse.de>
14162 * targext.c: Include config.h.
14163 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
14166 2011-01-04 Pascal Obry <obry@adacore.com>
14167 Eric Botcazou <ebotcazou@adacore.com>
14169 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
14171 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
14173 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
14174 end-of-case on the end label and its associated gotos, if any.
14176 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
14178 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
14179 expressions of the parameter cache within the statement group of
14180 the CICO mechanism.
14182 2011-01-04 Olivier Hainque <hainque@adacore.com>
14183 Eric Botcazou <ebotcazou@adacore.com>
14185 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
14186 (set_end_locus_from_node): New function.
14187 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
14188 make and the function end_locus.
14189 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
14190 for the elaboration subprogram.
14191 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
14192 set the end_locus of the expression as well.
14194 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
14197 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
14198 variables that are referenced in exception handlers volatile.
14202 Copyright (C) 2011 Free Software Foundation, Inc.
14204 Copying and distribution of this file, with or without modification,
14205 are permitted in any medium without royalty provided the copyright
14206 notice and this notice are preserved.
14208 * gnat_rm.texi: Ramification of pragma Eliminate documentation
14209 - fix bugs in the description of Source_Trace;
14210 - get rid of UNIT_NAME;
14212 2011-08-02 Javier Miranda <miranda@adacore.com>
14215 (Build_Dispatching_Requeue): Adding support for VM targets
14216 since we cannot directly reference the Tag entity.
14217 * exp_sel.adb (Build_K): Adding support for VM targets.
14218 (Build_S_Assignment): Adding support for VM targets.
14220 (Default_Prim_Op_Position): In VM targets do not restrict availability
14221 of predefined interface primitives to compiling in Ada 2005 mode.
14222 (Is_Predefined_Interface_Primitive): In VM targets this service is not
14223 restricted to compiling in Ada 2005 mode.
14224 (Make_VM_TSD): Generate code that declares and initializes the OSD
14225 record. Needed to support dispatching calls through synchronized
14228 (Make_Predefined_Primitive_Specs): Enable generation of predefined
14229 primitives associated with synchronized interfaces.
14230 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
14231 primitives associated with synchronized interfaces.
14233 2011-08-02 Yannick Moy <moy@adacore.com>
14235 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
14236 statements hidden in SPARK if preceded by the HIDE directive
14237 (Parse_Exception_Handlers): mark each exception handler in a sequence of
14238 exception handlers as hidden in SPARK if preceded by the HIDE directive
14239 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
14240 if starting with the HIDE directive
14241 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
14242 starting with the HIDE directive; mark the declarations in a private
14243 part as hidden in SPARK if the private part starts with the HIDE
14245 * restrict.adb, restrict.ads
14246 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
14247 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
14248 argument node belongs to a part which is hidden in SPARK
14249 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
14250 parts in SPARK; protect the possibly costly call to
14251 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
14252 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
14253 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
14254 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
14256 (Scan): recognize special comment starting with '#' and followed by
14257 SPARK keyword "hide" as a HIDE directive.
14259 2011-08-02 Yannick Moy <moy@adacore.com>
14261 * types.ads, erroutc.ads: Minor reformatting.
14263 2011-08-02 Vincent Celier <celier@adacore.com>
14265 * link.c: Add response file support for cross platforms.
14267 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14269 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
14270 in an association, set parent field of copy before partial analysis.
14271 * sem_res.adb (Resolve_Slice): create reference to itype only when
14272 expansion is enabled.
14274 2011-08-02 Yannick Moy <moy@adacore.com>
14276 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
14277 for new flag denoting which subprogram bodies are in ALFA
14278 * restrict.adb, sem_ch7.adb: Update comment
14279 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
14280 sem_ch9.adb, sem_res.adb: Add calls to
14281 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
14282 * sem_ch6.adb (Analyze_Function_Return): add calls to
14283 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
14284 middle of the body, and extended return.
14285 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
14286 False when missing return.
14287 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
14288 to True for subprograms whose spec is in ALFA. Remove later on the flag
14289 on the entity used for a subprogram body when there exists a separate
14291 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
14292 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
14293 False, otherwise do nothing.
14295 2011-08-02 Robert Dewar <dewar@adacore.com>
14297 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
14299 2011-08-02 Yannick Moy <moy@adacore.com>
14301 * sem_ch4.ads: minor formatting.
14303 2011-08-02 Yannick Moy <moy@adacore.com>
14305 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
14306 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
14307 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
14308 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
14309 opt.ads: cleanup of SPARK mode
14311 2011-08-02 Yannick Moy <moy@adacore.com>
14313 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
14315 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
14316 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
14318 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
14319 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
14320 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
14321 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
14323 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
14325 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
14326 functions whose return type is not in ALFA.
14327 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
14329 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
14330 parameter's type is not in ALFA.
14331 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
14334 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14336 * sem_ch6 (Analyze_Expression_Function): treat the function as
14337 Inline_Always, and introduce a subprogram declaration for it when it is
14339 * inline.adb (Add_Inlined_Body): recognize bodies that come from
14340 expression functions, so that the back-end can determine whether they
14341 can in fact be inlined.
14342 * sem_util.adb (Is_Expression_Function): predicate to determine whether
14343 a function body comes from an expression function.
14345 2011-08-02 Gary Dismukes <dismukes@adacore.com>
14347 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
14348 null exclusions to test Can_Never_Be_Null on the anonymous access types
14349 of the formals rather than testing the formals themselves. Exclude this
14350 check in cases where the Old_Formal is marked as a controlling formal,
14351 to avoid issuing spurious errors for bodies completing dispatching
14352 operations (due to the flag not getting set on controlling access
14353 formals in body specs).
14354 (Find_Corresponding_Spec): When checking full and subtype conformance of
14355 subprogram bodies in instances, pass Designated and E in that order, for
14356 consistency with the expected order of the formals (New_Id followed by
14359 2011-08-02 Robert Dewar <dewar@adacore.com>
14361 * sem_ch8.adb: Minor reformatting.
14363 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14365 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
14366 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
14367 primitive operations of class-wide actuals.
14369 2011-08-02 Javier Miranda <miranda@adacore.com>
14371 * exp_atag.ads, exp_atag.adb
14372 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
14373 since its value is implicitly passed in argument Typ.
14374 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
14375 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
14376 Build_Common_Dispatching_Select_Statements.
14378 2011-08-02 Robert Dewar <dewar@adacore.com>
14380 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
14381 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
14382 Minor reformatting.
14384 2011-08-02 Robert Dewar <dewar@adacore.com>
14386 * sem_res.adb: Minor reformatting.
14387 * sem_prag.adb: Minor reformatting.
14389 2011-08-02 Javier Miranda <miranda@adacore.com>
14391 * exp_atag.adb, exp_atags.ads
14392 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
14393 by the tagged type Entity. Required to use this routine in the VM
14394 targets since we do not have available the Tag entity in the VM
14397 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
14398 Ada.Tags has not been previously loaded.
14400 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
14401 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
14403 (Enclosing_Dynamic_Scope): Add missing support to handle the full
14404 view of enclosing scopes. Required to handle enclosing scopes that
14405 are synchronized types whose full view is a task type.
14407 (Build_VM_TSDs): Minor code improvement to avoid generating and
14408 analyzing lists with empty nodes.
14409 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
14410 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
14411 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
14412 (Make_Disp_Timed_Select_Body): Add support for VM targets.
14413 (Make_Select_Specific_Data_Table): Add support for VM targets.
14414 (Make_VM_TSD): Generate code to initialize the SSD structure of
14417 2011-08-02 Yannick Moy <moy@adacore.com>
14419 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
14420 cross-references section in ALI.
14421 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
14422 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
14424 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
14425 subprogram or package entity of a node
14426 (Is_Local_Reference_Type): new function returns True for references
14427 selected in local cross-references.
14428 (Lt): function extracted from Lt in Output_References
14429 (Write_Entity_Name): function extracted from Output_References
14430 (Generate_Definition): generate reference with type 'D' for definition
14431 of objects (object declaration and parameter specification), with
14432 appropriate locations and units, for use in local cross-references.
14433 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
14434 references of type 'I' for initialization in object definition.
14435 (Output_References): move part of function Lt and procedure
14436 Write_Entity_Name outside of the body. Ignore references of types 'D'
14437 and 'I' introduced for local cross-references.
14438 (Output_Local_References): new procedure to output the local
14439 cross-references sections.
14440 (Lref_Entity_Status): new array defining whether an entity is a local
14441 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
14442 with 'I' type when initialization expression is present.
14443 * get_scos.adb, get_scos.ads: Correct comments and typos
14445 2011-08-02 Javier Miranda <miranda@adacore.com>
14447 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
14449 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
14451 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
14454 2011-08-02 Vincent Celier <celier@adacore.com>
14456 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
14457 (No_Space_Img): New function
14458 (Find_Excluded_Sources): When reading from a file, record the file name
14459 and the line number for each excluded source.
14460 (Mark_Excluded_Sources): When reporting an error, if the excluded
14461 sources were read from a file, include file name and line number in
14464 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14466 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
14468 2011-08-02 Robert Dewar <dewar@adacore.com>
14470 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
14472 2011-08-02 Javier Miranda <miranda@adacore.com>
14474 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
14475 generation of TSDs to the DOTNET compiler.
14476 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
14477 generation of TSDs to the DOTNET compiler.
14479 2011-08-02 Javier Miranda <miranda@adacore.com>
14481 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
14482 record of all the tagged types declared inside library level package
14483 declarations, library level package bodies or library level subprograms.
14484 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
14485 associated with a given tagged type.
14486 (Build_VM_TSDs): New subprogram.
14487 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
14488 compilation units that are subprograms.
14489 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
14490 compilation units that are package bodies.
14491 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
14492 units that are a package declaration or a package instantiation.
14493 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
14494 reorganization to improve the error generated by the frontend when the
14495 function Ada.Tags.Secondary_Tag is not available.
14496 * rtsfind.ads (RE_Register_TSD): New runtime entity.
14497 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
14499 2011-08-02 Javier Miranda <miranda@adacore.com>
14501 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
14503 2011-08-02 Robert Dewar <dewar@adacore.com>
14505 * s-imenne.ads: Minor reformatting.
14507 2011-08-02 Robert Dewar <dewar@adacore.com>
14509 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
14510 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
14511 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
14513 2011-08-02 Robert Dewar <dewar@adacore.com>
14515 * einfo.ads (Materialize_Entity): Document this is only for renamings
14516 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
14517 required debug information in the case where we transform the object
14518 declaration into a renaming declaration.
14519 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
14521 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
14522 Materialize_Entity.
14524 2011-08-02 Robert Dewar <dewar@adacore.com>
14526 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
14527 Suppress_Init_Procs.
14528 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
14529 Suppress_Initialization/Initialization_Suppressed.
14530 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
14531 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
14532 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
14533 * sem_prag.adb: New processing for pragma Suppress_Initialization.
14535 2011-08-02 Robert Dewar <dewar@adacore.com>
14537 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
14538 Minor reformatting.
14540 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14542 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
14543 only have inheritable classwide pre/postconditions.
14545 2011-08-02 Javier Miranda <miranda@adacore.com>
14547 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
14548 * rtsfind.ads (RE_Check_TSD): New runtime entity.
14549 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
14550 checks if the external tag of a type is the same as the external tag
14551 of some other declaration.
14553 2011-08-02 Thomas Quinot <quinot@adacore.com>
14555 * s-taskin.ads: Minor reformatting.
14557 2011-08-02 Emmanuel Briot <briot@adacore.com>
14559 * g-comlin.adb (Display_Help): swap the order in which it prints the
14560 short help and the general usage.
14562 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14564 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
14565 the aspect declarations and attach them to the generic copy for
14566 subsequent analysis.
14567 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
14568 declarations of the generic tree to the new subprogram declarations.
14569 * sem_attr.adb (Check_Precondition_Postcondition): recognize
14570 conditions that apply to a subprogram instance.
14572 2011-08-02 Robert Dewar <dewar@adacore.com>
14574 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
14576 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14578 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
14579 private type with a tagged full view is not derived in the immediate
14580 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
14582 2011-08-02 Robert Dewar <dewar@adacore.com>
14584 * exp_ch4.adb: Minor reformatting.
14586 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14588 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
14589 Ada2012 iterator, the loop will be rewritten during expansion into a
14590 while loop with a cursor and an element declaration. Do not analyze the
14591 body in this case, because if the container is for indefinite types the
14592 actual subtype of the elements will only be determined when the cursor
14593 declaration is analyzed.
14595 2011-08-02 Arnaud Charlet <charlet@adacore.com>
14597 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
14598 size/alignment related attributes in CodePeer_Mode.
14600 2011-08-02 Gary Dismukes <dismukes@adacore.com>
14602 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
14603 Prepend_Element, since this can result in the operation getting the
14604 wrong slot in the full type's dispatch table if the full type has
14605 inherited operations. The incomplete type's operation will get added
14606 to the proper position in the full type's primitives
14607 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
14608 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
14609 dispatching operations, since there are cases where nonprimitive
14610 subprograms can get added to the list of incomplete dependents (such
14611 as subprograms in nested packages).
14612 * sem_ch6.adb (Process_Formals): First, remove test for being in a
14613 private part when determining whether to add a primitive with a
14614 parameter of a tagged incomplete type to the Private_Dependents list.
14615 Such primitives can also occur in the visible part, and should not have
14616 been excluded from being private dependents.
14617 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
14618 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
14619 list of a Taft-amendment incomplete type is a primitive before issuing
14620 an error that the full type must appear in the same unit. There are
14621 cases where nonprimitives can be in the list (such as subprograms in
14623 * sem_disp.adb (Derives_From): Use correct condition for checking that
14624 a formal's type is derived from the type of the corresponding formal in
14625 the parent subprogram (the condition was completely wrong). Add
14626 checking that was missing for controlling result types being derived
14627 from the result type of the parent operation.
14629 2011-08-02 Yannick Moy <moy@adacore.com>
14631 * errout.adb (First_Node): minor renaming
14632 * restrict.adb (Check_Formal_Restriction): put restriction warning on
14635 2011-08-02 Yannick Moy <moy@adacore.com>
14637 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
14638 before accessing operands.
14639 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
14640 decide whether an initialization expression respects SPARK rules, as
14641 the plain node is the expanded one. This allows for more valid warnings
14643 * gnat_rm.texi: Minor update.
14645 2011-08-02 Arnaud Charlet <charlet@adacore.com>
14647 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
14650 2011-08-02 Robert Dewar <dewar@adacore.com>
14652 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
14654 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
14656 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
14657 loop statements and the element renaming declaration with a block when
14658 the element type is controlled.
14660 2011-08-02 Yannick Moy <moy@adacore.com>
14662 * sinfo.ads: Minor formatting.
14664 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14666 * sem_aggr.adb (Add_Association): if the association has a box and no
14667 expression, use the Sloc of the aggregate itself for the new
14669 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
14672 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
14674 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
14675 When a container is provided via a function call, generate a renaming
14676 of the function result. This avoids the creation of a transient scope
14677 and the premature finalization of the container.
14678 * exp_ch7.adb (Is_Container_Cursor): Removed.
14679 (Wrap_Transient_Declaration): Remove the supression of the finalization
14680 of the list controller when the declaration denotes a container cursor,
14683 2011-08-02 Yannick Moy <moy@adacore.com>
14685 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
14686 node is from source, instead of the original node being from source.
14688 (Resolve_Array_Aggregate): refine the check for a static expression, to
14689 recognize also static ranges
14690 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
14691 Array_Type_Declaration): postpone the test for the type being a subtype
14692 mark after the type has been resolved, so that component-selection and
14693 expanded-name are discriminated.
14694 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
14695 to distinguish the case of an iteration scheme, so that an error is
14696 issed on a non-static range in SPARK except in an iteration scheme.
14697 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
14698 In_Iter_Schm = True.
14699 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
14700 user-defined operators so that they are allowed in renaming
14702 (Find_Selected_Component): refine the check for prefixing of operators
14703 so that they are allowed in renaming. Move the checks for restrictions
14704 on selector name after analysis discriminated between
14705 component-selection and expanded-name.
14706 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
14707 concatenation argument of string type if it is static.
14708 * sem_util.adb, sem_util.ads
14709 (Check_Later_Vs_Basic_Declarations): add a new function
14710 Is_Later_Declarative_Item to decice which declarations are allowed as
14711 later items, in the two different modes Ada 83 and SPARK. In the SPARK
14712 mode, add that renamings are considered as later items.
14713 (Enclosing_Package): new function to return the enclosing package
14714 (Enter_Name): correct the rule for homonyms in SPARK
14715 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
14716 from source (result of expansion) to avoid issuing wrong warnings.
14718 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14720 * errout.adb: On anything but an expression First_Node returns its
14723 2011-08-02 Pascal Obry <obry@adacore.com>
14725 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
14727 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
14729 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
14730 Set the associated loop as the related expression of internally
14732 * exp_ch7.adb (Is_Container_Cursor): New routine.
14733 (Wrap_Transient_Declaration): Supress the finalization of the list
14734 controller when the declaration denotes a container cursor.
14736 2011-08-02 Yannick Moy <moy@adacore.com>
14738 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
14740 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
14741 expression is a simple expression. This check cannot be performed in
14742 the semantics, so just drop it.
14743 (P_Index_Or_Discriminant_Constraint): move check that the index or
14744 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
14745 semantics. Other cases were previously checked in the semantics.
14746 * par-ch4.adb (P_Name): move checks that a selector name is not
14747 character literal or an operator symbol to Find_Selected_Component in
14749 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
14750 declarations are not placed after later declarations in a separate
14751 procedure in Sem_Util (possibly not the best choice?), to be used both
14752 during parsing, for Ada 83 mode, and during semantic analysis, for
14754 * par-endh.adb (Check_End): move check that end label is not missing
14755 to Process_End_Label in the semantics
14756 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
14757 the special case for SPARK restriction
14758 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
14759 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
14760 parameter Force to issue the error message even on internal node (used
14761 for generated end label). Call Check_Restriction to check when an error
14762 must be issued. In SPARK mode, issue an error message even if the
14763 restriction is not set.
14764 (Check_Restriction): new procedure with an additional out parameter to
14765 inform the caller that a message has been issued
14766 * sem_aggr.adb: Minor modification of message
14767 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
14768 instead of issuing an error message directly
14769 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
14770 declarations are not placed after later declarations, by calling
14771 Check_Later_Vs_Basic_Declarations
14772 (Analyze_Subtype_Declaration): move here the check that an index or
14773 discriminant constraint must be a subtype mark. Change the check that
14774 a subtype of String must start at one so that it works on subtype marks.
14775 * sem_ch4.adb (Analyze_Call): move here the check that a named
14776 association cannot follow a positional one in a call
14777 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
14778 instead of issuing an error message directly
14779 * sem_ch8.adb (Find_Selected_Component): move here the check that a
14780 selector name is not a character literal or an operator symbol. Move
14781 here the check that the prefix of an expanded name cannot be a
14782 subprogram or a loop statement.
14783 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
14784 procedure called from parsing and semantics to check that basic
14785 declarations are not placed after later declarations
14786 (Process_End_Label): move here the check that end label is not missing
14788 2011-08-02 Arnaud Charlet <charlet@adacore.com>
14790 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
14791 representation clause in codepeer mode, since it confuses CodePeer and
14792 does not bring useful info.
14794 2011-08-02 Ed Falis <falis@adacore.com>
14796 * init.c: initialize fp hw on MILS.
14798 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14800 * errout.adb (First_Node): for bodies, return the node itself (small
14801 optimization). For other nodes, do not check source_unit if the node
14802 comes from Standard.
14804 2011-08-02 Robert Dewar <dewar@adacore.com>
14806 * exp_ch3.adb: Minor comment additions.
14807 * sem_ch13.adb: Minor reformatting.
14809 2011-08-02 Pascal Obry <obry@adacore.com>
14811 * make.adb, makeutl.adb: Removes some superfluous directory separator.
14813 2011-08-02 Robert Dewar <dewar@adacore.com>
14815 * sem_attr.adb: Minor reformatting.
14817 2011-08-02 Robert Dewar <dewar@adacore.com>
14819 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
14820 (Has_Default_Component_Value): Removed
14821 * einfo.ads Comment updates
14822 (Has_Default_Aspect): Replaces Has_Default_Value
14823 (Has_Default_Component_Value): Removed
14825 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
14827 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
14828 (Get_Simple_Init_Val): Handle Default_Value aspect
14829 (Needs_Simple_Initialization): Handle Default_Value aspect
14830 * exp_ch3.ads: Needs_Simple_Initialization
14831 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
14832 * par-prag.adb (Pragma_Default[_Component]Value) Removed
14834 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
14835 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
14836 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
14838 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14840 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
14841 package containing iteration primitives.
14842 exp_ch5.adb (Expand_Iterator_Loop): ditto.
14844 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14846 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
14847 "of", pre-analyze expression in case it is a function call with
14848 finalization actions that must be placed ahead of the loop.
14849 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
14850 on an Ada2012 iterator, insert them ahead of the rewritten loop.
14852 2011-08-02 Geert Bosch <bosch@adacore.com>
14854 * cstand.adb (Create_Float_Types): Only consider C's long double for
14855 Long_Long_Float, in addition to double.
14857 2011-08-02 Robert Dewar <dewar@adacore.com>
14859 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
14860 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
14861 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
14862 Minor reformatting.
14864 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14866 * sem_attr.adb: handle properly 'Result when it is a prefix of an
14869 2011-08-02 Javier Miranda <miranda@adacore.com>
14871 * einfo.ads, einfo.adb
14872 (Original_Access_Type): Move this attribute to Node26 since there was
14873 an undocumented use of Node21 in E_Access_Subprogram_Type entities
14874 which causes conflicts and breaks the generation of the .NET compiler.
14875 (Interface_Name): Add missing documentation on JGNAT only uses of
14878 2011-08-02 Geert Bosch <bosch@adacore.com>
14880 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
14881 (Find_Back_End_Float_Type): Likewise
14882 (Create_Back_End_Float_Types): Likewise
14883 (Create_Float_Types): Likewise
14884 (Register_Float_Type): Likewise
14885 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
14886 Nlist and split out type selection in new local Find_Base_Type function.
14887 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
14889 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
14891 2011-08-02 Robert Dewar <dewar@adacore.com>
14893 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
14895 * opt.ads: Minor comment change.
14896 * sem_ch12.adb: Minor code reorganization.
14898 2011-08-02 Gary Dismukes <dismukes@adacore.com>
14900 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
14901 subtype's list of rep items to the list on the full subtype in the case
14902 where the lists are the same.
14904 2011-08-02 Geert Bosch <bosch@adacore.com>
14906 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
14907 using the one from System.Strings, which also deallocates all strings.
14909 2011-08-02 Geert Bosch <bosch@adacore.com>
14911 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
14913 * gcc-interface/Make-lang.in: Update dependencies.
14915 2011-08-02 Olivier Hainque <hainque@adacore.com>
14917 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
14920 2011-08-02 Javier Miranda <miranda@adacore.com>
14922 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
14923 associated with anonymous access to subprograms.
14925 2011-08-02 Geert Bosch <bosch@adacore.com>
14928 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
14929 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
14930 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
14931 (Add_Symbol_Definition): Move to switch-c.adb
14932 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
14933 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
14934 (Add_Symbol_Definition): Move to switch-c.adb.
14935 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
14937 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
14938 Move to warnsw.adb.
14939 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
14940 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
14941 Move to warnsw.adb.
14942 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
14943 (Add_Symbol_Definition): Moved from Prepcomp.
14944 * switch-c.ads: Update copyright notice. Use String_List instead of
14945 Argument_List, removing dependency on System.OS_Lib.
14947 2011-08-02 Yannick Moy <moy@adacore.com>
14949 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
14950 mode on initialization expression which does not respect SPARK
14952 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
14953 if the tree referenced by its argument represents an initialization
14954 expression in SPARK, suitable for initializing an object in an object
14957 2011-08-02 Javier Miranda <miranda@adacore.com>
14959 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
14960 internally generated access to subprogram with its associated protected
14962 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
14964 2011-08-02 Geert Bosch <bosch@adacore.com>
14966 * cstand.adb (Register_Float_Type): Print information about type to
14967 register, if the Debug_Flag_Dot_B is set.
14968 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
14969 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
14970 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
14971 with a requested precision of more than Max_Digits digits and no more
14972 than Max_Base_Digits digits, if a range specification is present and the
14973 Predefined_Float_Types list has a suitable type to derive from.
14974 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
14975 case of type completion with pragma Import
14977 (Process_Import_Predefined_Type): Processing to complete a type
14978 with pragma Import. Currently supports floating point types only.
14979 (Set_Convention_From_Pragma): Do nothing without underlying type.
14980 (Process_Convention): Guard against absence of underlying type,
14981 which may happen when importing incomplete types.
14982 (Process_Import_Or_Interface): Handle case of importing predefined
14983 types. Tweak error message.
14985 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
14987 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
14988 functions to previous change. Reorganize code slightly.
14990 2011-08-02 Geert Bosch <bosch@adacore.com>
14992 * back_end.ads (Register_Type_Proc): New call back procedure type for
14993 allowing the back end to provide information about available types.
14994 (Register_Back_End_Types): New procedure to register back end types.
14995 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
14997 * cstand.adb (Back_End_Float_Types): New list for floating point types
14998 supported by the back end.
14999 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
15000 (Copy_Float_Type): New procedure to make new copies of predefined types.
15001 (Register_Float_Type): New call back procedure to populate the BEFT list
15002 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
15003 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
15004 (Create_Float_Types): New procedure to create entities for floating
15005 point types predefined in Standard, and put these and any remaining
15006 BEFTs on the Predefined_Float_Types list.
15007 * stand.ads (Predefined_Float_Types): New list for predefined floating
15008 point types that do not have declarations in package Standard.
15010 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
15012 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
15013 entity node for the unit containing the parameter.
15014 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
15015 (Add_Inlined_Subprogram): Likewise.
15016 * gcc-interface/Make-lang.in: Update dependencies.
15018 2011-08-02 Thomas Quinot <quinot@adacore.com>
15020 * s-stusta.adb (Print): Make sure Pos is always initialized to a
15023 2011-08-02 Geert Bosch <bosch@adacore.com>
15025 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
15027 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
15029 * sem_type.adb (Covers): Move trivial case to the top and reuse the
15030 computed value of Base_Type.
15032 2011-08-02 Yannick Moy <moy@adacore.com>
15034 * restrict.adb (Check_Restriction): issue an error for any use of
15035 class-wide, even if the No_Dispatch restriction is not set.
15036 * sem_aggr.adb: Correct typos in comments and messages in formal mode
15037 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
15038 when completing a private extension, the type named in the private part
15039 is not the same as that named in the visible part.
15040 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
15041 of an inherited primitive operations of a tagged type or type extension
15042 that returns the tagged type.
15043 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
15044 function which returns True for an implicit operation inherited by the
15045 derived type declaration for the argument type.
15046 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
15049 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15051 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
15052 Process_Bounds, to perform analysis with expansion of a range or an
15053 expression that is the iteration scheme for a loop.
15054 (Analyze_Iterator_Specification): If domain of iteration is given by a
15055 function call with a controlled result, as is the case if call returns
15056 a predefined container, ensure that finalization actions are properly
15058 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
15060 2011-08-02 Javier Miranda <miranda@adacore.com>
15062 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
15063 * gcc-interface/Make-lang.in: Update dependencies.
15065 2011-08-02 Javier Miranda <miranda@adacore.com>
15067 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
15068 determine if the analysis is performed using N or Original_Node (N).
15069 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
15070 functionality of routine Is_Variable avoids code duplication.
15071 * checks.adb (Determine_Range): Handle temporaries generated by
15072 Remove_Side_Effects.
15074 2011-08-02 Javier Miranda <miranda@adacore.com>
15076 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
15077 expansion of the condition. Required since the previous analysis was
15078 done with expansion disabled (see Resolve_Quantified_Expression) and
15079 hence checks were not inserted and record comparisons have not been
15082 2011-08-02 Ed Falis <falis@adacore.com>
15084 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
15087 2011-08-02 Bob Duff <duff@adacore.com>
15089 * opt.ads: Minor comment fix.
15091 2011-08-02 Bob Duff <duff@adacore.com>
15093 * sem_ch12.adb (Analyze_Package_Instantiation,
15094 Analyze_Subprogram_Instantiation): Turn off style checking while
15095 analyzing an instance. Whatever style checks that apply to the generic
15096 unit should apply, so it makes no sense to apply them in an instance.
15097 This was causing trouble when compiling an instance of a runtime
15098 unit that violates the -gnatyO switch.
15099 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
15100 one of the two case statements, causing spurious errors.
15102 2011-08-02 Robert Dewar <dewar@adacore.com>
15104 * uname.adb: Minor reformatting.
15105 * gnatcmd.adb: Minor reformatting.
15106 * exp_attr.adb: Minor reformatting.
15108 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15110 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
15111 No_Dispatching_Calls, do not look for the Assign primitive, because
15112 predefined primitives are not created in this case.
15114 2011-08-02 Bob Duff <duff@adacore.com>
15116 * stylesw.ads: Minor comment fixes.
15118 2011-08-02 Robert Dewar <dewar@adacore.com>
15120 * freeze.adb (Add_To_Result): New procedure.
15122 2011-08-02 Jose Ruiz <ruiz@adacore.com>
15124 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
15125 time, if the specific run-time routines for handling streams of strings
15126 are not available, use the default mechanism.
15128 2011-08-02 Arnaud Charlet <charlet@adacore.com>
15130 * s-regpat.ads: Fix typo.
15132 2011-08-02 Vincent Celier <celier@adacore.com>
15134 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
15135 not null, call it to create the in memory config project file without
15136 parsing an existing default config project file.
15138 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
15140 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
15142 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15144 * sem_elim.adb: an abstract subprogram does not need an eliminate
15145 pragma for its descendant to be eliminable.
15147 2011-08-02 Ed Falis <falis@adacore.com>
15149 * init.c: revert to handling before previous checkin for VxWorks
15150 * s-intman-vxworks.adb: delete unnecessary declarations related to
15151 using Ada interrupt facilities for handling signals.
15152 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
15153 * s-intman-vxworks.ads: Import __gnat_install_handler as
15154 Initialize_Interrupts.
15155 * s-taprop-vxworks.adb: Delete Signal_Mask.
15156 (Abort_Handler): change construction of mask to unblock exception
15159 2011-08-02 Jerome Guitton <guitton@adacore.com>
15161 * a-except-2005.adb (Raise_From_Signal_Handler): Call
15162 Debug_Raise_Exception before propagation starts.
15164 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
15166 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
15167 to Restriction_Check_Required.
15168 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
15169 * sem_res.adb (Resolve_Call): Likewise.
15170 * sem_attr.adb (Check_Stream_Attribute): Likewise.
15172 2011-08-02 Bob Duff <duff@adacore.com>
15174 * stylesw.ads: Update comment.
15175 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
15176 * errout.ads: Remove obsolete comment.
15178 2011-08-02 Javier Miranda <miranda@adacore.com>
15180 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
15181 (Set_Is_Safe_To_Reevaluate): new procedure.
15182 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
15183 assignment is allowed on safe-to-reevaluate variables.
15184 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
15185 temporary created to remove side effects in expressions that use
15186 the secondary stack as safe-to-reevaluate.
15187 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
15188 variables that are not true constants.
15190 2011-08-02 Robert Dewar <dewar@adacore.com>
15192 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
15193 sem_res.adb, sem_ch6.adb: Minor reformatting.
15195 2011-08-02 Jerome Guitton <guitton@adacore.com>
15197 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
15199 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15201 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
15202 not set Overridden_Operation if subprogram is an initialization
15205 2011-08-02 Yannick Moy <moy@adacore.com>
15207 * par-ch6.adb: Correct obsolete name in comments
15208 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
15209 which takes two message arguments (existing function takes one), with
15210 second message used for continuation.
15211 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
15212 block statements that originate from a source block statement, not
15213 generated block statements
15214 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
15215 symmetry with procedure case
15216 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
15217 function to issue an error in formal mode if a package specification
15218 contains more than one tagged type or type extension.
15219 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
15220 parameters matching formals of tagged types are objects (or ancestor
15221 type conversions of objects), not general expressions. Issue an error
15222 on view conversions that are not involving ancestor conversion of an
15224 (Resolve_Type_Conversion): in formal mode, issue an error on the
15225 operand of an ancestor type conversion which is not an object
15226 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
15227 procedure so that it works also for actuals of function calls
15228 (Is_Actual_Tagged_Parameter): new function which determines if its
15229 argument is an actual parameter of a formal of tagged type in a
15231 (Is_SPARK_Object_Reference): new function which determines if the tree
15232 referenced by its argument represents an object in SPARK
15234 2011-08-02 Robert Dewar <dewar@adacore.com>
15236 * sem_ch3.adb: Minor reformatting
15237 Minor comment addition
15238 Minor error msg text change
15240 2011-08-02 Javier Miranda <miranda@adacore.com>
15242 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
15243 function. Used to be more precise when we generate a variable plus one
15244 assignment to remove side effects in the evaluation of the Bound
15246 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
15247 of the bound expression to force its re-analysis and thus expand the
15248 associated transient scope (if required). Code cleanup replacing the
15249 previous code that declared the constant entity by an invocation to
15250 routine Force_Evaluation which centralizes this work in the frontend.
15252 2011-08-02 Robert Dewar <dewar@adacore.com>
15254 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
15255 (Base_Type): Now uses improved Is_Base_Type function
15256 * einfo.ads (Base_Type): Inline this function
15258 2011-08-02 Robert Dewar <dewar@adacore.com>
15260 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
15261 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
15263 2011-08-02 Arnaud Charlet <charlet@adacore.com>
15265 * gcc-interface/Make-lang.in: Update dependencies.
15266 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
15269 2011-08-02 Yannick Moy <moy@adacore.com>
15271 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
15272 non-simple expression used in delta constraint
15273 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
15274 index constraint which is not a subtype mark
15275 * par.adb: With and use Restrict
15276 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
15277 mode on component type which is not a subtype mark and default
15278 expression on component
15279 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
15280 of string which does not have a lower index bound equal to 1
15281 (Array_Type_Declaration): issue an error in formal mode on index or
15282 component type which is not a subtype mark, and on aliased keyword on
15284 (Derived_Type_Declaration): issue an error in formal mode on interface,
15285 limited or abstract type
15286 (Record_Type_Declaration): issue an error in formal mode on interface
15287 (Record_Type_Definition): issue an error in formal mode on tagged types
15288 and type extensions not declared in the specification of a library unit
15289 package; on null non-tagged record; on variant part
15291 2011-08-02 Vincent Celier <celier@adacore.com>
15293 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
15294 not declared for qualified library project when Library_Name is not
15295 declared, but Library_Dir is.
15297 2011-08-02 Robert Dewar <dewar@adacore.com>
15299 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
15300 pragmas (affects aspects [Component_]Default_Value
15301 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
15302 component type for the resolution
15304 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
15306 * einfo.adb (Base_Type): Tune implementation for speed.
15308 2011-08-02 Robert Dewar <dewar@adacore.com>
15310 * freeze.adb: Minor reformatting.
15312 2011-08-02 Thomas Quinot <quinot@adacore.com>
15314 * scos.ads: Update comments.
15316 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15318 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
15319 base type, because the parent may be a subtype of a private type whose
15320 convention is established in a private part.
15322 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
15324 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
15325 statement in a block when the expansion of the return expression has
15326 created a finalization chain.
15327 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
15328 with the parent node.
15329 Add N_Extended_Return_Statement to handle the case where a transient
15330 object declaration appears in the Return_Object_Declarations list of
15331 an extended return statement.
15333 2011-08-02 Matthew Gingell <gingell@adacore.com>
15335 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
15336 unused parameter 'name'.
15338 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15340 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
15341 inherited operation, check whether its alias, which is the source
15342 operastion that it renames, has been marked eliminated.
15344 2011-08-02 Javier Miranda <miranda@adacore.com>
15346 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
15347 in-mode parameter whose type is an access type since it can be used to
15348 modify its designated object. Enforce code that handles as safe an
15349 access type that is not access-to-constant but it is the result of a
15350 previous removal of side-effects.
15351 (Remove_Side_Effects): Minor code reorganization of cases which require
15352 no action. Done to incorporate documentation on new cases uncovered
15353 working in this ticket: no action needed if this routine was invoked
15354 too early and the nodes are not yet decorated.
15355 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
15356 to routine Remove_Side_Effects by calls to Force_Evaluation since they
15357 were issued with actuals that are implicitly provided by
15360 2011-08-02 Robert Dewar <dewar@adacore.com>
15362 * sem_ch3.adb, sem_res.adb: Minor reformatting.
15364 2011-08-02 Yannick Moy <moy@adacore.com>
15366 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
15367 to issue an error in formal mode on attribute not supported in this mode
15368 (Analyze_Attribute): issue errors on standard attributes not supported
15370 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
15371 comment, and issue error in formal mode on modulus which is not a power
15373 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
15375 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
15377 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
15378 operator on modular type (except 'not').
15380 2011-08-02 Robert Dewar <dewar@adacore.com>
15382 * gnat_rm.texi: Minor reformatting.
15384 2011-08-02 Arnaud Charlet <charlet@adacore.com>
15386 * s-osinte-linux.ads: Minor comment update and reformatting.
15387 * i-cexten.ads: Make this unit pure, as for its parent.
15388 Will allow its usage in more contexts if needed.
15390 2011-08-02 Robert Dewar <dewar@adacore.com>
15392 * s-utf_32.ads: Minor comment fix.
15394 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15396 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
15397 operation of a tagged synchronized type, handle the case where the
15398 controlling argument is overloaded.
15400 2011-08-02 Yannick Moy <moy@adacore.com>
15402 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
15403 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
15404 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
15405 SPARK mode and formal verification mode on processing SPARK restriction
15406 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
15407 requiring consistency checking.
15409 2011-08-02 Robert Dewar <dewar@adacore.com>
15411 * sem_res.adb: Minor reformatting.
15413 2011-08-02 Robert Dewar <dewar@adacore.com>
15415 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
15416 a-cforse.ads: Remove unneeded with of Ada.Containers
15417 Remove commented out pragma Inline's
15418 Move specifications of new subprograms to the actual specs
15420 2011-08-02 Yannick Moy <moy@adacore.com>
15422 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
15423 a-cforse.ads: Update comments.
15425 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15427 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
15429 2011-08-02 Robert Dewar <dewar@adacore.com>
15431 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
15432 a-cforse.ads, a-cofove.ads: Minor reformatting.
15434 2011-08-02 Claire Dross <dross@adacore.com>
15436 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
15437 a-cofove.ads: Add comments.
15439 2011-08-02 Yannick Moy <moy@adacore.com>
15441 * gnat_rm.texi: Document formal containers.
15443 2011-08-02 Emmanuel Briot <briot@adacore.com>
15445 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
15446 are empty sections.
15448 2011-08-02 Robert Dewar <dewar@adacore.com>
15450 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
15453 2011-08-02 Robert Dewar <dewar@adacore.com>
15455 * aspects.adb: New aspects Default_Value and Default_Component_Value
15456 New format of Aspect_Names table checks for omitted entries
15457 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
15458 handling of boolean aspects for derived types.
15459 New aspects Default_Value and Default_Component_Value
15460 New format of Aspect_Names table checks for omitted entries
15461 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
15462 (Has_Default_Value): New flag
15463 (Has_Default_Component_Value): New flag
15464 (Has_Default_Value): New flag
15465 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
15467 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
15468 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
15469 Default_Value and Default_Component_Value
15470 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
15471 New aspects Default_Value and Default_Component_Value
15472 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
15473 * sprint.adb: Print N_Aspect_Specification node when called from gdb
15475 2011-08-02 Vincent Celier <celier@adacore.com>
15477 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
15478 inherit library kind.
15480 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15482 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
15483 Minor reformatting.
15485 2011-08-02 Robert Dewar <dewar@adacore.com>
15487 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
15489 2011-08-02 Yannick Moy <moy@adacore.com>
15491 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
15493 2011-08-02 Robert Dewar <dewar@adacore.com>
15495 * impunit.adb: Add comment.
15497 2011-08-02 Yannick Moy <moy@adacore.com>
15499 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
15500 qualification of aggregates in formal mode
15501 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
15503 (Resolve_Aggregate): complete the test that an aggregate is adequately
15504 qualified in formal mode
15506 2011-08-02 Pascal Obry <obry@adacore.com>
15508 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
15509 * mlib-prj.adb: Supress warning when compiling binder generated file.
15510 (Build_Library): Supress all warnings when compiling the binder
15513 2011-08-02 Yannick Moy <moy@adacore.com>
15515 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
15517 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
15518 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
15519 Add with/use clauses to make Check_Formal_Restriction visible
15521 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15523 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
15524 in-parameters when type of the generic formal is private in the generic
15525 spec and non-private in the body.
15527 2011-08-02 Claire Dross <dross@adacore.com>
15529 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
15530 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
15531 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
15532 * impunit.adb, Makefile.rtl: Take new files into account.
15534 2011-08-02 Robert Dewar <dewar@adacore.com>
15536 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
15537 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
15539 2011-08-02 Yannick Moy <moy@adacore.com>
15541 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
15543 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
15544 matching static array bounds, taking into account the special case of
15546 * sem_ch3.adb: Typo in comment.
15548 2011-08-02 Yannick Moy <moy@adacore.com>
15550 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
15551 which issues an error in formal mode if its argument node is originally
15553 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
15554 has a discriminant specification so that it does not include the case
15556 (Derived_Type_Declaration): move here the test that a derived type has a
15557 discriminant specification
15558 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
15559 first element of a component association before accessing its choices
15560 (presence of component association is not enough)
15561 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
15562 declaration is a library item before accessing the next element in a
15563 list, as library items are not member of lists
15564 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
15565 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
15566 Check_Formal_Restriction whenever possible.
15568 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15570 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
15571 reference when needed.
15573 2011-08-02 Bob Duff <duff@adacore.com>
15575 * gnat_ugn.texi: Fix typo.
15577 2011-08-02 Vincent Celier <celier@adacore.com>
15579 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
15580 archive file name. Do not use the full path name of archives for Open
15583 2011-08-02 Robert Dewar <dewar@adacore.com>
15585 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
15586 Analyze_Aspect_Specifications
15588 (Analyze_Aspect_Specifications): New handling for boolean aspects
15589 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
15590 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
15591 sequence for Analyze_Aspect_Specifications
15592 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
15593 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
15595 2011-08-02 Robert Dewar <dewar@adacore.com>
15597 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
15598 aspects, since these no longer exist.
15600 2011-08-02 Robert Dewar <dewar@adacore.com>
15602 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
15603 semicolon, do not try to see if there are aspects following it.
15604 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
15607 2011-08-02 Robert Dewar <dewar@adacore.com>
15609 * sem_ch8.adb, aspects.ads: Minor reformatting.
15611 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
15613 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
15614 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
15616 (Analyze_Aspect_Specifications): ...here. Call above procedure.
15618 2011-08-02 Yannick Moy <moy@adacore.com>
15620 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
15621 mode on subprogram declaration outside of package specification, unless
15622 it is followed by a pragma Import
15623 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
15624 Access_Type_Declaration): issue error in formal mode on access type
15625 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
15627 (Analyze_Object_Declaration): issue error in formal mode on object
15628 declaration which does not respect SPARK restrictions
15629 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
15630 declaration which does not respect SPARK restrictions
15631 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
15632 error in formal mode on digits or delta constraint
15633 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
15634 decimal fixed point type
15635 (Derived_Type_Declaration): issue error in formal mode on derived type
15636 other than type extensions of tagged record types
15637 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
15638 with check on access definition
15639 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
15640 mode on protected definition.
15641 (Analyze_Task_Definition): issue error in formal mode on task definition
15643 2011-08-02 Robert Dewar <dewar@adacore.com>
15645 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
15647 2011-08-02 Javier Miranda <miranda@adacore.com>
15649 * sem_ch6.adb (Can_Override_Operator): New function.
15650 (Verify_Overriding_Indicator): Add missing code to check overriding
15651 indicator in operators. Fixes regression.
15652 (Check_Overriding_Indicator): Minor reformating after replacing the
15653 code that evaluates if the subprogram can override an operator by
15654 invocations to the above new function.
15656 (Write_Field26_Name): Add missing code to ensure that, following
15657 the documentation in einfo.ads, this field is not shown as attribute
15658 "Static_Initialization" on non-dispatching functions.
15660 2011-08-02 Jose Ruiz <ruiz@adacore.com>
15662 * sem_res.adb (Resolve_Call): A call to
15663 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
15664 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
15665 i.e., when the second parameter is of type Time_Span.
15667 2011-08-02 Vincent Celier <celier@adacore.com>
15669 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
15670 with an archive instead of -L<library dir> -l<library name>.
15672 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15674 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
15675 mark the base types In_Use in addition to making the operations
15678 2011-08-02 Ed Falis <falis@adacore.com>
15680 * init.c: add and setup __gnat_signal_mask for the exception signals
15681 * s-inmaop-vxworks.adb: new file.
15682 * s-intman-vxworks.adb: remove unnecessary initializations and
15684 * s-intman-vxworks.ads: remove unnecessary variable
15685 * s-taprop-vxworks.adb: simplify signal initialization
15687 2011-08-02 Robert Dewar <dewar@adacore.com>
15689 * sem_ch8.adb: Minor code reorganization, comment updates.
15691 2011-08-02 Robert Dewar <dewar@adacore.com>
15693 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
15694 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
15696 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
15697 (Matching_Static_Array_Bounds): Moved here from Sem_Res
15699 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15701 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
15702 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
15703 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
15704 use_type_clauses, to handle more efficiently use_type and use_all_type
15706 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
15707 Ada2012 Use_All_Type clause.
15708 (Use_Class_Wide_Operations): new procedure.
15710 2011-08-02 Robert Dewar <dewar@adacore.com>
15712 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
15713 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
15714 expression to expression function.
15716 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15718 * sem_ch4.adb: transform simple Ada2012 membership into equality only
15719 if types are compatible.
15721 2011-08-02 Yannick Moy <moy@adacore.com>
15723 * sem_res.adb (Matching_Static_Array_Bounds): new function which
15724 returns True if its argument array types have same dimension and same
15725 static bounds at each index.
15726 (Resolve_Actuals): issue an error in formal mode on actuals passed as
15727 OUT or IN OUT paramaters which are not view conversions in SPARK.
15728 (Resolve_Arithmetic_Op): issue an error in formal mode on
15729 multiplication or division with operands of fixed point types which are
15730 not qualified or explicitly converted.
15731 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
15732 Boolean or array type (except String) operands.
15733 (Resolve_Equality_Op): issue an error in formal mode on equality
15734 operators for array types other than String with non-matching static
15736 (Resolve_Logical_Op): issue an error in formal mode on logical operators
15737 for array types with non-matching static bounds. Factorize the code in
15738 Matching_Static_Array_Bounds.
15739 (Resolve_Qualified_Expression): issue an error in formal mode on
15740 qualified expressions for array types with non-matching static bounds.
15741 (Resolve_Type_Conversion): issue an error in formal mode on type
15742 conversion for array types with non-matching static bounds
15744 2011-08-02 Robert Dewar <dewar@adacore.com>
15746 * par-ch10.adb: Minor code reorganization (use Nkind_In).
15748 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15750 * par-ch9.adb: save location of entry for proper error message.
15752 2011-08-02 Javier Miranda <miranda@adacore.com>
15754 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
15755 (Use_Full_View) which permits this routine to climb through the
15756 ancestors using the full-view of private parents.
15757 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
15758 Use_Full_View to true in calls to Is_Ancestor.
15759 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
15760 true in call to Is_Ancestor.
15761 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
15762 Use_Full_View to true in call to Is_Ancestor.
15763 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
15764 call to Is_Ancestor.
15765 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
15766 Use_Full_View to true in calls to Is_Ancestor.
15767 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
15768 Make_Select_Specific_Data_Table, Register_Primitive,
15769 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
15770 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
15771 to true in call to Is_Ancestor.
15772 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
15773 Use_Full_View to true in calls to Is_Ancestor.
15775 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
15776 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
15778 2011-08-02 Robert Dewar <dewar@adacore.com>
15780 * gnat_rm.texi: Minor reformatting.
15781 * sem_prag.adb: Minor reformatting.
15783 2011-08-02 Tristan Gingold <gingold@adacore.com>
15785 * vms_data.ads: Add VMS qualifier for -gnateP.
15787 2011-08-02 Robert Dewar <dewar@adacore.com>
15789 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
15790 * par-ch7.adb (P_Package): Proper placement of aspects for package
15791 decl/instantiation.
15792 * par-endh.adb (Check_End): Ad Is_Sloc parameter
15793 (End_Statements): Add Is_Sloc parameterr
15794 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
15795 (Check_End): Ad Is_Sloc parameter
15796 (End_Statements): Add Is_Sloc parameterr
15798 2011-08-02 Vincent Celier <celier@adacore.com>
15800 * ug_words: Add VMS qualifier equivalent to -gnateP:
15801 /SYMBOL_PREPROCESSING.
15803 2011-08-02 Jose Ruiz <ruiz@adacore.com>
15805 * gnat-style.texi: For hexadecimal numeric literals the typical
15806 grouping of digits is 4 to represent 2 bytes.
15807 A procedure spec which is split into several lines is indented two
15810 2011-08-02 Yannick Moy <moy@adacore.com>
15812 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
15813 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
15814 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
15816 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
15817 choice in array aggregate
15818 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
15820 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
15821 positional and named aggregate for record, or others in record
15822 aggregate, or multiple choice in record aggregate
15823 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
15824 array operands to logical operations AND, OR and XOR do not have the
15825 same static lower and higher bounds
15826 * sem_ch5.adb, sinfo.ads: Correct typos in comments
15828 2011-08-01 Robert Dewar <dewar@adacore.com>
15830 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
15831 Replaces Last_Source_Node_In_Sequence.
15832 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
15833 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
15834 parens and blank in string (this was inconsistently implemented).
15836 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
15837 blank in string (this was inconsistently implemented).
15839 (Set_Global_Switches): Set formal mode switches appropriately
15840 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
15842 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
15843 call Set_Error_Msg_Lang to set "spark" as language name.
15844 * par.adb: Remove unnecessary call to set formal language for errout
15845 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
15846 appropriately and call Set_Error_Msg_Lang to set "spark" as language
15848 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
15849 calls to it, moved after resolution so that types are known
15850 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
15851 result of concatenation is not of type String
15852 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
15853 concatenation is not properly restricted
15854 * gnat_rm.texi: Add doc on pragma Spark_95.
15855 * gcc-interface/Makefile.in: Remove obsolete target pairs for
15856 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
15857 * gcc-interface/Make-lang.in: Update dependencies.
15859 2011-08-01 Javier Miranda <miranda@adacore.com>
15861 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
15862 condition that detects if the overridden operation must replace an
15865 2011-08-01 Javier Miranda <miranda@adacore.com>
15867 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
15868 code declarations inserted by Insert_Actions in each alternative of the
15869 N_Case_Expression node.
15871 2011-08-01 Robert Dewar <dewar@adacore.com>
15873 * sem_ch6.adb: Minor code reorganization.
15874 * sem_util.adb: Minor reformatting.
15876 2011-08-01 Pascal Obry <obry@adacore.com>
15878 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
15879 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
15881 2011-08-01 Yannick Moy <moy@adacore.com>
15883 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
15884 literal or operator symbol which is prefixed
15885 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
15886 mode on access attributes.
15887 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
15888 that concatenation operands are properly restricted in formal mode
15889 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
15890 Analyze_Concatenation_Operand. Issue an error in formal mode if the
15891 result of the concatenation has a type different from String.
15892 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
15893 Analyze_Quantified_Expression, Analyze_Slice,
15894 Analyze_Null): issue an error in formal mode on unsupported constructs
15896 (Analyze_Block_Statement): only issue error on source block statement
15897 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
15898 function which returns the last node in a list of nodes for which
15899 Comes_From_Source returns True, if any
15900 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
15901 Last_Source_Node_In_Sequence
15902 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
15903 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
15904 mode on unsupported constructs
15905 * sem_ch9.adb Do not return after issuing error in formal mode, as the
15906 rest of the actions may be needed later on since the error is marked as
15908 * sinfo.ads: Typos in comments.
15910 2011-08-01 Pascal Obry <obry@adacore.com>
15912 * projects.texi: Minor editing.
15914 2011-08-01 Yannick Moy <moy@adacore.com>
15916 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
15917 insertion character ~~
15918 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
15919 (Set_Error_Msg_Lang): new procedure which fixes the language for use
15920 with insertion character ~~
15921 (Set_Msg_Text): treat insertion character ~~
15922 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
15923 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
15924 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
15925 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
15926 errors related to the formal language restriction not serious
15927 (insertion character |).
15928 * par.adb (Par): set formal language for error messages if needed
15929 * sem_ch6.adb (Check_Missing_Return): take into account possible
15930 generated statements at the end of the function
15931 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
15932 enumeration value to define a new pragma SPARK_95
15933 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
15934 SPARK_Version): new type and variables to store the SPARK version
15936 (SPARK_Mode): return True when SPARK_Version is set
15937 * par-prag.adb: Correct indentation
15938 (Prag): take Pragma_SPARK_95 into account
15939 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
15942 2011-08-01 Robert Dewar <dewar@adacore.com>
15944 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
15945 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
15946 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
15948 2011-08-01 Pascal Obry <obry@adacore.com>
15950 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
15951 Target_Name to Get_Path call.
15952 (Parse_Single_Project): Likewise.
15953 (Post_Parse_Context_Clause): Likewise.
15954 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
15955 Call Initialise_Project_Path with the proper Target_Name.
15956 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
15958 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
15959 with the proper Target_Name.
15960 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
15961 Part.Parse routine.
15962 (Parse_Project_And_Apply_Config): Likewise.
15963 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
15964 This is fine as this part of the code is supporting only native
15966 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
15967 is fine as this part of the code is supporting only native compilation.
15969 2011-08-01 Yannick Moy <moy@adacore.com>
15971 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
15972 of homonym, unless the homonym is one of the cases allowed in SPARK
15973 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
15974 package declaration occurring after a body.
15976 2011-08-01 Robert Dewar <dewar@adacore.com>
15978 * checks.adb, exp_ch4.adb: Minor reformatting.
15980 2011-08-01 Javier Miranda <miranda@adacore.com>
15982 * einfo.ads (Access_Disp_Table): Fix documentation.
15983 (Dispatch_Table_Wrappers): Fix documentation.
15985 2011-08-01 Pascal Obry <obry@adacore.com>
15987 * prj-env.adb, prj-env.ads: Minor reformatting.
15989 2011-08-01 Yannick Moy <moy@adacore.com>
15991 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
15992 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
15993 procedures out of these packages.
15994 * errout.ads, errout.adb
15995 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
15996 procedures in of this package
15997 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
15998 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
15999 on misplaced later vs initial declarations, like in Ada 83
16000 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
16001 formal mode on attribute of private type whose full type declaration
16003 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
16004 package declaration inside a package specification
16005 (Analyze_Full_Type_Declaration): issue error in formal mode on
16006 controlled type or discriminant type
16007 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
16008 user-defined operator means that it should come from the source
16009 (New_Overloaded_Entity): issue error in formal mode on overloaded
16011 * sem_ch6.ads, sem_ch13.ads: typos in comments.
16013 2011-08-01 Thomas Quinot <quinot@adacore.com>
16015 * atree.adb: Minor reformatting.
16016 * checks.adb: Minor reformatting.
16018 2011-08-01 Vincent Celier <celier@adacore.com>
16020 * s-parame-vms-ia64.ads: Fix typo in comment
16022 * s-parame-vms-restrict.ads: Removed, unused.
16024 2011-08-01 Javier Miranda <miranda@adacore.com>
16027 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
16029 (Constrain_Index): Remove side effects in the evaluation of the bounds.
16030 * sem_ch3.ads, sem_ch3.adb
16031 (Is_Constant_Bound): New extended version of the subprogram that was
16032 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
16033 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
16034 * sem_aux.ads (Constant_Value): Fix typo in comment.
16035 * checks.adb (Generate_Index_Checks): New implementation which, for
16036 array objects with constant bounds, generates the runtime check
16037 referencing the bounds of the array type. For other cases this routine
16038 provides its previous behavior obtaining such values from the array
16040 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
16042 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
16043 we cannot have semantic interpretations of the new node.
16045 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16047 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
16050 2011-08-01 Arnaud Charlet <charlet@adacore.com>
16052 * sem_ch8.adb: Minor code editing.
16053 * s-vxwext.adb: Remove trailing space.
16054 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
16055 consistency with other files.
16057 2011-08-01 Thomas Quinot <quinot@adacore.com>
16059 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
16061 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16063 * par-ch10.adb: reject parameterized expressions as compilation unit.
16064 * sem_ch4.adb: handle properly conditional expression with overloaded
16065 then_clause and no else_clause.
16067 2011-08-01 Tristan Gingold <gingold@adacore.com>
16069 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
16070 like done by System.Aux_DEC.
16071 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
16073 2011-08-01 Yannick Moy <moy@adacore.com>
16075 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
16076 missing label at end of declaration (subprogram or package)
16077 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
16078 of positional and named parameter association
16079 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
16080 Error_Msg_SP which adds a prefix to the error message giving the name
16081 of the formal language analyzed
16082 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
16083 access result type in subprogram, unconstrained array as result type,.
16084 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
16086 * sem_ch8.adb: Code clean up.
16088 2011-08-01 Javier Miranda <miranda@adacore.com>
16090 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
16091 * einfo.ads (Access_Disp_Table): Fix documentation.
16092 (Dispatch_Table_Wrappers): Fix documentation.
16093 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
16094 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
16095 to enforce the documentation of this attribute.
16096 (Set_Is_Interface): Cleanup the assertion.
16097 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
16098 the Underlying_Type entity before reading attribute Access_Disp_Table.
16099 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
16100 Locate the Underlying_Type before reading attribute Access_Disp_Table.
16101 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
16102 the Underlying_Type entity before reading attribute Access_Disp_Table.
16103 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
16104 Locate the Underlying_Type entity before reading attribute
16107 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16109 * s-poosiz.ads: Additional overriding indicators.
16111 2011-08-01 Yannick Moy <moy@adacore.com>
16113 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
16115 (Analyze_Iteration_Scheme): issue error in formal mode when loop
16116 parameter specification does not include a subtype mark.
16117 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
16118 formal mode on abstract subprogram.
16119 (Analyze_Subprogram_Specification): issue error in formal mode on
16120 user-defined operator.
16121 (Process_Formals): issue error in formal mode on access parameter and
16122 default expression.
16123 * sem_ch9.adb (Analyze_Abort_Statement,
16124 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
16125 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
16126 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
16127 Analyze_Requeue, Analyze_Selective_Accept,
16128 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
16129 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
16130 issue error in formal mode on user-defined raise statement.
16132 2011-08-01 Thomas Quinot <quinot@adacore.com>
16134 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
16135 declaration being hidden when overriding an implicit inherited
16137 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
16138 (-gnats), do not complain about a source file that contains only a
16141 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16143 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
16144 variable if already set.
16146 2011-08-01 Arnaud Charlet <charlet@adacore.com>
16148 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
16149 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
16150 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
16151 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
16152 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
16153 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
16154 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
16155 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
16156 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
16157 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
16158 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
16159 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
16160 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
16161 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
16162 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
16163 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
16164 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
16165 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
16166 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
16167 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
16168 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
16169 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
16170 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
16171 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
16172 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
16173 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
16174 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
16175 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
16176 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
16177 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
16178 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
16179 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
16180 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
16181 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
16182 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
16183 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
16184 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
16185 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
16186 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
16187 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
16188 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
16189 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
16190 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
16191 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
16192 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
16193 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
16194 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
16195 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
16196 s-osinte-mingw.ads: Update to GPLv3 run-time license.
16197 Use GNAT instead of GNARL.
16199 2011-08-01 Bob Duff <duff@adacore.com>
16201 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
16202 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
16203 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
16206 2011-08-01 Yannick Moy <moy@adacore.com>
16208 * debug.adb (d.D) reverve flag for the SPARK mode
16209 (d.E) reverve flag for SPARK generation mode
16210 (d.F) reverve flag for Why generation mode
16211 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
16212 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
16213 functions which return True when the corresponding modes are set
16214 (Formal_Language): return "spark" or "alfa" when in formal verification
16216 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
16217 Error_Msg to prefix the error message with a tag giving the formal
16219 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
16220 message with a tag giving the formal language
16221 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
16223 (Analyze_Case_Statement): issue error in formal mode on case statement
16224 with a single "others" case alternative
16225 (Analyze_Exit_Statement): issue errors in formal mode on exit
16226 statements which do not respect SPARK restrictions
16227 (Analyze_Goto_Statement): issue error in formal mode on goto statement
16228 (Check_Unreachable_Code): always issue an error (not a warning) in
16229 formal mode on unreachable code (concerns both code after an infinite
16230 loop and after an unconditional jump, both not allowed in SPARK)
16231 * sem_ch6.adb (Analyze_Return_Statement): add call to
16232 Set_Return_Present for a procedure containing a return statement
16233 (already done for functions in Analyze_Function_Return)
16234 (Analyze_Function_Return): issue error in formal mode on extended
16235 return or if return is not last statement in function
16236 (Check_Missing_Return): issue error in formal mode if function does
16237 not end with return or if procedure contains a return
16238 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
16239 function to detect if there is an inner scope of its parameter S which
16242 2011-08-01 Thomas Quinot <quinot@adacore.com>
16244 * sem_ch6.ads: Minor reformatting.
16246 2011-08-01 Javier Miranda <miranda@adacore.com>
16248 * sem_util.adb (Abstract_Interface_List): Complete condition when
16249 processing private type declarations to avoid reading unavailable
16251 (Is_Synchronized_Tagged_Type): Complete condition when processing
16252 private extension declaration nodes to avoid reading unavailable
16255 2011-08-01 Thomas Quinot <quinot@adacore.com>
16257 * sem_ch3.adb: Minor reformatting.
16259 2011-08-01 Thomas Quinot <quinot@adacore.com>
16261 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
16262 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
16263 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
16264 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
16265 for VMS, instead parametrize the common implementation with
16266 System.Parameters declarations.
16268 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
16270 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
16272 2011-08-01 Tristan Gingold <gingold@adacore.com>
16274 * seh_init.c: Fix SEH handler installation on win64.
16276 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16278 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
16279 double analysis of an anonymous access to subprogram, because it can
16280 lead to improper sharing of profiles and a back-end crash.
16282 2011-08-01 Robert Dewar <dewar@adacore.com>
16284 * make.adb, sem_ch4.adb: Minor reformatting.
16285 * gcc-interface/Make-lang.in: Update dependencies.
16286 * sem_util.adb, exp_ch5.adb: Minor reformatting.
16288 2011-08-01 Arnaud Charlet <charlet@adacore.com>
16290 * gnat_rm.texi: Fix definition of Long_Integer.
16292 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16294 * exp_aggr.adb: check limit size of static aggregate unconditionally,
16295 to prevent storage exhaustion.
16296 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
16297 finalized is a function body, insert the cleanup code before the final
16298 return statement, to prevent spurious warnings.
16299 * s-pooglo.ads: add overriding indicator.
16301 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16303 * sem_ch4.adb (Operator_Check): improve error message when both a
16304 with_clause and a use_clause are needed to make operator usage legal.
16305 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
16306 determine whether a compilation unit is visible within an other,
16307 either through a with_clause in the current unit, or a with_clause in
16308 its library unit or one one of its parents.
16310 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16312 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
16313 over an arbitrary expression of an array or container type.
16314 * lib-xref.adb: clarify comment.
16316 2011-08-01 Bob Duff <duff@adacore.com>
16318 * einfo.ads: Minor reformatting.
16319 * debug.adb: Minor comment improvement.
16321 2011-08-01 Javier Miranda <miranda@adacore.com>
16323 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
16324 consider hidden subprograms as valid candidates.
16326 2011-08-01 Arnaud Charlet <charlet@adacore.com>
16328 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
16330 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
16332 * gnat_ugn.texi: Fix typo.
16334 2011-08-01 Robert Dewar <dewar@adacore.com>
16336 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
16337 lib-xref.adb: Minor reformatting
16339 2011-08-01 Gary Dismukes <dismukes@adacore.com>
16341 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
16342 when to generate a call to Move_Final_List.
16343 (Has_Controlled_Parts): Remove this function.
16345 2011-08-01 Geert Bosch <bosch@adacore.com>
16347 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
16348 "," in choice list.
16350 2011-08-01 Thomas Quinot <quinot@adacore.com>
16352 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
16353 explicit raise of a predefined exception as Comes_From_Source if the
16354 original N_Raise_Statement comes from source.
16356 2011-08-01 Robert Dewar <dewar@adacore.com>
16358 * sinfo.ads: Add comment.
16359 * sem_ch6.adb: Minor reformatting.
16361 2011-08-01 Robert Dewar <dewar@adacore.com>
16363 * freeze.adb (Freeze_Entity): Refine check for bad component size
16364 clause to avoid rejecting confirming clause when atomic/aliased present.
16366 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16368 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
16369 better determine whether an entity reference is a write.
16370 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
16372 * lib-xref.adb (Output_References): Do no suppress a read reference at
16373 the same location as an immediately preceeding modify-reference, to
16374 handle properly in-out actuals.
16376 2011-08-01 Tristan Gingold <gingold@adacore.com>
16378 * env.c (__gnat_setenv) [VMS]: Refine previous change.
16380 2011-08-01 Quentin Ochem <ochem@adacore.com>
16382 * i-cstrin.adb (New_String): Changed implementation, now uses only the
16383 heap to compute the result.
16385 2011-08-01 Robert Dewar <dewar@adacore.com>
16387 * atree.ads: Minor reformatting.
16389 2011-08-01 Emmanuel Briot <briot@adacore.com>
16391 * g-expect.adb (Get_Command_Output): Fix memory leak.
16393 2011-08-01 Geert Bosch <bosch@adacore.com>
16395 * cstand.adb (P_Float_Type): New procedure to print the definition of
16396 predefined fpt types.
16397 (P_Mixed_Name): New procedure to print a name using mixed case
16398 (Print_Standard): Use P_Float_Type for printing floating point types
16399 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
16400 precision IEEE float.
16402 2011-08-01 Thomas Quinot <quinot@adacore.com>
16404 * sem_ch3.adb: Minor reformatting.
16406 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16408 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
16409 the completion of a generic function, insert the new body rather than
16410 rewriting the original.
16412 2011-08-01 Yannick Moy <moy@adacore.com>
16414 * sinfo.ads, errout.ads: Typos in comments.
16416 2011-08-01 Robert Dewar <dewar@adacore.com>
16418 * par-endh.adb: Minor reformatting.
16420 2011-08-01 Robert Dewar <dewar@adacore.com>
16422 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
16423 (Pre_Post_Aspects): New subtype.
16424 * par-ch12.adb (P_Generic): New syntax for aspects in packages
16425 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
16426 * par-ch7.adb (P_Package): Remove Decl parameter
16427 (P_Package): Handle new syntax for aspects (before IS)
16428 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
16430 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
16431 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
16432 (P_Package): Remove Decl parameter
16433 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
16435 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
16437 * sem_util.ads, sem_util.adb (Static_Boolean): New function
16438 * sinfo.ads: Document new syntax for aspects in packages etc.
16439 * sprint.adb: Handle new syntax of aspects before IS in package
16441 2011-08-01 Thomas Quinot <quinot@adacore.com>
16443 * atree.ads: Minor reformatting.
16444 * sem_prag.adb: Minor reformatting.
16446 2011-08-01 Robert Dewar <dewar@adacore.com>
16448 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
16449 case expr alternative.
16451 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16453 * sem_ch12.adb: Fix typo.
16455 2011-08-01 Geert Bosch <bosch@adacore.com>
16457 * sem_prag.adb (Check_No_Link_Name): New procedure.
16458 (Process_Import_Or_Interface): Use Check_No_Link_Name.
16459 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
16460 instead of Standard_Long_Long_Float_Size global. Preparation for
16461 eventual removal of per type constants.
16462 * exp_util.ads (Get_Stream_Size): New function returning the stream
16463 size value of subtype E.
16464 * exp_util.adb (Get_Stream_Size): Implement new function.
16465 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
16467 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
16469 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
16471 2011-08-01 Geert Bosch <bosch@adacore.com>
16473 * cstand.adb: Fix comments.
16474 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
16475 count of arguments.
16477 2011-08-01 Robert Dewar <dewar@adacore.com>
16479 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
16481 2011-08-01 Geert Bosch <bosch@adacore.com>
16483 * atree.ads: Fix comment.
16485 2011-08-01 Robert Dewar <dewar@adacore.com>
16487 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
16488 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
16489 * par.adb: Add with for Namet.Sp.
16490 * par-tchk.adb: Minor reformatting.
16492 2011-08-01 Vincent Celier <celier@adacore.com>
16494 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
16495 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
16496 of the init procedure of a SAL.
16497 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
16500 2011-08-01 Thomas Quinot <quinot@adacore.com>
16502 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
16505 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
16507 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
16509 2011-08-01 Thomas Quinot <quinot@adacore.com>
16511 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
16512 conformant with its spec (return True only for types that have
16513 an overriding Initialize primitive operation that prevents them from
16514 having preelaborable initialization).
16515 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
16516 initialization for controlled types in Ada 2005 or later mode.
16518 2011-08-01 Robert Dewar <dewar@adacore.com>
16520 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
16522 (Same_Aspect): New function.
16523 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
16524 Type_Invariant, Precondition, Postcondition.
16525 * snames.ads-tmpl: Add Name_Type_Invariant.
16527 2011-08-01 Robert Dewar <dewar@adacore.com>
16529 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
16531 (Freeze_All_Ent): Fix error in handling inherited aspects.
16532 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
16533 already analyzed, but don't skip entire processing of a declaration,
16534 that's wrong in some cases of declarations being rewritten.
16535 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
16536 Don't delay for integer, string literals
16537 Treat predicates in usual manner for delay, remove special case code,
16539 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
16540 (Build_Predicate_Function): Update saved expression in aspect
16541 (Build_Invariant_Procedure): Update saved expression in aspect
16542 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
16543 of replacement of discriminant references if the reference is simple.
16545 2011-08-01 Robert Dewar <dewar@adacore.com>
16547 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
16548 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
16549 Static_Predicate and Dynamic_Predicate.
16550 (Build_Predicate_Function): Add processing for Static_Predicate
16551 and Dynamic_Predicate.
16552 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
16553 (From_Static_Predicate): New flag
16554 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
16556 2011-08-01 Robert Dewar <dewar@adacore.com>
16558 * usage.adb: Documentation cleanup for Ada version modes in usage.
16559 * expander.adb: Minor reformatting.
16561 2011-08-01 Robert Dewar <dewar@adacore.com>
16563 * atree.ads: Minor comment fix.
16564 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
16565 a-witeio.ads, sem_prag.adb: Minor reformatting.
16567 2011-08-01 Doug Rupp <rupp@adacore.com>
16569 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
16570 pointers. Use descrip.h header file for convenience. Add some
16573 2011-08-01 Robert Dewar <dewar@adacore.com>
16575 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
16576 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
16577 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
16579 (Check_Aspect_At_End_Of_Declarations): New procedure
16580 (Analye_Aspect_Specification): Minor changes for above procedures
16581 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
16582 specification node as well.
16584 2011-08-01 Pascal Obry <obry@adacore.com>
16586 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
16587 Windows files. Use GetFilesAttributes() in this case to check for file
16588 existence instead of returning with an error code.
16590 2011-08-01 Vincent Celier <celier@adacore.com>
16592 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
16593 High is above Source length.
16595 2011-08-01 Robert Dewar <dewar@adacore.com>
16597 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
16599 2011-08-01 Robert Dewar <dewar@adacore.com>
16601 * aspects.ads (Boolean_Aspects): New subtype.
16602 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
16603 for derived types in cases where the parent type and derived type have
16605 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
16606 with aspects when parent type also has aspects.
16607 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
16608 boolean expression at this point).
16609 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
16610 accordance with final decision on the Ada 2012 feature.
16611 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
16613 2011-08-01 Matthew Heaney <heaney@adacore.com>
16615 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
16617 2011-08-01 Pascal Obry <obry@adacore.com>
16619 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
16620 Fix Replace_Slice when High is above current string size.
16621 (Replace_Slice): Fix DL computation when High is above current
16624 2011-08-01 Gary Dismukes <dismukes@adacore.com>
16626 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
16628 2011-08-01 Matthew Heaney <heaney@adacore.com>
16630 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
16633 2011-08-01 Pascal Obry <obry@adacore.com>
16635 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
16638 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16640 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
16641 access to protected subprograms in generic bodies.
16642 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
16643 protected type, indicate that the convention of the subprogram is
16644 Convention_Protected, because it may be used in subsequent declarations
16645 within the protected declaration.
16647 2011-08-01 Vincent Celier <celier@adacore.com>
16649 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
16650 and "final" procedures when the name of the library is "ada", to avoid
16651 duplicate symbols "adainit" and "adafinal" in executables.
16653 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16655 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
16656 quantified expression that appears within a postcondition and uses the
16657 Ada2012 'Result attribute.
16659 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16661 * init.c (__gnat_error_handler): Cast reason to int.
16662 (__gnat_install_handler): Explain sa_sigaction use.
16664 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
16666 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
16667 subprogram has copy-in copy-out parameters, try to promote the mode of
16668 the return type if it is passed in registers.
16670 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
16672 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
16673 left operand as addressable.
16675 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
16677 * gcc-interface/gigi.h (build_function_stub): Remove.
16678 (build_return_expr): Likewise.
16679 (convert_vms_descriptor): Declare.
16680 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
16681 (build_function_stub): Move to...
16682 * gcc-interface/utils2.c (build_return_expr): Move to...
16683 * gcc-interface/trans.c (build_function_stub): ...here.
16684 (build_return_expr): ...here.
16685 (Subprogram_Body_to_gnu): Add local variable for language_function.
16686 Disconnect the parameter attributes cache, if any, once done with it.
16687 Call end_subprog_body only after setting the end_locus.
16688 Build the stub associated with the function, if any, at the very end.
16689 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
16690 variables and streamline control flow.
16692 2011-07-23 Arnaud Charlet <charlet@adacore.com>
16695 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
16696 g-trasym-dwarf.adb.
16698 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16701 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
16702 Assign to act.sa_sigaction.
16703 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
16704 current->return_address to char * before arithmetic.
16706 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16708 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
16709 Correct argument types.
16710 Extract code from reason.
16711 (__gnat_install_handler): Assign to act.sa_sigaction.
16713 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
16715 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
16716 (GNAT1_OBJS): ...here.
16718 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
16721 * g-socthi-mingw.adb (Fill): Fix formatting.
16723 * gcc-interface/gigi.h: Move around comment.
16725 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
16728 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
16730 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
16733 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
16735 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
16737 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
16738 range comparison if Pmode is SImode.
16740 2011-07-12 Laurent GUERBY <laurent@guerby.net>
16741 Eric Botcazou <ebotcazou@adacore.com>
16743 * adadecode.c: Wrap up in extern "C" block.
16744 * adadecode.h: Likewise.
16745 * adaint.c: Likewise. Remove 'const' keyword.
16746 * adaint.h: Likewise.
16747 * argv.c: Likewise.
16748 * atree.h: Likewise.
16750 * cstreams.c: Likewise.
16752 * exit.c: Likewise.
16754 * final.c: Likewise.
16755 * init.c: Likewise.
16756 * initialize.c: Likewise.
16757 * link.c: Likewise.
16758 * namet.h: Likewise.
16759 * nlists.h: Likewise.
16760 * raise.c: Likewise.
16761 * raise.h: Likewise.
16762 * repinfo.h: Likewise.
16763 * seh_init.c: Likewise.
16764 * targext.c: Likewise.
16765 * tracebak.c: Likewise.
16766 * uintp.h: Likewise.
16767 * urealp.h: Likewise.
16768 * xeinfo.adb: Wrap up generated C code in extern "C" block.
16769 * xsinfo.adb: Likewise.
16770 * xsnamest.adb: Likewise.
16771 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
16772 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
16773 * gcc-interface/misc.c: Likewise.
16774 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
16775 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
16776 ada/targext.o here...
16777 (GNAT_ADA_OBJS): ...and not here.
16778 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
16779 (GNATBIND_OBJS): Reorder.
16781 2011-07-07 Richard Henderson <rth@redhat.com>
16783 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
16784 dwarf2out_frame_init.
16786 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
16788 * gcc-interface/misc.c (gnat_init): Tweak previous change.
16790 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16793 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
16795 2011-07-06 Richard Guenther <rguenther@suse.de>
16797 * gcc-interface/misc.c (gnat_init): Merge calls to
16798 build_common_tree_nodes and build_common_tree_nodes_2.
16799 Re-initialize boolean_false_node.
16801 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
16802 Olivier Hainque <hainque@adacore.com>
16803 Nicolas Setton <setton@adacore.com>
16805 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
16806 the type according to the ARTIFICIAL_P parameter.
16807 (create_type_decl): Likewise.
16808 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
16810 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
16812 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
16813 (gnatbind): Likewise.
16815 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16817 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
16819 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
16821 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
16822 local variable throughout. Remove useless call to Base_Type.
16823 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
16824 Take it also into account for the volatileness of the field. Set the
16825 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
16827 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
16829 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
16830 on a dereference built for a by-ref object if it has an address clause.
16832 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
16834 * einfo.ads (Address_Taken): Document use for the second argument of
16835 Asm_Input and Asm_Output attributes.
16836 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
16837 argument is an entity name, then set Address_Taken on it.
16838 <Attribute_Asm_Output>: Likewise.
16839 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
16840 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
16841 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
16842 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
16844 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
16846 PR middle-end/46500
16847 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
16849 2011-06-14 Joseph Myers <joseph@codesourcery.com>
16851 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
16852 (ada/utils.o): Update dependencies.
16853 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
16854 ../../../libcpp/libcpp.a.
16855 * gcc-interface/utils.c: Include common/common-target.h.
16856 (process_attributes): Use targetm_common.have_named_sections.
16858 2011-06-07 Richard Guenther <rguenther@suse.de>
16860 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
16863 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
16865 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
16866 TREE_THIS_NOTRAP flag.
16868 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
16870 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
16873 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
16875 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
16876 constants whose full view has discriminants specially.
16878 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
16880 * gcc-interface/utils.c: Include diagnostic.h.
16881 (gnat_write_global_declarations): Output debug information for all
16882 global type declarations before finalizing the compilation unit.
16883 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
16885 2011-05-25 Jakub Jelinek <jakub@redhat.com>
16887 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
16889 2011-05-25 Kai Tietz <ktietz@redhat.com>
16891 * adaint.c (__gnat_to_canonical_file_list_next): Use array
16892 initialization instead of const/none-const pointer assignment.
16894 2011-05-24 Joseph Myers <joseph@codesourcery.com>
16896 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
16897 $(EXTRA_GNAT1_OBJS).
16898 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
16899 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
16900 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
16901 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
16902 libcommon-target.a instead of prefix.o.
16904 2011-05-21 Joseph Myers <joseph@codesourcery.com>
16907 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
16909 2011-05-20 Joseph Myers <joseph@codesourcery.com>
16911 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
16912 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
16913 instead of version.o.
16915 2011-05-18 Kai Tietz <ktietz@redhat.com>
16917 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
16918 boolean_false_node instead of integer_zero_node.
16919 (convert_with_check): Likewise.
16920 * gcc-interface/decl.c (choices_to_gnu): Likewise.
16922 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
16924 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
16925 type of the parameter is an unconstrained array, convert the actual to
16926 the type of the formal in the In Out and Out cases as well.
16928 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
16930 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
16931 call build_function_type_array or build_varargs_function_type_array
16933 (create_subprog_type): Don't call build_function_type; call
16934 build_function_type_vec instead.
16936 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
16938 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
16939 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
16940 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
16942 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
16944 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
16946 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
16947 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
16949 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
16951 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
16953 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
16955 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
16956 instead of accessing TYPE_ARG_TYPES directly.
16957 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
16959 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
16962 * gcc-interface/gigi.h (get_variant_part): Declare.
16963 * gcc-interface/decl.c (get_variant_part): Make global.
16964 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
16965 types have the same constant size, are record types and T1 has a
16966 variant part while T2 doesn't.
16968 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
16970 * gcc-interface/utils.c (begin_subprog_body): Do not call
16972 (end_subprog_body): Likewise.
16974 2011-05-04 Richard Guenther <rguenther@suse.de>
16976 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
16978 (pos_to_constructor): Likewise.
16980 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
16981 Eric Botcazou <ebotcazou@adacore.com>
16983 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
16984 of build_function_type. Adjust calls to...
16985 (build_raise_check): ...this. Do not take a void_tree parameter.
16986 Call build_function_type_list instead of build_function_type.
16987 Fix head comment and swap couple of conditional blocks.
16989 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
16991 * gnatvsn.ads (Library_Version): Bump to 4.7.
16992 (Current_Year): Bump to 2011.
16994 2011-04-29 Michael Matz <matz@suse.de>
16996 * gcc-interface/misc.c (gnat_handle_option): Set
16997 warn_maybe_uninitialized.
16999 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
17001 * gnat_ugn.texi (Complexity Metrics Control): Update link to
17002 the Watson/McCabe paper.
17004 2011-04-23 Jim Meyering <meyering@redhat.com>
17006 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
17008 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
17010 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
17013 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
17015 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
17017 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
17018 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
17019 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
17020 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
17021 <all>: Do not set flags on the reused DECL node coming from an alias.
17022 Set DECL_IGNORED_P on the DECL node built for subprograms if they
17023 don't need debug info here...
17024 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
17025 (gigi): Adjust calls to create_subprog_decl.
17026 (build_raise_check): Likewise.
17027 (establish_gnat_vms_condition_handler): Likewise.
17028 (Compilation_Unit_to_gnu): Likewise.
17029 (gnat_to_gnu): Likewise.
17031 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
17033 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
17034 (NO_REORDER_ADAFLAGS): New variable.
17035 (EXTRA_GNATTOOLS): Always define.
17036 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
17037 Clean up and adjust list of files compiled with special options.
17038 * gcc-interface/Make-lang.in: Likewise.
17039 (ada/decl.o): Cosmetical change.
17040 (ada/misc.o): Remove dependency on $(PLUGIN_H).
17042 2011-04-20 Jim Meyering <meyering@redhat.com>
17044 * initialize.c (__gnat_initialize): Remove useless if-before-free.
17046 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
17048 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
17049 $(CFLAGS) on the link line.
17051 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
17053 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
17054 padded type built for the return type if it is unconstrained.
17056 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
17058 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
17060 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
17062 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
17063 before calling TREE_CHAIN.
17064 * gcc-interface/misc.c (gnat_init_ts): New function.
17065 (LANG_HOOKS_INIT_TS): Define.
17067 2011-04-12 Martin Jambor <mjambor@suse.cz>
17069 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
17070 instead of cgraph_node.
17072 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
17074 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
17075 alignment on fields of the RETURN type built for the Copy-In Copy-Out
17078 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
17080 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
17081 of aggregate types that contain a placeholder.
17083 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
17085 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
17087 (handle_type_generic_attribute): Likewise.
17089 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
17092 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
17094 2011-04-04 Kai Tietz <ktietz@redhat.com>
17097 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
17100 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17102 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
17103 type case, do not strip a padding type around the array type.
17105 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17107 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
17110 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17112 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
17113 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
17114 code for -feliminate-unused-debug-types.
17115 (gnat_post_options): Likewise.
17117 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17119 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
17120 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
17123 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17125 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
17126 DECL_ARTIFICIAL flag on enumeration types.
17128 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17130 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
17131 fat pointer types artificial unconditionally.
17132 <E_Array_Subtype>: Attach the base array type as a parallel type if it
17135 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17137 * gcc-interface/gigi.h (get_dummy_type): Declare.
17138 (build_dummy_unc_pointer_types): Likewise.
17139 (finish_fat_pointer_type): Likewise.
17140 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
17141 fat pointer type has been built, complete it in place.
17142 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
17143 and thin pointers. Remove useless variable.
17144 (finish_fat_pointer_type): Make global and move to...
17145 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
17146 (get_dummy_type): New function.
17147 (build_dummy_unc_pointer_types): Likewise.
17148 (gnat_pushdecl): Propage the name to the anonymous variants only.
17149 (update_pointer_to): Only adjust the pointer types in the unconstrained
17152 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17154 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
17155 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
17156 if this is a Taft amendment type and the full declaration is available.
17157 * gcc-interface/trans.c (process_type): Likewise.
17158 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
17159 (process_freeze_entity): Likewise.
17160 * gcc-interface/utils.c (dummy_global): New static variable.
17161 (gnat_write_global_declarations): If there are types declared as used
17162 at the global level, insert them in the global hash table.
17164 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17166 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
17167 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
17168 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
17170 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
17171 flag of the type accordingly.
17172 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
17174 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17176 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
17177 finalizing types when updating the pointers to the designated type.
17178 <all>: Finalize the deferred types even if we didn't defer processing
17179 of incomplete types in this invocation.
17181 2011-04-01 Olivier Hainque <hainque@adacore.com>
17182 Nicolas Setton <setton@adacore.com>
17183 Eric Botcazou <ebotcazou@adacore.com>
17185 * gcc-interface/misc.c (gnat_descriptive_type): New function.
17186 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
17188 2011-03-28 Kai Tietz <ktietz@redhat.com>
17190 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
17192 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
17193 * system-mingw.ads (System): Change ZCX_By_Default default to True.
17195 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
17197 2011-03-28 Tristan Gingold <gingold@adacore.com>
17200 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
17201 Use ada output of gnatbind.
17202 (ada/b_gnatb.adb): Ditto.
17203 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
17204 (ada.mostlyclean, ada.stage1)
17205 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
17206 (ada.stagefeedback): Adjust.
17207 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
17208 Use ada output of gnatbind.
17209 (b_gnatm.adb): Ditto.
17210 (b_gnatl.o, b_gnatm.o): New rules.
17212 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
17214 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
17215 for the padded type built to support a specified size or alignment.
17217 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
17219 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
17220 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
17221 unconditionally to the end of the unit when the designated type is
17223 <all>: Rename local variable. Attempt to un-defer types only and do it
17224 for limited_with'ed types as well.
17225 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
17226 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
17227 consistently and remove redundant call to finalize_from_with_types.
17229 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
17231 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
17232 subprograms without a previous spec declared in the same unit.
17233 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
17234 subprograms at the end of the unit instead of at the beginning.
17235 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
17236 isn't public for the special handling of non-inline functions nested
17237 inside inline external functions.
17239 2011-03-25 Jeff Law <law@redhat.com>
17241 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
17243 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
17245 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
17246 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
17247 to compute Set_Size_Depends_On_Discriminant.
17248 (Layout_Type): Call it on array types in back-end layout mode.
17249 * sem_util.adb (Requires_Transient_Scope): Return true for array
17250 types only if the size depends on the value of discriminants.
17251 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
17252 type if the RHS is a call to a function that returns an unconstrained
17253 type with default discriminant.
17255 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
17257 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
17258 non-conversion to the nominal result type at the end.
17260 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
17262 * gcc-interface/trans.c (create_temporary): New function taken from...
17263 (create_init_temporary): ...here. Call it.
17264 (call_to_gnu): Create the temporary for the return value early, if any.
17265 Create it for a function with copy-in/copy-out parameters if there is
17266 no target; in other cases of copy-in/copy-out, use another temporary.
17267 Push the new binding level lazily. Add and rename local variables.
17269 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
17271 * gcc-interface/decl.c (validate_size): Improve comments and tweak
17273 (set_rm_size): Likewise.
17275 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
17277 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
17278 for the padded type built in order to support a specified alignment.
17279 Fix incorrect formatting.
17281 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
17284 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
17286 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
17288 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
17289 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
17290 to the end of the list. Adjust recursive call. Rename local variable.
17291 If REORDER is true, reorder components of the record type.
17292 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
17293 components_to_record and adjust the parameter list.
17295 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
17297 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
17298 disabled, use the variable for bounds of loop iteration scheme.
17300 2011-03-21 Kai Tietz <ktietz@redhat.com>
17303 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
17305 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
17307 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
17308 out whether the expression is read-only. Short-circuit placeholder
17309 case and rename a couple of local variables.
17311 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
17313 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
17314 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
17315 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
17316 (convert): Deal with conversions from a smaller form type specially.
17318 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
17320 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
17321 its argument, except for the special -I- switch.
17323 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
17325 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
17328 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
17330 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
17332 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
17334 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
17336 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
17337 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
17338 instead of GNAT_FORMAL. Protect the expression against multiple uses.
17339 Do not generate the check directly, instead instantiate the template
17340 check present in the descriptor.
17341 (make_descriptor_field): Move around.
17342 (build_vms_descriptor32): Build a template check in the POINTER field.
17343 (build_vms_descriptor): Remove useless suffixes.
17344 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
17346 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
17349 * targext.c: Include target files if IN_RTS is defined.
17351 2011-01-26 Richard Guenther <rguenther@suse.de>
17354 * targext.c: Include config.h.
17355 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
17358 2011-01-04 Pascal Obry <obry@adacore.com>
17359 Eric Botcazou <ebotcazou@adacore.com>
17361 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
17363 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
17365 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
17366 end-of-case on the end label and its associated gotos, if any.
17368 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
17370 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
17371 expressions of the parameter cache within the statement group of
17372 the CICO mechanism.
17374 2011-01-04 Olivier Hainque <hainque@adacore.com>
17375 Eric Botcazou <ebotcazou@adacore.com>
17377 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
17378 (set_end_locus_from_node): New function.
17379 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
17380 make and the function end_locus.
17381 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
17382 for the elaboration subprogram.
17383 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
17384 set the end_locus of the expression as well.
17386 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
17389 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
17390 variables that are referenced in exception handlers volatile.
17394 Copyright (C) 2011 Free Software Foundation, Inc.
17396 Copying and distribution of this file, with or without modification,
17397 are permitted in any medium without royalty provided the copyright
17398 notice and this notice are preserved.