1 2011-12-01 Jakub Jelinek <jakub@redhat.com>
4 * gcc-interface/Make-lang.in: Initialize RTS_DIR with = instead of :=.
6 2011-11-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8 * s-taprop-tru64.adb (Create_Task): Use Unrestricted_Access.
10 2011-11-23 Thomas Quinot <quinot@adacore.com>
12 * thread.c, s-oscons-tmplt.c: Generate __gnat_pthread_condattr_setup
13 only on platforms where this is required, as determined by
16 2011-11-23 Ed Schonberg <schonberg@adacore.com>
18 * sem_ch9.adb: No check on entry index if error on index.
20 2011-11-23 Gary Dismukes <dismukes@adacore.com>
22 * sem_ch6.adb (Analyze_Return_Statement): Improve error messages for
23 return statements nested inside an extended_return_statement.
24 * gcc-interface/Make-lang.in: Update dependencies.
25 * gcc-interface/Makefile.in (MISCLIB): Add -lutil for BSD targets.
27 2011-11-23 Ed Schonberg <schonberg@adacore.com>
29 * freeze.adb (Freeze_All_Ent): An incomplete type is not
30 frozen by a subprogram body that does not come from source.
32 2011-11-23 Pascal Obry <obry@adacore.com>
34 * s-oscons-tmplt.c: Add PTY_Library constant. It contains
35 the library for pseudo terminal support.
36 * g-exptty.ads: Add pseudo-terminal library into a Linker_Options
39 2011-11-23 Ed Schonberg <schonberg@adacore.com>
41 * sem_ch9.adb: No check on entry family index if generic.
43 2011-11-23 Thomas Quinot <quinot@adacore.com>
45 * sem_ch9.adb, s-taprop.ads, s-taprop-hpux-dce.adb, s-taprop-irix.adb,
46 s-taprop-posix.adb, s-taprop-rtx.adb, s-taprop-solaris.adb,
47 s-taprop-tru64.adb, s-taprop-vxworks.adb: Move dependency on
48 System.OS_Constants from shared spec of
49 System.Tasking.Primitive_Operations to the specific body variants
50 that really require this dependency.
52 2011-11-23 Ed Schonberg <schonberg@adacore.com>
54 * sem_ch8.adb (Analyze_Subprogram_Renaming_Declaration):
55 If the declaration has aspects, analyze them so they can be
58 2011-11-23 Hristian Kirtchev <kirtchev@adacore.com>
60 * a-comutr.adb, a-coorma.adb, a-coorse.adb, a-convec.adb, a-cihase.adb,
61 a-cimutr.adb, a-coinve.adb, a-ciorma.adb, a-ciorse.adb, a-cobove.adb,
62 a-cohama.adb, a-cihama.adb, a-cidlli.adb, a-cdlili.adb, a-cbhama.adb,
63 a-cbhase.adb, a-cbmutr.adb, a-cborma.adb, a-cborse.adb, a-cbdlli.adb:
64 Add with and use clause for Ada.Finalization. Type
65 Iterator and Child_Iterator are now derived from Limited_Controlled.
66 (Finalize): New routine.
67 (Iterate): Add a renaming of counter Busy and
68 increment it. Update the return aggregate.
69 (Iterate_Children): Add a renaming of
70 counter Busy and increment it. Update the return aggregate.
71 (Iterate_Subtree): Add a renaming of counter Busy and increment
72 it. Update the return aggregate.
73 * a-cdlili.ads, a-cidlli.ads: Type List_Access is now a general access
75 * a-cihama.ads: Type Map_Access is now a general access type.
76 * a-comutr.ads, a-cimutr.ads: Use type Natural for the two locks
77 associated with the tree.
78 * a-cohama.ads: Type Map_Access is now a general access type.
79 * a-coinve.ads, a-convec.ads: Type Vector_Access is now a general
81 * exp_ch5.adb (Expand_Iterator_Loop): Do not create a block
82 to wrap the loop as this is done at an earlier step, during
83 analysis. The declarations of the iterator and the cursor use
84 the usual Insert_Action mechanism when added into the tree.
85 * sem_ch5.adb (Analyze_Loop_Statement): Remove local constant
86 Loop_Statement and replace all respective uses by N. Add local
87 constant Loc. Preanalyze the loop iterator to discover whether
88 it is a container iterator and if it is, wrap the loop in a
89 block. This ensures that any controlled temporaries produced
90 by the iteration scheme share the same lifetime of the loop.
91 (Is_Container_Iterator): New routine.
92 (Is_Wrapped_In_Block): New routine.
93 (Pre_Analyze_Range): Move spec and body to the library level.
95 2011-11-23 Sergey Rybin <rybin@adacore.com frybin>
97 * gnat_ugn.texi, vms_data.ads: Add documentation for new gnatpp option
98 that controls casing of type and subtype names.
100 2011-11-23 Yannick Moy <moy@adacore.com>
102 * sem_ch3.adb: Minor addition of comments.
104 2011-11-23 Thomas Quinot <quinot@adacore.com>
106 * prj-part.adb (Extension_Withs): New global variable,
107 contains the head of the list of WITH clauses from the EXTENDS
108 ALL projects for which virtual packages are being created.
109 (Look_For_Virtual_Projects_For): When recursing through
110 an EXTENDS ALL, add the WITH clauses of the extending
111 project to Extension_Withs. When adding a project to the
112 Virtual_Hash, record the associated Extension_Withs list.
113 (Create_Virtual_Extending_Project): Add a copy of the appropriate
114 Extension_Withs to the virtual project.
116 2011-11-23 Thomas Quinot <quinot@adacore.com>
118 * mlib-tgt-specific-vxworks.adb: Minor reformatting.
120 2011-11-23 Thomas Quinot <quinot@adacore.com>
122 * Make-generated.in (Sdefault.Target_Name): Set to
123 $(target_noncanonical) instead of $(target) for consistency.
125 2011-11-23 Matthew Heaney <heaney@adacore.com>
127 * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb (Iterator): Declared
128 Iterator type as limited (First, Last): Cursor return value
129 depends on iterator node value (Iterate): Use start position as
130 iterator node value (Next, Previous): Forward to corresponding
131 cursor-based operation.
133 2011-11-23 Matthew Heaney <heaney@adacore.com>
135 * a-coorse.ads, a-ciorse.ads, a-cborse.ads (Set_Iterator_Interfaces):
136 Renamed from Ordered_Set_Iterator_Interfaces.
137 * a-coorse.adb, a-ciorse.adb, a-cborse.adb (Iterator): Declared
138 Iterator type as limited (First, Last): Cursor return value
139 depends on iterator node value (Iterate): Use start position as
140 iterator node value (Next, Previous): Forward to corresponding
141 cursor-based operation.
142 * a-cohase.ads, a-cohase.adb: Implemented forward iterator.
143 * a-cihase.adb, a-cbhase.adb (Iterator): Removed unnecessary
144 node component (First, Next): Forward call to corresponding
145 cursor-based operation (Iterate): Representation of iterator no
146 longer has node component
148 2011-11-23 Hristian Kirtchev <kirtchev@adacore.com>
150 * exp_intr.adb (Expand_Unc_Deallocation): Ensure that the
151 dereference has a proper type before the side effect removal
153 * sem_ch3.adb (Analyze_Subtype_Declaration): Handle a rare case
154 where the base type of the subtype is a private itype created
155 to act as the partial view of a constrained record type. This
156 scenario manifests with equivalent class-wide types for records
157 with unknown discriminants.
159 2011-11-23 Jerome Guitton <guitton@adacore.com>
161 * s-osprim-vxworks.adb (Clock): Use Clock_RT_Ada.
163 2011-11-23 Thomas Quinot <quinot@adacore.com>
165 * s-oscons-tmplt.c: Fix unbalanced preprocessor directives Minor
166 reformatting/reorganization.
168 2011-11-23 Thomas Quinot <quinot@adacore.com>
170 * g-htable.ads: Remove old comments.
172 2011-11-23 Thomas Quinot <quinot@adacore.com>
174 * exp_imgv.adb: Minor reformatting.
176 2011-11-23 Robert Dewar <dewar@adacore.com>
178 * sem_ch9.adb (Analyze_Entry_Declaration): Check for entry
179 family bounds out of range.
181 2011-11-23 Matthew Heaney <heaney@adacore.com>
183 * a-cohama.adb, a-cihama.adb, a-cbhama.adb (Iterator): Declare
184 type as limited, and remove node component.
185 (First, Next): Forward call to corresponding cursor-based operation.
186 (Iterate): Representation of iterator no longer has node component.
188 2011-11-23 Yannick Moy <moy@adacore.com>
190 * exp_util.adb: Revert previous change to remove side-effects in Alfa
191 mode, which is not the correct thing to do for renamings.
193 2011-11-23 Thomas Quinot <quinot@adacore.com>
195 * s-osinte-hpux.ads, s-taprop-vxworks.adb, s-taprop-tru64.adb,
196 s-osinte-vxworks.ads, s-osinte-aix.ads, s-osinte-lynxos.ads,
197 s-osinte-solaris-posix.ads, s-taprop-solaris.adb, a-exetim-posix.adb,
198 s-osinte-irix.ads, s-osinte-solaris.ads, s-oscons-tmplt.c,
199 s-taprop-irix.adb, s-osinte-hpux-dce.ads, Makefile.rtl,
200 s-osinte-tru64.ads, s-osinte-darwin.ads, s-taprop.ads,
201 s-osinte-freebsd.ads, s-osinte-lynxos-3.ads, s-taprop-hpux-dce.adb,
202 s-taprop-posix.adb: Remove hard-coded clock ids;
203 instead, generate them in System.OS_Constants.
204 (System.OS_Constants.CLOCK_RT_Ada): New constant denoting the
205 id of the clock providing Ada.Real_Time.Monotonic_Clock.
206 * thread.c: New file.
207 (__gnat_pthread_condattr_setup): New function. For platforms where
208 CLOCK_RT_Ada is not CLOCK_REALTIME, set appropriate condition
211 2011-11-23 Yannick Moy <moy@adacore.com>
213 * sem_ch3.adb: Restore the use of Expander_Active instead of
214 Full_Expander_Active, so that the evaluation is forced in Alfa
215 mode too. Otherwise, we end up with an unexpected insertion in a
216 place where it is not supposed to happen, on default parameters
219 2011-11-23 Thomas Quinot <quinot@adacore.com>
221 * prj-pp.adb, prj-pp.ads: Minor new addition: wrapper procedure "wpr"
222 for Pretty_Print, for use from within gdb.
224 2011-11-23 Ed Schonberg <schonberg@adacore.com>
226 * exp_ch5.adb (Expand_Iterator_Loop): Wrap the expanded loop
227 and the cursor declarations in a block, so that the loop variable
228 is local to the construct.
230 2011-11-23 Matthew Heaney <heaney@adacore.com>
232 * a-coorma.ads, a-ciorma.ads, a-cborma.ads (Iterate): Returns
233 type Reversible_Iterator'Class.
234 * a-coorma.adb, a-ciorma.adb, a-cborma.adb (Iterator):
235 Declare type as limited.
236 (First, Last): Return value depends on iterator's start node value.
237 (Next, Previous): Call corresponding Cursor-based operation.
238 (Iterate): Indicate whether complete or partial iteration
240 2011-11-23 Robert Dewar <dewar@adacore.com>
242 * errout.adb: Minor reformattin (Finalize): Take templates into
243 account for warning suppression.
244 * errout.ads (Set_Specific_Warning_Off): Add Used parameter.
245 * erroutc.adb: Minor reformatting (Finalize): Take generic
246 templates into account for warning suppress.
247 * erroutc.ads (Set_Specific_Warning_Off): Add Used parameter.
248 * sem_prag.adb: Minor reformatting (Analyze_Pragma,
249 case Warnings): Provide Used parameter in call to
250 Set_Specific_Warnings_Off (to deal with generic template case).
252 2011-11-23 Pascal Obry <obry@adacore.com>
254 * sem_prag.adb (Process_Convention): Better error message for
255 stdcall convention on dispatching calls.
257 2011-11-23 Gary Dismukes <dismukes@adacore.com>
259 * sem_ch4.adb, sem_ch13.adb: Minor reformatting.
261 2011-11-23 Javier Miranda <miranda@adacore.com>
263 * exp_ch6.adb (Expand_Simple_Function_Return): Add missing
264 implicit type conversion when the returned object is allocated
265 in the secondary stack and the type of the returned object is
266 an interface. Done to force generation of displacement of the
269 2011-11-23 Pascal Obry <obry@adacore.com>
271 * impunit.adb: Add g-exptty and g-tty units.
273 2011-11-23 Robert Dewar <dewar@adacore.com>
275 * exp_imgv.adb: Minor code reorganization (use Make_Temporary).
277 2011-11-23 Robert Dewar <dewar@adacore.com>
279 * exp_util.adb, par-ch6.adb, sem_res.adb, par-util.adb: Minor
282 2011-11-23 Yannick Moy <moy@adacore.com>
284 * sem_ch13.adb (Analyze_Aspect_Specifications): Place error on
285 line of precondition/ postcondition/invariant.
287 2011-11-23 Pascal Obry <obry@adacore.com>
289 * g-exptty.ads, g-exptty.adb, g-tty.ads, g-tty.adb,
290 terminals.c: New files.
291 Makefile.rtl: Add these new files.
292 * gnat_rm.texi: Add documentation for GNAT.Expect.TTY.
293 * gcc-interface/Makefile.in: Add g-exptty, g-tty, terminals.o
294 * gcc-interface/Make-lang.in: Update dependencies.
296 2011-11-21 Robert Dewar <dewar@adacore.com>
298 * exp_imgv.adb (Expand_Width_Attribute): Handle case of Discard_Names.
299 * sem_attr.adb (Eval_Attribute, case Width): Ditto.
301 2011-11-21 Thomas Quinot <quinot@adacore.com>
303 * sinfo.ads: Minor reformatting.
305 2011-11-21 Yannick Moy <moy@adacore.com>
307 * exp_util.adb: Minor reformatting. Update comments.
309 2011-11-21 Robert Dewar <dewar@adacore.com>
311 * exp_prag.adb, exp_util.adb, sinfo.ads, sem_res.adb, s-stposu.adb,
312 sem_attr.adb, s-stposu.ads, s-taprop-solaris.adb, s-taprop-irix.adb,
313 sem_ch6.adb: Minor reformatting.
315 2011-11-21 Arnaud Charlet <charlet@adacore.com>
317 * s-taprop-irix.adb, s-taprop-solaris.adb (Create_Task): Use
318 Unrestricted_Access to deal with fact that we properly detect the
319 error if Access is used.
320 * gcc-interface/Make-lang.in: Update dependencies.
322 2011-11-21 Yannick Moy <moy@adacore.com>
324 * exp_prag.adb (Expand_Pragma_Check): Place error on first character
326 * sem_res.adb (Resolve_Short_Circuit): Place error on first
327 character of expression.
329 2011-11-21 Yannick Moy <moy@adacore.com>
331 * exp_util.adb (Remove_Side_Effects): Do nothing in Alfa mode.
333 2011-11-21 Hristian Kirtchev <kirtchev@adacore.com>
335 * exp_attr.adb (Expand_N_Attribute_Reference, case
336 Max_Size_In_Storage_Elements): Account for the size of the
337 hidden list header which precedes controlled objects allocated
339 * rtsfind.ads: Add RE_Header_Size_With_Padding to the runtime
341 * sinfo.adb (Header_Size_Added): New routine.
342 (Set_Header_Size_Added): New routine.
343 * sinfo.ads: Add flag Controlled_Header_Added along with
345 (Header_Size_Added): New inlined routine.
346 (Set_Header_Size_Added): New inlined routine.
347 * s-stposu.adb (Allocate_Any_Controlled): Use
348 Header_Size_With_Padding to calculate the proper
350 (Deallocate_Any_Controlled): Use
351 Header_Size_With_Padding to calculate the proper size
352 of the header. (Header_Size_With_Padding): New routine.
353 (Nearest_Multiple_Rounded_Up): Removed along with its uses.
354 * s-stposu.ads (Header_Size_With_Padding): New routine.
356 2011-11-21 Ed Schonberg <schonberg@adacore.com>
358 * aspects.adb: Aspect specifications are allowed on renaming
360 * par-ch6.adb (P_Subprogram): Parse aspect specifications in a
361 subprogram renaming declaration
363 2011-11-21 Tristan Gingold <gingold@adacore.com>
365 * env.c: Remove unused declaration.
367 2011-11-21 Pascal Obry <obry@adacore.com>
369 * s-os_lib.ads: Minor style fix.
371 2011-11-21 Pascal Obry <obry@adacore.com>
373 * adaint.c (__gnat_dup2): When fd are stdout, stdin or stderr and
374 identical, do nothing on Windows XP.
376 2011-11-21 Yannick Moy <moy@adacore.com>
378 * sem_ch3.adb (Constrain_Index, Process_Range_Expr_In_Decl):
379 Use Full_Expander_Active instead of Expander_Active to control
380 the forced evaluation of expressions for the sake of generating
383 2011-11-21 Thomas Quinot <quinot@adacore.com>
385 * init.c: On FreeBSD, stack checking failures may raise SIGBUS.
387 2011-11-21 Tristan Gingold <gingold@adacore.com>
389 * sysdep.c (mode_read_text, mode_write_text, mode_append_text,
390 mode_read_binary, mode_write_binary, mode_append_binary,
391 mode_read_text_plus, mode_write_text_plus, mode_append_text_plus,
392 mode_read_binary_plus, mode_write_binary_plus,
393 mode_append_binary_plus): Remove unused declarations.
395 2011-11-21 Yannick Moy <moy@adacore.com>
397 * gnat_rm.texi: Minor rewording.
399 2011-11-21 Hristian Kirtchev <kirtchev@adacore.com>
401 * exp_imgv.adb (Expand_Width_Attribute): Emit
402 an error message rather than a warning when pragma Discard_Names
403 prevents the computation of 'Width. Do not emit an error through
406 2011-11-21 Javier Miranda <miranda@adacore.com>
408 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add
409 implicit type conversion when the type of the allocator is an
410 interface. Done to force generation of displacement of the "this"
411 pointer when required.
413 2011-11-21 Ed Schonberg <schonberg@adacore.com>
415 * sinfo.ads, sinfo.adb: Corresponding_Spec applies to expression
416 functions, and is set when the expression is a completion of a
417 previous declaration.
418 * sem_ch6.adb (Analyze_Expression_Function): To determine properly
419 whether an expression function completes a previous declaration,
420 use Find_Corresponding_Spec, as when analyzing a subprogram body.
422 2011-11-21 Steve Baird <baird@adacore.com>
424 * sem_util.adb (Deepest_Type_Access_Level): Improve comment.
425 (Type_Access_Level): Improve comment.
427 2011-11-21 Eric Botcazou <ebotcazou@adacore.com>
429 * gcc-interface/Makefile.in (INCLUDES_FOR_SUBDIR): Add $(fsrcdir) by
430 means of -iquote unconditionally.
432 2011-11-21 Robert Dewar <dewar@adacore.com>
434 * sem_ch3.adb, sem_util.adb, sem_res.adb, sem_attr.adb: Minor
437 2011-11-21 Arnaud Charlet <charlet@adacore.com>
439 * s-taprop-posix.adb (Create_Task): Use Unrestricted_Access
440 to deal with fact that we properly detect the error if Access
443 2011-11-21 Steve Baird <baird@adacore.com>
445 * sem_util.ads: Update comment describing function
446 Deepest_Access_Level.
447 * sem_util.adb (Deepest_Type_Access_Level): Return Int'Last for a
449 (Type_Access_Level): Return library level
450 for a generic formal type.
451 * sem_attr.adb (Resolve_Attribute): Replace two Type_Access_Level
452 calls with calls to Deepest_Type_Access_Level.
453 * sem_ch3.adb (Analyze_Component_Declaration): replace a
454 Type_Access_Level call with a call to Deepest_Type_Access_Level.
455 * sem_res.adb (Resolve_Allocator.Check_Allocator_Discrim_Accessibility):
456 Replace three Type_Access_Level calls with calls to
457 Deepest_Type_Access_Level.
458 (Resolve_Allocator): Replace a Type_Access_Level call with a call to
459 Deepest_Type_Access_Level.
460 (Valid_Conversion.Valid_Array_Conversion): Replace a
461 Type_Access_Level call with a call to Deepest_Type_Access_Level.
463 2011-11-21 Robert Dewar <dewar@adacore.com>
465 * sem_ch3.adb, s-taprop-vms.adb, opt.ads: Minor reformatting.
467 2011-11-21 Robert Dewar <dewar@adacore.com>
469 * sinput.ads: Minor comment fix.
471 2011-11-21 Robert Dewar <dewar@adacore.com>
473 * exp_attr.adb (Expand_N_Attribute_Reference, case First_Bit,
474 Last_Bit, Position): Handle 2005 case.
476 2011-11-21 Robert Dewar <dewar@adacore.com>
478 * s-atocou-builtin.adb (Decrement): Use Unrestricted_Access
479 to deal with fact that we properly detect the error if Access
481 (Increment): Same fix.
482 * s-taprop-linux.adb (Create_Task): Use Unrestricted_Access
483 to deal with fact that we properly detect the error if Access
485 * sem_util.adb (Is_Volatile_Object): Properly record that A.B is
486 volatile if the B component is volatile. This affects the check
487 for passing such a by reference volatile actual to a non-volatile
488 formal (which should be illegal)
490 2011-11-21 Robert Dewar <dewar@adacore.com>
492 * freeze.adb (Freeze_Enumeration_Type): Make sure to set both
493 size and alignment for foreign convention enumeration types.
494 * layout.adb (Set_Elem_Alignment): Redo setting of alignment
497 2011-11-21 Yannick Moy <moy@adacore.com>
499 * checks.adb (Apply_Access_Check, Apply_Arithmetic_Overflow_Check,
500 Apply_Discriminant_Check, Apply_Divide_Check,
501 Apply_Selected_Length_Checks, Apply_Selected_Range_Checks,
502 Build_Discriminant_Checks, Insert_Range_Checks, Selected_Length_Checks,
503 Selected_Range_Checks): Replace reference to Expander_Active
504 with reference to Full_Expander_Active, so that expansion of
505 checks is not performed in Alfa mode
507 2011-11-21 Tristan Gingold <gingold@adacore.com>
509 * s-taprop-vms.adb (Create_Task): Use Unrestricted_Access to deal with
510 fact that we properly detect the error if Access is used.
512 2011-11-21 Hristian Kirtchev <kirtchev@adacore.com>
514 * par-ch4.adb (P_Quantified_Expression): Add an Ada 2012 check.
516 2011-11-21 Hristian Kirtchev <kirtchev@adacore.com>
518 * exp_imgv.adb: Add with and use clause for Errout.
519 (Expand_Width_Attribute): Emit a warning when in
520 configurable run-time mode to provide a better diagnostic message.
522 2011-11-21 Hristian Kirtchev <kirtchev@adacore.com>
524 * s-finmas.adb (Finalize): Add comment concerning double finalization.
526 2011-11-21 Ed Schonberg <schonberg@adacore.com>
528 * sem_ch3.adb (Access_Definition): If the access definition
529 is itself the return type of an access to function definition
530 which is ultimately the return type of an access to subprogram
531 declaration, its scope is the enclosing scope of the ultimate
532 access to subprogram.
534 2011-11-21 Steve Baird <baird@adacore.com>
536 * sem_res.adb (Valid_Conversion): If a conversion was legal
537 in the body of a generic, then the corresponding conversion is
538 legal in the expanded body of an instance of the generic.
540 2011-11-21 Robert Dewar <dewar@adacore.com>
542 * sem_ch3.adb: Minor reformatting.
544 2011-11-21 Robert Dewar <dewar@adacore.com>
546 * s-utf_32.adb (Is_UTF_32_Line_Terminator): Recognize NEL as
548 * sinput.ads: Add section on Handling of Source Line Terminators.
549 * types.ads (Line_Terminator): Adjust comments.
551 2011-11-21 Robert Dewar <dewar@adacore.com>
553 * frontend.adb (Frontend): Capture restrictions from config files
554 * lib-load.adb (Load_Unit): Save/set/restore restriction pragma
556 * lib-xref.adb (Generate_Reference): Fix handling of obsolescent
557 references. This was noticed during debugging, but it is not
558 known if it causes real bugs.
559 * restrict.ads, restrict.adb: New routines to save/set/restore
560 non-partition-wide restrictions.
561 * s-rident.ads: Comment changes for new handling of
563 * sem.adb (Sem): Save/Set/Restore non-partition-wide restrictions
564 * sem_ch10.adb (Analyze_Compilation_Unit): Remove incomplete
565 attempt to save/restore non-partition-wide restrictions (now
566 this work is all done in Sem).
567 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
568 Special handling for restriction No_Elaboration_Code.
570 2011-11-21 Robert Dewar <dewar@adacore.com>
572 * gnat_ugn.texi: Document new handling of restrictions pragmas.
574 2011-11-21 Pascal Obry <obry@adacore.com>
576 * s-taprop-linux.adb (Initialize_Lock): Do not allocate a cond
577 attribute as not needed.
579 2011-11-21 Robert Dewar <dewar@adacore.com>
581 * sem_prag.adb: Minor reformatting.
583 2011-11-21 Pascal Obry <obry@adacore.com>
585 * gnat_rm.texi: Document restriction for stdcall convention on
588 2011-11-21 Pascal Obry <obry@adacore.com>
590 * sem_prag.adb (Process_Convention): A dispatching call cannot
591 have a stdcall calling convention.
593 2011-11-21 Pascal Obry <obry@adacore.com>
595 * s-taprop-linux.adb (Initialize_Lock): Do not allocate a
596 mutex attribute as not needed.
597 (Initialize_TCB): Likewise.
598 (Initialize): Likewise.
600 2011-11-21 Robert Dewar <dewar@adacore.com>
602 * sem_ch6.adb (Is_Public_Subprogram_For): New procedure
603 (Process_PPCs): Invariants only apply to public subprograms.
605 2011-11-21 Robert Dewar <dewar@adacore.com>
607 * sem_util.adb, sem_util.ads, sem_attr.adb, restrict.adb,
608 restrict.ads: Fix for No_Implicit_Aliasing in the renames case.
610 2011-11-21 Robert Dewar <dewar@adacore.com>
612 * a-finali.ads: Use pragma Pure_12 for this unit
613 * aspects.adb: Add aspect Pure_12
614 * aspects.ads: Add aspect Pure_12
615 * opt.ads: Add note on Pure_12
616 * par-prag.adb: Add dummy entry for Pure_12
617 * sem_prag.adb: Implement Pure_12 pragma
618 * snames.ads-tmpl: Add Entry for Pure_12
620 2011-11-21 Sergey Rybin <rybin@adacore.com frybin>
622 * vms_data.ads: Add qualifiers for new gnatpp options
623 '--call_threshold' and '--par_threshold".
624 * gnat_ugn.texi: Add description for new gnatpp options
625 '--call_threshold' and '--par_threshold".
627 2011-11-21 Robert Dewar <dewar@adacore.com>
629 * lib.ads: Minor reformatting.
631 2011-11-21 Robert Dewar <dewar@adacore.com>
633 * lib-load.ads: Add comment.
635 2011-11-21 Gary Dismukes <dismukes@adacore.com>
637 * sem_elab.adb: Minor reformatting
639 2011-11-21 Robert Dewar <dewar@adacore.com>
641 * exp_ch6.adb: Minor reformatting.
643 2011-11-21 Ed Schonberg <schonberg@adacore.com>
645 * sem_ch12.adb (Check_Formal_Package_Instance): If a formal
646 subprogram of the formal package is covered by an others
647 association with a box initialization, no check is needed
648 against the actual in the instantiation of the formal package.
650 2011-11-21 Robert Dewar <dewar@adacore.com>
652 * sem_elab.adb (Check_Internal_Call_Continue): Suppress junk
653 elab warning from within precondition/postcondition etc.
655 2011-11-21 Ed Schonberg <schonberg@adacore.com>
657 * exp_ch6.adb (Expand_Actuals): In Ada 2012, a function call
658 with out parameters may generate assignments to force constraint
659 checks. These checks must be properly placed in the code after the
660 declaration or statement that contains the call.
662 2011-11-21 Fedor Rybin <frybin@adacore.com>
664 * gnat_ugn.texi: Adding info on current gnattest limitations an
665 support of -X option.
667 2011-11-21 Robert Dewar <dewar@adacore.com>
669 * a-cfdlli.adb, a-cbdlli.adb: Minor reformatting.
671 2011-11-20 Robert Dewar <dewar@adacore.com>
673 * exp_ch6.adb, exp_util.adb: Minor reformatting
675 2011-11-20 Eric Botcazou <ebotcazou@adacore.com>
677 * sinfo.ads (Reference): Document that it is OK to set
678 Is_Known_Non_Null on a temporary initialized to a N_Reference
681 2011-11-20 Matthew Heaney <heaney@adacore.com>
683 * a-cbdlli.adb, a-cfdlli.adb (Move): Set Last component to 0
686 2011-11-20 Eric Botcazou <ebotcazou@adacore.com>
688 * exp_ch6.adb (Make_Build_In_Place_Call_In_Assignment):
689 Declare NEW_EXPR local variable and attach the
690 temporary to it. Set Is_Known_Non_Null on the temporary.
691 (Make_Build_In_Place_Call_In_Object_Declaration): Likewise.
692 * exp_util.adb (Remove_Side_Effects): Set Is_Known_Non_Null on
693 the temporary created to hold the 'Reference of the expression,
695 * checks.adb (Install_Null_Excluding_Check): Bail out for the
696 Get_Current_Excep.all.all idiom generated by the expander.
698 2011-11-20 Eric Botcazou <ebotcazou@adacore.com>
700 * gcc-interface/trans.c (struct language_function): Add GNAT_RET.
701 (f_gnat_ret): New macro.
702 (struct nrv_data): Add GNAT_RET.
703 (finalize_nrv_unc_r): New helper function.
704 (finalize_nrv): Add GNAT_RET parameter. Copy it into DATA. If the
705 function returns unconstrained, use finalize_nrv_unc_r as callback.
706 (return_value_ok_for_nrv_p): Test the alignment of RET_OBJ only if
708 (Subprogram_Body_to_gnu): Pass GNAT_RET to finalize_nrv.
709 (gnat_to_gnu) <N_Return_Statement>: In the return-unconstrained case,
710 if optimization is enabled, record candidates for the Named Return
713 2011-11-20 Eric Botcazou <ebotcazou@adacore.com>
715 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Add comment.
716 (gnat_to_gnu) <N_Return_Statement>: Add 'else' to avoid doing a useless
717 test. Tweak default case.
718 <N_Goto_Statement>: Use better formatting.
719 * gcc-interface/utils2.c (maybe_wrap_malloc): Use INIT_EXPR instead of
720 MODIFY_EXPR to initialize the storage.
721 (build_allocator): Likewise.
723 2011-11-20 Eric Botcazou <ebotcazou@adacore.com>
725 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Adjust
726 call to components_to_record.
727 (components_to_record): Add FIRST_FREE_POS parameter. For the variant
728 part, reuse enclosing union even if there is a representation clause
729 on the Unchecked_Union. If there is a variant part, compute the new
730 first free position, if any. Adjust call to self. Use a single field
731 directly only if it hasn't got a representation clause or is placed at
732 offset zero. Create the variant part at offset 0 if all the fields
733 down to this level have a rep clause. Do not chain the variant part
734 immediately and adjust downstream.
735 Do not test ALL_REP before moving the fields without rep clause to the
736 previous level. Call create_rep_part to create the REP part and force
737 a minimum size on it if necessary. Do not chain it immediately.
738 Create a fake REP part if there are fields without rep clause that need
739 to be laid out starting from FIRST_FREE_POS.
740 At the end, chain the REP part and then the variant part.
741 (create_rep_part): New function.
742 (get_rep_part): Minor tweak.
743 * gcc-interface/utils.c (tree_code_for_record_type): Minor tweak.
745 2011-11-18 Iain Sandoe <iains@gcc.gnu.org>
748 * init.c (__gnat_error_handler) [Darwin]: Move workaround to the
749 bug filed as radar #10302855 from __gnat_error_handler to...
750 (__gnat_adjust_context_for_raise) [Darwin]: ...here. New function.
751 (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE) [Darwin]: Define.
753 2011-11-18 Tristan Gingold <gingold@adacore.com>
754 Iain Sandoe <iains@gcc.gnu.org>
757 * mlib-tgt-specific-darwin.adb (Archive_Indexer_Options): Remove.
758 * gcc-interface/Makefile.in (darwin): Remove ranlib special-casing.
760 2011-11-12 Iain Sandoe <iains@gcc.gnu.org>
762 * gcc-interface/Makefile.in (stamp-gnatlib-$(RTSDIR)): Don't link
764 (OSCONS_CPP, OSCONS_EXTRACT): New.
765 (./bldtools/oscons/xoscons): New target.
766 ($(RTSDIR)/s-oscons.ads): Likewise.
767 (gnatlib): Depend on $(RTSDIR)/s-oscons.ads.
768 * gcc-interface/Make-lang.in (ada/s-oscons.ads) Remove as dependency.
769 * Make-generated.in: Remove machinery to generate xoscons and
772 2011-11-10 Eric Botcazou <ebotcazou@adacore.com>
774 * fe.h (Serious_Errors_Detected): New macro.
775 * gcc-interface/gigi.h (build_atomic_load): Declare.
776 (build_atomic_store): Likewise.
777 * gcc-interface/trans.c (atomic_sync_required_p): New predicate.
778 (call_to_gnu): Add ATOMIC_SYNC parameter. Use local variable.
779 Build an atomic load for an In or In Out parameter if needed.
780 Build an atomic store for the assignment of an Out parameter if needed.
781 Build an atomic store to the target if ATOMIC_SYNC is true.
782 (present_in_lhs_or_actual_p): New predicate.
783 (gnat_to_gnu) <N_Identifier>: Build an atomic load if needed.
784 <N_Explicit_Dereference>: Likewise.
785 <N_Indexed_Component>: Likewise.
786 <N_Selected_Component>: Likewise.
787 <N_Assignment_Statement>: Adjust call to call_to_gnu.
788 Build an atomic store to the LHS if needed.
789 <N_Function_Call>: Adjust call to call_to_gnu.
790 * gcc-interface/utils2.c: Include toplev.h.
791 (resolve_atomic_size): New static function.
792 (build_atomic_load): New function.
793 (build_atomic_store): Likewise.
794 * gcc-interface/Make-lang.in (ada/utils2.o): Add toplev.h.
796 2011-11-07 Olivier Hainque <hainque@adacore.com>
798 * sigtramp-ppcvxw.c: Add general comments.
799 (CFI_COMMON_REGS): Remove rule for r1, as in other unwinders. Add
800 rules for r2 to r13, plus CTR and XER.
801 (CFA_REG): New, register number used to hold the local CFA.
802 (CFI_DEF_CFA, SIGTRAMP_BODY): Use it.
803 Make that 15, not 14, with documentation.
804 (TCR): Undef before definition, preventing conflict with reg number in
807 2011-11-07 Robert Dewar <dewar@adacore.com>
809 * exp_util.ads, exp_alfa.adb, a-cohama.adb, a-cohama.ads, sem_ch4.adb,
810 aspects.ads, exp_ch8.adb, exp_ch8.ads, atree.ads: Minor reformatting.
811 * gcc-interface/Make-lang.in: Update dependencies.
813 2011-11-07 Ed Schonberg <schonberg@adacore.com>
815 * exp_ch6.adb: A tagged type is a legal actual for an aliased
818 2011-11-07 Pascal Obry <obry@adacore.com>
820 * g-socket.adb, g-socket.ads: Minor reformatting.
822 2011-11-07 Robert Dewar <dewar@adacore.com>
824 * sem_res.adb (Resolve_Actuals): Minor error message improvement.
826 2011-11-07 Robert Dewar <dewar@adacore.com>
828 * gnat_ugn.texi: Add discussion of default mode handling of
829 source representation with no -gnatW option given, in particular
830 noting that NEL (next line) is not recognized in this context.
832 2011-11-07 Yannick Moy <moy@adacore.com>
834 * sem_util.adb (Note_Possible_Modification): In Alfa mode,
835 generate a reference for a modification even when the modification
836 does not come from source.
838 2011-11-07 Ed Schonberg <schonberg@adacore.com>
840 * exp_ch5.adb (Expand_Iterator_Loop): For the "of" iterator form,
841 use the indexing attributes rather than the Element function,
842 to obtain variable references.
843 * sem_ch4.adb (Try_Container_Indexing): Code cleanup. Use
844 Find_Aspect rather than iterating over representation
845 items. Improve error message.
846 * a-cohama.adb, a-cohama.ads Update to latest RM, with two versions
847 of Reference functions.
849 2011-11-07 Yannick Moy <moy@adacore.com>
851 * sem_util.adb (Unique_Entity): For a parameter on a subprogram
852 body that has a corresponding parameter on the subprogram
853 declaration, define the unique entity as being the declaration
856 2011-11-07 Ed Schonberg <schonberg@adacore.com>
858 * sem_ch6.adb (Analyze_Return_Type): In Ada 2012 mode, if the
859 return type of a function is the class-wide type of an incomplete
860 type T, T can be a Taft-amendment type and does not have to be
861 completed in the current private part.
863 2011-11-07 Ed Schonberg <schonberg@adacore.com>
865 * aspects.ads (Inherited_Aspect): Map that indicates type aspects
866 that are inherited by default, and apply to the class-wide type
868 * aspects.adb (Find_Aspect): If the entity is class-wide and the
869 aspect is inherited, use the aspect of the specific type.
871 2011-11-07 Hristian Kirtchev <kirtchev@adacore.com>
873 * exp_alfa.adb: Remove with and use clause for
874 Exp_Ch8. Add with and use clause for Exp_Util.
875 Remove local constant Disable_Processing_Of_Renamings.
876 (Expand_Alfa_N_Object_Renaming_Declaration): The expansion of
877 object renamings has been reenabled.
878 (Expand_Possible_Renaming):
879 The expansion of identifier and expanded names has been
880 reenabled. Perform the substitutions only for entities that
882 * exp_ch8.ads, exp_ch8.adb (Evaluate_Name): Moved to Exp_Util.
883 * exp_util.adb (Evaluate_Name): Moved from Exp_Ch8.
884 (Remove_Side_Effects): Alphabetize local variables. Add a guard
885 to avoid the infinite expansion of an expression in Alfa mode. Add
886 processing for function calls in Alfa mode.
887 * exp_util.ads (Evaliate_Name): Moved from Exp_Ch8.
889 2011-11-07 Ed Schonberg <schonberg@adacore.com>
891 * freeze.adb (Freeze_Entity): If the entity is an access to
892 subprogram whose designated type is itself a subprogram type,
893 its own return type must be decorated with size information.
895 2011-11-04 Arnaud Charlet <charlet@adacore.com>
897 * gcc-interface/Make-lang.in: Update dependencies.
899 2011-11-04 Robert Dewar <dewar@adacore.com>
901 * sprint.adb (Sprint_Node_Actual, case Qualified_Expression):
902 Avoid junk semicolon after argument of machine code Asm operand.
904 2011-11-04 Robert Dewar <dewar@adacore.com>
906 * exp_ch11.adb (Generate_Push_Pop): Inhibit push/pop nodes in
907 CodePeer mode or if restriction No_Exception_Handlers is present.
908 * exp_ch6.adb (Expand_N_Subprogram_Body): (Inhibit push/pop
909 nodes in CodePeer mode or if restriction No_Exception_Handlers
912 2011-11-04 Robert Dewar <dewar@adacore.com>
914 * s-tassta.adb, atree.ads, errout.adb, sinput.adb: Minor reformatting.
916 2011-11-04 Ed Schonberg <schonberg@adacore.com>
918 * sem_ch6.adb (Analyze_Subprogram_Specification): The
919 specification is legal if it is a function that returns an
920 abstract type, if it comes from an attribute renaming of a stream
921 attribute of an abstract type.
923 2011-11-04 Gary Dismukes <dismukes@adacore.com>
925 * exp_util.adb (Is_Possibly_Unaligned_Object): In case of indexed
926 components, check whether recursively check whether the prefix
927 denotes an unaligned object.
929 2011-11-04 Ed Schonberg <schonberg@adacore.com>
931 * sem_prag.adb (Analyze_Pragma, case Debug): The argument of
932 the pragma is legal if it is an expanded name that denotes a
933 procedure that be can called without parameters.
935 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
937 * gnat_ugn.texi (Performance Considerations) <Vectorization
938 of loops>: New sub-section. <Other Optimization Switches>:
941 2011-11-04 Robert Dewar <dewar@adacore.com>
943 * gnat_rm.texi: Minor reformatting.
945 2011-11-04 Matthew Heaney <heaney@adacore.com>
947 * a-convec.adb, a-coinve.adb, a-cobove.adb (Merge): Raise PE
948 when Target and Source denote same non-empty object
949 * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb (Merge): Ditto
951 2011-11-04 Robert Dewar <dewar@adacore.com>
953 * exp_attr.adb: Minor reformatting.
955 2011-11-04 Ed Schonberg <schonberg@adacore.com>
957 * exp_ch5.adb (Expand_Assign_Record): Do not generate a
958 discriminant assignment within an initialization proc if the
959 record is an unchecked union, as it can only come from the
960 initialization of an unchecked union component.
962 2011-11-04 Robert Dewar <dewar@adacore.com>
964 * gnat_ugn.texi: Minor reformatting.
966 2011-11-04 Robert Dewar <dewar@adacore.com>
968 * par-labl.adb (Rewrite_As_Loop): Generate info msg rather than
971 2011-11-04 Robert Dewar <dewar@adacore.com>
973 * exp_ch4.adb: Minor code reorganization (remove junk obsolete
976 2011-11-04 Hristian Kirtchev <kirtchev@adacore.com>
978 * exp_alfa.adb: Add local constant
979 Disable_Processing_Of_Renamings;
980 (Expand_Alfa_N_Object_Renaming_Declaration): Disable
981 the name evaluation of object renamings for now.
982 (Expand_Potential_Renaming): Do not perform the substitution
984 * exp_util.adb (Remove_Side_Effects): Remove processing for
985 functions with side effects in Alfa mode.
987 2011-11-04 Gary Dismukes <dismukes@adacore.com>
989 * bindgen.adb (Gen_Elab_Calls): In the case
990 of the AAMP target, set elaboration entities to 1 rather than
993 2011-11-04 Ed Schonberg <schonberg@adacore.com>
995 * sem_ch10.adb (Install_Limited_With_Unit): To establish the
996 proper entities on the ancestors of a child unit that appear
997 in a limited_with clause, follow the unit links because the
998 units are not analyzed and scope information is incomplete.
1000 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
1002 * exp_ch4.adb (Expand_N_Selected_Component): Refine code
1003 setting the Atomic_Sync_Required flag to detect one more case.
1004 * exp_util.adb (Activate_Atomic_Synchronization): Refine code
1005 setting the Atomic_Sync_Required flag to exclude more cases,
1006 depending on the parent of the node to be examined.
1008 2011-11-04 Bob Duff <duff@adacore.com>
1010 * g-excact.adb: Minor: use named notation.
1012 2011-11-04 Ed Schonberg <schonberg@adacore.com>
1014 * sem_ch5.adb: Improve error messages for illegal iterators.
1016 2011-11-04 Hristian Kirtchev <kirtchev@adacore.com>
1018 * exp_alfa.adb: Add with and use clauses for Exp_Ch8 and
1020 (Expand_Alfa): Alphabetize cases on first choice. Add
1021 processing for object renaming declarations, identifiers and
1023 (Expand_Alfa_N_In): Remove useless return.
1024 (Expand_Alfa_N_Object_Renaming_Declaration): New routine.
1025 (Expand_Potential_Renaming): New routine.
1026 * exp_ch8.adb (Evaluate_Name): Moved to the top level.
1027 (Expand_N_Object_Declaration): Alphabetize local variables. Move
1028 Evaluate_Name out to the top level.
1029 * exp_ch8.ads (Evaluate_Name): Moved from body to package spec.
1030 * exp_util.adb (Remove_Side_Effects): Add processing for
1031 functions with side effects in Alfa mode.
1033 2011-11-04 Hristian Kirtchev <kirtchev@adacore.com>
1035 * gnat_rm.texi: Add entries for
1036 restrictions No_Relative_Delay, No_Requeue_Statements and
1037 No_Stream_Optimizations.
1039 2011-11-04 Ed Schonberg <schonberg@adacore.com>
1041 * sem_ch4.adb: Set type of entity in prefixed call, for
1042 completeness in a generic context.
1044 2011-11-04 Yannick Moy <moy@adacore.com>
1046 * sem_prag.adb: Minor refactoring (renaming of a parameter).
1048 2011-11-04 Robert Dewar <dewar@adacore.com>
1050 * atree.ads: Minor reformatting.
1052 2011-11-04 Robert Dewar <dewar@adacore.com>
1054 * checks.adb (Atomic_Synchronization_Disabled): Check -gnatd.d
1056 * exp_ch2.adb (Expand_Entity_Reference): Use
1057 Activate_Atomic_Synchronization
1058 * exp_ch4.adb (Expand_N_Explicit_Dereference): Use
1059 Activate_Atomic_Synchronization (Expand_N_Indexed_Compoonent):
1060 Activate_Atomic_Synchronization (Expand_N_Selected_Component):
1061 Use Activate_Atomic_Synchronization
1062 * exp_util.ads, exp_util.adb (Activate_Atomic_Synchronization): New
1064 * sinfo.ads, sinfo.adb (Atomic_Sync_Required): Can now apply to
1065 N_Selected_Component node
1067 2011-11-04 Robert Dewar <dewar@adacore.com>
1069 * sem_prag.adb, atree.ads, prj-env.adb, prj-env.ads: Minor reformatting.
1071 2011-11-04 Yannick Moy <moy@adacore.com>
1073 * atree.adb, atree.ads (Set_Original_Node): New set procedure.
1074 * sem_ch13.adb (Analyze_Aspect_Specifications/Pre_Post_Aspects):
1075 In ASIS mode, no splitting of aspects between conjuncts.
1076 (Analyze_Aspect_Specifications/Aspect_Test_Case): Make pragma
1077 expressions refer to the original aspect expressions through
1078 the Original_Node link. This is used in semantic analysis for
1079 ASIS mode, so that the original expression also gets analyzed.
1080 * sem_prag.adb (Preanalyze_TC_Args,
1081 Check_Precondition_Postcondition,
1082 Analyze_Pragma/Pragma_Test_Case): In ASIS mode, for a pragma
1083 generated from a source aspect, also analyze the original aspect
1085 (Check_Expr_Is_Static_Expression): New procedure
1086 similar to existing procedure Check_Arg_Is_Static_Expression,
1087 except called on expression inside pragma.
1089 2011-11-04 Tristan Gingold <gingold@adacore.com>
1091 * prj-env.adb, prj-env.ads (Find_Name_In_Path): New function, from
1092 Find_Project.Try_Path_Name.
1093 (Find_Project): Use Find_Name_In_Path to implement Try_Path_Name.
1095 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
1097 * s-atocou.ads (Atomic_Counter): Remove redundant pragma Volatile.
1099 2011-11-04 Pascal Obry <obry@adacore.com>
1101 * projects.texi: Add short description for qualifiers aggregate
1102 and aggregate library.
1104 2011-11-04 Matthew Heaney <heaney@adacore.com>
1106 * Makefile.rtl, impunit.adb: Added a-cogeso.ad[sb]
1107 * a-cgaaso.adb: Replaced implementation with instantiation
1109 * a-cogeso.ad[sb] This is the new Ada 2012 unit
1110 Ada.Containers.Generic_Sort
1112 2011-11-04 Robert Dewar <dewar@adacore.com>
1114 * exp_ch2.adb (Expand_Entity_Reference): Do not set
1115 Atomic_Sync_Required for the case of a prefix of an attribute.
1116 * exp_ch4.adb (Expand_N_Explicit_Dereference): May require
1117 atomic synchronization
1118 (Expand_N_Indexed_Component): Ditto.
1119 (Expand_B_Selected_Component): Ditto.
1120 * sem_prag.adb (Process_Suppress_Unsuppress):
1121 Disable/Enable_Atomic_Synchronization can now occur for array
1122 types with pragma Atomic_Components.
1123 * sinfo.ads, sinfo.adb (Atomic_Sync_Required): Can now occur on
1124 N_Explicit_Dereference nodes and on N_Indexed_Component nodes.
1126 2011-11-04 Gary Dismukes <dismukes@adacore.com>
1128 * gnat_ugn.texi: Editorial corrections for gnattest section.
1130 2011-11-04 Robert Dewar <dewar@adacore.com>
1132 * sem_prag.adb: Minor reformatting.
1133 * gnat_rm.texi: Update documentation for pragma Warnings (Off,
1135 * exp_ch2.adb (Expand_Entity_Reference): Only set
1136 Atomic_Sync_Required on entities that are variables. Doesn't
1137 make any sense on anything else.
1139 2011-11-04 Robert Dewar <dewar@adacore.com>
1141 * exp_ch2.adb (Expand_Entity_Reference): Extend handling of
1142 atomic sync to type case.
1143 * sem_prag.adb (Process_Suppress_Unsuppress): Atomic Sync can
1146 2011-11-04 Robert Dewar <dewar@adacore.com>
1148 * sem_warn.adb (Warn_On_Useless_Assignment): More accurate test
1150 * gcc-interface/Make-lang.in: Update dependencies.
1152 2011-11-04 Robert Dewar <dewar@adacore.com>
1154 * sem_prag.adb: Detect more cases of Long_Float inconsistencies at
1157 2011-11-04 Matthew Heaney <heaney@adacore.com>
1159 * Makefile.rtl, impunit.adb: Added a-sfecin.ads,
1160 * a-sfhcin.ads, a-sflcin.ads, a-sbecin.ad[sb], a-sbhcin.ad[sb],
1161 a-sblcin.ad[sb], a-suecin.ad[sb], a-suhcin.ad[sb], a-sulcin.ad[sb]
1162 * a-sfecin.ads, a-sfhcin.ads, a-sflcin.ads, a-sbecin.ad[sb],
1163 a-sbhcin.ad[sb], a-sblcin.ad[sb], a-suecin.ad[sb], a-suhcin.ad[sb],
1164 a-sulcin.ad[sb]: New files.
1166 2011-11-04 Geert Bosch <bosch@adacore.com>
1168 * i-forbla-unimplemented.ads, s-gecola.adb, s-gecola.ads,
1169 s-gerebl.adb, s-gerebl.ads, i-forbla.adb, i-forbla.ads,
1170 i-forlap.ads, i-forbla-darwin.adb, s-gecobl.adb, s-gecobl.ads,
1171 s-gerela.adb, s-gerela.ads: Remove partial interface to BLAS/LAPACK.
1172 * gcc-interface/Makefile.in: Remove libgnala and related objects.
1174 2011-11-04 Matthew Heaney <heaney@adacore.com>
1176 * a-cdlili.ad[sb], a-cidlli.ad[sb], a-coorse.ad[sb], a-ciorse.ad[sb],
1177 a-coorma.ad[sb], a-ciorma.ad[sb], a-coormu.ad[sb], a-ciormu.ad[sb],
1178 a-cohama.ad[sb], a-cihama.ad[sb], a-cohase.ad[sb], a-cihase.ad[sb],
1179 a-convec.ad[sb], a-coinve.ad[sb] (Assign, Copy): New operations
1182 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
1184 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Do not assert
1185 that the type of the parameters isn't dummy in type_annotate_only mode.
1187 2011-11-04 Robert Dewar <dewar@adacore.com>
1189 * sem_ch12.adb: Minor reformatting
1191 2011-11-04 Gary Dismukes <dismukes@adacore.com>
1193 * bindgen.adb (Gen_Elab_Calls): In the case of the AAMP target,
1194 initialize elaboration entities to zero when specs are processed.
1196 2011-10-28 Iain Sandoe <iains@gcc.gnu.org>
1197 Eric Botcazou <ebotcazou@adacore.com>
1200 * init.c (__gnat_error_handler) [Darwin]: Apply a work-around to the
1201 bug filed as radar #10302855 (inconsistent unwind data for sigtramp).
1203 2011-10-28 Eric Botcazou <ebotcazou@adacore.com>
1206 * gcc-interface/Makefile.in (SYMDEPS): Delete.
1207 (LIBICONV): New variable.
1208 (LIBICONV_DEP): Likewise.
1209 (LIBS): Add $(LIBICONV).
1210 (LIBDEPS): Add $(LIBICONV_DEP).
1211 (EXTRA_GNATTOOLS_OBJS): Merge into...
1212 (TOOLS_LIBS): ...this. Add $(LIBICONV).
1214 2011-10-26 Eric Botcazou <ebotcazou@adacore.com>
1216 * gcc-interface/decl.c (elaborate_expression_1): Add EXPR_PUBLIC_P local
1217 variable. Always create the elaboration variable, if any, as constant.
1219 2011-10-26 Eric Botcazou <ebotcazou@adacore.com>
1221 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Try to
1222 make a packable type for fields of union types as well.
1223 <is_type>: Use RECORD_OR_UNION_TYPE_P predicate.
1224 (gnat_to_gnu_component_type): Try to make a packable type for fields
1225 of union types as well.
1226 (make_packable_type): Use RECORD_OR_UNION_TYPE_P predicate.
1227 (maybe_pad_type): Try to make a packable type for fields of union types
1229 (gnat_to_gnu_field): Likewise.
1230 (is_variable_size): Use RECORD_OR_UNION_TYPE_P predicate.
1231 (set_rm_size): Likewise.
1232 (rm_size): Likewise.
1233 * gcc-interface/misc.c (gnat_type_max_size): Likewise.
1234 * gcc-interface/trans.c (add_decl_expr): Likewise.
1235 * gcc-interface/utils.c (finish_record_type): Likewise.
1236 * gcc-interface/utils2.c (build_simple_component_ref): Likewise.
1238 2011-10-26 Eric Botcazou <ebotcazou@adacore.com>
1240 * gcc-interface/decl.c (gnat_to_gnu_field): Always check components
1241 declared as atomic. Move around conditionally executed code.
1243 2011-10-24 Robert Dewar <dewar@adacore.com>
1245 * sem.adb (Initialize): Fix bug that blew up if called a second time.
1247 2011-10-24 Robert Dewar <dewar@adacore.com>
1249 * tb-alvxw.c, tracebak.c, expect.c, initflt.c, tb-alvms.c,
1250 tb-ivms.c, tb-gcc.c: Update headers to GPL 3.
1252 2011-10-24 Robert Dewar <dewar@adacore.com>
1254 * sem_prag.adb (Analyze_Pragma, case Debug): Give proper pragma
1257 2011-10-24 Hristian Kirtchev <kirtchev@adacore.com>
1259 * gnat_rm.texi: Add an entry for restriction No_Finalization.
1261 2011-10-24 Ed Schonberg <schonberg@adacore.com>
1263 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): If the
1264 current instance is within the one that contains the generic,
1265 the freeze node for the current one must appear in the current
1266 declarative part. Ditto if the current instance is within another
1267 package instance. In both of these cases the freeze node of the
1268 previous instance is not relevant.
1270 2011-10-24 Gary Dismukes <dismukes@adacore.com>
1272 * switch-m.adb (Normalize_Compiler_Switches): Add recognition
1273 of AAMP-specific switches -univ and -aamp_target.
1275 2011-10-24 Robert Dewar <dewar@adacore.com>
1277 * a-tienau.adb (Put): Deal properly with limited line length.
1279 2011-10-24 Robert Dewar <dewar@adacore.com>
1281 * sem_warn.adb, sem_ch12.adb: Minor reformatting.
1283 2011-10-24 Tristan Gingold <gingold@adacore.com>
1285 * gcc-interface/Makefile.in: Use GNU ld switches to generate map files
1288 2011-10-24 Ed Schonberg <schonberg@adacore.com>
1290 * sem_ch12.adb (Earlier): make available globally. If both
1291 nodes have the same sloc, the freeze node that does not come
1292 from source is the later one.
1293 (True_Parent): Make available globally.
1294 (Previous_Instance): Subsidiary of
1295 Insert_Freeze_Node_For_Instance, to check whether the generic
1296 parent of the current instance is declared within a previous
1297 instance in the same unit or declarative part, in which case the
1298 freeze nodes of both instances must appear in order to prevent
1299 elaboration problems in gigi.
1300 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): A stub is a
1301 freeze point, and the freeze node of a preceding instantiation
1302 must be inserted before it.
1304 2011-10-24 Robert Dewar <dewar@adacore.com>
1306 * checks.ads, checks.adb: Add handling of Synchronization_Check
1307 * debug.adb: Add doc for -gnatd.d and -gnatd.e (disable/enable
1309 * exp_ch2.adb (Expand_Entity_Reference): Set Atomic_Sync_Required
1310 flag Minor code reorganization.
1311 * opt.ads (Warn_On_Atomic_Synchronization): New switch.
1312 * par-prag.adb: Add dummy entries for pragma
1313 Disable/Enable_Atomic_Synchronization.
1314 * sem_prag.adb (Process_Suppress_Unsuppress): Handle
1315 case of Atomic_Synchronization specially (not suppressed
1316 by All_Checks, cannot be set from Source).
1317 (Pragma Disable/Enable_Atomic_Synchronization): Add processing.
1318 * sinfo.ads, sinfo.adb: Add Atomic_Sync_Required flag
1319 * snames.ads-tmpl: Add entry for Atomic_Synchronization Add
1320 entry for pragma Disable/Enable_Atomic_Synchronization
1321 * switch-c.adb: The -gnatp switch does not disable
1322 Atomic_Synchronization Add -gnatep switch to disable
1323 Atomic_Synchronization.
1324 * types.ads: Add entry for Synchronization_Check
1325 * usage.adb: Add line for -gnated switch
1326 * warnsw.adb: Settings for Warn_On_Atomic_Synchronization
1328 2011-10-24 Geert Bosch <bosch@adacore.com>
1330 * s-gearop.adb (Back_Substitute): Avoid overflow if matrix bounds start
1333 2011-10-24 Robert Dewar <dewar@adacore.com>
1335 * sem_ch12.adb, s-gearop.adb: Minor reformatting.
1337 2011-10-24 Robert Dewar <dewar@adacore.com>
1339 * warnsw.adb: Add some missing warnings to Set_GNAT_Mode_Warnings.
1340 * warnsw.ads: Add comments to Set_GNAT_Mode_Warnings.
1342 2011-10-24 Emmanuel Briot <briot@adacore.com>
1344 * prj-proc.adb (Process_Expression_Variable_Decl): No special
1345 handling for Project_Path unless it is an attribute.
1347 2011-10-24 Javier Miranda <miranda@adacore.com>
1349 * sem_ch12.adb (Check_Hidden_Primitives): New subprogram.
1350 (Install_Hidden_Primitives): New subprogram.
1351 (Restore_Hidden_Primitives): New subprogram.
1352 (Analyze_Formal_Package_Declaration,
1353 Analyze_Package_Instantiation, Analyze_Subprogram_Instantiation):
1354 Invoke Check_Hidden_Primitives after every call to
1355 Analyze_Associations, and invoke Restore_Hidden_Primitives to
1356 restore their visibility after processing the instantiation.
1357 (Instantiate_Package_Body): Install visible primitives before
1358 analyzing the instantiation and uninstall them to restore their
1359 visibility when the instantiation has been analyzed.
1360 * sem_util.ads, sem_util.adb (Add_Suffix): New subprogram
1361 (Remove_Suffix): New subprogram
1362 * sem_ch3.adb (Derive_Subprogram): When handling
1363 a derived subprogram for the instantiation of a formal derived
1364 tagged type, inherit the dispatching attributes from the actual
1365 subprogram (not from the parent type).
1367 2011-10-24 Vasiliy Fofanov <fofanov@adacore.com>
1369 * gnat_ugn.texi: Document explicit use of XDECGNAT library.
1371 2011-10-24 Hristian Kirtchev <kirtchev@adacore.com>
1373 * exp_ch3.adb (Build_Assignment): Add local constant N_Loc and
1375 (Build_Discriminant_Assignments): Add local variable D_Loc and update
1377 (Build_Init_Statements): Add local variables Comp_Loc, Decl_Loc and
1378 Var_Loc and update their uses.
1379 (Build_Record_Init_Proc): Code reformatting.
1380 (Increment_Counter): Add formal parameter Loc.
1381 (Make_Counter): Add formal parameter Loc.
1383 2011-10-24 Eric Botcazou <ebotcazou@adacore.com>
1385 * sem_disp.adb (Covers_Some_Interface): Fix typo.
1387 2011-10-24 Matthew Heaney <heaney@adacore.com>
1389 * a-cuprqu.adb, a-cbprqu.adb (Dequeue_Only_High_Priority): Fix sense
1392 2011-10-24 Yannick Moy <moy@adacore.com>
1394 * sem_ch13.adb (Analyze_Aspect_Specifications/Aspect_Test_Case):
1395 Translate arguments in positional notation into pragma argument
1396 association arguments for the generated pragma.
1398 2011-10-24 Arnaud Charlet <charlet@adacore.com>
1400 * exp_ch5.adb: Fix minor typo.
1402 2011-10-24 Ed Schonberg <schonberg@adacore.com>
1404 * sem_ch3.adb (Is_Visible_Component): Refine predicate for
1405 the case of a component reference in an instance body, when the
1406 enclosing type is private.
1408 2011-10-24 Sergey Rybin <rybin@adacore.com frybin>
1410 * gnat_ugn.texi: For gnatelim, move the note about using the GNAT
1411 driver for getting the project support into gnatelim section.
1413 2011-10-24 Robert Dewar <dewar@adacore.com>
1415 * gnat_rm.texi: Minor correction to documentation on address clause.
1417 2011-10-24 Hristian Kirtchev <kirtchev@adacore.com>
1419 * s-finmas.adb (Attach): Synchronize and call the unprotected version.
1420 (Attach_Unprotected): New routine.
1421 (Delete_Finalize_Address): Removed.
1422 (Delete_Finalize_Address_Unprotected): New routine.
1423 (Detach): Synchronize and call the unprotected version.
1424 (Detach_Unprotected): Remove locking.
1425 (Finalize): Add various comment on synchronization. Lock the critical
1426 region and call the unprotected versions of routines.
1427 (Finalize_Address): Removed.
1428 (Finalize_Address_Unprotected): New routine.
1429 (Set_Finalize_Address): Synchronize and call
1430 the unprotected version.
1431 (Set_Finalize_Address_Unprotected): New routine.
1432 (Set_Heterogeneous_Finalize_Address): Removed.
1433 (Set_Heterogeneous_Finalize_Address_Unprotected): New routine.
1434 (Set_Is_Heterogeneous): Add comment on synchronization and
1436 * s-finmas.ads: Flag Finalization_Started is no longer atomic
1437 because synchronization uses task locking / unlocking.
1438 (Attach): Add comment on usage.
1439 (Attach_Unprotected): New routine.
1440 (Delete_Finalize_Address): Renamed to
1441 Delete_Finalize_Address_Unprotected.
1442 (Detach): Add comment on usage.
1443 (Detach_Unprotected): New routine.
1444 (Finalize_Address): Renamed to Finalize_Address_Unprotected.
1445 (Set_Finalize_Address): Add comment on usage.
1446 (Set_Finalize_Address_Unprotected): New routine.
1447 (Set_Heterogeneous_Finalize_Address): Renamed to
1448 Set_Heterogeneous_Finalize_Address_Unprotected.
1449 * s-stposu.adb (Allocate_Any_Controlled): Add local variable
1450 Allocation_Locked. Add various comments on synchronization. Lock
1451 the critical region and call the unprotected version of
1453 (Deallocate_Any_Controlled): Add various comments on
1454 synchronization. Lock the critical region and call the unprotected
1455 version of routines.
1457 2011-10-24 Ed Schonberg <schonberg@adacore.com>
1459 * sem_ch3.adb (Set_Fixed_Range): The bounds of a fixed point type
1460 are universal and must carry the corresponding type.
1461 * sem_eval.adb (Check_Non_Static_Context): If the type of the
1462 expression is universal real, as may be the case for a fixed point
1463 expression with constant operands in the context of a conversion,
1464 there is nothing to check.
1465 * s-finmas.adb: Minor reformatting
1467 2011-10-23 Eric Botcazou <ebotcazou@adacore.com>
1469 * gcc-interface/decl.c (create_concat_name): Add explicit cast.
1471 2011-10-20 Eric Botcazou <ebotcazou@adacore.com>
1473 * gcc-interface/Make-lang.in (GNATLIBFLAGS, GNATLIBCFLAGS, THREAD_KIND,
1474 TRACE): Reintroduce.
1475 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o,
1476 ada/initialize.o, ada/raise.o): Reintroduce explicit compilation rules.
1478 2011-10-20 Eric Botcazou <ebotcazou@adacore.com>
1480 * gcc-interface/trans.c (lhs_or_actual_p): New predicate.
1481 (unchecked_conversion_nop): Use it.
1482 (gnat_to_gnu): Likewise.
1484 2011-10-20 Eric Botcazou <ebotcazou@adacore.com>
1486 * back_end.adb (Call_Back_End): Pass the maximum logical line number
1487 instead of the maximum physical line number to gigi.
1488 * gcc-interface/trans.c (Sloc_to_locus): Cope with line zero.
1490 2011-10-16 Tom Tromey <tromey@redhat.com>
1491 Dodji Seketeli <dodji@redhat.com>
1493 * gcc-interface/trans.c (gigi, Sloc_to_locus): Adjust to use the new
1494 public ordinary map interface.
1496 2011-10-16 Tristan Gingold <gingold@adacore.com>
1498 * link.c (_AIX): Add support for GNU ld.
1500 2011-10-16 Fedor Rybin <frybin@adacore.com>
1502 * gnat_ugn.texi: Fixing gnattest example names in the doc.
1503 Adding explanation to additional tests usage.
1505 2011-10-16 Robert Dewar <dewar@adacore.com>
1507 * exp_ch6.adb, sem_ch6.adb: Minor reformatting.
1509 2011-10-16 Eric Botcazou <ebotcazou@adacore.com>
1511 * a-convec.adb: Fix minor inconsistencies.
1513 2011-10-16 Matthew Heaney <heaney@adacore.com>
1515 * a-cusyqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cbprqu.ads (package
1516 Implementation): Specify pragma Implementation_Defined.
1518 2011-10-15 Nicolas Roche <roche@adacore.com>
1520 * gcc-interface/lang-specs.h: Ensure -mrtp switch is passed when using
1521 either rtp-smp or ravenscar-cert-rtp runtimes.
1523 2011-10-15 Bob Duff <duff@adacore.com>
1525 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call):
1526 Do not create a pool formal on unless RE_Root_Storage_Pool_Ptr
1528 (Expand_N_Extended_Return_Statement): Do not create a renaming of the
1529 build-in-place pool parameter unless RE_Root_Storage_Pool_Ptr is
1531 (Make_Build_In_Place_Call_In_Allocator): Add the user-defined
1532 pool only if RE_Root_Storage_Pool_Ptr is available.
1533 (Make_Build_In_Place_Call_In_Object_Declaration): Do not add a
1534 pool actual unless RE_Root_Storage_Pool_Ptr is available.
1535 * sem_ch6.adb (Create_Extra_Formals): Add build-in-place pool
1536 formal only if RE_Root_Storage_Pool_Ptr is available.
1538 2011-10-15 Matthew Heaney <heaney@adacore.com>
1540 * a-cusyqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cbprqu.ads (Queue
1541 type): Specify Priority aspect for protected type.
1543 2011-10-14 Ed Schonberg <schonberg@adacore.com>
1545 * exp_disp.adb (Check_Premature_Freezing): If an untagged type
1546 is a generic actual, it is a subtype of a type that was frozen
1547 by the instantiation, and even if not marked frozen it does not
1548 affect the construction of the dispatch table.
1550 2011-10-14 Robert Dewar <dewar@adacore.com>
1552 * make.adb, mlib-utl.adb, sem_util.adb, sem_ch4.adb: Minor code
1554 * s-rident.ads: Add missing Compiler_Unit pragma.
1556 2011-10-14 Gary Dismukes <dismukes@adacore.com>
1558 * sem_res.adb: Minor reformatting.
1560 2011-10-14 Hristian Kirtchev <kirtchev@adacore.com>
1562 * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call):
1563 Code and comment reformatting. Use BIP_Task_Master
1564 when creating a _master.
1565 (BIP_Formal_Suffix): Code reformatting. Correct the case for
1567 (Make_Build_In_Place_Call_In_Object_Declaration): Use
1568 BIP_Task_Master when creating a reference to the enclosing
1569 function's _master formal.
1570 (Move_Activation_Chain): Use BIP_Task_Master when creating a reference
1572 * exp_ch6.ads: Change BIP_Master to BIP_Task_Master.
1573 (Needs_BIP_Finalization_Master): Alphabetized.
1574 * sem_ch6.adb (Create_Extra_Formals): Update the usage of
1577 2011-10-14 Ed Schonberg <schonberg@adacore.com>
1579 * par-ch6.adb (P_Return_Object_Declaration): In Ada 2012 mode,
1580 reject an aliased keyword on the object declaration of an extended
1581 return statement. In older versions of the language indicate
1582 that this is illegal in the standard.
1584 2011-10-14 Pascal Obry <obry@adacore.com>
1586 * sem_util.adb, sem_ch4.adb: Minor reformatting.
1588 2011-10-14 Ed Schonberg <schonberg@adacore.com>
1590 * sem_ch13.adb: Recognize properly procedure calls that are
1591 transformed into code statements.
1593 2011-10-14 Vincent Celier <celier@adacore.com>
1595 * projects.texi: Minor fix in project example.
1597 2011-10-14 Ed Schonberg <schonberg@adacore.com>
1599 * sem_util.adb: Return objects are aliased if their type is
1600 immutably limited as per AI05-0053.
1602 2011-10-14 Gary Dismukes <dismukes@adacore.com>
1604 * exp_ch4.adb (Expand_N_Op_And): Remove Short_Circuit_And_Or
1605 expansion code (moved to sem_res) (Expand_N_Op_Or): Remove
1606 Short_Circuit_And_Or expansion code (moved to sem_res).
1607 * sem_res.adb (Resolve_Logical_Op): Add code to rewrite Boolean
1608 "and" and "or" operators as short-circuit "and then" and "or
1609 else", when pragma Short_Circuit_And_Or is active.
1611 2011-10-13 Robert Dewar <dewar@adacore.com>
1613 * sem_ch9.adb, sem_util.adb, sem_util.ads, exp_ch6.adb, sem_ch4.adb,
1614 sem_ch6.adb, exp_ch3.adb: Minor reformatting.
1616 2011-10-13 Arnaud Charlet <charlet@adacore.com>
1618 * Makefile.rtl (GNATRTL_NONTASKING_OBJS): Add a-ngcoar.o.
1620 2011-10-13 Jerome Guitton <guitton@adacore.com>
1622 * sysdep.c (__gnat_get_task_options): Re-enable VX_SPE_TASK on vThreads
1624 2011-10-13 Eric Botcazou <ebotcazou@adacore.com>
1626 * a-convec.ads (Cursor): Minor reformatting.
1627 * a-convec.adb (Next): Fix minor inconsistencies.
1628 (Previous): Likewise.
1630 2011-10-13 Ed Schonberg <schonberg@adacore.com>
1632 * sem_util.ads, sem_util.adb (Available_Full_View_Of_Component):
1633 New predicate to determine whether some operations on an array
1634 type are available when the full view of its component may differ
1635 from the view of the point of the array declaration.
1636 * sem_ch4.adb (Find_Equality_Types): Use
1637 Available_Full_View_Of_Component.
1638 * sem_type.adb (Valid_Boolean_Arg, Valid_Comparison_Arg): Ditto
1640 2011-10-13 Ed Schonberg <schonberg@adacore.com>
1642 * sem_ch9.adb: Analyze aspects while discriminants of protected
1645 2011-10-13 Geert Bosch <bosch@adacore.com>
1647 * Makefile.rtl (GNATRTL_TASKING_OBJECTS): Add
1648 a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o, as these no
1649 longer depend on an external library.
1650 * gcc-interface/Makefile.in (GNATRTL_LINEARALGEBRA_OBJS): Remove
1651 a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o.
1652 Update dependencies.
1653 * gcc-interface/Make-lang.in: Update dependencies.
1655 2011-10-13 Cyrille Comar <comar@adacore.com>
1657 * gnat_ugn.texi: Minor editing.
1659 2011-10-13 Vincent Celier <celier@adacore.com>
1661 * projects.texi: Add documentation on packages and attributes
1662 that are inherited from a project being extended into the
1665 2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
1667 * exp_ch3.adb (Build_Master): Rewritten.
1668 (Expand_N_Full_Type_Declaration): Reformat the declarative
1669 region. Update the call to Build_Master_Renaming.
1670 (Expand_Previous_Access_Type): Rewritten.
1671 * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call):
1672 Add local constant Result_Subt and update related usage.
1673 (Expand_N_Extended_Return_Statement): Add local constant
1674 Result_Subt and update related usage.
1675 * exp_ch9.adb (Build_Activation_Chain): Rewritten to use the
1676 new context detection mechanism.
1677 (Build_Class_Wide_Master):
1678 Use Insert_Action to add the renaming into the tree.
1679 (Build_Master_Entity): Rewritten to use the new context detection
1681 (Build_Master_Renaming): Add formal parameter Ins_Nod
1682 and related usage. Use Insert_Action to add the renaming into the
1684 (Find_Enclosing_Context): New subsidiary routine. Rather
1685 than relying on enclosing scopes, this routine looks at the
1686 tree structure to figure out the proper context for a _master
1687 or a _chain. This approach eliminates the issues with transient
1688 scopes which have not been converted into blocks.
1689 * exp_ch9.ads (Build_Master_Entity): Change parameter profile
1690 to better reflect the new usage. Update the related comment.
1691 (Build_Master_Renaming): Add formal parameter Ins_Nod. Update
1692 the comment on usage.
1693 * sem_ch3.adb (Access_Definition): Update the calls to
1694 Build_Master_Entity and Build_Master_Renaming.
1695 * sem_ch6.adb (Create_Extra_Formals): Add local variable
1696 Full_Subt. Code reformatting.
1697 * sem_util.adb (Is_Iterator): Alphabetized.
1698 (Is_LHS): Alphabetized.
1699 (Is_Limited_Class_Wide_Type): New routine.
1700 * sem_util.ads (Is_Limited_Class_Wide_Type): New routine.
1702 2011-10-13 Geert Bosch <bosch@adacore.com>
1704 * a-ngrear.adb (Solve): Make generic and move to
1705 System.Generic_Array_Operations.
1706 * s-gearop.ads (Matrix_Vector_Solution, Matrix_Matrix_Solution):
1707 New generic solvers to compute a vector resp. matrix Y such
1708 that A * Y = X, approximately.
1709 * s-gearop.adb (Matrix_Vector_Solution, Matrix_Matrix_Solution):
1710 Implement using Forward_Eliminate and Back_Substitute
1711 * a-ngcoar.adb: Reimplement in pure Ada to remove dependencies
1713 * a-ngcoar.ads ("abs"): Fix return type to be real.
1715 2011-10-13 Eric Botcazou <ebotcazou@adacore.com>
1718 * s-linux-alpha.ads: Do not "with" Interfaces.C.
1719 * s-linux-sparc.ads: Likewise.
1721 2011-10-13 Geert Bosch <bosch@adacore.com>
1723 * s-gearop.ads (Forward_Eliminate): Add "abs" formal function
1725 * s-gearop.adb (Forward_Eliminate): Remove local "abs" function
1727 * a-ngrear.adb (Forward_Eliminate): Adjust instantiation for
1730 2011-10-13 Geert Bosch <bosch@adacore.com>
1732 * a-ngrear.adb, s-gearop.adb, s-gearop.ads (Sqrt): Make generic and
1733 move to System.Generic_Array_Operations.
1735 2011-10-13 Geert Bosch <bosch@adacore.com>
1737 * a-ngrear.adb ("abs"): Adjust for modified L2_Norm generic
1738 * s-gearop.ads (L2_Norm): Change profile to be suitable for
1740 * s-gearop.adb (L2_Norm): Reimplement using direct definition,
1743 2011-10-13 Robert Dewar <dewar@adacore.com>
1745 * exp_ch5.adb, sem_ch3.adb, impunit.adb, impunit.ads, sem_type.adb,
1746 prj-proc.adb, exp_ch9.adb, s-regpat.adb, sem_ch10.adb, sem_prag.adb,
1747 sem_ch12.adb, freeze.adb, sem_attr.adb, sem_attr.ads, gnatlink.adb,
1748 par-ch6.adb, exp_ch6.adb, sem_ch4.adb, sem_ch6.adb, sem_ch8.adb,
1749 par-util.adb, sem_ch13.adb, lib-xref.adb, g-trasym.adb, g-trasym.ads,
1750 exp_aggr.adb, s-taprop-posix.adb: Minor reformatting.
1752 2011-10-13 Geert Bosch <bosch@adacore.com>
1754 * s-gearop.adb: Minor comment additions.
1756 2011-10-13 Fedor Rybin <frybin@adacore.com>
1758 * gnat_ugn.texi: Add gnattest section.
1760 2011-10-13 Ed Schonberg <schonberg@adacore.com>
1762 * freeze.adb: Do not create body of renaming if declaration has
1765 2011-10-13 Olivier Hainque <hainque@adacore.com>
1767 * init.c (__gnat_error_handler - vxworks case): Restrict sigtramp calls
1768 further, to the ppc+kernel case only.
1770 2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
1772 * exp_ch4.adb (Expand_N_Allocator): Comment reformatting.
1773 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call):
1774 Do not create a pool formal on .NET/JVM.
1775 (Expand_N_Extended_Return_Statement): Alphabetize local
1776 variables. Do not create a renaming of the build-in-place pool
1777 parameter on .NET/JVM. (Make_Build_In_Place_Call_In_Allocator):
1778 Add the user-defined pool only on non-VM targets.
1779 (Make_Build_In_Place_Call_In_Object_Declaration): Alphabetize
1780 local variables. Do not add a pool actual on .NET/JVM.
1781 * sem_ch6.adb: Add with and use clause for Targparm.
1782 (Create_Extra_Formals): Add build-in-place pool formal only on
1784 * rtsfind.ads: Alphabetize entries.
1786 2011-10-13 Sergey Rybin <rybin@adacore.com>
1788 * gnat_ugn.texi: Minor correction.
1790 2011-10-13 Ed Schonberg <schonberg@adacore.com>
1792 * sem_ch8.adb: Minor error message improvement.
1794 2011-10-13 Robert Dewar <dewar@adacore.com>
1796 * a-cbprqu.adb, a-ciorma.adb, exp_ch3.adb: Minor reformatting.
1798 2011-10-13 Gary Dismukes <dismukes@adacore.com>
1800 * exp_ch5.adb (Expand_N_Loop_Statement): For the transformation
1801 of a for loop for an enumeration type with an enumeration rep
1802 clause, which involves moving the original loop parameter into
1803 a nested block, the loop parameter's entity must be removed from
1804 the entity list of the loop scope.
1806 2011-10-13 Bob Duff <duff@adacore.com>
1808 * exp_ch6.ads (BIP_Storage_Pool): New "extra implicit parameter"
1809 that gets passed in the same cases where BIP_Alloc_Form is passed
1810 (caller-unknown-size results). BIP_Storage_Pool is used when
1811 BIP_Alloc_Form = User_Storage_Pool. In that case, a pointer
1812 to the user-defined storage pool is passed at the call site,
1813 and this pool is used in callee to allocate the result.
1814 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call): New
1815 version of Add_Alloc_Form_Actual_To_Build_In_Place_Call. Passes
1816 the additional BIP_Storage_Pool actual.
1817 (Expand_N_Extended_Return_Statement): Allocate the function
1818 result using the user-defined storage pool, if BIP_Alloc_Form =
1820 * sem_ch6.adb: Add the "extra formal" for BIP_Storage_Pool.
1821 * exp_ch4.adb: Don't overwrite storage pool set by
1822 Expand_N_Extended_Return_Statement.
1823 * s-stopoo.ads, rtsfind.ads (Root_Storage_Pool_Ptr): New type,
1824 for use in build-in-place function calls within allocators
1825 where the access type has a user-defined storage pool.
1827 2011-10-13 Sergey Rybin <rybin@adacore.com>
1829 * gnat_ugn.texi, vms_data.ads: Add an option to control enumeration
1832 2011-10-13 Nicolas Roche <roche@adacore.com>
1834 * gnatlink.adb: Ensure that -mrtp is passed when runtime name ends
1837 2011-10-13 Ed Schonberg <schonberg@adacore.com>
1839 * sem_prag.adb (Analyze_Pragma, case Unchecked_Union): Take into
1840 account that an unchecked union type can be limited.
1842 2011-10-13 Olivier Hainque <hainque@adacore.com>
1844 * init.c (__gnat_error_handler) <VxWorks version>: Add comments on
1845 the use of the signal trampoline for PPC in the sjlj case as well.
1846 Add legitimate casts, preventing compile time warnings on the
1847 (sighandler *) profile.
1849 2011-10-13 Yannick Moy <moy@adacore.com>
1851 * sem_aggr.adb (Resolve_Aggr_Expr): Always perform semantic analysis
1854 2011-10-13 Ed Schonberg <schonberg@adacore.com>
1856 * sem_ch3.adb (OK_For_Limited_Init_In_05): Conditional and case
1857 expressions are legal limited return values if each one of their
1858 dependent expressions are legal.
1860 2011-10-13 Ed Schonberg <schonberg@adacore.com>
1862 * sem_ch6.adb (Analyze_Procedure_Call_Statement): In Ada 2012 mode,
1863 if the prefix of the call is a qualified expression, rewrite as
1865 * sem_ch13.adb (Analyze_Code_Statement): In Ada 2012 mode, the
1866 code statement is legal if it is a rewriting of a procedure call.
1868 2011-10-13 Ed Schonberg <schonberg@adacore.com>
1870 * exp_aggr.adb (Flatten): If a component association has a box,
1871 assume that aggregate is not static.
1872 (Safe_Aggregate): If a component association in a non-limited
1873 aggregate has a box, assume that it cannot be expanded in place.
1875 2011-10-13 Vincent Celier <celier@adacore.com>
1877 * prj-conf.adb (Get_Or_Create_Configuration_File): Call
1878 Process_Project_Tree_Phase_1 with Packages_To_Check.
1879 (Process_Project_And_Apply_Config): Ditto
1880 * prj-part.ads, prj-part.adb, prj-pars.ads, prj-pars.adb (Parse):
1881 Remove default for argument Packages_To_Check.
1882 * prj-proc.adb (Recursive_Process): New argument
1885 (Process_Project_Tree_Phase_1): Ditto.
1886 (Recursive_Project.Process_Aggregated_Projects): Call
1887 Prj.Part.Parse and Process_Project_Tree_Phase_1 with
1889 * prj-proc.ads (Process): New argument Packages_To_Check
1890 (Process_Project_Tree_Phase_1): Ditto
1892 2011-10-13 Arnaud Charlet <charlet@adacore.com>
1894 * gcc-interface/Makefile.in: Fix typo.
1896 2011-10-13 Ed Schonberg <schonberg@adacore.com>
1898 * sem_ch12.adb (Analyze_Formal_{Floating_Type,
1899 Signed_Integer_Type, Decimal_Fixed_Point_Type, Discrete_Type}):
1900 Use sloc of defining identifier of farmal type declaration,
1901 as sloc of generated internal entity, to prevent misplaced
1904 2011-10-13 Ed Schonberg <schonberg@adacore.com>
1906 * sem_intr.adb (Check_Intrinsic_Operator): Check that type
1907 is fully defined before checking that it is a numeric type.
1909 2011-10-13 Ed Schonberg <schonberg@adacore.com>
1911 * sem_aggr.adb (Resolve_Record_Aggregate): If a component
1912 association for component X has a box, then X is covered in the
1913 aggregate even if there is not default value for X in the type
1914 declaration, and X has to be default-initialized.
1916 2011-10-13 Ed Schonberg <schonberg@adacore.com>
1918 * sem_attr.adb (Check_Enum_Image, Analyze_Attribute case 'Value): Mark
1919 literals as referenced only if reference is in current source unit.
1921 2011-10-13 Matthew Heaney <heaney@adacore.com>
1923 * a-csquin.ads (Enque, Dequeue): Mark interface operations as entries.
1925 2011-10-13 Olivier Hainque <hainque@adacore.com>
1927 * sigtramp.h: New file. Prototype and spec of the signal
1928 trampoline to be called by an established handler to provide
1929 dwarf call frame info before the real signal processing code.
1930 * sigtramp-ppcvxw.c: New file. Implementation of the signal
1931 trampoline for ppc-vxworks.
1932 * init.c (vxworks section): Use it for ppc.
1934 2011-10-13 Thomas Quinot <quinot@adacore.com>
1936 * par-ch2.adb, par.adb, par-util.adb, par-ch3.adb
1937 (Check_Future_Identifier): New subprogram,
1938 factors duplicated code from Par.Ch2.P_Identifier and
1939 Par.Ch3.P_Defining_Identifier.
1941 2011-10-13 Thomas Quinot <quinot@adacore.com>
1943 * s-taprop-posix.adb (Initialize): Always raise Storage_Error
1944 if we fail to initialize CV attributes or CV.
1946 2011-10-13 Thomas Quinot <quinot@adacore.com>
1948 * s-tasren.adb (Timed_Selective_Wait, case
1949 Accept_Alternative_Selected): Use Defer_Abort_Nestable, since
1950 we know abortion is already deferred.
1952 2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
1954 * exp_ch3.adb (Build_Class_Wide_Master): Moved to exp_ch9.
1955 (Build_Master_Renaming (function)): Removed.
1956 (Build_Master_Renaming (procedure)): Moved to exp_ch9.
1957 (Expand_Full_Type_Declaration): Alphabetize
1958 variables. Reformatting of code and comments. Rewrite the
1959 section on processing of anonymous access-to-task types in
1961 * exp_ch3.ads (Build_Class_Wide_Master): Moved to exp_ch9.
1962 (Build_Master_Renaming): Moved to exp_ch9.
1963 * exp_ch9.adb (Build_Class_Wide_Master): Moved from exp_ch3.
1964 (Build_Master_Entity): Add formal parameter
1965 Use_Current. Reformatting of code and comments.
1966 (Build_Master_Renaming): Moved from exp_ch3.
1967 * exp_ch9.ads (Build_Class_Wide_Master): Moved from
1968 exp_ch3. Update comment on usage.
1969 (Build_Master_Entity):
1970 Add formal parameter Use_Current. Update comment on usage.
1971 (Build_Master_Renaming): Moved from exp_ch3.
1972 * sem_ch3.adb (Access_Definition): Remove redundant code to
1973 create a _master and a renaming.
1975 2011-10-13 Ed Schonberg <schonberg@adacore.com>
1977 * lib-xref.adb: Do no emit reference to overridden operation,
1978 if it is internally generated.
1980 2011-10-13 Vincent Celier <celier@adacore.com>
1982 * bindgen.adb: Remove any processing related to g-trasym
1983 * Makefile.rtl: Add g-trasym.o to GNATRTL_NONTASKING_OBJS
1984 * mlib-prj.adb: Remove any processing related to g-trasym.
1986 2011-10-12 Eric Botcazou <ebotcazou@adacore.com>
1988 * sem_util.adb (Denotes_Same_Prefix): Fix fatal warning.
1989 * gcc-interface/Make-lang.in (WARN_ADAFLAGS): New.
1990 (ALL_ADAFLAGS): Include WARN_ADAFLAGS.
1991 (ADA_FLAGS_TO_PASS): Likewise.
1992 (COMMON_FLAGS_TO_PASS): New.
1993 (ADA_TOOLS_FLAGS_TO_PASS): Use COMMON_FLAGS_TO_PASS. In the regular
1994 native case, also use FLAGS_TO_PASS and ADA_FLAGS_TO_PASS.
1995 (gnatlib): Use COMMON_FLAGS_TO_PASS.
1996 (ada.install-common): Likewise.
1997 (install-gnatlib): Likewise.
1998 (install-gnatlib-obj): Likewise.
1999 (gnattools): Use ADA_TOOLS_FLAGS_TO_PASS for gnattools1 as well.
2000 (gnat-cross): Delete.
2001 (gnatboot): Likewise.
2002 (gnatboot2): Likewise.
2003 (gnatboot3): Likewise.
2004 (gnatstage1): Likewise.
2005 (gnatstage2): Likewise.
2006 * gcc-interface/Makefile.in (SOME_ADAFLAGS): Likewise.
2007 (MOST_ADAFLAGS): Likewise.
2008 (LOOSE_CFLAGS): Likewise.
2009 (gnat-cross): Likewise.
2010 (GNATLIBFLAGS): Add -W -Wall.
2011 (GNATLIBCFLAGS_FOR_C): Likewise.
2012 * gcc-interface/lang.opt: Remove C-specific warnings. Add doc lines.
2013 * gcc-interface/misc.c (gnat_handle_option): Remove obsolete cases.
2015 2011-10-12 Eric Botcazou <ebotcazou@adacore.com>
2017 * gcc-interface/trans.c (Attribute_to_gnu): Use remove_conversions.
2018 (push_range_check_info): Likewise.
2019 (gnat_to_gnu) <N_Code_Statement>: Likewise.
2020 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: Likewise.
2021 (gnat_invariant_expr): Likewise.
2022 * gcc-interface/utils.c (compute_related_constant): Likewise.
2023 (max_size): Fix handling of SAVE_EXPR.
2024 (remove_conversions): Fix formatting.
2026 2011-10-12 Eric Botcazou <ebotcazou@adacore.com>
2028 * gcc-interface/ada-tree.h (DECL_LOOP_PARM_P): New flag.
2029 (DECL_INDUCTION_VAR): New macro.
2030 (SET_DECL_INDUCTION_VAR): Likewise.
2031 * gcc-interface/gigi.h (convert_to_index_type): Declare.
2032 (gnat_invariant_expr): Likewise.
2033 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: If this is a loop
2034 parameter, set DECL_LOOP_PARM_P on it.
2035 * gcc-interface/misc.c (gnat_print_decl) <VAR_DECL>: If DECL_LOOP_PARM_P
2036 is set, print DECL_INDUCTION_VAR instead of DECL_RENAMED_OBJECT.
2037 * gcc-interface/trans.c (gnu_loop_label_stack): Delete.
2038 (struct range_check_info_d): New type.
2039 (struct loop_info_d): Likewise.
2040 (gnu_loop_stack): New stack.
2041 (Identifier_to_gnu): Set TREE_READONLY flag on the first dereference
2042 built for a by-double-ref read-only parameter. If DECL_LOOP_PARM_P
2043 is set, do not test DECL_RENAMED_OBJECT.
2044 (push_range_check_info): New function.
2045 (Loop_Statement_to_gnu): Push a new struct loop_info_d instead of just
2046 the label. Reference the label and the iteration variable from it.
2047 Build the special induction variable in the unsigned version of the
2048 size type, if it is larger than the base type. And attach it to the
2049 iteration variable if the latter isn't by-ref. In the iteration scheme
2050 case, initialize the invariant conditions in front of the loop if
2051 deemed profitable. Use gnu_loop_stack.
2052 (gnat_to_gnu) <N_Exit_Statement>: Use gnu_loop_stack.
2053 <N_Raise_Constraint_Error>: Always process the reason. In the range
2054 check and related cases, and if loop unswitching is enabled, compute
2055 invariant conditions and push this information onto the stack.
2056 Do not translate again the condition if it has been already translated.
2057 * gcc-interface/utils.c (record_global_renaming_pointer): Assert that
2058 DECL_LOOP_PARM_P isn't set.
2059 (convert_to_index_type): New function.
2060 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Use it in order
2061 to convert the index from the base index type to sizetype.
2062 (gnat_invariant_expr): New function.
2064 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
2066 * gcc-interface/utils.c (def_builtin_1): Delete old interface with
2067 two parallel arrays to hold standard builtin declarations, and
2068 replace it with a function based interface that can support
2069 creating builtins on the fly in the future.
2070 * gcc-interface/trans.c (Exception_Handler_to_gnu_zcx): Ditto.
2071 (gnat_to_gnu): Ditto.
2073 2011-10-07 Eric Botcazou <ebotcazou@adacore.com>
2076 * gcc-interface/gigi.h (gnat_pushdecl): Adjust comment.
2077 * gcc-interface/utils.c (global_context): New variable.
2078 (gnat_pushdecl): Initialize it and set it as the DECL_CONTEXT of DECLs
2079 that are either public external or at top level. Use "No" macro.
2080 (end_subprog_body): Call decl_function_context.
2081 (rest_of_subprog_body_compilation): Likewise.
2083 2011-10-07 Eric Botcazou <ebotcazou@adacore.com>
2085 * gcc-interface/gigi.h (gnat_useless_type_conversion): Declare.
2086 (rest_of_subprog_body_compilation): Likewise.
2087 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: For renaming,
2088 test for useless conversions by means of gnat_useless_type_conversion.
2089 * gcc-interface/trans.c: Include bitmap.h and cgraph.h.
2090 (language_function): Add named_ret_val and other_ret_val.
2091 (f_named_ret_val): New macro.
2092 (f_other_ret_val): Likewise.
2093 (gigi): Call rest_of_subprog_body_compilation.
2094 (struct nrv_data): New structure.
2095 (is_nrv_p): New predicate.
2096 (prune_nrv_r): New helper function.
2097 (prune_nrv_in_block): New function.
2098 (finalize_nrv_r): New helper function.
2099 (finalize_nrv): New function.
2100 (return_value_ok_for_nrv_p): New predicate.
2101 (build_return_expr): If optimization is enabled, record candidates for
2102 the Named Return Value optimization.
2103 (build_function_stub): Call rest_of_subprog_body_compilation.
2104 (Subprogram_Body_to_gnu): If optimization is enabled and there are
2105 candidates, finalize the Named Return Value optimization.
2106 Call rest_of_subprog_body_compilation.
2107 (call_to_gnu): At the end, if a return value is needed, simplify the
2108 result before wrapping it up in a COMPOUND_EXPR.
2109 * gcc-interface/utils.c (end_subprog_body): Split into...
2110 (rest_of_subprog_body_compilation): ...this. New function.
2111 (gnat_useless_type_conversion): Likewise.
2113 2011-10-06 Thomas Quinot <quinot@adacore.com>
2115 * einfo.ads, exp_attr.adb, exp_ch3.adb, exp_ch4.adb, exp_ch7.adb,
2116 exp_ch9.adb, exp_ch9.ads, exp_strm.adb, exp_util.adb, freeze.adb,
2117 g-debpoo.ads, opt.ads, par-ch12.adb, par-ch2.adb, par-ch3.adb,
2118 par-ch5.adb, par-ch6.adb, sem_aggr.adb, sem_attr.adb, sem_cat.adb,
2119 sem_ch10.adb, sem_ch12.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
2120 sem_ch6.adb, sem_intr.adb, sem_res.ads, sem_type.adb, sem_util.adb,
2121 s-regpat.adb, s-tpopde-vms.ads: Minor reformatting.
2122 * s-osinte-freebsd.ads: Fix for tasking failures on FreeBSD.
2124 2011-10-06 Ed Schonberg <schonberg@adacore.com>
2126 * a-cihase.adb, a-ciorma.adb: Avoid accessibility checks in container
2129 2011-10-06 Matthew Heaney <heaney@adacore.com>
2131 * a-cuprqu.ads, a-cuprqu.adb, a-cbprqu.ads, a-cbprqu.adb
2132 (Dequeue_Only_High_Priority): Protected procedure now implemented.
2134 2011-10-06 Vincent Celier <celier@adacore.com>
2136 * g-trasym.adb: Replace old implementation with the default
2137 implementation that returns list of addresses as "0x...".
2138 * g-trasym.ads: Update the list of platforms with the full
2139 capability. Indicate that there is a default implementation
2140 for other platforms.
2141 * g-trasym-unimplemented.ads, g-trasym-unimplemented.adb: Remove.
2142 * gcc-interface/Makefile.in: Remove g-trasym-unimplemented, as there
2143 is now a default implementation for all platforms without the full
2146 2011-10-06 Robert Dewar <dewar@adacore.com>
2148 * a-ciorse.adb, a-cihase.adb, a-cihase.ads, a-coorse.adb,
2149 a-cborse.adb, a-comutr.adb, a-ciorma.adb, a-cbmutr.adb,
2150 a-cbmutr.ads, a-cbhase.adb, a-cbhase.ads: Minor reformatting and code
2151 reorganization (use conditional expressions).
2153 2011-10-06 Robert Dewar <dewar@adacore.com>
2155 * sem_res.adb (Resolve_Arithmetic_Op): Fix bad warning for
2156 floating divide by zero.
2158 2011-10-06 Ed Schonberg <schonberg@adacore.com>
2160 * sem_ch6.adb: Limited interfaces that are not immutably limited
2161 are OK in return statements.
2163 2011-09-30 Iain Sandoe <iains@gcc.gnu.org>
2165 * gcc-interface/Makefile.in (Darwin): Partial reversion of previous
2166 change to powerpc section.
2168 2011-09-29 Iain Sandoe <iains@gcc.gnu.org>
2170 * gcc-interface/Makefile.in (Darwin): Factor LIBGNAT_TARGET_PAIRS
2173 2011-09-27 Ed Schonberg <schonberg@adacore.com>
2175 * a-cbhase.adb, a-cbhase.ads, a-cborse.adb, a-cborse.ads,
2176 a-cihase.adb, a-cihase.ads, a-ciorse.adb, a-ciorse.ads,
2177 a-coorse.adb, a-coorse.ads: Add iterator machinery to bounded sets and
2179 * a-coorma.ads: Minor reformmating.
2180 * einfo.ads: Improve the comment describing the
2181 Directly_Designated_Type function.
2182 * a-ciorma.adb, a-ciorma.ads: Add iterator machinery to indefinite
2184 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
2187 2011-09-27 Robert Dewar <dewar@adacore.com>
2189 * a-comutr.ads: Minor reformatting.
2191 2011-09-27 Ed Schonberg <schonberg@adacore.com>
2193 * a-cimutr.adb, a-cimutr.ads, a-cbmutr.adb, a-cbmutr.ads: Add children
2194 iterators to multiway trees.
2196 2011-09-27 Yannick Moy <moy@adacore.com>
2198 * debug.adb (d.D): New option for strict Alfa mode.
2199 * opt.ads (Strict_Alfa_Mode): New flag to interpret compiler
2200 permissions as strictly as possible.
2201 * sem_ch3.adb (Signed_Integer_Type_Declaration): In non-strict
2202 Alfa mode, now, interpret ranges of base types like GNAT does; in
2203 strict mode, simply change the range of the implicit base Itype.
2204 * gnat1drv.adb: Update comments. Set Strict_Alfa_Mode.
2206 2011-09-27 Robert Dewar <dewar@adacore.com>
2208 * exp_ch9.adb: Minor comment fixes.
2210 2011-09-27 Ed Schonberg <schonberg@adacore.com>
2212 * a-comutr.adb, a-comutr.ads: Add children iterators on multiway
2215 2011-09-27 Eric Botcazou <ebotcazou@adacore.com>
2217 * checks.adb (Apply_Scalar_Range_Check): Use Designated_Type
2218 instead of Directly_Designated_Type in the indirect array case.
2220 2011-09-27 Robert Dewar <dewar@adacore.com>
2222 * exp_util.adb, exp_aggr.adb: Minor reformatting.
2224 2011-09-27 Ed Schonberg <schonberg@adacore.com>
2226 * sinfo.ads, par-ch3.adb: Minor comment update: aspect specification
2227 on subtype declarations.
2228 * exp_aggr.adb: Minor comment update.
2230 2011-09-27 Eric Botcazou <ebotcazou@adacore.com>
2232 * exp_util.adb (Safe_Prefixed_Reference): Remove always-false
2233 test in the N_Explicit_Dereference case. Fold double logical
2234 negation in the special loop case and conditionalize it on
2235 Variable_Ref being true.
2237 2011-09-27 Ed Schonberg <schonberg@adacore.com>
2239 * sem_ch4.adb (Analyze_Selected_Component): If the prefix is a
2240 single protected object and the selector is a discriminant or an
2241 entry family, this is a non-overloaded candidate interpretation,
2242 and possible primitive operations of the type must not be
2245 2011-09-27 Arnaud Charlet <charlet@adacore.com>
2247 * s-taspri-posix-noaltstack.ads (Lock): Mark fields aliased.
2249 2011-09-27 Pascal Obry <obry@adacore.com>
2251 * s-osinte-hpux.ads, s-osinte-aix.ads, s-osinte-solaris-posix.ads,
2252 s-osinte-irix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads:
2253 Add dummy definitions for pthread_rwlock_t
2254 and pthread_rwlockattr_t on all POSIX platforms.
2255 * s-taprop-irix.adb, s-taprop-posix.adb (Initialize_Lock): Fix lock
2257 (Finalize_Lock): Likewise.
2258 (Write_Lock): Likewise.
2261 2011-09-27 Tristan Gingold <gingold@adacore.com>
2263 * s-tassta.adb (Task_Wrapper): Increase Guard_Page_Size value for
2266 2011-09-27 Pascal Obry <obry@adacore.com>
2268 * s-osinte-hpux.ads, s-taprop-vxworks.adb, s-taspri-vxworks.ads,
2269 s-taprop-tru64.adb, s-osinte-aix.ads, s-taspri-posix-noaltstack.ads,
2270 s-taspri-mingw.ads, s-taprop-vms.adb, s-tpoben.adb, s-tpoben.ads,
2271 s-taprop-mingw.adb, s-taprob.adb, s-taprob.ads,
2272 s-osinte-solaris-posix.ads, s-taprop-solaris.adb, s-taspri-solaris.ads,
2273 s-osinte-irix.ads, s-taprop-irix.adb, s-osinte-darwin.ads,
2274 s-taspri-dummy.ads, s-taspri-posix.ads, s-taprop.ads,
2275 s-taspri-vms.ads, s-osinte-freebsd.ads, s-taprop-hpux-dce.adb,
2276 s-taspri-hpux-dce.ads, s-taspri-tru64.ads, s-taprop-dummy.adb,
2277 s-taprop-posix.adb: Revert previous changes.
2278 (Lock): Now a record containing the two possible lock
2279 (mutex and read/write) defined in OS_Interface.
2280 * s-taprop-linux.adb (Finalize_Protection): Use r/w lock for
2282 (Initialize_Protection): Likewise.
2284 (Lock_Read_Only): Likewise.
2287 2011-09-27 Pascal Obry <obry@adacore.com>
2289 * s-taspri-posix-noaltstack.ads (RW_Lock): This type is now defined as
2290 OS_Interface.pthread_rwlock_t.
2292 2011-09-27 Robert Dewar <dewar@adacore.com>
2294 * exp_ch9.adb, a-cimutr.adb, a-cimutr.ads, gnat1drv.adb, a-comutr.adb,
2295 a-comutr.ads, exp_dist.adb, a-cbmutr.adb, a-cbmutr.ads,
2296 sem_ch5.adb, sem_util.adb: Minor reformatting.
2298 2011-09-27 Pascal Obry <obry@adacore.com>
2300 * s-taprop.ads (Initialize_Lock)[RW_Lock]: New spec for r/w lock.
2301 (Finalize_Lock)[RW_Lock]: Likewise.
2302 (Write_Lock)[RW_Lock]: Likewise.
2303 (Unlock)[RW_Lock]: Likewise.
2304 (Read_Lock): Define L as RW_Lock (instead of Lock).
2305 * s-taprop-linux.adb (Initialize_Lock)[RW_Lock]: New
2306 routine for r/w lock.
2307 (Finalize_Lock)[RW_Lock]: Likewise.
2308 (Write_Lock)[RW_Lock]: Likewise.
2309 (Unlock)[RW_Lock]: Likewise.
2310 (Read_Lock): Define L as RW_Lock (instead of Lock).
2312 * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
2313 s-taprop-mingw.adb, s-taprop-solaris.adb, s-taprop-irix.adb,
2314 s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
2315 (Initialize_Lock)[RW_Lock]: Same implementation as corresponding
2316 routine for standard lock.
2317 (Finalize_Lock)[RW_Lock]: Likewise.
2318 (Write_Lock)[RW_Lock]: Likewise.
2319 (Unlock)[RW_Lock]: Likewise.
2320 (Read_Lock): Define L as RW_Lock (instead of Lock).
2321 * s-taprob.ads, s-tpoben.ads (Protection): Add RWL (RW_Lock)
2322 in the record definition.
2323 * s-taprob.adb, s-taproben.adb (Finalize_Protection): Use r/w
2324 lock for 'R' locking policy.
2325 (Initialize_Protection): Likewise.
2327 (Lock_Read_Only): Likewise.
2329 * s-taspri-posix.ads (RW_Lock): New type defined as
2330 OS_Interface.pthread_rwlock_t.
2332 * s-taspri-vxworks.ads, s-taspri-posix-noaltstack.ads,
2333 s-taspri-mingw.ads, s-taspri-solaris.ads, s-taspri-dummy.ads,
2334 s-taspri-posix.ads, s-taspri-vms.ads, s-taspri-hpux-dce.ads,
2335 s-taspri-tru64.ads (RW_Lock): New type defined as alias to Lock.
2337 2011-09-27 Pascal Obry <obry@adacore.com>
2339 * exp_ch9.adb, s-taspri-posix.ads: Minor reformatting.
2341 2011-09-27 Pascal Obry <obry@adacore.com>
2343 * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
2344 s-osinte-hpux.ads, s-osinte-irix.ads,
2345 s-osinte-solaris-posix.ads (pthread_rwlock_t): New definition alias of
2347 (pthread_rwlockattr_t): New definition alias of pthread_mutexattr_t.
2348 * s-osinte-linux.ads (pthread_rwlock_t, pthread_rwlockattr_t,
2349 pthread_rwlockattr_init, pthread_rwlockattr_destroy,
2350 pthread_rwlockattr_setkind_np, pthread_rwlock_init,
2351 pthread_rwlock_destroy, pthread_rwlock_rdlock,
2352 pthread_rwlock_wrlock, pthread_rwlock_unlock): New.
2354 2011-09-27 Pascal Obry <obry@adacore.com>
2356 * rtsfind.ads: Add RE_Lock_Read_Only into rtsfind circuitry.
2357 (RE_Id): Add RE_Lock_Read_Only.
2358 (RE_Unit_Table): Likewise.
2359 * sem_prag.adb (Process_Convention): Change Pragma_Locking_Policy
2360 to lift restriction on first character. Handle now the
2361 Name_Concurrent_Readers_Locking where policy character is set to
2363 * snames.ads-tmpl (Name_Concurrent_Readers_Locking): New
2365 * exp_ch9.adb (Build_Protected_Subprogram_Body): Generate a
2366 read only lock for function in protected object.
2367 * s-taprob.ads (Lock_Read_Only): Remove obsolete comment as
2368 this routine is now used.
2370 2011-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2372 * s-atocou-x86.adb (Decrement): Use %;.
2373 (Increment): Likewise.
2375 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
2377 * gcc-interface/utils2.c (build_allocator): Set TREE_THIS_NOTRAP on the
2378 dereference of the pointer to the storage area. Remove useless type
2379 conversions and factor out common code.
2381 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
2383 * gcc-interface/utils.c (maybe_unconstrained_array): Declare TYPE local
2384 variable and use it throughout.
2385 <UNCONSTRAINED_ARRAY_TYPE>: Add 'break' at the end.
2386 <RECORD_TYPE>: Do not unconditionally convert to the unpadded type as a
2387 first step. Also convert to the unpadded type as a last step.
2389 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
2391 * gcc-interface/gigi.h (create_subprog_decl): Replace TREE_CHAIN with
2392 DECL_CHAIN in comment.
2393 * gcc-interface/trans.c (gigi): Likewise.
2394 (Attribute_to_gnu): Likewise.
2395 (build_function_stub): Likewise.
2396 (gnat_to_gnu): Likewise.
2397 * gcc-interface/utils.c (create_subprog_decl): Likewise.
2398 (convert_vms_descriptor64): Likewise.
2399 (convert_vms_descriptor32): Likewise.
2401 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
2403 * gcc-interface/trans.c (assoc_to_constructor): Minor tweaks.
2404 * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting
2405 issues. Use COMPLETE_TYPE_P in assertion. Also set TREE_READONLY if
2406 the type of the record is TYPE_READONLY.
2408 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
2409 Robert Dewar <dewar@adacore.com>
2411 * sem_ch6.adb (Set_Formal_Mode): Set Can_Never_Be_Null on an IN or IN
2412 OUT formal parameter which is of an null-exclusion access subtype.
2414 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
2416 * gcc-interface/ada-tree.h (DECL_CAN_NEVER_BE_NULL_P): New macro.
2417 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Set the flag.
2418 (gnat_to_gnu_param): Likewise.
2419 * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Invoke
2420 maybe_unconstrained_array instead of doing the work manually.
2421 (maybe_unconstrained_array): Propagate the TREE_THIS_NOTRAP flag.
2422 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: If operand
2423 is a DECL with the flag, set TREE_THIS_NOTRAP on the reference.
2424 (gnat_stabilize_reference_1): Propagate the TREE_THIS_NOTRAP flag.
2425 (gnat_stabilize_reference): Likewise.
2427 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
2429 * gcc-interface/ada-tree.h (TYPE_NULL_BOUNDS): New macro.
2430 (SET_TYPE_NULL_BOUNDS): Likewise.
2431 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Set again
2432 TREE_THIS_NOTRAP on the INDIRECT_REF node built for the template.
2433 * gcc-interface/trans.c (Identifier_to_gnu): Return initializers of fat
2435 * gcc-interface/utils.c (create_var_decl_1): If the object is external,
2436 check that the initializer is a valid constant expression for use in
2437 initializing a static variable. Add missing guard.
2438 (update_pointer_to): Adjust TYPE_NULL_BOUNDS if set.
2439 (convert_to_fat_pointer): In the null fat pointer case, build a valid
2440 pointer for the bounds.
2441 * gcc-interface/utils2.c (compare_fat_pointers): New function.
2442 (build_binary_op) <EQ_EXPR>: Call it to compare fat pointers.
2444 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
2446 * gcc-interface/ada-tree.h (TREE_THIS_NOTRAP): Redefine.
2447 * gcc-interface/trans.c (Identifier_to_gnu): Factor out common code in
2448 the by-ref case. Do not set TREE_READONLY on a renamed object. Set
2449 TREE_THIS_NOTRAP on UNCONSTRAINED_ARRAY_REF nodes.
2450 (Attribute_to_gnu) <Attr_Length>: Expand the use of the parameter cache
2451 to the indirect case.
2452 * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Preserve
2453 the TREE_THIS_NOTRAP flag.
2455 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
2457 * gcc-interface/trans.c (Loop_Statement_to_gnu): In the case of an
2458 iteration scheme, always generate the do-while form if optimization
2459 is enabled. Use more straightforward test at the end.
2461 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
2463 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Subtype>: Use
2464 XNEW instead of xmalloc. Do not build useless pointer type.
2465 <E_Anonymous_Access_Subprogram_Type>: Use XNEW instead of xmalloc.
2466 * gcc-interface/trans.c (gnat_to_gnu) <N_Raise_Constraint_Error>: Tidy.
2467 * gcc-interface/utils2.c (build_unary_op): Remove local variable.
2469 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
2471 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not promote
2472 the alignment if this doesn't prevent BLKmode access to the object.
2474 2011-09-24 Iain Sandoe <iains@gcc.gnu.org>
2476 * gcc-interface/Makefile.in (darwin): Do not issue the
2477 '-flat_namespace' linker flag during Ada build.
2478 * mlib-tgt-specific-darwin.adb: Remove '-flat_namespace' flag from the
2479 default shared library options.
2481 2011-09-19 Alexandre Oliva <aoliva@redhat.com>
2483 * gcc-interface/decl.c (annotate_value): Look up expression for
2484 insertion in the cache at the end.
2486 2011-09-19 Arnaud Charlet <charlet@adacore.com>
2488 * gcc-interface/Make-lang.in: Update dependencies.
2490 2011-09-19 Steve Baird <baird@adacore.com>
2492 * snames.ads-tmpl: Move declaration of Name_Annotate into range of
2493 configuration pragma names so that Is_Configuration_Pragma_Name
2494 will return True for Name_Annotate. Make corresponding change in
2495 Pragma_Id enumeration type. This is needed to allow an Annotate
2496 pragma to occur in a configuration pragma file (typically,
2498 * gnat_ugn.texi: Add Annotate to the list of configuration pragmas.
2499 * gnat_rm.texi: Note that pragma Annotate may be used as a
2500 configuration pragma.
2502 2011-09-19 Ed Schonberg <schonberg@adacore.com>
2504 * a-cbmutr.adb, a-cbmutr.ads, a-cimutr.adb, a-cimutr.ads,
2505 a-comutr.adb, a-comutr.ads: Add iterator machinery for multiway trees.
2507 2011-09-19 Yannick Moy <moy@adacore.com>
2509 * exp_alfa.adb, exp_alfa.ads (Expand_Alfa_N_In): New function
2510 for expansion of set membership.
2511 (Expand_Alfa): Call expansion for N_In and N_Not_In nodes.
2512 * exp_ch4.adb, exp_ch4.ads (Expand_Set_Membership): Make procedure
2513 visible for use in Alfa expansion.
2514 * sem_ch5.adb (Analyze_Iterator_Specification): Introduce loop
2515 variable in Alfa mode.
2517 2011-09-19 Thomas Quinot <quinot@adacore.com>
2519 * s-osinte-darwin.ads: Change SIGADAABRT on Darwin to SIGABRT.
2521 2011-09-19 Thomas Quinot <quinot@adacore.com>
2523 * exp_ch9.adb: Minor reformatting.
2525 2011-09-19 Hristian Kirtchev <kirtchev@adacore.com>
2527 * freeze.adb (Build_Renamed_Body): Generic subprograms
2528 instantiations cannot be poperly inlined by the compiler, do
2529 not set the Body_To_Inline attribute in such cases.
2530 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Inherit all
2531 inlining-related flags from the generic subprogram declaration.
2533 2011-09-19 Thomas Quinot <quinot@adacore.com>
2535 * exp_dist.adb, rtsfind.ads, sem_util.adb, sem_util.ads
2536 (Build_Stub_Type): Remove, instead copy components from
2537 System.Partition_Interface.RACW_Stub_Type.
2538 (RPC_Receiver_Decl): Remainder of code from old Build_Stub_Type routine.
2539 (Copy_Component_List): New subprogram.
2541 2011-09-19 Yannick Moy <moy@adacore.com>
2543 * lib-xref.adb (Generate_Reference): Ignore references to
2544 constants in Standard.
2546 2011-09-19 Robert Dewar <dewar@adacore.com>
2548 * err_vars.ads, errout.ads: Minor reformatting.
2550 2011-09-19 Robert Dewar <dewar@adacore.com>
2552 * aspects.ads (Impl_Defined_Aspects): New array
2553 * lib-writ.adb (No_Dependences): New name for No_Dependence
2554 * restrict.adb (No_Dependences): New name for No_Dependence
2555 (Check_Restriction_No_Specification_Of_Aspect): New
2557 (Set_Restriction_No_Specification_Of_Aspect): New procedure
2558 (Restricted_Profile_Result): New variable
2559 (No_Specification_Of_Aspects): New variable
2560 (No_Specification_Of_Aspect_Warning): New variable
2561 * restrict.ads (No_Dependences): New name for No_Dependence
2562 (Check_Restriction_No_Specification_Of_Aspect): New procedure
2563 (Set_Restriction_No_Specification_Of_Aspect): New procedure
2564 * s-rident.ads: Add restriction
2565 No_Implementation_Aspect_Specifications, this is also added to
2566 the No_Implementation_Extensions profile.
2567 * sem_ch13.adb (Analyze_Aspect_Specifications): Check
2568 No_Implementation_Defined_Aspects
2569 (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
2570 * sem_prag.adb (Analyze_Aspect_Specifications): Check
2571 No_Implementation_Aspects
2572 (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
2573 * snames.ads-tmpl (Name_No_Specification_Of_Aspect): New name
2575 2011-09-19 Yannick Moy <moy@adacore.com>
2577 * lib-xref.adb (Generate_Reference): Take into account multiple
2578 renamings for Alfa refs.
2580 2011-09-19 Thomas Quinot <quinot@adacore.com>
2582 * g-socthi-mingw.adb: Minor reformatting.
2584 2011-09-19 Yannick Moy <moy@adacore.com>
2586 * gnat1drv.adb (Adjust_Global_Switches): Set tagged type
2587 expansion to False in mode Alfa
2589 2011-09-19 Pascal Obry <obry@adacore.com>
2591 * mingw32.h: Remove obsolete code needed for old versions
2594 2011-09-19 Robert Dewar <dewar@adacore.com>
2596 * errout.ads: Minor reformatting.
2598 2011-09-19 Ed Schonberg <schonberg@adacore.com>
2600 * sem_ch6.adb (Analyze_Expression_Function): When the expression
2601 function is transformed into a declaration and a body, insert
2602 body at the end of the declarative part, to prevent premature
2603 freeze actions, and preserve original specification in the
2604 subprogram declaration.
2606 2011-09-19 Vincent Celier <celier@adacore.com>
2608 * projects.texi: Minor editing.
2610 2011-09-19 Robert Dewar <dewar@adacore.com>
2612 * sem_aggr.adb, lib-writ.ads, s-restri.ads, sem_ch6.adb,
2613 exp_aggr.adb: Minor reformatting.
2615 2011-09-19 Yannick Moy <moy@adacore.com>
2617 * lib-xref.adb (Generate_Reference): Change entity referenced
2618 to underlying object if any, or else reference to the HEAP.
2620 2011-09-15 Arnaud Charlet <charlet@adacore.com>
2622 * gcc-interface/Make-lang.in: Update dependencies.
2624 2011-09-15 Robert Dewar <dewar@adacore.com>
2626 * tree_io.ads: Minor reformatting.
2627 * a-intnam.ads: Fix bad header.
2629 2011-09-15 Thomas Quinot <quinot@adacore.com>
2631 * a-exexpr-gcc.adb: Minor reformatting.
2633 2011-09-15 Yannick Moy <moy@adacore.com>
2635 * sem_ch6.adb: Propagate information that an expression function comes
2636 from source (otherwise references to this entity are not stored).
2638 2011-09-15 Robert Dewar <dewar@adacore.com>
2640 * a-cdlili.adb, a-coinve.adb, a-stzunb-shared.ads, a-suezst.adb,
2641 a-suenco.adb, a-stwiun-shared.ads, a-cobove.adb, a-convec.adb,
2642 a-btgbso.adb, a-cbdlli.adb, a-suewst.adb: Minor reformatting.
2644 2011-09-15 Ed Schonberg <schonberg@adacore.com>
2646 * sem_ch6.adb (Analyze_Expression_Function): Code cleanup:
2647 if the expression function is not a completion, create a
2648 new specification for the generated declaration, and keep the
2649 original specification in the generated body. Shorter code also
2650 ensures that proper warnings are generated for unused formals
2653 2011-09-15 Sergey Rybin <rybin@adacore.com>
2655 * tree_io.ads: Update ASIS_Version_Number because of the changes
2656 in the tree structures for expression functions.
2658 2011-09-15 Arnaud Charlet <charlet@adacore.com>
2660 * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
2661 s-osinte-hpux.ads, s-osinte-lynxos.ads, s-osinte-solaris-posix.ads,
2662 s-taprop-posix.adb (CLOCK_MONOTONIC): New constant.
2663 (CLOCK_REALTIME): Fix wrong value on some OSes.
2664 * s-taprop-posix.adb (Monotonic_Clock): Use CLOCK_MONOTONIC.
2666 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
2668 * gcc-interface/utils.c (maybe_unconstrained_array): In the reference
2669 to unconstrained array case, deal with each branch of a COND_EXPR.
2670 * gcc-interface/utils2.c (build_allocator): Deal with each branch of
2671 a COND_EXPR in the initializer, if present.
2673 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
2675 * gcc-interface/decl.c (maybe_pad_type): Do not try to change the form
2676 of an addressable type.
2677 * gcc-interface/trans.c (gnat_gimplify_expr) <VIEW_CONVERT_EXPR>: New.
2678 Deal with those cases for which creating a temporary is mandatory.
2680 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
2682 * gcc-interface/trans.c (call_to_gnu): Use local variable. Make sure
2683 this is a real formal parameter before testing whether it is by ref.
2685 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
2687 * gcc-interface/gigi.h (build_call_0_expr): Delete.
2688 (build_call_1_expr): Likewise.
2689 (build_call_2_expr): Likewise.
2690 (build_call_n_expr): New prototype.
2691 * gcc-interface/decl.c (gnat_to_gnu_entity): Use build_call_n_expr.
2692 * gcc-interface/trans.c (establish_gnat_vms_condition_handler): Ditto.
2693 (Handled_Sequence_Of_Statements_to_gnu): Likewise.
2694 (Exception_Handler_to_gnu_zcx): Likewise.
2695 (gnat_to_gnu): Likewise.
2696 (build_binary_op_trapv): Likewise.
2697 * gcc-interface/utils2.c (build_call_0_expr): Delete.
2698 (build_call_1_expr): Likewise.
2699 (build_call_2_expr): Likewise.
2700 (build_call_n_expr): New function.
2701 (build_call_raise): Use build_call_n_expr.
2702 (build_call_raise_range): Likewise.
2703 (build_call_raise_column): Likewise.
2704 (build_call_alloc_dealloc_proc): Likewise.
2705 (maybe_wrap_malloc): Likewise.
2706 (maybe_wrap_free): Likewise.
2708 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
2710 * gcc-interface/trans.c (build_return_expr): Use void_type_node for
2712 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Assert that
2713 the result type is null if ENABLE_CHECKING. Set operation_type at the
2714 end unconditionally if not set in the previous cases.
2715 Use build2 and void_type_node for MODIFY_EXPR.
2716 (build_allocator): Use NULL_TREE for MODIFY_EXPR.
2718 2011-09-08 Eric Botcazou <ebotcazou@adacore.com>
2720 * gcc-interface/utils.c (unchecked_convert): Use a field of the right
2721 precision when converting to or from an integral type whose precision
2722 is not equal to its size.
2724 2011-09-08 Iain Sandoe <iains@gcc.gnu.org>
2726 * traceback.c (Darwin) USE_GCC_UNWINDER for Darwin versions >= 8.
2728 2011-09-07 Iain Sandoe <iains@gcc.gnu.org>
2730 * gcc-interface/Makefile.in (darwin): Provide powerpc64 system
2732 * system-darwin-ppc64.ads: New file.
2734 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
2736 * gcc-interface/Makefile.in (gnatlib-shared-darwin): Remove
2739 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
2741 * gcc-interface/Makefile.in (darwin, SO_OPTS): Provide architecture
2742 size switches to the link phase for shared libs.
2744 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
2746 * gcc-interface/Makefile.in (x86_64 darwin arch): Adjust
2747 LIBGNAT_TARGET_PAIRS for x86 and x86_64 variants.
2749 2011-09-06 Arnaud Charlet <charlet@adacore.com>
2751 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in
2752 (gnattools, regnattools, cross-gnattools, canadian-gnattools,
2753 gnatlib, gnatlib-sjlj, gnatlib-zcx, gnatlib-shared, gnatlib_and_tools):
2755 (TOOLS_FLAGS_TO_PASS): New.
2756 (../stamp-tools): Reintroduce, to avoid merge conflicts.
2758 2011-09-06 Robert Dewar <dewar@adacore.com>
2760 * sem_ch10.adb, impunit.ads, impunit.adb (Not_Impl_Defined_Unit): New
2761 name for Is_RM_Defined_Unit. Also several fixes to this unit.
2763 2011-09-06 Robert Dewar <dewar@adacore.com>
2765 * impunit.ads, impunit.adb (Is_RM_Defined_Unit): New function.
2766 * s-rident.ads: New restriction No_Implementation_Units
2767 (this restriction is also part of the profile
2768 No_Implementation_Extensions)
2769 * sem_ch10.adb (Analyze_With_Clause): Add check for
2770 No_Implementation_Units restriction.
2772 2011-09-06 Jerome Guitton <guitton@adacore.com>
2774 * sysdep.c (__gnat_get_task_options): Disable VX_SPE_TASK
2777 2011-09-06 Thomas Quinot <quinot@adacore.com>
2779 * s-solita.adb: Minor reformatting.
2781 2011-09-06 Ed Schonberg <schonberg@adacore.com>
2783 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The body that
2784 is a rewriting of an expression function does not freeze previous
2787 2011-09-06 Robert Dewar <dewar@adacore.com>
2789 * impunit.adb (Is_Known_Unit): Fix bad handling of Ada 2012 case
2791 2011-09-06 Tristan Gingold <gingold@adacore.com>
2793 * gcc-interface/Makefile.in: Handle e500v2-wrs-vxworksae like
2794 powerpc-wrs-vxworksae.
2796 2011-09-06 Thomas Quinot <quinot@adacore.com>
2798 * s-os_lib.ads (Spawn): Minor documentation clarification,
2799 Success is True for a zero exit status.
2801 2011-09-06 Ed Schonberg <schonberg@adacore.com>
2803 * sem_ch5.adb: Add message for common iterator error.
2805 2011-09-06 Ed Schonberg <schonberg@adacore.com>
2807 * exp_ch3.adb (Build_Initialization_Call): If the target is a
2808 selected component discriminated by a current instance, replace
2809 the constraint with a reference to the target object, regardless
2810 of whether the context is an init_proc.
2812 2011-09-06 Robert Dewar <dewar@adacore.com>
2814 * exp_attr.adb: Descriptor_Size is never static.
2816 2011-09-06 Robert Dewar <dewar@adacore.com>
2818 * gnat_ugn.texi: Add documentation for LSLOC metric in gnatmetric
2820 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2822 * gnat_rm.texi: Clarify that attribute Descriptor_Size is
2825 2011-09-06 Ed Schonberg <schonberg@adacore.com>
2827 * sem_res.adb (Resolve): An expression that is the body of an
2828 expression function does not freeze.
2830 2011-09-06 Matthew Heaney <heaney@adacore.com>
2832 * a-csquin.ads, a-cusyqu.adb, a-cbprqu.adb, a-cbsyqu.adb,
2833 a-cuprqu.adb: Changed copyright notice to indicate current
2836 2011-09-06 Vincent Celier <celier@adacore.com>
2838 * prj.adb: Minor spelling error fix in comment
2839 * sem_res.adb: Minor reformatting
2841 2011-09-06 Pascal Obry <obry@adacore.com>
2843 * sysdep.c (winflush_nt): Removed as not needed anymore.
2844 (winflush_95): Likewise.
2845 (winflush_init): Likewise.
2846 (winflush_function): Likewise.
2847 (getc_immediate_common): Remove call to winflush_function.
2849 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2851 * exp_attr.adb (Expand_N_Attribute_Reference): Rewrite the
2852 processing for Descriptor_Size.
2853 * gnat_rm.texi: Rephrase the wording for attribute Descriptor_Size
2854 to account for its broader usage.
2855 * sem_attr.adb (Analyze_Attribute): Change the error detection
2856 circuitry for Descriptor_Size as the attribute is now applicable
2859 2011-09-06 Robert Dewar <dewar@adacore.com>
2861 * sem_attr.adb, prj-nmsc.adb, exp_aggr.adb: Minor reformatting.
2863 2011-09-06 Ed Schonberg <schonberg@adacore.com>
2865 * lib-xref.adb (OK_To_Set_Referenced): A reference to a formal
2866 in a parameter association must not set the Referenced flag on
2868 * prj-nmsc.adb (Check_File_Naming_Schemes): Remove useless formal
2870 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2872 * gnat_rm.texi: Add a section on attribute Descriptor_Size
2874 2011-09-06 Arnaud Charlet <charlet@adacore.com>
2876 * gcc-interface/Makefile.in (common-tools, gnatmake-re,
2877 gnatlink-re): Speed up by using -j0.
2879 2011-09-06 Yannick Moy <moy@adacore.com>
2881 * sem_ch13.adb (Analyze_Aspect_Specifications): Call
2882 Set_Corresponding_Aspect when creating pragma from aspect.
2883 (Add_Predicates): Use new field Corresponding_Aspect.
2884 * sem_prag.adb (Analyze_Pragma): Make Pname hold source aspect
2885 name when present, for the purpose of issuing error messages;
2886 remove local procedure Error_Pragma_Arg_Alternate_Name.
2887 * sinfo.adb, sinfo.ads (Corresponding_Aspect): New field in
2889 (From_Dynamic_Predicate, From_Static_Predicate): Remove fields from
2892 2011-09-06 Robert Dewar <dewar@adacore.com>
2894 * checks.adb, s-except.ads, g-socket.adb: Minor reformatting.
2896 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2898 * exp_ch6.adb (Build_Heap_Allocator): Add new
2899 local variable Desig_Typ. Code and comment reformatting. Add
2900 machinery to ensure that the allocation uses a fat pointer when
2901 the type of the return object is a constrained array and the
2902 function return type is an unconstrained array.
2904 2011-09-06 Vincent Celier <celier@adacore.com>
2906 * make.adb, prj-part.adb, prj-nmsc.adb: Remove unused formal
2907 parameters in subprograms.
2909 2011-09-06 Arnaud Charlet <charlet@adacore.com>
2911 * s-taprop-mingw.adb (Finalize_TCB): Fix typo.
2913 2011-09-06 Thomas Quinot <quinot@adacore.com>
2915 * s-taprop-vxworks.adb, s-tpoaal.adb, s-tpopsp-vxworks.adb
2916 (System.Tasking.Primitive_Operations.Specific.Delete): Remove
2918 (System.Tasking.Primitive_Operations.Specific.Set): If argument
2919 is null, destroy task specific data, to make API consistent with
2920 other platforms, and thus compatible with the shared version
2922 (System.Tasking.Primitive_Operations.ATCB_Allocation.Free_ATCB):
2923 Document the above assumption.
2925 2011-09-06 Ed Schonberg <schonberg@adacore.com>
2927 * exp_ch6.adb (Expand_Inlined_Call): Fix use of uninitialized
2928 variable for type of return value when return type is
2929 unconstrained and context is an assignment.
2931 2011-09-06 Ed Schonberg <schonberg@adacore.com>
2933 * sem_ch8.adb (Check_Class_Wide_Actual): Do not generate body of
2934 class-wide operation if expansion is not enabled.
2936 2011-09-06 Eric Botcazou <ebotcazou@adacore.com>
2938 * checks.adb (Apply_Scalar_Range_Check): Deal with access
2941 2011-09-06 Yannick Moy <moy@adacore.com>
2943 * sem_ch13.adb (Analyze_Aspect_Specifications, case
2944 Aspect_Invariant): Do not issue error at this point on illegal
2945 pragma placement, as this is checked later on when analyzing
2946 the corresponding pragma.
2947 * sem_prag.adb (Error_Pragma_Arg_Alternate_Name): New procedure
2948 similar to Error_Pragma_Arg, except the source name of the
2949 aspect/pragma to use in warnings may be equal to parameter
2950 Alt_Name (Analyze_Pragma, case Pragma_Invariant): refine error
2951 message to distinguish source name of pragma/aspect, and whether
2952 the illegality resides in the type being public, or being private
2953 without a public declaration
2955 2011-09-06 Thomas Quinot <quinot@adacore.com>
2957 * g-socket.adb (Check_For_Fd_Set): On Windows, no need for bitmap
2958 size check (fd_set is implemented differently on that platform).
2960 2011-09-06 Thomas Quinot <quinot@adacore.com>
2962 * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
2963 s-tpoaal.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
2964 s-taprop-solaris.adb, s-taprop-irix.adb, s-taprop.ads,
2965 s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
2966 (ATCB_Allocation): New subpackage of
2967 System.Tasking.Primitive_Operations, shared across all targets
2968 with full tasking runtime.
2969 (ATCB_Allocation.New_ATCB): Moved there (from target specific
2971 (ATCB_Allocation.Free_ATCB): New subprogram. Deallocate an ATCB,
2972 taking care of establishing a local temporary ATCB if the one
2973 being deallocated is Self, to avoid a reference to the freed
2974 ATCB in Abort_Undefer.
2976 2011-09-06 Thomas Quinot <quinot@adacore.com>
2978 * s-tassta.adb, s-taskin.ads (Free_Task): If the task is not
2979 terminated, mark it for deallocation upon termination.
2980 (Terminate_Task): Call Free_Task again if the task is marked
2981 for automatic deallocation upon termination.
2983 2011-09-06 Robert Dewar <dewar@adacore.com>
2985 * a-cbprqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cusyqu.ads,
2986 a-intnam-aix.ads, a-intnam-darwin.ads, a-intnam-dummy.ads,
2987 a-intnam-freebsd.ads, a-intnam-hpux.ads, a-intnam-irix.ads,
2988 a-intnam-linux.ads, a-intnam-lynxos.ads, a-intnam-mingw.ads,
2989 a-intnam-solaris.ads, a-intnam-tru64.ads,
2990 a-intnam-vms.ads, a-intnam-vxworks.ads, a-intnam.ads, interfac.ads,
2991 cstand.adb, s-maccod.ads: Mark all entities as Implementation_Defined
2992 * einfo.ads, einfo.adb (Is_Implementation_Defined): New flag
2993 * par-prag.adb: Add dummy entry for pragma Implementation_Defined
2994 * s-rident.ads: Add new restriction No_Implementation_Identifiers
2995 Add new profile No_Implementation_Extensions
2996 * sem_prag.adb: Implement pragma Implementation_Defined Implement
2997 profile No_Implementation_Extensions
2998 * sem_util.adb: Minor reformatting (Set_Entity_With_Style_Check):
2999 Check violation of restriction No_Implementation_Identifiers
3000 * snames.ads-tmpl: Add entries for pragma Implementation_Defined
3001 Add entry for Name_No_Implementation_Extensions
3003 2011-09-06 Robert Dewar <dewar@adacore.com>
3005 * impunit.ads: Minor reformatting.
3007 2011-09-06 Robert Dewar <dewar@adacore.com>
3009 * ali.adb, sem_ch13.adb, lib-xref.adb: Minor reformatting.
3011 2011-09-06 Pascal Obry <obry@adacore.com>
3013 * s-osinte-linux.ads, s-oscons-tmplt.c: Use oscons to define sigset_t
3016 2011-09-06 Robert Dewar <dewar@adacore.com>
3018 * g-socket.adb: Minor reformatting
3020 2011-09-06 Javier Miranda <miranda@adacore.com>
3022 * ali.adb (Scan_ALI): Add missing support to load references of
3023 entities imported from other languages.
3024 * ali.ads (Xref_Record): Adding new fields to store the language and
3025 name of an imported entity.
3026 * lib-xref.adb (Output_Import_Export_Info): Fix typo
3029 2011-09-06 Ed Schonberg <schonberg@adacore.com>
3031 * sem_prag.adb (Analyze_Pragma, case Type_Invariant): A type invariant
3032 is allowed on a full type declaration if it is the completion of
3033 a private declarations.
3034 * sem_ch13.adb (Analyze_Aspect_Specifications): An invariant
3035 aspect is allowed on a full type declaration in the private part
3038 2011-09-06 Robert Dewar <dewar@adacore.com>
3040 * sem_ch8.ads: Minor reformatting
3042 2011-09-06 Thomas Quinot <quinot@adacore.com>
3044 * s-oscons-tmplt.c, g-socket.adb (GNAT.Sockets.Clear,Set,Is_Set):
3045 Guard against socket values that are not in [0;FD_SETSIZE[
3047 2011-09-06 Robert Dewar <dewar@adacore.com>
3049 * s-osinte-linux.ads, a-iteint.ads, exp_ch6.adb, s-solita.adb: Minor
3052 2011-09-06 Arnaud Charlet <charlet@adacore.com>
3054 * s-linux-alpha.ads: Minor reformatting
3055 * s-oscons-tmplt.c: Fix generated comments in s-oscons template.
3056 Use sizeof instead of corresponding C defines in s-oscons template.
3058 2011-09-06 Vadim Godunko <godunko@adacore.com>
3060 * a-convec.ads, a-iteint.ads: Minor reformatting.
3062 2011-09-06 Vincent Celier <celier@adacore.com>
3064 * projects.texi: Add menus and @node lines.
3066 2011-09-06 Ed Schonberg <schonberg@adacore.com>
3068 * exp_ch6.adb (Expand_Inlined_Call): Handle properly the case
3069 where the return type is an unconstrained array and the context
3070 is an assignment. Optimize the case when the target of the
3071 assignment is a selected component.
3073 2011-09-06 Arnaud Charlet <charlet@adacore.com>
3075 * s-solita.adb: Update comments.
3077 2011-09-06 Pascal Obry <obry@adacore.com>
3079 * s-linux.ads, s-linux-alpha.ads, s-linux-hppa.ads, s-linux-mipsel.ads,
3080 s-linux-sparc.ads: Remove hard coded and now wrong definitions.
3081 * s-oscons-tmplt.c: Add support for generating pthread related
3082 types size on GNU/Linux as done for Darwin.
3083 * s-osinte-linux.ads: Use s-oscons to define the pthread types.
3085 2011-09-06 Robert Dewar <dewar@adacore.com>
3087 * exp_ch6.adb: Fix minor typo.
3089 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
3091 * exp_ch7.adb: Remove with and use clauses for Get_Targ.
3092 (Alignment_Of): Moved to the body of Nearest_Multiple_Rounded_Up.
3093 (Double_Size_Of): Alphabetized. Update the comment on usage.
3094 (Make_Finalize_Address_Stmts): Update comments and reformat code.
3095 (Nearest_Multiple_Rounded_Up): New routine.
3096 (Size_Of): Update comment on usage. The generated expression now
3097 accounts for alignment gaps by rounding the size of the type to the
3098 nearest multiple rounded up of the type's alignment.
3100 2011-09-06 Robert Dewar <dewar@adacore.com>
3102 * exp_ch7.adb, g-comlin.adb: Minor reformatting.
3104 2011-09-06 Steve Baird <baird@adacore.com>
3106 * exp_ch4.adb (Expand_Allocator_Expression): Look through
3107 derived subprograms in checking for presence of an
3108 Extra_Accessibility_Of_Result formal parameter.
3109 * exp_ch6.adb (Expand_Call): Look through derived subprograms in
3110 checking for presence of an Extra_Accessibility_Of_Result formal
3112 (Expand_Call.Add_Actual_Parameter): Fix a bug in the
3113 case where the Parameter_Associatiations attribute is already set,
3114 but set to an empty list.
3115 (Needs_Result_Accessibility_Level):
3116 Unconditionally return False. This is a temporary
3117 change, disabling the Extra_Accessibility_Of_Result
3119 (Expand_Simple_Function_Return): Check for
3120 Extra_Accessibility_Of_Result parameter's presence instead of
3121 testing Ada_Version when generating a runtime accessibility
3122 check which makes use of the parameter.
3124 2011-09-06 Ed Schonberg <schonberg@adacore.com>
3126 * exp_ch4.adb (Expand_N_Case_Expression): Actions created for the
3127 expression in a given case alternative must be attached to the
3128 statement list of the ccrresponding case statement alternative
3129 They cannot be propagated ahead of the case statement, because
3130 the validity of the expression that generated the action may
3131 hold only for that alternative.
3133 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
3135 * exp_ch7.adb: Remove with and use clauses for Get_Targ.
3136 (Alignment_Of): Remove the code for strict alignment targets.
3137 (Double_Alignment_Of): Removed.
3138 (Double_Size_Of): New routine.
3139 (Make_Finalize_Address_Stmts): Change the
3140 calculation of the dope's size. Update relevant comments.
3141 (Size_Of): New routine.
3143 2011-09-06 Steve Baird <baird@adacore.com>
3145 * einfo.ads (Extra_Accessibility): Update associated comment to use
3146 the term "present" correctly ("present" just means that it is not
3147 an error to query the value of the attribute - it does not imply
3148 that the value must be non-null).
3149 (Extra_Constrained): Ditto.
3150 (Is_Visible_Formal): Ditto.
3151 (Extra_Accessibility_Of_Result) Ditto; also add Inline pragma.
3152 (Set_Extra_Accessibility_Of_Result): Add Inline pragma.
3153 * exp_ch4.adb (Expand_Allocator_Expression): Improve a comment.
3154 * exp_ch6.adb (Expand_Call): The callee may require an
3155 Extra_Accessibility_Of_Result actual parameter even if Ada_Version
3156 < Ada_2012. This can occur if the callee is exported from a Gnat
3157 runtimes unit. Also improve a comment.
3159 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
3161 * exp_ch7.adb: Add with and use clauses for Get_Targ.
3162 (Alignment_Of): Rename formal parameter Some_Typ
3163 to Typ, update related comment. Use the allocator alignment on
3164 strict alignment targets such as SPARC.
3165 (Double_Alignment_Of): Rename formal parameter Some_Typ to Typ, update
3168 2011-09-06 Gary Dismukes <dismukes@adacore.com>
3170 * sem_ch9.adb (Check_Interfaces): Test
3171 Is_Limited_Type rather than Is_Limited_Record when checking that
3172 the partial view of a synchronized full view must be limited.
3174 2011-09-06 Emmanuel Briot <briot@adacore.com>
3176 * g-comlin.adb (Free): Fix memory leak.
3178 2011-09-06 Robert Dewar <dewar@adacore.com>
3180 * sem_util.adb, exp_ch6.adb: Minor reformatting and code reorganization.
3182 2011-09-06 Steve Baird <baird@adacore.com>
3184 * einfo.ads (Extra_Accessibility_Of_Result): New function; in the
3185 (Ada2012) cases described in AI05-0234 where the accessibility
3186 level of a function result is "determined by the point of
3187 call", an implicit parameter representing that accessibility
3188 level is passed in. Extra_Accessibilty_Of_Result yields this
3189 additional formal parameter. Extra_Accessibility_Of_Result
3190 is analogous to the existing Extra_Accessibility
3191 function used in the implementation of access parameters.
3192 (Set_Extra_Accessibility_Of_Result): New procedure; sets
3193 Extra_Accessibility_Of_Result attribute.
3194 * einfo.adb (Extra_Accessibility_Of_Result): New function.
3195 (Set_Extra_Accessibility_Of_Result): New procedure.
3196 (Write_Field19_Name): Display Extra_Accessibilty_Of_Result attribute.
3197 * sem_util.adb (Dynamic_Accessibility_Level): Set Etype of
3198 an accessibility level literal to Natural; introduce a nested
3199 function, Make_Level_Literal, to do this.
3200 * exp_ch6.ads (Needs_Result_Accessibility_Level): New function;
3201 determines whether a given function (or access-to-function
3202 type) needs to have an implicitly-declared accessibility-level
3203 parameter added to its profile.
3204 (Add_Extra_Actual_To_Call): Export an existing procedure which was
3205 previously declared in the body of Exp_Ch6.
3206 * exp_ch6.adb (Add_Extra_Actual_To_Call): Export declaration by moving
3208 (Has_Unconstrained_Access_Discriminants): New Function; a
3209 predicate on subtype entities which returns True if the given
3210 subtype is unconstrained and has one or more access discriminants.
3211 (Expand_Call): When expanding a call to a function which takes an
3212 Extra_Accessibility_Of_Result parameter, pass in the appropriate
3213 actual parameter value. In the case of a function call which is
3214 used to initialize an allocator, this may not be possible because
3215 the Etype of the allocator may not have been set yet. In this
3216 case, we defer passing in the parameter and handle it later in
3217 Expand_Allocator_Expression.
3218 (Expand_Simple_Function_Return): When returning from a function which
3219 returns an unconstrained subtype having at least one access
3220 discriminant, generate the accessibility check needed to ensure that
3221 the function result will not outlive any objects designated by its
3223 (Needs_Result_Accessibility_Level): New function; see exp_ch6.ads
3225 * exp_ch4.adb (Expand_Allocator_Expression): When a function call
3226 is used to initialize an allocator, we may need to pass in "the
3227 accessibility level determined by the point of call" (AI05-0234)
3228 to the function. Expand_Call, where such actual parameters are
3229 usually generated, is too early in this case because the Etype of
3230 the allocator (which is used in determining the level to be passed
3231 in) may not have been set yet when Expand_Call executes. Instead,
3232 we generate code to pass in the appropriate actual parameter
3233 in Expand_Allocator_Expression.
3234 * sem_ch6.adb (Create_Extra_Formals): Create
3235 the new Extra_Accessibility_Of_Result formal if
3236 Needs_Result_Accessibility_Level returns True. This includes the
3237 introduction of a nested procedure, Check_Against_Result_Level.
3239 2011-09-06 Arnaud Charlet <charlet@adacore.com>
3241 * gcc-interface/Makefile.in (X86_TARGET_PAIRS): Remove duplicate
3244 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
3246 * s-finmas.adb (Set_Finalize_Address): Explain the reason
3247 for the synchronization. Move the test for null from
3248 s-stposu.Allocate_Any_Controlled to this routine since the check
3249 needs to be protected too.
3250 (Set_Heterogeneous_Finalize_Address): Explain the reason for the
3251 synchronization code.
3252 * s-finmas.ads (Set_Heterogeneous_Finalize_Address): Add comment
3253 explaining the context in which this routine is used.
3254 * s-stposu.adb (Allocate_Any_Controlled): Move the test for null
3255 to s-finmas.Set_Finalize_Address.
3257 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3259 * einfo.ads: Document that itypes have no parent field.
3261 2011-09-05 Robert Dewar <dewar@adacore.com>
3263 * rtsfind.adb (Check_CRT): Check for overloaded entity
3264 * rtsfind.ads: Document that entities to be found by rtsfind
3265 cannot be overloaded
3266 * s-taenca.adb, s-tasren.adb, s-tpobop.adb, s-tpoben.ads, s-tpoben.adb
3267 (Lock_Entries_With_Status): New name for Lock_Entries with two
3268 arguments (changed to meet rtsfind no overloading rule).
3270 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
3272 * s-finmas.adb (Set_Finalize_Address (Address,
3273 Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
3274 (Set_Finalize_Address (in out Finalization_Master,
3275 Finalize_Address_Ptr): Add synchronization code.
3276 * s-finmas.ads (Set_Finalize_Address (Address,
3277 Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
3278 * s-stposu.adb (Allocate_Any_Controlled): Update the call to
3279 Set_Finalize_Address for the heterogeneous case.
3281 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3283 * sem_ch3.adb: Undo previous change, not suitable after all.
3285 2011-09-05 Robert Dewar <dewar@adacore.com>
3287 * einfo.ads: Minor comment clarification.
3289 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
3291 * exp_ch6.adb (Move_Activation_Chain): Rewritten. The routine
3292 no longer needs to search through the entities of the return
3293 statement scope to find the _chain.
3294 * sem_ch5.adb: Add with and use clauses for Exp_Ch6 and Sem_Ch6.
3295 (Analyze_Block_Statement): Add local variable
3296 Is_BIP_Return_Statement. Add machinery to install all entities
3297 produced by the expansion of the return object declaration.
3298 (Install_Return_Entities): New routine.
3299 * sem_ch6.ads, sem_ch6.adb (Install_Entity): Moved from body to spec.
3301 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3303 * sem_ch10.adb (Analyze_Context): Apply simple fixup if context
3304 of subunit is incomplete.
3305 (Analyze_Proper_Body): If parent spec is not available, do not
3308 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3310 * sem_disp.adb (Find_Controlling_Arg): Add checks for
3311 interface type conversions, that are expanded into dereferences.
3313 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
3315 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
3316 Examine the parameter and return profile of a subprogram and swap
3317 any incomplete types coming from a limited context with their
3318 corresponding non-limited views.
3319 (Exchange_Limited_Views): New routine.
3321 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3323 * sem_ch3.adb (Prepare_Private_Subtype_Completion): Set parent
3324 of internal entity to the subtype declaration, so that when
3325 entities are subsequently exchanged in a package body, the tree
3326 remains properly formatted for ASIS.
3328 2011-09-05 Johannes Kanig <kanig@adacore.com>
3330 * g-comlin.adb (Set_Usage): Additional optional argument to set help
3332 (Display_Help): display the user given help message, if available.
3334 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3336 * sem_ch3.adb (OK_For_Limited_Init_In_05): The expression
3337 is legal if the original node is an identifier that is a
3338 parameterless function call.
3340 2011-09-05 Pascal Obry <obry@adacore.com>
3342 * prj-nmsc.adb: Minor reformatting.
3343 Add support for standalone aggregate library.
3344 (Check_Stand_Alone_Library): Handle standalone aggregate library.
3345 * projects.texi: Fix documentation for aggregate library projects.
3347 2011-09-05 Robert Dewar <dewar@adacore.com>
3349 * sem_ch6.adb: Minor reformatting.
3351 2011-09-05 Matthew Gingell <gingell@adacore.com>
3353 * s-tassta.adb (Task_Wrapper): Ensure that we don't try to write the
3354 stack guard page on PPC Linux. This patch ensures the 64K guard page at
3355 the bottom of the stack is not overwritten.
3357 2011-09-05 Thomas Quinot <quinot@adacore.com>
3359 * exp_intr.adb, s-tasini.adb: Minor reformatting.
3361 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3363 * sem_ch3.adb (Access_Definition): If an access type declaration
3364 appears in a child unit, the scope of whatever anonymous type
3365 may be generated is the child unit itself.
3367 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3369 * sem_ch6.adb (Analyze_Expression_Function): Do not set
3370 Comes_From_Source on rewritten body.
3371 (Analyze_Subprogram_Body_Helper): Check that the original node for
3372 the body comes from source, when determining whether expansion
3373 of a protected operation is needed.
3375 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3377 * exp_aggr.adb (Replace_Type): If the target of the assignment is
3378 a selected component and the right-hand side is a self-referential
3379 access, the proper prefix of the rewritten attribute is a copy
3380 of the left-hand side, not of its prefix.
3382 2011-09-05 Robert Dewar <dewar@adacore.com>
3384 * sem_ch5.adb: Minor reformatting.
3385 * sem_ch3.adb: Minor code clean up.
3387 2011-09-05 Jose Ruiz <ruiz@adacore.com>
3389 * exp_ch9.adb (Make_Initialize_Protection): The fact that
3390 restriction No_Dynamic_Attachment is in effect or not should
3391 not influence the default priority associated to a protected
3392 object. With this change, when the restriction is in effect (as
3393 is the case for the Ravenscar profile) the default priority of
3394 a protected object with an interrupt handler is in the range of
3395 interrupt priorities (Default_Interrupt_Priority) as required
3398 2011-09-05 Arnaud Charlet <charlet@adacore.com>
3400 * a-iteint.ads: Fix header.
3402 2011-09-05 Vincent Celier <celier@adacore.com>
3404 * prj-conf.adb (Do_Autoconf): Make sure Obj_Dir always ends
3405 with a directory separator to avoid output such as:
3406 "/path/to/objauto.cgpr" has been deleted.
3408 2011-09-05 Robert Dewar <dewar@adacore.com>
3410 * sem_ch3.adb: Minor reformatting.
3412 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3414 * sem_ch5.adb: Better error message.
3416 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
3418 * exp_aggr.adb: Add with and use clause for Exp_Ch6.
3419 (Expand_Array_Aggregate): Detect a special case of an aggregate
3420 which contains tasks in the context of an unexpanded return
3421 statement of a build-in-place function.
3422 * exp_ch6.adb: Add with and use clause for Exp_Aggr.
3423 (Expand_N_Extended_Return_Statement): Detect a delayed aggregate
3424 which contains tasks and expand it now that the original simple
3425 return statement has been rewritten.
3426 * exp_ch9.adb (Build_Activation_Chain_Entity): Code
3427 reformatting. Do not create a chain for an extended return
3428 statement if one is already available.
3429 (Has_Activation_Chain): New routine.
3431 2011-09-05 Marc Sango <sango@adacore.com>
3433 * sem_ch3.adb (Analyze_Object_Declaration): Remove
3434 the wrong test and add the correct test to detect the violation
3435 of illegal use of unconstrained string type in SPARK mode.
3437 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3439 * sem_ch5.adb (Analyze_Iteration_Specification): Improve error
3440 message on an iterator over an array.
3442 2011-09-05 Robert Dewar <dewar@adacore.com>
3444 * lib-xref-alfa.adb: Minor reformatting.
3446 2011-09-05 Robert Dewar <dewar@adacore.com>
3448 * sem_ch3.adb, sem_res.adb, par.adb, par-ch6.adb, g-comlin.adb,
3449 exp_ch6.adb, lib-xref-alfa.adb: Minor reformatting.
3451 2011-09-05 Gary Dismukes <dismukes@adacore.com>
3453 * exp_ch7.adb, exp_ch6.adb: Minor reformatting.
3455 2011-09-05 Johannes Kanig <kanig@adacore.com>
3457 * lib-xref-alfa.adb: Update comments.
3459 2011-09-05 Thomas Quinot <quinot@adacore.com>
3461 * sem_res.adb: Minor reformatting
3463 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3465 * exp_ch6.adb (Build_In_Place_Formal): If extra formals are not
3466 present, create them now. Needed in case the return type was
3467 a limited view in the function declaration.
3468 (Make_Build_In_Place_Call_In_Allocator): If return type contains
3469 tasks, build the activation chain for it. Pass a reference to
3470 the Master_Id in call to Add_Task_Actuals_To_Build_In_Place call.
3471 * exp_ch7.adb (Make_Set_Finalize_Address_Call): Clean up interface
3472 with build_in_place calls.
3473 * sem_ch9.adb (Analyze_Task_Type_Declaration): If partial view was
3474 incomplete, inatialize its Corresponding_Record_Type component.
3475 * sem_ch10.adb (Build_Chain): Initialize Private_Dependents field
3478 2011-09-05 Johannes Kanig <kanig@adacore.com>
3480 * lib-xref-alfa.adb (Is_Alfa_Reference): Filter constants from effect
3483 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3485 * par-ch6.adb (P_Subprogram): In Ada2012 mode, if the subprogram
3486 appears within a package specification and the token after "IS"
3487 is not a parenthesis, assume that this is an unparenthesized
3488 expression function, even if the token appears in a line by
3490 * par.adb: Clarify use of Labl field of scope stack in error
3493 2011-09-05 Bob Duff <duff@adacore.com>
3495 * sem_res.adb (Resolve_Intrinsic_Operator): Use unchecked
3496 conversions instead of normal type conversions in all cases where a
3497 type conversion would be illegal. In particular, use unchecked
3498 conversions when the operand types are private.
3500 2011-09-05 Johannes Kanig <kanig@adacore.com>
3502 * lib-xref-alfa.adb (Is_Alfa_Reference): Never declare effects on
3503 objects of task type or protected type.
3505 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3507 * sem_ch6.adb (Analyze_Expression_Function): If the expression
3508 function comes from source, indicate that so does its rewriting,
3509 so it is compatible with any subsequent expansion of the
3510 subprogram body (e.g. when it is a protected operation).
3511 * sem_ch4.adb: minor reformatting
3513 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
3515 * lib.adb (Check_Same_Extended_Unit): Comment rewriting. Use
3516 Get_Source_Unit rather than Get_Code_Unit as instantiation unfolding
3517 may lead to wrong ancestor package in the case of instantiated subunit
3518 bodies. If a subunit is instantiated, follow the chain of instantiations
3519 rather than the stub structure.
3521 2011-09-02 Robert Dewar <dewar@adacore.com>
3523 * sem_ch4.adb, sem_ch6.adb: Minor reformatting.
3524 * gcc-interface/Make-lang.in: Update dependencies.
3526 2011-09-02 Marc Sango <sango@adacore.com>
3528 * sem_ch3.adb (Analyze_Object_Declaration): Change
3529 comment and add additional check to differentiate constant of
3530 type string from others unconstrained type.
3532 2011-09-02 Ed Schonberg <schonberg@adacore.com>
3534 * sinfo.ads, sinfo.adb: New semantic attribute Premature_Use,
3535 present in incomplete type declarations to refine the error
3536 message the full declaration is in the same unit.
3537 * sem_ch4.adb (Analyze_Selected_Component): If the prefix is of
3538 an incomplete type, set the Premature_Use for additional message.
3539 * sem_ch3.adb (Find_Type_Name): If partial view is incomplete
3540 and Premature_Use is set, place additional information at the
3541 point of premature use.
3543 2011-09-02 Bob Duff <duff@adacore.com>
3545 * sem_ch6.adb: (Check_Post_State): Suppress warning
3546 "postcondition refers only to pre-state" when the expression has not
3547 yet been analyzed, because it causes false alarms. This can happen when
3548 the postcondition contains a quantified expression, because those are
3549 analyzed later. This is a temporary/partial fix.
3550 (Process_Post_Conditions): Minor: change wording of warning.
3552 2011-09-02 Marc Sango <sango@adacore.com>
3554 * sem_ch3.adb (Analyze_Object_Declaration): Detect the violation of
3555 illegal use of unconstrained string type in SPARK mode.
3556 * sem_res.adb (Analyze_Operator_Symbol): Set the
3557 right place where the string operand of concatenation should be
3558 violate in SPARK mode.
3560 2011-09-02 Robert Dewar <dewar@adacore.com>
3562 * sem_prag.adb, sem_util.adb, sem_ch6.adb, prj-nmsc.adb,
3563 exp_ch3.adb: Minor reformatting.
3565 2011-09-02 Vincent Celier <celier@adacore.com>
3567 * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Declare "gcc"
3568 as the compiler driver so Is_Compilable returns True for sources.
3569 * prj-nmsc.adb (Override_Kind): When Kind is Sep, set the source
3572 2011-09-02 Ed Schonberg <schonberg@adacore.com>
3574 * sem_prag.adb (Analyze_PPC_In_Decl_Part): for a class-wide
3575 condition, a reference to a controlling formal must be interpreted
3576 as having the class-wide type (or an access to such) so that the
3577 inherited condition can be properly applied to any overriding
3578 operation (see ARM12 6.6.1 (7)).
3580 2011-09-02 Tristan Gingold <gingold@adacore.com>
3582 * init.c (__gnat_is_vms_v7): Fix case and add prototype
3585 2011-09-02 Javier Miranda <miranda@adacore.com>
3587 * exp_ch3.adb (Expand_N_Object_Declaration): Do not copy the
3588 initializing expression of a class-wide interface object declaration
3589 if its type is limited.
3591 2011-09-02 Johannes Kanig <kanig@adacore.com>
3593 * sem_util.adb (Unique_Name): To obtain a unique name for enumeration
3594 literals, take into account the type name; the type is *not*
3595 the scope for an enumeration literal.
3597 2011-09-02 Ed Schonberg <schonberg@adacore.com>
3599 * sem_ch6.adb (Check_Overriding_Indicator): add special check
3600 to reject an overriding indicator on a user-defined Adjust
3601 subprogram for a limited controlled type.
3603 2011-09-02 Ed Schonberg <schonberg@adacore.com>
3605 * sem_res.adb (Resolve_Actuals): add missing call to Resolve
3606 for an actual that is a function call returning an unconstrained
3607 limited controlled type.
3609 2011-09-02 Tristan Gingold <gingold@adacore.com>
3611 * g-socthi-vms.adb (c_sendmsg, c_recvmsg): Use unpacked msg if on vms 7
3613 2011-09-02 Johannes Kanig <kanig@adacore.com>
3615 * alfa.ads (Name_Of_Heap_Variable): Change value of the HEAP variable
3616 from "HEAP" to __HEAP Change comment that refers to that variable
3617 * put_alfa.adb: Change comment that refers to that variable
3619 2011-09-02 Robert Dewar <dewar@adacore.com>
3621 * exp_ch4.adb, exp_ch6.adb, prj-nmsc.adb: Minor reformatting.
3623 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
3625 * exp_util.adb (Extract_Renamed_Object): Renamed to
3626 Find_Renamed_Object. This routine has been reimplemented and now uses
3627 tree traversal to locate a renamed object.
3628 (Is_Aliased): Replace call to Extract_Renamed_Object with
3629 Find_Renamed_Object.
3631 2011-09-02 Tristan Gingold <gingold@adacore.com>
3633 * init.c: (__gnat_is_vms_v7): New function.
3635 2011-09-02 Olivier Hainque <hainque@adacore.com>
3637 * tracebak.c (STOP_FRAME, ppc elf/vxworks case): Stop on frames
3638 that have a misaligned backchain, necessarily bogus.
3640 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
3642 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not create
3643 TSS routine Finalize_Address when compiling in Alfa mode.
3644 (Expand_Freeze_Record_Type): Do not create TSS routine
3645 Finalize_Address when compiling in Alfa mode.
3646 * exp_ch4.adb (Expand_Allocator_Expression): Do not produce a
3647 call to Set_Finalize_Address in Alfa mode because Finalize_Address is
3649 (Expand_N_Allocator): Do not produce a call to
3650 Set_Finalize_Address in Alfa mode because Finalize_Address is not built.
3651 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Do not
3652 produce a call to primitive Set_Finalize_Address in Alfa mode because
3653 Finalize_Address is not built.
3654 * exp_ch7.adb (Build_Finalization_Master): Do not create
3655 finalization masters in Afa mode since they are not needed.
3656 (Build_Finalizer): Do not create scope and library-level
3657 finalizers in Alfa mode since they are not needed.
3658 * exp_util.adb (Build_Allocate_Deallocate_Proc): Do not expand
3659 "new" and "free" when applied to controlled objects in Alfa mode since
3662 2011-09-02 Vincent Celier <celier@adacore.com>
3664 * prj-nmsc.db: (Check_Stand_Alone_Library): For SALs, allow
3665 only library names with the syntax of Ada identifiers, to avoid errors
3666 when compiling the binder generated files.
3667 * projects.texi: Document restriction on SAL library names
3669 2011-09-02 Thomas Quinot <quinot@adacore.com>
3671 * a-chtgbo.adb: Minor comment fix.
3673 2011-09-02 Robert Dewar <dewar@adacore.com>
3675 * lib-xref.adb: Minor reformatting
3677 2011-09-02 Vincent Celier <celier@adacore.com>
3679 * bindusg.adb, clean.adb, gnatchop.adb, gnatfind.adb, gnatlink.adb,
3680 gnatls.adb, gnatname.adb, gnatxref.adb, gprep.adb, makeusg.adb: Add
3681 --version and --help in usage.
3682 * switch.ads, switch.adb (Display_Usage_Version_And_Help): New procedure
3684 2011-09-02 Bob Duff <duff@adacore.com>
3686 * lib-xref.adb: (Hash): Avoid use of 'Mod attribute, because old
3687 compilers don't understand it.
3689 2011-09-02 Gary Dismukes <dismukes@adacore.com>
3691 * exp_attr.adb (Expand_N_Attribute_Reference): Pass the
3692 underlying subtype rather than its base type on the call to
3693 Build_Record_Or_Elementary_Input_Function, so that any
3694 constraints on a discriminated subtype will be available for
3695 doing the check required by AI05-0192.
3696 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
3697 If the prefix subtype of the 'Input attribute is a constrained
3698 discriminated subtype, then check each constrained discriminant value
3699 against the corresponding value read from the stream.
3701 2011-09-02 Yannick Moy <moy@adacore.com>
3703 * usage.adb, warnsw.adb, sem_ch6.adb, opt.ads: Disable by default
3704 warnings on suspicious contracts, and enable them with -gnatwa.
3706 2011-09-02 Robert Dewar <dewar@adacore.com>
3708 * exp_util.adb, exp_ch9.adb, sem_attr.adb, sem_ch6.adb: Minor
3711 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
3713 * exp_ch9.adb (Install_Private_Data_Declarations): Add guards
3714 which ensure that restriction No_Dynamic_Attachment has not been
3716 (Make_Initialize_Protection): Protected types with attach or
3717 interrupt handlers must not violate restriction No_Dynamic_Attachment.
3718 * exp_util.adb (Corresponding_Runtime_Package): Add a guard
3719 which ensures that restriction No_Dynamic_Attachment has not been
3721 * sem_attr.adb: (Eval_Attribute): Transform
3722 VAX_Float_Type'First and 'Last into references to
3723 the temporaries which store the corresponding bounds. The
3724 transformation is needed since the back end cannot evaluate
3725 'First and 'Last on VAX.
3726 (Is_VAX_Float): New routine.
3728 2011-09-02 Ed Schonberg <schonberg@adacore.com>
3730 * sem_ch12.adb (Analyze_Subprogram_Instantiation): If the
3731 generic unit is not intrinsic and has an explicit convention,
3732 the instance inherits it.
3734 2011-09-02 Robert Dewar <dewar@adacore.com>
3736 * prj-dect.adb, prj-env.adb, prj-nmsc.adb, prj-proc.adb, prj-tree.adb,
3737 prj.adb, prj.ads, sem_ch5.adb: Minor reformatting.
3739 2011-09-02 Thomas Quinot <quinot@adacore.com>
3741 * sem_attr.adb (Analyze_Attribute, case Unrestriced_Access):
3742 Guard against a prefix that is an N_Has_Entity but has no
3745 2011-09-02 Yannick Moy <moy@adacore.com>
3747 * lib-xref-alfa.adb (Is_Alfa_Reference): Ignore IN parameters in Alfa
3750 2011-09-02 Yannick Moy <moy@adacore.com>
3752 * opt.ads (Warn_On_Suspicious_Contract): New warning flag.
3753 * sem_ch3.adb (Analyze_Declarations): Call checker for suspicious
3755 * sem_ch6.adb, sem_ch6.ads (Check_Subprogram_Contract): New
3756 procedure looking for suspicious postconditions.
3757 * usage.adb (Usage): New options -gnatw.t and -gnatw.T.
3758 * warnsw.adb (Set_Dot_Warning_Switch): Take into account new
3759 options -gnatw.t and -gnatw.T.
3761 2011-09-02 Pascal Obry <obry@adacore.com>
3763 * prj.adb: Minor code refactoring. Move check for null project in
3765 * projects.texi: Fix minor typos.
3767 2011-09-02 Ed Schonberg <schonberg@adacore.com>
3769 * sem_ch5.adb (Analyze_Iterator_Specification): If the domain
3770 of iteration is an expression, its value must be captured in a
3771 renaming declaration, so that modification of the elements is
3772 propagated to the original container.
3774 2011-09-02 Pascal Obry <obry@adacore.com>
3776 * prj-proc.adb, prj.adb, makeutl.adb, makeutl.ads, prj-dect.adb,
3777 prj-nmsc.adb, prj-util.adb, prj-conf.adb, prj-env.adb,
3778 prj-tree.adb: Minor reformatting and style fixes.
3780 2011-09-02 Robert Dewar <dewar@adacore.com>
3782 * s-rident.ads: Add new restriction No_Implicit_Aliasing
3783 * sem_attr.adb: (Analyze_Access_Attribute): Deal with
3784 No_Implicit_Aliasing
3785 (Analyze_Attribute, case Address): ditto
3786 (Analyze_Attribute, case Unrestricted_Access): ditto
3787 * sem_util.ads, sem_util.adb: (Is_Aliased_View): Handle
3788 No_Implicit_Aliasing restriction.
3789 * gnat_rm.texi: Add documentation for No_Implicit_Aliasing
3791 2011-09-02 Ed Schonberg <schonberg@adacore.com>
3793 * exp_util.adb: (Possible_Bit_Aligned_Object): If the object
3794 is an unchecked conversion, apply test to its expression.
3796 2011-09-02 Javier Miranda <miranda@adacore.com>
3798 * sem_ch3.adb (Check_Abstract_Overriding): When
3799 traversing the chain of aliased subprograms avoid reporting a
3800 redundant error on the current entity.
3802 2011-09-02 Sergey Rybin <rybin@adacore.com>
3804 * gnat_ugn.texi: Minor clean up.
3806 2011-09-02 Bob Duff <duff@adacore.com>
3808 * s-htable.adb (Set_If_Not_Present): Use renaming
3809 instead of ":=", because the type Key is limited in the generic (even
3810 if not in the instances).
3812 2011-09-02 Robert Dewar <dewar@adacore.com>
3814 * exp_util.adb, sem_ch10.adb, sem_attr.adb, s-htable.adb,
3815 g-comlin.adb, g-comlin.ads, lib-xref-alfa.adb, lib-xref.adb: Minor
3818 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
3820 * sem_ch3.adb: (Set_Anonymous_Type): Associate the itype of an
3821 inherited component with the enclosing derived type. Code reformatting.
3823 2011-09-02 Gary Dismukes <dismukes@adacore.com>
3825 * checks.adb: (Determine_Range): Add test of OK1 to prevent the early
3826 return done when overflow checks are enabled, since comparisons against
3827 Lor and Hir should not be done when OK1 is False.
3829 2011-09-02 Gary Dismukes <dismukes@adacore.com>
3831 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
3832 Add new formal Master_Exp. When present, add that expression to the
3833 call as an extra actual.
3834 (Make_Build_In_Place_Call_In_Object_Declaration): Add variable
3835 Fmaster_Actual and in the case of a BIP call initializing a return
3836 object of an enclosing BIP function set it to a
3837 new reference to the implicit finalization master
3838 formal of the enclosing function. Fmaster_Actual is
3839 then passed to the new formal Master_Exp on the call to
3840 Add_Finalization_Master_Actual_To_Build_ In_Place_Call. Move
3841 initializations of Enclosing_Func to its declaration.
3843 2011-09-02 Thomas Quinot <quinot@adacore.com>
3845 * csets.ads: Minor reformatting
3847 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
3849 * exp_aggr.adb: (Get_Constraint_Association): Add code to retrieve
3850 the full view of a private type coming from an instantiation.
3851 * exp_ch4.adb: (Current_Anonymous_Master): Reimplement the search
3852 loop to iterate over the declarations rather than use the
3853 First_Entity / Next_Entity scheme.
3855 2011-09-02 Ed Schonberg <schonberg@adacore.com>
3857 * sem_attr.adb: (Analyze_Attribute, case 'Range): when expanding
3858 X'range (N) into X'First (N) .. X'Last (N), do not share the
3859 dimension indicator N, if present. Even though it is a static
3860 constant, its source location may be modified when printing
3861 expanded code under -gnatDL, and node sharing will lead to chaos
3862 in Sprint on large files, by generating a sloc value that does
3863 not correspond to any source file.
3865 2011-09-02 Bob Duff <duff@adacore.com>
3867 * einfo.adb: (Has_Xref_Entry): Do not call
3868 Implementation_Base_Type. Lib.Xref has been
3869 rewritten to avoid the need for it, and it was costly.
3870 * s-htable.ads,s-htable.adb: (Present,Set_If_Not_Present): New
3871 functions in support of efficient xref.
3872 * lib-xref-alfa.adb: Misc changes related to Key component of
3874 * lib-xref.adb: (Add_Entry,etc): Speed improvement.
3875 (New_Entry): Call Implementation_Base_Type, because Has_Xref_Entry
3876 no longer does. This is the one place where it is needed.
3878 2011-09-02 Johannes Kanig <kanig@adacore.com>
3880 * g-comlin.adb (Getopt): New optional argument Concatenate to have
3881 similar interface as the other Getopt function.
3883 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
3885 * exp_ch4.adb: (Expand_Allocator_Expression): Do not generate
3886 a call to Set_Finalize_Address if there is no allocator available.
3887 * exp_util.adb: (Build_Allocate_Deallocate_Proc): Account for
3888 a case of allocator expansion where the allocator is not expanded but
3889 needs a custom allocate routine. Code reformatting.
3890 (Is_Finalizable_Transient): Remove local variables Has_Rens and
3891 Ren_Obj. Code reformatting.
3892 (Is_Renamed): Renamed to Is_Aliased. Add code to detect aliasing
3893 through the use of 'reference.
3894 * sem_ch4.adb: (Analyze_Allocator): Detect allocators generated
3895 as part of build-in-place expansion. They are intentionally marked as
3896 coming from source, but their parents are not.
3898 2011-09-02 Ed Schonberg <schonberg@adacore.com>
3900 * sem_ch10.adb (Analyze_With_Clause): If the library unit
3901 is the generated subprogram declaration for a child unit body
3902 that acts as spec, use the original body in the with_clause,
3903 to prevent binding errors.
3905 2011-09-02 Vincent Celier <celier@adacore.com>
3907 * gnat_ugn.texi: Adapt documentation of -gnateInnn to new VMS
3908 qualifier /MULTI_UNIT_INDEX=
3910 2011-09-02 Johannes Kanig <kanig@adacore.com>
3912 * g-comlin.adb (Getopt): Return when switch is dealt with automatically,
3913 instead of calling the callback function
3915 2011-09-02 Robert Dewar <dewar@adacore.com>
3917 * prj-proc.adb, prj.ads, sem_util.adb, s-taprop-linux.adb,
3918 prj-nmsc.adb, prj-util.ads, prj-env.adb: Minor reformatting.
3920 2011-09-02 Vincent Celier <celier@adacore.com>
3922 * prj-nmsc.adb: (Find_Sources): When the list of sources is
3923 explicitly declared in an extending project, do not warn if a source
3924 for an inherited naming exception is not found.
3926 2011-09-02 Gary Dismukes <dismukes@adacore.com>
3928 * exp_ch6.adb: (Is_Build_In_Place_Function_Call): Return False if
3929 expansion is inactive.
3931 2011-09-02 Ed Schonberg <schonberg@adacore.com>
3933 * sem_util.adb (Note_Possible_Modification): If the entity
3934 being modified is the renaming generated for an Ada2012 iterator
3935 element, the enclosing container or array is modified as well.
3937 2011-09-02 Jose Ruiz <ruiz@adacore.com>
3939 * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB,
3940 Initialize): Define and initialize the
3941 mutex attributes and condition variable attributes locally.
3943 2011-09-02 Vincent Celier <celier@adacore.com>
3945 * prj-nmsc.adb (Check_File): Mark as Locally_Removed a naming
3946 exception replaced in an extending project.
3947 (Check_Object): No error when the other source is locally removed.
3949 2011-09-02 Yannick Moy <moy@adacore.com>
3951 * exp_ch6.adb (Is_Build_In_Place_Function_Call): in Alfa mode, allow
3954 2011-08-31 Arnaud Charlet <charlet@adacore.com>
3956 * gcc-interface/Makefile.in: Clean up handling of x86 and x86-64
3958 * gcc-interface/Make-lang.in: Update dependencies.
3960 2011-09-01 Robert Dewar <dewar@adacore.com>
3962 * sem_ch3.adb, s-taprop-linux.adb, gnatls.adb: Minor reformatting.
3964 2011-09-01 Jose Ruiz <ruiz@adacore.com>
3966 * adaint.h (__gnat_cpu_free): Fix the name of this profile.
3967 * adaint.c (__gnat_cpu_alloc, __gnat_cpu_alloc_size, __gnat_cpu_free,
3968 __gnat_cpu_zero, __gnat_cpu_set): Create version of these subprograms
3969 specific for systems where their glibc version does not define the
3970 routines to handle dynamically allocated CPU sets.
3972 2011-09-01 Vincent Celier <celier@adacore.com>
3974 * prj-proc.adb, prj.ads, prj-nmsc.adb, prj-util.adb, prj-util.ads,
3975 prj-env.adb: Implement inheritance of naming exceptions in extending
3978 2011-09-01 Romain Berrendonner <berrendo@adacore.com>
3980 * gnatls.adb: Display simple message instead of content of
3983 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
3985 * sem_ch3.adb: (Build_Derived_Record_Type) Remove the kludgy update of
3986 access discriminant and anonymous access component scopes.
3987 (Inherit_Component): Reuse the itype of an access discriminant
3988 or anonymous access component by copying it in order to set the proper
3989 scope. This is done only when the parent and the derived type
3990 are in different scopes.
3991 (Set_Anonymous_Etype): New routine.
3993 2011-09-01 Robert Dewar <dewar@adacore.com>
3995 * a-convec.adb: Minor reformatting throughout.
3997 2011-09-01 Jose Ruiz <ruiz@adacore.com>
3999 * adaint.c, adaint.h (__gnat_cpu_alloc, __gnat_cpu_alloc_size,
4000 __gnat_cpu_set_free): Create these wrappers around the CPU_ALLOC,
4001 CPU_ALLOC_SIZE and CPU_FREE linux macros.
4002 (__gnat_cpu_zero, __gnat_cpu_set): Use the CPU_ZERO_S and
4003 CPU_SET_S respectively because we are now using dynamically allocated
4004 CPU sets which are more portable across different glibc versions.
4005 * s-osinte-linux.ads (cpu_set_t_ptr, CPU_ALLOC, CPU_ALLOC_SIZE,
4006 CPU_FREE): Add this type and subprograms to be able to create cpu_set_t
4007 masks dynamically according to the number of processors in the target
4009 (CPU_ZERO, CPU_SET): They are now mapped to the CPU_ZERO_S and CPU_SET_S
4010 respectively, so we need to pass the size of the masks as
4012 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use dynamically
4013 created cpu_set_t masks
4014 with the number of processors available in the target platform,
4015 instead of static bit arrays. It enhances portability because
4016 it uses the information from the target platform.
4017 * sem_ch8.adb: (Attribute_Renaming): When checking whether we
4018 are using a restricted run-time library, use the flag
4019 Configurable_Run_Time_Mode instead of Restricted_Profile.
4021 2011-09-01 Vincent Celier <celier@adacore.com>
4023 * ug_words: Add /MULTI_UNIT_INDEX= -> -gnateI
4024 * vms_data.ads: Add new VMS qualifier equivalent for -gnateInnn
4026 2011-09-01 Nicolas Roche <roche@adacore.com>
4028 * adaint.c (__gnat_tmp_name): Don't use tmpnam function from the system
4029 on VxWorks in kernel mode.
4031 2011-09-01 Jose Ruiz <ruiz@adacore.com>
4033 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use the linux
4034 macros for handling CPU sets (CPU_ZERO, CPU_SET) instead of modifying
4035 directly the bit array.
4036 * s-osinte-linux.ads (CPU_ZERO, CPU_SET): Import these wrappers around
4037 the linux macros with the same name.
4038 * adaint.h, adaint.c (__gnat_cpu_zero, __gnat_cpu_set): Create these
4039 wrappers around the CPU_ZERO and CPU_SET linux macros.
4041 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
4043 * exp_ch7.adb (Find_Insertion_List): Removed.
4044 (Process_Transient_Objects): Insert the declarations of the hook
4045 access type and the hook object before the associated transient object.
4047 2011-09-01 Jose Ruiz <ruiz@adacore.com>
4049 * sem_ch8.adb (Attribute_Renaming): Add missing check to avoid loading
4050 package System.Aux_Dec when using restricted run-time libraries which
4051 do not have this package.
4053 2011-09-01 Tristan Gingold <gingold@adacore.com>
4055 * s-vaflop-vms-alpha.adb: Remove pragma optimize, useless.
4057 2011-09-01 Bob Duff <duff@adacore.com>
4059 * sem_attr.adb (Analyze_Access_Attribute): Do not call
4060 Kill_Current_Values for P'Unrestricted_Access, where P is library level
4062 2011-09-01 Thomas Quinot <quinot@adacore.com>
4064 * exp_ch5.adb: Minor reformatting
4065 * gnat_ugn.texi: Fix minor typos.
4066 * gcc-interface/Make-lang.in: Update dependencies.
4068 2011-09-01 Robert Dewar <dewar@adacore.com>
4070 * inline.adb, sem_aggr.adb: Minor reformatting.
4072 2011-09-01 Ed Schonberg <schonberg@adacore.com>
4074 * a-convec.adb: Proper handling of cursors for Ada2012 iterators.
4076 2011-09-01 Robert Dewar <dewar@adacore.com>
4078 * prj-proc.adb, exp_ch6.adb, prj-env.adb: Minor reformatting.
4080 2011-09-01 Bob Duff <duff@adacore.com>
4082 * sem_aggr.adb (Resolve_Aggregate): Need to treat "in instance
4083 body" the same as "in inlined body", because visibility shouldn't
4086 2011-09-01 Eric Botcazou <ebotcazou@adacore.com>
4088 * inline.adb (Add_Inlined_Body): Refine previous change.
4090 2011-09-01 Gary Dismukes <dismukes@adacore.com>
4092 * exp_ch6.ads (Needs_BIP_Alloc_Form): New utility function.
4093 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
4094 Test for case where call
4095 initializes an object of a return statement before testing for
4096 a constrained call, to ensure that all such cases get handled
4097 by simply passing on the caller's parameters. Also, in that
4098 case call Needs_BIP_Alloc_Form to determine whether to pass on
4099 the BIP_Alloc_Form parameter of the enclosing function rather
4100 than testing Is_Constrained. Add similar tests for the return
4101 of a BIP call to later processing to ensure consistent handling.
4102 (Needs_BIP_Alloc_Form): New utility function.
4103 * sem_ch6.adb: (Create_Extra_Formals): Replace test for adding
4104 a BIP_Alloc_Form formal with call to new utility function
4105 Needs_BIP_Alloc_Form.
4107 2011-09-01 Pascal Obry <obry@adacore.com>
4109 * prj-part.adb: Minor reformatting.
4111 2011-09-01 Vincent Celier <celier@adacore.com>
4113 * prj-env.adb (Create_Mapping_File.Process): Encode the upper
4114 half character in the unit name.
4116 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
4118 * exp_ch4.adb: Minor code and comment reformatting.
4120 2011-09-01 Thomas Quinot <quinot@adacore.com>
4122 * exp_ch6.adb (Expand_Inlined_Call): Remove redundant tests
4123 for Is_Limited_Type and Is_Tagged_Type in condition checking
4124 for by-reference type.
4125 * inline.adb (Add_Inlined_Body): Only exclude init_procs. Other
4126 subprograms may have a completion because of a previous
4127 Inline_Always clause, but the enclosing package must be marked
4128 inlined for the subprogram body to become visible to the backend.
4130 2011-09-01 Thomas Quinot <quinot@adacore.com>
4132 * sem_aux.adb, exp_ch4.adb: Minor reformatting
4134 2011-09-01 Pascal Obry <obry@adacore.com>
4136 * prj-proc.adb, prj.ads, sinput-p.adb: Minor reformatting.
4138 2011-09-01 Ed Schonberg <schonberg@adacore.com>
4140 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Generate references to
4141 the formals of a subprogram stub that acts as a spec.
4143 2011-09-01 Ed Schonberg <schonberg@adacore.com>
4145 * exp_ch6.adb (Expand_Inlined_Call): If an actual is a by_reference
4146 type, declare a renaming for it, not an object declaration.
4148 2011-09-01 Yannick Moy <moy@adacore.com>
4150 * ali-util.adb, ali-util.ads (Read_Withed_ALIs): Add parameter
4151 Ignore_Errors to ignore failures to read ALI files when True.
4153 2011-09-01 Javier Miranda <miranda@adacore.com>
4155 * exp_ch3.adb (Expand_N_Object_Declaration): Handle non-default
4156 constructor calls associated with non-tagged record types.
4158 2011-09-01 Robert Dewar <dewar@adacore.com>
4160 * g-socthi-vms.adb: Minor reformatting.
4162 2011-09-01 Nicolas Roche <roche@adacore.com>
4164 * sysdep.c: Don't use macro functions for stdio functions on VxWorks
4165 in order to avoid impact of imcompatible changes.
4166 * cstreams.c: Likewise
4168 * aux-io.c: Likewise
4170 2011-09-01 Yannick Moy <moy@adacore.com>
4172 * lib-writ.adb (Write_With_Lines): Always output complete information
4173 on "with" line in Alfa mode, as this is required by formal verification
4176 2011-09-01 Tristan Gingold <gingold@adacore.com>
4178 * g-socthi-vms.adb: Add comments.
4180 2011-09-01 Pascal Obry <obry@adacore.com>
4182 * prj.ads: Minor reformatting.
4184 2011-09-01 Vincent Celier <celier@adacore.com>
4186 * prj-env.adb (Create_Config_Pragmas_File.Check): Put all naming
4187 exceptions in the config pragmas file.
4189 2011-09-01 Tristan Gingold <gingold@adacore.com>
4191 * gnat_ugn.texi: Document GNAT_STACK_SIZE on IVMS.
4193 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
4195 * exp_ch7.adb (Find_Insertion_List): New routine.
4196 (Process_Transient_Objects): Add code to handle the abnormal
4197 finalization of a controlled transient associated with a subprogram
4198 call. Since transients are cleaned up right after the associated
4199 context, an exception raised during a subprogram call may bypass the
4202 2011-09-01 Robert Dewar <dewar@adacore.com>
4204 * exp_ch6.adb (Expand_Call): Check actual for aliased parameter is
4207 2011-09-01 Robert Dewar <dewar@adacore.com>
4209 * exp_ch4.adb, a-exexda.adb: Minor reformatting.
4211 2011-09-01 Robert Dewar <dewar@adacore.com>
4213 * s-taskin.ads, s-tassta.adb, sem_ch13.adb: Minor reformatting.
4215 2011-09-01 Thomas Quinot <quinot@adacore.com>
4217 * Makefile.rtl: Move s-oscons.o from GNATRTL_TASKING_OBJS to
4218 GNATRTL_NONTASKING_OBJS.
4220 2011-09-01 Robert Dewar <dewar@adacore.com>
4222 * einfo.ads (Is_Aliased): Fix existing documentation and add note on
4223 possibility of this flag being set for formals in Ada 2012 mode.
4224 * par-ch6.adb (P_Formal_Part): Handle aliased for parameters for Ada
4226 * sem_ch6.adb (Process_Formals): Handle aliased parameters in Ada 2012
4228 * sinfo.adb (Aliased_Present): Allowed in N_Parameter_Specification for
4230 * sinfo.ads (Aliased_Present): Allowed in N_Parameter_Specification for
4233 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
4235 * exp_ch4.adb (Find_Insertion_Node): New routine. Determines the proper
4236 insertion node in a tree of nested Expression_With_Actions nodes.
4237 (Process_Transient_Object): In the case where a complex if statement
4238 has been converted into nested Expression_With_Actions nodes, the
4239 "hook" object and the associated access type must be inserted before
4240 the top most Expression_With_Actions.
4242 2011-09-01 Robert Dewar <dewar@adacore.com>
4244 * a-cbprqu.adb, a-cbprqu.ads, a-cuprqu.adb, a-cuprqu.ads,
4245 a-cbsyqu.adb, a-cbsyqu.ads: Minor reformatting.
4247 2011-09-01 Ed Schonberg <schonberg@adacore.com>
4249 * sem_attr.adb: Conditionalize aliasing predicates to Ada2012.
4251 2011-09-01 Jose Ruiz <ruiz@adacore.com>
4253 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the CPU
4255 * aspects.adb (Canonical_Aspect): Add entry for the CPU aspect.
4256 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the CPU aspect
4257 in a similar way as we do for the Priority or Dispatching_Domain aspect.
4258 * s-mudido-affinity.adb (Dispatching_Domain_Tasks,
4259 Dispatching_Domains_Frozen): Move this local data to package
4260 System.Tasking because with the CPU aspect we need to have access
4261 to this data when creating the task in System.Tasking.Stages.Create_Task
4262 * s-taskin.ads (Dispatching_Domain_Tasks, Dispatching_Domains_Frozen):
4263 Move these variables from the body of
4264 System.Multiprocessors.Dispatching_Domains because with the CPU aspect
4265 we need to have access to this data when creating the task in
4266 System.Tasking.Stages.Create_Task.
4267 * s-taskin.adb (Initialize): Signal the allocation of the environment
4268 task to a CPU, if any, so that we know whether the CPU can be
4269 transferred to a different dispatching domain.
4270 * s-tassta.adb (Create_Task): Check whether the CPU to which this task
4271 is being allocated belongs to the dispatching domain where the task
4272 lives. Signal the allocation of the task to a CPU, if any, so that we
4273 know whether the CPU can be transferred to a different dispatching
4276 2011-09-01 Ed Schonberg <schonberg@adacore.com>
4278 * exp_attr.adb, sem_attr.adb, snames.ads-tmpl: Implementation of
4279 attributes Same_Storage and Overlaps_Storage.
4281 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
4283 * exp_strm.adb: Remove with and use clause for Opt.
4284 (Build_Array_Input_Function): Remove the version-dependent generation
4285 of the return statement. The Ada 2005 tree is now the default.
4287 2011-09-01 Yannick Moy <moy@adacore.com>
4289 * put_alfa.adb: Unconditionnally write files in Alfa section, so that
4290 it is never empty when compiling in Alfa mode.
4292 2011-09-01 Robert Dewar <dewar@adacore.com>
4294 * sem_aggr.adb, sem_ch3.adb, a-direct.adb, s-taprop-vxworks.adb,
4295 comperr.adb, exp_ch9.adb, exp_pakd.adb, sem_ch12.adb, freeze.adb,
4296 s-taprop-mingw.adb, s-taprop-linux.adb, s-taprop-solaris.adb,
4297 gnat1drv.adb, a-rbtgbo.adb, exp_dist.adb: Minor reformatting
4299 2011-09-01 Matthew Heaney <heaney@adacore.com>
4301 * Makefile.rtl, impunit.adb: Add a-csquin.ads, a-cusyqu.ad[sb],
4302 a-cuprqu.ad[sb], a-cbsyqu.ad[sb], a-cbprqu.ad[sb]
4303 * a-csquin.ads: New Ada 2012 unit that specifies the queue interface
4304 * a-cusyqu.ads, a-cusyqu.adb: New Ada 2012 unit that specifies the
4305 unbounded queue container.
4306 * a-cbsyqu.ads, a-cbsyqu.adb: New Ada 2012 unit that specifies the
4307 bounded queue container.
4308 * a-cuprqu.ads, a-cuprqu.adb: New Ada 2012 unit that specifies the
4309 unbounded priority queue container.
4310 * a-cbprqu.ads, a-cbprqu.adb: New Ada 2012 unit that specifies the
4311 bounded priority queue container.
4313 2011-08-31 Pascal Obry <obry@adacore.com>
4315 * a-direct.adb: Do not try to create an UNC path on Windows.
4316 (Create_Path): Skip leading computer name in UNC path if any.
4318 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
4320 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): Remove the
4321 version-dependent generation of the return statement. The Ada 2005 tree
4324 2011-08-31 Thomas Quinot <quinot@adacore.com>
4326 * rtsfind.ads, exp_dist.adb (Find_Numeric_Representation): Predefined
4327 types Stream_Element_Offset and Storage_Offset have a different native
4328 type depending on whether the platform is 32 or 64 bits. When
4329 exchanging them, always convert to 64 bits.
4331 2011-08-31 Yannick Moy <moy@adacore.com>
4333 * debug.adb: Reserve debug option -gnatd.E for passing gnatprove option
4334 --force-alfa to gnat2why.
4336 2011-08-31 Ed Schonberg <schonberg@adacore.com>
4338 * sem_ch12.adb (Save_References): If the node has aspects, save
4339 references within the corresponding expressions in a separate step,
4340 because the aspects are not directly in the tree for the declaration
4341 to which they belong.
4343 2011-08-31 Arnaud Charlet <charlet@adacore.com>
4345 * freeze.adb (Freeze_Record_Type): Omit test on variable size component
4346 in CodePeer mode, since representation clauses are partially ignored.
4347 * gcc-interface/Make-lang.in: Update dependencies.
4349 2011-08-31 Jose Ruiz <ruiz@adacore.com>
4351 * s-taprop-vxworks.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
4352 s-taprop-solaris.adb (Create_Task): Not_A_Specific_CPU can be assigned
4353 to any dispatching domain.
4355 2011-08-31 Thomas Quinot <quinot@adacore.com>
4357 * exp_ch4.adb: Minor reformatting.
4359 2011-08-31 Bob Duff <duff@adacore.com>
4361 * sem_ch6.adb (Get_Generic_Parent_Type): Don't query Subtype_Indication
4362 on nodes for which it is not defined.
4363 (Is_Non_Overriding_Operation): Exit the loop when we find a generic
4366 2011-08-31 Bob Duff <duff@adacore.com>
4368 * sem_ch3.adb (Process_Full_View): Disable legality check if
4369 In_Instance, to avoid spurious errors.
4370 * sem_ch12.adb (Validate_Derived_Type_Instance): Disable legality check
4371 if In_Instance, to avoid spurious errors.
4373 2011-08-31 Pascal Obry <obry@adacore.com>
4375 * a-direct.adb: Use Dir_Seps everywhere to properly handle all
4376 directory speparators.
4377 (Compose): Use Dir_Seps to handle both forms.
4378 (Create_Path): Use Dir_Seps instead of explicit check, no semantic
4380 (Extension): Use Dir_Seps to handle both forms.
4382 2011-08-31 Pascal Obry <obry@adacore.com>
4384 * prj-conf.adb: Minor reformatting.
4386 2011-08-31 Jose Ruiz <ruiz@adacore.com>
4388 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the
4389 dispatching domain aspect.
4390 * aspects.adb (Canonical_Aspect): Add entry for the dispatching domain
4392 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the
4393 Dispatching_Domain aspect in a similar way as we do for the Priority
4395 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Add the
4396 Dispatching_Domain component if a Dispatching_Domain pragma or aspect
4398 (Make_Task_Create_Call): Add the Dispatching_Domain when creating a task
4399 * par-prag.adb (Prag): Add Pragma_Dispatching_Domain as a known pragma.
4400 * sem_prag.adb (Analyze_Pragma): Check the correctness of a pragma
4401 Dispatching_Domain and add it to the task definition.
4402 (Sig_Flags): Add Pragma_Dispatching_Domain.
4403 * rtsfind.ads, rtsfind.adb (RTU_Id, RE_Id, Get_Unit_Name): Add the
4404 support to find the types Dispatching_Domain and
4405 Dispatching_Domain_Access.
4406 * sinfo.ads, sinfo.adb (Has_Pragma_Dispatching_Domain,
4407 Set_Has_Pragma_Dispatching_Domain): Add these subprograms to set and
4408 query the availability of a pragma Dispatching_Domain.
4409 * snames.ads-tmpl (Name_uDispatching_Domain): Add this name required by
4410 the expander to pass the Dispatching_Domain when creating a task.
4411 (Name_Dispatching_Domain): Add this new name for a pragma.
4412 (Pragma_Id): Add the new Pragma_Dispatching_Domain.
4413 * s-tassta.ads, s-tassta.adb (Create_Task): Set the domain to which the
4414 task has been allocated at creation time.
4415 * s-tarest.adb (Create_Restricted_Task): The dispatching domain using
4416 Ravenscar is always null.
4417 * s-taskin.ads, s-taskin.adb (Initialize_ATCB): Set the domain to which
4418 the task has been allocated at creation time.
4419 * s-tporft.adb (Register_Foreign_Thread): A foreign task will not have
4420 a specific dispatching domain.
4421 * s-taprop-linux.adb, s-taprop-solaris.adb, s-taprop-vxworks.adb,
4422 s-taprop-mingw.adb (Create_Task): Check whether both Dispatching_Domain
4423 and CPU are specified for the task, and the CPU value is not contained
4424 within the range of processors for the domain.
4426 2011-08-31 Vincent Celier <celier@adacore.com>
4428 * make.adb (Original_Gcc) : New constant String_Access.
4429 (Gnatmake): For VM targets, do not use VM version of the compiler if
4430 --GCC= has been specified.
4432 2011-08-31 Thomas Quinot <quinot@adacore.com>
4434 * sem_ch5.adb: Minor reformatting.
4436 2011-08-31 Ed Schonberg <schonberg@adacore.com>
4438 * exp_pakd.adb (Convert_To_PAT_Type): If prefix is a function call, do
4441 2011-08-31 Bob Duff <duff@adacore.com>
4443 * exp_ch4.adb (Expand_N_Selected_Component): Use the full type, in case
4444 the access type is private; we don't care about privacy in expansion.
4446 2011-08-31 Ed Schonberg <schonberg@adacore.com>
4448 * sem_aggr.adb (Resolve_Aggregate): In an instance, ignore aggregate
4449 subcomponents tnat may be limited, because they originate in view
4450 conflicts. If the original aggregate is legal and the actuals are
4451 legal, the aggregate itself is legal.
4453 2011-08-31 Matthew Heaney <heaney@adacore.com>
4455 * a-rbtgbo.adb (Clear_Tree): Assert representation invariant for lock
4458 2011-08-31 Ed Schonberg <schonberg@adacore.com>
4460 * sem_ch5.adb: Set kind of loop parameter properly, to preserve all
4463 2011-08-31 Jose Ruiz <ruiz@adacore.com>
4465 * sem_ch13.adb (Analyze_Aspect_Specifications): For the Priority and
4466 Interrupt_Priority aspects, force the analysis of the aspect expression
4467 (when building the equivalent pragma). Otherwise, its analysis is done
4468 too late, after the task or protected object has been created.
4469 * sem_ch9.adb (Analyze_Single_Protected_Declaration,
4470 Analyze_Single_Task_Declaration): Remove the code to move the aspects
4471 to the object declaration because they are needed in the type
4474 2011-08-31 Robert Dewar <dewar@adacore.com>
4476 * exp_ch5.adb, exp_ch7.ads, sem_ch5.adb, put_scos.adb, s-rannum.adb,
4477 a-rbtgbo.adb, exp_intr.adb, a-cbdlli.adb, a-cbdlli.ads: Minor
4480 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
4482 * exp_util.adb (Find_Protection_Type): Do not look for fields _object
4483 if the corresponding type is malformed due to restriction violations.
4485 2011-08-31 Robert Dewar <dewar@adacore.com>
4487 * s-ransee.ads, s-ransee.adb: Minor reformatting.
4489 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
4491 * exp_ch4.adb (Expand_N_Allocator): Correct faulty condition which
4492 would cause the generation of Set_Finalize_Address if the target is a
4493 VM and the designated type is not derived from [Limited_]Controlled.
4495 2011-08-31 Arnaud Charlet <charlet@adacore.com>
4497 * comperr.adb, comperr.ads, gnat1drv.adb (Delete_SCIL_Files): New
4499 (Compiler_Abort, Gnat1drv): Call Delete_SCIL_Files in codepeer mode in
4500 case of a compilation error.
4502 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
4504 * init.c (__gnat_error_handler): Standardize the stack overflow or
4505 erroneous memory access message.
4506 * seh_init.c (__gnat_SEH_error_handler): Standardize the stack overflow
4507 or erroneous memory access message.
4509 2011-08-31 Robert Dewar <dewar@adacore.com>
4511 * sem_ch4.adb: Minor reformatting.
4512 * sem_ch6.adb: Minor code reorganization (use Ekind_In).
4514 2011-08-31 Thomas Quinot <quinot@adacore.com>
4516 * scos.ads: Minor documentation clarification.
4517 * put_scos.adb: Do not generate SCO unit header line for a unit that
4520 2011-08-31 Robert Dewar <dewar@adacore.com>
4522 * a-rbtgbo.adb, alfa_test.adb: Minor reformatting.
4524 2011-08-31 Tristan Gingold <gingold@adacore.com>
4526 * exp_ch7.ads, exp_ch7.adb (Finalization_Exception_Data): New type to
4527 hold variables between these following subprograms.
4528 (Build_Exception_Handler, Build_Object_Declarations,
4529 Build_Raise_Statement): Use the above type as parameter.
4530 Make the above adjustments.
4531 * exp_intr.adb (Expand_Unc_Deallocation): Adjust.
4533 2011-08-31 Pascal Obry <obry@adacore.com>
4535 * projects.texi: Minor reformatting.
4537 2011-08-31 Tristan Gingold <gingold@adacore.com>
4539 * s-ransee.ads, s-ransee.adb: Add system.random_seed unit.
4540 * s-rannum.adb (Reset): Use Get_Seed from s-ransee.
4542 2011-08-31 Ed Schonberg <schonberg@adacore.com>
4544 * exp_ch5.adb: Minor code cleanup.
4545 * sem_ch5.adb (Analyze_Iteration_Scheme): Set ekind of loop variable to
4546 prevent cascaded errors.
4547 (Analyze_Loop_Statement): In semantics-only mode, introduce loop
4548 variable of an iterator specification in current scope.
4549 * sem_ch6.adb (Analyze_Return_Statement, Find_what_It_Apples_To): Skip
4550 postconditions on the stack, as they contain no return statements.
4552 2011-08-31 Yannick Moy <moy@adacore.com>
4554 * exp_alfa.adb (Expand_Alfa_N_Package_Declaration,
4555 Expand_Alfa_N_Subprogram_Body): Remove useless procedures which simply
4556 call Qualify_Entity_Names.
4557 (Expand_Alfa): call Qualify_Entity_Names in more cases
4558 * lib-xref-alfa.adb: Take into account system package.
4559 * sem_prag.adb Take into account restrictions in Alfa mode, contrary to
4560 CodePeer mode in which we are interested in finding bugs even if
4561 compiler cannot compile source.
4562 * sem_util.adb, sem_util.ads (Unique_Entity): Take into account case of
4565 2011-08-31 Gary Dismukes <dismukes@adacore.com>
4567 * sem_ch3.adb (Constrain_Concurrent): Retrieve Base_Type of the subtype
4568 denoted by the subtype mark to ensure getting the concurrent type in
4569 the case where the subtype mark denotes a private subtype of a
4570 concurrent type (needed when using -gnatc).
4571 (Process_Subtype): For the processing specific to type kinds, case on
4572 the Base_Type kind of the Subtype_Mark_Id, to handle cases where the
4573 subtype denotes a private subtype whose base type is nonprivate (needed
4574 for subtypes of private fulfilled by task types when compiling with
4577 2011-08-31 Gary Dismukes <dismukes@adacore.com>
4579 * sem_disp.adb (Check_Dispatching_Operation): Bypass registration of
4580 late primitives that override interface operations when the full
4581 expander is not active, to avoid blowups in Register_Primitive when
4582 types don't have associated secondary dispatch tables.
4584 2011-08-31 Yannick Moy <moy@adacore.com>
4586 * alfa_test.adb: Code clean up.
4588 2011-08-31 Marc Sango <sango@adacore.com>
4590 * restrict.adb (Check_SPARK_Restriction): Change Comes_From_Source (N)
4591 by Comes_From_Source (Original_Node (N)) in order to treat also the
4592 nodes which have been rewritten.
4593 * sem_ch4.adb (Analyze_Explicit_Dereference, Analyze_Slice): Guard the
4594 explicit dereference and slice violation in spark mode on the nodes
4595 coming only from the source code.
4597 2011-08-31 Robert Dewar <dewar@adacore.com>
4599 * exp_ch5.adb, exp_alfa.ads, prj.ads, sem_attr.adb,
4600 lib-xref-alfa.adb: Minor reformatting.
4602 2011-08-31 Matthew Heaney <heaney@adacore.com>
4604 * a-crbltr.ads (Tree_Type): Default-initialize the Nodes component.
4606 2011-08-31 Javier Miranda <miranda@adacore.com>
4608 * sem_ch4.adb (Try_Object_Operation): Addition of one formal to search
4609 only for class-wide subprograms conflicting with entities of concurrent
4612 2011-08-31 Matthew Heaney <heaney@adacore.com>
4614 * a-rbtgbo.adb (Generic_Allocate): Initialize pointer components of
4617 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
4619 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): Provide a more
4620 general description of the routine.
4622 2011-08-31 Ed Schonberg <schonberg@adacore.com>
4624 * a-cbdlli.adb, a-cbdlli.ads: Add iterator machinery to bounded
4625 doubly-linked lists.
4627 2011-08-31 Gary Dismukes <dismukes@adacore.com>
4629 * exp_ch5.adb (Expand_N_Assignment_Statement): When a discriminant
4630 check is needed for a left-hand side that is a dereference, and the
4631 base type is private without discriminants (whereas the full type does
4632 have discriminants), an extra retrieval of the underlying type may be
4633 needed in the case where the subtype is a record subtype whose base
4634 type is private. Update comments.
4636 2011-08-31 Javier Miranda <miranda@adacore.com>
4638 * sem_ch4.adb (Try_Object_Operation): When a dispatching primitive is
4639 found check if there is a class-wide subprogram covering the primitive.
4641 2011-08-31 Yannick Moy <moy@adacore.com>
4643 * sem_res.adb: Further cases where full expansion test is needed,
4644 rather than expansion test.
4646 2011-08-31 Pascal Obry <obry@adacore.com>
4648 * prj-attr.adb: Fix Source_File_Switches attribute kind (must be a list)
4650 2011-08-31 Ed Schonberg <schonberg@adacore.com>
4652 * exp_ch5.adb: Handle iterators over derived container types.
4654 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
4656 * einfo.ads, einfo.adb: Add new flag Has_Anonymous_Master.
4657 (Has_Anonymous_Master): New routine.
4658 (Set_Has_Anonymous_Master): New routine.
4659 (Write_Entity_Flags): Add an entry for Has_Anonymous_Master.
4660 * exp_ch4.adb: Add with and use clause for Sem_Ch8.
4661 (Current_Anonymous_Master): New routine.
4662 (Current_Unit_First_Declaration): Removed.
4663 (Current_Unit_Scope): Removed.
4664 (Expand_N_Allocator): Anonymous access-to-controlled types now chain
4665 their objects on a per-unit heterogeneous finalization master.
4667 2011-08-31 Matthew Heaney <heaney@adacore.com>
4669 * a-cbhama.adb, a-cbhase.adb (Insert): Check for zero-length buckets
4672 2011-08-31 Jose Ruiz <ruiz@adacore.com>
4674 * s-taprop-linux.adb (Create_Task): Avoid changing the affinity mask
4677 2011-08-31 Gary Dismukes <dismukes@adacore.com>
4679 * sem_disp.adb (Propagate_Tag): Return without propagating in the case
4680 where the actual is an unexpanded call to 'Input.
4682 2011-08-31 Yannick Moy <moy@adacore.com>
4684 * sem_ch4.adb: Code clean up.
4686 2011-08-31 Yannick Moy <moy@adacore.com>
4688 * exp_alfa.adb, exp_alfa.ads: Minor correction of copyright notice.
4690 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
4692 * exp_ch7.adb (Build_Array_Deep_Procs): Do not generate Deep_Finalize
4693 and TSS primitive Finalize_Address if finalization is suppressed.
4694 (Build_Record_Deep_Procs): Do not generate Deep_Finalize and TSS
4695 primitive Finalize_Address if finalization is suppressed.
4697 2011-08-31 Jose Ruiz <ruiz@adacore.com>
4699 * s-mudido-affinity.adb, s-taprop-linux.adb, s-taprop-mingw.adb,
4700 s-taprop-solaris.adb, s-taprop-vxworks.adb (Set_Task_Affinity): Make
4701 sure that the underlying task has already been created before trying
4702 to change its affinity.
4703 (Set_CPU): Use the term processor instead of CPU, as we do in
4706 2011-08-31 Vincent Celier <celier@adacore.com>
4708 * prj-attr.adb: New Compiler attribute Source_File_Switches.
4709 * prj-nmsc.adb (Process_Compiler): Process attribute
4710 Source_File_Switches.
4711 * prj.ads (Language_Config): New name list component
4712 Name_Source_File_Switches.
4713 * snames.ads-tmpl (Name_Source_File_Switches): New standard name.
4715 2011-08-31 Ed Schonberg <schonberg@adacore.com>
4717 * sem_attr.adb (Analyze_Attribute, case 'Old): If prefix may be a
4718 discriminated component of an actual, expand at once to prevent
4719 ouf-of-order references with generated subtypes.
4721 2011-08-31 Yannick Moy <moy@adacore.com>
4723 * lib-xref-alfa.adb (Add_Alfa_Xrefs): Do not take into account read
4724 reference to operator in Alfa xrefs.
4726 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
4728 * sem_ch12.adb (Freeze_Subprogram_Body): Add code to handle the case
4729 where the parent instance was frozen before the current instance due to
4730 the presence of a source body. Update calls to Insert_After_Last_Decl.
4731 (Insert_After_Last_Decl): Renamed to Insert_Freeze_Node_For_Instance.
4732 Update the comment which illustrates the purpose of the routine.
4733 Package instances are now frozen by source bodies which appear after
4734 the instance. This ensures that entities coming from within the
4735 instance are available for use in the said bodies.
4736 (Install_Body): Add code to handle the case where the parent instance
4737 was frozen before the current instance due to the presence of a source
4738 body. Update calls to Insert_After_Last_Decl.
4740 2011-08-31 Jose Ruiz <ruiz@adacore.com>
4742 * s-taprop-linux.adb (Set_Task_Affinity): Avoid the use of anonymous
4744 * affinity.c (__gnat_set_affinity_mask): Declare index variable.
4746 2011-08-31 Yannick Moy <moy@adacore.com>
4748 * sem_ch8.adb (Analyze_Subprogram_Renaming): Refine expander test in
4750 * alfa.adb, alfa.ads, alfa_test.adb, ali.adb, debug.adb, errout.adb,
4751 errout.ads, erroutc.adb, expander.adb, exp_ch4.adb, exp_ch7.adb,
4752 freeze.adb, get_alfa.adb, get_alfa.ads, gnat1drv.adb, lib-writ.adb,
4753 lib-writ.ads, lib-xref.adb, lib-xref.ads, lib-xref-alfa.adb, opt.adb,
4754 opt.ads, put_alfa.adb, put_alfa.ads, restrict.adb, sem_ch12.adb,
4755 sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
4756 sem_prag.adb, sem_res.adb, sem_util.adb: Minor reformatting, renaming
4757 ALFA in Alfa (we dropped acronym).
4758 * einfo.adb (Primitive_Operations): Correctly return list of primitive
4759 operations in a case where it returned previously No_Elist.
4761 2011-08-31 Robert Dewar <dewar@adacore.com>
4763 * s-taprop-vxworks.adb, sem_ch5.adb, s-taprop-tru64.adb, exp_alfa.adb,
4764 s-taprop-vms.adb, bindgen.adb, s-mudido.adb, s-mudido.ads,
4765 sem_res.adb, expander.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
4766 s-taprop-solaris.adb, s-mudido-affinity.adb, vms_conv.adb,
4767 s-taprop-irix.adb, s-taprop.ads, s-taskin.adb, s-taskin.ads,
4768 s-taprop-hpux-dce.adb, a-chtgbo.adb, s-taprop-posix.adb: Minor
4771 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
4773 * sem_ch12 (Check_Private_View): Revert previous change.
4774 * sem_res.adb (Conversion_Check): Do not emit the error message if the
4775 conversion is in a generic instance.
4777 2011-08-31 Matthew Heaney <heaney@adacore.com>
4779 * a-cbhase.adb (Symmetric_Difference): Dereference correct node array.
4780 * a-chtgbo.adb (Free): Allow 0 as index value.
4782 2011-08-31 Matthew Heaney <heaney@adacore.com>
4784 * a-cborma.adb (Insert): Add comment to explain why no element
4787 2011-08-31 Gary Dismukes <dismukes@adacore.com>
4789 * sem_util.adb (Find_Body_Discriminal): Test whether the scope of the
4790 spec discriminant is already a concurrent type, in which case just use
4791 it, otherwise fetch the Corresponding_Concurrent_Type as before.
4793 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
4795 * system-irix-n64.ads, system-linux-armeb.ads, system-linux-armel.ads,
4796 system-linux-mips.ads, system-linux-mipsel.ads,
4797 system-linux-mips64el.ads, system-linux-ppc64.ads,
4798 system-linux-sparcv9.ads, system-rtems.ads: Remove GCC_ZCX_Support.
4800 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
4802 * gcc-interface/ada-tree.h (TYPE_EXTRA_SUBTYPE_P): Add internal check.
4803 * gcc-interface/utils2.c (build_binary_op): Tighten condition.
4804 (build_unary_op): Likewise.
4806 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
4808 * raise-gcc.c: Do not include coretypes.h and tm.h.
4809 (setup_to_install): Remove test for compiler macro.
4810 * targext.c: Document use for the library.
4811 * gcc-interface/Makefile.in: Fix comment on the use of IN_GCC.
4813 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
4815 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not convert
4816 the expression to the nominal type if the latter is a record type with
4817 a variant part and the type of the former is a record type without one.
4819 2011-08-30 Yannick Moy <moy@adacore.com>
4821 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
4822 expansion in Alfa mode.
4823 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public
4824 * exp_alfa.adb, exp_alfa.ads: New package defining light expansion for
4826 * gnat1drv.adb (Adjust_Global_Switches): Update Comment.
4827 * sem_res.adb: Ditto.
4828 * gcc-interface/Make-lang.in: Update dependencies.
4830 2011-08-30 Thomas Quinot <quinot@adacore.com>
4832 * g-socket.ads: Minor documentation adjustment.
4834 2011-08-30 Robert Dewar <dewar@adacore.com>
4836 * exp_ch9.adb, s-tassta.adb, s-secsta.adb: Minor reformatting.
4838 2011-08-30 Yannick Moy <moy@adacore.com>
4840 * exp_ch6_light.adb, exp_ch6_light.ads, exp_attr_light.adb,
4841 exp_attr_light.ads, exp_ch7_light.adb, exp_ch7_light.ads,
4842 exp_light.adb, exp_light.ads, exp_prag.adb, expander.adb,
4843 gnat1drv.adb, exp_ch11.adb, exp_ch6.adb, exp_ch6.ads, exp_aggr.adb:
4844 Revert change which introduced files for "light"
4845 expansion, to be replaced by a single file for Alfa expansion.
4847 2011-08-30 Robert Dewar <dewar@adacore.com>
4849 * opt.ads, s-soflin.adb, exp_ch9.adb, sem_res.adb: Update comment.
4850 Minor code reorg/reformatting.
4852 2011-08-30 Yannick Moy <moy@adacore.com>
4854 * opt.adb, opt.ads (Full_Expander_Active): New function defines a
4855 common shorthand for (Expander_Active and not ALFA_Mode) that can be
4856 used for testing full expansion, that is active expansion not in the
4857 reduced mode for Alfa
4858 * exp_ch4.adb, exp_ch9.adb, exp_disp.adb, sem_ch10.adb, sem_ch12.adb,
4859 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Use newly defined "flag" instead
4860 of the verbose (Expander_Active and not ALFA_Mode)
4862 2011-08-30 Tristan Gingold <gingold@adacore.com>
4864 * s-parame-vms-alpha.ads, s-parame-hpux.ads, s-tassta.adb,
4865 s-tarest.adb, s-parame-vms-ia64.ads, s-soflin.adb, s-secsta.adb,
4866 s-secsta.ads, s-parame.ads, s-parame-vxworks.ads, s-parame-ae653.ads:
4867 Renames Ratio to Percentage, and Sec_Stack_Ratio to Sec_Stack_Percentage
4869 2011-08-30 Gary Dismukes <dismukes@adacore.com>
4871 * sem_res.adb (Valid_Conversion): Revise test for implicit anonymous
4872 access conversions to check that the conversion is a rewritten node,
4873 rather than just having Comes_From_Source set to False, which wasn't
4876 2011-08-30 Robert Dewar <dewar@adacore.com>
4878 * exp_ch9.adb, sem_ch9.adb, sem_ch6.adb, exp_disp.adb,
4879 g-socket.ads: Minor reformatting.
4881 2011-08-30 Thomas Quinot <quinot@adacore.com>
4883 * sem_util.adb: Minor reformatting.
4885 2011-08-30 Tristan Gingold <gingold@adacore.com>
4887 * raise-gcc.c: Never catch exception if _UA_FORCE_UNWIND flag is set,
4888 to be compliant with the ABI.
4890 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
4892 * sem_ch12.adb (Check_Private_View): Exchange the private and full view
4893 of a designated type when the related access type is an actual in an
4894 instance. This ensures that the full view of designated type is
4895 available when inside the body of the instance.
4897 2011-08-30 Ed Schonberg <schonberg@adacore.com>
4899 * sem_util.adb (May_Be_Lvalue): To determine whether a reference may be
4900 in a position to be modified, a slice is treated like an indexed
4903 2011-08-30 Thomas Quinot <quinot@adacore.com>
4905 * s-oscons-tmplt.c, g-socket.ads: Adjust maximum allowed value for
4906 field tv_sec in struct timeval.
4908 2011-08-30 Yannick Moy <moy@adacore.com>
4910 * exp_ch9.adb, exp_disp.adb, sem_ch9.adb, sem_res.adb: Protect several
4911 blocks of code doing full expansion, previously only guarded by
4912 Expander_Active, by anding the test that ALFA_Mode is not set
4914 2011-08-30 Ed Schonberg <schonberg@adacore.com>
4916 * sem_ch6.adb (Analyze_Return_Type): If the return type is incomplete,
4917 add the function to the list of private dependents, for subsequent
4918 legality check on Taft amendment types.
4919 * sem_ch12.adb (Analyze_Formal_Incomplete_Type): Initialize
4920 Private_Dependents, as for other incomplete types.
4921 * sem_util.adb (Wrong_Type): Avoid cascaded errors when a
4922 Taft-amendment type is used as the return type of a function.
4924 2011-08-30 Javier Miranda <miranda@adacore.com>
4926 * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup: replace code
4927 which emits an error by a call to a new routine which report the error.
4928 * exp_ch9.adb (Build_Wrapper_Spec): Build the wrapper even if the
4929 entity does not cover an existing interface.
4930 * errout.ads, errout.adb (Error_Msg_PT): New routine. Used to factorize
4932 * sem_ch6.adb (Check_Conformance): Add specific error for wrappers of
4933 protected procedures or entries whose mode is not conformant.
4934 (Check_Synchronized_Overriding): Code cleanup: replace code which emits
4935 an error by a call to a new routine which report the error.
4937 2011-08-30 Robert Dewar <dewar@adacore.com>
4939 * gnat_rm.texi: Minor change.
4940 * exp_attr_light.adb: Minor reformatting.
4942 2011-08-30 Ed Schonberg <schonberg@adacore.com>
4944 * sem_ch3.adb: Patch inheritance of aspects in
4945 Complete_Private_Subtype, to avoid infinite loop.
4947 2011-08-30 Javier Miranda <miranda@adacore.com>
4949 * sem_ch3.adb (Add_Internal_Interface_Entities): If serious errors have
4950 been reported and a subprogram covering an interface primitive is not
4951 found then skip generating the internal entity. Done to avoid crashing
4953 (Check_Abstract_Overriding): Change text of error of wrong formal of
4954 protected subprogram or entry. Done for consistency to emit exactly the
4955 same error reported by Check_Synchronized_Overriding. In addition, the
4956 error is restricted to protected types (bug found working on AI05-0090)
4958 2011-08-30 Yannick Moy <moy@adacore.com>
4960 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
4961 expansion in Alfa mode.
4962 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public.
4963 * exp_light.adb, exp_light.ads: New package defining light expansion.
4964 * expander.adb (Expand): Call light expansion in Alfa mode
4965 * exp_ch6_light.adb, exp_ch6_light.ads: Light expansion of chapter 6
4967 * exp_ch7_light.adb, exp_ch7_light.ads: Light expansion of chapter 7
4969 * exp_attr_light.adb, exp_attr_light.ads: Light expansion of attributes
4970 * gnat1drv.adb (Adjust_Global_Switches): Comment
4972 2011-08-30 Yannick Moy <moy@adacore.com>
4974 * lib-xref-alfa.adb: Minor refactoring.
4976 2011-08-30 Yannick Moy <moy@adacore.com>
4978 * exp_ch9.adb (Expand_Entry_Barrier): Do not perform expansion in Alfa
4980 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not perform
4981 expansion in Alfa mode.
4982 * sem_ch9.adb (Analyze_Entry_Body): Do not perform expansion in Alfa
4985 2011-08-30 Robert Dewar <dewar@adacore.com>
4987 * debug_a.adb: Update comment.
4989 2011-08-30 Robert Dewar <dewar@adacore.com>
4991 * exp_ch5.adb, sem_ch3.adb, sem_ch5.adb, einfo.adb, checks.adb,
4992 sem_util.adb, sem_util.ads, sem_res.adb, s-stposu.adb, sem_attr.adb,
4993 exp_ch4.adb, exp_ch6.adb, lib-xref-alfa.adb,
4994 sem_ch8.adb, sem_disp.adb, exp_ch3.adb: Minor reformatting
4996 2011-08-30 Robert Dewar <dewar@adacore.com>
4998 * gnat_rm.texi: Add section on C.6(16) implementation advice for pragma
5001 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
5003 * exp_ch3.adb (Expand_Freeze_Array_Type): Correct the call to
5004 Build_Finalization_Master by supplying an insertion node and enclosing
5005 scope. In its old version, the call did not generate a finalization
5007 (Expand_Freeze_Record_Type): Add local variable Has_AACC. Add code to
5008 recognize anonymous access-to-controlled components. Rewrite the
5009 machinery which creates finalization masters to service anonymous
5010 access-to-controlled components of a record type. In its current state,
5011 only one heterogeneous master is necessary to handle multiple anonymous
5013 (Freeze_Type): Comment reformatting.
5014 * rtsfind.ads: Add RE_Set_Is_Heterogeneous to tables RE_Id and
5016 * s-stposu.adb (Allocate_Any_Controlled): Rewrite the machinery which
5017 associates TSS primitive Finalize_Address with either the master itself
5018 or with the internal hash table depending on the mode of operation of
5021 2011-08-30 Javier Miranda <miranda@adacore.com>
5023 * exp_ch3.adb (Make_Eq_If): If the etype of the _parent component is an
5024 interface type then do not generate code to compare this component.
5025 Required since they have no components and their equality operator is
5028 2011-08-30 Steve Baird <baird@adacore.com>
5030 * sem_util.ads (Deepest_Type_Access_Level): New function; for the type
5031 of a saooaaat (i.e, a stand-alone object of an anonymous access type),
5032 returns the (static) accessibility level of the object. Otherwise, the
5033 same as Type_Access_Level.
5034 (Dynamic_Accessibility_Level): New function; given an expression which
5035 could occur as the rhs of an assignment to a saooaaat (i.e., an
5036 expression of an access-to-object type), return the new value for the
5037 saooaaat's associated Extra_Accessibility object.
5038 (Effective_Extra_Accessibility): New function; same as
5039 Einfo.Extra_Accessibility except that object renames are looked through.
5041 (Deepest_Type_Access_Level): New function; see sem_util.ads description.
5042 (Dynamic_Accessibility_Level): New function; see sem_util.ads
5044 (Effective_Extra_Accessibility): New function; see sem_util.ads
5046 * einfo.ads (Is_Local_Anonymous_Access): Update comments.
5047 (Extra_Accessibility): Update comments.
5048 (Init_Object_Size_Align): New procedure; same as Init_Size_Align
5049 except RM_Size field (which is only for types) is unaffected.
5051 (Extra_Accessibility): Expand domain to allow objects, not just formals.
5052 (Set_Extra_Accessibility): Expand domain to allow objects, not just
5054 (Init_Size): Add assertion that we are not trashing the
5055 Extra_Accessibility attribute of an object.
5056 (Init_Size_Align): Add assertion that we are not trashing the
5057 Extra_Accessibility attribute of an object.
5058 (Init_Object_Size_Align): New procedure; see einfo.ads description.
5059 * sem_ch3.adb (Find_Type_Of_Object): Set Is_Local_Anonymous_Access
5060 differently for the type of a (non-library-level) saooaaat depending
5061 whether Ada_Version < Ada_2012. This is the only point where Ada_Version
5062 is queried in this set of changes - everything else (in particular,
5063 setting of the Extra_Accessibility attribute in exp_ch3.adb) is
5064 driven off of the setting of the Is_Local_Anonymous_Access attribute.
5065 The special treatment of library-level saooaaats is an optimization,
5066 not required for correctnesss. This is based on the observation that the
5067 Ada2012 rules (static and dynamic) for saooaaats turn out to be
5068 equivalent to the Ada2005 rules in the case of a library-level saooaaat.
5070 (Expand_N_Object_Declaration): If Is_Local_Anonymous_Access is
5071 false for the type of a saooaaat, declare and initialize its
5072 accessibility level object and set the Extra_Accessibility attribute
5073 of the saooaaat to refer to this object.
5074 * checks.adb (Apply_Accessibility_Check): Add Ada 2012 saooaaat support.
5075 * exp_ch4.adb (Expand_N_In): Replace some Extra_Accessibility calls with
5076 calls to Effective_Extra_Accessibility in order to support
5077 renames of saooaaats.
5078 (Expand_N_Type_Conversion): Add new local function,
5079 Has_Extra_Accessibility, and call it when determining whether an
5080 accessibility check is needed.
5081 It returns True iff Present (Effective_Extra_Accessibility (Id)) would
5082 evaluate to True (without raising an exception).
5084 (Expand_N_Assignment_Statement): When assigning to an Ada2012
5085 saooaaat, update its associated Extra_Accessibility object (if
5086 it has one). This includes an accessibility check.
5087 * exp_ch6.adb (Add_Call_By_Copy_Code): When parameter copy-back updates
5088 a saooaaat, update its Extra_Accessibility object too (if it
5090 (Expand_Call): Replace a couple of calls to Type_Access_Level
5091 with calls to Dynamic_Access_Level to handle cases where
5092 passing a literal (any literal) is incorrect.
5093 * sem_attr.adb (Resolve_Attribute): Handle the static accessibility
5094 checks associated with "Saooaat := Some_Object'Access;"; this must
5095 be rejected if Some_Object is declared in a more nested scope
5097 * sem_ch5.adb (Analyze_Assignment): Force accessibility checking for an
5098 assignment to a saooaaat even if Is_Local_Anonymous_Access
5099 returns False for its type (indicating a 2012-style saooaaat).
5101 (Analyze_Object_Renaming): Replace a call to Init_Size_Align
5102 (which is only appropriate for objects, not types) with a call
5103 of Init_Object_Size_Align in order to avoid trashing the
5104 Extra_Accessibility attribute of a rename (the two attributes
5107 (Valid_Conversion) Replace six calls to Type_Access_Level with
5108 calls to Deepest_Type_Access_Level. This is a bit tricky. For an
5109 Ada2012 non-library-level saooaaat, the former returns library level
5110 while the latter returns the (static) accessibility level of the
5111 saooaaat. A type conversion to the anonymous type of a saooaaat
5112 can only occur as part of an assignment to the saooaaat, so we
5113 know that such a conversion must be in a lhs context, so Deepest
5114 yields the result that we need. If such a conversion could occur,
5115 say, as the operand of an equality operator, then this might not
5116 be right. Also add a test so that static accessibilty checks are
5117 performed for converting to a saooaaat's type even if
5118 Is_Local_Anonymous_Access yields False for the type.
5120 2011-08-30 Javier Miranda <miranda@adacore.com>
5122 * sem_disp.adb (Check_Dispatching_Operation): Complete condition that
5123 controls generation of a warning associated with late declaration of
5124 dispatching functions. Required to avoid generating spurious
5127 2011-08-30 Gary Dismukes <dismukes@adacore.com>
5129 * sem_ch6.adb (Check_Return_Subtype_Indication): Issue error if the
5130 return object has an anonymous access type and the function's type is
5131 a named access type.
5132 * sem_ch8.adb (Analyze_Object_Renaming): Suppress error about renaming
5133 conversions on implicit conversions, since such conversions can occur
5134 for anonymous access cases due to expansion. Issue error for attempt
5135 to rename an anonymous expression as an object of a named access type.
5136 * sem_res.ads (Valid_Conversion): Add defaulted parameter Report_Errs,
5137 to indicate whether this function should report errors on invalid
5139 * sem_res.adb (Resolve): For Ada 2012, in the case where the type of
5140 the expression is of an anonymous access type and the expected type is
5141 a named general access type, rewrite the expression as a type
5142 conversion, unless this is an expression of a membership test.
5143 (Valid_Conversion.Error_Msg_N): New procedure that conditions the
5144 calling of Error_Msg_N on new formal Report_Errs.
5145 (Valid_Conversion.Error_Msg_NE): New procedure that conditions the
5146 calling of Error_Msg_NE on new formal Report_Errs.
5147 (Valid_Conversion): Move declaration of this function to the package
5148 spec, to allow calls from membership test processing. For Ada 2012,
5149 enforce legality restrictions on implicit conversions of anonymous
5150 access values to general access types, disallowing such conversions in
5151 cases where the expression has a dynamic accessibility level (access
5152 parameters, stand-alone anonymous access objects, or a component of a
5153 dereference of one of the first two cases).
5154 * sem_type.adb (Covers): For Ada 2012, allow an anonymous access type
5155 in the context of a named general access expected type.
5156 * exp_ch4.adb Add with and use of Exp_Ch2.
5157 (Expand_N_In): Add processing for membership tests applied to
5158 expressions of an anonymous access type. First, Valid_Conversion is
5159 called to check whether the test is statically False, and then the
5160 conversion is expanded to test that the expression's accessibility
5161 level is no deeper than that of the tested type. In the case of
5162 anonymous access-to-tagged types, a tagged membership test is applied
5164 (Tagged_Membership): Extend to handle access type cases, applying the
5165 test to the designated types.
5166 * exp_ch6.adb (Expand_Call): When creating an extra actual for an
5167 accessibility level, and the actual is a 'Access applied to a current
5168 instance, pass the accessibility level of the type of the current
5169 instance rather than applying Object_Access_Level to the prefix. Add a
5170 ??? comment, since this level isn't quite right either (will eventually
5171 need to pass an implicit level parameter to init procs).
5173 2011-08-30 Bob Duff <duff@adacore.com>
5175 * s-taskin.ads: Minor comment fix.
5177 2011-08-30 Ed Schonberg <schonberg@adacore.com>
5179 * sem_res.adb (Check_Parameterless_Call): If the node is a selected
5180 component and the selector is a dispatching operation, check if it is
5181 a prefixed call before rewriting as a parameterless function call.
5183 2011-08-29 Jakub Jelinek <jakub@redhat.com>
5185 * gcc-interface/Makefile.in (../stamp-gnatlib1-$(RTSDIR)): Copy
5186 tsystem.h into $(RTSDIR) instead of rts.
5188 2011-08-29 Robert Dewar <dewar@adacore.com>
5190 * sem_ch10.adb, a-coorse.adb, exp_dist.adb, exp_ch3.adb: Minor
5192 * gcc-interface/Make-lang.in: Update dependencies.
5194 2011-08-29 Yannick Moy <moy@adacore.com>
5196 * alfa.ads (Name_Of_Heap_Variable): New constant name.
5197 * lib-xref-alfa.adb, lib-xref.adb, lib-xref.ads (Drefs): New global
5198 table to hold dereferences.
5199 (Add_ALFA_Xrefs): Take into account dereferences as special
5200 reads/writes to the variable "HEAP".
5201 (Enclosing_Subprogram_Or_Package): Move subprogram here.
5202 (Generate_Dereference): New procedure to store a read/write dereferencew
5204 * put_alfa.adb (Put_ALFA): Use different default than (0,0) used for
5205 the special "HEAP" var.
5206 * sem_ch4.adb (Analyze_Explicit_Dereference): Store read dereference
5208 * sem_util.adb (Note_Possible_Modification): Store write dereference
5211 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5213 * exp_ch3.adb (Freeze_Type): Generate an accessibility check which
5214 ensures that the level of the subpool access type is not deeper than
5215 that of the pool object.
5216 * sem_util.adb (Object_Access_Level): Expand to handle defining
5218 * sem_res.adb (Resolve_Allocator): Add a guard to avoid examining the
5219 subpool handle name of a rewritten allocator.
5221 2011-08-29 Robert Dewar <dewar@adacore.com>
5223 * impunit.adb, exp_ch4.adb, s-finmas.adb: Minor reformatting.
5225 2011-08-29 Thomas Quinot <quinot@adacore.com>
5227 * exp_dist.adb (TC_Rec_Add_Process_Element): For a choice with multiple
5228 values, we generate multiple triples of parameters in the TypeCode.
5229 Bump Choice_Index for each such triple so that a subsequent default
5230 choice is associated with the correct index in the typecode.
5232 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5234 * a-cdlili.adb (Iterate): Initialize properly an iterator over a null
5236 (First, Last): Handle properly an iterator over a null container.
5238 2011-08-29 Bob Duff <duff@adacore.com>
5240 * sem_ch10.adb (Analyze_With_Clause,Install_Withed_Unit): Abandon
5241 processing if we run across a node with no Scope. This can happen if
5242 we're with-ing an library-level instance, and that instance got errors
5243 that caused "instantiation abandoned".
5244 * sem_util.adb (Unit_Declaration_Node): Make it more robust, by raising
5245 an exception instead of using Assert, so it won't go into an infinite
5246 loop, even when assertions are turned off.
5248 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5250 * a-coorse.adb: Proper handling of empty ordered sets.
5252 2011-08-29 Johannes Kanig <kanig@adacore.com>
5254 * debug.adb: Add comments.
5256 2011-08-29 Thomas Quinot <quinot@adacore.com>
5258 * a-except.adb, a-except-2005.adb: Minor comment rewording and
5261 2011-08-29 Yannick Moy <moy@adacore.com>
5263 * sem_ch3.adb (Array_Type_Declaration): Remove insertion of
5264 declaration for Itypes in Alfa mode.
5266 2011-08-29 Robert Dewar <dewar@adacore.com>
5268 * a-cdlili.ads, a-coinve.ads, a-coorma.adb, a-coorma.ads, s-tassta.adb,
5269 a-cborma.adb, a-cborma.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
5270 a-cborse.ads, a-cobove.adb, a-cobove.ads, a-cbhase.ads: Minor
5273 2011-08-29 Tristan Gingold <gingold@adacore.com>
5275 * exp_ch7.adb, exp_ch7.ads (Build_Exception_Handler): Move its spec to
5277 * exp_intr.adb (Expand_Unc_Deallocation): Use Build_Exception_Handler.
5278 * a-except.adb, a-except-2005.adb (Rcheck_22): Do not defer aborts
5281 2011-08-29 Robert Dewar <dewar@adacore.com>
5283 * a-cbhama.adb, a-cbhama.ads: Minor reformatting.
5285 2011-08-29 Javier Miranda <miranda@adacore.com>
5287 * sem_ch8.adb (Analyze_Subprogram_Renaming): Complete support for
5288 renamings of formal subprograms when the actual for a formal type is
5291 2011-08-29 Matthew Heaney <heaney@adacore.com>
5293 * a-cbhama.ads, a-cbhase.ads (Move): Clear Source following assignment
5296 2011-08-29 Matthew Heaney <heaney@adacore.com>
5298 * a-cborma.ads, a-cborse.ads (Cursor): Default-initialize all
5299 components of record type.
5300 * a-cborma.adb, a-cborse.adb (Move): Clear Source following assignmentw
5303 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5305 * a-cbhama.adb, a-cbhama.ads, a-cborma.adb, a-cborma.ads, a-cobove.adb,
5306 a-cobove.ads, a-coorma.adb, a-coorma.ads: Add iterator machinery to
5309 2011-08-29 Robert Dewar <dewar@adacore.com>
5311 * sem_ch3.adb, sem_util.adb, gnat1drv.adb, s-parint.ads: Minor
5314 2011-08-29 Matthew Heaney <heaney@adacore.com>
5316 * a-cbhama.ads, a-cbhase.ads (Cursor): Default-initialize all
5317 components of record type.
5319 2011-08-29 Bob Duff <duff@adacore.com>
5321 * s-tassta.adb (Task_Wrapper): Handle and ignore exceptions propagated
5322 by the termination handler.
5324 2011-08-29 Yannick Moy <moy@adacore.com>
5326 * sem_ch3.adb (Array_Type_Declaration): Create declarations for Itypes
5327 created in Alfa mode, instead of inserting artificial declarations of
5328 non-Itypes in the tree.
5329 * sem_util.adb, sem_util.ads (Itype_Has_Declaration): New function to
5330 know if an Itype has a corresponding declaration, as defined in
5333 2011-08-29 Yannick Moy <moy@adacore.com>
5335 * gnat1drv.adb: Minor rewrite.
5337 2011-08-29 Bob Duff <duff@adacore.com>
5339 * s-tasuti.adb (Make_Passive): Work around race condition in
5340 Make_Independent, which can cause Wait_Count to be zero. So instead of
5341 asserting that Wait_Count > 0, and then decrementing it, decrement it
5342 only if Wait_Count > 0.
5343 * s-taskin.ads (Wait_Count, Alive_Count, Awake_Count): All of these
5344 should be nonnegative, so declare them Natural instead of Integer.
5346 2011-08-29 Robert Dewar <dewar@adacore.com>
5348 * exp_ch5.adb, sem_ch3.adb, a-cihama.adb, a-cihama.ads, exp_ch7.adb,
5349 sem_ch5.adb, a-ciorse.adb, a-ciorse.ads, sem_ch12.adb, a-cidlli.adb,
5350 a-cidlli.ads, sem_util.adb, sem_res.adb, gnat1drv.adb, a-except.adb,
5351 a-except.ads, a-except-2005.ads, sem_ch4.adb, exp_disp.adb,
5352 exp_aggr.adb, sem_ch13.adb, par-ch3.adb: Minor reformatting.
5354 2011-08-29 Tristan Gingold <gingold@adacore.com>
5356 * s-auxdec-vms-alpha.adb: Add comments, remove some HT before labels.
5358 2011-08-29 Vadim Godunko <godunko@adacore.com>
5360 * s-parint.ads: Minor comment clarification.
5362 2011-08-29 Vincent Celier <celier@adacore.com>
5364 * prj.adb (Initialize): Make sure that new reserved words after Ada 95
5365 may be used as identifiers.
5367 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5369 * a-coinho.ads: Minor reformating.
5371 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5373 * exp_ch5.adb (Expand_Iterator_Loop): Handle properly a loop over a
5374 container of a derived type.
5376 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5378 * a-cidlli.adb, a-cidlli.ads, a-cihama.adb, a-cihama.ads,
5379 a-ciorse.adb, a-ciorse.ads: Add iterator machinery to containers.
5381 2011-08-29 Pascal Obry <obry@adacore.com>
5383 * exp_disp.adb: Minor comment fix.
5384 (Make_Disp_Asynchronous_Select_Body): Properly initialize out parameters
5385 to avoid warnings when compiling with -Wall.
5386 (Make_Disp_Conditional_Select_Body): Likewise.
5387 (Make_Disp_Timed_Select_Body): Likewise.
5389 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5391 * sem_ch12.adb (Analyze_Formal_Subprogram_Declaration): If default is
5392 an entity name, generate reference for it.
5394 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5396 * exp_ch5.adb (Expand_Iterator_Loop): Uniform handling of "X of S"
5398 * sem_util.adb (Is_Iterator, Is_Reversible_Iterator): Yield True for
5399 the class-wide type.
5400 * sem_ch5.adb: Move some rewriting to the expander, where it belongs.
5402 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5404 * sem_ch8.adb (Check_Constrained_Object): Do not create an actual
5405 subtype for an object whose type is an unconstrained union.
5407 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5409 * par-ch3.adb (P_Array_Type_Definiation, P_Component_Items): "aliased"
5410 is allowed in a component definition, by AI95-406.
5412 2011-08-29 Matthew Heaney <heaney@adacore.com>
5414 * a-chtgbo.adb (Generic_Iteration): Use correct overloading of Next.
5416 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5418 * a-except-2005.adb: Alphabetize all routines.
5419 (Triggered_By_Abort): New routine.
5420 * a-except-2005.ads (Triggered_By_Abort): New routine.
5421 * a-except.adb Alphabetize all routines.
5422 (Triggered_By_Abort): New routine.
5423 * a-except.ads (Triggered_By_Abort): New routine.
5424 * exp_ch7.adb: Update all comments involving the detection of aborts in
5426 (Build_Object_Declarations): Do not generate code to detect the
5427 presence of an abort at the start of finalization code, use a runtime
5429 * rtsfind.ads: Add RE_Triggered_By_Abort to tables RE_Id and
5431 * sem_res.adb (Resolve_Allocator): Emit a warning when attempting to
5432 allocate a task on a subpool.
5433 * s-stposu.adb: Add library-level flag Finalize_Address_Table_In_Use.
5434 The flag disables all actions related to the maintenance of
5435 Finalize_Address_Table when subpools are not in use.
5436 (Allocate_Any_Controlled): Signal the machinery that subpools are in
5438 (Deallocate_Any_Controlled): Do not call Delete_Finalize_Address which
5439 performs costly task locking when subpools are not in use.
5441 2011-08-29 Yannick Moy <moy@adacore.com>
5443 * gnat1drv.adb (Adjust_Global_Switches): Restore expansion of tagged
5444 types and dispatching calls in Alfa mode.
5445 * lib-xref-alfa.adb (Collect_ALFA): Rewrite computation of
5446 correspondance between body and spec scopes, to reuse utility functions
5447 (Traverse_Declarations_Or_Statements): Protect access to body for stub
5448 by testing the presence of the library unit for the body
5449 * sem_ch6.adb (Set_Actual_Subtypes): take into account that in Alfa
5450 mode the expansion of accept statements is skipped
5451 * sem_util.adb, sem_util.ads (Unique_Entity): New function returning
5452 the unique entity corresponding to the one returned by
5453 Unique_Defining_Entity applied to the enclosing declaration of the
5456 2011-08-29 Bob Duff <duff@adacore.com>
5458 * treepr.ads: Improve debugging facilities. pn(x) no longer crashes in
5459 gdb when x is not a node (it can be a node list, name_id, etc). pp is
5460 an alias for pn. ppp is an alias for pt.
5462 2011-08-29 Javier Miranda <miranda@adacore.com>
5464 * exp_aggr.adb (Expand_Record_Aggregate): Use the top-level enclosing
5465 aggregate to take a consistent decision on the need to convert into
5466 assignments aggregates that initialize constant objects.
5468 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5470 * exp_ch4.adb (Expand_Allocator_Expression): Add a call to
5471 Build_Allocate_Deallocate_Proc in order to handle allocation of
5472 non-controlled objects on subpools.
5473 * impunit.adb: Remove s-finmas and s-spsufi since they were never meant
5474 to be end-user visible.
5475 * s-finmas.adb: Add with and use clause for System.HTable.
5476 Add an instantiation of Simple_HTable which provides a mapping between
5477 the address of a controlled object and the corresponding
5478 Finalize_Address used to clean up the object. The table is used when a
5479 master is operating in heterogeneous mode.
5480 (Attach): Explain why the input node is not verified on being already
5482 (Delete_Finalize_Address): New routine.
5483 (Detach): Add pragma Assert which ensures that a node is already
5485 (Finalize): Add local variable Cleanup. Rewrite the iteration scheme
5486 since nodes are no longer removed on traversal. Explain why node
5487 detachment is undesirable in this case.
5488 (Get_Finalize_Address): New routine.
5489 (Hash): New routine.
5490 (Is_Empty_List): Removed.
5491 (pm): Renamed to Print_Master. Add output for discriminant
5493 Comment reformatting.
5494 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
5495 * s-finmas.ads: Various comments additions / improvements.
5496 Type Finalization_Master has a discriminant which determines the mode of
5498 (Delete_Finalize_Address): New routine.
5499 (Get_Finalize_Address): New routine.
5500 (pm): Renamed to Print_Master.
5501 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
5502 * s-stposu.adb: Add with clause for System.Address_Image; Add with and
5503 use clause for System.IO.
5504 (Allocate_Any_Controlled): Add machinery to set TSS primitive
5505 Finalize_Address depending on the mode of allocation and the mode of
5507 (Deallocate_Any_Controlled): Remove the relation pair object -
5508 Finalize_Address regardless of the master mode. Add comment explaining
5510 (Detach): Ensure that fields Prev and Next are null after detachment.
5511 (Finalize_Pool): Remove local variable Next_Ptr. Rewrite the iteration
5512 scheme to check whether the list of subpools is empty. There is no
5513 longer need to store the next subpool or advance the current pointer.
5514 (Is_Empty_List): New routine.
5515 (Print_Pool): New routine.
5516 (Print_Subpool): New routine.
5517 * s-stposu.ads: Various comments additions / improvements.
5518 Field Master of type Root_Subpool is now a heterogeneous collection.
5519 (Print_Pool): New routine.
5520 (Print_Subpool): New routine.
5522 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5524 * exp_ch5.adb (Expand_N_Iterator_Loop): Implement Ada2012 loop iterator
5525 forms, using aspects of container types.
5526 * sem_ch3.adb (Find_Type_Name): Preserve Has_Delayed_Aspects and
5527 Has_Implicit_Dereference flags, that may be set on the partial view.
5528 * sem_ch4.adb (Process_Overloaded_Indexed_Component): Prefix may be a
5529 container type with an indexing aspect.
5530 (Analyze_Quantified_Expression): Analyze construct with expansion
5531 disabled, because it will be rewritten as a loop during expansion.
5532 (Try_Container_Indexing): The prefix itself may be a container type
5533 with an indexing aspect, as with a vector of vectors.
5534 * sem_ch5.adb (Analyze_Iteration_Scheme): In a generic context, analyze
5535 the original doamin of iteration, for name capture.
5536 (Analyze_Iterator_Specification): If the domain is an expression that
5537 needs finalization, create a separate declaration for it.
5538 For an iterator with "of" retrieve default iterator info from aspect of
5539 container type. For "in" iterator, retrieve type of Iterate function.
5540 * sem_ch13.adb (Check_Iterator_Function): Fix typo.
5541 (Check_Aspect_At_End_Of_Declaration): Make type unfrozen before
5542 analysis, to prevent spurious errors about late attributes.
5543 * sprint.adb: Handle quantified expression with either loop or iterator
5545 * a-convec.ads, a-convec.adb: Iterate function returns a reversible
5548 2011-08-29 Vincent Celier <celier@adacore.com>
5550 * make.adb (Scan_Make_Arg): Take any option as is in packages Compiler,
5551 Binder or Linker of the main project file.
5553 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5555 * inline.adb (Add_Scopes_To_Clean): Exclude any entity within a generic
5558 2011-08-29 Yannick Moy <moy@adacore.com>
5560 * exp_ch9.adb: Partial revert of previous change for Alfa mode
5562 2011-08-29 Yannick Moy <moy@adacore.com>
5564 * exp_ch11.adb: Minor expansion of comment.
5566 2011-08-29 Yannick Moy <moy@adacore.com>
5568 * lib-xref-alfa.adb (Add_ALFA_Scope): Treat generic entities.
5570 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5572 * sem_res.adb (Resolve_Arithmetic_Op): If the node has a universal
5573 interpretation, set the type before resolving the operands, because
5574 legality checks on an exponention operand need to know the type of the
5577 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5579 * sem_ch12.adb (Analyze_Package_Instantiation): Do not set delayed
5580 cleanups on a master if the instance is within a generic unit.
5581 Complement to the corresponding fix to inline.adb for K520-030.
5583 2011-08-29 Tristan Gingold <gingold@adacore.com>
5585 * exp_ch7.adb (Build_Raise_Statement): Raise PE instead of the current
5587 * exp_intr.adb: Minor comment fix.
5589 2011-08-29 Bob Duff <duff@adacore.com>
5591 * sem_ch13.adb (Analyze_Aspect_Specifications): Fix cases where
5592 Delay_Required was used as an uninitialized variable.
5594 2011-08-29 Robert Dewar <dewar@adacore.com>
5596 * a-cdlili.adb, a-cdlili.ads, a-coinve.adb, a-coinve.ads,
5597 sem_util.adb, sem_util.ads, a-cohama.adb, a-cohama.ads, a-coorse.adb,
5598 a-coorse.ads, aspects.ads, sem_ch8.adb: Minor reformatting.
5600 2011-08-29 Thomas Quinot <quinot@adacore.com>
5602 * system-freebsd-x86_64.ads (Backend_Overflow_Checks): Set true True.
5603 Remove unused variables.
5605 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5607 * sem_res.adb: Remove Build_Explicit_Dereference.
5608 * sem_util.adb, sem_util.ads (Build_Explicit_Dereference): Moved here
5609 from sem_res.adb, used in analysis of additional constructs.
5610 (Is_Iterator, Is_Reversible_Iterator): New predicates for Ada2012
5611 expansion of iterators.
5612 (Is_Object_Reference): Recognize variables rewritten as explicit
5613 dereferences in Ada2012.
5614 * snames.ads-tmpl: Add Has_Element, Forward_Iterator,
5615 Reversible_Iterator names, for expansion of Ada2012 iterators.
5616 * aspects.ads, aspects.adb (Find_Aspect): Utility.
5617 * a-cdlili.ads, a-cdlili.adb: Add new iterator machinery to doubly
5618 linked list container.
5619 * a-coinve.ads, a-coinve.adb: Ditto for indefinite vector containers.
5620 * a-coorse.ads, a-coorse.adb: Ditto for ordered sets.
5622 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5624 * a-cohama.adb, a-cohama.ads: Add iterator primitives to hashed map
5627 2011-08-29 Vincent Celier <celier@adacore.com>
5629 * make.adb (Gnatmake): Get the maximum number of simultaneous
5630 compilation processes after the Builder switches has been scanned, as
5631 there may include -jnn.
5633 2011-08-29 Matthew Heaney <heaney@adacore.com>
5635 * a-chtgbo.adb (Generic_Equal): Use correct overloading of Next.
5637 2011-08-29 Tristan Gingold <gingold@adacore.com>
5639 * gnatcmd.adb (GNATCmd): On OpenVMS, truncate the length of
5640 GNAT_DRIVER_COMMAND_LINE to 255.
5642 2011-08-29 Pascal Obry <obry@adacore.com>
5644 * freeze.adb, sem_ch8.adb, a-convec.adb, a-convec.ads: Minor
5645 reformatting and style fix (class attribute casing).
5647 2011-08-29 Yannick Moy <moy@adacore.com>
5649 * exp_ch11.adb: Yet another case where expansion should be common
5650 between CodePeer and Alfa.
5652 2011-08-29 Yannick Moy <moy@adacore.com>
5654 * exp_ch9.adb: Partial revert of previous change for Alfa mode.
5656 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5658 * sem_ch6.adb (Matches_Limited_With_View): The limited views of an
5659 incomplete type and its completion match.
5661 2011-08-29 Yannick Moy <moy@adacore.com>
5663 * exp_ch13.adb: Adjust previous change.
5665 2011-08-29 Robert Dewar <dewar@adacore.com>
5667 * sem_prag.adb, prj.adb, sem_util.adb, sem_res.adb, gnat1drv.adb,
5668 exp_ch4.adb, sem_ch8.adb: Minor code reorganization
5671 2011-08-29 Emmanuel Briot <briot@adacore.com>
5673 * make.adb, prj.adb, prj.ads (Compute_All_Imported_Projects): Also
5674 initialize aggregated projects.
5676 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5678 * sem_ch8.adb (Find_Renamed_Entity): Within an instance, use scope
5679 depth of candidates to resolve a potentially spurious ambiguity between
5680 two visible subprograms.
5682 2011-08-29 Yannick Moy <moy@adacore.com>
5684 * sem_prag.adb (Analyze_Pragma): Allow Test_Case pragma without
5686 * sem_util.adb (Get_Ensures_From_Test_Case_Pragma,
5687 Get_Requires_From_Test_Case_Pragma): Allow Test_Case pragma without
5690 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5692 * gnat1drv.adb (Adjust_Global_Switches): Improve previous change.
5695 2011-08-29 Thomas Quinot <quinot@adacore.com>
5697 * sem_res.adb: Minor reformatting.
5699 2011-08-29 Johannes Kanig <kanig@adacore.com>
5701 * exp_ch4.adb (Expand_Quantified_Expression): Do not expand in ALFA
5703 * gnat1drv.adb (Adjust_Global_Switches): Set
5704 Use_Expressions_With_Actions to False in ALFA mode.
5705 * sem_res.adb (Resolve_Quantified_Expression): Simpler treatment in
5708 2011-08-29 Yannick Moy <moy@adacore.com>
5710 * exp_ch13.adb (Expand_N_Freeze_Entity): Do nothing in Alfa mode.
5711 * exp_ch9.adb: Do not expand tasking constructs in Alfa mode.
5712 * gnat1drv.adb (Adjust_Global_Switches): Suppress the expansion of
5713 tagged types and dispatching calls in Alfa mode.
5715 2011-08-29 Javier Miranda <miranda@adacore.com>
5717 * sem_ch3.adb (Process_Discriminants): Add missing check to ensure that
5718 we do not report an error on an Empty node.
5720 2011-08-29 Geert Bosch <bosch@adacore.com>
5722 * Makefile.rtl (GNATRTL_NONTASKING_OBJECTS): Add a-nllrar.o,
5723 a-nlrear.o and a-nurear.o.
5725 2011-08-29 Robert Dewar <dewar@adacore.com>
5727 * freeze.adb: Minor code reorganization.
5729 * sem_util.adb, errout.adb, exp_ch11.adb, a-ngrear.adb, s-gearop.adb,
5730 sem_ch6.adb: Minor reformatting
5732 2011-08-29 Tristan Gingold <gingold@adacore.com>
5734 * s-except.ads, s-except.adb: Provide dummy body.
5736 2011-08-29 Yannick Moy <moy@adacore.com>
5738 * sem_warn.adb (Within_Postcondition): Take into account the case of
5739 an Ensures component in a Test_Case.
5741 2011-08-29 Tristan Gingold <gingold@adacore.com>
5743 * s-excdeb.ads, s-excdeb.adb: New files, created from s-except.
5744 * rtsfind.ads (RTU_Id): Replaces System_Exceptions by
5745 System_Exceptions_Debug
5746 (RE_Unit_Table): Search RE_Local_Raise in System_Exceptions_Debug
5747 * a-except.adb: With and use System.Exceptions_Debug instead of
5749 * a-except-2005.adb: Likewise.
5750 * s-assert.adb: Likewise.
5751 * s-except.adb, s-except.ads: Move debugging hooks to s-excdeb.
5752 * Makefile.rtl: Add s-excdeb. Adjust compilation rule.
5753 * gcc-interfaces/Makefile.in, gcc-interface/Make-lang.in: Add
5754 s-excdeb. Update dependencies.
5755 (GNATRTL_LINEARALGEBRA_OBJS): Remove a-nlrear.o a-nurear.o a-nllrar.o
5756 as these no longer need external libraries.
5758 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5760 * sem_res.adb (Resolve_Op_Expon): Additional check to reject an
5761 exponentiation operator on universal values in a context that requires
5764 2011-08-29 Tristan Gingold <gingold@adacore.com>
5766 * raise-gcc.c (personnality_routine): Fix thinko. Set Ada occurrence
5767 before calling notify_handled_exception.
5768 * a-exextr.adb: Fix comment.
5770 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5772 * exp_ch4.adb (Expand_Allocator_Expression): Add code to set attribute
5773 Finalize_Address of the access type's finalization master.
5774 (Expand_N_Allocator): Add code to set attribute Finalize_Address of the
5775 access type's finalization master. Add a guard to prevent
5776 Associated_Storage_Pool from being set on .NET/JVM.
5777 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add code to set
5778 attribute Finalize_Address of the access type's finalization master.
5779 * exp_ch7.adb (Make_Finalize_Address_Call): New routine.
5780 * exp_ch7.ads (Make_Finalize_Address_Call): New routine.
5781 * rtsfind.ads: Add RE_Set_Finalize_Address to tables RE_Id and
5783 * s-finmas.adb: Add with clause for System.Address_Image. Add with and
5784 use clause for System.IO
5785 (Detach): Relax the assertion, to be reinstated later.
5786 (Finalize): Rewrite the iteration loop to avoid pointer comparison.
5787 Relax the assertion on Finalize_Address, to be reinstated later.
5788 (Is_Empty_List): New routine.
5789 (pm): New debug routine.
5790 (Set_Finalize_Address): New routine.
5791 * s-finmas.ads (pm): New debug routine.
5792 (Set_Finalize_Address): New routine.
5793 * s-stposu.adb (Allocate_Any_Controlled): Code reformatting.
5795 2011-08-29 Tristan Gingold <gingold@adacore.com>
5797 * a-exexpr-gcc.adb (GCC_Exception_Access, GNAT_GCC_Exception_Access):
5798 Remove convention C.
5800 2011-08-29 Tristan Gingold <gingold@adacore.com>
5802 * s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove.
5803 (Initialize_TCB): Remove Exc_Stack_Ptr initialization.
5804 (Finalize_TCB): Remove its finalization.
5805 (Initialize): Remove assignment of GET_Exc_Stack_Addr
5806 * s-soflin.adb (NT_Exc_Stack): Remove
5807 (Get_Exc_Stack_Addr_NT): Likewise.
5808 (Get_Exc_Stack_Addr_Soft): Likewise.
5809 * s-soflin.ads (Get_Exc_Stack_Addr_NT): Remove.
5810 (Get_Exc_Stack_Addr): Likewise.
5811 (Get_Exc_Stack_Addr_Soft): Likewise
5812 * s-taspri-vms.ads (Exc_Stack_T): Remove.
5813 (Exc_Stack_Ptr_T): Likewise.
5814 (Private_Data): Remove Exc_Stack_Ptr component.
5816 2011-08-29 Tristan Gingold <gingold@adacore.com>
5818 * raise-gcc.c (get_ip_from_context): New function. Factorize code.
5820 2011-08-29 Tristan Gingold <gingold@adacore.com>
5822 * gnat_ugn.texi: Fix aix and x86-solaris info for run-time.
5824 2011-08-29 Geert Bosch <bosch@adacore.com>
5826 * s-gearop.ads (Back_Substitute, Diagonal, Forward_Eliminate,
5827 L2_Norm, Swap_Column): New generic subprograms
5828 * s-gearop.adb (Back_Substitute, Diagonal, Forward_Eliminate,
5829 L2_Norm, Swap_Column): Implement new subprograms in order to
5830 eliminate dependency on BLAS and LAPACK libraries in
5831 Ada.Numerics.Generic_Real_Arrays and eventually also the complex
5832 version. Forward_Eliminate/Back_Substitute can be used to put a
5833 matrix in row echelon or reduced row echelon form using partial
5835 * a-ngrear.adb: (Back_Substitute, Diagonal, Forward_Eleminate,
5836 Swap_Column): Instantiate from System.Generic_Array_Operations.
5837 ("*", "abs"): Implement by instantiation from Generic_Array_Operations.
5838 (Sqrt): Local function for simple computation of square root without
5839 adding dependencies on Generic_Elementary_Functions.
5840 (Swap): New subprogram to exchange floating point numbers.
5841 (Inverse): Reimplement using Jordan-Gauss elimination.
5842 (Jacobi): New procedure implementing Jacobi's method for computation
5843 of eigensystems, based on Rutishauser's implementation.
5844 (L2_Norm): Implement directly using the inner product.
5845 (Sort_Eigensystem): Sort eigenvalue/eigenvector pairs in order of
5846 decreasing eigenvalue as required by the Ada RM.
5847 (Swap_Column): New helper procedure for Sort_Eigensystem.
5848 Remove with of System.Generic_Real_BLAS and System.Generic_Real_LAPACK.
5849 Add with of Ada.Containers.Generic_Anonymous_Array_Sort, for
5852 2011-08-29 Thomas Quinot <quinot@adacore.com>
5854 * put_scos.adb (Put_SCOs): Do not emit a newline for an empty
5857 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5859 * s-finmas.adb (Finalize): Check Finalize_Address of the master rather
5860 than the current node.
5861 * s-finmas.ads: Move field Finalize_Address from type FM_Node to
5862 Finalization_Master. The list headers have two fields instead of three.
5863 This should fix alignment issue but subpool allocations are now
5864 unusable. Alphabetize subprograms.
5865 * s-stposu.adb (Allocate_Any_Controlled): Use the offset rather than
5866 the size of the header when converting the beginning of the object to
5867 a FM_Node. Set the master's Finalize_Address attribute if not already
5869 (Deallocate_Any_Controlled): Use the offset rather than the size of the
5870 header when converting the beginning of the object to a FM_Node.
5872 2011-08-29 Gary Dismukes <dismukes@adacore.com>
5874 * exp_ch11.adb (Expand_N_Raise_Statement): Don't suppress expansion of
5875 reraise when compiling for CodePeer.
5877 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5879 * a-iteint.ads, Makefile.rtl: Add missing compilation of a-iteint.ads,
5880 now needed by a-convec.adb. Fix warning.
5882 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5884 * exp_util.adb (Build_Allocate_Deallocate_Proc): Add a guard for the
5885 processing of TSS routine Finalize_Address when compiling in
5888 2011-08-29 Thomas Quinot <quinot@adacore.com>
5890 * a-strunb.ads, einfo.ads, g-comlin.ads, sem_ch6.adb,
5891 sem_warn.adb: Minor reformatting.
5893 2011-08-29 Emmanuel Briot <briot@adacore.com>
5895 * prj-conf.adb (Get_Config_Switches): Also collect the list of
5896 languages from aggregated projects.
5898 2011-08-29 Yannick Moy <moy@adacore.com>
5900 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Declarations_Or_Statements,
5901 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
5902 Traverse_Package_Declaration, Traverse_Subprogram_Body,
5903 Traverse_Compilation_Unit): Add a parameter Inside_Stubs so that bodies
5904 for stubs are traversed too when parameter is set
5905 (Traverse_All_Compilation_Units): Traverse without going inside stubs
5906 (Traverse_Declarations_Or_Statements): Do the special traversing for
5907 stubs when required.
5908 * sem_util.adb, sem_util.ads (Get_Body_From_Stub): New function to
5909 return subprogram or package body from stub.
5910 (Is_Subprogram_Stub_Without_Prior_Declaration): New function to detect
5911 stubs without prior subprogram decl.
5913 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
5915 * gnat_ugn.texi: Fix typo.
5917 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5919 * s-stposu.adb (Allocate_Any_Controlled): Reimplement the mechanism
5920 which accounts for size vs alignment issues and calculates the size of
5922 (Deallocate_Any_Controlled): Ditto.
5923 (Nearest_Multiple_Rounded_Up): New routine.
5925 2011-08-29 Tristan Gingold <gingold@adacore.com>
5927 * a-exstat.adb (String_To_EO): Do no set Cleanup_Flag.
5928 * a-exexda.adb (Set_Exception_C_Msg): Ditto.
5929 (Set_Exception_Msg): Ditto.
5930 * a-exexpr-gcc.adb (Setup_Current_Excep): Ditto. Do not set
5932 * a-except.adb, a-except-2005.adb (Save_Occurrence_No_Private): Remove.
5933 Use Save_Occurrence instead of Save_Occurrence_No_Private.
5934 (Raise_With_Msg): Remove Cleanup_Flag.
5935 * a-except.ads, a-except-2005.ads (Exception_Occurrence): Remove
5936 Clean_Flag and Private_Data components.
5938 2011-08-29 Yannick Moy <moy@adacore.com>
5940 * freeze.adb (Freeze_Record_Type): Ignore packing in Alfa mode, like
5942 * sem_ch3.adb (Signed_Integer_Type_Declaration): Correct the generation
5943 of an explicitly declared type, so that the base types of the original
5944 type and this generated type are the same, and a "type" (not a subtype
5946 * errout.adb (Special_Msg_Delete): Do not issue messages "Size too
5947 small" in Alfa mode, like in CodePeer mode.
5948 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore rep
5949 clauses in Alfa mode.
5951 2011-08-29 Javier Miranda <miranda@adacore.com>
5953 * exp_ch6.ads, exp_ch6.adb (Is_Null_Procedure): Move the spec of this
5954 function to the package spec.
5955 * sem_ch6.adb (Find_Corresponding_Spec, New_Overloaded_Entity): For
5956 internally generated bodies of null procedures locate the internally
5957 generated spec enforcing mode conformance.
5958 (Is_Interface_Conformant): Ensure that the controlling formal of the
5961 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5963 * sem_prag.adb (Analyze_Pragma, case Inline): In an instance, do not
5964 reject the pragma if it appears to apply to a formal subprogram.
5966 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5968 * exp_ch4.adb (Expand_Allocator_Expression): Use consistent name for
5969 inner expression, to prevent double evaluation.
5971 2011-08-29 Tristan Gingold <gingold@adacore.com>
5973 * a-exexpr.adb (Propagate_Exception): Remove all the parameters as
5975 * a-exexpr-gcc.adb (Propagate_Exception): Ditto.
5976 * a-except-2005.adb (Propagate_Exception): Adjust spec.
5977 (Raise_Current_Excep): Adjust call.
5978 (Raise_From_Signal_Handler): Call now simply call Raise_Current_Excep.
5980 2011-08-29 Thomas Quinot <quinot@adacore.com>
5982 * exp_disp.adb: Minor reformatting.
5984 2011-08-29 Tristan Gingold <gingold@adacore.com>
5986 * a-exexpr.adb (Setup_Exception): Removed.
5987 * a-exexpr-gcc.adb (Setup_Exception): Removed.
5988 * a-except.adb (Exception_Propagation): Removed.
5989 * a-except-2005.adb (Setup_Exception): Removed.
5990 (Reraise): Remove call to Setup_Exception.
5991 (Reraise_Occurrence): Ditto.
5992 (Reraise_Occurrence_Always): Ditto.
5993 (Reraise_Occurrence_No_Defer): Ditto.
5994 (Transfer_Occurrence): Ditto.
5995 * a-exexda.adb (Set_Exception_C_Msg): Remove call to Setup_Exception.
5996 (Set_Exception_Msg): Ditto.
5998 2011-08-29 Robert Dewar <dewar@adacore.com>
6000 * a-convec.adb, exp_disp.adb: Minor reformatting.
6002 2011-08-29 Tristan Gingold <gingold@adacore.com>
6004 * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C.
6006 2011-08-29 Gary Dismukes <dismukes@adacore.com>
6008 * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set
6009 Exception_Handlers to No_List instead of Empty_List in the case where
6010 there are no handlers.
6012 2011-08-29 Tristan Gingold <gingold@adacore.com>
6014 * gcc-interface/gigi.h (enum standard_datatypes): Add
6015 ADT_reraise_zcx_decl
6016 (reraise_zcx_decl): New macro.
6017 * gcc-interface/trans.c (gnu_incoming_exc_ptr): New variable.
6018 (gigi): Set reraise_zcx_decl.
6019 (Exception_Handler_to_gnu_zcx): Save and restore gnu_incoming_exc_ptr.
6020 (gnat_to_gnu): Handle N_Raise_Statement.
6022 2011-08-29 Robert Dewar <dewar@adacore.com>
6024 * sem_ch6.adb, exp_ch3.adb, s-stposu.adb, a-undesu.ads,
6025 a-undesu.adb: Minor reformatting.
6027 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6029 * exp_disp.adb (Check_Premature_Freezing): When building a dispatch
6030 table, accept an unfrozen untagged component if it is an actual for a
6031 formal incomplete type.
6032 * a-convec.ads, a-convec.adb: Instantiate Ada.Iterator_Interfaces to
6033 provide new iterator forms over vectors.
6034 Introduce type Iterator in package body to implement operations of
6035 Reversible_Iterator interface.
6036 * a-iteint.ads: Make package pure so it is usable with new container
6037 packages, that are categorized Remote_Types.
6039 2011-08-29 Robert Dewar <dewar@adacore.com>
6041 * a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting.
6043 2011-08-29 Bob Duff <duff@adacore.com>
6045 * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case
6046 of <>, because this is the routine that checks for dimensionality
6047 errors (for example, for a two-dimensional array, (others => <>) should
6048 be (others => (others => <>)).
6050 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
6052 * impunit.adb: Add new run-time units.
6053 * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb,
6054 s-stposu.ads, s-stposu.adb: Code clean up.
6055 Handle protected class-wide or task class-wide types
6056 Handle C/C++/CIL/Java types.
6057 * s-spsufi.adb, s-spsufi.ads: New files.
6059 2011-08-29 Yannick Moy <moy@adacore.com>
6061 * sem_ch13.adb (Analyze_Aspect_Specifications): Reject test-case on
6062 library-level subprogram.
6063 * sem_prag.adb (Check_Test_Case): Stricter rules for test-case
6065 (Analyze_Pragma): Change name "Normal" for "Nominal" in test-case
6067 * snames.ads-tmpl: Change name "Normal" for "Nominal" in test-case
6069 * gnat_rm.texi: Update doc for Test_Case pragma.
6071 2011-08-29 Tristan Gingold <gingold@adacore.com>
6073 * a-exexpr-gcc.adb (Unwind_Exception): Remove default value, made it
6075 (GCC_Exception_Access): New type.
6076 (Unwind_DeleteException): New imported procedure
6077 (Foreign_Exception): Import it.
6078 (GNAT_GCC_Exception): Simply have the occurrence inside.
6079 (To_GCC_Exception): New function.
6080 (To_GNAT_GCC_Exception): New function.
6081 (GNAT_GCC_Exception_Cleanup): New procedure..
6082 (Propagate_GCC_Exception): New procedure.
6083 (Reraise_GCC_Exception): New procedure.
6084 (Setup_Current_Excep): New procedure.
6085 (CleanupUnwind_Handler): Change type of UW_Exception parameter.
6086 (Unwind_RaiseException): Ditto.
6087 (Unwind_ForcedUnwind): Ditto.
6089 (Begin_Handler): Change type of parameter.
6090 (End_Handler): Ditto. Now delete the exception if still present.
6091 (Setup_Key): Removed.
6092 (Is_Setup_And_Not_Propagated): Removed.
6093 (Set_Setup_And_Not_Propagated): Ditto.
6094 (Clear_Setup_And_Not_Propagated): Ditto.
6095 (Save_Occurrence_And_Private): Ditto.
6096 (EID_For): Add 'not null' constraint on parameter.
6097 (Setup_Exception): Does nothing.
6098 (Propagate_Exception): Simplified.
6099 * exp_ch11.adb (Expand_N_Raise_Statement): In back-end exception model,
6100 re-raise is not expanded anymore.
6101 * s-except.ads (Foreign_Exception): New exception - placeholder for
6103 * raise-gcc.c (__gnat_setup_current_excep): Declare
6104 (CXX_EXCEPTION_CLASS): Define (not yet used)
6105 (GNAT_EXCEPTION_CLASS): Define.
6106 (is_handled_by): Handle foreign exceptions.
6107 (PERSONALITY_FUNCTION): Call __gnat_setup_current_excep.
6109 2011-08-29 Jose Ruiz <ruiz@adacore.com>
6111 * a-synbar.adb (Synchronous_Barrier): Some additional clarification.
6113 2011-08-29 Thomas Quinot <quinot@adacore.com>
6115 * a-synbar-posix.adb: Minor reformatting.
6117 2011-08-29 Jose Ruiz <ruiz@adacore.com>
6119 * a-exetim-posix.adb, a-exetim-mingw.adb, a-exetim-mingw.ads,
6120 a-exetim-default.ads (Interrupt_Clocks_Supported,
6121 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
6122 definitions to be compliant with AI-0171. The target systems do not
6123 support separate account for the execution time of interrupt handlers.
6125 2011-08-29 Jose Ruiz <ruiz@adacore.com>
6127 * a-synbar.adb (Wait): Change the order of evaluation of the conditions
6128 in the barrier to put first the easiest to evaluate (and the one which
6129 will be True more often). More efficient.
6131 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
6133 * s-atocou-x86.adb: Fix constraint in machine code insertion.
6135 2011-08-29 Bob Duff <duff@adacore.com>
6137 * aspects.ads, aspects.adb: Add new aspects for various pragmas and
6138 attributes that are now aspects, as specified by AI05-0229-1.
6139 * sem_ch13.adb (Analyze_Aspect_Specifications,
6140 Check_Aspect_At_Freeze_Point): Analyze the new aspects. Turn them into
6141 pragmas or attribute references, as appropriate.
6143 2011-08-29 Robert Dewar <dewar@adacore.com>
6145 * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
6146 a-synbar-posix.ads: Minor reformatting.
6148 2011-08-29 Yannick Moy <moy@adacore.com>
6150 * snames.ads-tmpl: Add name Force.
6152 2011-08-29 Pascal Obry <obry@adacore.com>
6154 * prj-nmsc.adb: Minor reformatting.
6156 2011-08-29 Jose Ruiz <ruiz@adacore.com>
6158 * a-exetim.ads (Interrupt_Clocks_Supported,
6159 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
6160 definitions to be compliant with AI-0171.
6162 2011-08-29 Robert Dewar <dewar@adacore.com>
6164 * a-ngelfu.adb: Add comments.
6166 2011-08-29 Geert Bosch <bosch@adacore.com>
6168 * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
6169 the closest machine number to Pi / 2.0.
6171 2011-08-29 Jose Ruiz <ruiz@adacore.com>
6173 * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
6174 package Ada.Synchronous_Barriers.
6175 * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
6176 Add new specs and bodies for Ada.Synchronous_Barriers. There is a
6177 default implementation using protected objects and another one
6178 a-synbar-posix using POSIX barriers as the underlying support.
6179 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
6180 x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
6181 Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
6182 Clean up dependencies.
6183 * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
6185 2011-08-29 Robert Dewar <dewar@adacore.com>
6187 * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
6188 exp_dist.adb: Minor code reorganization.
6191 2011-08-29 Thomas Quinot <quinot@adacore.com>
6193 * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
6194 primitive operation must support external streaming if it is not a
6195 controlling access result.
6197 2011-08-29 Thomas Quinot <quinot@adacore.com>
6199 * sinfo.ads, sem_ch7.adb: Minor reformatting.
6201 2011-08-29 Bob Duff <duff@adacore.com>
6203 * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
6204 restriction on allocators, as required by AI05-0013-1.
6205 * restrict.ads: Minor comment fix.
6207 2011-08-29 Tristan Gingold <gingold@adacore.com>
6209 * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
6210 (To_Jmpbuf_Address): Ditto
6211 (builtin_longjmp): Ditto
6213 2011-08-29 Thomas Quinot <quinot@adacore.com>
6215 * sem_res.adb: Minor reformatting.
6217 2011-08-29 Vincent Celier <celier@adacore.com>
6219 * make.adb (Gnatmake): Move special processing for VM targets after the
6220 call to Get_Target_Parameters.
6222 2011-08-29 Thomas Quinot <quinot@adacore.com>
6224 * sem_ch12.adb, par-ch12.adb: Minor reformatting.
6226 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
6228 * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
6229 where an anonymous access discriminant of a limited designated type
6230 appears in a non-immutably limited discriminated type and issue an
6231 error message. Add local variable Desig_T and replace all occurrences
6234 2011-08-29 Jose Ruiz <ruiz@adacore.com>
6236 * a-rttiev.adb (Set_Handler): Update comment to indicate that our
6237 implementation is compliant to RM D.15(15/2) after the modification
6238 imposed by AI05-0094-1 (binding interpretation).
6240 2011-08-29 Robert Dewar <dewar@adacore.com>
6242 * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
6243 s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
6245 2011-08-29 Thomas Quinot <quinot@adacore.com>
6247 * par-endh.adb (Check_End): For an END where it is mandatory to repeat
6248 the scope name, do not report a missing label as a style violation (it
6249 will be diagnosed as an illegality).
6250 * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
6251 variant records: Get_Enum_Lit_From_Pos already returns a usage
6252 occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
6253 on Expr in Integer_Literal case so that it can be used by
6256 2011-08-29 Tristan Gingold <gingold@adacore.com>
6258 * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
6260 * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
6261 (Build_Abort_Block_Handler): New function to build an Abort_Signal
6263 * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
6264 Build_Abort_Block_Handler to build the exception handler. Do not
6265 undefer aborts for the Abort_Signal exception handler if back-end
6266 exception mechanism.
6267 * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
6268 back_end exceptions for all others and abort_signal.
6269 * s-except.ads (ZCX_By_Default): New constant.
6270 * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
6271 (Raise_Exception_Always): Ditto.
6272 (Raise_From_Signal_Handler): Ditto.
6273 (Raise_With_Location_And_Msg): Ditto.
6274 (Raise_With_Msg): Ditto.
6276 (Reraise_Occurence): Ditto.
6277 (Reraise_Occurrence_Always): Ditto.
6278 * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
6279 * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
6281 2011-08-29 Thomas Quinot <quinot@adacore.com>
6283 * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
6285 2011-08-29 Robert Dewar <dewar@adacore.com>
6287 * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
6288 Minor code reorganization.
6290 2011-08-29 Bob Duff <duff@adacore.com>
6292 * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
6293 2012, not just Ada 2005.
6295 2011-08-29 Vincent Celier <celier@adacore.com>
6297 * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
6298 with a project file or with gprbuid, if -gnatep= is specified, the
6299 builder may need to be invoked with -x.
6301 2011-08-29 Tristan Gingold <gingold@adacore.com>
6303 * a-exexpr-gcc.adb: Minor comment fix.
6305 2011-08-29 Robert Dewar <dewar@adacore.com>
6307 * sem_ch8.adb: Minor reformatting.
6309 2011-08-29 Bob Duff <duff@adacore.com>
6311 * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
6312 * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
6313 treating "some" as unreserved in earlier Ada versions. This is now
6314 handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
6315 rather than Name_Some, since Tok_Some is now recognized as reserved.
6316 * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
6318 * scans.ads: Minor comment fixes.
6319 * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
6320 for other language versions.
6321 * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
6322 treating "some" as unreserved in earlier Ada versions. This is now
6323 handled in Snames.Is_Keyword_Name.
6324 * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
6326 (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
6327 unreserved in earlier Ada versions. This is now handled in
6328 Snames.Is_Keyword_Name.
6329 * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
6330 words as for other language versions.
6331 * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
6332 Ada 2012, not just Ada 2005.
6334 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6336 * sem_ch13.adb: Additional semantic checks for aspects involved in
6339 2011-08-29 Matthew Heaney <heaney@adacore.com>
6341 * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
6342 a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
6343 Container parameter.
6344 (Ancestor_Find): ditto.
6346 2011-08-29 Thomas Quinot <quinot@adacore.com>
6348 * par-endh.adb: Minor reformatting.
6350 2011-08-29 Tristan Gingold <gingold@adacore.com>
6352 * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
6353 (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
6354 (Adjust_N_CLeanups_For): Remove.
6355 (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
6357 (Propgate_Exception): Adjust.
6358 * raise-gcc.c: Add a few static/const.
6359 (Adjust_N_Cleanups_For): Remove declaration.
6360 (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
6362 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6364 * sem_ch8.adb: Use type of function return when rewriting as object
6367 2011-08-29 Gary Dismukes <dismukes@adacore.com>
6369 * sem_type.adb: Minor reformatting.
6371 2011-08-29 Robert Dewar <dewar@adacore.com>
6373 * makeutl.adb: Minor reformatting.
6375 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6377 * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
6378 function call of a limited type, the expansion of the renaming is
6379 complicated by the presence of various temporaries and subtypes that
6380 capture constraints of the renamed object.
6381 Rewrite node as an object declaration, whose expansion is simpler.
6382 Given that the object is limited there is no copy involved and no
6385 2011-08-29 Robert Dewar <dewar@adacore.com>
6387 * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
6388 freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
6390 2011-08-29 Tristan Gingold <gingold@adacore.com>
6392 * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
6393 system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
6394 system-linux-hppa.ads, system-linux-s390.ads,
6395 system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
6396 system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
6397 system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
6398 system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
6399 system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
6400 system-solaris-sparc.ads, system-lynxos-x86.ads,
6401 system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
6402 system-solaris-x86_64.ads, system-mingw-x86_64.ads,
6403 system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
6404 system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
6405 system-vxworks-x86.ads: Remove GCC_ZCX_Support.
6406 * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
6407 s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
6408 * opt.ads: Adjust comment.
6409 * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
6410 * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
6411 * system.ads: Move GCC_ZCX_Support to obsolete entries.
6413 2011-08-29 Emmanuel Briot <briot@adacore.com>
6415 * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
6416 file name is specified on the gnatmake or gprbuild command line, and
6417 before we search for that file in the project.
6419 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6421 * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
6422 used to determine whether a possible interpretation for an overloadable
6423 entity is declared within the current instantiation and should be
6424 included in the candidate set.
6426 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
6428 * gnat_rm.texi, gnat_ugn.texi: Clean ups.
6430 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6432 * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
6433 access subtype is access_to_subprogram, when applying checks for
6436 2011-08-29 Matthew Heaney <heaney@adacore.com>
6438 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
6439 for sibling when common parent.
6441 2011-08-29 Thomas Quinot <quinot@adacore.com>
6443 * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
6446 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6448 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
6449 for the return type when in ASIS mode.
6451 2011-08-29 Vincent Celier <celier@adacore.com>
6453 * make.adb (Gnatmake): Get the default search dirs, then the target
6454 parameters after getting the Builder switches, as the Builder switches
6455 may include --RTS= and that could change the default search dirs.
6457 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
6459 * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
6460 Make_Final_Call. Move the processing for class-wide types before the
6461 processing for derivations from [Limited_]Controlled.
6462 (Make_Final_Call): Move the processing for class-wide types before the
6463 processing for derivations from [Limited_]Controlled.
6464 * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
6465 Add code to account for alignments larger than the list header. Add a
6466 comment illustrating the structure of the allocated object + padding +
6468 (Deallocate_Any_Controlled): Add code to account for alignments larger
6469 than the list header.
6471 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6473 * sinfo.ads, sinfo.adb: New node kind
6474 N_Formal_Incomplete_Type_Definition, related flags.
6475 par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
6476 Parse formal incomplete types.
6477 * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
6479 * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
6480 Formal incomplete types do not need completion.
6481 * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
6482 Validate_Incomplete_Type_Instance): New procedures to handle formal
6484 * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
6485 that corresponds to a formal incomplete type.
6486 * sprint.adb: Handle formal incomplete type declarations.
6487 * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
6490 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
6492 * a-fihema.ads, a-fihema.adb: Unit removed.
6493 * a-undesu.ads, a-undesu.adb: New unit implementing
6494 Ada.Unchecked_Deallocate_Subpool.
6495 * einfo.adb: Remove Associated_Collection from the node usage.
6496 Add Finalization_Master to the node usage.
6497 (Associated_Collection): Removed.
6498 (Finalization_Master): New routine.
6499 (Set_Associated_Collection): Removed.
6500 (Set_Finalization_Master): New routine.
6501 (Write_Field23_Name): Remove Associated_Collection from the output. Add
6502 Finalization_Master to the output.
6503 * einfo.ads: Remove attribute Associated_Collection and its uses in
6505 Add new attribute Finalization_Master along with its uses in entitites.
6506 (Associated_Collection): Removed along with its pragma import.
6507 (Finalization_Master): New routine along with a pragma import.
6508 (Set_Associated_Collection): Removed along with its pragma import.
6509 (Set_Finalization_Master): New routine along with a pragma import.
6510 * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
6511 Build_Finalization_Collection with Build_Finalization_Master.
6512 (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
6513 before the bodies of the predefined routines. Add comment explaining
6514 this. Replace call to Build_Finalization_Collection with
6515 Build_Finalization_Master.
6516 (Freeze_Type): Replace call to Build_Finalization_Collection with
6517 Build_Finalization_Master.
6518 (Make_Finalize_Address_Body): Comment reformatting.
6519 (Make_Predefined_Primitive_Specs): Code reformatting.
6520 (Stream_Operation_OK): Update comment mentioning finalization
6521 collections. Replace RE_Finalization_Collection with
6522 RE_Finalization_Master.
6523 * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
6524 Associated_Collection with Finalization_Master. Replace call to
6525 Build_Finalization_Collection with Build_Finalization_Master.
6526 (Expand_Allocator_Expression): Replace call to Associated_Collection
6527 with Finalization_Master. Replace call to Set_Associated_Collection with
6528 Set_Finalization_Master. Remove the generation of
6529 Set_Finalize_Address_Ptr.
6530 (Expand_N_Allocator): Replace call to Associated_Collection with
6531 Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
6532 * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
6533 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
6534 comment on usage. Replace call to Needs_BIP_Collection with
6535 Needs_BIP_Finalization_Master Remplace BIP_Collection with
6536 BIP_Finalization_Master. Update all comments which mention finalization
6537 collections. Replace Associated_Collection with
6538 Finalization_Master. Replace Build_Finalization_Collection with
6539 Build_Finalization_Master.
6540 (BIP_Formal_Suffix): Update BIP_Collection's case.
6541 (Build_Heap_Allocator): Update the related comment. Rename local
6542 variable Collect to Fin_Mas_Id and update its occurrences. Update
6543 comments which mention finalization collections. Replace
6544 Set_Associated_Collection with Set_Finalization_Master.
6545 (Expand_Call): Update the code which detects a special piece of library
6547 (Make_Build_In_Place_Call_In_Allocator): Replace the call to
6548 Add_Collection_Actual_To_Build_In_Place_Call with
6549 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
6550 which generates a call to Make_Set_Finalize_Address_Ptr_Call.
6551 (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
6552 Add_Collection_Actual_To_Build_In_Place_Call with
6553 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
6554 (Make_Build_In_Place_Call_In_Assignment): Replace call to
6555 Add_Collection_Actual_To_Build_In_Place_Call with
6556 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
6557 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
6558 * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
6559 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
6560 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
6561 Rename local variable Collect to Fin_Mas_Id and update its occurrences.
6562 Replace call to Set_Associated_Collection with Set_Finalization_Master.
6563 (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
6564 Replace the call to Associated_Collection with Finalization_Master.
6565 Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
6566 Update the way finalization master names are generated. Update the
6567 retrieval of the correct access type which will carry the pool and
6569 (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
6570 (Make_Finalize_Address_Body): Abstract types do not need
6571 Finalize_Address. Code reformatting.
6572 (Make_Finalize_Address_Stmts): Update comment on usage.
6573 (Make_Set_Finalize_Address_Ptr_Call): Removed.
6574 (Process_Declarations): Update comments.
6575 * exp_ch7.ads (Build_Finalization_Collection): Renamed to
6576 Build_Finalization_Master. Update associated comment.
6577 (Make_Set_Finalize_Address_Ptr_Call): Removed.
6578 * exp_ch13.adb: Update comments which mention finalization collections.
6579 (Expand_N_Free_Statement): Replace the call to Associated_Collection
6580 with Finalization_Master.
6581 * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
6582 create calls to routines Allocate_Any_Controlled and
6583 Deallocate_Any_Controlled.
6584 (Find_Finalize_Address): New routine.
6585 (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
6587 (Requires_Cleanup_Actions): Update the comment on freeze node
6589 * exp_util.ads: Remove comment on generated code for
6590 Build_Allocate_Deallocate_Proc. The code is now quite complex and it
6591 is better to simply look in the body.
6592 * freeze.adb (Freeze_All): Update the comment of finalization
6593 collections. Replace the call to Associated_Collection with
6594 Finalization_Master. Replace the call to Build_Finalization_Collection
6595 with Build_Finalization_Master.
6596 * impunit.adb: Add a-undesu and s-stposu to the list of units.
6597 * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
6599 * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
6600 Ada.Finalization. Add processing for children of System.Storage_Pools.
6601 * rtsfind.ads: Remove the naming of second level children of
6603 Remove Ada_Finalization_Heap_Management from the list of units.
6604 Remove subtype Ada_Finalization_Child.
6605 Remove the following subprogram entities:
6609 RE_Finalization_Collection
6610 RE_Finalization_Collection_Ptr
6611 RE_Set_Finalize_Address_Ptr
6613 Add the naming of second level children of System.Storage_Pools.
6614 Add System_Finalization_Masters and System_Storage_Pools_Subpools to
6616 Add subtype System_Storage_Pools_Child.
6617 Add the following subprogram entities to System.Finalization_Masters:
6619 RE_Finalization_Master
6620 RE_Finalization_Master_Ptr
6622 Add the following subprogram entities to System.Storage_Pools.Subpools:
6624 RE_Allocate_Any_Controlled
6625 RE_Deallocate_Any_Controlled
6626 RE_Root_Storage_Pool_With_Subpools
6630 Move the following subprogram entities from
6631 Ada.Finalization.Heap_Management to System.Finalization_Masters:
6633 RE_Add_Offset_To_Address
6638 * sem_ch3.adb (Access_Type_Declaration): Replace the call to
6639 Set_Associated_Collection with Set_Finalization_Master.
6640 * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
6641 BIP_Finalization_Master is created.
6642 * s-finmas.adb: New unit System.Finalization_Masters.
6643 * s-finmas.ads: New unit System.Finalization_Masters.
6644 * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
6645 * s-stposu.ads, s-stposu.adb: New unit implementing
6646 System.Storage_Pools.Subpools.
6648 2011-08-29 Bob Duff <duff@adacore.com>
6650 * tbuild.adb: Add assertion.
6652 2011-08-29 Thomas Quinot <quinot@adacore.com>
6654 * s-pooglo.adb: Minor reformatting.
6656 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6658 * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
6659 an indexed component of a packed array whose element type is a record
6660 with a representation clause different from that of the right-hand
6661 side, generate a temporary to minimuze the number of bit-field
6662 operations generated.
6664 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6666 * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
6667 declarations, and thus are likely insertion points for actions.
6669 2011-08-29 Bob Duff <duff@adacore.com>
6671 * einfo.ads: Minor comment fix.
6673 2011-08-29 Robert Dewar <dewar@adacore.com>
6675 * frontend.adb, gnat1drv.adb: Minor reformatting.
6677 2011-08-29 Tristan Gingold <gingold@adacore.com>
6679 * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
6680 * a-fihema.adb (Allocate, Deallocate): Ditto. Possibly add padding
6681 space in front of the header.
6683 2011-08-29 Johannes Kanig <kanig@adacore.com>
6685 * frontend.adb (Frontend): Exit after creating Standard package when
6686 -gnatd.H is present.
6687 * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
6690 2011-08-29 Robert Dewar <dewar@adacore.com>
6692 * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
6693 makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
6694 snames.ads-tmpl: Minor reformatting.
6696 2011-08-29 Philippe Gil <gil@adacore.com>
6698 * prj.adb (Reset_Units_In_Table): New procedure.
6699 Reset units to avoid access to freed memory.
6701 2011-08-29 Thomas Quinot <quinot@adacore.com>
6703 * get_scos.adb: When reading a P statement SCO without a pragma name
6704 (from an older ALI file), ensure that the Pragma_Name component is set
6705 to Unknown_Pragma (not left uninitialized).
6707 2011-08-29 Vincent Celier <celier@adacore.com>
6709 * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
6710 modified to compute correctly the object path of a SAL project that is
6711 extending another library project.
6712 (Write_Path_File): New procedure.
6713 * makeutl.ads (Directories): New table moved from Buildgpr
6714 (Get_Directories): New procedure moved from Buildgpr
6715 (Write_Path_File): New procedure
6716 * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
6717 paths before binding SALs, instead of Set_Ada_Paths.
6718 * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
6720 * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
6721 (Current_Source_Path_File_Of): New function
6722 (Set_Current_Object_Path_File_Of): New procedure
6723 (Current_Source_Object_File_Of): New function
6724 (Set_Current_Object_Path_File_Of): New procedure
6725 * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
6726 (Current_Source_Path_File_Of): New function
6727 (Set_Current_Object_Path_File_Of): New procedure
6728 (Current_Source_Object_File_Of): New function
6729 (Set_Current_Object_Path_File_Of): New procedure
6731 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6733 * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
6734 packed entity, use a bit-field assignment only if there is no change of
6737 2011-08-29 Thomas Quinot <quinot@adacore.com>
6739 * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
6740 Is_RTU instead of using Chars comparisons.
6742 2011-08-29 Thomas Quinot <quinot@adacore.com>
6744 * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
6745 temporary object if the actual is constrained, and the discriminants
6746 read from the stream don't match.
6748 2011-08-29 Tristan Gingold <gingold@adacore.com>
6750 * sem_attr.adb, exp_attr.adb: Add handling of
6751 Attribute_System_Allocator_Alignment
6752 * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
6753 Attribute_System_Allocator_Alignment.
6754 * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
6755 * gcc-interface/targtyps.c, gcc-interface/utils2.c,
6756 gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
6757 get_target_system_allocator_alignment.
6759 2011-08-29 Arnaud Charlet <charlet@adacore.com>
6761 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
6764 2011-08-29 Arnaud Charlet <charlet@adacore.com>
6766 * exp_ch3.adb (In_Runtime): Fix typo.
6768 2011-08-29 Bob Duff <duff@adacore.com>
6770 * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
6772 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6774 * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
6775 and a separate tag assignment is generated, ensure that the tag
6776 assignment is analyzed.
6778 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6780 * atree.ads, atree.adb (Copy_Separate_List): New function that applies
6781 Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
6782 of statement lists that may contain local declarations.
6783 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
6784 duplicate the triggering statements needed for the expansion of this
6785 construct, when the trigger is a dispatching call to a synchronized
6788 2011-08-29 Arnaud Charlet <charlet@adacore.com>
6790 * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
6791 * bindgen.adb: Add comments.
6792 * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
6795 2011-08-29 Robert Dewar <dewar@adacore.com>
6797 * exp_attr.adb: Minor reformatting.
6798 Minor code reorganization and commenting.
6799 * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
6802 2011-08-29 Thomas Quinot <quinot@adacore.com>
6804 * get_scos.adb: Ignore chaining indicators not currently supported
6807 2011-08-29 Arnaud Charlet <charlet@adacore.com>
6809 * system.ads: Minor editing.
6811 2011-08-29 Arnaud Charlet <charlet@adacore.com>
6813 * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
6815 * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
6816 Attribute_Elab_Subp_Body.
6817 * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
6818 * sem_util.adb: Update comments.
6820 2011-08-29 Thomas Quinot <quinot@adacore.com>
6822 * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
6823 pragma name for each SCO statement corresponding to a pragma.
6825 2011-08-29 Arnaud Charlet <charlet@adacore.com>
6827 * opt.ads: Minor editing.
6829 2011-08-29 Yannick Moy <moy@adacore.com>
6831 * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
6832 that only made sense for CodePeer mode.
6834 2011-08-29 Jose Ruiz <ruiz@adacore.com>
6836 * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
6837 which is no longer used.
6838 * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
6839 handling of the 64-bit division check.
6840 * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
6842 * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
6845 2011-08-29 Thomas Quinot <quinot@adacore.com>
6847 * get_scos.adb: Minor reformatting.
6849 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
6851 * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
6852 statement list is wrapped in a block, the block is explicitly analyzed
6853 in order to properly redecorate the entities and create a servicing
6856 2011-08-29 Tristan Gingold <gingold@adacore.com>
6858 * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
6859 (Set_Zero_Cost_Handling): Remove.
6861 2011-08-29 Thomas Quinot <quinot@adacore.com>
6863 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
6865 2011-08-29 Geert Bosch <bosch@adacore.com>
6867 * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
6868 instruction, as the latter may produce -0.0, which is not a valid VAX
6870 (Neg_G): Likewise for VAX F float.
6872 2011-08-29 Robert Dewar <dewar@adacore.com>
6874 * exp_util.adb: Minor reformatting.
6876 2011-08-29 Yannick Moy <moy@adacore.com>
6878 * sem_ch3.adb: Minor comment update.
6880 2011-08-29 Thomas Quinot <quinot@adacore.com>
6882 * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
6885 2011-08-29 Thomas Quinot <quinot@adacore.com>
6887 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
6888 current statement sequence on a generic instantiation or a subprogram
6891 2011-08-29 Robert Dewar <dewar@adacore.com>
6893 * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
6896 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
6898 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
6899 Correct the check which involves the freeze node of a controlled or
6900 access-to-controlled type.
6902 2011-08-29 Geert Bosch <bosch@adacore.com>
6904 * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
6906 * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
6909 2011-08-29 Yannick Moy <moy@adacore.com>
6911 * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
6912 for every index type and component type that is not a subtype_mark.
6913 (Process_Subtype): Set Etype of subtype.
6915 2011-08-29 Robert Dewar <dewar@adacore.com>
6917 * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
6918 reorganization. Minor reformatting.
6920 2011-08-29 Steve Baird <baird@adacore.com>
6922 * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
6923 for CodePeer and ALFA modes.
6925 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6927 * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
6928 that comes from an enclosing scope if it is not the renaming of an
6929 actual, to handle properly a spurious ambiguity in an instance.
6931 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
6933 * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
6934 (Alignment_Check_For_Size_Change): ...this. Add SIZE parameter and
6935 use it instead of the Esize of the first parameter.
6936 (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
6938 <Size>: Likewise. Call it for composite types on the RM size.
6940 2011-08-29 Yannick Moy <moy@adacore.com>
6942 * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
6943 * sem_util.adb (Unique_Name): Correct behaviour for names of
6946 2011-08-29 Yannick Moy <moy@adacore.com>
6948 * sem_prag.adb (Check_Precondition_Postcondition): In formal
6949 verification mode, analyze pragma expression for correctness, for
6950 pre/post on library-level subprogram, as it is not expanded later.
6952 2011-08-29 Yannick Moy <moy@adacore.com>
6954 * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
6955 in formal verification.
6957 2011-08-29 Thomas Quinot <quinot@adacore.com>
6959 * sem_util.adb: Minor reformatting.
6960 * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
6962 * par_sco.ads, par_sco.adb: Update comments.
6964 2011-08-29 Yannick Moy <moy@adacore.com>
6966 * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
6967 associated getter/setter.
6968 * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
6970 2011-08-29 Vincent Celier <celier@adacore.com>
6972 * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
6973 * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
6974 with declarations for Language_Kind and Dependency_Kind for Ada.
6975 * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
6976 (Process_Compiler): Take into account the new attributes Dependency_Kind
6978 (Check_Configuration): Check if language kind is unit based, not if the
6979 language name is Ada.
6980 (Process_Exceptions_Unit_Based): Ditto
6981 (Add_Language): Remove default additions of language and dependency kind
6982 * prj.ads: Minor comment change
6983 * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
6985 2011-08-29 Johannes Kanig <kanig@adacore.com>
6987 * debug.adb: Update comments.
6989 2011-08-24 Joseph Myers <joseph@codesourcery.com>
6991 * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
6992 (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
6993 (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
6994 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
6995 (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
6997 2011-08-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6999 * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
7000 (GNATLIBCFLAGS_FOR_C): Replace
7001 TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
7002 (gnatlib-shared-default, gnatlib-shared-dual-win32)
7003 (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
7004 (gnatlib-sjlj, gnatlib-zcx): Likewise.
7006 2011-08-07 Eric Botcazou <ebotcazou@adacore.com>
7008 * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
7010 * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
7012 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
7014 2011-08-05 Nicolas Roche <roche@adacore.com>
7016 * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
7017 libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
7019 * gcc-interface/Make-lang.in: Add support for canadian cross setting.
7021 2011-08-05 Matthew Heaney <heaney@adacore.com>
7023 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
7024 subprogram bodies declared out-of-order.
7026 2011-08-05 Yannick Moy <moy@adacore.com>
7028 * sem_util.adb (Unique_Name): only prefix with "standard" the names of
7029 entities directly in package Standard, otherwise skip the standard
7032 2011-08-05 Robert Dewar <dewar@adacore.com>
7034 * a-cbmutr.adb: Minor reformatting
7035 (Allocate_Node): refactor node allocation algorithm
7037 2011-08-05 Robert Dewar <dewar@adacore.com>
7039 * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
7040 * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
7042 (Analyze_Pragma, case Check_Policy): Ditto.
7043 * sem_prag.ads (Check_Disabled): New function
7044 * snames.ads-tmpl: Add Name_Disable.
7046 2011-08-05 Robert Dewar <dewar@adacore.com>
7048 * gnat_rm.texi: Document implementation-defined policy DISABLE for
7049 pragmas Assertion_Policy, Check_Policy, Debug_Policy.
7051 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7053 * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
7054 that appears in a generic formal part and applies to a formal
7057 2011-08-05 Robert Dewar <dewar@adacore.com>
7059 * a-cbmutr.ads: Minor reformatting.
7061 2011-08-05 Matthew Heaney <heaney@adacore.com>
7063 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
7064 to check count, check sign of value instead.
7065 * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
7066 (Copy_Subtree): allocate copy of source element
7067 (Equal_Subtree): compare elements, not access objects
7069 2011-08-05 Vincent Celier <celier@adacore.com>
7071 * gnat_ugn.texi: Fix VMS alternative.
7073 2011-08-05 Thomas Quinot <quinot@adacore.com>
7075 * sem_ch11.adb: Add comment.
7077 2011-08-05 Robert Dewar <dewar@adacore.com>
7079 * exp_util.adb: Minor comment fix.
7081 2011-08-05 Robert Dewar <dewar@adacore.com>
7083 * scng.adb (Error_Unterminated_String): Improve flag position when
7086 2011-08-05 Matthew Heaney <heaney@adacore.com>
7088 * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
7090 * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
7091 multiway tree containers.
7093 2011-08-05 Robert Dewar <dewar@adacore.com>
7095 * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
7096 * stylesw.adb: Implement -gnatyC to control comment spacing
7097 * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
7099 * usage.adb: Add line for -gnatyC.
7101 2011-08-05 Robert Dewar <dewar@adacore.com>
7103 * gnat_ugn.texi: Document -gnatyC.
7104 * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
7105 synonym for COMMENTS2).
7107 2011-08-05 Robert Dewar <dewar@adacore.com>
7109 * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
7110 a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
7111 sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
7112 a-comutr.ads, lib-xref.adb: Minor reformatting.
7114 2011-08-05 Robert Dewar <dewar@adacore.com>
7116 * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
7117 warning if there is an exception handler present.
7119 2011-08-05 Pascal Obry <obry@adacore.com>
7121 * a-iteint.ads: Fix copyright year.
7123 2011-08-05 Thomas Quinot <quinot@adacore.com>
7125 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
7126 statement SCO for a USE clause or a representation clause.
7128 2011-08-05 Yannick Moy <moy@adacore.com>
7130 * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
7131 between body and spec for stub.
7132 (Detect_And_Add_ALFA_Scope): take into account subprogram stub
7133 * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
7134 pragma precondition or postcondition, for which the enclosing
7135 subprogram or package in the AST is not the desired one, return empty.
7137 2011-08-05 Thomas Quinot <quinot@adacore.com>
7139 * g-expect.adb: Minor reformatting.
7141 2011-08-05 Bob Duff <duff@adacore.com>
7143 * a-fihema.adb: Comment out OS_Lib.
7145 2011-08-05 Matthew Heaney <heaney@adacore.com>
7147 * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
7148 (unbounded multiway tree containers) and a-iteint.ads.
7149 * a-comutr.ads, a-comutr.adb:
7150 This is the new Ada 2012 unit for unbounded multiway tree containers
7151 * a-cimutr.ads, a-cimutr.adb
7152 This is the new Ada 2012 unit for indefinite multiway tree containers
7153 * a-iteint.ads: New file.
7155 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7157 * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
7159 2011-08-05 Bob Duff <duff@adacore.com>
7161 * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
7163 * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
7165 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7167 * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
7168 general indexing aspects of Ada2012. Called when analyzing indexed
7169 components when other interpretations fail.
7170 * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
7171 in an expression context where overloading is meaningful. This excludes
7172 the occurrence in an aspect specification (efficiency only).
7173 * sem_attr.adb (Analyze_Attribute): indicate that the attributes
7174 related to iterators can be set by an attribute specification, but
7176 * sem_ch13.adb (Analyze_Aspect_Specifications): handle
7177 Constant_Indexing and Variable_Indexing.
7178 (Check_Indexing_Functions): New procedure to perform legality checks.
7179 Additional semantic checks at end of declarations.
7181 2011-08-05 Sergey Rybin <rybin@adacore.com>
7183 * tree_io.ads: Update ASIS_Version_Number because of the change of the
7184 order of calling Tree_Write/Tree_Read routines made for aspects.
7186 2011-08-05 Bob Duff <duff@adacore.com>
7188 * a-fihema.adb (Finalize): Fix race condition.
7190 2011-08-05 Yannick Moy <moy@adacore.com>
7192 * sem_ch12.adb (Analyze_Package_Instantiation,
7193 Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
7196 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7198 * sem_type.adb (Specific_Type): in an instance, the type-specific
7199 operand of an equality check that involves null may have a private
7200 type. Use full view to determine legality of construct.
7202 2011-08-05 Vincent Celier <celier@adacore.com>
7204 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
7205 delete or close the file when the call to gnatmake was successful.
7207 2011-08-05 Yannick Moy <moy@adacore.com>
7209 * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
7210 Global_Discard_Names.
7212 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7214 * sinfo.ads: comments on use of entity field for aspect specifications.
7216 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7218 * sem_ch12.adb (Reset_Entity): If the entity field of the associated
7219 node is not itself an entity but a selected component, it is a
7220 rewritten parameterless call to an en enclosing synchronized operation,
7221 and this expansion will be performed again in the instance, so there is
7222 no global information to preserve.
7224 2011-08-05 Javier Miranda <miranda@adacore.com>
7226 * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
7227 for renamings of predefined primitives.
7228 (In_Predef_Prims_DT): New subprogram.
7230 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7232 * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
7233 possible interpretation of name is a reference type, add an
7234 interpretation that is the designated type of the reference
7235 discriminant of that type.
7236 * sem_res.adb (resolve): If the interpretation imposed by context is an
7237 implicit dereference, rewrite the node as the deference of the
7238 reference discriminant.
7239 * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
7240 Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
7241 parent type or base type.
7242 * sem_ch4.adb (Process_Indexed_Component,
7243 Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
7244 Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
7245 Check for implicit dereference.
7246 (List_Operand_Interps): Indicate when an implicit dereference is
7248 * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
7250 2011-08-05 Thomas Quinot <quinot@adacore.com>
7252 * scos.ads: Update documentation of SCO table. Pragma statements can now
7253 be marked as disabled (using 'p' instead of 'P' as the statement kind).
7254 * par_sco.ads, par_sco.adb: Implement the above change.
7255 (Process_Decisions_Defer): Generate a P decision for the first parameter
7256 of a dyadic pragma Debug.
7257 * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
7259 * put_scos.adb: Code simplification based on above change.
7261 2011-08-05 Robert Dewar <dewar@adacore.com>
7263 * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
7264 bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
7265 a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
7266 prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
7268 2011-08-05 Bob Duff <duff@adacore.com>
7270 * a-stunau.ads, g-spipat.adb: Update comments.
7272 2011-08-05 Bob Duff <duff@adacore.com>
7274 * a-fihema.ads: Minor comment fix.
7275 * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
7277 (Attach, Detach): Remove some unnecessary code.
7278 (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
7280 2011-08-05 Bob Duff <duff@adacore.com>
7282 * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
7283 allocation for Objects component. This simplifies the code somewhat. It
7284 is also a little more efficient in the not-so-unusual case where there
7285 are no controlled objects allocated.
7286 Make Finalization_Started flag atomic.
7287 (Finalize): Avoid unnecessary detachment of items from the list.
7288 (pcol): Minor cleanup.
7290 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7292 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
7293 package whose name is the same as that of the generic unit, or its
7296 2011-08-05 Bob Duff <duff@adacore.com>
7298 * a-fihema.adb, a-fihema.ads: Minor comment improvements.
7299 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
7300 Minor comment fixes.
7302 2011-08-05 Arnaud Charlet <charlet@adacore.com>
7304 * make.adb (Linking_Phase): No longer need to set source search path
7305 before calling gnatlink in CodePeer mode.
7306 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
7307 gcc in CodePeer mode, since the binder generated file no longer has a
7309 * switch.ads, switch.adb (Is_Language_Switch): Removed.
7310 * switch-c.adb: Update comment.
7312 2011-08-05 Thomas Quinot <quinot@adacore.com>
7314 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
7316 2011-08-05 Nicolas Roche <roche@adacore.com>
7318 * gnat_ugn.texi: Fix minor syntax error issue.
7320 2011-08-05 Vincent Celier <celier@adacore.com>
7322 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
7323 delete or close the file when the call to gnatmake returns a non
7324 successful return code.
7326 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7328 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
7329 check, indicate that the copy of the original node does not come from
7330 source, to prevent an infinite recursion of the expansion.
7332 2011-08-05 Johannes Kanig <kanig@adacore.com>
7334 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
7335 VC generation for subprogram bodies.
7337 2011-08-05 Yannick Moy <moy@adacore.com>
7340 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
7341 the base type with the smallest allowed base type.
7343 2011-08-05 Sergey Rybin <rybin@adacore.com>
7345 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
7348 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7350 * sem_ch12.ads: minor comment updates.
7352 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7354 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
7355 instantiation and a formal package the compiler generates a package
7356 renaming declaration so that the generic name within the declaration
7357 is interpreted as a renaming of the instance. At the end of a formal
7358 package declaration, this renaming must become invisible.
7360 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
7362 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
7363 comparison and rely on concrete entities instead.
7365 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7367 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
7368 and discriminants, to indicate that the type has an access discriminant
7369 that supports implicit dereference.
7370 * snames.ads-tmpl: Add names of aspects and attributes related to
7371 Ada2012 iterators: constant_indexing, default_iterator,
7372 iterator_element, implicit_dereference, variable_indexing.
7373 * aspects.ads, aspects.adb: entries for iterator-related aspects.
7374 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
7375 iterator-related aspects.
7376 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
7378 2011-08-05 Sergey Rybin <rybin@adacore.com>
7380 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
7381 metrics in gnatmetric to cover new kinds of coupling mentrics.
7383 2011-08-05 Steve Baird <baird@adacore.com>
7385 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
7386 of calling the user-defined main subprogram.
7387 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode
7388 is set) Call_Main_Subprogram ahead of, as opposed to
7390 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
7391 generation of a "with" of the user-defined main subprogram.
7392 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
7393 (which is now called from Gen_Main instead).
7395 2011-08-05 Emmanuel Briot <briot@adacore.com>
7397 * projects.texi: Added reference to the Makefile package.
7399 2011-08-05 Thomas Quinot <quinot@adacore.com>
7401 * exp_ch7.adb: Minor comment rewording.
7403 2011-08-05 Ed Falis <falis@adacore.com>
7405 * env.c: Fix comment.
7407 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
7409 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
7410 character comparison and rely on concrete entities instead.
7412 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7414 * sem_ch3.adb: (Check_Private_Overriding): better error message,
7415 suggested by AI95-0068.
7417 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
7419 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
7420 the two potential initialization calls. This accounts for any
7421 access-before-elaboration checks which may precede the initialization
7423 (Next_Suitable_Statement): New routine. Returns the next real statement
7424 after the input node while skipping generated checks.
7425 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
7426 with comment on usage.
7427 Do not generate Elaborate_All when the trigger is a finalization call
7428 coming from a type init proc.
7429 (Check_Elab_Call): Propagate the initialization procedure context to
7430 subsequent calls to Check_A_Call.
7431 (Check_Internal_Call_Continue): Propagate the initialization procedure
7432 context to subsequent calls to Check_Elab_Call.
7433 (Is_Finalization_Procedure): New routine. Returns True if the input
7434 entity denotes a [Deep_]Finalize routine.
7435 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
7436 along with comment on usage.
7438 2011-08-05 Vadim Godunko <godunko@adacore.com>
7440 * s-atocou.ads: Add list of supported platforms.
7442 2011-08-05 Yannick Moy <moy@adacore.com>
7444 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
7446 * opt.ads (Disable_ALI_File): new Boolean flag
7447 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
7449 2011-08-05 Ed Falis <falis@adacore.com>
7451 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
7452 environ is properly defined.
7454 2011-08-05 Vincent Celier <celier@adacore.com>
7456 * make.adb (Compilation_Phase): Exit immediately when all objects have
7457 been found up to date, to avoid multiple exit messages.
7458 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
7459 same project for languages with no compiler.
7460 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
7462 2011-08-05 Robert Dewar <dewar@adacore.com>
7464 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
7465 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
7466 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
7467 s-atocou-builtin.adb: Minor reformatting.
7469 2011-08-05 Yannick Moy <moy@adacore.com>
7471 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
7472 if the node to wrap is a pragma check, this node and enclosed
7473 expression are not expanded, so do not apply any transformations here.
7474 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
7475 introducing transient scopes.
7477 2011-08-05 Jose Ruiz <ruiz@adacore.com>
7479 * adaint.c (__gnat_set_writable, __gnat_set_readable,
7480 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
7481 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
7482 routine is available, so we use the default implementation of these
7484 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
7485 support for copying attributes on VxWorks 6.
7487 2011-08-05 Yannick Moy <moy@adacore.com>
7489 * debug.adb: Remove use of -gnatd.D.
7490 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
7491 * opt.ads: Simplify variables for ALFA mode, to keep one only
7492 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
7495 2011-08-05 Vincent Celier <celier@adacore.com>
7497 * prj-conf.adb (Do_Autoconf): Look also for --RTS in
7498 Builder'Default_Switches.
7500 2011-08-05 Vincent Celier <celier@adacore.com>
7502 * makeusg.adb: Add lines for --create-map-file switches.
7504 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7506 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
7507 profile is incomplete and the full view is available, replace it with
7509 * sem_ch6.adb (Possible_Freeze): if a type in the profile is
7510 incomplete, freezing the subprogram is delayed until the full view is
7512 * sem_type.adb (Disambiguate): an ambiguity between a user-defined
7513 fixed-point multiplication operator and the predefined operator is
7514 resolved in favor of the user-defined one.
7516 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7518 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
7521 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7523 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
7524 whether a type lacks user-defined Read or Write operations, or has a
7525 component that lacks them.
7526 * sem_attr.adb (Check_Stream_Attribute): if restriction
7527 No_Default_Stream_Attributes is active, verify that all subcomponent
7528 types of the target have user-defined stream operations, and report
7530 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
7531 * exp_strm.adb: Build_Elementary_Input_Call,
7532 Build_Elementary_Write_Call): remove checks for restriction
7533 No_Default_Stream_Attributes, now checked in semantics.
7535 2011-08-04 Vincent Celier <celier@adacore.com>
7537 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
7538 switches on the command line, look for all valid --RTS switches in the
7539 Builder switches and for each language use the first runtime name found
7540 to invoke gprconfig.
7541 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
7542 command line and there is no auto-configuration.
7543 (Runtime_Name_Set_For): New function.
7545 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7547 * exp_ch7.adb (Build_Object_Declarations): Do not generate the
7548 elaborate initialization expression for variable Abort when processing
7549 a package body or a declaration.
7550 (Create_Finalizer): Propagate the package context when creating the
7551 exception-related variables.
7552 * exp_ch7.ads (Build_Object_Declarations): New formal parameter
7553 For_Package along with usage comment.
7555 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7557 * gcc-interface/Makefile.in: Clean up targets.
7558 Enable new package for atomic counters and copy-on-write implementation
7559 of unbounded strings on x86 platforms.
7560 * gcc-interface/Make-lang.in: Update dependencies.
7562 2011-08-04 Robert Dewar <dewar@adacore.com>
7564 * exp_ch7.adb: Minor reformatting.
7566 2011-08-04 Robert Dewar <dewar@adacore.com>
7568 * exp_strm.adb: Minor reformatting.
7570 2011-08-04 Vadim Godunko <godunko@adacore.com>
7572 * s-atocou.adb: Replace by dummy version and use on targets where atomic
7573 operations are not supported.
7574 * s-atocou-builtin.adb: Renamed from s-atocou.adb.
7575 * s-atocou-x86.adb: New file.
7576 * Makefile.rtl: Add s-atocou.o file
7578 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7580 * make.adb (Compile): Move setting of CodePeer_Mode to ...
7581 (Compilation_Phase): ... here.
7582 (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
7584 2011-08-04 Thomas Quinot <quinot@adacore.com>
7586 * Make-generated.in: Fix minor typo in comment.
7588 2011-08-04 Thomas Quinot <quinot@adacore.com>
7590 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
7593 2011-08-04 Robert Dewar <dewar@adacore.com>
7595 * a-coinho.adb: Minor reformatting.
7597 2011-08-04 Robert Dewar <dewar@adacore.com>
7599 * a-coinho.ads: Minor reformatting.
7601 2011-08-04 Vadim Godunko <godunko@adacore.com>
7603 * s-atocou.ads, s-atocou.adb: New files.
7604 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
7605 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
7606 direct use of GCC's atomic builtins and replace them by use of new
7607 atomic counter package.
7609 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7611 * exp_strm.adb: better error message for No_Default_Stream_Attributes.
7613 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7615 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
7616 with a call to Get_External_Tag.
7617 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
7618 subprogram usage. Remove the guard against package declarations and
7619 bodies since Build_Cleanup_Statements is no longer invoked in that
7621 (Build_Components): Initialize Tagged_Type_Stmts when the context
7622 contains at least one library-level tagged type.
7623 (Build_Finalizer): New local variables Has_Tagged_Types and
7624 Tagged_Type_Stmts along with associated comments on usage. Update the
7625 logic to include tagged type processing.
7626 (Create_Finalizer): Insert all library-level tagged type unregistration
7627 code before the jump block circuitry.
7628 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
7629 (Expand_N_Package_Declaration): Remove the call to
7630 Build_Cleanup_Statements.
7631 (Process_Tagged_Type_Declaration): New routine. Generate a call to
7632 unregister the external tag of a tagged type.
7633 (Processing_Actions): Reimplemented to handle tagged types.
7634 (Process_Declarations): Detect the declaration of a library-level
7635 tagged type and carry out the appropriate actions.
7636 (Unregister_Tagged_Types): Removed. The machinery has been directly
7637 merged with Build_Finalizer.
7639 2011-08-04 Robert Dewar <dewar@adacore.com>
7641 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
7642 gnatls.adb, exp_ch3.adb: Minor reformatting.
7644 2011-08-04 Marc Sango <sango@adacore.com>
7646 * sem_attr.adb (Analyze_Attribute): Replace the message
7647 "invisible attribute of}" of the spark restriction violation in
7648 attribute reference by the simple message "invisible attribute of type".
7649 Indeed, the node value Error_Msg_Node_1 used is in conflit with the
7650 two insertion characters: '&' and '}'.
7652 2011-08-04 Vadim Godunko <godunko@adacore.com>
7654 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
7655 * a-coinho.ads, a-coinho.adb: New file.
7656 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
7658 2011-08-04 Nicolas Roche <roche@adacore.com>
7660 * alfa_test.adb: Not all ali files are containing alfa information even
7661 if compiled with -gnatd.F. So suppress warning about missing ALFA
7664 2011-08-04 Yannick Moy <moy@adacore.com>
7666 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
7668 * put_alfa.adb: Check that scope name is not empty.
7670 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7672 * exp_ch3.adb (Stream_Operation_Ok): new predicate
7673 Needs_Elementary_Stream_Operation, to determine whether user-defined
7674 Read and Write attributes are available for the elementary components
7675 of the given type. If only the predefined attributes are available,
7676 then when restriction No_Default_Stream_Attributes is active the
7677 predefined stream attributes for the composite type cannot be created.
7679 2011-08-04 Robert Dewar <dewar@adacore.com>
7681 * bindgen.adb: Fix obsolete comments and names from Ada/C days.
7682 Put routines in alpha order
7684 2011-08-04 Jose Ruiz <ruiz@adacore.com>
7686 * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
7687 * gcc-interface/Make-lang.in: Update dependencies.
7689 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7691 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
7692 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
7695 2011-08-04 Robert Dewar <dewar@adacore.com>
7697 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
7698 lib-xref-alfa.adb: Minor reformatting.
7700 2011-08-04 Marc Sango <sango@adacore.com>
7702 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
7703 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
7704 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
7707 2011-08-04 Tristan Gingold <gingold@adacore.com>
7709 * bindgen.adb (Gen_Adainit_C): Remove.
7710 (Gen_Adafinal_C): Ditto.
7711 (Gen_Elab_Externals_C): Ditto.
7712 (Gen_Elab_Calls_C): Ditto.
7713 (Gen_Elab_Order_C): Ditto.
7714 (Gen_Elab_Defs_C): Ditto.
7715 (Gen_Finalize_Library_C): Ditto.
7716 (Gen_Finalize_Library_Defs_C): Ditto.
7717 (Gen_Main_C): Ditto.
7718 (Gen_Output_File_C): Ditto.
7719 (Gen_Restrictions_C): Ditto.
7720 (Gen_Versions_C): Ditto.
7721 (Write_Info_Ada_C): Ditto.
7722 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
7723 (Gen_Output_File): Do not force Ada_Bind_File anymore.
7724 Always call Gen_Output_File_Ada.
7725 * gnatlink.adb (Begin_Info): Now a constant.
7727 (Ada_Bind_File): Remove
7728 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases.
7729 * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
7730 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
7731 * opt.ads (Ada_Bind_File): Remove.
7733 2011-08-04 Thomas Quinot <quinot@adacore.com>
7735 * projects.texi: Document target-specific directory in default project
7738 2011-08-04 Thomas Quinot <quinot@adacore.com>
7740 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
7743 2011-08-04 Yannick Moy <moy@adacore.com>
7745 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
7746 opt.ads, lib-xref.ads: Code clean up.
7748 2011-08-04 Yannick Moy <moy@adacore.com>
7750 * gnat_rm.texi: Update description of Test_Case
7751 * gnat_ugn.texi: Typo.
7753 2011-08-04 Ed Falis <falis@adacore.com>
7755 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
7757 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7759 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
7760 it is of type Root_Controlled. This action eliminates fields Prev and
7761 Next from type equality.
7763 2011-08-04 Yannick Moy <moy@adacore.com>
7765 * lib-xref-alfa.adb: Correct typo.
7767 2011-08-04 Matthew Heaney <heaney@adacore.com>
7769 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
7772 2011-08-04 Yannick Moy <moy@adacore.com>
7774 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
7775 (Analyze_Pragma): allow static string expression for name of Test_Case,
7776 instead of simply string literals.
7777 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
7780 2011-08-04 Vincent Celier <celier@adacore.com>
7782 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
7783 case suffixes to find truncated main sources.
7785 2011-08-04 Tristan Gingold <gingold@adacore.com>
7787 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
7788 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
7789 (Compute_Current_Task): Ditto.
7791 2011-08-04 Tristan Gingold <gingold@adacore.com>
7793 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
7795 2011-08-04 Yannick Moy <moy@adacore.com>
7797 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
7798 library-level constant.
7799 (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
7800 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
7801 used as selector of parameter association, in ALFA mode.
7803 2011-08-04 Robert Dewar <dewar@adacore.com>
7805 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
7806 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
7809 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7811 * make.adb (Linking_Phase): Set source search path before calling
7812 gnatlink in CodePeer mode.
7814 2011-08-04 Javier Miranda <miranda@adacore.com>
7816 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
7817 Remove code which takes care of building TSDs.
7818 * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
7819 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
7820 the accessibility check in VM targets.
7821 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
7822 (Building_Static_DT): Now returns false for VM targets.
7823 (Build_VM_TSDs): Removed.
7824 (Expand_Interface_Conversion): Generate missing runtime check for
7825 conversions to interface types whose target type is unknown at compile
7827 (Make_VM_TSD): Add missing code to disable the generation of calls to
7828 Check_TSD if the tagged type is not defined at library level, or not
7829 has a representation clause specifying its external tag, or -gnatdQ is
7831 * exp_disp.ads (Build_VM_TSDs): Removed.
7832 (Make_VM_TSDs): Spec relocated from exp_disp.adb
7833 * sem_disp.adb (Check_Dispatching_Operation): No code required to
7834 register primitives in the dispatch tables in VM targets.
7835 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
7836 initialization of class-wide interface objects in VM targets.
7837 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
7840 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
7842 * gnatlink.adb (Gnatlink): Correct missleading error message displayed
7843 when dotnet-ld cannot be found.
7845 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7847 * bindgen.adb: Simplify significantly generation of binder body file in
7849 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
7850 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
7853 2011-08-04 Yannick Moy <moy@adacore.com>
7855 * sem_prag.adb, sem.ads: Code cleanup.
7857 2011-08-04 Tristan Gingold <gingold@adacore.com>
7859 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
7860 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
7861 results if possible.
7862 * s-stusta.adb (Print): Adjust after changes in s-stausa.
7863 * gnat_ugn.texi: Update dynamic stack usage section.
7865 2011-08-04 Steve Baird <baird@adacore.com>
7867 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
7868 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
7869 contains only a call to the user-defined main subprogram.
7870 (Gen_Main_Ada) - If CodePeer_Mode is set, then
7871 call the "wrapper" subprogram instead of directly
7872 calling the user-defined main subprogram.
7874 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7876 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
7877 alternatives of a case statement for controlled objects. Rename local
7878 variable A to Dead_Alt.
7879 (Expand_N_If_Statement): Check the then and else statements of an if
7880 statement for controlled objects. Check the then statements of all
7881 elsif parts of an if statement for controlled objects.
7882 (Expand_N_Loop_Statement): Check the statements of a loop for controlled
7884 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
7885 detects a loop associated with the expansion of an array object.
7886 Augment the processing of the loop statements to account for a possible
7887 wrap done by Process_Statements_For_Controlled_Objects.
7888 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
7889 statements and abortable part of an asynchronous select for controlled
7891 (Expand_N_Conditional_Entry_Call): Check the else statements of a
7892 conditional entry call for controlled objects.
7893 (Expand_N_Selective_Accept): Check the alternatives of a selective
7894 accept for controlled objects.
7895 (Expand_N_Timed_Entry_Call): Check the entry call and delay
7896 alternatives of a timed entry call for controlled objects.
7897 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
7898 exception handler for controlled objects.
7899 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
7900 Add formal parameter Nested_Constructs along with its associated
7902 (Requires_Cleanup_Actions (Node_Id)): Update all calls to
7903 Requires_Cleanup_Actions.
7904 (Process_Statements_For_Controlled_Objects): New routine.
7905 * exp_util.ads (Process_Statements_For_Controlled_Objects): New
7906 routine. Inspect a node which contains a non-handled sequence of
7907 statements for controlled objects. If such an object is found, the
7908 statements are wrapped in a block.
7910 2011-08-04 Bob Duff <duff@adacore.com>
7912 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
7913 need to compare with Class_Wide_Type (T2), in order to get at the
7914 original class-wide type node.
7915 * sem_type.ads (Covers): Improve the comment.
7916 * einfo.ads (Class_Wide_Type): Improve the comment.
7917 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
7918 the type of the Deref.
7920 2011-08-04 Yannick Moy <moy@adacore.com>
7922 * gnat_rm.texi: Document that Test_Case pragma can only appear on
7923 separate declarations.
7924 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
7925 check identifier of pragma argument.
7926 (Chain_TC): check that no other test case associated to the same entity
7927 share the same name.
7928 (Check_Test_Case): disallow test case inside subprogram body
7929 (Analyze_Pragma): correct call to check identifier and not argument
7930 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
7931 function gets name from test case pragma.
7933 2011-08-04 Yannick Moy <moy@adacore.com>
7935 * gnat_rm.texi: Document new pragma and aspect.
7936 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
7937 (No_Duplicates_Allowed): new constant array defining whether duplicates
7938 aspects of each kind can appear on the same declaration.
7939 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
7940 field, which points to a node holding the previous Spec_PPC_List.
7941 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
7942 through the indirection with Contract.
7943 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
7944 * par-prag.adb (Prag): do nothing on Test_Case pragma
7945 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
7947 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
7948 component Ensures of Test_Case.
7949 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
7950 (Analyze_Generic_Subprogram_Declaration,
7951 Analyze_Subprogram_Instantiation,
7952 Analyze_Abstract_Subprogram_Declaration,
7953 Analyze_Subprogram_Body_Helper,
7954 Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
7955 insert contract in subprogram node at point of definition
7957 (Aspect_Loop): do not raise error on duplicate Test_Case aspect
7958 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
7959 corresponding pragma
7960 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
7961 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
7962 similar to the analysis of pre/post
7963 (Derive_Subprogram): insert contract in subprogram node at point of
7965 * sem_prag.adb, sem_prag.ads
7966 (Check_Arg_Is_String_Literal, Check_Identifier):
7967 new checking procedures to be called in treatment of pragmas
7968 (Check_Test_Case): new procedure to check that a Test_Case aspect or
7969 pragma is well-formed. This does not check currently that 'Result is
7970 used only in the Ensures component of a Test_Case.
7971 (Analyze_Pragma): add case for Test_Case
7972 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
7973 components of a Test_Case.
7974 (Preanalyze_TC_Args): new procedure to preanalyze the boolean
7975 expressions in the 3rd (and 4th if present) arguments of a Test_Case
7976 pragma, treated as spec expressions.
7977 (Sig_Flags): add value -1 for Test_Case.
7978 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
7979 Get_Requires_From_Test_Case_Pragma): getters for both expression
7980 components of a Test_Case.
7981 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
7982 indirection between an entry or [generic] subprogram entity and its
7983 pre/post + test-cases.
7984 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
7985 get/set for fields of an N_Contract node.
7986 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
7987 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
7988 names and pragma for Test_Case.
7989 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
7991 2011-08-04 Vincent Celier <celier@adacore.com>
7993 * gnat_ugn.texi: Improve documentation of gnatmake switch
7994 --source-info-file=.
7996 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7998 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
7999 type). Initialize Atyp to the appropriate type which is later checked
8000 for completion. Rewrite the assertion associated with private type
8003 2011-08-04 Ed Falis <falis@adacore.com>
8005 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
8006 initialize the number of CPUs.
8008 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8010 * sem_type.adb (Disambiguate): New subsidiary routine
8011 In_Same_Declaration_List, to implement AI05-0020: a user-defined
8012 equality on an anonymous access type whose designated type is private
8013 does not lead to an ambiguity with the universal access equality
8014 operator in the body or child units of the defining package. The same
8015 is true for a multiplication operator on a private type completed with
8018 2011-08-04 Javier Miranda <miranda@adacore.com>
8020 * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
8021 (Normalize_Scalars_Config): Removed.
8023 (Register_Opt_Config_Switches): Remove registering config values of
8024 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
8025 (Restore_Opt_Config_Switches): Remove code which restores the values of
8026 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
8027 Init_Or_Norm_Scalars.
8028 (Save_Opt_Config_Switches): Remove code which saves values of
8029 Init_Or_Norm_Scalars and Normalize_Scalars.
8030 (Set_Opt_Config_Switches): Remove code which restores config values of
8031 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
8032 Init_Or_Norm_Scalars.
8034 2011-08-04 Yannick Moy <moy@adacore.com>
8036 * frontend.adb (Frontend): remove previous patch to avoid full
8037 qualification in ALFA mode.
8038 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
8039 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
8040 unique name for an entity, which could be used to identify the entity
8041 across compilation units.
8043 2011-08-04 Thomas Quinot <quinot@adacore.com>
8046 (Initialize_Default_Project_Path): Add target specific directory
8047 ($prefix/$target/lib/gnat) in front of project path in all cases
8048 (making gnatmake's behaviour consistent with gprbuild).
8049 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
8050 Pass target name from Sdefault to project subsystem.
8051 * gnatls.adb: Show new target specific default project directory.
8053 2011-08-04 Johannes Kanig <kanig@adacore.com>
8055 * cstand.adb: Add Information to Identifier in Standard
8056 (Identifer_For): Set Entity to the corresponding entity
8058 2011-08-04 Sergey Rybin <rybin@adacore.com>
8060 * gnat_ugn.texi: Update doc on gnatcheck.
8062 2011-08-04 Yannick Moy <moy@adacore.com>
8064 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
8067 2011-08-04 Yannick Moy <moy@adacore.com>
8069 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
8070 performing expansion.
8071 * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
8072 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
8073 it is not called in ALFA mode.
8075 2011-08-04 Emmanuel Briot <briot@adacore.com>
8077 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
8078 after all, so removed.
8080 2011-08-04 Sergey Rybin <rybin@adacore.com>
8082 * vms_data.ads: Add missing VMS qualifiers.
8084 2011-08-04 Emmanuel Briot <briot@adacore.com>
8086 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
8087 the list of files on the command line after processing it through
8090 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8092 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
8093 processing for .NET/JVM. These targets can now benefit from
8094 Raise_From_Controlled_Operation and they share the same processing with
8096 (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
8097 These targets need transient scopes in order to properly finalize short
8098 lived controlled objects.
8099 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
8100 NET/JVM. These targets can now benefit from
8101 Raise_From_Controlled_Operation and they share the same processing with
8104 2011-08-04 Geert Bosch <bosch@adacore.com>
8106 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
8108 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8110 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
8111 Expand_Record_Aggregate, to determine whether aggregate must be
8112 expanded into assignments. This is the case if the ancestor part is
8113 private, regarless of the setting of the flag Has_Private_Ancestor.
8115 2011-08-04 Ed Falis <falis@adacore.com>
8117 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
8119 2011-08-04 Bob Duff <duff@adacore.com>
8121 * sinfo.ads: Fix comment.
8123 2011-08-04 Steve Baird <baird@adacore.com>
8125 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
8126 choose a package name in much the same way as is
8127 done for JGNAT when VM_Target /= No_VM, except that
8128 a slightly more distinctive prefix string is used.
8130 2011-08-04 Emmanuel Briot <briot@adacore.com>
8132 * makeutl.adb (Complete_Mains): no longer accept unit names on the
8133 gnatmake command line.
8134 This behavior was never documented (and was supported only because of
8135 an early bug in the code). This case might lead to ambiguous cases
8136 (between unit names and truncated base names without suffixes).
8138 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8140 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
8141 Remove the external tag of a tagged type from the internal hash table.
8142 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
8143 expanded usage of the routine. Strenghten the check for Is_Master. Add
8144 processing for tagged types.
8145 (Build_Finalizer): Create all the necessary lists used in finalizer
8146 creation when the processed context is a package that may contain
8148 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
8149 Requires_Cleanup_Actions.
8150 (Expand_N_Package_Body): Package bodies may need clean up code
8151 depending on whether they contain tagged types.
8152 (Expand_N_Package_Declaration): Package declarations may need clean up
8153 code depending on whether they contain tagged types.
8154 (Unregister_Tagged_Types): New routine. Search through a list of
8155 declarations or statements, looking for non-abstract Ada tagged types.
8156 For each such type, generate code to unregister the external tag.
8157 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
8158 Requires_Cleanup_Actions.
8159 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
8160 through a list of declarations or statements looking for non-abstract
8161 Ada tagged types or controlled objects.
8162 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
8163 Requires_Cleanup_Actions.
8164 (Has_Controlled_Objects (List_Id, Boolean)): Removed.
8165 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
8168 2011-08-04 Vincent Celier <celier@adacore.com>
8170 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
8171 has Ada sources, not project Project, because if the root project
8172 Project has no sources of its own, all projects will be deemed without
8175 2011-08-04 Gary Dismukes <dismukes@adacore.com>
8177 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
8178 of the No_Param_Proc acc-to-subp type used for initialization of
8179 __gnat_finalize_library_objects so that it's declared at library level
8180 rather than nested inside of the adainit routine.
8182 2011-08-04 Javier Miranda <miranda@adacore.com>
8184 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
8185 if the tagged type has a representation clause which specifies its
8188 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8190 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
8191 Remove previous procedure with that name.
8192 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
8194 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
8195 subtype mark, the ancestor cannot have unknown discriminants.
8196 (Resolve_Record_Aggregate): if the type has invisible components
8197 because of a private ancestor, the aggregate is illegal.
8199 2011-08-04 Vincent Celier <celier@adacore.com>
8201 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
8202 account switches -gnat2005, -gnat12 and -gnat2012.
8204 2011-08-04 Bob Duff <duff@adacore.com>
8206 * s-tasdeb.ads: Minor comment fix.
8208 2011-08-04 Arnaud Charlet <charlet@adacore.com>
8210 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
8212 * switch.ads, switch.adb (Is_Language_Switch): New function.
8214 2011-08-04 Vincent Celier <celier@adacore.com>
8216 * switch-c.adb: Minor comment addition.
8218 2011-08-04 Vincent Celier <celier@adacore.com>
8220 * vms_conv.adb (Process_Argument): Fail graciously when qualifier
8221 ending with '=' is followed by a space (missing file name).
8223 2011-08-04 Pascal Obry <obry@adacore.com>
8225 * g-regist.ads: Fix size of HKEY on x86_64-windows.
8227 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8229 * sem_ch12.adb (Analyze_Associations): New routine
8230 Check_Overloaded_Formal_Subprogram to reject a formal package when
8231 there is a named association or a box initialisation for an overloaded
8232 formal subprogram of the corresponding generic.
8234 2011-08-04 Yannick Moy <moy@adacore.com>
8236 * alfa.ads (ALFA_Xref_Record): add component for type of entity
8237 * get_alfa.adb, put_alfa.adb: Read and write new component of
8239 * lib-xref-alfa.adb (Collect_ALFA): generate new component.
8241 2011-08-04 Pascal Obry <obry@adacore.com>
8243 * urealp.adb: Minor reformatting.
8245 2011-08-04 Tristan Gingold <gingold@adacore.com>
8247 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
8248 Handle the case when Cleanup_Protected_Object returns Empty.
8250 2011-08-04 Yannick Moy <moy@adacore.com>
8252 * frontend.adb (Frontend): only qualify names in non-ALFA mode
8254 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8256 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
8257 call, ignore functions.
8259 2011-08-04 Geert Bosch <bosch@adacore.com>
8261 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
8264 2011-08-04 Emmanuel Briot <briot@adacore.com>
8266 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
8267 as an index for Builder'Switches. This conforms to the documentation.
8268 * make.adb (Insert_Project_Sources): avoid duplicate code
8270 2011-08-04 Emmanuel Briot <briot@adacore.com>
8272 * makeutl.adb (Complete_Mains): if the user has passed a relative file
8273 name on the command line (for instance "../dummy"), never assume it can
8276 2011-08-04 Tristan Gingold <gingold@adacore.com>
8278 * bindgen.adb: Remove code the reference or create the
8279 Break_Start/__gnat_break_start procedure.
8280 * s-stalib.adb (Break_Start): Removed.
8282 2011-08-04 Emmanuel Briot <briot@adacore.com>
8284 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
8285 shared with gprbuild.
8287 2011-08-04 Yannick Moy <moy@adacore.com>
8289 * par-ch4.adb (P_Primary): preferentially issue an error message about
8290 a missing parenthesis arount a conditional or case expression in Ada
8291 2012 mode, if we detect that the alignment is not correct for a
8294 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8296 * exp_ch7.adb (Process_Declarations): Do not consider the result of a
8297 tag-to-class-wide conversion as needing finalization actions.
8298 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
8299 a tag-to-class-wide conversion as needing finalization actions.
8300 (Is_Finalizable_Transient): The result of a tag-to-class-wide
8301 conversion does not need finalization actions.
8302 (Is_Tag_To_CW_Conversion): New routine.
8303 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
8304 whether an object is the result of a tag-to-class-wide conversion.
8306 2011-08-04 Yannick Moy <moy@adacore.com>
8308 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
8309 the left-hand-side and right-hand-side of a conjunct are inserted when
8310 translating a pre- or postcondition
8311 * sem_ch6.adb: Correct typo in comment
8313 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8315 * gnat_rm.texi: Ravenscar does not prohibit dependence on
8316 Unchecked_Conversion and Unchecked_Deallocation.
8318 2011-08-04 Thomas Quinot <quinot@adacore.com>
8320 * make.adb: Minor reformatting.
8322 2011-08-04 Emmanuel Briot <briot@adacore.com>
8324 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
8325 sources in the project and its imported projects, but not in the whole
8328 2011-08-04 Emmanuel Briot <briot@adacore.com>
8330 * make.adb: Remove debug trace.
8332 2011-08-04 Vincent Celier <celier@adacore.com>
8334 * makeutl.adb (Do_Complete): Get the absolute path name of a relative
8335 path in canonical form, to be able to compare path names on platforms
8336 such as Windows or Darwin.
8338 2011-08-04 Thomas Quinot <quinot@adacore.com>
8340 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
8341 For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
8342 * scos.ads: Update documentation accordingly.
8343 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
8346 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8348 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
8349 attribute only if prefix type is scalar.
8351 2011-08-04 Emmanuel Briot <briot@adacore.com>
8353 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
8354 in gnatmake for specifying mains on the command line that do not belong
8355 to the main project. These mains must currently all belong to the same
8357 (Ultimate_Extension_Of): removed, since duplicated
8358 Ultimate_Extending_Project.
8360 2011-08-04 Arnaud Charlet <charlet@adacore.com>
8362 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
8364 (CodePeer_Mode_String): New.
8365 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
8367 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
8368 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
8369 mode, since no useful elaboration subprogram is needed by CodePeer.
8370 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
8371 In this mode, compile binder file with -gnatC and do stop after this
8374 2011-08-04 Vincent Celier <celier@adacore.com>
8376 * exp_ch7.adb: Minor comment fix.
8378 2011-08-04 Robert Dewar <dewar@adacore.com>
8380 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
8381 exp_ch4.adb, makeutl.adb: Minor reformatting.
8383 2011-08-04 Emmanuel Briot <briot@adacore.com>
8385 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
8386 Create several new subprograms to move code out of Make. This makes the
8387 code more readable, removes code duplication, and is a preparation work
8388 for adding support for aggregate projects.
8390 2011-08-04 Tristan Gingold <gingold@adacore.com>
8392 * s-po32gl.ads, s-po32gl.adb: New files.
8393 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
8394 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
8395 (Build_Finalization_Collection): Use it.
8396 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
8397 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
8399 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
8400 * gcc-interface/Make-lang.in: Update dependencies.
8402 2011-08-04 Emmanuel Briot <briot@adacore.com>
8404 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
8407 2011-08-04 Emmanuel Briot <briot@adacore.com>
8409 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
8410 command line is not a file name, also check whether it could be a unit
8413 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
8415 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
8416 the header of the finalization routine.
8417 If the unit has no finalizer but is a body whose spec has one, then
8418 generate the decrement of the elaboration entity only.
8419 If the unit has a finalizer and is a spec, then do not generate the
8420 decrement of the elaboration entity.
8421 (Gen_Finalize_Library_C): Likewise.
8423 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8425 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
8426 (Bounds_Size_Expression): Removed.
8427 (Double_Alignment_Of): New subsidiary routine.
8428 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
8429 for a hole in the dope vector of unconstrained arrays due to different
8430 index and element alignments.
8432 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8434 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
8435 raise program_error because body has not been seen yet.
8437 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8439 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
8442 2011-08-04 Vincent Celier <celier@adacore.com>
8444 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
8446 2011-08-04 Yannick Moy <moy@adacore.com>
8448 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
8449 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
8451 2011-08-04 Thomas Quinot <quinot@adacore.com>
8453 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
8454 instantiation in RCI.
8456 2011-08-04 Emmanuel Briot <briot@adacore.com>
8458 * make.adb: Share more code with gprbuild
8460 2011-08-04 Emmanuel Briot <briot@adacore.com>
8462 * projects.texi: Added documentation for the IDE'Gnat project file
8465 2011-08-04 Nicolas Roche <roche@adacore.com>
8467 * gnat_rm.texi: Minor editing.
8469 2011-08-04 Javier Miranda <miranda@adacore.com>
8471 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
8472 and the library case for VM targets.
8473 (Gen_Adainit_Ada): Likewise.
8475 2011-08-04 Robert Dewar <dewar@adacore.com>
8477 * g-altive.ads: Minor comment updates.
8478 * prj-nmsc.adb: Minor reformatting.
8480 2011-08-04 Javier Miranda <miranda@adacore.com>
8483 (Normalize_Scalars_Config): Value of the configuration switch set by
8484 pragma Normalize_Scalars when it appears in the gnat.adc file.
8485 (Normalize_Scalars): New field for record Config_Switches_Type. Used
8486 to save and restore settings of this pragma.
8488 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
8489 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
8491 2011-08-04 Vincent Celier <celier@adacore.com>
8493 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
8495 2011-08-04 Arnaud Charlet <charlet@adacore.com>
8497 * makeutl.adb: Minor reformatting.
8499 2011-08-04 Olivier Hainque <hainque@adacore.com>
8501 * g-altive.ads: Update comments to reflect that only the soft
8502 binding is available today.
8504 2011-08-04 Robert Dewar <dewar@adacore.com>
8506 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
8507 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
8508 * gcc-interface/Make-lang.in: Update dependencies.
8510 2011-08-04 Arnaud Charlet <charlet@adacore.com>
8512 * prj-env.adb: Remove local debug traces.
8514 2011-08-04 Yannick Moy <moy@adacore.com>
8516 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
8517 was used instead of Hi_OK, which could cause a read of an uninitialized
8518 value later on. Detected while working on the new warning.
8519 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
8521 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
8522 in more cases, in order to detect more unreferenced values.
8523 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
8524 object for expression, if any.
8526 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
8528 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
8529 the operand types instead of the Esize.
8531 2011-08-04 Steve Baird <baird@adacore.com>
8533 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
8534 enable CodePeer_Mode.
8535 * bindusg.adb (Display): Add help message describing -P binder switch.
8536 * gnat_ugn.texi: Document -P binder switch.
8537 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
8538 user-defined main program directly.
8539 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
8540 user-defined main program in the context clause of the package body.
8542 2011-08-04 Yannick Moy <moy@adacore.com>
8544 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
8545 duplicate of Defining_Entity
8546 (Get_Unique_Entity_For_Decl): rename function into
8547 Unique_Defining_Entity
8548 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
8549 (Formal_Proof_On): remove synthesized flag
8550 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
8551 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
8552 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
8553 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
8554 Annotate (Formal_Proof)
8556 2011-08-04 Emmanuel Briot <briot@adacore.com>
8558 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
8559 source files with non-standard naming schemes, in imported projects
8561 2011-08-04 Emmanuel Briot <briot@adacore.com>
8563 * makeutl.adb (Complete_Mains): when a multi-unit source file is
8564 specified on the gprbuild command line, we need to compile all units
8565 within that file, not just the first one we find
8566 Fix error message for mains that are not found.
8568 2011-08-04 Thomas Quinot <quinot@adacore.com>
8570 * sem_ch6.adb: Update comment.
8571 * sem_ch12.adb: Minor reformatting.
8573 2011-08-04 Bob Duff <duff@adacore.com>
8575 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
8576 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
8577 race condition whose symptom is to fail to lock Parent. That, in turn,
8578 causes Parent.Awake_Count to be accessed without locking Parent, which
8579 causes another race condition whose symptom is that Parent.Awake_Count
8580 can be off by 1 (either too high or too low). The solution is to lock
8581 Parent unconditionally, and then lock Acceptor, before reading
8582 Acceptor.Terminate_Alternative.
8584 2011-08-04 Arnaud Charlet <charlet@adacore.com>
8586 * debug.adb: Update comment.
8588 2011-08-04 Robert Dewar <dewar@adacore.com>
8590 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
8591 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
8592 exp_ch6.adb: Minor reformatting.
8594 2011-08-04 Gary Dismukes <dismukes@adacore.com>
8596 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
8599 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8601 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
8603 2011-08-04 Thomas Quinot <quinot@adacore.com>
8605 * sinfo.ads: Minor reformatting.
8607 2011-08-04 Emmanuel Briot <briot@adacore.com>
8609 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
8610 even if there is no location.
8612 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8614 * sem_res.adb, sem_ch4.adb: move check for restriction
8615 No_Task_Hierarchy to resolve_allocator.
8617 2011-08-04 Thomas Quinot <quinot@adacore.com>
8619 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
8620 This flag of N_Pragma nodes is not used, remove it as well as all of
8621 the associated circuitry.
8623 2011-08-04 Javier Miranda <miranda@adacore.com>
8625 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
8626 runtime check on duplicated externa tags
8627 * debug.adb Document switch -gnatdQ.
8629 2011-08-04 Gary Dismukes <dismukes@adacore.com>
8631 * a-fihema.ads: Minor typo fix.
8633 2011-08-04 Yannick Moy <moy@adacore.com>
8635 * sem_ch10.adb: Minor comment update.
8637 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8639 * einfo.adb: Update the node field usage to reflect the renaming of
8640 Return_Flag to Return_ Flag_Or_Transient_Decl.
8641 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
8642 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
8643 (Write_Field15_Name): Change Return_Flag to
8644 Return_Flag_Or_Transient_Decl.
8645 * einfo.ads: Rename node field Return_Flag to
8646 Return_Flag_Or_Transient_Decl. Update the associated comment and all
8647 occurrences in entities.
8648 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
8649 associated Inline pragma.
8650 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
8651 associated Inline pragma.
8652 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
8654 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
8655 Return_Flag and Set_Return_Flag.
8656 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
8657 objects generated for controlled transients declared inside an
8658 Exception_With_Actions. Update the calls to Return_Flag.
8659 (Process_Object_Declaration): Add code to add a null guard for hook
8660 objects generated for controlled transients declared inside an
8661 Exception_With_Actions. Update related comment.
8662 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
8663 objects generated for controlled transients declared inside an
8664 Exception_With_Actions. Update the calls to Return_Flag.
8665 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
8667 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8669 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
8670 positional aggregate.
8672 2011-08-04 Vincent Celier <celier@adacore.com>
8674 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
8675 SLOC only for pragmas.
8677 2011-08-04 Emmanuel Briot <briot@adacore.com>
8679 * projects.texi: Minor typo fix.
8681 2011-08-04 Emmanuel Briot <briot@adacore.com>
8683 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
8684 on case-sensitive file systems.
8686 2011-08-04 Thomas Quinot <quinot@adacore.com>
8688 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
8689 nested in a disabled pragma.
8690 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
8691 enclosing pragma, if any, for X decisions.
8693 2011-08-04 Thomas Quinot <quinot@adacore.com>
8695 * sem_prag.adb: Minor reformatting.
8697 2011-08-04 Vincent Celier <celier@adacore.com>
8699 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
8700 allowed in no run time mode.
8702 2011-08-04 Vincent Celier <celier@adacore.com>
8704 * make.adb (Check): When -gnatc is used, check for the source file
8705 inside the ALI file with a canonical case file name.
8707 2011-08-04 Emmanuel Briot <briot@adacore.com>
8709 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
8710 overriding the separator.
8712 2011-08-04 Robert Dewar <dewar@adacore.com>
8714 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
8715 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
8717 2011-08-04 Robert Dewar <dewar@adacore.com>
8719 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
8721 2011-08-04 Yannick Moy <moy@adacore.com>
8723 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
8724 'Result only appears in postcondition of function.
8726 2011-08-04 Thomas Quinot <quinot@adacore.com>
8728 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
8729 external tag, include the value of the external tag in the exception
8732 2011-08-04 Yannick Moy <moy@adacore.com>
8734 * sem_attr.adb (Result): modify error message for misplaced 'Result
8736 2011-08-04 Sergey Rybin <rybin@adacore.com>
8738 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
8739 clear that the second argument must be an identifier.
8741 2011-08-04 Thomas Quinot <quinot@adacore.com>
8743 * exp_ch9.adb (Build_Barrier_Function): When compiling with
8744 -fpreserve-control-flow, insert an IF statement on the barrier
8745 condition to ensure that a conditional branch instruction is generated.
8747 2011-08-04 Emmanuel Briot <briot@adacore.com>
8749 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
8750 (Processing_Flags.Ignore_Missing_With): new flag.
8752 2011-08-04 Emmanuel Briot <briot@adacore.com>
8754 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
8755 Source_List_File on case-insensitive systems where the file is actually
8756 on a case-sensitive file system (NFS,...).
8758 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8760 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
8761 function return contains a controlled [extension] aggregate and the
8762 return statement is not part of a handled sequence of statements, wrap
8763 the return in a block. This ensures that all controlled temporaries
8764 generated during aggregate resolution will be picked up by the
8765 finalization machinery.
8767 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8769 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
8770 components, freeze type before resolution, to ensure that default
8771 initializations are present for all components.
8772 * sem_res.adb (Resolve_Actuals): the designated object of an
8773 accces-to-constant type is a legal actual in a call to an
8774 initialization procedure.
8776 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8778 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
8779 N_Unchecked_Type_Conversion to the possible containers of a renamed
8782 2011-08-04 Yannick Moy <moy@adacore.com>
8784 * par-ch13.adb (Aspect_Specifications_Present): recognize
8785 "with Identifier'Class =>" as an aspect, so that a meaningful warning
8786 is issued in Strict mode.
8787 * par.adb: Fix typos in comments.
8789 2011-08-04 Yannick Moy <moy@adacore.com>
8791 * sem_attr.adb (Result): modify error message to take into account Post
8792 aspect when compiling Ada 2012 (or newer) code.
8794 2011-08-04 Nicolas Roche <roche@adacore.com>
8796 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
8797 remove need for GCC exceptions.
8799 2011-08-04 Vincent Celier <celier@adacore.com>
8801 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
8802 project, not the source file name.
8803 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
8804 excluded, continue looking. This excluded source will only be returned
8805 if there is no other source with the same base name that is not locally
8808 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8810 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
8811 private and one of the operands is a real literal, use a qualified
8812 expression rather than a conversion which is not meaningful to the
8815 2011-08-04 Yannick Moy <moy@adacore.com>
8817 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
8818 corresponding aspect X'Class are allowed, proceed with analysis of the
8819 aspect instead of skipping it.
8821 2011-08-04 Tristan Gingold <gingold@adacore.com>
8823 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
8824 This will allow to have an Ada implementation for the subprogram.
8826 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8828 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
8829 completion and aspects are present, apply them to the entity for the
8830 type which is currently the partial view, but which is the one that
8832 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
8833 applies to a partial view, indicate that the full view has predicates
8834 and delayed aspects.
8835 (Replace_Type_Reference): Handle properly predicates that apply to the
8836 full view of a private completion.
8838 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
8840 * layout.adb (Layout_Type): For composite types, do not set Esize.
8841 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
8843 (Size_Known): Look at the RM size of components instead of the Esize.
8844 (Freeze_Record_Type): Look at the RM size instead of the Esize to
8845 issue warning and activate Implicit_Packing.
8846 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
8847 if the Esize is not known.
8848 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
8849 for elementary types only.
8850 (Analyze_Record_Representation_Clause): Look at the RM size instead
8851 of the Esize to issue errors.
8852 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
8854 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
8856 Look at the RM size instead of the Esize for types if the latter is
8858 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
8860 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8862 * sem_type.adb: proper handling of equality not involving anonymous
8865 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8867 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
8868 Vis_Decls. When creating a library-level finalizer for a package spec,
8869 both the declaration and body of the finalizer are inserted either in
8870 the visible or private declarations of the package spec.
8872 2011-08-04 Javier Miranda <miranda@adacore.com>
8874 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
8875 use of the full-view of a type when invoking Is_Ancestor.
8876 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
8877 the full-view of private parents is requested, then use also the
8878 full-view of the parent of the first derivation.
8880 2011-08-04 Tristan Gingold <gingold@adacore.com>
8882 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
8883 instead of the locally imported procedure.
8884 * s-taprop-mingw.adb (Enter_Task): Ditto.
8885 * s-valrea.adb (Scan_Real): Ditto.
8886 * s-imgrea.adb (Set_Image_Real): Ditto.
8887 * s-flocon.ads: Make the package pure.
8889 2011-08-04 Thomas Quinot <quinot@adacore.com>
8891 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
8892 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
8893 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
8894 New subprogram, moved here from...
8895 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
8896 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
8897 rewriting of the last argument into a procedure call statement here...
8898 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
8901 2011-08-04 Thomas Quinot <quinot@adacore.com>
8903 * par_sco.adb: Minor reformatting.
8905 2011-08-04 Robert Dewar <dewar@adacore.com>
8907 * erroutc.adb: Minor reformatting.
8909 2011-08-04 Thomas Quinot <quinot@adacore.com>
8911 * par_sco.adb: Comment update.
8913 2011-08-04 Tristan Gingold <gingold@adacore.com>
8915 * s-flocon.ads: New file.
8916 * g-flocon.ads: Now a renaming of s-flocon.
8917 * Makefile.rtl: Add s-flocon.o
8919 2011-08-04 Javier Miranda <miranda@adacore.com>
8921 * exp_strm.adb (Build_Array_Input_Function): if the array type is
8922 constrained, do not attempt to build a subtype of it.
8924 2011-08-04 Yannick Moy <moy@adacore.com>
8926 * errout.ads Change comments: remove 'R'M as an example where quotes
8927 are needed; add ALFA as another case where quotes are not needed
8928 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
8929 case where quotes are not needed.
8930 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
8931 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
8932 Remove all occurrences of 'A'L'F'A
8934 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8936 * sem_ch13.adb: check legality of invariant pragma.
8938 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
8940 * bindgen.adb: Add comments.
8942 2011-08-04 Yannick Moy <moy@adacore.com>
8944 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
8946 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
8947 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
8949 2011-08-04 Robert Dewar <dewar@adacore.com>
8951 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
8952 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
8953 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
8955 2011-08-04 Thomas Quinot <quinot@adacore.com>
8957 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
8959 2011-08-04 Thomas Quinot <quinot@adacore.com>
8962 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
8965 2011-08-04 Robert Dewar <dewar@adacore.com>
8967 * einfo.ads, exp_ch4.adb: Minor reformatting.
8969 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
8971 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
8973 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8975 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
8976 type in all cases to compute list of primitive operations, because full
8977 view may be an itype that is not attached to the list of declarations.
8979 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
8981 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
8982 library has already been finalized.
8983 (Gen_Adafinal_C): Likewise.
8984 (Gen_Adainit_Ada): Generate an early return if the library has
8985 already been elaborated.
8986 (Gen_Adainit_C): Likewise.
8987 (Gen_Output_File_Ada): Generate an elaboration flag.
8988 (Gen_Output_File_C): Likewise.
8990 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8992 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
8993 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
8994 built in the first place.
8995 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
8996 for CodePeer because Finalize_Address was not built to begin with.
8997 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
8999 2011-08-04 Pascal Obry <obry@adacore.com>
9001 * adaint.c (__gnat_tmp_name): Use current process id to create temp
9002 filenames, this ensures unicity of filenames across processes.
9004 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9006 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
9007 Raise_Controlled to Raise_From_Controlled_Operation. Update the
9008 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
9009 Add False as the actual to From_Abort in the generated call to
9010 Raise_From_Controlled_Operation.
9012 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
9014 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
9015 so that the ali file name can be retrieved from outside of this package.
9016 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
9017 doing nothing in the general case, but used to update the object file
9018 timestamp if directly generated by the backend.
9019 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
9020 to a later time than the ali file one.
9022 2011-08-04 Yannick Moy <moy@adacore.com>
9024 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
9025 entities whose body contains an Annotate pragma which forces formal
9027 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
9028 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
9029 Mark_Non_ALFA_Subprogram to pass in a message and node.
9030 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
9031 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
9032 surrounding subprogram.
9033 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
9034 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
9035 as not in ALFA is annotated with Formal_Proof being On, then an error
9036 is issued based on the additional parameters for message and node.
9037 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
9038 * gcc-interface/Make-lang.in: Update dependencies.
9040 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9042 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
9043 Finalize_Address when CodePeer is enabled.
9045 2011-08-04 Pascal Obry <obry@adacore.com>
9047 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
9048 the latter returns a pointer to a static buffer which is deallocated
9049 at the end of the routine.
9051 2011-08-04 Yannick Moy <moy@adacore.com>
9053 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
9054 after index creation; mark unconstrained base array type generated as
9055 being in/not in ALFA as well
9056 (Make_Index): mark subtype created as in/not in ALFA
9057 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
9058 over a loop as in/not in ALFA, depending on its type and form of loop
9061 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9063 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
9064 directly to False on .NET and JVM.
9066 2011-08-04 Yannick Moy <moy@adacore.com>
9068 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
9069 constraint that subtype must come from source code to be in ALFA, so
9070 that anonymous subtypes can be in ALFA too.
9072 2011-08-04 Yannick Moy <moy@adacore.com>
9074 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
9075 reference for ALFA mode.
9076 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
9077 procedure public so as to use it from formal verification back-end.
9079 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
9081 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
9082 invalid checks of the Parameter, making Remove_Switch not working
9085 2011-08-04 Arnaud Charlet <charlet@adacore.com>
9087 * targparm.ads: Update header: no run-time exception is needed on this
9090 2011-08-04 Vincent Celier <celier@adacore.com>
9092 * a-fihema.adb: Use System.IO instead of GNAT.IO
9094 2011-08-04 Thomas Quinot <quinot@adacore.com>
9096 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
9097 are forbidden in Compiler_Unit mode.
9099 2011-08-04 Robert Dewar <dewar@adacore.com>
9101 * sem_util.adb: Minor reformatting.
9103 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9105 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
9106 library-level finalizers.
9107 (Gen_Finalize_Library_C): Update the import string for library-level
9109 (Gen_Finalize_Library_Defs_C): Update the definition name of a
9110 library-level finalizer.
9111 * exp_ch7.adb: Remove with and use clauses for Stringt.
9112 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
9113 Spec_Decl. Add local variable Body_Id. The names of library-level
9114 finalizers are now manually fully qualified and are no longer external.
9115 A single name is now capable of servicing .NET, JVM and non-VM targets.
9116 Pragma Export is no longer required to provide visibility for the name.
9117 (Create_Finalizer_String): Removed.
9118 (New_Finalizer_Name): New routine which mimics New_..._Name.
9120 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
9122 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
9123 elaboration counter to Standard_Short_Integer.
9124 * sem_util.adb (Build_Elaboration_Entity): Likewise.
9125 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
9126 (Gen_Elab_Externals_C): Likewise.
9128 2011-08-04 Ed Falis <falis@adacore.com>
9130 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
9131 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
9132 system-vxworks-mips.ads, system-vxworks-x86.ads
9133 (Always_Compatible_Rep): set to False for all VxWorks targets.
9135 2011-08-04 Robert Dewar <dewar@adacore.com>
9137 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
9138 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
9139 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
9140 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
9141 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
9142 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
9143 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
9144 Minor reformatting and code reorganization.
9146 2011-08-04 Emmanuel Briot <briot@adacore.com>
9148 * projects.texi: Added doc for aggregate projects.
9150 2011-08-04 Emmanuel Briot <briot@adacore.com>
9152 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
9153 Add support for overriding the Project_Path in aggregate projects.
9155 2011-08-04 Robert Dewar <dewar@adacore.com>
9157 * a-cofove.ads: Minor reformatting.
9159 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9161 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
9162 on the generated code.
9163 (Build_Finalize_Statements): Update the comment on the generated code.
9164 (Build_Initialize_Statements): Update the comment on the generated code.
9165 (Build_Object_Declarations): Add local variable Result. The object
9166 declarations are now built in sequence.
9167 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
9170 2011-08-04 Robert Dewar <dewar@adacore.com>
9172 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
9174 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
9176 * einfo.ads (Elaboration_Entity): Document new definition and use.
9177 (Elaboration_Entity_Required): Adjust to above change.
9178 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
9179 * exp_ch12.adb: And with and use for Snames.
9180 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
9181 * exp_util.adb (Set_Elaboration_Flag): Likewise.
9182 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
9183 <Check_Unit_Name>: Deal with N_Expanded_Name.
9184 <Attribute_Elaborated>: Extend to all unit names.
9185 * sem_elab.adb: And with and use for Uintp.
9186 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
9187 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
9188 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
9189 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
9190 from Gen_Adainit_Ada.
9191 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
9192 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
9193 case, do not call System.Standard_Library.Adafinal; instead call
9194 finalize_library if needed.
9195 (Gen_Adafinal_C): Likewise.
9196 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
9197 non-main program case.
9198 (Gen_Adainit_C): Generate a couple of external declarations here.
9199 In the main program case, set SSL.Finalize_Library_Objects.
9200 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
9201 (Gen_Elab_Calls_C): Likewise.
9202 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
9203 (Gen_Finalize_Library_C): Likewise. Generate a full function.
9204 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
9206 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
9207 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
9209 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
9210 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
9211 of external declarations. Call Gen_Finalize_Library_C.
9213 2011-08-04 Emmanuel Briot <briot@adacore.com>
9215 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
9216 Compute_Compilation_Phases): new subprogram.
9217 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
9218 The number of mains as well as the various compilation phases that
9219 need to be run are now project tree specific, since various
9220 aggregated trees might have different requirements. In particular,
9221 they do not all require bind or link phases.
9223 2011-08-04 Emmanuel Briot <briot@adacore.com>
9225 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
9226 (Project_Tree_Appdata): New type.
9227 It is now possible to associate application-specific data to a project
9228 tree. In particular, this is used in the gprbuild builder to avoid a
9229 number of global tables and htables, especially now that there can be
9230 several project trees loaded at once because of aggregate projects.
9231 (Debug_Name): new procedure.
9232 * projects.texi: Clarify syntax of "**" for Source_Dirs
9234 2011-08-03 Emmanuel Briot <briot@adacore.com>
9236 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
9237 the "roots" for a main.
9238 (Fill_From_Project): add support for aggregate projects. Main units
9239 in aggregated projects are now automatically added in the list of
9240 files to build (although this fails later on in gprbuild, because
9241 these files are not using the root proejct tree, so this needs
9243 * gcc-interface/Make-lang.in: Update dependencies.
9245 2011-08-03 Yannick Moy <moy@adacore.com>
9247 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
9248 conditional expression in ALFA.
9249 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
9250 expressions as not in ALFA.
9252 2011-08-03 Robert Dewar <dewar@adacore.com>
9254 * a-cofove.adb: Minor reformatting.
9256 2011-08-03 Emmanuel Briot <briot@adacore.com>
9258 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
9259 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
9261 These packages are more logically placed in the Queue package, since
9262 they manipulate the queue. It is also likely that they can be adapted
9263 for gnatmake, thus sharing more code.
9264 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
9265 that we could move the above.
9267 2011-08-03 Emmanuel Briot <briot@adacore.com>
9269 * errutil.adb (Finalize): clean up the list of error messages on exit.
9270 Calling this subprogram multiple times will no longer show duplicate
9271 error messages on stderr.
9273 2011-08-03 Emmanuel Briot <briot@adacore.com>
9275 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
9276 Getopt_Switches when we have already define a command line
9279 2011-08-03 Yannick Moy <moy@adacore.com>
9281 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
9282 in ALFA. Instead, they are considered as assertions to prove.
9283 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
9284 nodes as not in ALFA. Instead, include conditional expressions in ALFA
9285 if they have no ELSE part, or if they occur in pre- and postconditions,
9286 where the Condition cannot have side-effects in ALFA
9287 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
9288 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
9289 Instead, include type conversion between scalar types in ALFA.
9290 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
9291 if-and-only-if its type is in ALFA.
9293 2011-08-03 Thomas Quinot <quinot@adacore.com>
9295 * scos.adb, get_scos.adb, put_scos.adb
9296 New code letter for decisions: G (entry guard)
9298 (Traverse_Subprogram_Body): Rename to...
9299 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
9300 (Traverse_Protected_Body): New subprogram
9301 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
9302 protected bodies and entry bodies.
9304 2011-08-03 Yannick Moy <moy@adacore.com>
9306 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
9307 entities with get/set subprograms, which is set on procedure entities
9308 generated by the compiler for a postcondition.
9309 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
9310 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
9311 entity for a declaration
9312 (Get_Unique_Entity_For_Decl): new function returning an entity which
9313 represents a declaration, so that matching spec and body have the same
9316 2011-08-03 Robert Dewar <dewar@adacore.com>
9318 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
9319 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
9321 2011-08-03 Yannick Moy <moy@adacore.com>
9323 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
9324 library-level because retriction No_Implicit_Dynamic_Code in the
9325 front-end prevents its definition as a local subprogram
9326 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
9327 for reuse in other contexts
9328 (Traverse_Declarations_Or_Statements,
9329 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
9330 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
9331 procedures take a callback parameter to be called on all declarations
9333 (Traverse_All_Compilation_Units): new generic function to traverse a
9334 compilation unit and call a callback parameter on all declarations
9336 2011-08-03 Javier Miranda <miranda@adacore.com>
9338 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
9339 in Java since they are always enclosed in a namespace that
9340 differentiates them, and overloaded entities are supported by the VM.
9342 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9344 * checks.adb (Determine_Range): If a computed bound of an operation is
9345 outside the range of the base type of the expression, and overflow
9346 checks are enabled, the result is unknown and cannot be used for any
9347 subsequent constant folding.
9348 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
9349 unknown, so is the result of the comparison.
9351 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
9353 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
9354 From_Abort. When finalization was triggered by an abort, propagate
9355 Standard'Abort_Signal rather than Program_Error.
9356 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
9358 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
9359 From_Abort. When finalization was triggered by an abort, propagate
9360 Standard'Abort_Signal rather than Program_Error.
9361 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
9363 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
9364 Abort_Id. Update the calls to Build_Object_Declarations and
9365 Build_Raise_Statement to include Abort_Id.
9366 (Build_Adjust_Statements): New local variable Abort_Id. Update the
9367 calls to Build_Object_Declarations and Build_Raise_Statement to include
9369 (Build_Finalize_Statements): New local variable Abort_Id. Update the
9370 calls to Build_Object_Declarations and Build_Raise_Statement to include
9372 (Build_Components): Create an entity for Abort_Id when exceptions are
9373 allowed on the target.
9374 (Build_Finalizer): New local variable Abort_Id.
9375 (Build_Initialize_Statements): New local variable Abort_Id. Update the
9376 calls to Build_Object_Declarations and Build_Raise_Statement to include
9378 (Build_Object_Declarations): Add new formal Abort_Id. Create the
9379 declaration of flag Abort_Id to preserve the original abort status
9380 before finalization code is executed.
9381 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
9382 runtime routine Raise_From_Controlled_Operation.
9383 (Create_Finalizer): Update the call to Build_Raise_Statement to include
9384 Abort_Id. Update the call to Build_Object_Declarations to include
9385 Abort_Id. Update the layout of the finalizer body.
9386 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
9387 (Process_Transient_Objects): New local variable Abort_Id. Remove the
9388 clunky code to create all flags and objects related to
9389 exception propagation and replace it with a call to
9390 Build_Object_Declarations. Update the call to Build_Raise_Statement to
9392 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
9393 Add new formal Abort_Id and associated comment on its use.
9394 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
9396 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
9397 Remove the clunky code to create all flags and objects related to
9398 exception propagation and replace it with a call to
9399 Build_Object_Declarations. Update the call to Build_Raise_Statement.
9401 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
9403 * s-tassta.adb: Fix minor typos.
9405 2011-08-03 Robert Dewar <dewar@adacore.com>
9407 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
9408 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
9410 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
9412 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
9413 to packages. This ensures that the finalizer body will not end up
9414 inside the freeze node.
9415 (Process_Declarations): Add code to detect whether a freeze node has a
9416 nested finalization collection.
9418 2011-08-03 Pascal Obry <obry@adacore.com>
9420 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
9421 (Current_Session): Return a not null access to Session_Type.
9422 (Default_Session): Likewise.
9424 2011-08-03 Robert Dewar <dewar@adacore.com>
9426 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
9427 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
9429 2011-08-03 Pascal Obry <obry@adacore.com>
9431 * g-awk.ads: Minor comment fix.
9433 2011-08-03 Sergey Rybin <rybin@adacore.com>
9435 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
9436 the tree structure related to discriminant constraints.
9437 Original_Discriminant cannot be used any more for computing the
9438 defining name for the reference to a discriminant.
9440 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9442 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
9443 function is not visibly tagged, this is not a dispatching call and
9444 therfore is not Tag_Indeterminate, even if the function is marked as
9445 dispatching on result.
9447 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
9449 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
9450 (Expand_N_Free_Statement): Add a guard to protect against run-times
9451 which do not support controlled types.
9452 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
9453 against run-times which do not support controlled types.
9454 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
9455 against run-times which do not support controlled types.
9456 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
9457 against run-times which do not support controlled types.
9458 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
9459 protect against run-times which do not support controlled types.
9461 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
9463 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
9464 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
9466 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9468 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
9469 modified in the source, to prevent spurious warnings when compiling
9472 2011-08-03 Thomas Quinot <quinot@adacore.com>
9474 * a-except-2005.adb: Minor reformatting.
9476 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9478 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
9479 is a renaming declaration in the private part of a package, do not emit
9480 a warning that the with_clause could be moved because the renaming may
9481 be used in the body or in a child unit.
9483 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
9485 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
9486 Propagate the Comes_From_Source attribute from the original return
9487 object to the renaming.
9489 2011-08-03 Jose Ruiz <ruiz@adacore.com>
9491 * exp_ch7.adb (Build_Raise_Statement): Do not call
9492 Raise_From_Controlled_Operation when this routine is not present in
9493 the run-time library.
9494 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
9495 libraries (Ravenscar), tasks are non-terminating, and protected objects
9496 and tasks can only appear at library level, so we do not want
9497 finalization of protected objects nor tasks.
9498 * exp_intr.adb: Minor clarification in comment.
9499 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
9500 Gen_Output_File_C): Remove references to finalization of library-level
9501 objects when using restricted run-time libraries.
9503 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9505 * sem_ch3.adb (Build_Discriminant_Constraints): Set
9506 Original_Discriminant only if the parent type is a generic formal.
9508 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
9510 * exp_ch13.adb: Add with and use clause for Targparm;
9511 (Expand_N_Free_Statement): Prevent the generation of a custom
9512 Deallocate on .NET/JVM targets since this requires pools and address
9514 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
9515 .NET/JVM targets, attach the newly allocated object to the access
9516 type's finalization collection. Do not generate a call to
9517 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
9518 exist in the runtime.
9519 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
9520 create a custom Allocate for object that do not require initialization.
9521 Attach a newly allocated object to the access type's finalization
9522 collection on .NET/JVM.
9523 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
9524 assignment of controlled types on .NET/JVM. The two hidden pointers
9525 Prev and Next and stored and later restored after the assignment takes
9527 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
9528 kludge for .NET/JVM to recognize a particular piece of code coming from
9529 Heap_Management and change the call to Finalize into Deep_Finalize.
9530 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
9531 finalization collections on .NET/JVM only for types derived from
9532 Controlled. Separate the association of storage pools with a collection
9533 and only allow it on non-.NET/JVM targets.
9534 (Make_Attach_Call): New routine.
9535 (Make_Detach_Call): New routine.
9536 (Process_Object_Declarations): Suppress the generation of
9537 build-in-place return object clean up code on .NET/JVM since it uses
9539 * exp_ch7.ads (Make_Attach_Call): New routine.
9540 (Make_Detach_Call): New routine.
9541 * exp_intr.adb Add with and use clause for Targparm.
9542 (Expand_Unc_Deallocation): Detach a controlled object from a collection
9543 on .NET/JVM targets.
9544 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
9545 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
9546 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
9547 names used in finalization.
9549 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
9551 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
9552 (Attach, Detach): Lock the current task when chaining an object onto a
9555 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
9557 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
9558 Rewritten to create the message strings when the exception is not
9559 raised by an abort during finalization.
9560 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
9561 Raise_From_Controlled_Operation and update its associated comment.
9562 * a-fihema.ads, a-fihema.adb: New GNAT unit.
9563 Ada.Finalization.Heap_Management provides key functionality
9564 associated with controlled objects on the heap, their creation,
9565 finalization and reclamation. Type Finalization_Collection is
9566 effectively a wrapper which sits ontop of a storage pool and performs
9567 all necessary bookkeeping for all the objects it contains. Each
9568 access-to-controlled or access-to-class-wide type receives a collection
9569 as part of its expansion. The compiler generates buffer code and
9570 invokes Allocate / Deallocate to create and destroy allocated
9572 * a-finali.adb ("="): Removed.
9573 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
9574 fields Prev and Next.
9575 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
9576 A library unit with at least one controlled object on the library level
9577 has a special finalizer which is invoked by the binder. To signal this,
9578 ali files carry field PF.
9579 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
9580 associated comment on field usage.
9581 * a-tags.adb (Get_RC_Offset): Removed.
9582 (Needs_Finalization): New routine.
9583 * a-tags.ads: Update the structure of the GNAT dispatch tables.
9584 Dispatch tables now carry field Needs_Finalization which provides
9585 runtime indication whether a type is controlled or has controlled
9586 components or both. Remove field RC_Offset.
9587 (Get_RC_Offset): Removed along with its associated pragma Export.
9588 Since tagged types with controlled components no longer carry hidden
9589 field _controller, the special mechanism to retrieve its location is no
9591 (Needs_Finalization): New routine.
9592 * atree.ads, atree.adb (Elist24): New routine.
9593 (Set_Elist24): New routine.
9594 * atree.h: Add a define clause for Elist24.
9595 * bindgen.adb New library-level variable Lib_Final_Built.
9596 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
9597 presence of a VM target, the routine generates calls to the proper
9598 library finalization routine.
9599 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
9600 targets. Set the correct library finalization routine depending on
9601 whether the library has controlled objects or this is a VM compilation.
9602 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
9603 to library-level finalizers of compiled units in reverse order of
9604 elaboration. It also produces exception management code and reraises a
9605 potential exception after all units have been finalized.
9606 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
9607 library-level finalizers of compiled units in reverse order of
9609 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
9610 definitions of all library-level finalizers available to the compilation
9611 (Gen_Main_Ada): Directly call Adafinal which now contails all target
9613 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
9614 System.Standard_Library.Adafinal directly. If the library needs
9615 finalization actions, create the sequence of finalization calls.
9616 (Gen_Output_File_Ada): Alphabetize local variables and constants.
9617 Generate a with clause for System.Soft_Links when compiling for a VM.
9618 Remove the code which imports System.Standard_Library.Adafinal as
9619 Do_Finalize. Generate the library finalization routine.
9620 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
9621 If the library needs finalization actions, create all the definitions
9622 of library- level finalizers.
9623 (Has_Finalizer): New routine. Determines whether at least one compiled
9624 unit has a library-level finalizer.
9625 Add type Qualification_Mode.
9626 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
9627 * einfo.adb: New usage of field 15 as Return_Flag.
9628 Remove Finalization_Chain_Entity from the usages of field 19.
9629 Remove Associated_Final_Chain from the usages of field 23.
9630 New usage of field 23 as Associated_Collection.
9631 New usage of field 24 as Finalizer.
9632 New usage of flag 252 as Is_Processed_Transient.
9633 (Associated_Final_Chain): Removed.
9634 (Associated_Collection): New routine.
9635 (Finalization_Chain_Entity): Removed.
9636 (Finalizer): New routine.
9637 (Is_Finalizer): New routine.
9638 (Is_Processed_Transient): New routine.
9639 (Return_Flag): New routine.
9640 (Set_Associated_Final_Chain): Removed.
9641 (Set_Associated_Collection): New routine.
9642 (Set_Finalization_Chain_Entity): Removed.
9643 (Set_Finalizer): New routine.
9644 (Set_Is_Processed_Transient): New routine.
9645 (Set_Return_Flag): New routine.
9646 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
9648 (Write_Field8_Name): Alphabetize the output.
9649 (Write_Field11_Name): Alphabetize the output.
9650 (Write_Field12_Name): Alphabetize the output.
9651 (Write_Field13_Name): Alphabetize the output.
9652 (Write_Field14_Name): Alphabetize the output.
9653 (Write_Field15_Name): Alphabetize the output.
9654 (Write_Field16_Name): Alphabetize the output.
9655 (Write_Field17_Name): Alphabetize the output.
9656 (Write_Field18_Name): Alphabetize the output.
9657 (Write_Field19_Name): Alphabetize the output. Remove the output of
9658 Finalization_Chain_Entity.
9659 (Write_Field20_Name): Alphabetize the output.
9660 (Write_Field21_Name): Alphabetize the output.
9661 (Write_Field22_Name): Alphabetize the output.
9662 (Write_Field23_Name): Alphabetize the output. Remove the output of
9663 Associated_Final_Chain. Add output for Associated_Collection.
9664 (Write_Field24_Name): Alphabetize the output.
9665 (Write_Field25_Name): Add output for Finalizer.
9666 (Write_Field26_Name): Alphabetize the output.
9667 (Write_Field27_Name): Alphabetize the output.
9668 (Write_Field28_Name): Alphabetize the output.
9669 * einfo.ads: Add new field description for Associated_Collection and
9671 Remove Associated_Final_Chain and its uses in nodes.
9672 Remove Finalization_Chain_Entity and its uses in nodes.
9673 Add new field description for Finalizer and its uses in nodes.
9674 Add new synthesized attribute Is_Finalizer.
9675 Add new flag description for Is_Processed_Transient and its uses in
9677 Add new field description for Return_Flag and its uses in nodes.
9678 (Associated_Final_Chain): Removed along with its pragma Inline.
9679 (Associated_Collection): New routine and pragma Inline.
9680 (Finalization_Chain_Entity): Removed along with its pragma Inline.
9681 (Finalizer): New routine and pragma Inline.
9682 (Is_Finalizer): New routine and pragma Inline.
9683 (Is_Processed_Transient): New routine and pragma Inline.
9684 (Return_Flag): New routine and pragma Inline.
9685 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
9686 (Set_Associated_Collection): New routine and pragma Inline.
9687 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
9688 (Set_Finalizer): New routine and pragma Inline.
9689 (Set_Is_Processed_Transient): New routine and pragma Inline.
9690 (Set_Return_Flag): New routine and pragma Inline.
9691 * exp_aggr.adb: Alphabetize subprograms.
9692 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
9693 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
9694 associated comments. Remove local variables External_Final_List and
9696 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
9697 Ancestor. Remove the retrieval of finalization lists. Update the call to
9699 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
9700 lists. Update the call to Late_Expansion.
9701 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
9702 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
9703 (Gen_Assign): Remove the retrieval of the finalization list used to
9704 build the assignment. Update the calls to Make_Init_Call and
9706 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
9707 Remove the mechanism to determine attachment levels and finalization
9708 list retrieval. Remove the processing for coextensions.
9709 (Init_Controller): Removed. Controllers no longer exist.
9710 (Late_Expansion): Remove formals Flist and Obj along with their
9711 associated comments. Update the calls to Build_Record_Aggr_Code and
9712 Build_Array_Aggr_Code.
9713 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
9714 (Expand_N_Freeze_Entity): Add special processing for finalizers which
9715 appear in entry bodies, protected subprograms and task bodies.
9716 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
9717 * exp_ch3.adb (Add_Final_Chain): Removed.
9718 (Build_Array_Init_Proc): Alphabetize local variables.
9719 (Build_Assignment): Alphabetize local variables. Update the call to
9721 (Build_Class_Wide_Master): Rename local variables to better reflect
9723 (Build_Discriminant_Assignments): Code reformatting.
9724 (Build_Init_Call_Thru): Code reformatting.
9725 (Build_Init_Procedure): Code reformatting. Generate a special version
9726 of Deep_Finalize which is capable of finalizing all initialized
9727 components and ignore the rest.
9728 (Build_Init_Statements): Rename local variables to better reflect their
9730 Reimplement the mechanism to include the creation and update of an index
9731 variable called a "counter". It is used as a bookmark for tracing
9732 initialized and non-initialized components.
9733 (Build_Initialization_Call): Remove local variable Controller_Typ.
9734 Alphabetize all local variables. Remove the initialization of the
9735 record controller and update the call to Make_Init_Call.
9736 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
9737 New local variable Counter.
9738 (Constrain_Array): Alphabetize.
9739 (Expand_Freeze_Array_Type): Create a collection instead of a
9741 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
9742 Finalize_Address which is used in conjunction with allocated controlled
9744 (Expand_N_Object_Declaration): Remove the creation of a finalization
9745 list for anonymous access types. Update the calls to Make_Init_Call and
9747 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
9748 retrieval of finalization lists. Remove the expansion of the record
9749 controller. Create TSS primitive Finalize_Address used in conjunction
9750 with controlled objects on the heap. Create finalization collections
9751 for access-to-controlled record components.
9752 (Expand_Record_Controller): Removed.
9753 (Freeze_Type): Remove the freezing of record controllers. Freezing of
9754 class-wide types now requires additional processing. Create
9755 finalization collections for access-to-controlled types.
9756 (Increment_Counter): New routine.
9757 (Make_Counter): New routine.
9758 (Make_Eq_If): Remove the mention of Name_uController.
9759 (Make_Predefined_Primitive_Specs): There is no longer need to skip
9760 types coming from System.Finalization_Root.
9761 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
9762 (Predefined_Primitive_Bodies): There is no longer need to skip types
9763 coming from System.Finalization_Root.
9764 (Stream_Operation_OK): Do not generate stream routines for
9765 type Ada.Finalization.Heap_Management.Finalization_Collection.
9766 * exp_ch3.ads: Alphabetize subprograms.
9767 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
9768 Add with and use clause for Lib.
9769 (Complete_Coextension_Finalization): Removed.
9770 (Complete_Controlled_Allocation): New routine. Create a finalization
9771 collection for anonymous access-to-controlled types. Create a custom
9772 Allocate which interfaces with the back end and the machinery in
9774 (Expand_Allocator_Expression): Add necessary calls to
9775 Complete_Controlled_Allocation. Remove the retrieval of finalization
9776 lists. Update the calls to Make_Adjust_Call. Generate a call to
9777 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
9778 the associated collection.
9779 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
9780 Code clean up. Remove the retrieval of finalization lists and
9782 Update the call to Make_Init_Call. Generate a call to
9783 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
9784 the associated collection.
9785 (Get_Allocator_Final_List): Removed. Finalization lists are not
9787 (Suitable_Element): Remove the mention of Name_uController.
9788 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
9789 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
9790 the left hand side, carry out the assignment and adjust the left hand
9792 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
9793 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
9794 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
9795 BIP_Collection and BIPcollection.
9796 (Build_Heap_Allocator): New routine used to allocate the return object
9797 of a build-in-place function onto a collection.
9798 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
9799 (Expand_Call): Do not replace direct calls to Deep routines with their
9801 (Expand_N_Extended_Return_Statement): Give all variables shorter names
9802 and update their occurrences. Add a special return flag to monitor the
9803 [ab]normal execution of the function. The flag is set right before the
9805 Rewrite the mechanism used to allocate a build-in-place return object
9806 on the heap or on a storage pool.
9807 (Is_Direct_Deep_Call): New routine.
9808 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
9809 build-in-place function call instead of a final list. Build a call to
9810 Set_Finalize_Address_Ptr to decorate the associated collection.
9811 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
9812 order to name the build-in-place function call's result for later
9813 finalization. Add a collection to a build-in-place function call
9814 instead of a final list.
9815 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
9816 build-in-place function call instead of a final list. Remove the code
9817 which moves one final list and transforms it into the actual in a
9818 nested build-in-place call.
9819 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
9820 build-in-place function call instead of a final list.
9821 (Move_Final_List): Removed.
9822 (Needs_BIP_Collection): New routine.
9823 (Needs_BIP_Final_List): Removed.
9824 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
9825 enumeration type BIP_Formal_Kind.
9826 Update the related comment.
9827 (Needs_BIP_Collection): New routine.
9828 (Needs_BIP_Final_List): Removed.
9829 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
9830 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
9831 majority of subprograms in this unit. Add Name_Finalize_Address to
9832 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
9833 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
9834 statements for an array type.
9835 (Build_Adjust_Statements): Create the adjust statements for a record
9837 (Build_Cleanup_Statements): New routine. A procedure which given any
9838 construct containing asynchronous calls, references to _master, or is a
9839 task body, a task allocation or a protected body produces the necessary
9840 runtime calls to clean up these constructs.
9841 (Build_Exception_Handler): New routine.
9842 (Build_Final_List): Removed.
9843 (Build_Finalization_Collection): New routine. A core procedure which
9844 creates a collection to service heap allocated controlled objects
9845 associated with an access-to-controlled type.
9846 (Build_Finalize_Statements): Create the finalization statements for a
9848 (Build_Finalizer): New routine. A core procedure which given any
9849 construct with declarations and/or statements detects all objects which
9850 need any type of clean up (controlled objects, protected objects) and
9851 generates all necessary code to clean up the said objects in the proper
9853 (Build_Finalizer_Call): New routine.
9854 (Build_Initialize_Statements): Create the initialization statements for
9855 an array type. The generated routine contains code to finalize partially
9857 (Build_Object_Declarations): New routine.
9858 (Build_Raise_Statement): New routine.
9859 (Clean_Simple_Protected_Objects): Removed.
9860 (Controller_Component): Removed.
9861 (Enclosing_Function): New routine.
9862 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
9863 either declarations or statements or both.
9864 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
9865 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
9867 (Find_Final_List): Removed.
9868 (Global_Flist_Ref): Removed.
9869 (In_Finalization_Root): Removed.
9870 (Insert_Actions_In_Scope_Around): Determine the range of the transient
9871 scope in terms of tree nodes. Process all transient variables within
9873 (Make_Adjust_Call): Rewritten. There is no longer an attach call
9874 generated after the adjust.
9875 (Make_Attach_Call): Removed.
9876 (Make_Call): New routine.
9877 (Make_Clean): Removed.
9878 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
9880 (Make_Deep_Proc): Rewritten to generate the new profile signature used
9882 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
9884 (Make_Final_Call): Modified to simply create a call to either
9885 Deep_Finalize or Finalize.
9886 (Make_Finalize_Address_Body): New routine.
9887 (Make_Finalize_Address_Stmts): New routine. A function which produces
9888 TSS primitive Finalize_Address used in conjunction with heap allocated
9890 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
9891 (Make_Init_Call): Rewritten. There is no longer an attach call
9892 generated after initialization.
9893 (Make_Local_Deep_Finalize): New routine.
9894 (Make_Set_Finalize_Address_Ptr_Call): New routine.
9895 (Make_Transient_Block): Remove the finalization list retrieval and
9897 (Needs_Finalization): Moved to Exp_Util.
9898 (Parent_Field_Type): New routine.
9899 (Preprocess_Components): New routine.
9900 (Process_Transient_Objects): New routine.
9901 (Wrap_HSS_In_Block): New routine.
9902 (Wrap_Transient_Declaration): Remove finalization list management and
9903 controller insertion.
9904 (Wrap_Transient_Expression): Code reformatting.
9905 (Wrap_Transient_Statement): Code reformatting.
9906 * exp_ch7.ads (Build_Final_List): Removed.
9907 (Build_Finalization_Collection): New routine.
9908 (Build_Raise_Statement): New routine.
9909 (Controller_Component): Removed.
9910 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
9911 (Find_Final_List): Removed.
9912 (In_Finalization_Root): Removed.
9913 (Is_Simple_Protected_Type): Update related comment.
9914 (Make_Adjust_Call): New parameter profile and associated comments.
9915 (Make_Attach_Call): Removed.
9916 (Make_Final_Call): New parameter profile and associated comments.
9917 (Make_Finalize_Address_Body): New routine.
9918 (Make_Init_Call): New parameter profile and associated comments.
9919 (Make_Local_Deep_Finalize): New routine.
9920 (Make_Set_Finalize_Address_Ptr_Call): New routine.
9921 (Needs_Finalization): Moved to Exp_Util.
9922 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
9923 (Expand_N_Protected_Body): Remove the handling of finalization lists.
9924 (Find_Protection_Type): Moved to Exp_Util.
9925 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
9926 (Make_DT): Update sequence of dispatch table initialization. Remove the
9927 initialization of field RC_Offset. Add initialization of field Needs_
9929 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
9930 Reimplement how an object is first finalized, then deallocated.
9931 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
9933 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
9934 Register TSS_Finalize_Address with type TSS_Names.
9935 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
9936 procedure provides the interface between an allocation / deallocation
9937 and the support machinery in Ada.Finalization.Heap_Management.
9938 (Find_Init_Call): Code reformatting.
9939 (Find_Init_Call_In_List): Code reformatting.
9940 (Find_Protection_Type): Moved from Exp_Ch9.
9941 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
9942 (Has_Controlled_Coextensions): Removed.
9943 (Has_Controlled_Objects): New routine.
9944 (In_Library_Level_Package_Body): New routine.
9945 (Insert_Action_After): New routine.
9946 (Is_Finalizable_Transient): New routine. This predicate determines
9947 whether an object declaration is one of the many variants of controlled
9949 (Is_Null_Access_BIP_Func_Call): New routine.
9950 (Is_Non_BIP_Func_Call): New routine.
9951 (Is_Related_To_Func_Return): New routine.
9952 (Needs_Finalization): Moved from Exp_Ch7.
9953 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
9954 (Find_Protection_Type): Moved from Exp_Ch9.
9955 (Has_Controlled_Coextensions): Removed.
9956 (Has_Controlled_Objects): New routine.
9957 (In_Library_Level_Package_Body): New routine.
9958 (Insert_Action_After): New routine.
9959 (Is_Finalizable_Transient): New routine.
9960 (Is_Null_Access_BIP_Func_Call): New routine.
9961 (Is_Non_BIP_Func_Call): New routine.
9962 (Is_Related_To_Func_Return): New routine.
9963 (Needs_Finalization): Moved from Exp_ch7.
9964 * expander.adb (Expand): Add a case for N_Free_Statement.
9965 * freeze.adb (Freeze_All): Replace the generation of a finalization
9966 list with a collection for access-to-controlled types.
9967 (Freeze_Entity): Code reformatting.
9968 (Freeze_Record_Type): Remove the freezing of a record controller
9970 (Freeze_Subprogram): Code reformatting.
9971 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
9973 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
9974 has a library-level finalizer.
9975 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
9976 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
9977 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
9978 files. Add a-fihema to the list of object files.
9980 Alphabetize the associations in type Is_Parameterless_Attribute.
9981 * rtsfind.ads: Ada.Finalization_List.Controller and
9982 System.Finalization_Implementation are no longer a GNAT unit.
9983 Update the range of type Ada_Finalization_Child. Remove the following
9984 recoverable entities:
9986 RE_Attach_To_Final_List
9990 RE_Finalizable_Ptr_Ptr
9991 RE_Global_Final_List
9992 RE_Limited_Record_Controller
9995 RE_Record_Controller
9996 RE_Simple_List_Controller
9998 Add the following recoverable entities:
10000 RE_Add_Offset_To_Address
10004 RE_Exception_Identity
10005 RE_Finalization_Collection
10006 RE_Finalization_Collection_Ptr
10007 RE_Needs_Finalization
10008 RE_Save_Library_Occurrence
10009 RE_Set_Finalize_Address_Ptr
10010 RE_Set_Storage_Pool_Ptr
10012 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
10014 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
10015 (First_Stored_Discriminant): Remove the mention of Name_uController.
10016 * sem_aux.ads: Comment reformatting.
10017 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
10018 to redecorate an already existing class-wide type.
10019 (Decorate_Tagged_Type): New parameter profile and associated comment.
10020 Create a "shadow class-wide type" for a shadow entity.
10021 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
10022 of the final chain along with the associated comment.
10023 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
10024 Full_Desig and set it to the full view of the designated type.
10025 Initialize the finalization collection to empty.
10026 (Build_Derived_Record_Type): Alphabetize local variables. Code
10028 (Collect_Fixed_Components): Remove the mention of Name_uController.
10029 (Create_Constrained_Components): Remove the mention of Name_uController.
10030 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
10031 class-wide type of a shadow entity.
10032 (Process_Full_View): Update the machinery which marks type
10033 Limited_Controlled's entity as limited.
10034 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
10035 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
10036 list, instead make a collection build-in-place formal.
10037 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
10038 a designated type in order to establish a match between the renaming
10039 and the renamed entity.
10040 (Find_Selected_Component): Add guard to prevent spurious exceptions
10041 from being raised on .NET/JVM.
10042 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
10043 to the list of primitive that need special processing. Update arrays
10044 C_Names and D_Names.
10045 (Replace_Types): Handle class-wide types.
10046 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
10047 different parameter profile, look at the first formal.
10048 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
10049 use clauses for Exp_Util.
10050 * sem_res.adb: Remove with and use clauses for Elists.
10051 (Propagate_Coextensions): Removed.
10052 (Resolve_Allocator): Do not propagate the list of coextensions from one
10053 allocator to another.
10054 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
10055 Deaccessed_T to Desig_Typ.
10056 (Enter_Name): Remove the mention of Name_uController.
10057 (Gather_Components): Remove the mention of Name_uController.
10058 (Incomplete_Or_Private_View): New routine.
10059 (Is_Coextension_Root): Removed.
10060 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
10061 * sem_util.ads (Incomplete_Or_Private_View): New routine.
10062 (Is_Coextension_Root): Removed.
10063 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
10064 Controlled types are now derived from a null tagged record. Remove
10065 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
10066 * sinfo.adb (Coextensions): Removed.
10067 (Set_Coextensions): Removed.
10068 * sinfo.ads: Remove Coextensions from the explanation of node fields
10069 and its uses in nodes.
10070 Update the field usage of N_Allocator.
10071 (Coextensions): Removed along with its pragma Inline.
10072 (Set_Coextensions): Removed along with its pragma Inline.
10073 * snames.ads-tmpl: Remove names
10078 Name_uLocal_Final_List
10079 Name_Finalization_Root
10086 Name_Finalize_Address
10087 * s-pooglo.adb (Allocate): Add overriding indicator.
10088 (Deallocate): Add overriding indicator.
10089 (Storage_Size): Add overriding indicator.
10090 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
10091 than Finalize_Global_List.
10092 (Null_Finalize_Global_List): Removed.
10093 (Save_Library_Occurrence): New routine.
10094 * s-soflin.ads: Remove variable Finalize_Global_List along with its
10095 initialization. Add variable Finalize_Library_Objects along with its
10096 pragma Export. Add variables Library_Exception and
10097 Library_Exception_Set along with their pragma Export.
10098 (Null_Finalize_Global_List): Removed.
10099 (Save_Library_Occurrence): New routine.
10100 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
10101 rather than Finalize_Global_List.
10102 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
10103 of the constructed node.
10105 2011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10107 * link.c: Include "auto-host.h" before system headers.
10109 2011-08-03 Vincent Celier <celier@adacore.com>
10111 * make.adb (Gnatmake): Add to table Library_Projs only library projects
10112 that are not extended. Do not check if a library project that is
10113 extended should be regenerated. Do not add to table Library_Paths the
10114 libraries that are in extended projects. Link only with libraries that
10115 are in libray projects that are not extended.
10116 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
10117 for a library project that is extended.
10119 2011-08-03 Gary Dismukes <dismukes@adacore.com>
10121 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
10122 conforming subprogram renamings that appear to be completions if they
10123 are not fully conformant.
10124 Such renamings are homographs but not completions.
10125 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
10126 names in a subprogram renaming that appears in an instance.
10128 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10130 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
10131 not immutably limited, build actual subtype from expression to provide
10132 proper bounds to caller.
10134 2011-08-03 Gary Dismukes <dismukes@adacore.com>
10136 * sem_ch8.adb: Minor comment correction.
10138 2011-08-03 Thomas Quinot <quinot@adacore.com>
10140 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
10141 returning a limited array, use an extended return statement.
10143 2011-08-03 Vincent Celier <celier@adacore.com>
10145 * make.adb (Initialize): If --subdirs= is used, but no project file is
10146 specified, attempt to create the specify subdir if it does not already
10147 exist and use it as the object directory as if -D had been specified.
10149 2011-08-03 Arnaud Charlet <charlet@adacore.com>
10151 * s-tpopsp-vms.adb: New file.
10152 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
10153 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
10155 2011-08-03 Emmanuel Briot <briot@adacore.com>
10157 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
10160 2011-08-03 Yannick Moy <moy@adacore.com>
10162 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
10163 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
10164 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
10165 detect that an array has static bounds.
10167 2011-08-03 Thomas Quinot <quinot@adacore.com>
10169 * exp_dist.adb: Minor reformatting.
10171 2011-08-03 Arnaud Charlet <charlet@adacore.com>
10173 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
10174 (ATCB_Key): Removed, not always used.
10176 2011-08-03 Emmanuel Briot <briot@adacore.com>
10178 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
10179 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
10180 most remaining global variables.
10182 2011-08-03 Robert Dewar <dewar@adacore.com>
10184 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
10185 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
10188 2011-08-03 Javier Miranda <miranda@adacore.com>
10190 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
10191 that must be passed by copy in VM targets.
10193 2011-08-03 Emmanuel Briot <briot@adacore.com>
10195 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
10196 duplicates a similar htable now in the project tree.
10198 2011-08-03 Claire Dross <dross@adacore.com>
10200 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
10201 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
10202 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
10203 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
10204 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
10205 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
10206 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
10209 2011-08-03 Arnaud Charlet <charlet@adacore.com>
10211 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
10212 (ATCB_Key): Removed, not always used.
10213 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
10214 s-taprop-posix.adb.
10215 * s-tpopsp-tls.adb: New file.
10216 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
10217 x86/x64/ia64/powerpc/sparc Linux.
10219 2011-08-03 Arnaud Charlet <charlet@adacore.com>
10221 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
10222 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
10224 2011-08-03 Thomas Quinot <quinot@adacore.com>
10226 * rtsfind.ads, exp_dist.adb, exp_dist.ads
10227 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
10228 Fix type selection for mapping integer types to PolyORB types.
10230 2011-08-03 Bob Duff <duff@adacore.com>
10232 * sem_ch7.adb: Minor comment clarification.
10234 2011-08-03 Bob Duff <duff@adacore.com>
10236 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
10237 an error analyzing a choice, skip further processing. Further
10238 processing could cause a crash or cascade errors.
10240 2011-08-03 Emmanuel Briot <briot@adacore.com>
10242 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
10243 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
10244 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
10245 prj-env.ads (Shared_Project_Tree_Data): new type
10246 An aggregate project and its aggregated trees need to share the common
10247 data structures used for lists of strings, packages,... This makes the
10248 code simpler since otherwise we have to pass the root tree (also used
10249 for the configuration file data) in addition to the current project
10250 tree. This also avoids ambiguities as to which tree should be used.
10251 And finally this saves a bit of memory.
10252 (For_Every_Project_Imported): new parameter Tree.
10253 Since aggregated projects are using a different tree, we need to let
10254 the caller know which tree to use to manipulate the returned project.
10256 2011-08-03 Robert Dewar <dewar@adacore.com>
10258 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
10259 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
10260 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
10261 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
10263 2011-08-03 Javier Miranda <miranda@adacore.com>
10265 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
10266 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
10268 2011-08-03 Bob Duff <duff@adacore.com>
10270 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
10273 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
10275 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
10276 g-sehash.ads: Fix typo. Update header.
10278 2011-08-03 Thomas Quinot <quinot@adacore.com>
10280 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
10283 2011-08-03 Gary Dismukes <dismukes@adacore.com>
10285 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
10286 prefixes of private types along with records, since the selector may be
10288 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
10289 private types along with records, since the selector may be a
10292 2011-08-03 Emmanuel Briot <briot@adacore.com>
10294 * prj-pp.adb (Pretty_Print): Remove trailing blank line.
10296 2011-08-03 Javier Miranda <miranda@adacore.com>
10298 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
10299 Tagged_Type_Expansion.
10301 2011-08-03 Yannick Moy <moy@adacore.com>
10303 * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
10304 violation when the argument of concatenation is the name of a
10307 2011-08-03 Emmanuel Briot <briot@adacore.com>
10309 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
10310 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
10311 (Process_Declarative_Items): new parameter Child_Env.
10313 2011-08-03 Yannick Moy <moy@adacore.com>
10315 * alfa.ads: Update format of ALFA section in ALI file in order to
10316 add a mapping from bodies to specs when both are present.
10317 (ALFA_Scope_Record): Add components for spec file/scope.
10318 * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
10320 * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
10321 collected, fill in the spec information when relevant.
10322 * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
10325 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
10327 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
10328 code unit to decide whether to add internally generated subprograms.
10330 2011-08-03 Javier Miranda <miranda@adacore.com>
10332 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
10333 * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
10334 be handled by copy in VM targets.
10336 2011-08-03 Emmanuel Briot <briot@adacore.com>
10338 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
10339 code with Makeutl.Get_Switches.
10340 * prj-tree.adb: Update comment.
10342 2011-08-03 Thomas Quinot <quinot@adacore.com>
10344 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
10345 subprogram with a limited formal that does not support external
10348 2011-08-03 Yannick Moy <moy@adacore.com>
10350 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
10352 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
10353 not from current unit in two phases, because it is not possible to
10354 change the table while iterating over its content.
10355 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
10357 2011-08-03 Sergey Rybin <rybin@adacore.com>
10359 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
10360 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
10362 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10364 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
10365 and the component type is composite, this is ambiguous for predefined
10366 concatenation, but if the node is not overloaded and the entity is a use
10367 -defined function its profile can be used to resolve that aggregate.
10369 2011-08-03 Robert Dewar <dewar@adacore.com>
10371 * exp_ch4.adb: Minor code cleanup.
10373 2011-08-03 Thomas Quinot <quinot@adacore.com>
10375 * exp_dist.adb: Do not generate distribution stubs if serious errors
10376 have been diagnosed.
10378 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10380 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
10381 the first formal of a primitive operation, go to the base type to
10382 handle properly an access to a derived type with constrained
10384 * sem_type.adb (Disambiguate): an immediately visible operator hides a
10385 user-defined function that is only use-visible.
10387 2011-08-03 Robert Dewar <dewar@adacore.com>
10389 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
10390 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
10391 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
10392 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
10393 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
10394 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
10395 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
10396 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
10398 2011-08-03 Robert Dewar <dewar@adacore.com>
10400 * repinfo.adb (List_Mechanism): Add handling of
10401 Convention_Ada_Pass_By_XXX.
10402 * sem_mech.adb (Set_Mechanism): Ditto.
10403 * sem_prag.adb (Process_Convention): Add entries for
10404 Convention_Ada_Pass_By_XXX.
10405 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
10407 2011-08-03 Pascal Obry <obry@adacore.com>
10409 * makeutl.adb: Minor reformatting.
10411 2011-08-03 Vincent Celier <celier@adacore.com>
10414 (Get_File_Name) If the file cannot be found when there are no config
10415 pragmas file and May_Fail is True, return No_File instead of the file
10416 name, to be consistent.
10418 2011-08-03 Pascal Obry <obry@adacore.com>
10420 * adaint.c (__gnat_is_executable_file_attr): Avoid access
10423 2011-08-03 Javier Miranda <miranda@adacore.com>
10426 (Same_Representation): In VM targets the representation of arrays with
10427 aliased components differs from arrays with non-aliased components.
10429 2011-08-03 Emmanuel Briot <briot@adacore.com>
10431 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
10432 not systematically lower case attribute indexes that contain no "."
10433 Fix definition of several Naming attributes, which take
10434 a unit name as index and therefore should be case insensitive.
10435 Minor refactoring (reduce length of variable names).
10437 2011-08-03 Emmanuel Briot <briot@adacore.com>
10439 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
10441 2011-08-03 Emmanuel Briot <briot@adacore.com>
10443 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
10444 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
10445 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
10446 prj-tree.ads (Prj.Tree.Environment): new type.
10448 2011-08-03 Emmanuel Briot <briot@adacore.com>
10450 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
10451 prj-tree.adb, prj-tree.ads (Environment): new type.
10453 2011-08-03 Emmanuel Briot <briot@adacore.com>
10455 * prj-tree.ads: Remove unused variable.
10457 2011-08-03 Yannick Moy <moy@adacore.com>
10459 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
10460 issuing messages related to SPARK restriction violation.
10462 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10464 * sem_ch6.adb: guard against error nodes in return statements.
10466 2011-08-03 Arnaud Charlet <charlet@adacore.com>
10468 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
10469 a warning can only appear on a configuration file, so emit warning
10470 without further checks.
10472 2011-08-03 Arnaud Charlet <charlet@adacore.com>
10474 * s-interr.ads: add overriding keyword.
10476 2011-08-03 Geert Bosch <bosch@adacore.com>
10478 * exp_attr.adb: Fix minor typo.
10480 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10482 * par-ch4.adb: improve error recovery.
10484 2011-08-03 Emmanuel Briot <briot@adacore.com>
10486 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
10487 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
10488 to Errout_Handling.
10490 2011-08-03 Emmanuel Briot <briot@adacore.com>
10492 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
10493 "external" as an attribute name in aggregate projects.
10495 2011-08-03 Jose Ruiz <ruiz@adacore.com>
10497 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
10498 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
10499 from 0, so we need to adjust.
10501 2011-08-03 Emmanuel Briot <briot@adacore.com>
10503 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
10504 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
10506 2011-08-03 Yannick Moy <moy@adacore.com>
10508 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
10509 restriction on overloaded entity if the entity is not an operator.
10511 2011-08-03 Yannick Moy <moy@adacore.com>
10513 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
10514 restrict.ads: Rename remaining Check_Formal_Restriction* into
10515 Check_SPARK_Restriction*.
10517 2011-08-03 Emmanuel Briot <briot@adacore.com>
10519 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
10520 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
10522 (Project_Empty): removed
10523 (Empty_Project): new parameter Qualifier
10524 This is used to have fields specific to aggregate projects, cleaner
10525 New field to store the list of aggregated projects.
10526 (Check_Aggregate_Project): removed
10527 (Process_Aggregated_Projects, Free): new subprograms.
10529 2011-08-03 Olivier Hainque <hainque@adacore.com>
10531 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
10533 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10535 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
10536 explicit dereference of an unconstrained type, create a constrained
10537 subtype for it, as is done for function calls that return an
10538 unconstrained type.
10540 2011-08-03 Thomas Quinot <quinot@adacore.com>
10542 * g-pehage.adb (Finalize): Avoid possible double-free.
10544 2011-08-03 Steve Baird <baird@adacore.com>
10546 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
10547 Elab_Spec/Body attrs in CodePeer_Mode.
10549 2011-08-03 Javier Miranda <miranda@adacore.com>
10551 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
10552 low bound is not known at compile time but they have no others choice.
10553 Done because in this case the bounds can be obtained directly from the
10556 2011-08-03 Ed Falis <falis@adacore.com>
10558 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
10559 on VxWorks SMP. Remove unusable constant ANY_CPU.
10561 2011-08-03 Emmanuel Briot <briot@adacore.com>
10563 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
10564 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
10565 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
10566 Prj.Env.Initialize_Empty): new subprograms
10567 (Get_Env, Find_Project): remove parameter Target_Name.
10569 2011-08-03 Gary Dismukes <dismukes@adacore.com>
10571 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
10572 as a condition for the delayed call to Derived_Subprograms done for the
10573 case of the rewriting of a derived type that constrains the
10574 discriminants of its parent type.
10575 Avoids redundant subprogram derivations for private subtype derivations.
10577 2011-08-03 Javier Miranda <miranda@adacore.com>
10579 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
10580 Build_Record_Aggr_Code.
10581 (Build_Record_Aggr_Code): Add missing support to initialize hidden
10582 discriminants in extension aggregates.
10584 2011-08-03 Emmanuel Briot <briot@adacore.com>
10586 * prj-pp.adb (Print): also output project qualifiers, since in
10587 particular "aggregate" is mandatory in an aggregate project.
10589 2011-08-03 Emmanuel Briot <briot@adacore.com>
10591 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
10592 (Debug_Output): new function.
10594 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
10596 * gnat_ugn.texi: Document -Wstack-usage.
10597 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
10599 2011-08-03 Thomas Quinot <quinot@adacore.com>
10601 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
10602 have keyword LIMITED.
10604 2011-08-03 Yannick Moy <moy@adacore.com>
10606 * alfa.adb, alfa.ads, alfa_test.adb: New files.
10607 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
10608 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
10609 section (does not happen in compiler, only if code directly calls
10611 * get_alfa.adb, get_alfa.ads: New files.
10612 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
10614 * lib-xref-alfa.adb: New file.
10615 * lib-xref.adb, lib-xref.ads
10616 (Xref_Entry): redefine information needed in cross-references for ALFA.
10617 Push ALFA treatments in separated local package.
10618 (Enclosing_Subpragram_Or_Package): treat specially subprogram
10619 identifiers. Return entity of package body instead of spec. Return
10620 Empty for a scope with no location.
10621 (Generate_Reference): adapt to new components for ALFA information.
10622 Remove the need for D references on definitions.
10623 (Is_Local_Reference): moved to ALFA local package
10624 (Output_References): extract subfunction as Extract_Source_Name
10625 (Output_Local_References): remove procedure, replaced by filtering of
10626 cross-references in package ALFA and printing in Put_ALFA.
10627 (Write_Entity_Name): remove procedure
10628 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
10629 print exact name of entity as it appears in source file
10630 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
10631 * put_alfa.adb, put_alfa.ads: New files.
10632 * xref_lib.adb (Search_Xref): protect read of cross-references against
10633 reading other sections of the ALI file, in gnatxref
10634 (Search): protect read of cross-references against reading other
10635 sections of the ALI file, in gnatfind.
10636 * gcc-interface/Make-lang.in: Update dependencies.
10638 2011-08-03 Thomas Quinot <quinot@adacore.com>
10640 * sem_ch3.adb: Minor reformatting.
10642 2011-08-03 Jose Ruiz <ruiz@adacore.com>
10644 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
10645 raising an exception.
10647 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10649 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
10650 type, always use 1 as the lower bound or string, even if lower bound of
10651 context is not static, to handle properly null strings in a non-static
10654 2011-08-03 Bob Duff <duff@adacore.com>
10656 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
10657 always legal on the right-hand side of an assignment statement; there
10658 is always an applicable index constraint in this case. Therefore, the
10659 check for Pkind = N_Assignment_Statement is now unconditional -- it
10660 doesn't depend on whether Is_Constrained (Typ).
10662 2011-08-03 Robert Dewar <dewar@adacore.com>
10664 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
10666 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10668 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
10669 for an itype created within a generic unit.
10671 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
10673 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
10674 suppresses all inlining.
10676 2011-08-03 Robert Dewar <dewar@adacore.com>
10678 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
10679 exp_aggr.adb: Minor reformatting.
10681 2011-08-03 Thomas Quinot <quinot@adacore.com>
10683 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
10684 tagged assignment when discriminant checks are suppressed. This is
10685 useless and extremely costly in terms of static stack usage.
10687 2011-08-03 Bob Duff <duff@adacore.com>
10689 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
10690 of generics, because this leads to the wrong entity in the wrong scope,
10691 causing (e.g.) pragma Export_Procedure to get an error if the entity is
10693 (Process_Interface_Name): Follow Alias for instances of generics, to
10694 correct for the above change.
10696 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10698 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
10699 is an integer literal it is always safe to replace the reference. In
10700 addition, if the reference appears in the generated code for an object
10701 declaration it is necessary to copy because otherwise the reference
10702 might be to the uninitilized value of the discriminant of the object
10705 2011-08-03 Pascal Obry <obry@adacore.com>
10707 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
10708 ACL used, in this case we want to check for ending .exe, not .exe
10709 anywhere in the path.
10711 2011-08-03 Sergey Rybin <rybin@adacore.com>
10713 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
10714 the tree structure (semantic decoration of references to record
10717 2011-08-03 Gary Dismukes <dismukes@adacore.com>
10719 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
10720 choices of a named array aggregate, bail out when any choices are
10721 marked as Errors_Posted.
10723 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10725 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
10726 in which entity is frozen, to handle properly loop variables in
10729 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10731 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
10732 subtype is not static, compute the upper bound using attributes, to
10733 handle properly index types that are not integer types.
10735 2011-08-03 Bob Duff <duff@adacore.com>
10737 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
10738 Update copyright notice.
10740 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10742 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
10743 Original_Discriminant if within an instance.
10744 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
10746 2011-08-03 Thomas Quinot <quinot@adacore.com>
10748 * einfo.ads: Minor reformatting.
10750 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10752 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
10753 composite type with an unfrozen subcomponent, in the profile of a
10754 primitive operation.
10756 2011-08-03 Robert Dewar <dewar@adacore.com>
10758 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
10760 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10762 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
10763 unconstrained type with discriminants is initialized with an aggregate,
10764 use the constrained subtype of the aggregate as the type of the object,
10765 because it is immutable, and this allows the back-end to generate no
10766 code for the object declaration.
10768 2011-08-03 Robert Dewar <dewar@adacore.com>
10770 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
10771 comparison operand is variable, and turns out to be zero or negative.
10773 2011-08-03 Javier Miranda <miranda@adacore.com>
10776 (Expand_Dispatching_Constructor_Call): Disable expansion of
10777 code required for native targets. Done to avoid generating
10778 references to unavailable runtime entities in VM targets.
10780 (Expand_N_Object_Declaration): Add missing support to handle
10781 the explicit initialization of class-wide interface objects.
10784 2011-08-03 Matthew Heaney <heaney@adacore.com>
10786 * a-cobove.adb (Merge): Move source onto target, instead of using
10789 2011-08-03 Matthew Heaney <heaney@adacore.com>
10791 * a-cbdlli.adb (Splice): Move source items from first to last.
10793 2011-08-03 Yannick Moy <moy@adacore.com>
10795 * sem_util.ads: Add comment.
10797 2011-08-03 Javier Miranda <miranda@adacore.com>
10800 (Expand_Record_Aggregate): In VM targets disable the expansion into
10801 assignments of aggregates whose type is not known at compile time.
10803 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10805 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
10806 protected entries and task entries, to build the proper renaming
10807 declaration for entry formals, used in debugging.
10808 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
10809 parameters in the same way.
10811 2011-08-02 Robert Dewar <dewar@adacore.com>
10813 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
10814 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
10815 code reorganization.
10817 2011-08-02 Robert Dewar <dewar@adacore.com>
10819 * debug.adb: Debug flag d.P to suppress length comparison optimization
10820 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
10821 comparison of Length by comparing First/Last instead.
10823 2011-08-02 Matthew Heaney <heaney@adacore.com>
10825 * a-cobove.ads: Code clean up.
10827 2011-08-02 Vincent Celier <celier@adacore.com>
10829 * adaint.c (file_names_case_sensitive_cache): New static int.
10830 (__gnat_get_file_names_case_sensitive): Cache the return value in
10831 file_names_case_sensitive_cache at the first invocation, to avoid
10832 multiple calls to getenv.
10834 2011-08-02 Bob Duff <duff@adacore.com>
10836 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
10838 2011-08-02 Yannick Moy <moy@adacore.com>
10840 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
10841 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
10842 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
10843 indicate that we are in a precondition or postcondition. This is used in
10844 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
10845 decide whether to flag the spec or body of the current subprogram as
10848 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
10850 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
10852 * a-extiin.ads: New file.
10854 2011-08-02 Bob Duff <duff@adacore.com>
10856 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
10857 now raises Name_Error instead of Use_Error in certain cases. The other
10858 parts of this AI were already implemented properly.
10860 2011-08-02 Vincent Celier <celier@adacore.com>
10862 * link.c: Only import "auto-host.h" when building the gnattools.
10864 2011-08-02 Yannick Moy <moy@adacore.com>
10866 * sem_util.adb: Inter-unit inlining does not work for a subprogram
10867 which calls a local subprogram, so extract subprogram
10868 from Mark_Non_ALFA_Subprogram_Body.
10870 2011-08-02 Javier Miranda <miranda@adacore.com>
10873 (Extract_Dispatching_Call): If the type of the dispatching object is an
10874 access type then return an explicit dereference in the Object out-mode
10877 2011-08-02 Gary Dismukes <dismukes@adacore.com>
10879 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
10880 compatibility checks for all indexes of an array subtype, not just the
10881 first. Reset Has_Dynamic_Range_Check on the subtype before each
10882 potential check to ensure that Insert_Range_Checks will not elide any
10883 of the dynamic checks.
10885 2011-08-02 Yannick Moy <moy@adacore.com>
10887 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
10888 SPARK restriction at parsing time.
10889 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
10890 directive only if the SPARK restriction is set for this unit.
10892 2011-08-02 Yannick Moy <moy@adacore.com>
10894 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
10895 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
10896 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
10897 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
10898 Mark_Non_ALFA_Subprogram_Body.
10899 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
10902 2011-08-02 Yannick Moy <moy@adacore.com>
10904 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
10907 2011-08-02 Robert Dewar <dewar@adacore.com>
10909 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
10910 exp_ch3.adb: Minor reformatting.
10912 2011-08-02 Emmanuel Briot <briot@adacore.com>
10914 * adaint.c (__gnat_locate_exec_on_path): only returns executable
10915 files, not any regular file.
10916 (__gnat_locate_file_with_predicate): new subprogram.
10918 2011-08-02 Yannick Moy <moy@adacore.com>
10920 * sinfo.adb, sinfo.ads: Restrict the use of flags
10921 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
10922 nodes, plus N_Subtype_Declaration for the 2nd one.
10924 2011-08-02 Sergey Rybin <rybin@adacore.com>
10926 * gnat_rm.texi: Ramification of pragma Eliminate documentation
10927 - fix bugs in the description of Source_Trace;
10928 - get rid of UNIT_NAME;
10930 2011-08-02 Javier Miranda <miranda@adacore.com>
10933 (Build_Dispatching_Requeue): Adding support for VM targets
10934 since we cannot directly reference the Tag entity.
10935 * exp_sel.adb (Build_K): Adding support for VM targets.
10936 (Build_S_Assignment): Adding support for VM targets.
10938 (Default_Prim_Op_Position): In VM targets do not restrict availability
10939 of predefined interface primitives to compiling in Ada 2005 mode.
10940 (Is_Predefined_Interface_Primitive): In VM targets this service is not
10941 restricted to compiling in Ada 2005 mode.
10942 (Make_VM_TSD): Generate code that declares and initializes the OSD
10943 record. Needed to support dispatching calls through synchronized
10946 (Make_Predefined_Primitive_Specs): Enable generation of predefined
10947 primitives associated with synchronized interfaces.
10948 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
10949 primitives associated with synchronized interfaces.
10951 2011-08-02 Yannick Moy <moy@adacore.com>
10953 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
10954 statements hidden in SPARK if preceded by the HIDE directive
10955 (Parse_Exception_Handlers): mark each exception handler in a sequence of
10956 exception handlers as hidden in SPARK if preceded by the HIDE directive
10957 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
10958 if starting with the HIDE directive
10959 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
10960 starting with the HIDE directive; mark the declarations in a private
10961 part as hidden in SPARK if the private part starts with the HIDE
10963 * restrict.adb, restrict.ads
10964 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
10965 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
10966 argument node belongs to a part which is hidden in SPARK
10967 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
10968 parts in SPARK; protect the possibly costly call to
10969 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
10970 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
10971 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
10972 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
10974 (Scan): recognize special comment starting with '#' and followed by
10975 SPARK keyword "hide" as a HIDE directive.
10977 2011-08-02 Yannick Moy <moy@adacore.com>
10979 * types.ads, erroutc.ads: Minor reformatting.
10981 2011-08-02 Vincent Celier <celier@adacore.com>
10983 * link.c: Add response file support for cross platforms.
10985 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10987 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
10988 in an association, set parent field of copy before partial analysis.
10989 * sem_res.adb (Resolve_Slice): create reference to itype only when
10990 expansion is enabled.
10992 2011-08-02 Yannick Moy <moy@adacore.com>
10994 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
10995 for new flag denoting which subprogram bodies are in ALFA
10996 * restrict.adb, sem_ch7.adb: Update comment
10997 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
10998 sem_ch9.adb, sem_res.adb: Add calls to
10999 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
11000 * sem_ch6.adb (Analyze_Function_Return): add calls to
11001 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
11002 middle of the body, and extended return.
11003 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
11004 False when missing return.
11005 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
11006 to True for subprograms whose spec is in ALFA. Remove later on the flag
11007 on the entity used for a subprogram body when there exists a separate
11009 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
11010 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
11011 False, otherwise do nothing.
11013 2011-08-02 Robert Dewar <dewar@adacore.com>
11015 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
11017 2011-08-02 Yannick Moy <moy@adacore.com>
11019 * sem_ch4.ads: minor formatting.
11021 2011-08-02 Yannick Moy <moy@adacore.com>
11023 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
11024 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
11025 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
11026 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
11027 opt.ads: cleanup of SPARK mode
11029 2011-08-02 Yannick Moy <moy@adacore.com>
11031 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
11033 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
11034 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
11036 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
11037 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
11038 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
11039 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
11041 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
11043 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
11044 functions whose return type is not in ALFA.
11045 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
11047 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
11048 parameter's type is not in ALFA.
11049 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
11052 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11054 * sem_ch6 (Analyze_Expression_Function): treat the function as
11055 Inline_Always, and introduce a subprogram declaration for it when it is
11057 * inline.adb (Add_Inlined_Body): recognize bodies that come from
11058 expression functions, so that the back-end can determine whether they
11059 can in fact be inlined.
11060 * sem_util.adb (Is_Expression_Function): predicate to determine whether
11061 a function body comes from an expression function.
11063 2011-08-02 Gary Dismukes <dismukes@adacore.com>
11065 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
11066 null exclusions to test Can_Never_Be_Null on the anonymous access types
11067 of the formals rather than testing the formals themselves. Exclude this
11068 check in cases where the Old_Formal is marked as a controlling formal,
11069 to avoid issuing spurious errors for bodies completing dispatching
11070 operations (due to the flag not getting set on controlling access
11071 formals in body specs).
11072 (Find_Corresponding_Spec): When checking full and subtype conformance of
11073 subprogram bodies in instances, pass Designated and E in that order, for
11074 consistency with the expected order of the formals (New_Id followed by
11077 2011-08-02 Robert Dewar <dewar@adacore.com>
11079 * sem_ch8.adb: Minor reformatting.
11081 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11083 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
11084 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
11085 primitive operations of class-wide actuals.
11087 2011-08-02 Javier Miranda <miranda@adacore.com>
11089 * exp_atag.ads, exp_atag.adb
11090 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
11091 since its value is implicitly passed in argument Typ.
11092 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
11093 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
11094 Build_Common_Dispatching_Select_Statements.
11096 2011-08-02 Robert Dewar <dewar@adacore.com>
11098 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
11099 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
11100 Minor reformatting.
11102 2011-08-02 Robert Dewar <dewar@adacore.com>
11104 * sem_res.adb: Minor reformatting.
11105 * sem_prag.adb: Minor reformatting.
11107 2011-08-02 Javier Miranda <miranda@adacore.com>
11109 * exp_atag.adb, exp_atags.ads
11110 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
11111 by the tagged type Entity. Required to use this routine in the VM
11112 targets since we do not have available the Tag entity in the VM
11115 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
11116 Ada.Tags has not been previously loaded.
11118 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
11119 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
11121 (Enclosing_Dynamic_Scope): Add missing support to handle the full
11122 view of enclosing scopes. Required to handle enclosing scopes that
11123 are synchronized types whose full view is a task type.
11125 (Build_VM_TSDs): Minor code improvement to avoid generating and
11126 analyzing lists with empty nodes.
11127 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
11128 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
11129 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
11130 (Make_Disp_Timed_Select_Body): Add support for VM targets.
11131 (Make_Select_Specific_Data_Table): Add support for VM targets.
11132 (Make_VM_TSD): Generate code to initialize the SSD structure of
11135 2011-08-02 Yannick Moy <moy@adacore.com>
11137 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
11138 cross-references section in ALI.
11139 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
11140 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
11142 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
11143 subprogram or package entity of a node
11144 (Is_Local_Reference_Type): new function returns True for references
11145 selected in local cross-references.
11146 (Lt): function extracted from Lt in Output_References
11147 (Write_Entity_Name): function extracted from Output_References
11148 (Generate_Definition): generate reference with type 'D' for definition
11149 of objects (object declaration and parameter specification), with
11150 appropriate locations and units, for use in local cross-references.
11151 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
11152 references of type 'I' for initialization in object definition.
11153 (Output_References): move part of function Lt and procedure
11154 Write_Entity_Name outside of the body. Ignore references of types 'D'
11155 and 'I' introduced for local cross-references.
11156 (Output_Local_References): new procedure to output the local
11157 cross-references sections.
11158 (Lref_Entity_Status): new array defining whether an entity is a local
11159 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
11160 with 'I' type when initialization expression is present.
11161 * get_scos.adb, get_scos.ads: Correct comments and typos
11163 2011-08-02 Javier Miranda <miranda@adacore.com>
11165 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
11167 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
11169 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
11172 2011-08-02 Vincent Celier <celier@adacore.com>
11174 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
11175 (No_Space_Img): New function
11176 (Find_Excluded_Sources): When reading from a file, record the file name
11177 and the line number for each excluded source.
11178 (Mark_Excluded_Sources): When reporting an error, if the excluded
11179 sources were read from a file, include file name and line number in
11182 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11184 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
11186 2011-08-02 Robert Dewar <dewar@adacore.com>
11188 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
11190 2011-08-02 Javier Miranda <miranda@adacore.com>
11192 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
11193 generation of TSDs to the DOTNET compiler.
11194 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
11195 generation of TSDs to the DOTNET compiler.
11197 2011-08-02 Javier Miranda <miranda@adacore.com>
11199 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
11200 record of all the tagged types declared inside library level package
11201 declarations, library level package bodies or library level subprograms.
11202 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
11203 associated with a given tagged type.
11204 (Build_VM_TSDs): New subprogram.
11205 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
11206 compilation units that are subprograms.
11207 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
11208 compilation units that are package bodies.
11209 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
11210 units that are a package declaration or a package instantiation.
11211 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
11212 reorganization to improve the error generated by the frontend when the
11213 function Ada.Tags.Secondary_Tag is not available.
11214 * rtsfind.ads (RE_Register_TSD): New runtime entity.
11215 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
11217 2011-08-02 Javier Miranda <miranda@adacore.com>
11219 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
11221 2011-08-02 Robert Dewar <dewar@adacore.com>
11223 * s-imenne.ads: Minor reformatting.
11225 2011-08-02 Robert Dewar <dewar@adacore.com>
11227 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
11228 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
11229 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
11231 2011-08-02 Robert Dewar <dewar@adacore.com>
11233 * einfo.ads (Materialize_Entity): Document this is only for renamings
11234 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
11235 required debug information in the case where we transform the object
11236 declaration into a renaming declaration.
11237 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
11239 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
11240 Materialize_Entity.
11242 2011-08-02 Robert Dewar <dewar@adacore.com>
11244 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
11245 Suppress_Init_Procs.
11246 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
11247 Suppress_Initialization/Initialization_Suppressed.
11248 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
11249 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
11250 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
11251 * sem_prag.adb: New processing for pragma Suppress_Initialization.
11253 2011-08-02 Robert Dewar <dewar@adacore.com>
11255 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
11256 Minor reformatting.
11258 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11260 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
11261 only have inheritable classwide pre/postconditions.
11263 2011-08-02 Javier Miranda <miranda@adacore.com>
11265 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
11266 * rtsfind.ads (RE_Check_TSD): New runtime entity.
11267 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
11268 checks if the external tag of a type is the same as the external tag
11269 of some other declaration.
11271 2011-08-02 Thomas Quinot <quinot@adacore.com>
11273 * s-taskin.ads: Minor reformatting.
11275 2011-08-02 Emmanuel Briot <briot@adacore.com>
11277 * g-comlin.adb (Display_Help): swap the order in which it prints the
11278 short help and the general usage.
11280 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11282 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
11283 the aspect declarations and attach them to the generic copy for
11284 subsequent analysis.
11285 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
11286 declarations of the generic tree to the new subprogram declarations.
11287 * sem_attr.adb (Check_Precondition_Postcondition): recognize
11288 conditions that apply to a subprogram instance.
11290 2011-08-02 Robert Dewar <dewar@adacore.com>
11292 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
11294 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11296 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
11297 private type with a tagged full view is not derived in the immediate
11298 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
11300 2011-08-02 Robert Dewar <dewar@adacore.com>
11302 * exp_ch4.adb: Minor reformatting.
11304 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11306 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
11307 Ada2012 iterator, the loop will be rewritten during expansion into a
11308 while loop with a cursor and an element declaration. Do not analyze the
11309 body in this case, because if the container is for indefinite types the
11310 actual subtype of the elements will only be determined when the cursor
11311 declaration is analyzed.
11313 2011-08-02 Arnaud Charlet <charlet@adacore.com>
11315 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
11316 size/alignment related attributes in CodePeer_Mode.
11318 2011-08-02 Gary Dismukes <dismukes@adacore.com>
11320 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
11321 Prepend_Element, since this can result in the operation getting the
11322 wrong slot in the full type's dispatch table if the full type has
11323 inherited operations. The incomplete type's operation will get added
11324 to the proper position in the full type's primitives
11325 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
11326 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
11327 dispatching operations, since there are cases where nonprimitive
11328 subprograms can get added to the list of incomplete dependents (such
11329 as subprograms in nested packages).
11330 * sem_ch6.adb (Process_Formals): First, remove test for being in a
11331 private part when determining whether to add a primitive with a
11332 parameter of a tagged incomplete type to the Private_Dependents list.
11333 Such primitives can also occur in the visible part, and should not have
11334 been excluded from being private dependents.
11335 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
11336 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
11337 list of a Taft-amendment incomplete type is a primitive before issuing
11338 an error that the full type must appear in the same unit. There are
11339 cases where nonprimitives can be in the list (such as subprograms in
11341 * sem_disp.adb (Derives_From): Use correct condition for checking that
11342 a formal's type is derived from the type of the corresponding formal in
11343 the parent subprogram (the condition was completely wrong). Add
11344 checking that was missing for controlling result types being derived
11345 from the result type of the parent operation.
11347 2011-08-02 Yannick Moy <moy@adacore.com>
11349 * errout.adb (First_Node): minor renaming
11350 * restrict.adb (Check_Formal_Restriction): put restriction warning on
11353 2011-08-02 Yannick Moy <moy@adacore.com>
11355 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
11356 before accessing operands.
11357 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
11358 decide whether an initialization expression respects SPARK rules, as
11359 the plain node is the expanded one. This allows for more valid warnings
11361 * gnat_rm.texi: Minor update.
11363 2011-08-02 Arnaud Charlet <charlet@adacore.com>
11365 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
11368 2011-08-02 Robert Dewar <dewar@adacore.com>
11370 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
11372 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
11374 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
11375 loop statements and the element renaming declaration with a block when
11376 the element type is controlled.
11378 2011-08-02 Yannick Moy <moy@adacore.com>
11380 * sinfo.ads: Minor formatting.
11382 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11384 * sem_aggr.adb (Add_Association): if the association has a box and no
11385 expression, use the Sloc of the aggregate itself for the new
11387 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
11390 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
11392 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
11393 When a container is provided via a function call, generate a renaming
11394 of the function result. This avoids the creation of a transient scope
11395 and the premature finalization of the container.
11396 * exp_ch7.adb (Is_Container_Cursor): Removed.
11397 (Wrap_Transient_Declaration): Remove the supression of the finalization
11398 of the list controller when the declaration denotes a container cursor,
11401 2011-08-02 Yannick Moy <moy@adacore.com>
11403 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
11404 node is from source, instead of the original node being from source.
11406 (Resolve_Array_Aggregate): refine the check for a static expression, to
11407 recognize also static ranges
11408 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
11409 Array_Type_Declaration): postpone the test for the type being a subtype
11410 mark after the type has been resolved, so that component-selection and
11411 expanded-name are discriminated.
11412 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
11413 to distinguish the case of an iteration scheme, so that an error is
11414 issed on a non-static range in SPARK except in an iteration scheme.
11415 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
11416 In_Iter_Schm = True.
11417 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
11418 user-defined operators so that they are allowed in renaming
11420 (Find_Selected_Component): refine the check for prefixing of operators
11421 so that they are allowed in renaming. Move the checks for restrictions
11422 on selector name after analysis discriminated between
11423 component-selection and expanded-name.
11424 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
11425 concatenation argument of string type if it is static.
11426 * sem_util.adb, sem_util.ads
11427 (Check_Later_Vs_Basic_Declarations): add a new function
11428 Is_Later_Declarative_Item to decice which declarations are allowed as
11429 later items, in the two different modes Ada 83 and SPARK. In the SPARK
11430 mode, add that renamings are considered as later items.
11431 (Enclosing_Package): new function to return the enclosing package
11432 (Enter_Name): correct the rule for homonyms in SPARK
11433 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
11434 from source (result of expansion) to avoid issuing wrong warnings.
11436 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11438 * errout.adb: On anything but an expression First_Node returns its
11441 2011-08-02 Pascal Obry <obry@adacore.com>
11443 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
11445 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
11447 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
11448 Set the associated loop as the related expression of internally
11450 * exp_ch7.adb (Is_Container_Cursor): New routine.
11451 (Wrap_Transient_Declaration): Supress the finalization of the list
11452 controller when the declaration denotes a container cursor.
11454 2011-08-02 Yannick Moy <moy@adacore.com>
11456 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
11458 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
11459 expression is a simple expression. This check cannot be performed in
11460 the semantics, so just drop it.
11461 (P_Index_Or_Discriminant_Constraint): move check that the index or
11462 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
11463 semantics. Other cases were previously checked in the semantics.
11464 * par-ch4.adb (P_Name): move checks that a selector name is not
11465 character literal or an operator symbol to Find_Selected_Component in
11467 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
11468 declarations are not placed after later declarations in a separate
11469 procedure in Sem_Util (possibly not the best choice?), to be used both
11470 during parsing, for Ada 83 mode, and during semantic analysis, for
11472 * par-endh.adb (Check_End): move check that end label is not missing
11473 to Process_End_Label in the semantics
11474 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
11475 the special case for SPARK restriction
11476 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
11477 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
11478 parameter Force to issue the error message even on internal node (used
11479 for generated end label). Call Check_Restriction to check when an error
11480 must be issued. In SPARK mode, issue an error message even if the
11481 restriction is not set.
11482 (Check_Restriction): new procedure with an additional out parameter to
11483 inform the caller that a message has been issued
11484 * sem_aggr.adb: Minor modification of message
11485 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
11486 instead of issuing an error message directly
11487 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
11488 declarations are not placed after later declarations, by calling
11489 Check_Later_Vs_Basic_Declarations
11490 (Analyze_Subtype_Declaration): move here the check that an index or
11491 discriminant constraint must be a subtype mark. Change the check that
11492 a subtype of String must start at one so that it works on subtype marks.
11493 * sem_ch4.adb (Analyze_Call): move here the check that a named
11494 association cannot follow a positional one in a call
11495 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
11496 instead of issuing an error message directly
11497 * sem_ch8.adb (Find_Selected_Component): move here the check that a
11498 selector name is not a character literal or an operator symbol. Move
11499 here the check that the prefix of an expanded name cannot be a
11500 subprogram or a loop statement.
11501 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
11502 procedure called from parsing and semantics to check that basic
11503 declarations are not placed after later declarations
11504 (Process_End_Label): move here the check that end label is not missing
11506 2011-08-02 Arnaud Charlet <charlet@adacore.com>
11508 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
11509 representation clause in codepeer mode, since it confuses CodePeer and
11510 does not bring useful info.
11512 2011-08-02 Ed Falis <falis@adacore.com>
11514 * init.c: initialize fp hw on MILS.
11516 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11518 * errout.adb (First_Node): for bodies, return the node itself (small
11519 optimization). For other nodes, do not check source_unit if the node
11520 comes from Standard.
11522 2011-08-02 Robert Dewar <dewar@adacore.com>
11524 * exp_ch3.adb: Minor comment additions.
11525 * sem_ch13.adb: Minor reformatting.
11527 2011-08-02 Pascal Obry <obry@adacore.com>
11529 * make.adb, makeutl.adb: Removes some superfluous directory separator.
11531 2011-08-02 Robert Dewar <dewar@adacore.com>
11533 * sem_attr.adb: Minor reformatting.
11535 2011-08-02 Robert Dewar <dewar@adacore.com>
11537 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
11538 (Has_Default_Component_Value): Removed
11539 * einfo.ads Comment updates
11540 (Has_Default_Aspect): Replaces Has_Default_Value
11541 (Has_Default_Component_Value): Removed
11543 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
11545 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
11546 (Get_Simple_Init_Val): Handle Default_Value aspect
11547 (Needs_Simple_Initialization): Handle Default_Value aspect
11548 * exp_ch3.ads: Needs_Simple_Initialization
11549 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
11550 * par-prag.adb (Pragma_Default[_Component]Value) Removed
11552 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
11553 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
11554 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
11556 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11558 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
11559 package containing iteration primitives.
11560 exp_ch5.adb (Expand_Iterator_Loop): ditto.
11562 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11564 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
11565 "of", pre-analyze expression in case it is a function call with
11566 finalization actions that must be placed ahead of the loop.
11567 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
11568 on an Ada2012 iterator, insert them ahead of the rewritten loop.
11570 2011-08-02 Geert Bosch <bosch@adacore.com>
11572 * cstand.adb (Create_Float_Types): Only consider C's long double for
11573 Long_Long_Float, in addition to double.
11575 2011-08-02 Robert Dewar <dewar@adacore.com>
11577 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
11578 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
11579 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
11580 Minor reformatting.
11582 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11584 * sem_attr.adb: handle properly 'Result when it is a prefix of an
11587 2011-08-02 Javier Miranda <miranda@adacore.com>
11589 * einfo.ads, einfo.adb
11590 (Original_Access_Type): Move this attribute to Node26 since there was
11591 an undocumented use of Node21 in E_Access_Subprogram_Type entities
11592 which causes conflicts and breaks the generation of the .NET compiler.
11593 (Interface_Name): Add missing documentation on JGNAT only uses of
11596 2011-08-02 Geert Bosch <bosch@adacore.com>
11598 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
11599 (Find_Back_End_Float_Type): Likewise
11600 (Create_Back_End_Float_Types): Likewise
11601 (Create_Float_Types): Likewise
11602 (Register_Float_Type): Likewise
11603 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
11604 Nlist and split out type selection in new local Find_Base_Type function.
11605 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
11607 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
11609 2011-08-02 Robert Dewar <dewar@adacore.com>
11611 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
11613 * opt.ads: Minor comment change.
11614 * sem_ch12.adb: Minor code reorganization.
11616 2011-08-02 Gary Dismukes <dismukes@adacore.com>
11618 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
11619 subtype's list of rep items to the list on the full subtype in the case
11620 where the lists are the same.
11622 2011-08-02 Geert Bosch <bosch@adacore.com>
11624 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
11625 using the one from System.Strings, which also deallocates all strings.
11627 2011-08-02 Geert Bosch <bosch@adacore.com>
11629 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
11631 * gcc-interface/Make-lang.in: Update dependencies.
11633 2011-08-02 Olivier Hainque <hainque@adacore.com>
11635 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
11638 2011-08-02 Javier Miranda <miranda@adacore.com>
11640 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
11641 associated with anonymous access to subprograms.
11643 2011-08-02 Geert Bosch <bosch@adacore.com>
11646 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
11647 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
11648 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
11649 (Add_Symbol_Definition): Move to switch-c.adb
11650 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
11651 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
11652 (Add_Symbol_Definition): Move to switch-c.adb.
11653 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
11655 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
11656 Move to warnsw.adb.
11657 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
11658 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
11659 Move to warnsw.adb.
11660 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
11661 (Add_Symbol_Definition): Moved from Prepcomp.
11662 * switch-c.ads: Update copyright notice. Use String_List instead of
11663 Argument_List, removing dependency on System.OS_Lib.
11665 2011-08-02 Yannick Moy <moy@adacore.com>
11667 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
11668 mode on initialization expression which does not respect SPARK
11670 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
11671 if the tree referenced by its argument represents an initialization
11672 expression in SPARK, suitable for initializing an object in an object
11675 2011-08-02 Javier Miranda <miranda@adacore.com>
11677 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
11678 internally generated access to subprogram with its associated protected
11680 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
11682 2011-08-02 Geert Bosch <bosch@adacore.com>
11684 * cstand.adb (Register_Float_Type): Print information about type to
11685 register, if the Debug_Flag_Dot_B is set.
11686 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
11687 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
11688 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
11689 with a requested precision of more than Max_Digits digits and no more
11690 than Max_Base_Digits digits, if a range specification is present and the
11691 Predefined_Float_Types list has a suitable type to derive from.
11692 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
11693 case of type completion with pragma Import
11695 (Process_Import_Predefined_Type): Processing to complete a type
11696 with pragma Import. Currently supports floating point types only.
11697 (Set_Convention_From_Pragma): Do nothing without underlying type.
11698 (Process_Convention): Guard against absence of underlying type,
11699 which may happen when importing incomplete types.
11700 (Process_Import_Or_Interface): Handle case of importing predefined
11701 types. Tweak error message.
11703 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11705 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
11706 functions to previous change. Reorganize code slightly.
11708 2011-08-02 Geert Bosch <bosch@adacore.com>
11710 * back_end.ads (Register_Type_Proc): New call back procedure type for
11711 allowing the back end to provide information about available types.
11712 (Register_Back_End_Types): New procedure to register back end types.
11713 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
11715 * cstand.adb (Back_End_Float_Types): New list for floating point types
11716 supported by the back end.
11717 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
11718 (Copy_Float_Type): New procedure to make new copies of predefined types.
11719 (Register_Float_Type): New call back procedure to populate the BEFT list
11720 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
11721 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
11722 (Create_Float_Types): New procedure to create entities for floating
11723 point types predefined in Standard, and put these and any remaining
11724 BEFTs on the Predefined_Float_Types list.
11725 * stand.ads (Predefined_Float_Types): New list for predefined floating
11726 point types that do not have declarations in package Standard.
11728 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11730 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
11731 entity node for the unit containing the parameter.
11732 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
11733 (Add_Inlined_Subprogram): Likewise.
11734 * gcc-interface/Make-lang.in: Update dependencies.
11736 2011-08-02 Thomas Quinot <quinot@adacore.com>
11738 * s-stusta.adb (Print): Make sure Pos is always initialized to a
11741 2011-08-02 Geert Bosch <bosch@adacore.com>
11743 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
11745 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11747 * sem_type.adb (Covers): Move trivial case to the top and reuse the
11748 computed value of Base_Type.
11750 2011-08-02 Yannick Moy <moy@adacore.com>
11752 * restrict.adb (Check_Restriction): issue an error for any use of
11753 class-wide, even if the No_Dispatch restriction is not set.
11754 * sem_aggr.adb: Correct typos in comments and messages in formal mode
11755 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
11756 when completing a private extension, the type named in the private part
11757 is not the same as that named in the visible part.
11758 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
11759 of an inherited primitive operations of a tagged type or type extension
11760 that returns the tagged type.
11761 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
11762 function which returns True for an implicit operation inherited by the
11763 derived type declaration for the argument type.
11764 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
11767 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11769 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
11770 Process_Bounds, to perform analysis with expansion of a range or an
11771 expression that is the iteration scheme for a loop.
11772 (Analyze_Iterator_Specification): If domain of iteration is given by a
11773 function call with a controlled result, as is the case if call returns
11774 a predefined container, ensure that finalization actions are properly
11776 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
11778 2011-08-02 Javier Miranda <miranda@adacore.com>
11780 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
11781 * gcc-interface/Make-lang.in: Update dependencies.
11783 2011-08-02 Javier Miranda <miranda@adacore.com>
11785 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
11786 determine if the analysis is performed using N or Original_Node (N).
11787 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
11788 functionality of routine Is_Variable avoids code duplication.
11789 * checks.adb (Determine_Range): Handle temporaries generated by
11790 Remove_Side_Effects.
11792 2011-08-02 Javier Miranda <miranda@adacore.com>
11794 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
11795 expansion of the condition. Required since the previous analysis was
11796 done with expansion disabled (see Resolve_Quantified_Expression) and
11797 hence checks were not inserted and record comparisons have not been
11800 2011-08-02 Ed Falis <falis@adacore.com>
11802 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
11805 2011-08-02 Bob Duff <duff@adacore.com>
11807 * opt.ads: Minor comment fix.
11809 2011-08-02 Bob Duff <duff@adacore.com>
11811 * sem_ch12.adb (Analyze_Package_Instantiation,
11812 Analyze_Subprogram_Instantiation): Turn off style checking while
11813 analyzing an instance. Whatever style checks that apply to the generic
11814 unit should apply, so it makes no sense to apply them in an instance.
11815 This was causing trouble when compiling an instance of a runtime
11816 unit that violates the -gnatyO switch.
11817 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
11818 one of the two case statements, causing spurious errors.
11820 2011-08-02 Robert Dewar <dewar@adacore.com>
11822 * uname.adb: Minor reformatting.
11823 * gnatcmd.adb: Minor reformatting.
11824 * exp_attr.adb: Minor reformatting.
11826 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11828 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
11829 No_Dispatching_Calls, do not look for the Assign primitive, because
11830 predefined primitives are not created in this case.
11832 2011-08-02 Bob Duff <duff@adacore.com>
11834 * stylesw.ads: Minor comment fixes.
11836 2011-08-02 Robert Dewar <dewar@adacore.com>
11838 * freeze.adb (Add_To_Result): New procedure.
11840 2011-08-02 Jose Ruiz <ruiz@adacore.com>
11842 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
11843 time, if the specific run-time routines for handling streams of strings
11844 are not available, use the default mechanism.
11846 2011-08-02 Arnaud Charlet <charlet@adacore.com>
11848 * s-regpat.ads: Fix typo.
11850 2011-08-02 Vincent Celier <celier@adacore.com>
11852 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
11853 not null, call it to create the in memory config project file without
11854 parsing an existing default config project file.
11856 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11858 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
11860 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11862 * sem_elim.adb: an abstract subprogram does not need an eliminate
11863 pragma for its descendant to be eliminable.
11865 2011-08-02 Ed Falis <falis@adacore.com>
11867 * init.c: revert to handling before previous checkin for VxWorks
11868 * s-intman-vxworks.adb: delete unnecessary declarations related to
11869 using Ada interrupt facilities for handling signals.
11870 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
11871 * s-intman-vxworks.ads: Import __gnat_install_handler as
11872 Initialize_Interrupts.
11873 * s-taprop-vxworks.adb: Delete Signal_Mask.
11874 (Abort_Handler): change construction of mask to unblock exception
11877 2011-08-02 Jerome Guitton <guitton@adacore.com>
11879 * a-except-2005.adb (Raise_From_Signal_Handler): Call
11880 Debug_Raise_Exception before propagation starts.
11882 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11884 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
11885 to Restriction_Check_Required.
11886 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
11887 * sem_res.adb (Resolve_Call): Likewise.
11888 * sem_attr.adb (Check_Stream_Attribute): Likewise.
11890 2011-08-02 Bob Duff <duff@adacore.com>
11892 * stylesw.ads: Update comment.
11893 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
11894 * errout.ads: Remove obsolete comment.
11896 2011-08-02 Javier Miranda <miranda@adacore.com>
11898 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
11899 (Set_Is_Safe_To_Reevaluate): new procedure.
11900 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
11901 assignment is allowed on safe-to-reevaluate variables.
11902 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
11903 temporary created to remove side effects in expressions that use
11904 the secondary stack as safe-to-reevaluate.
11905 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
11906 variables that are not true constants.
11908 2011-08-02 Robert Dewar <dewar@adacore.com>
11910 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
11911 sem_res.adb, sem_ch6.adb: Minor reformatting.
11913 2011-08-02 Jerome Guitton <guitton@adacore.com>
11915 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
11917 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11919 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
11920 not set Overridden_Operation if subprogram is an initialization
11923 2011-08-02 Yannick Moy <moy@adacore.com>
11925 * par-ch6.adb: Correct obsolete name in comments
11926 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
11927 which takes two message arguments (existing function takes one), with
11928 second message used for continuation.
11929 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
11930 block statements that originate from a source block statement, not
11931 generated block statements
11932 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
11933 symmetry with procedure case
11934 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
11935 function to issue an error in formal mode if a package specification
11936 contains more than one tagged type or type extension.
11937 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
11938 parameters matching formals of tagged types are objects (or ancestor
11939 type conversions of objects), not general expressions. Issue an error
11940 on view conversions that are not involving ancestor conversion of an
11942 (Resolve_Type_Conversion): in formal mode, issue an error on the
11943 operand of an ancestor type conversion which is not an object
11944 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
11945 procedure so that it works also for actuals of function calls
11946 (Is_Actual_Tagged_Parameter): new function which determines if its
11947 argument is an actual parameter of a formal of tagged type in a
11949 (Is_SPARK_Object_Reference): new function which determines if the tree
11950 referenced by its argument represents an object in SPARK
11952 2011-08-02 Robert Dewar <dewar@adacore.com>
11954 * sem_ch3.adb: Minor reformatting
11955 Minor comment addition
11956 Minor error msg text change
11958 2011-08-02 Javier Miranda <miranda@adacore.com>
11960 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
11961 function. Used to be more precise when we generate a variable plus one
11962 assignment to remove side effects in the evaluation of the Bound
11964 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
11965 of the bound expression to force its re-analysis and thus expand the
11966 associated transient scope (if required). Code cleanup replacing the
11967 previous code that declared the constant entity by an invocation to
11968 routine Force_Evaluation which centralizes this work in the frontend.
11970 2011-08-02 Robert Dewar <dewar@adacore.com>
11972 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
11973 (Base_Type): Now uses improved Is_Base_Type function
11974 * einfo.ads (Base_Type): Inline this function
11976 2011-08-02 Robert Dewar <dewar@adacore.com>
11978 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
11979 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
11981 2011-08-02 Arnaud Charlet <charlet@adacore.com>
11983 * gcc-interface/Make-lang.in: Update dependencies.
11984 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
11987 2011-08-02 Yannick Moy <moy@adacore.com>
11989 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
11990 non-simple expression used in delta constraint
11991 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
11992 index constraint which is not a subtype mark
11993 * par.adb: With and use Restrict
11994 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
11995 mode on component type which is not a subtype mark and default
11996 expression on component
11997 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
11998 of string which does not have a lower index bound equal to 1
11999 (Array_Type_Declaration): issue an error in formal mode on index or
12000 component type which is not a subtype mark, and on aliased keyword on
12002 (Derived_Type_Declaration): issue an error in formal mode on interface,
12003 limited or abstract type
12004 (Record_Type_Declaration): issue an error in formal mode on interface
12005 (Record_Type_Definition): issue an error in formal mode on tagged types
12006 and type extensions not declared in the specification of a library unit
12007 package; on null non-tagged record; on variant part
12009 2011-08-02 Vincent Celier <celier@adacore.com>
12011 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
12012 not declared for qualified library project when Library_Name is not
12013 declared, but Library_Dir is.
12015 2011-08-02 Robert Dewar <dewar@adacore.com>
12017 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
12018 pragmas (affects aspects [Component_]Default_Value
12019 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
12020 component type for the resolution
12022 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12024 * einfo.adb (Base_Type): Tune implementation for speed.
12026 2011-08-02 Robert Dewar <dewar@adacore.com>
12028 * freeze.adb: Minor reformatting.
12030 2011-08-02 Thomas Quinot <quinot@adacore.com>
12032 * scos.ads: Update comments.
12034 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12036 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
12037 base type, because the parent may be a subtype of a private type whose
12038 convention is established in a private part.
12040 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
12042 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
12043 statement in a block when the expansion of the return expression has
12044 created a finalization chain.
12045 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
12046 with the parent node.
12047 Add N_Extended_Return_Statement to handle the case where a transient
12048 object declaration appears in the Return_Object_Declarations list of
12049 an extended return statement.
12051 2011-08-02 Matthew Gingell <gingell@adacore.com>
12053 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
12054 unused parameter 'name'.
12056 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12058 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
12059 inherited operation, check whether its alias, which is the source
12060 operastion that it renames, has been marked eliminated.
12062 2011-08-02 Javier Miranda <miranda@adacore.com>
12064 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
12065 in-mode parameter whose type is an access type since it can be used to
12066 modify its designated object. Enforce code that handles as safe an
12067 access type that is not access-to-constant but it is the result of a
12068 previous removal of side-effects.
12069 (Remove_Side_Effects): Minor code reorganization of cases which require
12070 no action. Done to incorporate documentation on new cases uncovered
12071 working in this ticket: no action needed if this routine was invoked
12072 too early and the nodes are not yet decorated.
12073 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
12074 to routine Remove_Side_Effects by calls to Force_Evaluation since they
12075 were issued with actuals that are implicitly provided by
12078 2011-08-02 Robert Dewar <dewar@adacore.com>
12080 * sem_ch3.adb, sem_res.adb: Minor reformatting.
12082 2011-08-02 Yannick Moy <moy@adacore.com>
12084 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
12085 to issue an error in formal mode on attribute not supported in this mode
12086 (Analyze_Attribute): issue errors on standard attributes not supported
12088 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
12089 comment, and issue error in formal mode on modulus which is not a power
12091 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
12093 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
12095 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
12096 operator on modular type (except 'not').
12098 2011-08-02 Robert Dewar <dewar@adacore.com>
12100 * gnat_rm.texi: Minor reformatting.
12102 2011-08-02 Arnaud Charlet <charlet@adacore.com>
12104 * s-osinte-linux.ads: Minor comment update and reformatting.
12105 * i-cexten.ads: Make this unit pure, as for its parent.
12106 Will allow its usage in more contexts if needed.
12108 2011-08-02 Robert Dewar <dewar@adacore.com>
12110 * s-utf_32.ads: Minor comment fix.
12112 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12114 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
12115 operation of a tagged synchronized type, handle the case where the
12116 controlling argument is overloaded.
12118 2011-08-02 Yannick Moy <moy@adacore.com>
12120 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
12121 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
12122 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
12123 SPARK mode and formal verification mode on processing SPARK restriction
12124 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
12125 requiring consistency checking.
12127 2011-08-02 Robert Dewar <dewar@adacore.com>
12129 * sem_res.adb: Minor reformatting.
12131 2011-08-02 Robert Dewar <dewar@adacore.com>
12133 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
12134 a-cforse.ads: Remove unneeded with of Ada.Containers
12135 Remove commented out pragma Inline's
12136 Move specifications of new subprograms to the actual specs
12138 2011-08-02 Yannick Moy <moy@adacore.com>
12140 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
12141 a-cforse.ads: Update comments.
12143 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12145 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
12147 2011-08-02 Robert Dewar <dewar@adacore.com>
12149 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
12150 a-cforse.ads, a-cofove.ads: Minor reformatting.
12152 2011-08-02 Claire Dross <dross@adacore.com>
12154 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
12155 a-cofove.ads: Add comments.
12157 2011-08-02 Yannick Moy <moy@adacore.com>
12159 * gnat_rm.texi: Document formal containers.
12161 2011-08-02 Emmanuel Briot <briot@adacore.com>
12163 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
12164 are empty sections.
12166 2011-08-02 Robert Dewar <dewar@adacore.com>
12168 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
12171 2011-08-02 Robert Dewar <dewar@adacore.com>
12173 * aspects.adb: New aspects Default_Value and Default_Component_Value
12174 New format of Aspect_Names table checks for omitted entries
12175 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
12176 handling of boolean aspects for derived types.
12177 New aspects Default_Value and Default_Component_Value
12178 New format of Aspect_Names table checks for omitted entries
12179 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
12180 (Has_Default_Value): New flag
12181 (Has_Default_Component_Value): New flag
12182 (Has_Default_Value): New flag
12183 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
12185 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
12186 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
12187 Default_Value and Default_Component_Value
12188 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
12189 New aspects Default_Value and Default_Component_Value
12190 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
12191 * sprint.adb: Print N_Aspect_Specification node when called from gdb
12193 2011-08-02 Vincent Celier <celier@adacore.com>
12195 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
12196 inherit library kind.
12198 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12200 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
12201 Minor reformatting.
12203 2011-08-02 Robert Dewar <dewar@adacore.com>
12205 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
12207 2011-08-02 Yannick Moy <moy@adacore.com>
12209 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
12211 2011-08-02 Robert Dewar <dewar@adacore.com>
12213 * impunit.adb: Add comment.
12215 2011-08-02 Yannick Moy <moy@adacore.com>
12217 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
12218 qualification of aggregates in formal mode
12219 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
12221 (Resolve_Aggregate): complete the test that an aggregate is adequately
12222 qualified in formal mode
12224 2011-08-02 Pascal Obry <obry@adacore.com>
12226 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
12227 * mlib-prj.adb: Supress warning when compiling binder generated file.
12228 (Build_Library): Supress all warnings when compiling the binder
12231 2011-08-02 Yannick Moy <moy@adacore.com>
12233 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
12235 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
12236 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
12237 Add with/use clauses to make Check_Formal_Restriction visible
12239 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12241 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
12242 in-parameters when type of the generic formal is private in the generic
12243 spec and non-private in the body.
12245 2011-08-02 Claire Dross <dross@adacore.com>
12247 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
12248 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
12249 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
12250 * impunit.adb, Makefile.rtl: Take new files into account.
12252 2011-08-02 Robert Dewar <dewar@adacore.com>
12254 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
12255 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
12257 2011-08-02 Yannick Moy <moy@adacore.com>
12259 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
12261 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
12262 matching static array bounds, taking into account the special case of
12264 * sem_ch3.adb: Typo in comment.
12266 2011-08-02 Yannick Moy <moy@adacore.com>
12268 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
12269 which issues an error in formal mode if its argument node is originally
12271 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
12272 has a discriminant specification so that it does not include the case
12274 (Derived_Type_Declaration): move here the test that a derived type has a
12275 discriminant specification
12276 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
12277 first element of a component association before accessing its choices
12278 (presence of component association is not enough)
12279 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
12280 declaration is a library item before accessing the next element in a
12281 list, as library items are not member of lists
12282 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
12283 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
12284 Check_Formal_Restriction whenever possible.
12286 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12288 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
12289 reference when needed.
12291 2011-08-02 Bob Duff <duff@adacore.com>
12293 * gnat_ugn.texi: Fix typo.
12295 2011-08-02 Vincent Celier <celier@adacore.com>
12297 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
12298 archive file name. Do not use the full path name of archives for Open
12301 2011-08-02 Robert Dewar <dewar@adacore.com>
12303 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
12304 Analyze_Aspect_Specifications
12306 (Analyze_Aspect_Specifications): New handling for boolean aspects
12307 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
12308 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
12309 sequence for Analyze_Aspect_Specifications
12310 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
12311 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
12313 2011-08-02 Robert Dewar <dewar@adacore.com>
12315 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
12316 aspects, since these no longer exist.
12318 2011-08-02 Robert Dewar <dewar@adacore.com>
12320 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
12321 semicolon, do not try to see if there are aspects following it.
12322 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
12325 2011-08-02 Robert Dewar <dewar@adacore.com>
12327 * sem_ch8.adb, aspects.ads: Minor reformatting.
12329 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12331 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
12332 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
12334 (Analyze_Aspect_Specifications): ...here. Call above procedure.
12336 2011-08-02 Yannick Moy <moy@adacore.com>
12338 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
12339 mode on subprogram declaration outside of package specification, unless
12340 it is followed by a pragma Import
12341 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
12342 Access_Type_Declaration): issue error in formal mode on access type
12343 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
12345 (Analyze_Object_Declaration): issue error in formal mode on object
12346 declaration which does not respect SPARK restrictions
12347 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
12348 declaration which does not respect SPARK restrictions
12349 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
12350 error in formal mode on digits or delta constraint
12351 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
12352 decimal fixed point type
12353 (Derived_Type_Declaration): issue error in formal mode on derived type
12354 other than type extensions of tagged record types
12355 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
12356 with check on access definition
12357 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
12358 mode on protected definition.
12359 (Analyze_Task_Definition): issue error in formal mode on task definition
12361 2011-08-02 Robert Dewar <dewar@adacore.com>
12363 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
12365 2011-08-02 Javier Miranda <miranda@adacore.com>
12367 * sem_ch6.adb (Can_Override_Operator): New function.
12368 (Verify_Overriding_Indicator): Add missing code to check overriding
12369 indicator in operators. Fixes regression.
12370 (Check_Overriding_Indicator): Minor reformating after replacing the
12371 code that evaluates if the subprogram can override an operator by
12372 invocations to the above new function.
12374 (Write_Field26_Name): Add missing code to ensure that, following
12375 the documentation in einfo.ads, this field is not shown as attribute
12376 "Static_Initialization" on non-dispatching functions.
12378 2011-08-02 Jose Ruiz <ruiz@adacore.com>
12380 * sem_res.adb (Resolve_Call): A call to
12381 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
12382 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
12383 i.e., when the second parameter is of type Time_Span.
12385 2011-08-02 Vincent Celier <celier@adacore.com>
12387 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
12388 with an archive instead of -L<library dir> -l<library name>.
12390 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12392 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
12393 mark the base types In_Use in addition to making the operations
12396 2011-08-02 Ed Falis <falis@adacore.com>
12398 * init.c: add and setup __gnat_signal_mask for the exception signals
12399 * s-inmaop-vxworks.adb: new file.
12400 * s-intman-vxworks.adb: remove unnecessary initializations and
12402 * s-intman-vxworks.ads: remove unnecessary variable
12403 * s-taprop-vxworks.adb: simplify signal initialization
12405 2011-08-02 Robert Dewar <dewar@adacore.com>
12407 * sem_ch8.adb: Minor code reorganization, comment updates.
12409 2011-08-02 Robert Dewar <dewar@adacore.com>
12411 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
12412 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
12414 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
12415 (Matching_Static_Array_Bounds): Moved here from Sem_Res
12417 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12419 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
12420 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
12421 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
12422 use_type_clauses, to handle more efficiently use_type and use_all_type
12424 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
12425 Ada2012 Use_All_Type clause.
12426 (Use_Class_Wide_Operations): new procedure.
12428 2011-08-02 Robert Dewar <dewar@adacore.com>
12430 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
12431 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
12432 expression to expression function.
12434 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12436 * sem_ch4.adb: transform simple Ada2012 membership into equality only
12437 if types are compatible.
12439 2011-08-02 Yannick Moy <moy@adacore.com>
12441 * sem_res.adb (Matching_Static_Array_Bounds): new function which
12442 returns True if its argument array types have same dimension and same
12443 static bounds at each index.
12444 (Resolve_Actuals): issue an error in formal mode on actuals passed as
12445 OUT or IN OUT paramaters which are not view conversions in SPARK.
12446 (Resolve_Arithmetic_Op): issue an error in formal mode on
12447 multiplication or division with operands of fixed point types which are
12448 not qualified or explicitly converted.
12449 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
12450 Boolean or array type (except String) operands.
12451 (Resolve_Equality_Op): issue an error in formal mode on equality
12452 operators for array types other than String with non-matching static
12454 (Resolve_Logical_Op): issue an error in formal mode on logical operators
12455 for array types with non-matching static bounds. Factorize the code in
12456 Matching_Static_Array_Bounds.
12457 (Resolve_Qualified_Expression): issue an error in formal mode on
12458 qualified expressions for array types with non-matching static bounds.
12459 (Resolve_Type_Conversion): issue an error in formal mode on type
12460 conversion for array types with non-matching static bounds
12462 2011-08-02 Robert Dewar <dewar@adacore.com>
12464 * par-ch10.adb: Minor code reorganization (use Nkind_In).
12466 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12468 * par-ch9.adb: save location of entry for proper error message.
12470 2011-08-02 Javier Miranda <miranda@adacore.com>
12472 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
12473 (Use_Full_View) which permits this routine to climb through the
12474 ancestors using the full-view of private parents.
12475 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
12476 Use_Full_View to true in calls to Is_Ancestor.
12477 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
12478 true in call to Is_Ancestor.
12479 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
12480 Use_Full_View to true in call to Is_Ancestor.
12481 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
12482 call to Is_Ancestor.
12483 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
12484 Use_Full_View to true in calls to Is_Ancestor.
12485 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
12486 Make_Select_Specific_Data_Table, Register_Primitive,
12487 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
12488 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
12489 to true in call to Is_Ancestor.
12490 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
12491 Use_Full_View to true in calls to Is_Ancestor.
12493 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
12494 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
12496 2011-08-02 Robert Dewar <dewar@adacore.com>
12498 * gnat_rm.texi: Minor reformatting.
12499 * sem_prag.adb: Minor reformatting.
12501 2011-08-02 Tristan Gingold <gingold@adacore.com>
12503 * vms_data.ads: Add VMS qualifier for -gnateP.
12505 2011-08-02 Robert Dewar <dewar@adacore.com>
12507 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
12508 * par-ch7.adb (P_Package): Proper placement of aspects for package
12509 decl/instantiation.
12510 * par-endh.adb (Check_End): Ad Is_Sloc parameter
12511 (End_Statements): Add Is_Sloc parameterr
12512 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
12513 (Check_End): Ad Is_Sloc parameter
12514 (End_Statements): Add Is_Sloc parameterr
12516 2011-08-02 Vincent Celier <celier@adacore.com>
12518 * ug_words: Add VMS qualifier equivalent to -gnateP:
12519 /SYMBOL_PREPROCESSING.
12521 2011-08-02 Jose Ruiz <ruiz@adacore.com>
12523 * gnat-style.texi: For hexadecimal numeric literals the typical
12524 grouping of digits is 4 to represent 2 bytes.
12525 A procedure spec which is split into several lines is indented two
12528 2011-08-02 Yannick Moy <moy@adacore.com>
12530 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
12531 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
12532 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
12534 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
12535 choice in array aggregate
12536 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
12538 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
12539 positional and named aggregate for record, or others in record
12540 aggregate, or multiple choice in record aggregate
12541 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
12542 array operands to logical operations AND, OR and XOR do not have the
12543 same static lower and higher bounds
12544 * sem_ch5.adb, sinfo.ads: Correct typos in comments
12546 2011-08-01 Robert Dewar <dewar@adacore.com>
12548 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
12549 Replaces Last_Source_Node_In_Sequence.
12550 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
12551 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
12552 parens and blank in string (this was inconsistently implemented).
12554 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
12555 blank in string (this was inconsistently implemented).
12557 (Set_Global_Switches): Set formal mode switches appropriately
12558 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
12560 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
12561 call Set_Error_Msg_Lang to set "spark" as language name.
12562 * par.adb: Remove unnecessary call to set formal language for errout
12563 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
12564 appropriately and call Set_Error_Msg_Lang to set "spark" as language
12566 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
12567 calls to it, moved after resolution so that types are known
12568 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
12569 result of concatenation is not of type String
12570 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
12571 concatenation is not properly restricted
12572 * gnat_rm.texi: Add doc on pragma Spark_95.
12573 * gcc-interface/Makefile.in: Remove obsolete target pairs for
12574 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
12575 * gcc-interface/Make-lang.in: Update dependencies.
12577 2011-08-01 Javier Miranda <miranda@adacore.com>
12579 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
12580 condition that detects if the overridden operation must replace an
12583 2011-08-01 Javier Miranda <miranda@adacore.com>
12585 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
12586 code declarations inserted by Insert_Actions in each alternative of the
12587 N_Case_Expression node.
12589 2011-08-01 Robert Dewar <dewar@adacore.com>
12591 * sem_ch6.adb: Minor code reorganization.
12592 * sem_util.adb: Minor reformatting.
12594 2011-08-01 Pascal Obry <obry@adacore.com>
12596 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
12597 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
12599 2011-08-01 Yannick Moy <moy@adacore.com>
12601 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
12602 literal or operator symbol which is prefixed
12603 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
12604 mode on access attributes.
12605 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
12606 that concatenation operands are properly restricted in formal mode
12607 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
12608 Analyze_Concatenation_Operand. Issue an error in formal mode if the
12609 result of the concatenation has a type different from String.
12610 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
12611 Analyze_Quantified_Expression, Analyze_Slice,
12612 Analyze_Null): issue an error in formal mode on unsupported constructs
12614 (Analyze_Block_Statement): only issue error on source block statement
12615 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
12616 function which returns the last node in a list of nodes for which
12617 Comes_From_Source returns True, if any
12618 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
12619 Last_Source_Node_In_Sequence
12620 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
12621 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
12622 mode on unsupported constructs
12623 * sem_ch9.adb Do not return after issuing error in formal mode, as the
12624 rest of the actions may be needed later on since the error is marked as
12626 * sinfo.ads: Typos in comments.
12628 2011-08-01 Pascal Obry <obry@adacore.com>
12630 * projects.texi: Minor editing.
12632 2011-08-01 Yannick Moy <moy@adacore.com>
12634 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
12635 insertion character ~~
12636 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
12637 (Set_Error_Msg_Lang): new procedure which fixes the language for use
12638 with insertion character ~~
12639 (Set_Msg_Text): treat insertion character ~~
12640 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
12641 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
12642 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
12643 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
12644 errors related to the formal language restriction not serious
12645 (insertion character |).
12646 * par.adb (Par): set formal language for error messages if needed
12647 * sem_ch6.adb (Check_Missing_Return): take into account possible
12648 generated statements at the end of the function
12649 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
12650 enumeration value to define a new pragma SPARK_95
12651 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
12652 SPARK_Version): new type and variables to store the SPARK version
12654 (SPARK_Mode): return True when SPARK_Version is set
12655 * par-prag.adb: Correct indentation
12656 (Prag): take Pragma_SPARK_95 into account
12657 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
12660 2011-08-01 Robert Dewar <dewar@adacore.com>
12662 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
12663 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
12664 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
12666 2011-08-01 Pascal Obry <obry@adacore.com>
12668 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
12669 Target_Name to Get_Path call.
12670 (Parse_Single_Project): Likewise.
12671 (Post_Parse_Context_Clause): Likewise.
12672 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
12673 Call Initialise_Project_Path with the proper Target_Name.
12674 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
12676 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
12677 with the proper Target_Name.
12678 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
12679 Part.Parse routine.
12680 (Parse_Project_And_Apply_Config): Likewise.
12681 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
12682 This is fine as this part of the code is supporting only native
12684 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
12685 is fine as this part of the code is supporting only native compilation.
12687 2011-08-01 Yannick Moy <moy@adacore.com>
12689 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
12690 of homonym, unless the homonym is one of the cases allowed in SPARK
12691 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
12692 package declaration occurring after a body.
12694 2011-08-01 Robert Dewar <dewar@adacore.com>
12696 * checks.adb, exp_ch4.adb: Minor reformatting.
12698 2011-08-01 Javier Miranda <miranda@adacore.com>
12700 * einfo.ads (Access_Disp_Table): Fix documentation.
12701 (Dispatch_Table_Wrappers): Fix documentation.
12703 2011-08-01 Pascal Obry <obry@adacore.com>
12705 * prj-env.adb, prj-env.ads: Minor reformatting.
12707 2011-08-01 Yannick Moy <moy@adacore.com>
12709 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
12710 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
12711 procedures out of these packages.
12712 * errout.ads, errout.adb
12713 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
12714 procedures in of this package
12715 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
12716 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
12717 on misplaced later vs initial declarations, like in Ada 83
12718 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
12719 formal mode on attribute of private type whose full type declaration
12721 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
12722 package declaration inside a package specification
12723 (Analyze_Full_Type_Declaration): issue error in formal mode on
12724 controlled type or discriminant type
12725 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
12726 user-defined operator means that it should come from the source
12727 (New_Overloaded_Entity): issue error in formal mode on overloaded
12729 * sem_ch6.ads, sem_ch13.ads: typos in comments.
12731 2011-08-01 Thomas Quinot <quinot@adacore.com>
12733 * atree.adb: Minor reformatting.
12734 * checks.adb: Minor reformatting.
12736 2011-08-01 Vincent Celier <celier@adacore.com>
12738 * s-parame-vms-ia64.ads: Fix typo in comment
12740 * s-parame-vms-restrict.ads: Removed, unused.
12742 2011-08-01 Javier Miranda <miranda@adacore.com>
12745 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
12747 (Constrain_Index): Remove side effects in the evaluation of the bounds.
12748 * sem_ch3.ads, sem_ch3.adb
12749 (Is_Constant_Bound): New extended version of the subprogram that was
12750 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
12751 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
12752 * sem_aux.ads (Constant_Value): Fix typo in comment.
12753 * checks.adb (Generate_Index_Checks): New implementation which, for
12754 array objects with constant bounds, generates the runtime check
12755 referencing the bounds of the array type. For other cases this routine
12756 provides its previous behavior obtaining such values from the array
12758 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
12760 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
12761 we cannot have semantic interpretations of the new node.
12763 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12765 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
12768 2011-08-01 Arnaud Charlet <charlet@adacore.com>
12770 * sem_ch8.adb: Minor code editing.
12771 * s-vxwext.adb: Remove trailing space.
12772 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
12773 consistency with other files.
12775 2011-08-01 Thomas Quinot <quinot@adacore.com>
12777 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
12779 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12781 * par-ch10.adb: reject parameterized expressions as compilation unit.
12782 * sem_ch4.adb: handle properly conditional expression with overloaded
12783 then_clause and no else_clause.
12785 2011-08-01 Tristan Gingold <gingold@adacore.com>
12787 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
12788 like done by System.Aux_DEC.
12789 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
12791 2011-08-01 Yannick Moy <moy@adacore.com>
12793 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
12794 missing label at end of declaration (subprogram or package)
12795 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
12796 of positional and named parameter association
12797 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
12798 Error_Msg_SP which adds a prefix to the error message giving the name
12799 of the formal language analyzed
12800 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
12801 access result type in subprogram, unconstrained array as result type,.
12802 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
12804 * sem_ch8.adb: Code clean up.
12806 2011-08-01 Javier Miranda <miranda@adacore.com>
12808 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
12809 * einfo.ads (Access_Disp_Table): Fix documentation.
12810 (Dispatch_Table_Wrappers): Fix documentation.
12811 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
12812 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
12813 to enforce the documentation of this attribute.
12814 (Set_Is_Interface): Cleanup the assertion.
12815 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
12816 the Underlying_Type entity before reading attribute Access_Disp_Table.
12817 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
12818 Locate the Underlying_Type before reading attribute Access_Disp_Table.
12819 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
12820 the Underlying_Type entity before reading attribute Access_Disp_Table.
12821 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
12822 Locate the Underlying_Type entity before reading attribute
12825 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12827 * s-poosiz.ads: Additional overriding indicators.
12829 2011-08-01 Yannick Moy <moy@adacore.com>
12831 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
12833 (Analyze_Iteration_Scheme): issue error in formal mode when loop
12834 parameter specification does not include a subtype mark.
12835 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
12836 formal mode on abstract subprogram.
12837 (Analyze_Subprogram_Specification): issue error in formal mode on
12838 user-defined operator.
12839 (Process_Formals): issue error in formal mode on access parameter and
12840 default expression.
12841 * sem_ch9.adb (Analyze_Abort_Statement,
12842 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
12843 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
12844 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
12845 Analyze_Requeue, Analyze_Selective_Accept,
12846 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
12847 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
12848 issue error in formal mode on user-defined raise statement.
12850 2011-08-01 Thomas Quinot <quinot@adacore.com>
12852 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
12853 declaration being hidden when overriding an implicit inherited
12855 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
12856 (-gnats), do not complain about a source file that contains only a
12859 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12861 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
12862 variable if already set.
12864 2011-08-01 Arnaud Charlet <charlet@adacore.com>
12866 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
12867 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
12868 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
12869 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
12870 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
12871 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
12872 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
12873 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
12874 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
12875 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
12876 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
12877 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
12878 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
12879 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
12880 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
12881 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
12882 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
12883 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
12884 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
12885 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
12886 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
12887 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
12888 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
12889 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
12890 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
12891 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
12892 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
12893 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
12894 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
12895 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
12896 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
12897 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
12898 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
12899 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
12900 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
12901 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
12902 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
12903 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
12904 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
12905 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
12906 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
12907 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
12908 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
12909 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
12910 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
12911 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
12912 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
12913 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
12914 s-osinte-mingw.ads: Update to GPLv3 run-time license.
12915 Use GNAT instead of GNARL.
12917 2011-08-01 Bob Duff <duff@adacore.com>
12919 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
12920 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
12921 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
12924 2011-08-01 Yannick Moy <moy@adacore.com>
12926 * debug.adb (d.D) reverve flag for the SPARK mode
12927 (d.E) reverve flag for SPARK generation mode
12928 (d.F) reverve flag for Why generation mode
12929 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
12930 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
12931 functions which return True when the corresponding modes are set
12932 (Formal_Language): return "spark" or "alfa" when in formal verification
12934 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
12935 Error_Msg to prefix the error message with a tag giving the formal
12937 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
12938 message with a tag giving the formal language
12939 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
12941 (Analyze_Case_Statement): issue error in formal mode on case statement
12942 with a single "others" case alternative
12943 (Analyze_Exit_Statement): issue errors in formal mode on exit
12944 statements which do not respect SPARK restrictions
12945 (Analyze_Goto_Statement): issue error in formal mode on goto statement
12946 (Check_Unreachable_Code): always issue an error (not a warning) in
12947 formal mode on unreachable code (concerns both code after an infinite
12948 loop and after an unconditional jump, both not allowed in SPARK)
12949 * sem_ch6.adb (Analyze_Return_Statement): add call to
12950 Set_Return_Present for a procedure containing a return statement
12951 (already done for functions in Analyze_Function_Return)
12952 (Analyze_Function_Return): issue error in formal mode on extended
12953 return or if return is not last statement in function
12954 (Check_Missing_Return): issue error in formal mode if function does
12955 not end with return or if procedure contains a return
12956 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
12957 function to detect if there is an inner scope of its parameter S which
12960 2011-08-01 Thomas Quinot <quinot@adacore.com>
12962 * sem_ch6.ads: Minor reformatting.
12964 2011-08-01 Javier Miranda <miranda@adacore.com>
12966 * sem_util.adb (Abstract_Interface_List): Complete condition when
12967 processing private type declarations to avoid reading unavailable
12969 (Is_Synchronized_Tagged_Type): Complete condition when processing
12970 private extension declaration nodes to avoid reading unavailable
12973 2011-08-01 Thomas Quinot <quinot@adacore.com>
12975 * sem_ch3.adb: Minor reformatting.
12977 2011-08-01 Thomas Quinot <quinot@adacore.com>
12979 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
12980 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
12981 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
12982 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
12983 for VMS, instead parametrize the common implementation with
12984 System.Parameters declarations.
12986 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
12988 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
12990 2011-08-01 Tristan Gingold <gingold@adacore.com>
12992 * seh_init.c: Fix SEH handler installation on win64.
12994 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12996 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
12997 double analysis of an anonymous access to subprogram, because it can
12998 lead to improper sharing of profiles and a back-end crash.
13000 2011-08-01 Robert Dewar <dewar@adacore.com>
13002 * make.adb, sem_ch4.adb: Minor reformatting.
13003 * gcc-interface/Make-lang.in: Update dependencies.
13004 * sem_util.adb, exp_ch5.adb: Minor reformatting.
13006 2011-08-01 Arnaud Charlet <charlet@adacore.com>
13008 * gnat_rm.texi: Fix definition of Long_Integer.
13010 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13012 * exp_aggr.adb: check limit size of static aggregate unconditionally,
13013 to prevent storage exhaustion.
13014 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
13015 finalized is a function body, insert the cleanup code before the final
13016 return statement, to prevent spurious warnings.
13017 * s-pooglo.ads: add overriding indicator.
13019 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13021 * sem_ch4.adb (Operator_Check): improve error message when both a
13022 with_clause and a use_clause are needed to make operator usage legal.
13023 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
13024 determine whether a compilation unit is visible within an other,
13025 either through a with_clause in the current unit, or a with_clause in
13026 its library unit or one one of its parents.
13028 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13030 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
13031 over an arbitrary expression of an array or container type.
13032 * lib-xref.adb: clarify comment.
13034 2011-08-01 Bob Duff <duff@adacore.com>
13036 * einfo.ads: Minor reformatting.
13037 * debug.adb: Minor comment improvement.
13039 2011-08-01 Javier Miranda <miranda@adacore.com>
13041 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
13042 consider hidden subprograms as valid candidates.
13044 2011-08-01 Arnaud Charlet <charlet@adacore.com>
13046 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
13048 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
13050 * gnat_ugn.texi: Fix typo.
13052 2011-08-01 Robert Dewar <dewar@adacore.com>
13054 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
13055 lib-xref.adb: Minor reformatting
13057 2011-08-01 Gary Dismukes <dismukes@adacore.com>
13059 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
13060 when to generate a call to Move_Final_List.
13061 (Has_Controlled_Parts): Remove this function.
13063 2011-08-01 Geert Bosch <bosch@adacore.com>
13065 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
13066 "," in choice list.
13068 2011-08-01 Thomas Quinot <quinot@adacore.com>
13070 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
13071 explicit raise of a predefined exception as Comes_From_Source if the
13072 original N_Raise_Statement comes from source.
13074 2011-08-01 Robert Dewar <dewar@adacore.com>
13076 * sinfo.ads: Add comment.
13077 * sem_ch6.adb: Minor reformatting.
13079 2011-08-01 Robert Dewar <dewar@adacore.com>
13081 * freeze.adb (Freeze_Entity): Refine check for bad component size
13082 clause to avoid rejecting confirming clause when atomic/aliased present.
13084 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13086 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
13087 better determine whether an entity reference is a write.
13088 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
13090 * lib-xref.adb (Output_References): Do no suppress a read reference at
13091 the same location as an immediately preceeding modify-reference, to
13092 handle properly in-out actuals.
13094 2011-08-01 Tristan Gingold <gingold@adacore.com>
13096 * env.c (__gnat_setenv) [VMS]: Refine previous change.
13098 2011-08-01 Quentin Ochem <ochem@adacore.com>
13100 * i-cstrin.adb (New_String): Changed implementation, now uses only the
13101 heap to compute the result.
13103 2011-08-01 Robert Dewar <dewar@adacore.com>
13105 * atree.ads: Minor reformatting.
13107 2011-08-01 Emmanuel Briot <briot@adacore.com>
13109 * g-expect.adb (Get_Command_Output): Fix memory leak.
13111 2011-08-01 Geert Bosch <bosch@adacore.com>
13113 * cstand.adb (P_Float_Type): New procedure to print the definition of
13114 predefined fpt types.
13115 (P_Mixed_Name): New procedure to print a name using mixed case
13116 (Print_Standard): Use P_Float_Type for printing floating point types
13117 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
13118 precision IEEE float.
13120 2011-08-01 Thomas Quinot <quinot@adacore.com>
13122 * sem_ch3.adb: Minor reformatting.
13124 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13126 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
13127 the completion of a generic function, insert the new body rather than
13128 rewriting the original.
13130 2011-08-01 Yannick Moy <moy@adacore.com>
13132 * sinfo.ads, errout.ads: Typos in comments.
13134 2011-08-01 Robert Dewar <dewar@adacore.com>
13136 * par-endh.adb: Minor reformatting.
13138 2011-08-01 Robert Dewar <dewar@adacore.com>
13140 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
13141 (Pre_Post_Aspects): New subtype.
13142 * par-ch12.adb (P_Generic): New syntax for aspects in packages
13143 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
13144 * par-ch7.adb (P_Package): Remove Decl parameter
13145 (P_Package): Handle new syntax for aspects (before IS)
13146 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
13148 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
13149 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
13150 (P_Package): Remove Decl parameter
13151 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
13153 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
13155 * sem_util.ads, sem_util.adb (Static_Boolean): New function
13156 * sinfo.ads: Document new syntax for aspects in packages etc.
13157 * sprint.adb: Handle new syntax of aspects before IS in package
13159 2011-08-01 Thomas Quinot <quinot@adacore.com>
13161 * atree.ads: Minor reformatting.
13162 * sem_prag.adb: Minor reformatting.
13164 2011-08-01 Robert Dewar <dewar@adacore.com>
13166 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
13167 case expr alternative.
13169 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13171 * sem_ch12.adb: Fix typo.
13173 2011-08-01 Geert Bosch <bosch@adacore.com>
13175 * sem_prag.adb (Check_No_Link_Name): New procedure.
13176 (Process_Import_Or_Interface): Use Check_No_Link_Name.
13177 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
13178 instead of Standard_Long_Long_Float_Size global. Preparation for
13179 eventual removal of per type constants.
13180 * exp_util.ads (Get_Stream_Size): New function returning the stream
13181 size value of subtype E.
13182 * exp_util.adb (Get_Stream_Size): Implement new function.
13183 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
13185 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
13187 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
13189 2011-08-01 Geert Bosch <bosch@adacore.com>
13191 * cstand.adb: Fix comments.
13192 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
13193 count of arguments.
13195 2011-08-01 Robert Dewar <dewar@adacore.com>
13197 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
13199 2011-08-01 Geert Bosch <bosch@adacore.com>
13201 * atree.ads: Fix comment.
13203 2011-08-01 Robert Dewar <dewar@adacore.com>
13205 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
13206 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
13207 * par.adb: Add with for Namet.Sp.
13208 * par-tchk.adb: Minor reformatting.
13210 2011-08-01 Vincent Celier <celier@adacore.com>
13212 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
13213 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
13214 of the init procedure of a SAL.
13215 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
13218 2011-08-01 Thomas Quinot <quinot@adacore.com>
13220 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
13223 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13225 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
13227 2011-08-01 Thomas Quinot <quinot@adacore.com>
13229 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
13230 conformant with its spec (return True only for types that have
13231 an overriding Initialize primitive operation that prevents them from
13232 having preelaborable initialization).
13233 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
13234 initialization for controlled types in Ada 2005 or later mode.
13236 2011-08-01 Robert Dewar <dewar@adacore.com>
13238 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
13240 (Same_Aspect): New function.
13241 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
13242 Type_Invariant, Precondition, Postcondition.
13243 * snames.ads-tmpl: Add Name_Type_Invariant.
13245 2011-08-01 Robert Dewar <dewar@adacore.com>
13247 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
13249 (Freeze_All_Ent): Fix error in handling inherited aspects.
13250 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
13251 already analyzed, but don't skip entire processing of a declaration,
13252 that's wrong in some cases of declarations being rewritten.
13253 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
13254 Don't delay for integer, string literals
13255 Treat predicates in usual manner for delay, remove special case code,
13257 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
13258 (Build_Predicate_Function): Update saved expression in aspect
13259 (Build_Invariant_Procedure): Update saved expression in aspect
13260 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
13261 of replacement of discriminant references if the reference is simple.
13263 2011-08-01 Robert Dewar <dewar@adacore.com>
13265 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
13266 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
13267 Static_Predicate and Dynamic_Predicate.
13268 (Build_Predicate_Function): Add processing for Static_Predicate
13269 and Dynamic_Predicate.
13270 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
13271 (From_Static_Predicate): New flag
13272 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
13274 2011-08-01 Robert Dewar <dewar@adacore.com>
13276 * usage.adb: Documentation cleanup for Ada version modes in usage.
13277 * expander.adb: Minor reformatting.
13279 2011-08-01 Robert Dewar <dewar@adacore.com>
13281 * atree.ads: Minor comment fix.
13282 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
13283 a-witeio.ads, sem_prag.adb: Minor reformatting.
13285 2011-08-01 Doug Rupp <rupp@adacore.com>
13287 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
13288 pointers. Use descrip.h header file for convenience. Add some
13291 2011-08-01 Robert Dewar <dewar@adacore.com>
13293 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
13294 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
13295 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
13297 (Check_Aspect_At_End_Of_Declarations): New procedure
13298 (Analye_Aspect_Specification): Minor changes for above procedures
13299 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
13300 specification node as well.
13302 2011-08-01 Pascal Obry <obry@adacore.com>
13304 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
13305 Windows files. Use GetFilesAttributes() in this case to check for file
13306 existence instead of returning with an error code.
13308 2011-08-01 Vincent Celier <celier@adacore.com>
13310 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
13311 High is above Source length.
13313 2011-08-01 Robert Dewar <dewar@adacore.com>
13315 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
13317 2011-08-01 Robert Dewar <dewar@adacore.com>
13319 * aspects.ads (Boolean_Aspects): New subtype.
13320 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
13321 for derived types in cases where the parent type and derived type have
13323 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
13324 with aspects when parent type also has aspects.
13325 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
13326 boolean expression at this point).
13327 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
13328 accordance with final decision on the Ada 2012 feature.
13329 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
13331 2011-08-01 Matthew Heaney <heaney@adacore.com>
13333 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
13335 2011-08-01 Pascal Obry <obry@adacore.com>
13337 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
13338 Fix Replace_Slice when High is above current string size.
13339 (Replace_Slice): Fix DL computation when High is above current
13342 2011-08-01 Gary Dismukes <dismukes@adacore.com>
13344 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
13346 2011-08-01 Matthew Heaney <heaney@adacore.com>
13348 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
13351 2011-08-01 Pascal Obry <obry@adacore.com>
13353 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
13356 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13358 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
13359 access to protected subprograms in generic bodies.
13360 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
13361 protected type, indicate that the convention of the subprogram is
13362 Convention_Protected, because it may be used in subsequent declarations
13363 within the protected declaration.
13365 2011-08-01 Vincent Celier <celier@adacore.com>
13367 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
13368 and "final" procedures when the name of the library is "ada", to avoid
13369 duplicate symbols "adainit" and "adafinal" in executables.
13371 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13373 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
13374 quantified expression that appears within a postcondition and uses the
13375 Ada2012 'Result attribute.
13377 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13379 * init.c (__gnat_error_handler): Cast reason to int.
13380 (__gnat_install_handler): Explain sa_sigaction use.
13382 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
13384 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
13385 subprogram has copy-in copy-out parameters, try to promote the mode of
13386 the return type if it is passed in registers.
13388 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
13390 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
13391 left operand as addressable.
13393 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
13395 * gcc-interface/gigi.h (build_function_stub): Remove.
13396 (build_return_expr): Likewise.
13397 (convert_vms_descriptor): Declare.
13398 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
13399 (build_function_stub): Move to...
13400 * gcc-interface/utils2.c (build_return_expr): Move to...
13401 * gcc-interface/trans.c (build_function_stub): ...here.
13402 (build_return_expr): ...here.
13403 (Subprogram_Body_to_gnu): Add local variable for language_function.
13404 Disconnect the parameter attributes cache, if any, once done with it.
13405 Call end_subprog_body only after setting the end_locus.
13406 Build the stub associated with the function, if any, at the very end.
13407 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
13408 variables and streamline control flow.
13410 2011-07-23 Arnaud Charlet <charlet@adacore.com>
13413 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
13414 g-trasym-dwarf.adb.
13416 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13419 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
13420 Assign to act.sa_sigaction.
13421 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
13422 current->return_address to char * before arithmetic.
13424 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13426 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
13427 Correct argument types.
13428 Extract code from reason.
13429 (__gnat_install_handler): Assign to act.sa_sigaction.
13431 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
13433 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
13434 (GNAT1_OBJS): ...here.
13436 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
13439 * g-socthi-mingw.adb (Fill): Fix formatting.
13441 * gcc-interface/gigi.h: Move around comment.
13443 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
13446 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
13448 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
13451 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
13453 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
13455 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
13456 range comparison if Pmode is SImode.
13458 2011-07-12 Laurent GUERBY <laurent@guerby.net>
13459 Eric Botcazou <ebotcazou@adacore.com>
13461 * adadecode.c: Wrap up in extern "C" block.
13462 * adadecode.h: Likewise.
13463 * adaint.c: Likewise. Remove 'const' keyword.
13464 * adaint.h: Likewise.
13465 * argv.c: Likewise.
13466 * atree.h: Likewise.
13468 * cstreams.c: Likewise.
13470 * exit.c: Likewise.
13472 * final.c: Likewise.
13473 * init.c: Likewise.
13474 * initialize.c: Likewise.
13475 * link.c: Likewise.
13476 * namet.h: Likewise.
13477 * nlists.h: Likewise.
13478 * raise.c: Likewise.
13479 * raise.h: Likewise.
13480 * repinfo.h: Likewise.
13481 * seh_init.c: Likewise.
13482 * targext.c: Likewise.
13483 * tracebak.c: Likewise.
13484 * uintp.h: Likewise.
13485 * urealp.h: Likewise.
13486 * xeinfo.adb: Wrap up generated C code in extern "C" block.
13487 * xsinfo.adb: Likewise.
13488 * xsnamest.adb: Likewise.
13489 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
13490 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
13491 * gcc-interface/misc.c: Likewise.
13492 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
13493 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
13494 ada/targext.o here...
13495 (GNAT_ADA_OBJS): ...and not here.
13496 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
13497 (GNATBIND_OBJS): Reorder.
13499 2011-07-07 Richard Henderson <rth@redhat.com>
13501 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
13502 dwarf2out_frame_init.
13504 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
13506 * gcc-interface/misc.c (gnat_init): Tweak previous change.
13508 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13511 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
13513 2011-07-06 Richard Guenther <rguenther@suse.de>
13515 * gcc-interface/misc.c (gnat_init): Merge calls to
13516 build_common_tree_nodes and build_common_tree_nodes_2.
13517 Re-initialize boolean_false_node.
13519 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
13520 Olivier Hainque <hainque@adacore.com>
13521 Nicolas Setton <setton@adacore.com>
13523 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
13524 the type according to the ARTIFICIAL_P parameter.
13525 (create_type_decl): Likewise.
13526 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
13528 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
13530 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
13531 (gnatbind): Likewise.
13533 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13535 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
13537 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
13539 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
13540 local variable throughout. Remove useless call to Base_Type.
13541 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
13542 Take it also into account for the volatileness of the field. Set the
13543 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
13545 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
13547 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
13548 on a dereference built for a by-ref object if it has an address clause.
13550 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
13552 * einfo.ads (Address_Taken): Document use for the second argument of
13553 Asm_Input and Asm_Output attributes.
13554 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
13555 argument is an entity name, then set Address_Taken on it.
13556 <Attribute_Asm_Output>: Likewise.
13557 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
13558 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
13559 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
13560 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
13562 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
13564 PR middle-end/46500
13565 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
13567 2011-06-14 Joseph Myers <joseph@codesourcery.com>
13569 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
13570 (ada/utils.o): Update dependencies.
13571 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
13572 ../../../libcpp/libcpp.a.
13573 * gcc-interface/utils.c: Include common/common-target.h.
13574 (process_attributes): Use targetm_common.have_named_sections.
13576 2011-06-07 Richard Guenther <rguenther@suse.de>
13578 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
13581 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
13583 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
13584 TREE_THIS_NOTRAP flag.
13586 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
13588 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
13591 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
13593 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
13594 constants whose full view has discriminants specially.
13596 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
13598 * gcc-interface/utils.c: Include diagnostic.h.
13599 (gnat_write_global_declarations): Output debug information for all
13600 global type declarations before finalizing the compilation unit.
13601 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
13603 2011-05-25 Jakub Jelinek <jakub@redhat.com>
13605 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
13607 2011-05-25 Kai Tietz <ktietz@redhat.com>
13609 * adaint.c (__gnat_to_canonical_file_list_next): Use array
13610 initialization instead of const/none-const pointer assignment.
13612 2011-05-24 Joseph Myers <joseph@codesourcery.com>
13614 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
13615 $(EXTRA_GNAT1_OBJS).
13616 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
13617 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
13618 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
13619 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
13620 libcommon-target.a instead of prefix.o.
13622 2011-05-21 Joseph Myers <joseph@codesourcery.com>
13625 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
13627 2011-05-20 Joseph Myers <joseph@codesourcery.com>
13629 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
13630 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
13631 instead of version.o.
13633 2011-05-18 Kai Tietz <ktietz@redhat.com>
13635 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
13636 boolean_false_node instead of integer_zero_node.
13637 (convert_with_check): Likewise.
13638 * gcc-interface/decl.c (choices_to_gnu): Likewise.
13640 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
13642 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
13643 type of the parameter is an unconstrained array, convert the actual to
13644 the type of the formal in the In Out and Out cases as well.
13646 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
13648 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
13649 call build_function_type_array or build_varargs_function_type_array
13651 (create_subprog_type): Don't call build_function_type; call
13652 build_function_type_vec instead.
13654 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
13656 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
13657 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
13658 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
13660 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
13662 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
13664 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
13665 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
13667 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
13669 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
13671 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
13673 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
13674 instead of accessing TYPE_ARG_TYPES directly.
13675 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
13677 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
13680 * gcc-interface/gigi.h (get_variant_part): Declare.
13681 * gcc-interface/decl.c (get_variant_part): Make global.
13682 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
13683 types have the same constant size, are record types and T1 has a
13684 variant part while T2 doesn't.
13686 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
13688 * gcc-interface/utils.c (begin_subprog_body): Do not call
13690 (end_subprog_body): Likewise.
13692 2011-05-04 Richard Guenther <rguenther@suse.de>
13694 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
13696 (pos_to_constructor): Likewise.
13698 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
13699 Eric Botcazou <ebotcazou@adacore.com>
13701 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
13702 of build_function_type. Adjust calls to...
13703 (build_raise_check): ...this. Do not take a void_tree parameter.
13704 Call build_function_type_list instead of build_function_type.
13705 Fix head comment and swap couple of conditional blocks.
13707 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
13709 * gnatvsn.ads (Library_Version): Bump to 4.7.
13710 (Current_Year): Bump to 2011.
13712 2011-04-29 Michael Matz <matz@suse.de>
13714 * gcc-interface/misc.c (gnat_handle_option): Set
13715 warn_maybe_uninitialized.
13717 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
13719 * gnat_ugn.texi (Complexity Metrics Control): Update link to
13720 the Watson/McCabe paper.
13722 2011-04-23 Jim Meyering <meyering@redhat.com>
13724 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
13726 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
13728 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
13731 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
13733 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
13735 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
13736 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
13737 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
13738 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
13739 <all>: Do not set flags on the reused DECL node coming from an alias.
13740 Set DECL_IGNORED_P on the DECL node built for subprograms if they
13741 don't need debug info here...
13742 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
13743 (gigi): Adjust calls to create_subprog_decl.
13744 (build_raise_check): Likewise.
13745 (establish_gnat_vms_condition_handler): Likewise.
13746 (Compilation_Unit_to_gnu): Likewise.
13747 (gnat_to_gnu): Likewise.
13749 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
13751 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
13752 (NO_REORDER_ADAFLAGS): New variable.
13753 (EXTRA_GNATTOOLS): Always define.
13754 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
13755 Clean up and adjust list of files compiled with special options.
13756 * gcc-interface/Make-lang.in: Likewise.
13757 (ada/decl.o): Cosmetical change.
13758 (ada/misc.o): Remove dependency on $(PLUGIN_H).
13760 2011-04-20 Jim Meyering <meyering@redhat.com>
13762 * initialize.c (__gnat_initialize): Remove useless if-before-free.
13764 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
13766 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
13767 $(CFLAGS) on the link line.
13769 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
13771 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
13772 padded type built for the return type if it is unconstrained.
13774 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
13776 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
13778 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
13780 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
13781 before calling TREE_CHAIN.
13782 * gcc-interface/misc.c (gnat_init_ts): New function.
13783 (LANG_HOOKS_INIT_TS): Define.
13785 2011-04-12 Martin Jambor <mjambor@suse.cz>
13787 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
13788 instead of cgraph_node.
13790 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
13792 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
13793 alignment on fields of the RETURN type built for the Copy-In Copy-Out
13796 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
13798 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
13799 of aggregate types that contain a placeholder.
13801 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
13803 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
13805 (handle_type_generic_attribute): Likewise.
13807 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
13810 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
13812 2011-04-04 Kai Tietz <ktietz@redhat.com>
13815 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
13818 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13820 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
13821 type case, do not strip a padding type around the array type.
13823 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13825 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
13828 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13830 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
13831 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
13832 code for -feliminate-unused-debug-types.
13833 (gnat_post_options): Likewise.
13835 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13837 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
13838 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
13841 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13843 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
13844 DECL_ARTIFICIAL flag on enumeration types.
13846 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13848 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
13849 fat pointer types artificial unconditionally.
13850 <E_Array_Subtype>: Attach the base array type as a parallel type if it
13853 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13855 * gcc-interface/gigi.h (get_dummy_type): Declare.
13856 (build_dummy_unc_pointer_types): Likewise.
13857 (finish_fat_pointer_type): Likewise.
13858 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
13859 fat pointer type has been built, complete it in place.
13860 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
13861 and thin pointers. Remove useless variable.
13862 (finish_fat_pointer_type): Make global and move to...
13863 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
13864 (get_dummy_type): New function.
13865 (build_dummy_unc_pointer_types): Likewise.
13866 (gnat_pushdecl): Propage the name to the anonymous variants only.
13867 (update_pointer_to): Only adjust the pointer types in the unconstrained
13870 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13872 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
13873 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
13874 if this is a Taft amendment type and the full declaration is available.
13875 * gcc-interface/trans.c (process_type): Likewise.
13876 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
13877 (process_freeze_entity): Likewise.
13878 * gcc-interface/utils.c (dummy_global): New static variable.
13879 (gnat_write_global_declarations): If there are types declared as used
13880 at the global level, insert them in the global hash table.
13882 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13884 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
13885 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
13886 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
13888 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
13889 flag of the type accordingly.
13890 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
13892 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13894 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
13895 finalizing types when updating the pointers to the designated type.
13896 <all>: Finalize the deferred types even if we didn't defer processing
13897 of incomplete types in this invocation.
13899 2011-04-01 Olivier Hainque <hainque@adacore.com>
13900 Nicolas Setton <setton@adacore.com>
13901 Eric Botcazou <ebotcazou@adacore.com>
13903 * gcc-interface/misc.c (gnat_descriptive_type): New function.
13904 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
13906 2011-03-28 Kai Tietz <ktietz@redhat.com>
13908 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
13910 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
13911 * system-mingw.ads (System): Change ZCX_By_Default default to True.
13913 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
13915 2011-03-28 Tristan Gingold <gingold@adacore.com>
13918 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
13919 Use ada output of gnatbind.
13920 (ada/b_gnatb.adb): Ditto.
13921 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
13922 (ada.mostlyclean, ada.stage1)
13923 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
13924 (ada.stagefeedback): Adjust.
13925 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
13926 Use ada output of gnatbind.
13927 (b_gnatm.adb): Ditto.
13928 (b_gnatl.o, b_gnatm.o): New rules.
13930 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
13932 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
13933 for the padded type built to support a specified size or alignment.
13935 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
13937 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
13938 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
13939 unconditionally to the end of the unit when the designated type is
13941 <all>: Rename local variable. Attempt to un-defer types only and do it
13942 for limited_with'ed types as well.
13943 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
13944 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
13945 consistently and remove redundant call to finalize_from_with_types.
13947 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
13949 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
13950 subprograms without a previous spec declared in the same unit.
13951 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
13952 subprograms at the end of the unit instead of at the beginning.
13953 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
13954 isn't public for the special handling of non-inline functions nested
13955 inside inline external functions.
13957 2011-03-25 Jeff Law <law@redhat.com>
13959 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
13961 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
13963 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
13964 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
13965 to compute Set_Size_Depends_On_Discriminant.
13966 (Layout_Type): Call it on array types in back-end layout mode.
13967 * sem_util.adb (Requires_Transient_Scope): Return true for array
13968 types only if the size depends on the value of discriminants.
13969 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
13970 type if the RHS is a call to a function that returns an unconstrained
13971 type with default discriminant.
13973 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
13975 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
13976 non-conversion to the nominal result type at the end.
13978 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
13980 * gcc-interface/trans.c (create_temporary): New function taken from...
13981 (create_init_temporary): ...here. Call it.
13982 (call_to_gnu): Create the temporary for the return value early, if any.
13983 Create it for a function with copy-in/copy-out parameters if there is
13984 no target; in other cases of copy-in/copy-out, use another temporary.
13985 Push the new binding level lazily. Add and rename local variables.
13987 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
13989 * gcc-interface/decl.c (validate_size): Improve comments and tweak
13991 (set_rm_size): Likewise.
13993 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
13995 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
13996 for the padded type built in order to support a specified alignment.
13997 Fix incorrect formatting.
13999 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
14002 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
14004 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
14006 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
14007 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
14008 to the end of the list. Adjust recursive call. Rename local variable.
14009 If REORDER is true, reorder components of the record type.
14010 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
14011 components_to_record and adjust the parameter list.
14013 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
14015 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
14016 disabled, use the variable for bounds of loop iteration scheme.
14018 2011-03-21 Kai Tietz <ktietz@redhat.com>
14021 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
14023 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
14025 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
14026 out whether the expression is read-only. Short-circuit placeholder
14027 case and rename a couple of local variables.
14029 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
14031 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
14032 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
14033 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
14034 (convert): Deal with conversions from a smaller form type specially.
14036 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
14038 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
14039 its argument, except for the special -I- switch.
14041 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
14043 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
14046 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
14048 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
14050 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
14052 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
14054 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
14055 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
14056 instead of GNAT_FORMAL. Protect the expression against multiple uses.
14057 Do not generate the check directly, instead instantiate the template
14058 check present in the descriptor.
14059 (make_descriptor_field): Move around.
14060 (build_vms_descriptor32): Build a template check in the POINTER field.
14061 (build_vms_descriptor): Remove useless suffixes.
14062 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
14064 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
14067 * targext.c: Include target files if IN_RTS is defined.
14069 2011-01-26 Richard Guenther <rguenther@suse.de>
14072 * targext.c: Include config.h.
14073 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
14076 2011-01-04 Pascal Obry <obry@adacore.com>
14077 Eric Botcazou <ebotcazou@adacore.com>
14079 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
14081 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
14083 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
14084 end-of-case on the end label and its associated gotos, if any.
14086 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
14088 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
14089 expressions of the parameter cache within the statement group of
14090 the CICO mechanism.
14092 2011-01-04 Olivier Hainque <hainque@adacore.com>
14093 Eric Botcazou <ebotcazou@adacore.com>
14095 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
14096 (set_end_locus_from_node): New function.
14097 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
14098 make and the function end_locus.
14099 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
14100 for the elaboration subprogram.
14101 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
14102 set the end_locus of the expression as well.
14104 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
14107 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
14108 variables that are referenced in exception handlers volatile.
14112 Copyright (C) 2011 Free Software Foundation, Inc.
14114 Copying and distribution of this file, with or without modification,
14115 are permitted in any medium without royalty provided the copyright
14116 notice and this notice are preserved.
14118 * gnat_rm.texi: Ramification of pragma Eliminate documentation
14119 - fix bugs in the description of Source_Trace;
14120 - get rid of UNIT_NAME;
14122 2011-08-02 Javier Miranda <miranda@adacore.com>
14125 (Build_Dispatching_Requeue): Adding support for VM targets
14126 since we cannot directly reference the Tag entity.
14127 * exp_sel.adb (Build_K): Adding support for VM targets.
14128 (Build_S_Assignment): Adding support for VM targets.
14130 (Default_Prim_Op_Position): In VM targets do not restrict availability
14131 of predefined interface primitives to compiling in Ada 2005 mode.
14132 (Is_Predefined_Interface_Primitive): In VM targets this service is not
14133 restricted to compiling in Ada 2005 mode.
14134 (Make_VM_TSD): Generate code that declares and initializes the OSD
14135 record. Needed to support dispatching calls through synchronized
14138 (Make_Predefined_Primitive_Specs): Enable generation of predefined
14139 primitives associated with synchronized interfaces.
14140 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
14141 primitives associated with synchronized interfaces.
14143 2011-08-02 Yannick Moy <moy@adacore.com>
14145 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
14146 statements hidden in SPARK if preceded by the HIDE directive
14147 (Parse_Exception_Handlers): mark each exception handler in a sequence of
14148 exception handlers as hidden in SPARK if preceded by the HIDE directive
14149 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
14150 if starting with the HIDE directive
14151 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
14152 starting with the HIDE directive; mark the declarations in a private
14153 part as hidden in SPARK if the private part starts with the HIDE
14155 * restrict.adb, restrict.ads
14156 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
14157 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
14158 argument node belongs to a part which is hidden in SPARK
14159 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
14160 parts in SPARK; protect the possibly costly call to
14161 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
14162 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
14163 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
14164 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
14166 (Scan): recognize special comment starting with '#' and followed by
14167 SPARK keyword "hide" as a HIDE directive.
14169 2011-08-02 Yannick Moy <moy@adacore.com>
14171 * types.ads, erroutc.ads: Minor reformatting.
14173 2011-08-02 Vincent Celier <celier@adacore.com>
14175 * link.c: Add response file support for cross platforms.
14177 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14179 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
14180 in an association, set parent field of copy before partial analysis.
14181 * sem_res.adb (Resolve_Slice): create reference to itype only when
14182 expansion is enabled.
14184 2011-08-02 Yannick Moy <moy@adacore.com>
14186 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
14187 for new flag denoting which subprogram bodies are in ALFA
14188 * restrict.adb, sem_ch7.adb: Update comment
14189 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
14190 sem_ch9.adb, sem_res.adb: Add calls to
14191 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
14192 * sem_ch6.adb (Analyze_Function_Return): add calls to
14193 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
14194 middle of the body, and extended return.
14195 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
14196 False when missing return.
14197 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
14198 to True for subprograms whose spec is in ALFA. Remove later on the flag
14199 on the entity used for a subprogram body when there exists a separate
14201 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
14202 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
14203 False, otherwise do nothing.
14205 2011-08-02 Robert Dewar <dewar@adacore.com>
14207 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
14209 2011-08-02 Yannick Moy <moy@adacore.com>
14211 * sem_ch4.ads: minor formatting.
14213 2011-08-02 Yannick Moy <moy@adacore.com>
14215 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
14216 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
14217 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
14218 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
14219 opt.ads: cleanup of SPARK mode
14221 2011-08-02 Yannick Moy <moy@adacore.com>
14223 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
14225 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
14226 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
14228 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
14229 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
14230 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
14231 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
14233 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
14235 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
14236 functions whose return type is not in ALFA.
14237 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
14239 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
14240 parameter's type is not in ALFA.
14241 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
14244 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14246 * sem_ch6 (Analyze_Expression_Function): treat the function as
14247 Inline_Always, and introduce a subprogram declaration for it when it is
14249 * inline.adb (Add_Inlined_Body): recognize bodies that come from
14250 expression functions, so that the back-end can determine whether they
14251 can in fact be inlined.
14252 * sem_util.adb (Is_Expression_Function): predicate to determine whether
14253 a function body comes from an expression function.
14255 2011-08-02 Gary Dismukes <dismukes@adacore.com>
14257 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
14258 null exclusions to test Can_Never_Be_Null on the anonymous access types
14259 of the formals rather than testing the formals themselves. Exclude this
14260 check in cases where the Old_Formal is marked as a controlling formal,
14261 to avoid issuing spurious errors for bodies completing dispatching
14262 operations (due to the flag not getting set on controlling access
14263 formals in body specs).
14264 (Find_Corresponding_Spec): When checking full and subtype conformance of
14265 subprogram bodies in instances, pass Designated and E in that order, for
14266 consistency with the expected order of the formals (New_Id followed by
14269 2011-08-02 Robert Dewar <dewar@adacore.com>
14271 * sem_ch8.adb: Minor reformatting.
14273 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14275 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
14276 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
14277 primitive operations of class-wide actuals.
14279 2011-08-02 Javier Miranda <miranda@adacore.com>
14281 * exp_atag.ads, exp_atag.adb
14282 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
14283 since its value is implicitly passed in argument Typ.
14284 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
14285 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
14286 Build_Common_Dispatching_Select_Statements.
14288 2011-08-02 Robert Dewar <dewar@adacore.com>
14290 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
14291 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
14292 Minor reformatting.
14294 2011-08-02 Robert Dewar <dewar@adacore.com>
14296 * sem_res.adb: Minor reformatting.
14297 * sem_prag.adb: Minor reformatting.
14299 2011-08-02 Javier Miranda <miranda@adacore.com>
14301 * exp_atag.adb, exp_atags.ads
14302 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
14303 by the tagged type Entity. Required to use this routine in the VM
14304 targets since we do not have available the Tag entity in the VM
14307 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
14308 Ada.Tags has not been previously loaded.
14310 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
14311 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
14313 (Enclosing_Dynamic_Scope): Add missing support to handle the full
14314 view of enclosing scopes. Required to handle enclosing scopes that
14315 are synchronized types whose full view is a task type.
14317 (Build_VM_TSDs): Minor code improvement to avoid generating and
14318 analyzing lists with empty nodes.
14319 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
14320 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
14321 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
14322 (Make_Disp_Timed_Select_Body): Add support for VM targets.
14323 (Make_Select_Specific_Data_Table): Add support for VM targets.
14324 (Make_VM_TSD): Generate code to initialize the SSD structure of
14327 2011-08-02 Yannick Moy <moy@adacore.com>
14329 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
14330 cross-references section in ALI.
14331 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
14332 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
14334 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
14335 subprogram or package entity of a node
14336 (Is_Local_Reference_Type): new function returns True for references
14337 selected in local cross-references.
14338 (Lt): function extracted from Lt in Output_References
14339 (Write_Entity_Name): function extracted from Output_References
14340 (Generate_Definition): generate reference with type 'D' for definition
14341 of objects (object declaration and parameter specification), with
14342 appropriate locations and units, for use in local cross-references.
14343 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
14344 references of type 'I' for initialization in object definition.
14345 (Output_References): move part of function Lt and procedure
14346 Write_Entity_Name outside of the body. Ignore references of types 'D'
14347 and 'I' introduced for local cross-references.
14348 (Output_Local_References): new procedure to output the local
14349 cross-references sections.
14350 (Lref_Entity_Status): new array defining whether an entity is a local
14351 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
14352 with 'I' type when initialization expression is present.
14353 * get_scos.adb, get_scos.ads: Correct comments and typos
14355 2011-08-02 Javier Miranda <miranda@adacore.com>
14357 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
14359 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
14361 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
14364 2011-08-02 Vincent Celier <celier@adacore.com>
14366 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
14367 (No_Space_Img): New function
14368 (Find_Excluded_Sources): When reading from a file, record the file name
14369 and the line number for each excluded source.
14370 (Mark_Excluded_Sources): When reporting an error, if the excluded
14371 sources were read from a file, include file name and line number in
14374 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14376 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
14378 2011-08-02 Robert Dewar <dewar@adacore.com>
14380 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
14382 2011-08-02 Javier Miranda <miranda@adacore.com>
14384 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
14385 generation of TSDs to the DOTNET compiler.
14386 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
14387 generation of TSDs to the DOTNET compiler.
14389 2011-08-02 Javier Miranda <miranda@adacore.com>
14391 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
14392 record of all the tagged types declared inside library level package
14393 declarations, library level package bodies or library level subprograms.
14394 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
14395 associated with a given tagged type.
14396 (Build_VM_TSDs): New subprogram.
14397 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
14398 compilation units that are subprograms.
14399 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
14400 compilation units that are package bodies.
14401 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
14402 units that are a package declaration or a package instantiation.
14403 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
14404 reorganization to improve the error generated by the frontend when the
14405 function Ada.Tags.Secondary_Tag is not available.
14406 * rtsfind.ads (RE_Register_TSD): New runtime entity.
14407 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
14409 2011-08-02 Javier Miranda <miranda@adacore.com>
14411 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
14413 2011-08-02 Robert Dewar <dewar@adacore.com>
14415 * s-imenne.ads: Minor reformatting.
14417 2011-08-02 Robert Dewar <dewar@adacore.com>
14419 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
14420 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
14421 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
14423 2011-08-02 Robert Dewar <dewar@adacore.com>
14425 * einfo.ads (Materialize_Entity): Document this is only for renamings
14426 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
14427 required debug information in the case where we transform the object
14428 declaration into a renaming declaration.
14429 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
14431 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
14432 Materialize_Entity.
14434 2011-08-02 Robert Dewar <dewar@adacore.com>
14436 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
14437 Suppress_Init_Procs.
14438 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
14439 Suppress_Initialization/Initialization_Suppressed.
14440 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
14441 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
14442 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
14443 * sem_prag.adb: New processing for pragma Suppress_Initialization.
14445 2011-08-02 Robert Dewar <dewar@adacore.com>
14447 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
14448 Minor reformatting.
14450 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14452 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
14453 only have inheritable classwide pre/postconditions.
14455 2011-08-02 Javier Miranda <miranda@adacore.com>
14457 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
14458 * rtsfind.ads (RE_Check_TSD): New runtime entity.
14459 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
14460 checks if the external tag of a type is the same as the external tag
14461 of some other declaration.
14463 2011-08-02 Thomas Quinot <quinot@adacore.com>
14465 * s-taskin.ads: Minor reformatting.
14467 2011-08-02 Emmanuel Briot <briot@adacore.com>
14469 * g-comlin.adb (Display_Help): swap the order in which it prints the
14470 short help and the general usage.
14472 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14474 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
14475 the aspect declarations and attach them to the generic copy for
14476 subsequent analysis.
14477 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
14478 declarations of the generic tree to the new subprogram declarations.
14479 * sem_attr.adb (Check_Precondition_Postcondition): recognize
14480 conditions that apply to a subprogram instance.
14482 2011-08-02 Robert Dewar <dewar@adacore.com>
14484 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
14486 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14488 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
14489 private type with a tagged full view is not derived in the immediate
14490 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
14492 2011-08-02 Robert Dewar <dewar@adacore.com>
14494 * exp_ch4.adb: Minor reformatting.
14496 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14498 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
14499 Ada2012 iterator, the loop will be rewritten during expansion into a
14500 while loop with a cursor and an element declaration. Do not analyze the
14501 body in this case, because if the container is for indefinite types the
14502 actual subtype of the elements will only be determined when the cursor
14503 declaration is analyzed.
14505 2011-08-02 Arnaud Charlet <charlet@adacore.com>
14507 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
14508 size/alignment related attributes in CodePeer_Mode.
14510 2011-08-02 Gary Dismukes <dismukes@adacore.com>
14512 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
14513 Prepend_Element, since this can result in the operation getting the
14514 wrong slot in the full type's dispatch table if the full type has
14515 inherited operations. The incomplete type's operation will get added
14516 to the proper position in the full type's primitives
14517 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
14518 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
14519 dispatching operations, since there are cases where nonprimitive
14520 subprograms can get added to the list of incomplete dependents (such
14521 as subprograms in nested packages).
14522 * sem_ch6.adb (Process_Formals): First, remove test for being in a
14523 private part when determining whether to add a primitive with a
14524 parameter of a tagged incomplete type to the Private_Dependents list.
14525 Such primitives can also occur in the visible part, and should not have
14526 been excluded from being private dependents.
14527 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
14528 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
14529 list of a Taft-amendment incomplete type is a primitive before issuing
14530 an error that the full type must appear in the same unit. There are
14531 cases where nonprimitives can be in the list (such as subprograms in
14533 * sem_disp.adb (Derives_From): Use correct condition for checking that
14534 a formal's type is derived from the type of the corresponding formal in
14535 the parent subprogram (the condition was completely wrong). Add
14536 checking that was missing for controlling result types being derived
14537 from the result type of the parent operation.
14539 2011-08-02 Yannick Moy <moy@adacore.com>
14541 * errout.adb (First_Node): minor renaming
14542 * restrict.adb (Check_Formal_Restriction): put restriction warning on
14545 2011-08-02 Yannick Moy <moy@adacore.com>
14547 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
14548 before accessing operands.
14549 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
14550 decide whether an initialization expression respects SPARK rules, as
14551 the plain node is the expanded one. This allows for more valid warnings
14553 * gnat_rm.texi: Minor update.
14555 2011-08-02 Arnaud Charlet <charlet@adacore.com>
14557 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
14560 2011-08-02 Robert Dewar <dewar@adacore.com>
14562 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
14564 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
14566 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
14567 loop statements and the element renaming declaration with a block when
14568 the element type is controlled.
14570 2011-08-02 Yannick Moy <moy@adacore.com>
14572 * sinfo.ads: Minor formatting.
14574 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14576 * sem_aggr.adb (Add_Association): if the association has a box and no
14577 expression, use the Sloc of the aggregate itself for the new
14579 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
14582 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
14584 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
14585 When a container is provided via a function call, generate a renaming
14586 of the function result. This avoids the creation of a transient scope
14587 and the premature finalization of the container.
14588 * exp_ch7.adb (Is_Container_Cursor): Removed.
14589 (Wrap_Transient_Declaration): Remove the supression of the finalization
14590 of the list controller when the declaration denotes a container cursor,
14593 2011-08-02 Yannick Moy <moy@adacore.com>
14595 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
14596 node is from source, instead of the original node being from source.
14598 (Resolve_Array_Aggregate): refine the check for a static expression, to
14599 recognize also static ranges
14600 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
14601 Array_Type_Declaration): postpone the test for the type being a subtype
14602 mark after the type has been resolved, so that component-selection and
14603 expanded-name are discriminated.
14604 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
14605 to distinguish the case of an iteration scheme, so that an error is
14606 issed on a non-static range in SPARK except in an iteration scheme.
14607 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
14608 In_Iter_Schm = True.
14609 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
14610 user-defined operators so that they are allowed in renaming
14612 (Find_Selected_Component): refine the check for prefixing of operators
14613 so that they are allowed in renaming. Move the checks for restrictions
14614 on selector name after analysis discriminated between
14615 component-selection and expanded-name.
14616 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
14617 concatenation argument of string type if it is static.
14618 * sem_util.adb, sem_util.ads
14619 (Check_Later_Vs_Basic_Declarations): add a new function
14620 Is_Later_Declarative_Item to decice which declarations are allowed as
14621 later items, in the two different modes Ada 83 and SPARK. In the SPARK
14622 mode, add that renamings are considered as later items.
14623 (Enclosing_Package): new function to return the enclosing package
14624 (Enter_Name): correct the rule for homonyms in SPARK
14625 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
14626 from source (result of expansion) to avoid issuing wrong warnings.
14628 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14630 * errout.adb: On anything but an expression First_Node returns its
14633 2011-08-02 Pascal Obry <obry@adacore.com>
14635 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
14637 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
14639 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
14640 Set the associated loop as the related expression of internally
14642 * exp_ch7.adb (Is_Container_Cursor): New routine.
14643 (Wrap_Transient_Declaration): Supress the finalization of the list
14644 controller when the declaration denotes a container cursor.
14646 2011-08-02 Yannick Moy <moy@adacore.com>
14648 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
14650 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
14651 expression is a simple expression. This check cannot be performed in
14652 the semantics, so just drop it.
14653 (P_Index_Or_Discriminant_Constraint): move check that the index or
14654 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
14655 semantics. Other cases were previously checked in the semantics.
14656 * par-ch4.adb (P_Name): move checks that a selector name is not
14657 character literal or an operator symbol to Find_Selected_Component in
14659 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
14660 declarations are not placed after later declarations in a separate
14661 procedure in Sem_Util (possibly not the best choice?), to be used both
14662 during parsing, for Ada 83 mode, and during semantic analysis, for
14664 * par-endh.adb (Check_End): move check that end label is not missing
14665 to Process_End_Label in the semantics
14666 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
14667 the special case for SPARK restriction
14668 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
14669 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
14670 parameter Force to issue the error message even on internal node (used
14671 for generated end label). Call Check_Restriction to check when an error
14672 must be issued. In SPARK mode, issue an error message even if the
14673 restriction is not set.
14674 (Check_Restriction): new procedure with an additional out parameter to
14675 inform the caller that a message has been issued
14676 * sem_aggr.adb: Minor modification of message
14677 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
14678 instead of issuing an error message directly
14679 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
14680 declarations are not placed after later declarations, by calling
14681 Check_Later_Vs_Basic_Declarations
14682 (Analyze_Subtype_Declaration): move here the check that an index or
14683 discriminant constraint must be a subtype mark. Change the check that
14684 a subtype of String must start at one so that it works on subtype marks.
14685 * sem_ch4.adb (Analyze_Call): move here the check that a named
14686 association cannot follow a positional one in a call
14687 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
14688 instead of issuing an error message directly
14689 * sem_ch8.adb (Find_Selected_Component): move here the check that a
14690 selector name is not a character literal or an operator symbol. Move
14691 here the check that the prefix of an expanded name cannot be a
14692 subprogram or a loop statement.
14693 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
14694 procedure called from parsing and semantics to check that basic
14695 declarations are not placed after later declarations
14696 (Process_End_Label): move here the check that end label is not missing
14698 2011-08-02 Arnaud Charlet <charlet@adacore.com>
14700 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
14701 representation clause in codepeer mode, since it confuses CodePeer and
14702 does not bring useful info.
14704 2011-08-02 Ed Falis <falis@adacore.com>
14706 * init.c: initialize fp hw on MILS.
14708 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14710 * errout.adb (First_Node): for bodies, return the node itself (small
14711 optimization). For other nodes, do not check source_unit if the node
14712 comes from Standard.
14714 2011-08-02 Robert Dewar <dewar@adacore.com>
14716 * exp_ch3.adb: Minor comment additions.
14717 * sem_ch13.adb: Minor reformatting.
14719 2011-08-02 Pascal Obry <obry@adacore.com>
14721 * make.adb, makeutl.adb: Removes some superfluous directory separator.
14723 2011-08-02 Robert Dewar <dewar@adacore.com>
14725 * sem_attr.adb: Minor reformatting.
14727 2011-08-02 Robert Dewar <dewar@adacore.com>
14729 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
14730 (Has_Default_Component_Value): Removed
14731 * einfo.ads Comment updates
14732 (Has_Default_Aspect): Replaces Has_Default_Value
14733 (Has_Default_Component_Value): Removed
14735 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
14737 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
14738 (Get_Simple_Init_Val): Handle Default_Value aspect
14739 (Needs_Simple_Initialization): Handle Default_Value aspect
14740 * exp_ch3.ads: Needs_Simple_Initialization
14741 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
14742 * par-prag.adb (Pragma_Default[_Component]Value) Removed
14744 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
14745 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
14746 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
14748 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14750 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
14751 package containing iteration primitives.
14752 exp_ch5.adb (Expand_Iterator_Loop): ditto.
14754 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14756 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
14757 "of", pre-analyze expression in case it is a function call with
14758 finalization actions that must be placed ahead of the loop.
14759 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
14760 on an Ada2012 iterator, insert them ahead of the rewritten loop.
14762 2011-08-02 Geert Bosch <bosch@adacore.com>
14764 * cstand.adb (Create_Float_Types): Only consider C's long double for
14765 Long_Long_Float, in addition to double.
14767 2011-08-02 Robert Dewar <dewar@adacore.com>
14769 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
14770 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
14771 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
14772 Minor reformatting.
14774 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14776 * sem_attr.adb: handle properly 'Result when it is a prefix of an
14779 2011-08-02 Javier Miranda <miranda@adacore.com>
14781 * einfo.ads, einfo.adb
14782 (Original_Access_Type): Move this attribute to Node26 since there was
14783 an undocumented use of Node21 in E_Access_Subprogram_Type entities
14784 which causes conflicts and breaks the generation of the .NET compiler.
14785 (Interface_Name): Add missing documentation on JGNAT only uses of
14788 2011-08-02 Geert Bosch <bosch@adacore.com>
14790 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
14791 (Find_Back_End_Float_Type): Likewise
14792 (Create_Back_End_Float_Types): Likewise
14793 (Create_Float_Types): Likewise
14794 (Register_Float_Type): Likewise
14795 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
14796 Nlist and split out type selection in new local Find_Base_Type function.
14797 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
14799 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
14801 2011-08-02 Robert Dewar <dewar@adacore.com>
14803 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
14805 * opt.ads: Minor comment change.
14806 * sem_ch12.adb: Minor code reorganization.
14808 2011-08-02 Gary Dismukes <dismukes@adacore.com>
14810 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
14811 subtype's list of rep items to the list on the full subtype in the case
14812 where the lists are the same.
14814 2011-08-02 Geert Bosch <bosch@adacore.com>
14816 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
14817 using the one from System.Strings, which also deallocates all strings.
14819 2011-08-02 Geert Bosch <bosch@adacore.com>
14821 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
14823 * gcc-interface/Make-lang.in: Update dependencies.
14825 2011-08-02 Olivier Hainque <hainque@adacore.com>
14827 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
14830 2011-08-02 Javier Miranda <miranda@adacore.com>
14832 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
14833 associated with anonymous access to subprograms.
14835 2011-08-02 Geert Bosch <bosch@adacore.com>
14838 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
14839 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
14840 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
14841 (Add_Symbol_Definition): Move to switch-c.adb
14842 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
14843 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
14844 (Add_Symbol_Definition): Move to switch-c.adb.
14845 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
14847 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
14848 Move to warnsw.adb.
14849 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
14850 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
14851 Move to warnsw.adb.
14852 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
14853 (Add_Symbol_Definition): Moved from Prepcomp.
14854 * switch-c.ads: Update copyright notice. Use String_List instead of
14855 Argument_List, removing dependency on System.OS_Lib.
14857 2011-08-02 Yannick Moy <moy@adacore.com>
14859 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
14860 mode on initialization expression which does not respect SPARK
14862 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
14863 if the tree referenced by its argument represents an initialization
14864 expression in SPARK, suitable for initializing an object in an object
14867 2011-08-02 Javier Miranda <miranda@adacore.com>
14869 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
14870 internally generated access to subprogram with its associated protected
14872 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
14874 2011-08-02 Geert Bosch <bosch@adacore.com>
14876 * cstand.adb (Register_Float_Type): Print information about type to
14877 register, if the Debug_Flag_Dot_B is set.
14878 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
14879 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
14880 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
14881 with a requested precision of more than Max_Digits digits and no more
14882 than Max_Base_Digits digits, if a range specification is present and the
14883 Predefined_Float_Types list has a suitable type to derive from.
14884 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
14885 case of type completion with pragma Import
14887 (Process_Import_Predefined_Type): Processing to complete a type
14888 with pragma Import. Currently supports floating point types only.
14889 (Set_Convention_From_Pragma): Do nothing without underlying type.
14890 (Process_Convention): Guard against absence of underlying type,
14891 which may happen when importing incomplete types.
14892 (Process_Import_Or_Interface): Handle case of importing predefined
14893 types. Tweak error message.
14895 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
14897 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
14898 functions to previous change. Reorganize code slightly.
14900 2011-08-02 Geert Bosch <bosch@adacore.com>
14902 * back_end.ads (Register_Type_Proc): New call back procedure type for
14903 allowing the back end to provide information about available types.
14904 (Register_Back_End_Types): New procedure to register back end types.
14905 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
14907 * cstand.adb (Back_End_Float_Types): New list for floating point types
14908 supported by the back end.
14909 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
14910 (Copy_Float_Type): New procedure to make new copies of predefined types.
14911 (Register_Float_Type): New call back procedure to populate the BEFT list
14912 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
14913 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
14914 (Create_Float_Types): New procedure to create entities for floating
14915 point types predefined in Standard, and put these and any remaining
14916 BEFTs on the Predefined_Float_Types list.
14917 * stand.ads (Predefined_Float_Types): New list for predefined floating
14918 point types that do not have declarations in package Standard.
14920 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
14922 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
14923 entity node for the unit containing the parameter.
14924 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
14925 (Add_Inlined_Subprogram): Likewise.
14926 * gcc-interface/Make-lang.in: Update dependencies.
14928 2011-08-02 Thomas Quinot <quinot@adacore.com>
14930 * s-stusta.adb (Print): Make sure Pos is always initialized to a
14933 2011-08-02 Geert Bosch <bosch@adacore.com>
14935 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
14937 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
14939 * sem_type.adb (Covers): Move trivial case to the top and reuse the
14940 computed value of Base_Type.
14942 2011-08-02 Yannick Moy <moy@adacore.com>
14944 * restrict.adb (Check_Restriction): issue an error for any use of
14945 class-wide, even if the No_Dispatch restriction is not set.
14946 * sem_aggr.adb: Correct typos in comments and messages in formal mode
14947 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
14948 when completing a private extension, the type named in the private part
14949 is not the same as that named in the visible part.
14950 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
14951 of an inherited primitive operations of a tagged type or type extension
14952 that returns the tagged type.
14953 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
14954 function which returns True for an implicit operation inherited by the
14955 derived type declaration for the argument type.
14956 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
14959 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14961 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
14962 Process_Bounds, to perform analysis with expansion of a range or an
14963 expression that is the iteration scheme for a loop.
14964 (Analyze_Iterator_Specification): If domain of iteration is given by a
14965 function call with a controlled result, as is the case if call returns
14966 a predefined container, ensure that finalization actions are properly
14968 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
14970 2011-08-02 Javier Miranda <miranda@adacore.com>
14972 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
14973 * gcc-interface/Make-lang.in: Update dependencies.
14975 2011-08-02 Javier Miranda <miranda@adacore.com>
14977 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
14978 determine if the analysis is performed using N or Original_Node (N).
14979 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
14980 functionality of routine Is_Variable avoids code duplication.
14981 * checks.adb (Determine_Range): Handle temporaries generated by
14982 Remove_Side_Effects.
14984 2011-08-02 Javier Miranda <miranda@adacore.com>
14986 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
14987 expansion of the condition. Required since the previous analysis was
14988 done with expansion disabled (see Resolve_Quantified_Expression) and
14989 hence checks were not inserted and record comparisons have not been
14992 2011-08-02 Ed Falis <falis@adacore.com>
14994 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
14997 2011-08-02 Bob Duff <duff@adacore.com>
14999 * opt.ads: Minor comment fix.
15001 2011-08-02 Bob Duff <duff@adacore.com>
15003 * sem_ch12.adb (Analyze_Package_Instantiation,
15004 Analyze_Subprogram_Instantiation): Turn off style checking while
15005 analyzing an instance. Whatever style checks that apply to the generic
15006 unit should apply, so it makes no sense to apply them in an instance.
15007 This was causing trouble when compiling an instance of a runtime
15008 unit that violates the -gnatyO switch.
15009 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
15010 one of the two case statements, causing spurious errors.
15012 2011-08-02 Robert Dewar <dewar@adacore.com>
15014 * uname.adb: Minor reformatting.
15015 * gnatcmd.adb: Minor reformatting.
15016 * exp_attr.adb: Minor reformatting.
15018 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15020 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
15021 No_Dispatching_Calls, do not look for the Assign primitive, because
15022 predefined primitives are not created in this case.
15024 2011-08-02 Bob Duff <duff@adacore.com>
15026 * stylesw.ads: Minor comment fixes.
15028 2011-08-02 Robert Dewar <dewar@adacore.com>
15030 * freeze.adb (Add_To_Result): New procedure.
15032 2011-08-02 Jose Ruiz <ruiz@adacore.com>
15034 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
15035 time, if the specific run-time routines for handling streams of strings
15036 are not available, use the default mechanism.
15038 2011-08-02 Arnaud Charlet <charlet@adacore.com>
15040 * s-regpat.ads: Fix typo.
15042 2011-08-02 Vincent Celier <celier@adacore.com>
15044 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
15045 not null, call it to create the in memory config project file without
15046 parsing an existing default config project file.
15048 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
15050 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
15052 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15054 * sem_elim.adb: an abstract subprogram does not need an eliminate
15055 pragma for its descendant to be eliminable.
15057 2011-08-02 Ed Falis <falis@adacore.com>
15059 * init.c: revert to handling before previous checkin for VxWorks
15060 * s-intman-vxworks.adb: delete unnecessary declarations related to
15061 using Ada interrupt facilities for handling signals.
15062 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
15063 * s-intman-vxworks.ads: Import __gnat_install_handler as
15064 Initialize_Interrupts.
15065 * s-taprop-vxworks.adb: Delete Signal_Mask.
15066 (Abort_Handler): change construction of mask to unblock exception
15069 2011-08-02 Jerome Guitton <guitton@adacore.com>
15071 * a-except-2005.adb (Raise_From_Signal_Handler): Call
15072 Debug_Raise_Exception before propagation starts.
15074 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
15076 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
15077 to Restriction_Check_Required.
15078 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
15079 * sem_res.adb (Resolve_Call): Likewise.
15080 * sem_attr.adb (Check_Stream_Attribute): Likewise.
15082 2011-08-02 Bob Duff <duff@adacore.com>
15084 * stylesw.ads: Update comment.
15085 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
15086 * errout.ads: Remove obsolete comment.
15088 2011-08-02 Javier Miranda <miranda@adacore.com>
15090 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
15091 (Set_Is_Safe_To_Reevaluate): new procedure.
15092 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
15093 assignment is allowed on safe-to-reevaluate variables.
15094 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
15095 temporary created to remove side effects in expressions that use
15096 the secondary stack as safe-to-reevaluate.
15097 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
15098 variables that are not true constants.
15100 2011-08-02 Robert Dewar <dewar@adacore.com>
15102 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
15103 sem_res.adb, sem_ch6.adb: Minor reformatting.
15105 2011-08-02 Jerome Guitton <guitton@adacore.com>
15107 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
15109 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15111 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
15112 not set Overridden_Operation if subprogram is an initialization
15115 2011-08-02 Yannick Moy <moy@adacore.com>
15117 * par-ch6.adb: Correct obsolete name in comments
15118 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
15119 which takes two message arguments (existing function takes one), with
15120 second message used for continuation.
15121 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
15122 block statements that originate from a source block statement, not
15123 generated block statements
15124 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
15125 symmetry with procedure case
15126 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
15127 function to issue an error in formal mode if a package specification
15128 contains more than one tagged type or type extension.
15129 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
15130 parameters matching formals of tagged types are objects (or ancestor
15131 type conversions of objects), not general expressions. Issue an error
15132 on view conversions that are not involving ancestor conversion of an
15134 (Resolve_Type_Conversion): in formal mode, issue an error on the
15135 operand of an ancestor type conversion which is not an object
15136 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
15137 procedure so that it works also for actuals of function calls
15138 (Is_Actual_Tagged_Parameter): new function which determines if its
15139 argument is an actual parameter of a formal of tagged type in a
15141 (Is_SPARK_Object_Reference): new function which determines if the tree
15142 referenced by its argument represents an object in SPARK
15144 2011-08-02 Robert Dewar <dewar@adacore.com>
15146 * sem_ch3.adb: Minor reformatting
15147 Minor comment addition
15148 Minor error msg text change
15150 2011-08-02 Javier Miranda <miranda@adacore.com>
15152 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
15153 function. Used to be more precise when we generate a variable plus one
15154 assignment to remove side effects in the evaluation of the Bound
15156 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
15157 of the bound expression to force its re-analysis and thus expand the
15158 associated transient scope (if required). Code cleanup replacing the
15159 previous code that declared the constant entity by an invocation to
15160 routine Force_Evaluation which centralizes this work in the frontend.
15162 2011-08-02 Robert Dewar <dewar@adacore.com>
15164 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
15165 (Base_Type): Now uses improved Is_Base_Type function
15166 * einfo.ads (Base_Type): Inline this function
15168 2011-08-02 Robert Dewar <dewar@adacore.com>
15170 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
15171 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
15173 2011-08-02 Arnaud Charlet <charlet@adacore.com>
15175 * gcc-interface/Make-lang.in: Update dependencies.
15176 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
15179 2011-08-02 Yannick Moy <moy@adacore.com>
15181 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
15182 non-simple expression used in delta constraint
15183 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
15184 index constraint which is not a subtype mark
15185 * par.adb: With and use Restrict
15186 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
15187 mode on component type which is not a subtype mark and default
15188 expression on component
15189 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
15190 of string which does not have a lower index bound equal to 1
15191 (Array_Type_Declaration): issue an error in formal mode on index or
15192 component type which is not a subtype mark, and on aliased keyword on
15194 (Derived_Type_Declaration): issue an error in formal mode on interface,
15195 limited or abstract type
15196 (Record_Type_Declaration): issue an error in formal mode on interface
15197 (Record_Type_Definition): issue an error in formal mode on tagged types
15198 and type extensions not declared in the specification of a library unit
15199 package; on null non-tagged record; on variant part
15201 2011-08-02 Vincent Celier <celier@adacore.com>
15203 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
15204 not declared for qualified library project when Library_Name is not
15205 declared, but Library_Dir is.
15207 2011-08-02 Robert Dewar <dewar@adacore.com>
15209 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
15210 pragmas (affects aspects [Component_]Default_Value
15211 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
15212 component type for the resolution
15214 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
15216 * einfo.adb (Base_Type): Tune implementation for speed.
15218 2011-08-02 Robert Dewar <dewar@adacore.com>
15220 * freeze.adb: Minor reformatting.
15222 2011-08-02 Thomas Quinot <quinot@adacore.com>
15224 * scos.ads: Update comments.
15226 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15228 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
15229 base type, because the parent may be a subtype of a private type whose
15230 convention is established in a private part.
15232 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
15234 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
15235 statement in a block when the expansion of the return expression has
15236 created a finalization chain.
15237 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
15238 with the parent node.
15239 Add N_Extended_Return_Statement to handle the case where a transient
15240 object declaration appears in the Return_Object_Declarations list of
15241 an extended return statement.
15243 2011-08-02 Matthew Gingell <gingell@adacore.com>
15245 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
15246 unused parameter 'name'.
15248 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15250 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
15251 inherited operation, check whether its alias, which is the source
15252 operastion that it renames, has been marked eliminated.
15254 2011-08-02 Javier Miranda <miranda@adacore.com>
15256 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
15257 in-mode parameter whose type is an access type since it can be used to
15258 modify its designated object. Enforce code that handles as safe an
15259 access type that is not access-to-constant but it is the result of a
15260 previous removal of side-effects.
15261 (Remove_Side_Effects): Minor code reorganization of cases which require
15262 no action. Done to incorporate documentation on new cases uncovered
15263 working in this ticket: no action needed if this routine was invoked
15264 too early and the nodes are not yet decorated.
15265 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
15266 to routine Remove_Side_Effects by calls to Force_Evaluation since they
15267 were issued with actuals that are implicitly provided by
15270 2011-08-02 Robert Dewar <dewar@adacore.com>
15272 * sem_ch3.adb, sem_res.adb: Minor reformatting.
15274 2011-08-02 Yannick Moy <moy@adacore.com>
15276 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
15277 to issue an error in formal mode on attribute not supported in this mode
15278 (Analyze_Attribute): issue errors on standard attributes not supported
15280 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
15281 comment, and issue error in formal mode on modulus which is not a power
15283 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
15285 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
15287 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
15288 operator on modular type (except 'not').
15290 2011-08-02 Robert Dewar <dewar@adacore.com>
15292 * gnat_rm.texi: Minor reformatting.
15294 2011-08-02 Arnaud Charlet <charlet@adacore.com>
15296 * s-osinte-linux.ads: Minor comment update and reformatting.
15297 * i-cexten.ads: Make this unit pure, as for its parent.
15298 Will allow its usage in more contexts if needed.
15300 2011-08-02 Robert Dewar <dewar@adacore.com>
15302 * s-utf_32.ads: Minor comment fix.
15304 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15306 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
15307 operation of a tagged synchronized type, handle the case where the
15308 controlling argument is overloaded.
15310 2011-08-02 Yannick Moy <moy@adacore.com>
15312 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
15313 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
15314 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
15315 SPARK mode and formal verification mode on processing SPARK restriction
15316 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
15317 requiring consistency checking.
15319 2011-08-02 Robert Dewar <dewar@adacore.com>
15321 * sem_res.adb: Minor reformatting.
15323 2011-08-02 Robert Dewar <dewar@adacore.com>
15325 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
15326 a-cforse.ads: Remove unneeded with of Ada.Containers
15327 Remove commented out pragma Inline's
15328 Move specifications of new subprograms to the actual specs
15330 2011-08-02 Yannick Moy <moy@adacore.com>
15332 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
15333 a-cforse.ads: Update comments.
15335 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15337 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
15339 2011-08-02 Robert Dewar <dewar@adacore.com>
15341 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
15342 a-cforse.ads, a-cofove.ads: Minor reformatting.
15344 2011-08-02 Claire Dross <dross@adacore.com>
15346 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
15347 a-cofove.ads: Add comments.
15349 2011-08-02 Yannick Moy <moy@adacore.com>
15351 * gnat_rm.texi: Document formal containers.
15353 2011-08-02 Emmanuel Briot <briot@adacore.com>
15355 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
15356 are empty sections.
15358 2011-08-02 Robert Dewar <dewar@adacore.com>
15360 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
15363 2011-08-02 Robert Dewar <dewar@adacore.com>
15365 * aspects.adb: New aspects Default_Value and Default_Component_Value
15366 New format of Aspect_Names table checks for omitted entries
15367 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
15368 handling of boolean aspects for derived types.
15369 New aspects Default_Value and Default_Component_Value
15370 New format of Aspect_Names table checks for omitted entries
15371 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
15372 (Has_Default_Value): New flag
15373 (Has_Default_Component_Value): New flag
15374 (Has_Default_Value): New flag
15375 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
15377 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
15378 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
15379 Default_Value and Default_Component_Value
15380 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
15381 New aspects Default_Value and Default_Component_Value
15382 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
15383 * sprint.adb: Print N_Aspect_Specification node when called from gdb
15385 2011-08-02 Vincent Celier <celier@adacore.com>
15387 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
15388 inherit library kind.
15390 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15392 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
15393 Minor reformatting.
15395 2011-08-02 Robert Dewar <dewar@adacore.com>
15397 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
15399 2011-08-02 Yannick Moy <moy@adacore.com>
15401 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
15403 2011-08-02 Robert Dewar <dewar@adacore.com>
15405 * impunit.adb: Add comment.
15407 2011-08-02 Yannick Moy <moy@adacore.com>
15409 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
15410 qualification of aggregates in formal mode
15411 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
15413 (Resolve_Aggregate): complete the test that an aggregate is adequately
15414 qualified in formal mode
15416 2011-08-02 Pascal Obry <obry@adacore.com>
15418 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
15419 * mlib-prj.adb: Supress warning when compiling binder generated file.
15420 (Build_Library): Supress all warnings when compiling the binder
15423 2011-08-02 Yannick Moy <moy@adacore.com>
15425 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
15427 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
15428 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
15429 Add with/use clauses to make Check_Formal_Restriction visible
15431 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15433 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
15434 in-parameters when type of the generic formal is private in the generic
15435 spec and non-private in the body.
15437 2011-08-02 Claire Dross <dross@adacore.com>
15439 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
15440 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
15441 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
15442 * impunit.adb, Makefile.rtl: Take new files into account.
15444 2011-08-02 Robert Dewar <dewar@adacore.com>
15446 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
15447 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
15449 2011-08-02 Yannick Moy <moy@adacore.com>
15451 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
15453 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
15454 matching static array bounds, taking into account the special case of
15456 * sem_ch3.adb: Typo in comment.
15458 2011-08-02 Yannick Moy <moy@adacore.com>
15460 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
15461 which issues an error in formal mode if its argument node is originally
15463 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
15464 has a discriminant specification so that it does not include the case
15466 (Derived_Type_Declaration): move here the test that a derived type has a
15467 discriminant specification
15468 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
15469 first element of a component association before accessing its choices
15470 (presence of component association is not enough)
15471 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
15472 declaration is a library item before accessing the next element in a
15473 list, as library items are not member of lists
15474 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
15475 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
15476 Check_Formal_Restriction whenever possible.
15478 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15480 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
15481 reference when needed.
15483 2011-08-02 Bob Duff <duff@adacore.com>
15485 * gnat_ugn.texi: Fix typo.
15487 2011-08-02 Vincent Celier <celier@adacore.com>
15489 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
15490 archive file name. Do not use the full path name of archives for Open
15493 2011-08-02 Robert Dewar <dewar@adacore.com>
15495 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
15496 Analyze_Aspect_Specifications
15498 (Analyze_Aspect_Specifications): New handling for boolean aspects
15499 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
15500 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
15501 sequence for Analyze_Aspect_Specifications
15502 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
15503 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
15505 2011-08-02 Robert Dewar <dewar@adacore.com>
15507 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
15508 aspects, since these no longer exist.
15510 2011-08-02 Robert Dewar <dewar@adacore.com>
15512 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
15513 semicolon, do not try to see if there are aspects following it.
15514 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
15517 2011-08-02 Robert Dewar <dewar@adacore.com>
15519 * sem_ch8.adb, aspects.ads: Minor reformatting.
15521 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
15523 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
15524 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
15526 (Analyze_Aspect_Specifications): ...here. Call above procedure.
15528 2011-08-02 Yannick Moy <moy@adacore.com>
15530 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
15531 mode on subprogram declaration outside of package specification, unless
15532 it is followed by a pragma Import
15533 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
15534 Access_Type_Declaration): issue error in formal mode on access type
15535 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
15537 (Analyze_Object_Declaration): issue error in formal mode on object
15538 declaration which does not respect SPARK restrictions
15539 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
15540 declaration which does not respect SPARK restrictions
15541 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
15542 error in formal mode on digits or delta constraint
15543 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
15544 decimal fixed point type
15545 (Derived_Type_Declaration): issue error in formal mode on derived type
15546 other than type extensions of tagged record types
15547 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
15548 with check on access definition
15549 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
15550 mode on protected definition.
15551 (Analyze_Task_Definition): issue error in formal mode on task definition
15553 2011-08-02 Robert Dewar <dewar@adacore.com>
15555 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
15557 2011-08-02 Javier Miranda <miranda@adacore.com>
15559 * sem_ch6.adb (Can_Override_Operator): New function.
15560 (Verify_Overriding_Indicator): Add missing code to check overriding
15561 indicator in operators. Fixes regression.
15562 (Check_Overriding_Indicator): Minor reformating after replacing the
15563 code that evaluates if the subprogram can override an operator by
15564 invocations to the above new function.
15566 (Write_Field26_Name): Add missing code to ensure that, following
15567 the documentation in einfo.ads, this field is not shown as attribute
15568 "Static_Initialization" on non-dispatching functions.
15570 2011-08-02 Jose Ruiz <ruiz@adacore.com>
15572 * sem_res.adb (Resolve_Call): A call to
15573 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
15574 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
15575 i.e., when the second parameter is of type Time_Span.
15577 2011-08-02 Vincent Celier <celier@adacore.com>
15579 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
15580 with an archive instead of -L<library dir> -l<library name>.
15582 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15584 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
15585 mark the base types In_Use in addition to making the operations
15588 2011-08-02 Ed Falis <falis@adacore.com>
15590 * init.c: add and setup __gnat_signal_mask for the exception signals
15591 * s-inmaop-vxworks.adb: new file.
15592 * s-intman-vxworks.adb: remove unnecessary initializations and
15594 * s-intman-vxworks.ads: remove unnecessary variable
15595 * s-taprop-vxworks.adb: simplify signal initialization
15597 2011-08-02 Robert Dewar <dewar@adacore.com>
15599 * sem_ch8.adb: Minor code reorganization, comment updates.
15601 2011-08-02 Robert Dewar <dewar@adacore.com>
15603 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
15604 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
15606 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
15607 (Matching_Static_Array_Bounds): Moved here from Sem_Res
15609 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15611 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
15612 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
15613 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
15614 use_type_clauses, to handle more efficiently use_type and use_all_type
15616 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
15617 Ada2012 Use_All_Type clause.
15618 (Use_Class_Wide_Operations): new procedure.
15620 2011-08-02 Robert Dewar <dewar@adacore.com>
15622 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
15623 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
15624 expression to expression function.
15626 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15628 * sem_ch4.adb: transform simple Ada2012 membership into equality only
15629 if types are compatible.
15631 2011-08-02 Yannick Moy <moy@adacore.com>
15633 * sem_res.adb (Matching_Static_Array_Bounds): new function which
15634 returns True if its argument array types have same dimension and same
15635 static bounds at each index.
15636 (Resolve_Actuals): issue an error in formal mode on actuals passed as
15637 OUT or IN OUT paramaters which are not view conversions in SPARK.
15638 (Resolve_Arithmetic_Op): issue an error in formal mode on
15639 multiplication or division with operands of fixed point types which are
15640 not qualified or explicitly converted.
15641 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
15642 Boolean or array type (except String) operands.
15643 (Resolve_Equality_Op): issue an error in formal mode on equality
15644 operators for array types other than String with non-matching static
15646 (Resolve_Logical_Op): issue an error in formal mode on logical operators
15647 for array types with non-matching static bounds. Factorize the code in
15648 Matching_Static_Array_Bounds.
15649 (Resolve_Qualified_Expression): issue an error in formal mode on
15650 qualified expressions for array types with non-matching static bounds.
15651 (Resolve_Type_Conversion): issue an error in formal mode on type
15652 conversion for array types with non-matching static bounds
15654 2011-08-02 Robert Dewar <dewar@adacore.com>
15656 * par-ch10.adb: Minor code reorganization (use Nkind_In).
15658 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15660 * par-ch9.adb: save location of entry for proper error message.
15662 2011-08-02 Javier Miranda <miranda@adacore.com>
15664 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
15665 (Use_Full_View) which permits this routine to climb through the
15666 ancestors using the full-view of private parents.
15667 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
15668 Use_Full_View to true in calls to Is_Ancestor.
15669 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
15670 true in call to Is_Ancestor.
15671 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
15672 Use_Full_View to true in call to Is_Ancestor.
15673 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
15674 call to Is_Ancestor.
15675 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
15676 Use_Full_View to true in calls to Is_Ancestor.
15677 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
15678 Make_Select_Specific_Data_Table, Register_Primitive,
15679 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
15680 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
15681 to true in call to Is_Ancestor.
15682 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
15683 Use_Full_View to true in calls to Is_Ancestor.
15685 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
15686 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
15688 2011-08-02 Robert Dewar <dewar@adacore.com>
15690 * gnat_rm.texi: Minor reformatting.
15691 * sem_prag.adb: Minor reformatting.
15693 2011-08-02 Tristan Gingold <gingold@adacore.com>
15695 * vms_data.ads: Add VMS qualifier for -gnateP.
15697 2011-08-02 Robert Dewar <dewar@adacore.com>
15699 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
15700 * par-ch7.adb (P_Package): Proper placement of aspects for package
15701 decl/instantiation.
15702 * par-endh.adb (Check_End): Ad Is_Sloc parameter
15703 (End_Statements): Add Is_Sloc parameterr
15704 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
15705 (Check_End): Ad Is_Sloc parameter
15706 (End_Statements): Add Is_Sloc parameterr
15708 2011-08-02 Vincent Celier <celier@adacore.com>
15710 * ug_words: Add VMS qualifier equivalent to -gnateP:
15711 /SYMBOL_PREPROCESSING.
15713 2011-08-02 Jose Ruiz <ruiz@adacore.com>
15715 * gnat-style.texi: For hexadecimal numeric literals the typical
15716 grouping of digits is 4 to represent 2 bytes.
15717 A procedure spec which is split into several lines is indented two
15720 2011-08-02 Yannick Moy <moy@adacore.com>
15722 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
15723 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
15724 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
15726 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
15727 choice in array aggregate
15728 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
15730 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
15731 positional and named aggregate for record, or others in record
15732 aggregate, or multiple choice in record aggregate
15733 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
15734 array operands to logical operations AND, OR and XOR do not have the
15735 same static lower and higher bounds
15736 * sem_ch5.adb, sinfo.ads: Correct typos in comments
15738 2011-08-01 Robert Dewar <dewar@adacore.com>
15740 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
15741 Replaces Last_Source_Node_In_Sequence.
15742 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
15743 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
15744 parens and blank in string (this was inconsistently implemented).
15746 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
15747 blank in string (this was inconsistently implemented).
15749 (Set_Global_Switches): Set formal mode switches appropriately
15750 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
15752 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
15753 call Set_Error_Msg_Lang to set "spark" as language name.
15754 * par.adb: Remove unnecessary call to set formal language for errout
15755 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
15756 appropriately and call Set_Error_Msg_Lang to set "spark" as language
15758 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
15759 calls to it, moved after resolution so that types are known
15760 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
15761 result of concatenation is not of type String
15762 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
15763 concatenation is not properly restricted
15764 * gnat_rm.texi: Add doc on pragma Spark_95.
15765 * gcc-interface/Makefile.in: Remove obsolete target pairs for
15766 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
15767 * gcc-interface/Make-lang.in: Update dependencies.
15769 2011-08-01 Javier Miranda <miranda@adacore.com>
15771 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
15772 condition that detects if the overridden operation must replace an
15775 2011-08-01 Javier Miranda <miranda@adacore.com>
15777 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
15778 code declarations inserted by Insert_Actions in each alternative of the
15779 N_Case_Expression node.
15781 2011-08-01 Robert Dewar <dewar@adacore.com>
15783 * sem_ch6.adb: Minor code reorganization.
15784 * sem_util.adb: Minor reformatting.
15786 2011-08-01 Pascal Obry <obry@adacore.com>
15788 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
15789 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
15791 2011-08-01 Yannick Moy <moy@adacore.com>
15793 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
15794 literal or operator symbol which is prefixed
15795 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
15796 mode on access attributes.
15797 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
15798 that concatenation operands are properly restricted in formal mode
15799 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
15800 Analyze_Concatenation_Operand. Issue an error in formal mode if the
15801 result of the concatenation has a type different from String.
15802 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
15803 Analyze_Quantified_Expression, Analyze_Slice,
15804 Analyze_Null): issue an error in formal mode on unsupported constructs
15806 (Analyze_Block_Statement): only issue error on source block statement
15807 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
15808 function which returns the last node in a list of nodes for which
15809 Comes_From_Source returns True, if any
15810 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
15811 Last_Source_Node_In_Sequence
15812 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
15813 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
15814 mode on unsupported constructs
15815 * sem_ch9.adb Do not return after issuing error in formal mode, as the
15816 rest of the actions may be needed later on since the error is marked as
15818 * sinfo.ads: Typos in comments.
15820 2011-08-01 Pascal Obry <obry@adacore.com>
15822 * projects.texi: Minor editing.
15824 2011-08-01 Yannick Moy <moy@adacore.com>
15826 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
15827 insertion character ~~
15828 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
15829 (Set_Error_Msg_Lang): new procedure which fixes the language for use
15830 with insertion character ~~
15831 (Set_Msg_Text): treat insertion character ~~
15832 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
15833 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
15834 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
15835 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
15836 errors related to the formal language restriction not serious
15837 (insertion character |).
15838 * par.adb (Par): set formal language for error messages if needed
15839 * sem_ch6.adb (Check_Missing_Return): take into account possible
15840 generated statements at the end of the function
15841 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
15842 enumeration value to define a new pragma SPARK_95
15843 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
15844 SPARK_Version): new type and variables to store the SPARK version
15846 (SPARK_Mode): return True when SPARK_Version is set
15847 * par-prag.adb: Correct indentation
15848 (Prag): take Pragma_SPARK_95 into account
15849 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
15852 2011-08-01 Robert Dewar <dewar@adacore.com>
15854 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
15855 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
15856 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
15858 2011-08-01 Pascal Obry <obry@adacore.com>
15860 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
15861 Target_Name to Get_Path call.
15862 (Parse_Single_Project): Likewise.
15863 (Post_Parse_Context_Clause): Likewise.
15864 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
15865 Call Initialise_Project_Path with the proper Target_Name.
15866 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
15868 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
15869 with the proper Target_Name.
15870 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
15871 Part.Parse routine.
15872 (Parse_Project_And_Apply_Config): Likewise.
15873 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
15874 This is fine as this part of the code is supporting only native
15876 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
15877 is fine as this part of the code is supporting only native compilation.
15879 2011-08-01 Yannick Moy <moy@adacore.com>
15881 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
15882 of homonym, unless the homonym is one of the cases allowed in SPARK
15883 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
15884 package declaration occurring after a body.
15886 2011-08-01 Robert Dewar <dewar@adacore.com>
15888 * checks.adb, exp_ch4.adb: Minor reformatting.
15890 2011-08-01 Javier Miranda <miranda@adacore.com>
15892 * einfo.ads (Access_Disp_Table): Fix documentation.
15893 (Dispatch_Table_Wrappers): Fix documentation.
15895 2011-08-01 Pascal Obry <obry@adacore.com>
15897 * prj-env.adb, prj-env.ads: Minor reformatting.
15899 2011-08-01 Yannick Moy <moy@adacore.com>
15901 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
15902 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
15903 procedures out of these packages.
15904 * errout.ads, errout.adb
15905 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
15906 procedures in of this package
15907 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
15908 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
15909 on misplaced later vs initial declarations, like in Ada 83
15910 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
15911 formal mode on attribute of private type whose full type declaration
15913 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
15914 package declaration inside a package specification
15915 (Analyze_Full_Type_Declaration): issue error in formal mode on
15916 controlled type or discriminant type
15917 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
15918 user-defined operator means that it should come from the source
15919 (New_Overloaded_Entity): issue error in formal mode on overloaded
15921 * sem_ch6.ads, sem_ch13.ads: typos in comments.
15923 2011-08-01 Thomas Quinot <quinot@adacore.com>
15925 * atree.adb: Minor reformatting.
15926 * checks.adb: Minor reformatting.
15928 2011-08-01 Vincent Celier <celier@adacore.com>
15930 * s-parame-vms-ia64.ads: Fix typo in comment
15932 * s-parame-vms-restrict.ads: Removed, unused.
15934 2011-08-01 Javier Miranda <miranda@adacore.com>
15937 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
15939 (Constrain_Index): Remove side effects in the evaluation of the bounds.
15940 * sem_ch3.ads, sem_ch3.adb
15941 (Is_Constant_Bound): New extended version of the subprogram that was
15942 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
15943 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
15944 * sem_aux.ads (Constant_Value): Fix typo in comment.
15945 * checks.adb (Generate_Index_Checks): New implementation which, for
15946 array objects with constant bounds, generates the runtime check
15947 referencing the bounds of the array type. For other cases this routine
15948 provides its previous behavior obtaining such values from the array
15950 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
15952 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
15953 we cannot have semantic interpretations of the new node.
15955 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15957 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
15960 2011-08-01 Arnaud Charlet <charlet@adacore.com>
15962 * sem_ch8.adb: Minor code editing.
15963 * s-vxwext.adb: Remove trailing space.
15964 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
15965 consistency with other files.
15967 2011-08-01 Thomas Quinot <quinot@adacore.com>
15969 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
15971 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15973 * par-ch10.adb: reject parameterized expressions as compilation unit.
15974 * sem_ch4.adb: handle properly conditional expression with overloaded
15975 then_clause and no else_clause.
15977 2011-08-01 Tristan Gingold <gingold@adacore.com>
15979 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
15980 like done by System.Aux_DEC.
15981 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
15983 2011-08-01 Yannick Moy <moy@adacore.com>
15985 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
15986 missing label at end of declaration (subprogram or package)
15987 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
15988 of positional and named parameter association
15989 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
15990 Error_Msg_SP which adds a prefix to the error message giving the name
15991 of the formal language analyzed
15992 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
15993 access result type in subprogram, unconstrained array as result type,.
15994 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
15996 * sem_ch8.adb: Code clean up.
15998 2011-08-01 Javier Miranda <miranda@adacore.com>
16000 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
16001 * einfo.ads (Access_Disp_Table): Fix documentation.
16002 (Dispatch_Table_Wrappers): Fix documentation.
16003 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
16004 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
16005 to enforce the documentation of this attribute.
16006 (Set_Is_Interface): Cleanup the assertion.
16007 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
16008 the Underlying_Type entity before reading attribute Access_Disp_Table.
16009 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
16010 Locate the Underlying_Type before reading attribute Access_Disp_Table.
16011 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
16012 the Underlying_Type entity before reading attribute Access_Disp_Table.
16013 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
16014 Locate the Underlying_Type entity before reading attribute
16017 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16019 * s-poosiz.ads: Additional overriding indicators.
16021 2011-08-01 Yannick Moy <moy@adacore.com>
16023 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
16025 (Analyze_Iteration_Scheme): issue error in formal mode when loop
16026 parameter specification does not include a subtype mark.
16027 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
16028 formal mode on abstract subprogram.
16029 (Analyze_Subprogram_Specification): issue error in formal mode on
16030 user-defined operator.
16031 (Process_Formals): issue error in formal mode on access parameter and
16032 default expression.
16033 * sem_ch9.adb (Analyze_Abort_Statement,
16034 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
16035 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
16036 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
16037 Analyze_Requeue, Analyze_Selective_Accept,
16038 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
16039 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
16040 issue error in formal mode on user-defined raise statement.
16042 2011-08-01 Thomas Quinot <quinot@adacore.com>
16044 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
16045 declaration being hidden when overriding an implicit inherited
16047 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
16048 (-gnats), do not complain about a source file that contains only a
16051 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16053 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
16054 variable if already set.
16056 2011-08-01 Arnaud Charlet <charlet@adacore.com>
16058 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
16059 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
16060 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
16061 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
16062 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
16063 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
16064 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
16065 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
16066 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
16067 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
16068 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
16069 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
16070 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
16071 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
16072 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
16073 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
16074 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
16075 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
16076 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
16077 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
16078 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
16079 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
16080 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
16081 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
16082 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
16083 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
16084 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
16085 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
16086 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
16087 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
16088 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
16089 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
16090 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
16091 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
16092 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
16093 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
16094 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
16095 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
16096 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
16097 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
16098 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
16099 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
16100 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
16101 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
16102 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
16103 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
16104 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
16105 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
16106 s-osinte-mingw.ads: Update to GPLv3 run-time license.
16107 Use GNAT instead of GNARL.
16109 2011-08-01 Bob Duff <duff@adacore.com>
16111 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
16112 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
16113 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
16116 2011-08-01 Yannick Moy <moy@adacore.com>
16118 * debug.adb (d.D) reverve flag for the SPARK mode
16119 (d.E) reverve flag for SPARK generation mode
16120 (d.F) reverve flag for Why generation mode
16121 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
16122 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
16123 functions which return True when the corresponding modes are set
16124 (Formal_Language): return "spark" or "alfa" when in formal verification
16126 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
16127 Error_Msg to prefix the error message with a tag giving the formal
16129 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
16130 message with a tag giving the formal language
16131 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
16133 (Analyze_Case_Statement): issue error in formal mode on case statement
16134 with a single "others" case alternative
16135 (Analyze_Exit_Statement): issue errors in formal mode on exit
16136 statements which do not respect SPARK restrictions
16137 (Analyze_Goto_Statement): issue error in formal mode on goto statement
16138 (Check_Unreachable_Code): always issue an error (not a warning) in
16139 formal mode on unreachable code (concerns both code after an infinite
16140 loop and after an unconditional jump, both not allowed in SPARK)
16141 * sem_ch6.adb (Analyze_Return_Statement): add call to
16142 Set_Return_Present for a procedure containing a return statement
16143 (already done for functions in Analyze_Function_Return)
16144 (Analyze_Function_Return): issue error in formal mode on extended
16145 return or if return is not last statement in function
16146 (Check_Missing_Return): issue error in formal mode if function does
16147 not end with return or if procedure contains a return
16148 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
16149 function to detect if there is an inner scope of its parameter S which
16152 2011-08-01 Thomas Quinot <quinot@adacore.com>
16154 * sem_ch6.ads: Minor reformatting.
16156 2011-08-01 Javier Miranda <miranda@adacore.com>
16158 * sem_util.adb (Abstract_Interface_List): Complete condition when
16159 processing private type declarations to avoid reading unavailable
16161 (Is_Synchronized_Tagged_Type): Complete condition when processing
16162 private extension declaration nodes to avoid reading unavailable
16165 2011-08-01 Thomas Quinot <quinot@adacore.com>
16167 * sem_ch3.adb: Minor reformatting.
16169 2011-08-01 Thomas Quinot <quinot@adacore.com>
16171 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
16172 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
16173 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
16174 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
16175 for VMS, instead parametrize the common implementation with
16176 System.Parameters declarations.
16178 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
16180 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
16182 2011-08-01 Tristan Gingold <gingold@adacore.com>
16184 * seh_init.c: Fix SEH handler installation on win64.
16186 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16188 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
16189 double analysis of an anonymous access to subprogram, because it can
16190 lead to improper sharing of profiles and a back-end crash.
16192 2011-08-01 Robert Dewar <dewar@adacore.com>
16194 * make.adb, sem_ch4.adb: Minor reformatting.
16195 * gcc-interface/Make-lang.in: Update dependencies.
16196 * sem_util.adb, exp_ch5.adb: Minor reformatting.
16198 2011-08-01 Arnaud Charlet <charlet@adacore.com>
16200 * gnat_rm.texi: Fix definition of Long_Integer.
16202 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16204 * exp_aggr.adb: check limit size of static aggregate unconditionally,
16205 to prevent storage exhaustion.
16206 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
16207 finalized is a function body, insert the cleanup code before the final
16208 return statement, to prevent spurious warnings.
16209 * s-pooglo.ads: add overriding indicator.
16211 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16213 * sem_ch4.adb (Operator_Check): improve error message when both a
16214 with_clause and a use_clause are needed to make operator usage legal.
16215 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
16216 determine whether a compilation unit is visible within an other,
16217 either through a with_clause in the current unit, or a with_clause in
16218 its library unit or one one of its parents.
16220 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16222 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
16223 over an arbitrary expression of an array or container type.
16224 * lib-xref.adb: clarify comment.
16226 2011-08-01 Bob Duff <duff@adacore.com>
16228 * einfo.ads: Minor reformatting.
16229 * debug.adb: Minor comment improvement.
16231 2011-08-01 Javier Miranda <miranda@adacore.com>
16233 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
16234 consider hidden subprograms as valid candidates.
16236 2011-08-01 Arnaud Charlet <charlet@adacore.com>
16238 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
16240 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
16242 * gnat_ugn.texi: Fix typo.
16244 2011-08-01 Robert Dewar <dewar@adacore.com>
16246 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
16247 lib-xref.adb: Minor reformatting
16249 2011-08-01 Gary Dismukes <dismukes@adacore.com>
16251 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
16252 when to generate a call to Move_Final_List.
16253 (Has_Controlled_Parts): Remove this function.
16255 2011-08-01 Geert Bosch <bosch@adacore.com>
16257 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
16258 "," in choice list.
16260 2011-08-01 Thomas Quinot <quinot@adacore.com>
16262 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
16263 explicit raise of a predefined exception as Comes_From_Source if the
16264 original N_Raise_Statement comes from source.
16266 2011-08-01 Robert Dewar <dewar@adacore.com>
16268 * sinfo.ads: Add comment.
16269 * sem_ch6.adb: Minor reformatting.
16271 2011-08-01 Robert Dewar <dewar@adacore.com>
16273 * freeze.adb (Freeze_Entity): Refine check for bad component size
16274 clause to avoid rejecting confirming clause when atomic/aliased present.
16276 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16278 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
16279 better determine whether an entity reference is a write.
16280 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
16282 * lib-xref.adb (Output_References): Do no suppress a read reference at
16283 the same location as an immediately preceeding modify-reference, to
16284 handle properly in-out actuals.
16286 2011-08-01 Tristan Gingold <gingold@adacore.com>
16288 * env.c (__gnat_setenv) [VMS]: Refine previous change.
16290 2011-08-01 Quentin Ochem <ochem@adacore.com>
16292 * i-cstrin.adb (New_String): Changed implementation, now uses only the
16293 heap to compute the result.
16295 2011-08-01 Robert Dewar <dewar@adacore.com>
16297 * atree.ads: Minor reformatting.
16299 2011-08-01 Emmanuel Briot <briot@adacore.com>
16301 * g-expect.adb (Get_Command_Output): Fix memory leak.
16303 2011-08-01 Geert Bosch <bosch@adacore.com>
16305 * cstand.adb (P_Float_Type): New procedure to print the definition of
16306 predefined fpt types.
16307 (P_Mixed_Name): New procedure to print a name using mixed case
16308 (Print_Standard): Use P_Float_Type for printing floating point types
16309 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
16310 precision IEEE float.
16312 2011-08-01 Thomas Quinot <quinot@adacore.com>
16314 * sem_ch3.adb: Minor reformatting.
16316 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16318 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
16319 the completion of a generic function, insert the new body rather than
16320 rewriting the original.
16322 2011-08-01 Yannick Moy <moy@adacore.com>
16324 * sinfo.ads, errout.ads: Typos in comments.
16326 2011-08-01 Robert Dewar <dewar@adacore.com>
16328 * par-endh.adb: Minor reformatting.
16330 2011-08-01 Robert Dewar <dewar@adacore.com>
16332 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
16333 (Pre_Post_Aspects): New subtype.
16334 * par-ch12.adb (P_Generic): New syntax for aspects in packages
16335 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
16336 * par-ch7.adb (P_Package): Remove Decl parameter
16337 (P_Package): Handle new syntax for aspects (before IS)
16338 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
16340 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
16341 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
16342 (P_Package): Remove Decl parameter
16343 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
16345 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
16347 * sem_util.ads, sem_util.adb (Static_Boolean): New function
16348 * sinfo.ads: Document new syntax for aspects in packages etc.
16349 * sprint.adb: Handle new syntax of aspects before IS in package
16351 2011-08-01 Thomas Quinot <quinot@adacore.com>
16353 * atree.ads: Minor reformatting.
16354 * sem_prag.adb: Minor reformatting.
16356 2011-08-01 Robert Dewar <dewar@adacore.com>
16358 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
16359 case expr alternative.
16361 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16363 * sem_ch12.adb: Fix typo.
16365 2011-08-01 Geert Bosch <bosch@adacore.com>
16367 * sem_prag.adb (Check_No_Link_Name): New procedure.
16368 (Process_Import_Or_Interface): Use Check_No_Link_Name.
16369 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
16370 instead of Standard_Long_Long_Float_Size global. Preparation for
16371 eventual removal of per type constants.
16372 * exp_util.ads (Get_Stream_Size): New function returning the stream
16373 size value of subtype E.
16374 * exp_util.adb (Get_Stream_Size): Implement new function.
16375 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
16377 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
16379 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
16381 2011-08-01 Geert Bosch <bosch@adacore.com>
16383 * cstand.adb: Fix comments.
16384 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
16385 count of arguments.
16387 2011-08-01 Robert Dewar <dewar@adacore.com>
16389 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
16391 2011-08-01 Geert Bosch <bosch@adacore.com>
16393 * atree.ads: Fix comment.
16395 2011-08-01 Robert Dewar <dewar@adacore.com>
16397 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
16398 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
16399 * par.adb: Add with for Namet.Sp.
16400 * par-tchk.adb: Minor reformatting.
16402 2011-08-01 Vincent Celier <celier@adacore.com>
16404 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
16405 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
16406 of the init procedure of a SAL.
16407 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
16410 2011-08-01 Thomas Quinot <quinot@adacore.com>
16412 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
16415 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
16417 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
16419 2011-08-01 Thomas Quinot <quinot@adacore.com>
16421 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
16422 conformant with its spec (return True only for types that have
16423 an overriding Initialize primitive operation that prevents them from
16424 having preelaborable initialization).
16425 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
16426 initialization for controlled types in Ada 2005 or later mode.
16428 2011-08-01 Robert Dewar <dewar@adacore.com>
16430 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
16432 (Same_Aspect): New function.
16433 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
16434 Type_Invariant, Precondition, Postcondition.
16435 * snames.ads-tmpl: Add Name_Type_Invariant.
16437 2011-08-01 Robert Dewar <dewar@adacore.com>
16439 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
16441 (Freeze_All_Ent): Fix error in handling inherited aspects.
16442 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
16443 already analyzed, but don't skip entire processing of a declaration,
16444 that's wrong in some cases of declarations being rewritten.
16445 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
16446 Don't delay for integer, string literals
16447 Treat predicates in usual manner for delay, remove special case code,
16449 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
16450 (Build_Predicate_Function): Update saved expression in aspect
16451 (Build_Invariant_Procedure): Update saved expression in aspect
16452 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
16453 of replacement of discriminant references if the reference is simple.
16455 2011-08-01 Robert Dewar <dewar@adacore.com>
16457 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
16458 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
16459 Static_Predicate and Dynamic_Predicate.
16460 (Build_Predicate_Function): Add processing for Static_Predicate
16461 and Dynamic_Predicate.
16462 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
16463 (From_Static_Predicate): New flag
16464 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
16466 2011-08-01 Robert Dewar <dewar@adacore.com>
16468 * usage.adb: Documentation cleanup for Ada version modes in usage.
16469 * expander.adb: Minor reformatting.
16471 2011-08-01 Robert Dewar <dewar@adacore.com>
16473 * atree.ads: Minor comment fix.
16474 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
16475 a-witeio.ads, sem_prag.adb: Minor reformatting.
16477 2011-08-01 Doug Rupp <rupp@adacore.com>
16479 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
16480 pointers. Use descrip.h header file for convenience. Add some
16483 2011-08-01 Robert Dewar <dewar@adacore.com>
16485 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
16486 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
16487 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
16489 (Check_Aspect_At_End_Of_Declarations): New procedure
16490 (Analye_Aspect_Specification): Minor changes for above procedures
16491 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
16492 specification node as well.
16494 2011-08-01 Pascal Obry <obry@adacore.com>
16496 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
16497 Windows files. Use GetFilesAttributes() in this case to check for file
16498 existence instead of returning with an error code.
16500 2011-08-01 Vincent Celier <celier@adacore.com>
16502 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
16503 High is above Source length.
16505 2011-08-01 Robert Dewar <dewar@adacore.com>
16507 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
16509 2011-08-01 Robert Dewar <dewar@adacore.com>
16511 * aspects.ads (Boolean_Aspects): New subtype.
16512 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
16513 for derived types in cases where the parent type and derived type have
16515 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
16516 with aspects when parent type also has aspects.
16517 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
16518 boolean expression at this point).
16519 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
16520 accordance with final decision on the Ada 2012 feature.
16521 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
16523 2011-08-01 Matthew Heaney <heaney@adacore.com>
16525 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
16527 2011-08-01 Pascal Obry <obry@adacore.com>
16529 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
16530 Fix Replace_Slice when High is above current string size.
16531 (Replace_Slice): Fix DL computation when High is above current
16534 2011-08-01 Gary Dismukes <dismukes@adacore.com>
16536 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
16538 2011-08-01 Matthew Heaney <heaney@adacore.com>
16540 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
16543 2011-08-01 Pascal Obry <obry@adacore.com>
16545 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
16548 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16550 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
16551 access to protected subprograms in generic bodies.
16552 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
16553 protected type, indicate that the convention of the subprogram is
16554 Convention_Protected, because it may be used in subsequent declarations
16555 within the protected declaration.
16557 2011-08-01 Vincent Celier <celier@adacore.com>
16559 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
16560 and "final" procedures when the name of the library is "ada", to avoid
16561 duplicate symbols "adainit" and "adafinal" in executables.
16563 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16565 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
16566 quantified expression that appears within a postcondition and uses the
16567 Ada2012 'Result attribute.
16569 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16571 * init.c (__gnat_error_handler): Cast reason to int.
16572 (__gnat_install_handler): Explain sa_sigaction use.
16574 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
16576 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
16577 subprogram has copy-in copy-out parameters, try to promote the mode of
16578 the return type if it is passed in registers.
16580 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
16582 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
16583 left operand as addressable.
16585 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
16587 * gcc-interface/gigi.h (build_function_stub): Remove.
16588 (build_return_expr): Likewise.
16589 (convert_vms_descriptor): Declare.
16590 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
16591 (build_function_stub): Move to...
16592 * gcc-interface/utils2.c (build_return_expr): Move to...
16593 * gcc-interface/trans.c (build_function_stub): ...here.
16594 (build_return_expr): ...here.
16595 (Subprogram_Body_to_gnu): Add local variable for language_function.
16596 Disconnect the parameter attributes cache, if any, once done with it.
16597 Call end_subprog_body only after setting the end_locus.
16598 Build the stub associated with the function, if any, at the very end.
16599 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
16600 variables and streamline control flow.
16602 2011-07-23 Arnaud Charlet <charlet@adacore.com>
16605 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
16606 g-trasym-dwarf.adb.
16608 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16611 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
16612 Assign to act.sa_sigaction.
16613 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
16614 current->return_address to char * before arithmetic.
16616 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16618 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
16619 Correct argument types.
16620 Extract code from reason.
16621 (__gnat_install_handler): Assign to act.sa_sigaction.
16623 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
16625 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
16626 (GNAT1_OBJS): ...here.
16628 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
16631 * g-socthi-mingw.adb (Fill): Fix formatting.
16633 * gcc-interface/gigi.h: Move around comment.
16635 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
16638 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
16640 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
16643 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
16645 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
16647 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
16648 range comparison if Pmode is SImode.
16650 2011-07-12 Laurent GUERBY <laurent@guerby.net>
16651 Eric Botcazou <ebotcazou@adacore.com>
16653 * adadecode.c: Wrap up in extern "C" block.
16654 * adadecode.h: Likewise.
16655 * adaint.c: Likewise. Remove 'const' keyword.
16656 * adaint.h: Likewise.
16657 * argv.c: Likewise.
16658 * atree.h: Likewise.
16660 * cstreams.c: Likewise.
16662 * exit.c: Likewise.
16664 * final.c: Likewise.
16665 * init.c: Likewise.
16666 * initialize.c: Likewise.
16667 * link.c: Likewise.
16668 * namet.h: Likewise.
16669 * nlists.h: Likewise.
16670 * raise.c: Likewise.
16671 * raise.h: Likewise.
16672 * repinfo.h: Likewise.
16673 * seh_init.c: Likewise.
16674 * targext.c: Likewise.
16675 * tracebak.c: Likewise.
16676 * uintp.h: Likewise.
16677 * urealp.h: Likewise.
16678 * xeinfo.adb: Wrap up generated C code in extern "C" block.
16679 * xsinfo.adb: Likewise.
16680 * xsnamest.adb: Likewise.
16681 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
16682 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
16683 * gcc-interface/misc.c: Likewise.
16684 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
16685 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
16686 ada/targext.o here...
16687 (GNAT_ADA_OBJS): ...and not here.
16688 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
16689 (GNATBIND_OBJS): Reorder.
16691 2011-07-07 Richard Henderson <rth@redhat.com>
16693 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
16694 dwarf2out_frame_init.
16696 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
16698 * gcc-interface/misc.c (gnat_init): Tweak previous change.
16700 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16703 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
16705 2011-07-06 Richard Guenther <rguenther@suse.de>
16707 * gcc-interface/misc.c (gnat_init): Merge calls to
16708 build_common_tree_nodes and build_common_tree_nodes_2.
16709 Re-initialize boolean_false_node.
16711 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
16712 Olivier Hainque <hainque@adacore.com>
16713 Nicolas Setton <setton@adacore.com>
16715 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
16716 the type according to the ARTIFICIAL_P parameter.
16717 (create_type_decl): Likewise.
16718 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
16720 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
16722 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
16723 (gnatbind): Likewise.
16725 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16727 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
16729 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
16731 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
16732 local variable throughout. Remove useless call to Base_Type.
16733 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
16734 Take it also into account for the volatileness of the field. Set the
16735 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
16737 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
16739 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
16740 on a dereference built for a by-ref object if it has an address clause.
16742 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
16744 * einfo.ads (Address_Taken): Document use for the second argument of
16745 Asm_Input and Asm_Output attributes.
16746 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
16747 argument is an entity name, then set Address_Taken on it.
16748 <Attribute_Asm_Output>: Likewise.
16749 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
16750 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
16751 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
16752 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
16754 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
16756 PR middle-end/46500
16757 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
16759 2011-06-14 Joseph Myers <joseph@codesourcery.com>
16761 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
16762 (ada/utils.o): Update dependencies.
16763 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
16764 ../../../libcpp/libcpp.a.
16765 * gcc-interface/utils.c: Include common/common-target.h.
16766 (process_attributes): Use targetm_common.have_named_sections.
16768 2011-06-07 Richard Guenther <rguenther@suse.de>
16770 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
16773 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
16775 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
16776 TREE_THIS_NOTRAP flag.
16778 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
16780 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
16783 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
16785 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
16786 constants whose full view has discriminants specially.
16788 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
16790 * gcc-interface/utils.c: Include diagnostic.h.
16791 (gnat_write_global_declarations): Output debug information for all
16792 global type declarations before finalizing the compilation unit.
16793 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
16795 2011-05-25 Jakub Jelinek <jakub@redhat.com>
16797 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
16799 2011-05-25 Kai Tietz <ktietz@redhat.com>
16801 * adaint.c (__gnat_to_canonical_file_list_next): Use array
16802 initialization instead of const/none-const pointer assignment.
16804 2011-05-24 Joseph Myers <joseph@codesourcery.com>
16806 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
16807 $(EXTRA_GNAT1_OBJS).
16808 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
16809 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
16810 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
16811 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
16812 libcommon-target.a instead of prefix.o.
16814 2011-05-21 Joseph Myers <joseph@codesourcery.com>
16817 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
16819 2011-05-20 Joseph Myers <joseph@codesourcery.com>
16821 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
16822 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
16823 instead of version.o.
16825 2011-05-18 Kai Tietz <ktietz@redhat.com>
16827 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
16828 boolean_false_node instead of integer_zero_node.
16829 (convert_with_check): Likewise.
16830 * gcc-interface/decl.c (choices_to_gnu): Likewise.
16832 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
16834 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
16835 type of the parameter is an unconstrained array, convert the actual to
16836 the type of the formal in the In Out and Out cases as well.
16838 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
16840 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
16841 call build_function_type_array or build_varargs_function_type_array
16843 (create_subprog_type): Don't call build_function_type; call
16844 build_function_type_vec instead.
16846 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
16848 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
16849 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
16850 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
16852 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
16854 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
16856 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
16857 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
16859 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
16861 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
16863 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
16865 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
16866 instead of accessing TYPE_ARG_TYPES directly.
16867 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
16869 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
16872 * gcc-interface/gigi.h (get_variant_part): Declare.
16873 * gcc-interface/decl.c (get_variant_part): Make global.
16874 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
16875 types have the same constant size, are record types and T1 has a
16876 variant part while T2 doesn't.
16878 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
16880 * gcc-interface/utils.c (begin_subprog_body): Do not call
16882 (end_subprog_body): Likewise.
16884 2011-05-04 Richard Guenther <rguenther@suse.de>
16886 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
16888 (pos_to_constructor): Likewise.
16890 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
16891 Eric Botcazou <ebotcazou@adacore.com>
16893 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
16894 of build_function_type. Adjust calls to...
16895 (build_raise_check): ...this. Do not take a void_tree parameter.
16896 Call build_function_type_list instead of build_function_type.
16897 Fix head comment and swap couple of conditional blocks.
16899 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
16901 * gnatvsn.ads (Library_Version): Bump to 4.7.
16902 (Current_Year): Bump to 2011.
16904 2011-04-29 Michael Matz <matz@suse.de>
16906 * gcc-interface/misc.c (gnat_handle_option): Set
16907 warn_maybe_uninitialized.
16909 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
16911 * gnat_ugn.texi (Complexity Metrics Control): Update link to
16912 the Watson/McCabe paper.
16914 2011-04-23 Jim Meyering <meyering@redhat.com>
16916 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
16918 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
16920 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
16923 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
16925 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
16927 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
16928 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
16929 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
16930 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
16931 <all>: Do not set flags on the reused DECL node coming from an alias.
16932 Set DECL_IGNORED_P on the DECL node built for subprograms if they
16933 don't need debug info here...
16934 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
16935 (gigi): Adjust calls to create_subprog_decl.
16936 (build_raise_check): Likewise.
16937 (establish_gnat_vms_condition_handler): Likewise.
16938 (Compilation_Unit_to_gnu): Likewise.
16939 (gnat_to_gnu): Likewise.
16941 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
16943 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
16944 (NO_REORDER_ADAFLAGS): New variable.
16945 (EXTRA_GNATTOOLS): Always define.
16946 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
16947 Clean up and adjust list of files compiled with special options.
16948 * gcc-interface/Make-lang.in: Likewise.
16949 (ada/decl.o): Cosmetical change.
16950 (ada/misc.o): Remove dependency on $(PLUGIN_H).
16952 2011-04-20 Jim Meyering <meyering@redhat.com>
16954 * initialize.c (__gnat_initialize): Remove useless if-before-free.
16956 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
16958 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
16959 $(CFLAGS) on the link line.
16961 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
16963 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
16964 padded type built for the return type if it is unconstrained.
16966 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
16968 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
16970 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
16972 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
16973 before calling TREE_CHAIN.
16974 * gcc-interface/misc.c (gnat_init_ts): New function.
16975 (LANG_HOOKS_INIT_TS): Define.
16977 2011-04-12 Martin Jambor <mjambor@suse.cz>
16979 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
16980 instead of cgraph_node.
16982 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
16984 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
16985 alignment on fields of the RETURN type built for the Copy-In Copy-Out
16988 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
16990 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
16991 of aggregate types that contain a placeholder.
16993 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
16995 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
16997 (handle_type_generic_attribute): Likewise.
16999 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
17002 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
17004 2011-04-04 Kai Tietz <ktietz@redhat.com>
17007 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
17010 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17012 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
17013 type case, do not strip a padding type around the array type.
17015 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17017 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
17020 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17022 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
17023 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
17024 code for -feliminate-unused-debug-types.
17025 (gnat_post_options): Likewise.
17027 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17029 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
17030 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
17033 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17035 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
17036 DECL_ARTIFICIAL flag on enumeration types.
17038 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17040 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
17041 fat pointer types artificial unconditionally.
17042 <E_Array_Subtype>: Attach the base array type as a parallel type if it
17045 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17047 * gcc-interface/gigi.h (get_dummy_type): Declare.
17048 (build_dummy_unc_pointer_types): Likewise.
17049 (finish_fat_pointer_type): Likewise.
17050 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
17051 fat pointer type has been built, complete it in place.
17052 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
17053 and thin pointers. Remove useless variable.
17054 (finish_fat_pointer_type): Make global and move to...
17055 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
17056 (get_dummy_type): New function.
17057 (build_dummy_unc_pointer_types): Likewise.
17058 (gnat_pushdecl): Propage the name to the anonymous variants only.
17059 (update_pointer_to): Only adjust the pointer types in the unconstrained
17062 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17064 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
17065 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
17066 if this is a Taft amendment type and the full declaration is available.
17067 * gcc-interface/trans.c (process_type): Likewise.
17068 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
17069 (process_freeze_entity): Likewise.
17070 * gcc-interface/utils.c (dummy_global): New static variable.
17071 (gnat_write_global_declarations): If there are types declared as used
17072 at the global level, insert them in the global hash table.
17074 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17076 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
17077 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
17078 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
17080 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
17081 flag of the type accordingly.
17082 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
17084 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17086 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
17087 finalizing types when updating the pointers to the designated type.
17088 <all>: Finalize the deferred types even if we didn't defer processing
17089 of incomplete types in this invocation.
17091 2011-04-01 Olivier Hainque <hainque@adacore.com>
17092 Nicolas Setton <setton@adacore.com>
17093 Eric Botcazou <ebotcazou@adacore.com>
17095 * gcc-interface/misc.c (gnat_descriptive_type): New function.
17096 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
17098 2011-03-28 Kai Tietz <ktietz@redhat.com>
17100 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
17102 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
17103 * system-mingw.ads (System): Change ZCX_By_Default default to True.
17105 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
17107 2011-03-28 Tristan Gingold <gingold@adacore.com>
17110 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
17111 Use ada output of gnatbind.
17112 (ada/b_gnatb.adb): Ditto.
17113 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
17114 (ada.mostlyclean, ada.stage1)
17115 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
17116 (ada.stagefeedback): Adjust.
17117 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
17118 Use ada output of gnatbind.
17119 (b_gnatm.adb): Ditto.
17120 (b_gnatl.o, b_gnatm.o): New rules.
17122 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
17124 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
17125 for the padded type built to support a specified size or alignment.
17127 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
17129 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
17130 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
17131 unconditionally to the end of the unit when the designated type is
17133 <all>: Rename local variable. Attempt to un-defer types only and do it
17134 for limited_with'ed types as well.
17135 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
17136 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
17137 consistently and remove redundant call to finalize_from_with_types.
17139 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
17141 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
17142 subprograms without a previous spec declared in the same unit.
17143 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
17144 subprograms at the end of the unit instead of at the beginning.
17145 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
17146 isn't public for the special handling of non-inline functions nested
17147 inside inline external functions.
17149 2011-03-25 Jeff Law <law@redhat.com>
17151 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
17153 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
17155 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
17156 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
17157 to compute Set_Size_Depends_On_Discriminant.
17158 (Layout_Type): Call it on array types in back-end layout mode.
17159 * sem_util.adb (Requires_Transient_Scope): Return true for array
17160 types only if the size depends on the value of discriminants.
17161 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
17162 type if the RHS is a call to a function that returns an unconstrained
17163 type with default discriminant.
17165 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
17167 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
17168 non-conversion to the nominal result type at the end.
17170 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
17172 * gcc-interface/trans.c (create_temporary): New function taken from...
17173 (create_init_temporary): ...here. Call it.
17174 (call_to_gnu): Create the temporary for the return value early, if any.
17175 Create it for a function with copy-in/copy-out parameters if there is
17176 no target; in other cases of copy-in/copy-out, use another temporary.
17177 Push the new binding level lazily. Add and rename local variables.
17179 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
17181 * gcc-interface/decl.c (validate_size): Improve comments and tweak
17183 (set_rm_size): Likewise.
17185 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
17187 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
17188 for the padded type built in order to support a specified alignment.
17189 Fix incorrect formatting.
17191 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
17194 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
17196 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
17198 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
17199 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
17200 to the end of the list. Adjust recursive call. Rename local variable.
17201 If REORDER is true, reorder components of the record type.
17202 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
17203 components_to_record and adjust the parameter list.
17205 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
17207 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
17208 disabled, use the variable for bounds of loop iteration scheme.
17210 2011-03-21 Kai Tietz <ktietz@redhat.com>
17213 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
17215 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
17217 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
17218 out whether the expression is read-only. Short-circuit placeholder
17219 case and rename a couple of local variables.
17221 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
17223 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
17224 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
17225 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
17226 (convert): Deal with conversions from a smaller form type specially.
17228 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
17230 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
17231 its argument, except for the special -I- switch.
17233 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
17235 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
17238 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
17240 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
17242 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
17244 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
17246 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
17247 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
17248 instead of GNAT_FORMAL. Protect the expression against multiple uses.
17249 Do not generate the check directly, instead instantiate the template
17250 check present in the descriptor.
17251 (make_descriptor_field): Move around.
17252 (build_vms_descriptor32): Build a template check in the POINTER field.
17253 (build_vms_descriptor): Remove useless suffixes.
17254 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
17256 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
17259 * targext.c: Include target files if IN_RTS is defined.
17261 2011-01-26 Richard Guenther <rguenther@suse.de>
17264 * targext.c: Include config.h.
17265 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
17268 2011-01-04 Pascal Obry <obry@adacore.com>
17269 Eric Botcazou <ebotcazou@adacore.com>
17271 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
17273 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
17275 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
17276 end-of-case on the end label and its associated gotos, if any.
17278 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
17280 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
17281 expressions of the parameter cache within the statement group of
17282 the CICO mechanism.
17284 2011-01-04 Olivier Hainque <hainque@adacore.com>
17285 Eric Botcazou <ebotcazou@adacore.com>
17287 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
17288 (set_end_locus_from_node): New function.
17289 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
17290 make and the function end_locus.
17291 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
17292 for the elaboration subprogram.
17293 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
17294 set the end_locus of the expression as well.
17296 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
17299 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
17300 variables that are referenced in exception handlers volatile.
17304 Copyright (C) 2011 Free Software Foundation, Inc.
17306 Copying and distribution of this file, with or without modification,
17307 are permitted in any medium without royalty provided the copyright
17308 notice and this notice are preserved.