1 2011-12-05 Bob Duff <duff@adacore.com>
3 * sem_ch3.adb (Derive_Progenitor_Subprograms): Add Ultimate_Alias
4 to the Comes_From_Source check, to deal properly with the case
5 of indirect inheritance of "=".
7 2011-12-05 Thomas Quinot <quinot@adacore.com>
10 * s-oscons-tmplt.c: On HP-UX, CLOCK_REALTIME is an enum literal,
13 2011-12-05 Thomas Quinot <quinot@adacore.com>
15 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Generate dominance
18 2011-12-02 Eric Botcazou <ebotcazou@adacore.com>
19 Thomas Quinot <quinot@adacore.com>
21 * gcc-interface/Makefile.in (INCLUDES): Remove $(srcdir)/config.
22 (INCLUDES_FOR_SUBDIR): Add $(fsrcdir) except for VxWorks.
23 Add thread.c to LIBGNAT_SRCS so that a symlink is created in ada/rts,
24 which allows the file to be installed in adainclude.
25 * gcc-interface/Make-lang.in: Update dependencies.
27 2011-12-02 Javier Miranda <miranda@adacore.com>
29 * sem_ch3.adb (Constrain_Access): Undo previous
30 patch for this routine. Required since the RM rule 3.7.1(7/3)
31 applies to all access types.
33 2011-12-02 Bob Duff <duff@adacore.com>
35 * sem_ch6.adb: Minor comment fix.
37 2011-12-02 Joel Sherrill <joel.sherrill@oarcorp.com>
39 * s-tpopsp-rtems.adb: Use ATCB_Key rather than RTEMS_Ada_Self variable
40 for consistency with other ports.
41 * s-osinte-rtems.adb: Add body for dummy implementation of
42 pthread_rwlockattr_setkind_np().
43 * s-osinte-rtems.ads: Add missing clock and rwlock bindings.
44 * terminals.c: Add __rtems__ conditionals to account for differences
45 in termios implementation.
47 2011-12-02 Robert Dewar <dewar@adacore.com>
49 * sem_ch3.adb, sem_attr.adb, a-comutr.adb, a-cbmutr.adb,
50 a-cbmutr.ads: Minor reformatting.
52 2011-12-02 Hristian Kirtchev <kirtchev@adacore.com>
54 * exp_dbug.adb: Comment reformatting.
55 (Get_External_Name): Use Reset_Buffers to reset the contents of
56 Name_Buffer and Homonym_Numbers.
57 (Qualify_All_Entity_Names): Reset the contents of Name_Buffer and
58 Homonym_Numbers before creating a new qualified name for a particular
60 (Reset_Buffers): New routine.
62 2011-12-02 Matthew Heaney <heaney@adacore.com>
64 * a-cbmutr.ads (No_Node): Moved declaration from body to spec
65 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Iterator): Derives
67 (Child_Iterator): Derives from Root_Iterator.
68 (Finalize): Implemented as an override operation for Root_Iterator.
69 (First): Return value depends on Subtree component.
70 (Last): Component was renamed from Parent to Subtree.
71 (Next): Checks parameter value, and uses simplified loop.
72 (Iterate): Forwards to Iterate_Subtree.
73 (Iterate_Children): Component was renamed from Parent to Subtree.
74 (Iterate_Subtree): Checks parameter value
76 2011-12-02 Robert Dewar <dewar@adacore.com>
78 * usage.adb: Add lines for -gnatw.n and -gnatw.N
79 (atomic sync info msgs).
81 2011-12-02 Steve Baird <baird@adacore.com>
83 * sem_ch3.adb (Check_Completion): An Ada 2012
84 generic formal type doesn't require a completion.
86 2011-12-02 Eric Botcazou <ebotcazou@adacore.com>
88 * sem_util.adb (Set_Debug_Info_Needed): Also set the flag on the
89 packed array type if it is to be set on the array type used to
92 2011-12-02 Robert Dewar <dewar@adacore.com>
94 * gnat_rm.texi: Eliminate confusing use of type name.
96 2011-12-02 Thomas Quinot <quinot@adacore.com>
98 * sem_ch10.adb (Analyze_Compilation_Unit): For a library subprogram
99 body that acts as spec, do not create a shallow copy of the context
100 clause for the synthetized spec (instead, use the same list as
103 2011-12-02 Bob Duff <duff@adacore.com>
105 * gnat_ugn.texi: Clarify usage of -p binder switch.
107 2011-12-02 Javier Miranda <miranda@adacore.com>
109 * sem_util.ads, sem_util.adb, sem_aux.ads, sem_aux.adb
110 (Effectively_Has_Constrained_Partial_View): Moved to sem_aux
111 (In_Generic_Body): Moved to sem_aux.
112 (Unit_Declaration_Node): Moved to sem_aux.
113 * einfo.ads (Effectively_Has_Constrained_Partial_View): Complete
115 * exp_attr.adb, live.adb, sem_ch10.adb, checks.adb, sem.adb,
116 rtsfind.adb, sem_attr.adb, sem_elab.adb, exp_ch4.adb, sem_ch4.adb,
117 exp_ch13.adb: Add with-clause on Sem_Aux.
119 2011-12-02 Yannick Moy <moy@adacore.com>
121 * sem_util.adb (Unique_Name): Reach through Unique_Entity to
122 get the name of the entity.
123 (Unique_Entity): Correct case for subprogram stubs.
125 2011-12-02 Yannick Moy <moy@adacore.com>
127 * sem_ch3.adb (Check_Initialization): Do not emit warning on
128 initialization of limited type object in Alfa mode.
130 2011-12-02 Robert Dewar <dewar@adacore.com>
132 * sinfo.ads: Minor reformatting.
133 * gnat_ugn.texi: Fix confusion in use of term "type name".
135 2011-12-02 Robert Dewar <dewar@adacore.com>
137 * sem_ch6.adb: Minor change in error message.
139 2011-12-02 Robert Dewar <dewar@adacore.com>
141 * sem_ch9.adb, prj-part.adb, vms_data.ads, sem_ch8.adb: Minor
144 2011-12-02 Javier Miranda <miranda@adacore.com>
146 * sem_ch3.adb (Constrain_Access): Enable on Ada 2005 mode the
147 static check of the rule of general access types whose designated
148 type has discriminants.
149 * sem_util.ads, sem_util.adb
150 (Effectively_Has_Constrained_Partial_View): New subprogram.
151 (In_Generic_Body): New subprogram.
152 * einfo.ads (Has_Constrained_Partial_View): Adding documentation.
153 * sem_prag.adb (Inside_Generic_Body): Removed. Replaced by new
154 subprogram In_Generic_Body.
155 * exp_attr.adb, checks.adb, sem_attr.adb, exp_ch4.adb,
156 sem_ch4.adb: In addition, this patch replaces the occurrences of
157 Has_Constrained_Partial_View by
158 Effectively_Has_Constrained_Partial_View.
160 2011-12-02 Matthew Heaney <heaney@adacore.com>
162 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Iterator): Rename
164 (Finalize): Remove unnecessary access check.
165 (First): Forward to First_Child.
166 (Last): Forward to Last_Child.
167 (Iterate): Check preconditions for parent node parameter.
168 (Next): Forward to Next_Sibling.
169 (Previous): Forward to Previous_Sibling.
171 2011-12-02 Robert Dewar <dewar@adacore.com>
173 * a-coinve.adb, a-coorma.adb, freeze.adb, a-coorse.adb, a-comutr.adb,
174 a-coormu.adb, a-convec.adb: Minor reformatting.
176 2011-12-02 Matthew Heaney <heaney@adacore.com>
178 * a-coormu.ads, a-ciormu.ads: Declare iterator factory function.
179 * a-ciormu.adb, a-ciormu.adb (Iterator): Declare concrete
181 (Finalize): Decrement busy counter.
182 (First, Last): Cursor return value depends on iterator node value.
183 (Iterate): Use start position as iterator node value.
184 (Next, Previous): Forward to corresponding cursor-based operation.
186 2011-12-02 Robert Dewar <dewar@adacore.com>
188 * a-cborma.adb, a-cbhama.adb, a-cbdlli.adb, a-cbmutr.adb,
189 a-cbhase.adb, a-cdlili.adb, a-cihama.adb, a-ciorse.adb, a-cidlli.adb,
190 a-cimutr.adb, a-cihase.adb, a-cohama.adb, a-cborse.adb,
191 a-ciorma.adb, a-cobove.adb: Minor reformatting.
193 2011-12-01 Jakub Jelinek <jakub@redhat.com>
196 * gcc-interface/Make-lang.in: Initialize RTS_DIR with = instead of :=.
198 2011-11-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
200 * s-taprop-tru64.adb (Create_Task): Use Unrestricted_Access.
202 2011-11-23 Thomas Quinot <quinot@adacore.com>
204 * thread.c, s-oscons-tmplt.c: Generate __gnat_pthread_condattr_setup
205 only on platforms where this is required, as determined by
208 2011-11-23 Ed Schonberg <schonberg@adacore.com>
210 * sem_ch9.adb: No check on entry index if error on index.
212 2011-11-23 Gary Dismukes <dismukes@adacore.com>
214 * sem_ch6.adb (Analyze_Return_Statement): Improve error messages for
215 return statements nested inside an extended_return_statement.
216 * gcc-interface/Make-lang.in: Update dependencies.
217 * gcc-interface/Makefile.in (MISCLIB): Add -lutil for BSD targets.
219 2011-11-23 Ed Schonberg <schonberg@adacore.com>
221 * freeze.adb (Freeze_All_Ent): An incomplete type is not
222 frozen by a subprogram body that does not come from source.
224 2011-11-23 Pascal Obry <obry@adacore.com>
226 * s-oscons-tmplt.c: Add PTY_Library constant. It contains
227 the library for pseudo terminal support.
228 * g-exptty.ads: Add pseudo-terminal library into a Linker_Options
231 2011-11-23 Ed Schonberg <schonberg@adacore.com>
233 * sem_ch9.adb: No check on entry family index if generic.
235 2011-11-23 Thomas Quinot <quinot@adacore.com>
237 * sem_ch9.adb, s-taprop.ads, s-taprop-hpux-dce.adb, s-taprop-irix.adb,
238 s-taprop-posix.adb, s-taprop-rtx.adb, s-taprop-solaris.adb,
239 s-taprop-tru64.adb, s-taprop-vxworks.adb: Move dependency on
240 System.OS_Constants from shared spec of
241 System.Tasking.Primitive_Operations to the specific body variants
242 that really require this dependency.
244 2011-11-23 Ed Schonberg <schonberg@adacore.com>
246 * sem_ch8.adb (Analyze_Subprogram_Renaming_Declaration):
247 If the declaration has aspects, analyze them so they can be
250 2011-11-23 Hristian Kirtchev <kirtchev@adacore.com>
252 * a-comutr.adb, a-coorma.adb, a-coorse.adb, a-convec.adb, a-cihase.adb,
253 a-cimutr.adb, a-coinve.adb, a-ciorma.adb, a-ciorse.adb, a-cobove.adb,
254 a-cohama.adb, a-cihama.adb, a-cidlli.adb, a-cdlili.adb, a-cbhama.adb,
255 a-cbhase.adb, a-cbmutr.adb, a-cborma.adb, a-cborse.adb, a-cbdlli.adb:
256 Add with and use clause for Ada.Finalization. Type
257 Iterator and Child_Iterator are now derived from Limited_Controlled.
258 (Finalize): New routine.
259 (Iterate): Add a renaming of counter Busy and
260 increment it. Update the return aggregate.
261 (Iterate_Children): Add a renaming of
262 counter Busy and increment it. Update the return aggregate.
263 (Iterate_Subtree): Add a renaming of counter Busy and increment
264 it. Update the return aggregate.
265 * a-cdlili.ads, a-cidlli.ads: Type List_Access is now a general access
267 * a-cihama.ads: Type Map_Access is now a general access type.
268 * a-comutr.ads, a-cimutr.ads: Use type Natural for the two locks
269 associated with the tree.
270 * a-cohama.ads: Type Map_Access is now a general access type.
271 * a-coinve.ads, a-convec.ads: Type Vector_Access is now a general
273 * exp_ch5.adb (Expand_Iterator_Loop): Do not create a block
274 to wrap the loop as this is done at an earlier step, during
275 analysis. The declarations of the iterator and the cursor use
276 the usual Insert_Action mechanism when added into the tree.
277 * sem_ch5.adb (Analyze_Loop_Statement): Remove local constant
278 Loop_Statement and replace all respective uses by N. Add local
279 constant Loc. Preanalyze the loop iterator to discover whether
280 it is a container iterator and if it is, wrap the loop in a
281 block. This ensures that any controlled temporaries produced
282 by the iteration scheme share the same lifetime of the loop.
283 (Is_Container_Iterator): New routine.
284 (Is_Wrapped_In_Block): New routine.
285 (Pre_Analyze_Range): Move spec and body to the library level.
287 2011-11-23 Sergey Rybin <rybin@adacore.com frybin>
289 * gnat_ugn.texi, vms_data.ads: Add documentation for new gnatpp option
290 that controls casing of type and subtype names.
292 2011-11-23 Yannick Moy <moy@adacore.com>
294 * sem_ch3.adb: Minor addition of comments.
296 2011-11-23 Thomas Quinot <quinot@adacore.com>
298 * prj-part.adb (Extension_Withs): New global variable,
299 contains the head of the list of WITH clauses from the EXTENDS
300 ALL projects for which virtual packages are being created.
301 (Look_For_Virtual_Projects_For): When recursing through
302 an EXTENDS ALL, add the WITH clauses of the extending
303 project to Extension_Withs. When adding a project to the
304 Virtual_Hash, record the associated Extension_Withs list.
305 (Create_Virtual_Extending_Project): Add a copy of the appropriate
306 Extension_Withs to the virtual project.
308 2011-11-23 Thomas Quinot <quinot@adacore.com>
310 * mlib-tgt-specific-vxworks.adb: Minor reformatting.
312 2011-11-23 Thomas Quinot <quinot@adacore.com>
314 * Make-generated.in (Sdefault.Target_Name): Set to
315 $(target_noncanonical) instead of $(target) for consistency.
317 2011-11-23 Matthew Heaney <heaney@adacore.com>
319 * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb (Iterator): Declared
320 Iterator type as limited (First, Last): Cursor return value
321 depends on iterator node value (Iterate): Use start position as
322 iterator node value (Next, Previous): Forward to corresponding
323 cursor-based operation.
325 2011-11-23 Matthew Heaney <heaney@adacore.com>
327 * a-coorse.ads, a-ciorse.ads, a-cborse.ads (Set_Iterator_Interfaces):
328 Renamed from Ordered_Set_Iterator_Interfaces.
329 * a-coorse.adb, a-ciorse.adb, a-cborse.adb (Iterator): Declared
330 Iterator type as limited (First, Last): Cursor return value
331 depends on iterator node value (Iterate): Use start position as
332 iterator node value (Next, Previous): Forward to corresponding
333 cursor-based operation.
334 * a-cohase.ads, a-cohase.adb: Implemented forward iterator.
335 * a-cihase.adb, a-cbhase.adb (Iterator): Removed unnecessary
336 node component (First, Next): Forward call to corresponding
337 cursor-based operation (Iterate): Representation of iterator no
338 longer has node component
340 2011-11-23 Hristian Kirtchev <kirtchev@adacore.com>
342 * exp_intr.adb (Expand_Unc_Deallocation): Ensure that the
343 dereference has a proper type before the side effect removal
345 * sem_ch3.adb (Analyze_Subtype_Declaration): Handle a rare case
346 where the base type of the subtype is a private itype created
347 to act as the partial view of a constrained record type. This
348 scenario manifests with equivalent class-wide types for records
349 with unknown discriminants.
351 2011-11-23 Jerome Guitton <guitton@adacore.com>
353 * s-osprim-vxworks.adb (Clock): Use Clock_RT_Ada.
355 2011-11-23 Thomas Quinot <quinot@adacore.com>
357 * s-oscons-tmplt.c: Fix unbalanced preprocessor directives Minor
358 reformatting/reorganization.
360 2011-11-23 Thomas Quinot <quinot@adacore.com>
362 * g-htable.ads: Remove old comments.
364 2011-11-23 Thomas Quinot <quinot@adacore.com>
366 * exp_imgv.adb: Minor reformatting.
368 2011-11-23 Robert Dewar <dewar@adacore.com>
370 * sem_ch9.adb (Analyze_Entry_Declaration): Check for entry
371 family bounds out of range.
373 2011-11-23 Matthew Heaney <heaney@adacore.com>
375 * a-cohama.adb, a-cihama.adb, a-cbhama.adb (Iterator): Declare
376 type as limited, and remove node component.
377 (First, Next): Forward call to corresponding cursor-based operation.
378 (Iterate): Representation of iterator no longer has node component.
380 2011-11-23 Yannick Moy <moy@adacore.com>
382 * exp_util.adb: Revert previous change to remove side-effects in Alfa
383 mode, which is not the correct thing to do for renamings.
385 2011-11-23 Thomas Quinot <quinot@adacore.com>
387 * s-osinte-hpux.ads, s-taprop-vxworks.adb, s-taprop-tru64.adb,
388 s-osinte-vxworks.ads, s-osinte-aix.ads, s-osinte-lynxos.ads,
389 s-osinte-solaris-posix.ads, s-taprop-solaris.adb, a-exetim-posix.adb,
390 s-osinte-irix.ads, s-osinte-solaris.ads, s-oscons-tmplt.c,
391 s-taprop-irix.adb, s-osinte-hpux-dce.ads, Makefile.rtl,
392 s-osinte-tru64.ads, s-osinte-darwin.ads, s-taprop.ads,
393 s-osinte-freebsd.ads, s-osinte-lynxos-3.ads, s-taprop-hpux-dce.adb,
394 s-taprop-posix.adb: Remove hard-coded clock ids;
395 instead, generate them in System.OS_Constants.
396 (System.OS_Constants.CLOCK_RT_Ada): New constant denoting the
397 id of the clock providing Ada.Real_Time.Monotonic_Clock.
398 * thread.c: New file.
399 (__gnat_pthread_condattr_setup): New function. For platforms where
400 CLOCK_RT_Ada is not CLOCK_REALTIME, set appropriate condition
403 2011-11-23 Yannick Moy <moy@adacore.com>
405 * sem_ch3.adb: Restore the use of Expander_Active instead of
406 Full_Expander_Active, so that the evaluation is forced in Alfa
407 mode too. Otherwise, we end up with an unexpected insertion in a
408 place where it is not supposed to happen, on default parameters
411 2011-11-23 Thomas Quinot <quinot@adacore.com>
413 * prj-pp.adb, prj-pp.ads: Minor new addition: wrapper procedure "wpr"
414 for Pretty_Print, for use from within gdb.
416 2011-11-23 Ed Schonberg <schonberg@adacore.com>
418 * exp_ch5.adb (Expand_Iterator_Loop): Wrap the expanded loop
419 and the cursor declarations in a block, so that the loop variable
420 is local to the construct.
422 2011-11-23 Matthew Heaney <heaney@adacore.com>
424 * a-coorma.ads, a-ciorma.ads, a-cborma.ads (Iterate): Returns
425 type Reversible_Iterator'Class.
426 * a-coorma.adb, a-ciorma.adb, a-cborma.adb (Iterator):
427 Declare type as limited.
428 (First, Last): Return value depends on iterator's start node value.
429 (Next, Previous): Call corresponding Cursor-based operation.
430 (Iterate): Indicate whether complete or partial iteration
432 2011-11-23 Robert Dewar <dewar@adacore.com>
434 * errout.adb: Minor reformattin (Finalize): Take templates into
435 account for warning suppression.
436 * errout.ads (Set_Specific_Warning_Off): Add Used parameter.
437 * erroutc.adb: Minor reformatting (Finalize): Take generic
438 templates into account for warning suppress.
439 * erroutc.ads (Set_Specific_Warning_Off): Add Used parameter.
440 * sem_prag.adb: Minor reformatting (Analyze_Pragma,
441 case Warnings): Provide Used parameter in call to
442 Set_Specific_Warnings_Off (to deal with generic template case).
444 2011-11-23 Pascal Obry <obry@adacore.com>
446 * sem_prag.adb (Process_Convention): Better error message for
447 stdcall convention on dispatching calls.
449 2011-11-23 Gary Dismukes <dismukes@adacore.com>
451 * sem_ch4.adb, sem_ch13.adb: Minor reformatting.
453 2011-11-23 Javier Miranda <miranda@adacore.com>
455 * exp_ch6.adb (Expand_Simple_Function_Return): Add missing
456 implicit type conversion when the returned object is allocated
457 in the secondary stack and the type of the returned object is
458 an interface. Done to force generation of displacement of the
461 2011-11-23 Pascal Obry <obry@adacore.com>
463 * impunit.adb: Add g-exptty and g-tty units.
465 2011-11-23 Robert Dewar <dewar@adacore.com>
467 * exp_imgv.adb: Minor code reorganization (use Make_Temporary).
469 2011-11-23 Robert Dewar <dewar@adacore.com>
471 * exp_util.adb, par-ch6.adb, sem_res.adb, par-util.adb: Minor
474 2011-11-23 Yannick Moy <moy@adacore.com>
476 * sem_ch13.adb (Analyze_Aspect_Specifications): Place error on
477 line of precondition/ postcondition/invariant.
479 2011-11-23 Pascal Obry <obry@adacore.com>
481 * g-exptty.ads, g-exptty.adb, g-tty.ads, g-tty.adb,
482 terminals.c: New files.
483 Makefile.rtl: Add these new files.
484 * gnat_rm.texi: Add documentation for GNAT.Expect.TTY.
485 * gcc-interface/Makefile.in: Add g-exptty, g-tty, terminals.o
486 * gcc-interface/Make-lang.in: Update dependencies.
488 2011-11-21 Robert Dewar <dewar@adacore.com>
490 * exp_imgv.adb (Expand_Width_Attribute): Handle case of Discard_Names.
491 * sem_attr.adb (Eval_Attribute, case Width): Ditto.
493 2011-11-21 Thomas Quinot <quinot@adacore.com>
495 * sinfo.ads: Minor reformatting.
497 2011-11-21 Yannick Moy <moy@adacore.com>
499 * exp_util.adb: Minor reformatting. Update comments.
501 2011-11-21 Robert Dewar <dewar@adacore.com>
503 * exp_prag.adb, exp_util.adb, sinfo.ads, sem_res.adb, s-stposu.adb,
504 sem_attr.adb, s-stposu.ads, s-taprop-solaris.adb, s-taprop-irix.adb,
505 sem_ch6.adb: Minor reformatting.
507 2011-11-21 Arnaud Charlet <charlet@adacore.com>
509 * s-taprop-irix.adb, s-taprop-solaris.adb (Create_Task): Use
510 Unrestricted_Access to deal with fact that we properly detect the
511 error if Access is used.
512 * gcc-interface/Make-lang.in: Update dependencies.
514 2011-11-21 Yannick Moy <moy@adacore.com>
516 * exp_prag.adb (Expand_Pragma_Check): Place error on first character
518 * sem_res.adb (Resolve_Short_Circuit): Place error on first
519 character of expression.
521 2011-11-21 Yannick Moy <moy@adacore.com>
523 * exp_util.adb (Remove_Side_Effects): Do nothing in Alfa mode.
525 2011-11-21 Hristian Kirtchev <kirtchev@adacore.com>
527 * exp_attr.adb (Expand_N_Attribute_Reference, case
528 Max_Size_In_Storage_Elements): Account for the size of the
529 hidden list header which precedes controlled objects allocated
531 * rtsfind.ads: Add RE_Header_Size_With_Padding to the runtime
533 * sinfo.adb (Header_Size_Added): New routine.
534 (Set_Header_Size_Added): New routine.
535 * sinfo.ads: Add flag Controlled_Header_Added along with
537 (Header_Size_Added): New inlined routine.
538 (Set_Header_Size_Added): New inlined routine.
539 * s-stposu.adb (Allocate_Any_Controlled): Use
540 Header_Size_With_Padding to calculate the proper
542 (Deallocate_Any_Controlled): Use
543 Header_Size_With_Padding to calculate the proper size
544 of the header. (Header_Size_With_Padding): New routine.
545 (Nearest_Multiple_Rounded_Up): Removed along with its uses.
546 * s-stposu.ads (Header_Size_With_Padding): New routine.
548 2011-11-21 Ed Schonberg <schonberg@adacore.com>
550 * aspects.adb: Aspect specifications are allowed on renaming
552 * par-ch6.adb (P_Subprogram): Parse aspect specifications in a
553 subprogram renaming declaration
555 2011-11-21 Tristan Gingold <gingold@adacore.com>
557 * env.c: Remove unused declaration.
559 2011-11-21 Pascal Obry <obry@adacore.com>
561 * s-os_lib.ads: Minor style fix.
563 2011-11-21 Pascal Obry <obry@adacore.com>
565 * adaint.c (__gnat_dup2): When fd are stdout, stdin or stderr and
566 identical, do nothing on Windows XP.
568 2011-11-21 Yannick Moy <moy@adacore.com>
570 * sem_ch3.adb (Constrain_Index, Process_Range_Expr_In_Decl):
571 Use Full_Expander_Active instead of Expander_Active to control
572 the forced evaluation of expressions for the sake of generating
575 2011-11-21 Thomas Quinot <quinot@adacore.com>
577 * init.c: On FreeBSD, stack checking failures may raise SIGBUS.
579 2011-11-21 Tristan Gingold <gingold@adacore.com>
581 * sysdep.c (mode_read_text, mode_write_text, mode_append_text,
582 mode_read_binary, mode_write_binary, mode_append_binary,
583 mode_read_text_plus, mode_write_text_plus, mode_append_text_plus,
584 mode_read_binary_plus, mode_write_binary_plus,
585 mode_append_binary_plus): Remove unused declarations.
587 2011-11-21 Yannick Moy <moy@adacore.com>
589 * gnat_rm.texi: Minor rewording.
591 2011-11-21 Hristian Kirtchev <kirtchev@adacore.com>
593 * exp_imgv.adb (Expand_Width_Attribute): Emit
594 an error message rather than a warning when pragma Discard_Names
595 prevents the computation of 'Width. Do not emit an error through
598 2011-11-21 Javier Miranda <miranda@adacore.com>
600 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add
601 implicit type conversion when the type of the allocator is an
602 interface. Done to force generation of displacement of the "this"
603 pointer when required.
605 2011-11-21 Ed Schonberg <schonberg@adacore.com>
607 * sinfo.ads, sinfo.adb: Corresponding_Spec applies to expression
608 functions, and is set when the expression is a completion of a
609 previous declaration.
610 * sem_ch6.adb (Analyze_Expression_Function): To determine properly
611 whether an expression function completes a previous declaration,
612 use Find_Corresponding_Spec, as when analyzing a subprogram body.
614 2011-11-21 Steve Baird <baird@adacore.com>
616 * sem_util.adb (Deepest_Type_Access_Level): Improve comment.
617 (Type_Access_Level): Improve comment.
619 2011-11-21 Eric Botcazou <ebotcazou@adacore.com>
621 * gcc-interface/Makefile.in (INCLUDES_FOR_SUBDIR): Add $(fsrcdir) by
622 means of -iquote unconditionally.
624 2011-11-21 Robert Dewar <dewar@adacore.com>
626 * sem_ch3.adb, sem_util.adb, sem_res.adb, sem_attr.adb: Minor
629 2011-11-21 Arnaud Charlet <charlet@adacore.com>
631 * s-taprop-posix.adb (Create_Task): Use Unrestricted_Access
632 to deal with fact that we properly detect the error if Access
635 2011-11-21 Steve Baird <baird@adacore.com>
637 * sem_util.ads: Update comment describing function
638 Deepest_Access_Level.
639 * sem_util.adb (Deepest_Type_Access_Level): Return Int'Last for a
641 (Type_Access_Level): Return library level
642 for a generic formal type.
643 * sem_attr.adb (Resolve_Attribute): Replace two Type_Access_Level
644 calls with calls to Deepest_Type_Access_Level.
645 * sem_ch3.adb (Analyze_Component_Declaration): replace a
646 Type_Access_Level call with a call to Deepest_Type_Access_Level.
647 * sem_res.adb (Resolve_Allocator.Check_Allocator_Discrim_Accessibility):
648 Replace three Type_Access_Level calls with calls to
649 Deepest_Type_Access_Level.
650 (Resolve_Allocator): Replace a Type_Access_Level call with a call to
651 Deepest_Type_Access_Level.
652 (Valid_Conversion.Valid_Array_Conversion): Replace a
653 Type_Access_Level call with a call to Deepest_Type_Access_Level.
655 2011-11-21 Robert Dewar <dewar@adacore.com>
657 * sem_ch3.adb, s-taprop-vms.adb, opt.ads: Minor reformatting.
659 2011-11-21 Robert Dewar <dewar@adacore.com>
661 * sinput.ads: Minor comment fix.
663 2011-11-21 Robert Dewar <dewar@adacore.com>
665 * exp_attr.adb (Expand_N_Attribute_Reference, case First_Bit,
666 Last_Bit, Position): Handle 2005 case.
668 2011-11-21 Robert Dewar <dewar@adacore.com>
670 * s-atocou-builtin.adb (Decrement): Use Unrestricted_Access
671 to deal with fact that we properly detect the error if Access
673 (Increment): Same fix.
674 * s-taprop-linux.adb (Create_Task): Use Unrestricted_Access
675 to deal with fact that we properly detect the error if Access
677 * sem_util.adb (Is_Volatile_Object): Properly record that A.B is
678 volatile if the B component is volatile. This affects the check
679 for passing such a by reference volatile actual to a non-volatile
680 formal (which should be illegal)
682 2011-11-21 Robert Dewar <dewar@adacore.com>
684 * freeze.adb (Freeze_Enumeration_Type): Make sure to set both
685 size and alignment for foreign convention enumeration types.
686 * layout.adb (Set_Elem_Alignment): Redo setting of alignment
689 2011-11-21 Yannick Moy <moy@adacore.com>
691 * checks.adb (Apply_Access_Check, Apply_Arithmetic_Overflow_Check,
692 Apply_Discriminant_Check, Apply_Divide_Check,
693 Apply_Selected_Length_Checks, Apply_Selected_Range_Checks,
694 Build_Discriminant_Checks, Insert_Range_Checks, Selected_Length_Checks,
695 Selected_Range_Checks): Replace reference to Expander_Active
696 with reference to Full_Expander_Active, so that expansion of
697 checks is not performed in Alfa mode
699 2011-11-21 Tristan Gingold <gingold@adacore.com>
701 * s-taprop-vms.adb (Create_Task): Use Unrestricted_Access to deal with
702 fact that we properly detect the error if Access is used.
704 2011-11-21 Hristian Kirtchev <kirtchev@adacore.com>
706 * par-ch4.adb (P_Quantified_Expression): Add an Ada 2012 check.
708 2011-11-21 Hristian Kirtchev <kirtchev@adacore.com>
710 * exp_imgv.adb: Add with and use clause for Errout.
711 (Expand_Width_Attribute): Emit a warning when in
712 configurable run-time mode to provide a better diagnostic message.
714 2011-11-21 Hristian Kirtchev <kirtchev@adacore.com>
716 * s-finmas.adb (Finalize): Add comment concerning double finalization.
718 2011-11-21 Ed Schonberg <schonberg@adacore.com>
720 * sem_ch3.adb (Access_Definition): If the access definition
721 is itself the return type of an access to function definition
722 which is ultimately the return type of an access to subprogram
723 declaration, its scope is the enclosing scope of the ultimate
724 access to subprogram.
726 2011-11-21 Steve Baird <baird@adacore.com>
728 * sem_res.adb (Valid_Conversion): If a conversion was legal
729 in the body of a generic, then the corresponding conversion is
730 legal in the expanded body of an instance of the generic.
732 2011-11-21 Robert Dewar <dewar@adacore.com>
734 * sem_ch3.adb: Minor reformatting.
736 2011-11-21 Robert Dewar <dewar@adacore.com>
738 * s-utf_32.adb (Is_UTF_32_Line_Terminator): Recognize NEL as
740 * sinput.ads: Add section on Handling of Source Line Terminators.
741 * types.ads (Line_Terminator): Adjust comments.
743 2011-11-21 Robert Dewar <dewar@adacore.com>
745 * frontend.adb (Frontend): Capture restrictions from config files
746 * lib-load.adb (Load_Unit): Save/set/restore restriction pragma
748 * lib-xref.adb (Generate_Reference): Fix handling of obsolescent
749 references. This was noticed during debugging, but it is not
750 known if it causes real bugs.
751 * restrict.ads, restrict.adb: New routines to save/set/restore
752 non-partition-wide restrictions.
753 * s-rident.ads: Comment changes for new handling of
755 * sem.adb (Sem): Save/Set/Restore non-partition-wide restrictions
756 * sem_ch10.adb (Analyze_Compilation_Unit): Remove incomplete
757 attempt to save/restore non-partition-wide restrictions (now
758 this work is all done in Sem).
759 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
760 Special handling for restriction No_Elaboration_Code.
762 2011-11-21 Robert Dewar <dewar@adacore.com>
764 * gnat_ugn.texi: Document new handling of restrictions pragmas.
766 2011-11-21 Pascal Obry <obry@adacore.com>
768 * s-taprop-linux.adb (Initialize_Lock): Do not allocate a cond
769 attribute as not needed.
771 2011-11-21 Robert Dewar <dewar@adacore.com>
773 * sem_prag.adb: Minor reformatting.
775 2011-11-21 Pascal Obry <obry@adacore.com>
777 * gnat_rm.texi: Document restriction for stdcall convention on
780 2011-11-21 Pascal Obry <obry@adacore.com>
782 * sem_prag.adb (Process_Convention): A dispatching call cannot
783 have a stdcall calling convention.
785 2011-11-21 Pascal Obry <obry@adacore.com>
787 * s-taprop-linux.adb (Initialize_Lock): Do not allocate a
788 mutex attribute as not needed.
789 (Initialize_TCB): Likewise.
790 (Initialize): Likewise.
792 2011-11-21 Robert Dewar <dewar@adacore.com>
794 * sem_ch6.adb (Is_Public_Subprogram_For): New procedure
795 (Process_PPCs): Invariants only apply to public subprograms.
797 2011-11-21 Robert Dewar <dewar@adacore.com>
799 * sem_util.adb, sem_util.ads, sem_attr.adb, restrict.adb,
800 restrict.ads: Fix for No_Implicit_Aliasing in the renames case.
802 2011-11-21 Robert Dewar <dewar@adacore.com>
804 * a-finali.ads: Use pragma Pure_12 for this unit
805 * aspects.adb: Add aspect Pure_12
806 * aspects.ads: Add aspect Pure_12
807 * opt.ads: Add note on Pure_12
808 * par-prag.adb: Add dummy entry for Pure_12
809 * sem_prag.adb: Implement Pure_12 pragma
810 * snames.ads-tmpl: Add Entry for Pure_12
812 2011-11-21 Sergey Rybin <rybin@adacore.com frybin>
814 * vms_data.ads: Add qualifiers for new gnatpp options
815 '--call_threshold' and '--par_threshold".
816 * gnat_ugn.texi: Add description for new gnatpp options
817 '--call_threshold' and '--par_threshold".
819 2011-11-21 Robert Dewar <dewar@adacore.com>
821 * lib.ads: Minor reformatting.
823 2011-11-21 Robert Dewar <dewar@adacore.com>
825 * lib-load.ads: Add comment.
827 2011-11-21 Gary Dismukes <dismukes@adacore.com>
829 * sem_elab.adb: Minor reformatting
831 2011-11-21 Robert Dewar <dewar@adacore.com>
833 * exp_ch6.adb: Minor reformatting.
835 2011-11-21 Ed Schonberg <schonberg@adacore.com>
837 * sem_ch12.adb (Check_Formal_Package_Instance): If a formal
838 subprogram of the formal package is covered by an others
839 association with a box initialization, no check is needed
840 against the actual in the instantiation of the formal package.
842 2011-11-21 Robert Dewar <dewar@adacore.com>
844 * sem_elab.adb (Check_Internal_Call_Continue): Suppress junk
845 elab warning from within precondition/postcondition etc.
847 2011-11-21 Ed Schonberg <schonberg@adacore.com>
849 * exp_ch6.adb (Expand_Actuals): In Ada 2012, a function call
850 with out parameters may generate assignments to force constraint
851 checks. These checks must be properly placed in the code after the
852 declaration or statement that contains the call.
854 2011-11-21 Fedor Rybin <frybin@adacore.com>
856 * gnat_ugn.texi: Adding info on current gnattest limitations an
857 support of -X option.
859 2011-11-21 Robert Dewar <dewar@adacore.com>
861 * a-cfdlli.adb, a-cbdlli.adb: Minor reformatting.
863 2011-11-20 Robert Dewar <dewar@adacore.com>
865 * exp_ch6.adb, exp_util.adb: Minor reformatting
867 2011-11-20 Eric Botcazou <ebotcazou@adacore.com>
869 * sinfo.ads (Reference): Document that it is OK to set
870 Is_Known_Non_Null on a temporary initialized to a N_Reference
873 2011-11-20 Matthew Heaney <heaney@adacore.com>
875 * a-cbdlli.adb, a-cfdlli.adb (Move): Set Last component to 0
878 2011-11-20 Eric Botcazou <ebotcazou@adacore.com>
880 * exp_ch6.adb (Make_Build_In_Place_Call_In_Assignment):
881 Declare NEW_EXPR local variable and attach the
882 temporary to it. Set Is_Known_Non_Null on the temporary.
883 (Make_Build_In_Place_Call_In_Object_Declaration): Likewise.
884 * exp_util.adb (Remove_Side_Effects): Set Is_Known_Non_Null on
885 the temporary created to hold the 'Reference of the expression,
887 * checks.adb (Install_Null_Excluding_Check): Bail out for the
888 Get_Current_Excep.all.all idiom generated by the expander.
890 2011-11-20 Eric Botcazou <ebotcazou@adacore.com>
892 * gcc-interface/trans.c (struct language_function): Add GNAT_RET.
893 (f_gnat_ret): New macro.
894 (struct nrv_data): Add GNAT_RET.
895 (finalize_nrv_unc_r): New helper function.
896 (finalize_nrv): Add GNAT_RET parameter. Copy it into DATA. If the
897 function returns unconstrained, use finalize_nrv_unc_r as callback.
898 (return_value_ok_for_nrv_p): Test the alignment of RET_OBJ only if
900 (Subprogram_Body_to_gnu): Pass GNAT_RET to finalize_nrv.
901 (gnat_to_gnu) <N_Return_Statement>: In the return-unconstrained case,
902 if optimization is enabled, record candidates for the Named Return
905 2011-11-20 Eric Botcazou <ebotcazou@adacore.com>
907 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Add comment.
908 (gnat_to_gnu) <N_Return_Statement>: Add 'else' to avoid doing a useless
909 test. Tweak default case.
910 <N_Goto_Statement>: Use better formatting.
911 * gcc-interface/utils2.c (maybe_wrap_malloc): Use INIT_EXPR instead of
912 MODIFY_EXPR to initialize the storage.
913 (build_allocator): Likewise.
915 2011-11-20 Eric Botcazou <ebotcazou@adacore.com>
917 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Adjust
918 call to components_to_record.
919 (components_to_record): Add FIRST_FREE_POS parameter. For the variant
920 part, reuse enclosing union even if there is a representation clause
921 on the Unchecked_Union. If there is a variant part, compute the new
922 first free position, if any. Adjust call to self. Use a single field
923 directly only if it hasn't got a representation clause or is placed at
924 offset zero. Create the variant part at offset 0 if all the fields
925 down to this level have a rep clause. Do not chain the variant part
926 immediately and adjust downstream.
927 Do not test ALL_REP before moving the fields without rep clause to the
928 previous level. Call create_rep_part to create the REP part and force
929 a minimum size on it if necessary. Do not chain it immediately.
930 Create a fake REP part if there are fields without rep clause that need
931 to be laid out starting from FIRST_FREE_POS.
932 At the end, chain the REP part and then the variant part.
933 (create_rep_part): New function.
934 (get_rep_part): Minor tweak.
935 * gcc-interface/utils.c (tree_code_for_record_type): Minor tweak.
937 2011-11-18 Iain Sandoe <iains@gcc.gnu.org>
940 * init.c (__gnat_error_handler) [Darwin]: Move workaround to the
941 bug filed as radar #10302855 from __gnat_error_handler to...
942 (__gnat_adjust_context_for_raise) [Darwin]: ...here. New function.
943 (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE) [Darwin]: Define.
945 2011-11-18 Tristan Gingold <gingold@adacore.com>
946 Iain Sandoe <iains@gcc.gnu.org>
949 * mlib-tgt-specific-darwin.adb (Archive_Indexer_Options): Remove.
950 * gcc-interface/Makefile.in (darwin): Remove ranlib special-casing.
952 2011-11-12 Iain Sandoe <iains@gcc.gnu.org>
954 * gcc-interface/Makefile.in (stamp-gnatlib-$(RTSDIR)): Don't link
956 (OSCONS_CPP, OSCONS_EXTRACT): New.
957 (./bldtools/oscons/xoscons): New target.
958 ($(RTSDIR)/s-oscons.ads): Likewise.
959 (gnatlib): Depend on $(RTSDIR)/s-oscons.ads.
960 * gcc-interface/Make-lang.in (ada/s-oscons.ads) Remove as dependency.
961 * Make-generated.in: Remove machinery to generate xoscons and
964 2011-11-10 Eric Botcazou <ebotcazou@adacore.com>
966 * fe.h (Serious_Errors_Detected): New macro.
967 * gcc-interface/gigi.h (build_atomic_load): Declare.
968 (build_atomic_store): Likewise.
969 * gcc-interface/trans.c (atomic_sync_required_p): New predicate.
970 (call_to_gnu): Add ATOMIC_SYNC parameter. Use local variable.
971 Build an atomic load for an In or In Out parameter if needed.
972 Build an atomic store for the assignment of an Out parameter if needed.
973 Build an atomic store to the target if ATOMIC_SYNC is true.
974 (present_in_lhs_or_actual_p): New predicate.
975 (gnat_to_gnu) <N_Identifier>: Build an atomic load if needed.
976 <N_Explicit_Dereference>: Likewise.
977 <N_Indexed_Component>: Likewise.
978 <N_Selected_Component>: Likewise.
979 <N_Assignment_Statement>: Adjust call to call_to_gnu.
980 Build an atomic store to the LHS if needed.
981 <N_Function_Call>: Adjust call to call_to_gnu.
982 * gcc-interface/utils2.c: Include toplev.h.
983 (resolve_atomic_size): New static function.
984 (build_atomic_load): New function.
985 (build_atomic_store): Likewise.
986 * gcc-interface/Make-lang.in (ada/utils2.o): Add toplev.h.
988 2011-11-07 Olivier Hainque <hainque@adacore.com>
990 * sigtramp-ppcvxw.c: Add general comments.
991 (CFI_COMMON_REGS): Remove rule for r1, as in other unwinders. Add
992 rules for r2 to r13, plus CTR and XER.
993 (CFA_REG): New, register number used to hold the local CFA.
994 (CFI_DEF_CFA, SIGTRAMP_BODY): Use it.
995 Make that 15, not 14, with documentation.
996 (TCR): Undef before definition, preventing conflict with reg number in
999 2011-11-07 Robert Dewar <dewar@adacore.com>
1001 * exp_util.ads, exp_alfa.adb, a-cohama.adb, a-cohama.ads, sem_ch4.adb,
1002 aspects.ads, exp_ch8.adb, exp_ch8.ads, atree.ads: Minor reformatting.
1003 * gcc-interface/Make-lang.in: Update dependencies.
1005 2011-11-07 Ed Schonberg <schonberg@adacore.com>
1007 * exp_ch6.adb: A tagged type is a legal actual for an aliased
1010 2011-11-07 Pascal Obry <obry@adacore.com>
1012 * g-socket.adb, g-socket.ads: Minor reformatting.
1014 2011-11-07 Robert Dewar <dewar@adacore.com>
1016 * sem_res.adb (Resolve_Actuals): Minor error message improvement.
1018 2011-11-07 Robert Dewar <dewar@adacore.com>
1020 * gnat_ugn.texi: Add discussion of default mode handling of
1021 source representation with no -gnatW option given, in particular
1022 noting that NEL (next line) is not recognized in this context.
1024 2011-11-07 Yannick Moy <moy@adacore.com>
1026 * sem_util.adb (Note_Possible_Modification): In Alfa mode,
1027 generate a reference for a modification even when the modification
1028 does not come from source.
1030 2011-11-07 Ed Schonberg <schonberg@adacore.com>
1032 * exp_ch5.adb (Expand_Iterator_Loop): For the "of" iterator form,
1033 use the indexing attributes rather than the Element function,
1034 to obtain variable references.
1035 * sem_ch4.adb (Try_Container_Indexing): Code cleanup. Use
1036 Find_Aspect rather than iterating over representation
1037 items. Improve error message.
1038 * a-cohama.adb, a-cohama.ads Update to latest RM, with two versions
1039 of Reference functions.
1041 2011-11-07 Yannick Moy <moy@adacore.com>
1043 * sem_util.adb (Unique_Entity): For a parameter on a subprogram
1044 body that has a corresponding parameter on the subprogram
1045 declaration, define the unique entity as being the declaration
1048 2011-11-07 Ed Schonberg <schonberg@adacore.com>
1050 * sem_ch6.adb (Analyze_Return_Type): In Ada 2012 mode, if the
1051 return type of a function is the class-wide type of an incomplete
1052 type T, T can be a Taft-amendment type and does not have to be
1053 completed in the current private part.
1055 2011-11-07 Ed Schonberg <schonberg@adacore.com>
1057 * aspects.ads (Inherited_Aspect): Map that indicates type aspects
1058 that are inherited by default, and apply to the class-wide type
1060 * aspects.adb (Find_Aspect): If the entity is class-wide and the
1061 aspect is inherited, use the aspect of the specific type.
1063 2011-11-07 Hristian Kirtchev <kirtchev@adacore.com>
1065 * exp_alfa.adb: Remove with and use clause for
1066 Exp_Ch8. Add with and use clause for Exp_Util.
1067 Remove local constant Disable_Processing_Of_Renamings.
1068 (Expand_Alfa_N_Object_Renaming_Declaration): The expansion of
1069 object renamings has been reenabled.
1070 (Expand_Possible_Renaming):
1071 The expansion of identifier and expanded names has been
1072 reenabled. Perform the substitutions only for entities that
1074 * exp_ch8.ads, exp_ch8.adb (Evaluate_Name): Moved to Exp_Util.
1075 * exp_util.adb (Evaluate_Name): Moved from Exp_Ch8.
1076 (Remove_Side_Effects): Alphabetize local variables. Add a guard
1077 to avoid the infinite expansion of an expression in Alfa mode. Add
1078 processing for function calls in Alfa mode.
1079 * exp_util.ads (Evaliate_Name): Moved from Exp_Ch8.
1081 2011-11-07 Ed Schonberg <schonberg@adacore.com>
1083 * freeze.adb (Freeze_Entity): If the entity is an access to
1084 subprogram whose designated type is itself a subprogram type,
1085 its own return type must be decorated with size information.
1087 2011-11-04 Arnaud Charlet <charlet@adacore.com>
1089 * gcc-interface/Make-lang.in: Update dependencies.
1091 2011-11-04 Robert Dewar <dewar@adacore.com>
1093 * sprint.adb (Sprint_Node_Actual, case Qualified_Expression):
1094 Avoid junk semicolon after argument of machine code Asm operand.
1096 2011-11-04 Robert Dewar <dewar@adacore.com>
1098 * exp_ch11.adb (Generate_Push_Pop): Inhibit push/pop nodes in
1099 CodePeer mode or if restriction No_Exception_Handlers is present.
1100 * exp_ch6.adb (Expand_N_Subprogram_Body): (Inhibit push/pop
1101 nodes in CodePeer mode or if restriction No_Exception_Handlers
1104 2011-11-04 Robert Dewar <dewar@adacore.com>
1106 * s-tassta.adb, atree.ads, errout.adb, sinput.adb: Minor reformatting.
1108 2011-11-04 Ed Schonberg <schonberg@adacore.com>
1110 * sem_ch6.adb (Analyze_Subprogram_Specification): The
1111 specification is legal if it is a function that returns an
1112 abstract type, if it comes from an attribute renaming of a stream
1113 attribute of an abstract type.
1115 2011-11-04 Gary Dismukes <dismukes@adacore.com>
1117 * exp_util.adb (Is_Possibly_Unaligned_Object): In case of indexed
1118 components, check whether recursively check whether the prefix
1119 denotes an unaligned object.
1121 2011-11-04 Ed Schonberg <schonberg@adacore.com>
1123 * sem_prag.adb (Analyze_Pragma, case Debug): The argument of
1124 the pragma is legal if it is an expanded name that denotes a
1125 procedure that be can called without parameters.
1127 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
1129 * gnat_ugn.texi (Performance Considerations) <Vectorization
1130 of loops>: New sub-section. <Other Optimization Switches>:
1133 2011-11-04 Robert Dewar <dewar@adacore.com>
1135 * gnat_rm.texi: Minor reformatting.
1137 2011-11-04 Matthew Heaney <heaney@adacore.com>
1139 * a-convec.adb, a-coinve.adb, a-cobove.adb (Merge): Raise PE
1140 when Target and Source denote same non-empty object
1141 * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb (Merge): Ditto
1143 2011-11-04 Robert Dewar <dewar@adacore.com>
1145 * exp_attr.adb: Minor reformatting.
1147 2011-11-04 Ed Schonberg <schonberg@adacore.com>
1149 * exp_ch5.adb (Expand_Assign_Record): Do not generate a
1150 discriminant assignment within an initialization proc if the
1151 record is an unchecked union, as it can only come from the
1152 initialization of an unchecked union component.
1154 2011-11-04 Robert Dewar <dewar@adacore.com>
1156 * gnat_ugn.texi: Minor reformatting.
1158 2011-11-04 Robert Dewar <dewar@adacore.com>
1160 * par-labl.adb (Rewrite_As_Loop): Generate info msg rather than
1163 2011-11-04 Robert Dewar <dewar@adacore.com>
1165 * exp_ch4.adb: Minor code reorganization (remove junk obsolete
1168 2011-11-04 Hristian Kirtchev <kirtchev@adacore.com>
1170 * exp_alfa.adb: Add local constant
1171 Disable_Processing_Of_Renamings;
1172 (Expand_Alfa_N_Object_Renaming_Declaration): Disable
1173 the name evaluation of object renamings for now.
1174 (Expand_Potential_Renaming): Do not perform the substitution
1176 * exp_util.adb (Remove_Side_Effects): Remove processing for
1177 functions with side effects in Alfa mode.
1179 2011-11-04 Gary Dismukes <dismukes@adacore.com>
1181 * bindgen.adb (Gen_Elab_Calls): In the case
1182 of the AAMP target, set elaboration entities to 1 rather than
1185 2011-11-04 Ed Schonberg <schonberg@adacore.com>
1187 * sem_ch10.adb (Install_Limited_With_Unit): To establish the
1188 proper entities on the ancestors of a child unit that appear
1189 in a limited_with clause, follow the unit links because the
1190 units are not analyzed and scope information is incomplete.
1192 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
1194 * exp_ch4.adb (Expand_N_Selected_Component): Refine code
1195 setting the Atomic_Sync_Required flag to detect one more case.
1196 * exp_util.adb (Activate_Atomic_Synchronization): Refine code
1197 setting the Atomic_Sync_Required flag to exclude more cases,
1198 depending on the parent of the node to be examined.
1200 2011-11-04 Bob Duff <duff@adacore.com>
1202 * g-excact.adb: Minor: use named notation.
1204 2011-11-04 Ed Schonberg <schonberg@adacore.com>
1206 * sem_ch5.adb: Improve error messages for illegal iterators.
1208 2011-11-04 Hristian Kirtchev <kirtchev@adacore.com>
1210 * exp_alfa.adb: Add with and use clauses for Exp_Ch8 and
1212 (Expand_Alfa): Alphabetize cases on first choice. Add
1213 processing for object renaming declarations, identifiers and
1215 (Expand_Alfa_N_In): Remove useless return.
1216 (Expand_Alfa_N_Object_Renaming_Declaration): New routine.
1217 (Expand_Potential_Renaming): New routine.
1218 * exp_ch8.adb (Evaluate_Name): Moved to the top level.
1219 (Expand_N_Object_Declaration): Alphabetize local variables. Move
1220 Evaluate_Name out to the top level.
1221 * exp_ch8.ads (Evaluate_Name): Moved from body to package spec.
1222 * exp_util.adb (Remove_Side_Effects): Add processing for
1223 functions with side effects in Alfa mode.
1225 2011-11-04 Hristian Kirtchev <kirtchev@adacore.com>
1227 * gnat_rm.texi: Add entries for
1228 restrictions No_Relative_Delay, No_Requeue_Statements and
1229 No_Stream_Optimizations.
1231 2011-11-04 Ed Schonberg <schonberg@adacore.com>
1233 * sem_ch4.adb: Set type of entity in prefixed call, for
1234 completeness in a generic context.
1236 2011-11-04 Yannick Moy <moy@adacore.com>
1238 * sem_prag.adb: Minor refactoring (renaming of a parameter).
1240 2011-11-04 Robert Dewar <dewar@adacore.com>
1242 * atree.ads: Minor reformatting.
1244 2011-11-04 Robert Dewar <dewar@adacore.com>
1246 * checks.adb (Atomic_Synchronization_Disabled): Check -gnatd.d
1248 * exp_ch2.adb (Expand_Entity_Reference): Use
1249 Activate_Atomic_Synchronization
1250 * exp_ch4.adb (Expand_N_Explicit_Dereference): Use
1251 Activate_Atomic_Synchronization (Expand_N_Indexed_Compoonent):
1252 Activate_Atomic_Synchronization (Expand_N_Selected_Component):
1253 Use Activate_Atomic_Synchronization
1254 * exp_util.ads, exp_util.adb (Activate_Atomic_Synchronization): New
1256 * sinfo.ads, sinfo.adb (Atomic_Sync_Required): Can now apply to
1257 N_Selected_Component node
1259 2011-11-04 Robert Dewar <dewar@adacore.com>
1261 * sem_prag.adb, atree.ads, prj-env.adb, prj-env.ads: Minor reformatting.
1263 2011-11-04 Yannick Moy <moy@adacore.com>
1265 * atree.adb, atree.ads (Set_Original_Node): New set procedure.
1266 * sem_ch13.adb (Analyze_Aspect_Specifications/Pre_Post_Aspects):
1267 In ASIS mode, no splitting of aspects between conjuncts.
1268 (Analyze_Aspect_Specifications/Aspect_Test_Case): Make pragma
1269 expressions refer to the original aspect expressions through
1270 the Original_Node link. This is used in semantic analysis for
1271 ASIS mode, so that the original expression also gets analyzed.
1272 * sem_prag.adb (Preanalyze_TC_Args,
1273 Check_Precondition_Postcondition,
1274 Analyze_Pragma/Pragma_Test_Case): In ASIS mode, for a pragma
1275 generated from a source aspect, also analyze the original aspect
1277 (Check_Expr_Is_Static_Expression): New procedure
1278 similar to existing procedure Check_Arg_Is_Static_Expression,
1279 except called on expression inside pragma.
1281 2011-11-04 Tristan Gingold <gingold@adacore.com>
1283 * prj-env.adb, prj-env.ads (Find_Name_In_Path): New function, from
1284 Find_Project.Try_Path_Name.
1285 (Find_Project): Use Find_Name_In_Path to implement Try_Path_Name.
1287 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
1289 * s-atocou.ads (Atomic_Counter): Remove redundant pragma Volatile.
1291 2011-11-04 Pascal Obry <obry@adacore.com>
1293 * projects.texi: Add short description for qualifiers aggregate
1294 and aggregate library.
1296 2011-11-04 Matthew Heaney <heaney@adacore.com>
1298 * Makefile.rtl, impunit.adb: Added a-cogeso.ad[sb]
1299 * a-cgaaso.adb: Replaced implementation with instantiation
1301 * a-cogeso.ad[sb] This is the new Ada 2012 unit
1302 Ada.Containers.Generic_Sort
1304 2011-11-04 Robert Dewar <dewar@adacore.com>
1306 * exp_ch2.adb (Expand_Entity_Reference): Do not set
1307 Atomic_Sync_Required for the case of a prefix of an attribute.
1308 * exp_ch4.adb (Expand_N_Explicit_Dereference): May require
1309 atomic synchronization
1310 (Expand_N_Indexed_Component): Ditto.
1311 (Expand_B_Selected_Component): Ditto.
1312 * sem_prag.adb (Process_Suppress_Unsuppress):
1313 Disable/Enable_Atomic_Synchronization can now occur for array
1314 types with pragma Atomic_Components.
1315 * sinfo.ads, sinfo.adb (Atomic_Sync_Required): Can now occur on
1316 N_Explicit_Dereference nodes and on N_Indexed_Component nodes.
1318 2011-11-04 Gary Dismukes <dismukes@adacore.com>
1320 * gnat_ugn.texi: Editorial corrections for gnattest section.
1322 2011-11-04 Robert Dewar <dewar@adacore.com>
1324 * sem_prag.adb: Minor reformatting.
1325 * gnat_rm.texi: Update documentation for pragma Warnings (Off,
1327 * exp_ch2.adb (Expand_Entity_Reference): Only set
1328 Atomic_Sync_Required on entities that are variables. Doesn't
1329 make any sense on anything else.
1331 2011-11-04 Robert Dewar <dewar@adacore.com>
1333 * exp_ch2.adb (Expand_Entity_Reference): Extend handling of
1334 atomic sync to type case.
1335 * sem_prag.adb (Process_Suppress_Unsuppress): Atomic Sync can
1338 2011-11-04 Robert Dewar <dewar@adacore.com>
1340 * sem_warn.adb (Warn_On_Useless_Assignment): More accurate test
1342 * gcc-interface/Make-lang.in: Update dependencies.
1344 2011-11-04 Robert Dewar <dewar@adacore.com>
1346 * sem_prag.adb: Detect more cases of Long_Float inconsistencies at
1349 2011-11-04 Matthew Heaney <heaney@adacore.com>
1351 * Makefile.rtl, impunit.adb: Added a-sfecin.ads,
1352 * a-sfhcin.ads, a-sflcin.ads, a-sbecin.ad[sb], a-sbhcin.ad[sb],
1353 a-sblcin.ad[sb], a-suecin.ad[sb], a-suhcin.ad[sb], a-sulcin.ad[sb]
1354 * a-sfecin.ads, a-sfhcin.ads, a-sflcin.ads, a-sbecin.ad[sb],
1355 a-sbhcin.ad[sb], a-sblcin.ad[sb], a-suecin.ad[sb], a-suhcin.ad[sb],
1356 a-sulcin.ad[sb]: New files.
1358 2011-11-04 Geert Bosch <bosch@adacore.com>
1360 * i-forbla-unimplemented.ads, s-gecola.adb, s-gecola.ads,
1361 s-gerebl.adb, s-gerebl.ads, i-forbla.adb, i-forbla.ads,
1362 i-forlap.ads, i-forbla-darwin.adb, s-gecobl.adb, s-gecobl.ads,
1363 s-gerela.adb, s-gerela.ads: Remove partial interface to BLAS/LAPACK.
1364 * gcc-interface/Makefile.in: Remove libgnala and related objects.
1366 2011-11-04 Matthew Heaney <heaney@adacore.com>
1368 * a-cdlili.ad[sb], a-cidlli.ad[sb], a-coorse.ad[sb], a-ciorse.ad[sb],
1369 a-coorma.ad[sb], a-ciorma.ad[sb], a-coormu.ad[sb], a-ciormu.ad[sb],
1370 a-cohama.ad[sb], a-cihama.ad[sb], a-cohase.ad[sb], a-cihase.ad[sb],
1371 a-convec.ad[sb], a-coinve.ad[sb] (Assign, Copy): New operations
1374 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
1376 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Do not assert
1377 that the type of the parameters isn't dummy in type_annotate_only mode.
1379 2011-11-04 Robert Dewar <dewar@adacore.com>
1381 * sem_ch12.adb: Minor reformatting
1383 2011-11-04 Gary Dismukes <dismukes@adacore.com>
1385 * bindgen.adb (Gen_Elab_Calls): In the case of the AAMP target,
1386 initialize elaboration entities to zero when specs are processed.
1388 2011-10-28 Iain Sandoe <iains@gcc.gnu.org>
1389 Eric Botcazou <ebotcazou@adacore.com>
1392 * init.c (__gnat_error_handler) [Darwin]: Apply a work-around to the
1393 bug filed as radar #10302855 (inconsistent unwind data for sigtramp).
1395 2011-10-28 Eric Botcazou <ebotcazou@adacore.com>
1398 * gcc-interface/Makefile.in (SYMDEPS): Delete.
1399 (LIBICONV): New variable.
1400 (LIBICONV_DEP): Likewise.
1401 (LIBS): Add $(LIBICONV).
1402 (LIBDEPS): Add $(LIBICONV_DEP).
1403 (EXTRA_GNATTOOLS_OBJS): Merge into...
1404 (TOOLS_LIBS): ...this. Add $(LIBICONV).
1406 2011-10-26 Eric Botcazou <ebotcazou@adacore.com>
1408 * gcc-interface/decl.c (elaborate_expression_1): Add EXPR_PUBLIC_P local
1409 variable. Always create the elaboration variable, if any, as constant.
1411 2011-10-26 Eric Botcazou <ebotcazou@adacore.com>
1413 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Try to
1414 make a packable type for fields of union types as well.
1415 <is_type>: Use RECORD_OR_UNION_TYPE_P predicate.
1416 (gnat_to_gnu_component_type): Try to make a packable type for fields
1417 of union types as well.
1418 (make_packable_type): Use RECORD_OR_UNION_TYPE_P predicate.
1419 (maybe_pad_type): Try to make a packable type for fields of union types
1421 (gnat_to_gnu_field): Likewise.
1422 (is_variable_size): Use RECORD_OR_UNION_TYPE_P predicate.
1423 (set_rm_size): Likewise.
1424 (rm_size): Likewise.
1425 * gcc-interface/misc.c (gnat_type_max_size): Likewise.
1426 * gcc-interface/trans.c (add_decl_expr): Likewise.
1427 * gcc-interface/utils.c (finish_record_type): Likewise.
1428 * gcc-interface/utils2.c (build_simple_component_ref): Likewise.
1430 2011-10-26 Eric Botcazou <ebotcazou@adacore.com>
1432 * gcc-interface/decl.c (gnat_to_gnu_field): Always check components
1433 declared as atomic. Move around conditionally executed code.
1435 2011-10-24 Robert Dewar <dewar@adacore.com>
1437 * sem.adb (Initialize): Fix bug that blew up if called a second time.
1439 2011-10-24 Robert Dewar <dewar@adacore.com>
1441 * tb-alvxw.c, tracebak.c, expect.c, initflt.c, tb-alvms.c,
1442 tb-ivms.c, tb-gcc.c: Update headers to GPL 3.
1444 2011-10-24 Robert Dewar <dewar@adacore.com>
1446 * sem_prag.adb (Analyze_Pragma, case Debug): Give proper pragma
1449 2011-10-24 Hristian Kirtchev <kirtchev@adacore.com>
1451 * gnat_rm.texi: Add an entry for restriction No_Finalization.
1453 2011-10-24 Ed Schonberg <schonberg@adacore.com>
1455 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): If the
1456 current instance is within the one that contains the generic,
1457 the freeze node for the current one must appear in the current
1458 declarative part. Ditto if the current instance is within another
1459 package instance. In both of these cases the freeze node of the
1460 previous instance is not relevant.
1462 2011-10-24 Gary Dismukes <dismukes@adacore.com>
1464 * switch-m.adb (Normalize_Compiler_Switches): Add recognition
1465 of AAMP-specific switches -univ and -aamp_target.
1467 2011-10-24 Robert Dewar <dewar@adacore.com>
1469 * a-tienau.adb (Put): Deal properly with limited line length.
1471 2011-10-24 Robert Dewar <dewar@adacore.com>
1473 * sem_warn.adb, sem_ch12.adb: Minor reformatting.
1475 2011-10-24 Tristan Gingold <gingold@adacore.com>
1477 * gcc-interface/Makefile.in: Use GNU ld switches to generate map files
1480 2011-10-24 Ed Schonberg <schonberg@adacore.com>
1482 * sem_ch12.adb (Earlier): make available globally. If both
1483 nodes have the same sloc, the freeze node that does not come
1484 from source is the later one.
1485 (True_Parent): Make available globally.
1486 (Previous_Instance): Subsidiary of
1487 Insert_Freeze_Node_For_Instance, to check whether the generic
1488 parent of the current instance is declared within a previous
1489 instance in the same unit or declarative part, in which case the
1490 freeze nodes of both instances must appear in order to prevent
1491 elaboration problems in gigi.
1492 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): A stub is a
1493 freeze point, and the freeze node of a preceding instantiation
1494 must be inserted before it.
1496 2011-10-24 Robert Dewar <dewar@adacore.com>
1498 * checks.ads, checks.adb: Add handling of Synchronization_Check
1499 * debug.adb: Add doc for -gnatd.d and -gnatd.e (disable/enable
1501 * exp_ch2.adb (Expand_Entity_Reference): Set Atomic_Sync_Required
1502 flag Minor code reorganization.
1503 * opt.ads (Warn_On_Atomic_Synchronization): New switch.
1504 * par-prag.adb: Add dummy entries for pragma
1505 Disable/Enable_Atomic_Synchronization.
1506 * sem_prag.adb (Process_Suppress_Unsuppress): Handle
1507 case of Atomic_Synchronization specially (not suppressed
1508 by All_Checks, cannot be set from Source).
1509 (Pragma Disable/Enable_Atomic_Synchronization): Add processing.
1510 * sinfo.ads, sinfo.adb: Add Atomic_Sync_Required flag
1511 * snames.ads-tmpl: Add entry for Atomic_Synchronization Add
1512 entry for pragma Disable/Enable_Atomic_Synchronization
1513 * switch-c.adb: The -gnatp switch does not disable
1514 Atomic_Synchronization Add -gnatep switch to disable
1515 Atomic_Synchronization.
1516 * types.ads: Add entry for Synchronization_Check
1517 * usage.adb: Add line for -gnated switch
1518 * warnsw.adb: Settings for Warn_On_Atomic_Synchronization
1520 2011-10-24 Geert Bosch <bosch@adacore.com>
1522 * s-gearop.adb (Back_Substitute): Avoid overflow if matrix bounds start
1525 2011-10-24 Robert Dewar <dewar@adacore.com>
1527 * sem_ch12.adb, s-gearop.adb: Minor reformatting.
1529 2011-10-24 Robert Dewar <dewar@adacore.com>
1531 * warnsw.adb: Add some missing warnings to Set_GNAT_Mode_Warnings.
1532 * warnsw.ads: Add comments to Set_GNAT_Mode_Warnings.
1534 2011-10-24 Emmanuel Briot <briot@adacore.com>
1536 * prj-proc.adb (Process_Expression_Variable_Decl): No special
1537 handling for Project_Path unless it is an attribute.
1539 2011-10-24 Javier Miranda <miranda@adacore.com>
1541 * sem_ch12.adb (Check_Hidden_Primitives): New subprogram.
1542 (Install_Hidden_Primitives): New subprogram.
1543 (Restore_Hidden_Primitives): New subprogram.
1544 (Analyze_Formal_Package_Declaration,
1545 Analyze_Package_Instantiation, Analyze_Subprogram_Instantiation):
1546 Invoke Check_Hidden_Primitives after every call to
1547 Analyze_Associations, and invoke Restore_Hidden_Primitives to
1548 restore their visibility after processing the instantiation.
1549 (Instantiate_Package_Body): Install visible primitives before
1550 analyzing the instantiation and uninstall them to restore their
1551 visibility when the instantiation has been analyzed.
1552 * sem_util.ads, sem_util.adb (Add_Suffix): New subprogram
1553 (Remove_Suffix): New subprogram
1554 * sem_ch3.adb (Derive_Subprogram): When handling
1555 a derived subprogram for the instantiation of a formal derived
1556 tagged type, inherit the dispatching attributes from the actual
1557 subprogram (not from the parent type).
1559 2011-10-24 Vasiliy Fofanov <fofanov@adacore.com>
1561 * gnat_ugn.texi: Document explicit use of XDECGNAT library.
1563 2011-10-24 Hristian Kirtchev <kirtchev@adacore.com>
1565 * exp_ch3.adb (Build_Assignment): Add local constant N_Loc and
1567 (Build_Discriminant_Assignments): Add local variable D_Loc and update
1569 (Build_Init_Statements): Add local variables Comp_Loc, Decl_Loc and
1570 Var_Loc and update their uses.
1571 (Build_Record_Init_Proc): Code reformatting.
1572 (Increment_Counter): Add formal parameter Loc.
1573 (Make_Counter): Add formal parameter Loc.
1575 2011-10-24 Eric Botcazou <ebotcazou@adacore.com>
1577 * sem_disp.adb (Covers_Some_Interface): Fix typo.
1579 2011-10-24 Matthew Heaney <heaney@adacore.com>
1581 * a-cuprqu.adb, a-cbprqu.adb (Dequeue_Only_High_Priority): Fix sense
1584 2011-10-24 Yannick Moy <moy@adacore.com>
1586 * sem_ch13.adb (Analyze_Aspect_Specifications/Aspect_Test_Case):
1587 Translate arguments in positional notation into pragma argument
1588 association arguments for the generated pragma.
1590 2011-10-24 Arnaud Charlet <charlet@adacore.com>
1592 * exp_ch5.adb: Fix minor typo.
1594 2011-10-24 Ed Schonberg <schonberg@adacore.com>
1596 * sem_ch3.adb (Is_Visible_Component): Refine predicate for
1597 the case of a component reference in an instance body, when the
1598 enclosing type is private.
1600 2011-10-24 Sergey Rybin <rybin@adacore.com frybin>
1602 * gnat_ugn.texi: For gnatelim, move the note about using the GNAT
1603 driver for getting the project support into gnatelim section.
1605 2011-10-24 Robert Dewar <dewar@adacore.com>
1607 * gnat_rm.texi: Minor correction to documentation on address clause.
1609 2011-10-24 Hristian Kirtchev <kirtchev@adacore.com>
1611 * s-finmas.adb (Attach): Synchronize and call the unprotected version.
1612 (Attach_Unprotected): New routine.
1613 (Delete_Finalize_Address): Removed.
1614 (Delete_Finalize_Address_Unprotected): New routine.
1615 (Detach): Synchronize and call the unprotected version.
1616 (Detach_Unprotected): Remove locking.
1617 (Finalize): Add various comment on synchronization. Lock the critical
1618 region and call the unprotected versions of routines.
1619 (Finalize_Address): Removed.
1620 (Finalize_Address_Unprotected): New routine.
1621 (Set_Finalize_Address): Synchronize and call
1622 the unprotected version.
1623 (Set_Finalize_Address_Unprotected): New routine.
1624 (Set_Heterogeneous_Finalize_Address): Removed.
1625 (Set_Heterogeneous_Finalize_Address_Unprotected): New routine.
1626 (Set_Is_Heterogeneous): Add comment on synchronization and
1628 * s-finmas.ads: Flag Finalization_Started is no longer atomic
1629 because synchronization uses task locking / unlocking.
1630 (Attach): Add comment on usage.
1631 (Attach_Unprotected): New routine.
1632 (Delete_Finalize_Address): Renamed to
1633 Delete_Finalize_Address_Unprotected.
1634 (Detach): Add comment on usage.
1635 (Detach_Unprotected): New routine.
1636 (Finalize_Address): Renamed to Finalize_Address_Unprotected.
1637 (Set_Finalize_Address): Add comment on usage.
1638 (Set_Finalize_Address_Unprotected): New routine.
1639 (Set_Heterogeneous_Finalize_Address): Renamed to
1640 Set_Heterogeneous_Finalize_Address_Unprotected.
1641 * s-stposu.adb (Allocate_Any_Controlled): Add local variable
1642 Allocation_Locked. Add various comments on synchronization. Lock
1643 the critical region and call the unprotected version of
1645 (Deallocate_Any_Controlled): Add various comments on
1646 synchronization. Lock the critical region and call the unprotected
1647 version of routines.
1649 2011-10-24 Ed Schonberg <schonberg@adacore.com>
1651 * sem_ch3.adb (Set_Fixed_Range): The bounds of a fixed point type
1652 are universal and must carry the corresponding type.
1653 * sem_eval.adb (Check_Non_Static_Context): If the type of the
1654 expression is universal real, as may be the case for a fixed point
1655 expression with constant operands in the context of a conversion,
1656 there is nothing to check.
1657 * s-finmas.adb: Minor reformatting
1659 2011-10-23 Eric Botcazou <ebotcazou@adacore.com>
1661 * gcc-interface/decl.c (create_concat_name): Add explicit cast.
1663 2011-10-20 Eric Botcazou <ebotcazou@adacore.com>
1665 * gcc-interface/Make-lang.in (GNATLIBFLAGS, GNATLIBCFLAGS, THREAD_KIND,
1666 TRACE): Reintroduce.
1667 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o,
1668 ada/initialize.o, ada/raise.o): Reintroduce explicit compilation rules.
1670 2011-10-20 Eric Botcazou <ebotcazou@adacore.com>
1672 * gcc-interface/trans.c (lhs_or_actual_p): New predicate.
1673 (unchecked_conversion_nop): Use it.
1674 (gnat_to_gnu): Likewise.
1676 2011-10-20 Eric Botcazou <ebotcazou@adacore.com>
1678 * back_end.adb (Call_Back_End): Pass the maximum logical line number
1679 instead of the maximum physical line number to gigi.
1680 * gcc-interface/trans.c (Sloc_to_locus): Cope with line zero.
1682 2011-10-16 Tom Tromey <tromey@redhat.com>
1683 Dodji Seketeli <dodji@redhat.com>
1685 * gcc-interface/trans.c (gigi, Sloc_to_locus): Adjust to use the new
1686 public ordinary map interface.
1688 2011-10-16 Tristan Gingold <gingold@adacore.com>
1690 * link.c (_AIX): Add support for GNU ld.
1692 2011-10-16 Fedor Rybin <frybin@adacore.com>
1694 * gnat_ugn.texi: Fixing gnattest example names in the doc.
1695 Adding explanation to additional tests usage.
1697 2011-10-16 Robert Dewar <dewar@adacore.com>
1699 * exp_ch6.adb, sem_ch6.adb: Minor reformatting.
1701 2011-10-16 Eric Botcazou <ebotcazou@adacore.com>
1703 * a-convec.adb: Fix minor inconsistencies.
1705 2011-10-16 Matthew Heaney <heaney@adacore.com>
1707 * a-cusyqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cbprqu.ads (package
1708 Implementation): Specify pragma Implementation_Defined.
1710 2011-10-15 Nicolas Roche <roche@adacore.com>
1712 * gcc-interface/lang-specs.h: Ensure -mrtp switch is passed when using
1713 either rtp-smp or ravenscar-cert-rtp runtimes.
1715 2011-10-15 Bob Duff <duff@adacore.com>
1717 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call):
1718 Do not create a pool formal on unless RE_Root_Storage_Pool_Ptr
1720 (Expand_N_Extended_Return_Statement): Do not create a renaming of the
1721 build-in-place pool parameter unless RE_Root_Storage_Pool_Ptr is
1723 (Make_Build_In_Place_Call_In_Allocator): Add the user-defined
1724 pool only if RE_Root_Storage_Pool_Ptr is available.
1725 (Make_Build_In_Place_Call_In_Object_Declaration): Do not add a
1726 pool actual unless RE_Root_Storage_Pool_Ptr is available.
1727 * sem_ch6.adb (Create_Extra_Formals): Add build-in-place pool
1728 formal only if RE_Root_Storage_Pool_Ptr is available.
1730 2011-10-15 Matthew Heaney <heaney@adacore.com>
1732 * a-cusyqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cbprqu.ads (Queue
1733 type): Specify Priority aspect for protected type.
1735 2011-10-14 Ed Schonberg <schonberg@adacore.com>
1737 * exp_disp.adb (Check_Premature_Freezing): If an untagged type
1738 is a generic actual, it is a subtype of a type that was frozen
1739 by the instantiation, and even if not marked frozen it does not
1740 affect the construction of the dispatch table.
1742 2011-10-14 Robert Dewar <dewar@adacore.com>
1744 * make.adb, mlib-utl.adb, sem_util.adb, sem_ch4.adb: Minor code
1746 * s-rident.ads: Add missing Compiler_Unit pragma.
1748 2011-10-14 Gary Dismukes <dismukes@adacore.com>
1750 * sem_res.adb: Minor reformatting.
1752 2011-10-14 Hristian Kirtchev <kirtchev@adacore.com>
1754 * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call):
1755 Code and comment reformatting. Use BIP_Task_Master
1756 when creating a _master.
1757 (BIP_Formal_Suffix): Code reformatting. Correct the case for
1759 (Make_Build_In_Place_Call_In_Object_Declaration): Use
1760 BIP_Task_Master when creating a reference to the enclosing
1761 function's _master formal.
1762 (Move_Activation_Chain): Use BIP_Task_Master when creating a reference
1764 * exp_ch6.ads: Change BIP_Master to BIP_Task_Master.
1765 (Needs_BIP_Finalization_Master): Alphabetized.
1766 * sem_ch6.adb (Create_Extra_Formals): Update the usage of
1769 2011-10-14 Ed Schonberg <schonberg@adacore.com>
1771 * par-ch6.adb (P_Return_Object_Declaration): In Ada 2012 mode,
1772 reject an aliased keyword on the object declaration of an extended
1773 return statement. In older versions of the language indicate
1774 that this is illegal in the standard.
1776 2011-10-14 Pascal Obry <obry@adacore.com>
1778 * sem_util.adb, sem_ch4.adb: Minor reformatting.
1780 2011-10-14 Ed Schonberg <schonberg@adacore.com>
1782 * sem_ch13.adb: Recognize properly procedure calls that are
1783 transformed into code statements.
1785 2011-10-14 Vincent Celier <celier@adacore.com>
1787 * projects.texi: Minor fix in project example.
1789 2011-10-14 Ed Schonberg <schonberg@adacore.com>
1791 * sem_util.adb: Return objects are aliased if their type is
1792 immutably limited as per AI05-0053.
1794 2011-10-14 Gary Dismukes <dismukes@adacore.com>
1796 * exp_ch4.adb (Expand_N_Op_And): Remove Short_Circuit_And_Or
1797 expansion code (moved to sem_res) (Expand_N_Op_Or): Remove
1798 Short_Circuit_And_Or expansion code (moved to sem_res).
1799 * sem_res.adb (Resolve_Logical_Op): Add code to rewrite Boolean
1800 "and" and "or" operators as short-circuit "and then" and "or
1801 else", when pragma Short_Circuit_And_Or is active.
1803 2011-10-13 Robert Dewar <dewar@adacore.com>
1805 * sem_ch9.adb, sem_util.adb, sem_util.ads, exp_ch6.adb, sem_ch4.adb,
1806 sem_ch6.adb, exp_ch3.adb: Minor reformatting.
1808 2011-10-13 Arnaud Charlet <charlet@adacore.com>
1810 * Makefile.rtl (GNATRTL_NONTASKING_OBJS): Add a-ngcoar.o.
1812 2011-10-13 Jerome Guitton <guitton@adacore.com>
1814 * sysdep.c (__gnat_get_task_options): Re-enable VX_SPE_TASK on vThreads
1816 2011-10-13 Eric Botcazou <ebotcazou@adacore.com>
1818 * a-convec.ads (Cursor): Minor reformatting.
1819 * a-convec.adb (Next): Fix minor inconsistencies.
1820 (Previous): Likewise.
1822 2011-10-13 Ed Schonberg <schonberg@adacore.com>
1824 * sem_util.ads, sem_util.adb (Available_Full_View_Of_Component):
1825 New predicate to determine whether some operations on an array
1826 type are available when the full view of its component may differ
1827 from the view of the point of the array declaration.
1828 * sem_ch4.adb (Find_Equality_Types): Use
1829 Available_Full_View_Of_Component.
1830 * sem_type.adb (Valid_Boolean_Arg, Valid_Comparison_Arg): Ditto
1832 2011-10-13 Ed Schonberg <schonberg@adacore.com>
1834 * sem_ch9.adb: Analyze aspects while discriminants of protected
1837 2011-10-13 Geert Bosch <bosch@adacore.com>
1839 * Makefile.rtl (GNATRTL_TASKING_OBJECTS): Add
1840 a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o, as these no
1841 longer depend on an external library.
1842 * gcc-interface/Makefile.in (GNATRTL_LINEARALGEBRA_OBJS): Remove
1843 a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o.
1844 Update dependencies.
1845 * gcc-interface/Make-lang.in: Update dependencies.
1847 2011-10-13 Cyrille Comar <comar@adacore.com>
1849 * gnat_ugn.texi: Minor editing.
1851 2011-10-13 Vincent Celier <celier@adacore.com>
1853 * projects.texi: Add documentation on packages and attributes
1854 that are inherited from a project being extended into the
1857 2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
1859 * exp_ch3.adb (Build_Master): Rewritten.
1860 (Expand_N_Full_Type_Declaration): Reformat the declarative
1861 region. Update the call to Build_Master_Renaming.
1862 (Expand_Previous_Access_Type): Rewritten.
1863 * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call):
1864 Add local constant Result_Subt and update related usage.
1865 (Expand_N_Extended_Return_Statement): Add local constant
1866 Result_Subt and update related usage.
1867 * exp_ch9.adb (Build_Activation_Chain): Rewritten to use the
1868 new context detection mechanism.
1869 (Build_Class_Wide_Master):
1870 Use Insert_Action to add the renaming into the tree.
1871 (Build_Master_Entity): Rewritten to use the new context detection
1873 (Build_Master_Renaming): Add formal parameter Ins_Nod
1874 and related usage. Use Insert_Action to add the renaming into the
1876 (Find_Enclosing_Context): New subsidiary routine. Rather
1877 than relying on enclosing scopes, this routine looks at the
1878 tree structure to figure out the proper context for a _master
1879 or a _chain. This approach eliminates the issues with transient
1880 scopes which have not been converted into blocks.
1881 * exp_ch9.ads (Build_Master_Entity): Change parameter profile
1882 to better reflect the new usage. Update the related comment.
1883 (Build_Master_Renaming): Add formal parameter Ins_Nod. Update
1884 the comment on usage.
1885 * sem_ch3.adb (Access_Definition): Update the calls to
1886 Build_Master_Entity and Build_Master_Renaming.
1887 * sem_ch6.adb (Create_Extra_Formals): Add local variable
1888 Full_Subt. Code reformatting.
1889 * sem_util.adb (Is_Iterator): Alphabetized.
1890 (Is_LHS): Alphabetized.
1891 (Is_Limited_Class_Wide_Type): New routine.
1892 * sem_util.ads (Is_Limited_Class_Wide_Type): New routine.
1894 2011-10-13 Geert Bosch <bosch@adacore.com>
1896 * a-ngrear.adb (Solve): Make generic and move to
1897 System.Generic_Array_Operations.
1898 * s-gearop.ads (Matrix_Vector_Solution, Matrix_Matrix_Solution):
1899 New generic solvers to compute a vector resp. matrix Y such
1900 that A * Y = X, approximately.
1901 * s-gearop.adb (Matrix_Vector_Solution, Matrix_Matrix_Solution):
1902 Implement using Forward_Eliminate and Back_Substitute
1903 * a-ngcoar.adb: Reimplement in pure Ada to remove dependencies
1905 * a-ngcoar.ads ("abs"): Fix return type to be real.
1907 2011-10-13 Eric Botcazou <ebotcazou@adacore.com>
1910 * s-linux-alpha.ads: Do not "with" Interfaces.C.
1911 * s-linux-sparc.ads: Likewise.
1913 2011-10-13 Geert Bosch <bosch@adacore.com>
1915 * s-gearop.ads (Forward_Eliminate): Add "abs" formal function
1917 * s-gearop.adb (Forward_Eliminate): Remove local "abs" function
1919 * a-ngrear.adb (Forward_Eliminate): Adjust instantiation for
1922 2011-10-13 Geert Bosch <bosch@adacore.com>
1924 * a-ngrear.adb, s-gearop.adb, s-gearop.ads (Sqrt): Make generic and
1925 move to System.Generic_Array_Operations.
1927 2011-10-13 Geert Bosch <bosch@adacore.com>
1929 * a-ngrear.adb ("abs"): Adjust for modified L2_Norm generic
1930 * s-gearop.ads (L2_Norm): Change profile to be suitable for
1932 * s-gearop.adb (L2_Norm): Reimplement using direct definition,
1935 2011-10-13 Robert Dewar <dewar@adacore.com>
1937 * exp_ch5.adb, sem_ch3.adb, impunit.adb, impunit.ads, sem_type.adb,
1938 prj-proc.adb, exp_ch9.adb, s-regpat.adb, sem_ch10.adb, sem_prag.adb,
1939 sem_ch12.adb, freeze.adb, sem_attr.adb, sem_attr.ads, gnatlink.adb,
1940 par-ch6.adb, exp_ch6.adb, sem_ch4.adb, sem_ch6.adb, sem_ch8.adb,
1941 par-util.adb, sem_ch13.adb, lib-xref.adb, g-trasym.adb, g-trasym.ads,
1942 exp_aggr.adb, s-taprop-posix.adb: Minor reformatting.
1944 2011-10-13 Geert Bosch <bosch@adacore.com>
1946 * s-gearop.adb: Minor comment additions.
1948 2011-10-13 Fedor Rybin <frybin@adacore.com>
1950 * gnat_ugn.texi: Add gnattest section.
1952 2011-10-13 Ed Schonberg <schonberg@adacore.com>
1954 * freeze.adb: Do not create body of renaming if declaration has
1957 2011-10-13 Olivier Hainque <hainque@adacore.com>
1959 * init.c (__gnat_error_handler - vxworks case): Restrict sigtramp calls
1960 further, to the ppc+kernel case only.
1962 2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
1964 * exp_ch4.adb (Expand_N_Allocator): Comment reformatting.
1965 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call):
1966 Do not create a pool formal on .NET/JVM.
1967 (Expand_N_Extended_Return_Statement): Alphabetize local
1968 variables. Do not create a renaming of the build-in-place pool
1969 parameter on .NET/JVM. (Make_Build_In_Place_Call_In_Allocator):
1970 Add the user-defined pool only on non-VM targets.
1971 (Make_Build_In_Place_Call_In_Object_Declaration): Alphabetize
1972 local variables. Do not add a pool actual on .NET/JVM.
1973 * sem_ch6.adb: Add with and use clause for Targparm.
1974 (Create_Extra_Formals): Add build-in-place pool formal only on
1976 * rtsfind.ads: Alphabetize entries.
1978 2011-10-13 Sergey Rybin <rybin@adacore.com>
1980 * gnat_ugn.texi: Minor correction.
1982 2011-10-13 Ed Schonberg <schonberg@adacore.com>
1984 * sem_ch8.adb: Minor error message improvement.
1986 2011-10-13 Robert Dewar <dewar@adacore.com>
1988 * a-cbprqu.adb, a-ciorma.adb, exp_ch3.adb: Minor reformatting.
1990 2011-10-13 Gary Dismukes <dismukes@adacore.com>
1992 * exp_ch5.adb (Expand_N_Loop_Statement): For the transformation
1993 of a for loop for an enumeration type with an enumeration rep
1994 clause, which involves moving the original loop parameter into
1995 a nested block, the loop parameter's entity must be removed from
1996 the entity list of the loop scope.
1998 2011-10-13 Bob Duff <duff@adacore.com>
2000 * exp_ch6.ads (BIP_Storage_Pool): New "extra implicit parameter"
2001 that gets passed in the same cases where BIP_Alloc_Form is passed
2002 (caller-unknown-size results). BIP_Storage_Pool is used when
2003 BIP_Alloc_Form = User_Storage_Pool. In that case, a pointer
2004 to the user-defined storage pool is passed at the call site,
2005 and this pool is used in callee to allocate the result.
2006 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call): New
2007 version of Add_Alloc_Form_Actual_To_Build_In_Place_Call. Passes
2008 the additional BIP_Storage_Pool actual.
2009 (Expand_N_Extended_Return_Statement): Allocate the function
2010 result using the user-defined storage pool, if BIP_Alloc_Form =
2012 * sem_ch6.adb: Add the "extra formal" for BIP_Storage_Pool.
2013 * exp_ch4.adb: Don't overwrite storage pool set by
2014 Expand_N_Extended_Return_Statement.
2015 * s-stopoo.ads, rtsfind.ads (Root_Storage_Pool_Ptr): New type,
2016 for use in build-in-place function calls within allocators
2017 where the access type has a user-defined storage pool.
2019 2011-10-13 Sergey Rybin <rybin@adacore.com>
2021 * gnat_ugn.texi, vms_data.ads: Add an option to control enumeration
2024 2011-10-13 Nicolas Roche <roche@adacore.com>
2026 * gnatlink.adb: Ensure that -mrtp is passed when runtime name ends
2029 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2031 * sem_prag.adb (Analyze_Pragma, case Unchecked_Union): Take into
2032 account that an unchecked union type can be limited.
2034 2011-10-13 Olivier Hainque <hainque@adacore.com>
2036 * init.c (__gnat_error_handler) <VxWorks version>: Add comments on
2037 the use of the signal trampoline for PPC in the sjlj case as well.
2038 Add legitimate casts, preventing compile time warnings on the
2039 (sighandler *) profile.
2041 2011-10-13 Yannick Moy <moy@adacore.com>
2043 * sem_aggr.adb (Resolve_Aggr_Expr): Always perform semantic analysis
2046 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2048 * sem_ch3.adb (OK_For_Limited_Init_In_05): Conditional and case
2049 expressions are legal limited return values if each one of their
2050 dependent expressions are legal.
2052 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2054 * sem_ch6.adb (Analyze_Procedure_Call_Statement): In Ada 2012 mode,
2055 if the prefix of the call is a qualified expression, rewrite as
2057 * sem_ch13.adb (Analyze_Code_Statement): In Ada 2012 mode, the
2058 code statement is legal if it is a rewriting of a procedure call.
2060 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2062 * exp_aggr.adb (Flatten): If a component association has a box,
2063 assume that aggregate is not static.
2064 (Safe_Aggregate): If a component association in a non-limited
2065 aggregate has a box, assume that it cannot be expanded in place.
2067 2011-10-13 Vincent Celier <celier@adacore.com>
2069 * prj-conf.adb (Get_Or_Create_Configuration_File): Call
2070 Process_Project_Tree_Phase_1 with Packages_To_Check.
2071 (Process_Project_And_Apply_Config): Ditto
2072 * prj-part.ads, prj-part.adb, prj-pars.ads, prj-pars.adb (Parse):
2073 Remove default for argument Packages_To_Check.
2074 * prj-proc.adb (Recursive_Process): New argument
2077 (Process_Project_Tree_Phase_1): Ditto.
2078 (Recursive_Project.Process_Aggregated_Projects): Call
2079 Prj.Part.Parse and Process_Project_Tree_Phase_1 with
2081 * prj-proc.ads (Process): New argument Packages_To_Check
2082 (Process_Project_Tree_Phase_1): Ditto
2084 2011-10-13 Arnaud Charlet <charlet@adacore.com>
2086 * gcc-interface/Makefile.in: Fix typo.
2088 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2090 * sem_ch12.adb (Analyze_Formal_{Floating_Type,
2091 Signed_Integer_Type, Decimal_Fixed_Point_Type, Discrete_Type}):
2092 Use sloc of defining identifier of farmal type declaration,
2093 as sloc of generated internal entity, to prevent misplaced
2096 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2098 * sem_intr.adb (Check_Intrinsic_Operator): Check that type
2099 is fully defined before checking that it is a numeric type.
2101 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2103 * sem_aggr.adb (Resolve_Record_Aggregate): If a component
2104 association for component X has a box, then X is covered in the
2105 aggregate even if there is not default value for X in the type
2106 declaration, and X has to be default-initialized.
2108 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2110 * sem_attr.adb (Check_Enum_Image, Analyze_Attribute case 'Value): Mark
2111 literals as referenced only if reference is in current source unit.
2113 2011-10-13 Matthew Heaney <heaney@adacore.com>
2115 * a-csquin.ads (Enque, Dequeue): Mark interface operations as entries.
2117 2011-10-13 Olivier Hainque <hainque@adacore.com>
2119 * sigtramp.h: New file. Prototype and spec of the signal
2120 trampoline to be called by an established handler to provide
2121 dwarf call frame info before the real signal processing code.
2122 * sigtramp-ppcvxw.c: New file. Implementation of the signal
2123 trampoline for ppc-vxworks.
2124 * init.c (vxworks section): Use it for ppc.
2126 2011-10-13 Thomas Quinot <quinot@adacore.com>
2128 * par-ch2.adb, par.adb, par-util.adb, par-ch3.adb
2129 (Check_Future_Identifier): New subprogram,
2130 factors duplicated code from Par.Ch2.P_Identifier and
2131 Par.Ch3.P_Defining_Identifier.
2133 2011-10-13 Thomas Quinot <quinot@adacore.com>
2135 * s-taprop-posix.adb (Initialize): Always raise Storage_Error
2136 if we fail to initialize CV attributes or CV.
2138 2011-10-13 Thomas Quinot <quinot@adacore.com>
2140 * s-tasren.adb (Timed_Selective_Wait, case
2141 Accept_Alternative_Selected): Use Defer_Abort_Nestable, since
2142 we know abortion is already deferred.
2144 2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
2146 * exp_ch3.adb (Build_Class_Wide_Master): Moved to exp_ch9.
2147 (Build_Master_Renaming (function)): Removed.
2148 (Build_Master_Renaming (procedure)): Moved to exp_ch9.
2149 (Expand_Full_Type_Declaration): Alphabetize
2150 variables. Reformatting of code and comments. Rewrite the
2151 section on processing of anonymous access-to-task types in
2153 * exp_ch3.ads (Build_Class_Wide_Master): Moved to exp_ch9.
2154 (Build_Master_Renaming): Moved to exp_ch9.
2155 * exp_ch9.adb (Build_Class_Wide_Master): Moved from exp_ch3.
2156 (Build_Master_Entity): Add formal parameter
2157 Use_Current. Reformatting of code and comments.
2158 (Build_Master_Renaming): Moved from exp_ch3.
2159 * exp_ch9.ads (Build_Class_Wide_Master): Moved from
2160 exp_ch3. Update comment on usage.
2161 (Build_Master_Entity):
2162 Add formal parameter Use_Current. Update comment on usage.
2163 (Build_Master_Renaming): Moved from exp_ch3.
2164 * sem_ch3.adb (Access_Definition): Remove redundant code to
2165 create a _master and a renaming.
2167 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2169 * lib-xref.adb: Do no emit reference to overridden operation,
2170 if it is internally generated.
2172 2011-10-13 Vincent Celier <celier@adacore.com>
2174 * bindgen.adb: Remove any processing related to g-trasym
2175 * Makefile.rtl: Add g-trasym.o to GNATRTL_NONTASKING_OBJS
2176 * mlib-prj.adb: Remove any processing related to g-trasym.
2178 2011-10-12 Eric Botcazou <ebotcazou@adacore.com>
2180 * sem_util.adb (Denotes_Same_Prefix): Fix fatal warning.
2181 * gcc-interface/Make-lang.in (WARN_ADAFLAGS): New.
2182 (ALL_ADAFLAGS): Include WARN_ADAFLAGS.
2183 (ADA_FLAGS_TO_PASS): Likewise.
2184 (COMMON_FLAGS_TO_PASS): New.
2185 (ADA_TOOLS_FLAGS_TO_PASS): Use COMMON_FLAGS_TO_PASS. In the regular
2186 native case, also use FLAGS_TO_PASS and ADA_FLAGS_TO_PASS.
2187 (gnatlib): Use COMMON_FLAGS_TO_PASS.
2188 (ada.install-common): Likewise.
2189 (install-gnatlib): Likewise.
2190 (install-gnatlib-obj): Likewise.
2191 (gnattools): Use ADA_TOOLS_FLAGS_TO_PASS for gnattools1 as well.
2192 (gnat-cross): Delete.
2193 (gnatboot): Likewise.
2194 (gnatboot2): Likewise.
2195 (gnatboot3): Likewise.
2196 (gnatstage1): Likewise.
2197 (gnatstage2): Likewise.
2198 * gcc-interface/Makefile.in (SOME_ADAFLAGS): Likewise.
2199 (MOST_ADAFLAGS): Likewise.
2200 (LOOSE_CFLAGS): Likewise.
2201 (gnat-cross): Likewise.
2202 (GNATLIBFLAGS): Add -W -Wall.
2203 (GNATLIBCFLAGS_FOR_C): Likewise.
2204 * gcc-interface/lang.opt: Remove C-specific warnings. Add doc lines.
2205 * gcc-interface/misc.c (gnat_handle_option): Remove obsolete cases.
2207 2011-10-12 Eric Botcazou <ebotcazou@adacore.com>
2209 * gcc-interface/trans.c (Attribute_to_gnu): Use remove_conversions.
2210 (push_range_check_info): Likewise.
2211 (gnat_to_gnu) <N_Code_Statement>: Likewise.
2212 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: Likewise.
2213 (gnat_invariant_expr): Likewise.
2214 * gcc-interface/utils.c (compute_related_constant): Likewise.
2215 (max_size): Fix handling of SAVE_EXPR.
2216 (remove_conversions): Fix formatting.
2218 2011-10-12 Eric Botcazou <ebotcazou@adacore.com>
2220 * gcc-interface/ada-tree.h (DECL_LOOP_PARM_P): New flag.
2221 (DECL_INDUCTION_VAR): New macro.
2222 (SET_DECL_INDUCTION_VAR): Likewise.
2223 * gcc-interface/gigi.h (convert_to_index_type): Declare.
2224 (gnat_invariant_expr): Likewise.
2225 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: If this is a loop
2226 parameter, set DECL_LOOP_PARM_P on it.
2227 * gcc-interface/misc.c (gnat_print_decl) <VAR_DECL>: If DECL_LOOP_PARM_P
2228 is set, print DECL_INDUCTION_VAR instead of DECL_RENAMED_OBJECT.
2229 * gcc-interface/trans.c (gnu_loop_label_stack): Delete.
2230 (struct range_check_info_d): New type.
2231 (struct loop_info_d): Likewise.
2232 (gnu_loop_stack): New stack.
2233 (Identifier_to_gnu): Set TREE_READONLY flag on the first dereference
2234 built for a by-double-ref read-only parameter. If DECL_LOOP_PARM_P
2235 is set, do not test DECL_RENAMED_OBJECT.
2236 (push_range_check_info): New function.
2237 (Loop_Statement_to_gnu): Push a new struct loop_info_d instead of just
2238 the label. Reference the label and the iteration variable from it.
2239 Build the special induction variable in the unsigned version of the
2240 size type, if it is larger than the base type. And attach it to the
2241 iteration variable if the latter isn't by-ref. In the iteration scheme
2242 case, initialize the invariant conditions in front of the loop if
2243 deemed profitable. Use gnu_loop_stack.
2244 (gnat_to_gnu) <N_Exit_Statement>: Use gnu_loop_stack.
2245 <N_Raise_Constraint_Error>: Always process the reason. In the range
2246 check and related cases, and if loop unswitching is enabled, compute
2247 invariant conditions and push this information onto the stack.
2248 Do not translate again the condition if it has been already translated.
2249 * gcc-interface/utils.c (record_global_renaming_pointer): Assert that
2250 DECL_LOOP_PARM_P isn't set.
2251 (convert_to_index_type): New function.
2252 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Use it in order
2253 to convert the index from the base index type to sizetype.
2254 (gnat_invariant_expr): New function.
2256 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
2258 * gcc-interface/utils.c (def_builtin_1): Delete old interface with
2259 two parallel arrays to hold standard builtin declarations, and
2260 replace it with a function based interface that can support
2261 creating builtins on the fly in the future.
2262 * gcc-interface/trans.c (Exception_Handler_to_gnu_zcx): Ditto.
2263 (gnat_to_gnu): Ditto.
2265 2011-10-07 Eric Botcazou <ebotcazou@adacore.com>
2268 * gcc-interface/gigi.h (gnat_pushdecl): Adjust comment.
2269 * gcc-interface/utils.c (global_context): New variable.
2270 (gnat_pushdecl): Initialize it and set it as the DECL_CONTEXT of DECLs
2271 that are either public external or at top level. Use "No" macro.
2272 (end_subprog_body): Call decl_function_context.
2273 (rest_of_subprog_body_compilation): Likewise.
2275 2011-10-07 Eric Botcazou <ebotcazou@adacore.com>
2277 * gcc-interface/gigi.h (gnat_useless_type_conversion): Declare.
2278 (rest_of_subprog_body_compilation): Likewise.
2279 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: For renaming,
2280 test for useless conversions by means of gnat_useless_type_conversion.
2281 * gcc-interface/trans.c: Include bitmap.h and cgraph.h.
2282 (language_function): Add named_ret_val and other_ret_val.
2283 (f_named_ret_val): New macro.
2284 (f_other_ret_val): Likewise.
2285 (gigi): Call rest_of_subprog_body_compilation.
2286 (struct nrv_data): New structure.
2287 (is_nrv_p): New predicate.
2288 (prune_nrv_r): New helper function.
2289 (prune_nrv_in_block): New function.
2290 (finalize_nrv_r): New helper function.
2291 (finalize_nrv): New function.
2292 (return_value_ok_for_nrv_p): New predicate.
2293 (build_return_expr): If optimization is enabled, record candidates for
2294 the Named Return Value optimization.
2295 (build_function_stub): Call rest_of_subprog_body_compilation.
2296 (Subprogram_Body_to_gnu): If optimization is enabled and there are
2297 candidates, finalize the Named Return Value optimization.
2298 Call rest_of_subprog_body_compilation.
2299 (call_to_gnu): At the end, if a return value is needed, simplify the
2300 result before wrapping it up in a COMPOUND_EXPR.
2301 * gcc-interface/utils.c (end_subprog_body): Split into...
2302 (rest_of_subprog_body_compilation): ...this. New function.
2303 (gnat_useless_type_conversion): Likewise.
2305 2011-10-06 Thomas Quinot <quinot@adacore.com>
2307 * einfo.ads, exp_attr.adb, exp_ch3.adb, exp_ch4.adb, exp_ch7.adb,
2308 exp_ch9.adb, exp_ch9.ads, exp_strm.adb, exp_util.adb, freeze.adb,
2309 g-debpoo.ads, opt.ads, par-ch12.adb, par-ch2.adb, par-ch3.adb,
2310 par-ch5.adb, par-ch6.adb, sem_aggr.adb, sem_attr.adb, sem_cat.adb,
2311 sem_ch10.adb, sem_ch12.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
2312 sem_ch6.adb, sem_intr.adb, sem_res.ads, sem_type.adb, sem_util.adb,
2313 s-regpat.adb, s-tpopde-vms.ads: Minor reformatting.
2314 * s-osinte-freebsd.ads: Fix for tasking failures on FreeBSD.
2316 2011-10-06 Ed Schonberg <schonberg@adacore.com>
2318 * a-cihase.adb, a-ciorma.adb: Avoid accessibility checks in container
2321 2011-10-06 Matthew Heaney <heaney@adacore.com>
2323 * a-cuprqu.ads, a-cuprqu.adb, a-cbprqu.ads, a-cbprqu.adb
2324 (Dequeue_Only_High_Priority): Protected procedure now implemented.
2326 2011-10-06 Vincent Celier <celier@adacore.com>
2328 * g-trasym.adb: Replace old implementation with the default
2329 implementation that returns list of addresses as "0x...".
2330 * g-trasym.ads: Update the list of platforms with the full
2331 capability. Indicate that there is a default implementation
2332 for other platforms.
2333 * g-trasym-unimplemented.ads, g-trasym-unimplemented.adb: Remove.
2334 * gcc-interface/Makefile.in: Remove g-trasym-unimplemented, as there
2335 is now a default implementation for all platforms without the full
2338 2011-10-06 Robert Dewar <dewar@adacore.com>
2340 * a-ciorse.adb, a-cihase.adb, a-cihase.ads, a-coorse.adb,
2341 a-cborse.adb, a-comutr.adb, a-ciorma.adb, a-cbmutr.adb,
2342 a-cbmutr.ads, a-cbhase.adb, a-cbhase.ads: Minor reformatting and code
2343 reorganization (use conditional expressions).
2345 2011-10-06 Robert Dewar <dewar@adacore.com>
2347 * sem_res.adb (Resolve_Arithmetic_Op): Fix bad warning for
2348 floating divide by zero.
2350 2011-10-06 Ed Schonberg <schonberg@adacore.com>
2352 * sem_ch6.adb: Limited interfaces that are not immutably limited
2353 are OK in return statements.
2355 2011-09-30 Iain Sandoe <iains@gcc.gnu.org>
2357 * gcc-interface/Makefile.in (Darwin): Partial reversion of previous
2358 change to powerpc section.
2360 2011-09-29 Iain Sandoe <iains@gcc.gnu.org>
2362 * gcc-interface/Makefile.in (Darwin): Factor LIBGNAT_TARGET_PAIRS
2365 2011-09-27 Ed Schonberg <schonberg@adacore.com>
2367 * a-cbhase.adb, a-cbhase.ads, a-cborse.adb, a-cborse.ads,
2368 a-cihase.adb, a-cihase.ads, a-ciorse.adb, a-ciorse.ads,
2369 a-coorse.adb, a-coorse.ads: Add iterator machinery to bounded sets and
2371 * a-coorma.ads: Minor reformmating.
2372 * einfo.ads: Improve the comment describing the
2373 Directly_Designated_Type function.
2374 * a-ciorma.adb, a-ciorma.ads: Add iterator machinery to indefinite
2376 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
2379 2011-09-27 Robert Dewar <dewar@adacore.com>
2381 * a-comutr.ads: Minor reformatting.
2383 2011-09-27 Ed Schonberg <schonberg@adacore.com>
2385 * a-cimutr.adb, a-cimutr.ads, a-cbmutr.adb, a-cbmutr.ads: Add children
2386 iterators to multiway trees.
2388 2011-09-27 Yannick Moy <moy@adacore.com>
2390 * debug.adb (d.D): New option for strict Alfa mode.
2391 * opt.ads (Strict_Alfa_Mode): New flag to interpret compiler
2392 permissions as strictly as possible.
2393 * sem_ch3.adb (Signed_Integer_Type_Declaration): In non-strict
2394 Alfa mode, now, interpret ranges of base types like GNAT does; in
2395 strict mode, simply change the range of the implicit base Itype.
2396 * gnat1drv.adb: Update comments. Set Strict_Alfa_Mode.
2398 2011-09-27 Robert Dewar <dewar@adacore.com>
2400 * exp_ch9.adb: Minor comment fixes.
2402 2011-09-27 Ed Schonberg <schonberg@adacore.com>
2404 * a-comutr.adb, a-comutr.ads: Add children iterators on multiway
2407 2011-09-27 Eric Botcazou <ebotcazou@adacore.com>
2409 * checks.adb (Apply_Scalar_Range_Check): Use Designated_Type
2410 instead of Directly_Designated_Type in the indirect array case.
2412 2011-09-27 Robert Dewar <dewar@adacore.com>
2414 * exp_util.adb, exp_aggr.adb: Minor reformatting.
2416 2011-09-27 Ed Schonberg <schonberg@adacore.com>
2418 * sinfo.ads, par-ch3.adb: Minor comment update: aspect specification
2419 on subtype declarations.
2420 * exp_aggr.adb: Minor comment update.
2422 2011-09-27 Eric Botcazou <ebotcazou@adacore.com>
2424 * exp_util.adb (Safe_Prefixed_Reference): Remove always-false
2425 test in the N_Explicit_Dereference case. Fold double logical
2426 negation in the special loop case and conditionalize it on
2427 Variable_Ref being true.
2429 2011-09-27 Ed Schonberg <schonberg@adacore.com>
2431 * sem_ch4.adb (Analyze_Selected_Component): If the prefix is a
2432 single protected object and the selector is a discriminant or an
2433 entry family, this is a non-overloaded candidate interpretation,
2434 and possible primitive operations of the type must not be
2437 2011-09-27 Arnaud Charlet <charlet@adacore.com>
2439 * s-taspri-posix-noaltstack.ads (Lock): Mark fields aliased.
2441 2011-09-27 Pascal Obry <obry@adacore.com>
2443 * s-osinte-hpux.ads, s-osinte-aix.ads, s-osinte-solaris-posix.ads,
2444 s-osinte-irix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads:
2445 Add dummy definitions for pthread_rwlock_t
2446 and pthread_rwlockattr_t on all POSIX platforms.
2447 * s-taprop-irix.adb, s-taprop-posix.adb (Initialize_Lock): Fix lock
2449 (Finalize_Lock): Likewise.
2450 (Write_Lock): Likewise.
2453 2011-09-27 Tristan Gingold <gingold@adacore.com>
2455 * s-tassta.adb (Task_Wrapper): Increase Guard_Page_Size value for
2458 2011-09-27 Pascal Obry <obry@adacore.com>
2460 * s-osinte-hpux.ads, s-taprop-vxworks.adb, s-taspri-vxworks.ads,
2461 s-taprop-tru64.adb, s-osinte-aix.ads, s-taspri-posix-noaltstack.ads,
2462 s-taspri-mingw.ads, s-taprop-vms.adb, s-tpoben.adb, s-tpoben.ads,
2463 s-taprop-mingw.adb, s-taprob.adb, s-taprob.ads,
2464 s-osinte-solaris-posix.ads, s-taprop-solaris.adb, s-taspri-solaris.ads,
2465 s-osinte-irix.ads, s-taprop-irix.adb, s-osinte-darwin.ads,
2466 s-taspri-dummy.ads, s-taspri-posix.ads, s-taprop.ads,
2467 s-taspri-vms.ads, s-osinte-freebsd.ads, s-taprop-hpux-dce.adb,
2468 s-taspri-hpux-dce.ads, s-taspri-tru64.ads, s-taprop-dummy.adb,
2469 s-taprop-posix.adb: Revert previous changes.
2470 (Lock): Now a record containing the two possible lock
2471 (mutex and read/write) defined in OS_Interface.
2472 * s-taprop-linux.adb (Finalize_Protection): Use r/w lock for
2474 (Initialize_Protection): Likewise.
2476 (Lock_Read_Only): Likewise.
2479 2011-09-27 Pascal Obry <obry@adacore.com>
2481 * s-taspri-posix-noaltstack.ads (RW_Lock): This type is now defined as
2482 OS_Interface.pthread_rwlock_t.
2484 2011-09-27 Robert Dewar <dewar@adacore.com>
2486 * exp_ch9.adb, a-cimutr.adb, a-cimutr.ads, gnat1drv.adb, a-comutr.adb,
2487 a-comutr.ads, exp_dist.adb, a-cbmutr.adb, a-cbmutr.ads,
2488 sem_ch5.adb, sem_util.adb: Minor reformatting.
2490 2011-09-27 Pascal Obry <obry@adacore.com>
2492 * s-taprop.ads (Initialize_Lock)[RW_Lock]: New spec for r/w lock.
2493 (Finalize_Lock)[RW_Lock]: Likewise.
2494 (Write_Lock)[RW_Lock]: Likewise.
2495 (Unlock)[RW_Lock]: Likewise.
2496 (Read_Lock): Define L as RW_Lock (instead of Lock).
2497 * s-taprop-linux.adb (Initialize_Lock)[RW_Lock]: New
2498 routine for r/w lock.
2499 (Finalize_Lock)[RW_Lock]: Likewise.
2500 (Write_Lock)[RW_Lock]: Likewise.
2501 (Unlock)[RW_Lock]: Likewise.
2502 (Read_Lock): Define L as RW_Lock (instead of Lock).
2504 * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
2505 s-taprop-mingw.adb, s-taprop-solaris.adb, s-taprop-irix.adb,
2506 s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
2507 (Initialize_Lock)[RW_Lock]: Same implementation as corresponding
2508 routine for standard lock.
2509 (Finalize_Lock)[RW_Lock]: Likewise.
2510 (Write_Lock)[RW_Lock]: Likewise.
2511 (Unlock)[RW_Lock]: Likewise.
2512 (Read_Lock): Define L as RW_Lock (instead of Lock).
2513 * s-taprob.ads, s-tpoben.ads (Protection): Add RWL (RW_Lock)
2514 in the record definition.
2515 * s-taprob.adb, s-taproben.adb (Finalize_Protection): Use r/w
2516 lock for 'R' locking policy.
2517 (Initialize_Protection): Likewise.
2519 (Lock_Read_Only): Likewise.
2521 * s-taspri-posix.ads (RW_Lock): New type defined as
2522 OS_Interface.pthread_rwlock_t.
2524 * s-taspri-vxworks.ads, s-taspri-posix-noaltstack.ads,
2525 s-taspri-mingw.ads, s-taspri-solaris.ads, s-taspri-dummy.ads,
2526 s-taspri-posix.ads, s-taspri-vms.ads, s-taspri-hpux-dce.ads,
2527 s-taspri-tru64.ads (RW_Lock): New type defined as alias to Lock.
2529 2011-09-27 Pascal Obry <obry@adacore.com>
2531 * exp_ch9.adb, s-taspri-posix.ads: Minor reformatting.
2533 2011-09-27 Pascal Obry <obry@adacore.com>
2535 * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
2536 s-osinte-hpux.ads, s-osinte-irix.ads,
2537 s-osinte-solaris-posix.ads (pthread_rwlock_t): New definition alias of
2539 (pthread_rwlockattr_t): New definition alias of pthread_mutexattr_t.
2540 * s-osinte-linux.ads (pthread_rwlock_t, pthread_rwlockattr_t,
2541 pthread_rwlockattr_init, pthread_rwlockattr_destroy,
2542 pthread_rwlockattr_setkind_np, pthread_rwlock_init,
2543 pthread_rwlock_destroy, pthread_rwlock_rdlock,
2544 pthread_rwlock_wrlock, pthread_rwlock_unlock): New.
2546 2011-09-27 Pascal Obry <obry@adacore.com>
2548 * rtsfind.ads: Add RE_Lock_Read_Only into rtsfind circuitry.
2549 (RE_Id): Add RE_Lock_Read_Only.
2550 (RE_Unit_Table): Likewise.
2551 * sem_prag.adb (Process_Convention): Change Pragma_Locking_Policy
2552 to lift restriction on first character. Handle now the
2553 Name_Concurrent_Readers_Locking where policy character is set to
2555 * snames.ads-tmpl (Name_Concurrent_Readers_Locking): New
2557 * exp_ch9.adb (Build_Protected_Subprogram_Body): Generate a
2558 read only lock for function in protected object.
2559 * s-taprob.ads (Lock_Read_Only): Remove obsolete comment as
2560 this routine is now used.
2562 2011-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2564 * s-atocou-x86.adb (Decrement): Use %;.
2565 (Increment): Likewise.
2567 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
2569 * gcc-interface/utils2.c (build_allocator): Set TREE_THIS_NOTRAP on the
2570 dereference of the pointer to the storage area. Remove useless type
2571 conversions and factor out common code.
2573 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
2575 * gcc-interface/utils.c (maybe_unconstrained_array): Declare TYPE local
2576 variable and use it throughout.
2577 <UNCONSTRAINED_ARRAY_TYPE>: Add 'break' at the end.
2578 <RECORD_TYPE>: Do not unconditionally convert to the unpadded type as a
2579 first step. Also convert to the unpadded type as a last step.
2581 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
2583 * gcc-interface/gigi.h (create_subprog_decl): Replace TREE_CHAIN with
2584 DECL_CHAIN in comment.
2585 * gcc-interface/trans.c (gigi): Likewise.
2586 (Attribute_to_gnu): Likewise.
2587 (build_function_stub): Likewise.
2588 (gnat_to_gnu): Likewise.
2589 * gcc-interface/utils.c (create_subprog_decl): Likewise.
2590 (convert_vms_descriptor64): Likewise.
2591 (convert_vms_descriptor32): Likewise.
2593 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
2595 * gcc-interface/trans.c (assoc_to_constructor): Minor tweaks.
2596 * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting
2597 issues. Use COMPLETE_TYPE_P in assertion. Also set TREE_READONLY if
2598 the type of the record is TYPE_READONLY.
2600 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
2601 Robert Dewar <dewar@adacore.com>
2603 * sem_ch6.adb (Set_Formal_Mode): Set Can_Never_Be_Null on an IN or IN
2604 OUT formal parameter which is of an null-exclusion access subtype.
2606 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
2608 * gcc-interface/ada-tree.h (DECL_CAN_NEVER_BE_NULL_P): New macro.
2609 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Set the flag.
2610 (gnat_to_gnu_param): Likewise.
2611 * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Invoke
2612 maybe_unconstrained_array instead of doing the work manually.
2613 (maybe_unconstrained_array): Propagate the TREE_THIS_NOTRAP flag.
2614 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: If operand
2615 is a DECL with the flag, set TREE_THIS_NOTRAP on the reference.
2616 (gnat_stabilize_reference_1): Propagate the TREE_THIS_NOTRAP flag.
2617 (gnat_stabilize_reference): Likewise.
2619 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
2621 * gcc-interface/ada-tree.h (TYPE_NULL_BOUNDS): New macro.
2622 (SET_TYPE_NULL_BOUNDS): Likewise.
2623 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Set again
2624 TREE_THIS_NOTRAP on the INDIRECT_REF node built for the template.
2625 * gcc-interface/trans.c (Identifier_to_gnu): Return initializers of fat
2627 * gcc-interface/utils.c (create_var_decl_1): If the object is external,
2628 check that the initializer is a valid constant expression for use in
2629 initializing a static variable. Add missing guard.
2630 (update_pointer_to): Adjust TYPE_NULL_BOUNDS if set.
2631 (convert_to_fat_pointer): In the null fat pointer case, build a valid
2632 pointer for the bounds.
2633 * gcc-interface/utils2.c (compare_fat_pointers): New function.
2634 (build_binary_op) <EQ_EXPR>: Call it to compare fat pointers.
2636 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
2638 * gcc-interface/ada-tree.h (TREE_THIS_NOTRAP): Redefine.
2639 * gcc-interface/trans.c (Identifier_to_gnu): Factor out common code in
2640 the by-ref case. Do not set TREE_READONLY on a renamed object. Set
2641 TREE_THIS_NOTRAP on UNCONSTRAINED_ARRAY_REF nodes.
2642 (Attribute_to_gnu) <Attr_Length>: Expand the use of the parameter cache
2643 to the indirect case.
2644 * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Preserve
2645 the TREE_THIS_NOTRAP flag.
2647 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
2649 * gcc-interface/trans.c (Loop_Statement_to_gnu): In the case of an
2650 iteration scheme, always generate the do-while form if optimization
2651 is enabled. Use more straightforward test at the end.
2653 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
2655 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Subtype>: Use
2656 XNEW instead of xmalloc. Do not build useless pointer type.
2657 <E_Anonymous_Access_Subprogram_Type>: Use XNEW instead of xmalloc.
2658 * gcc-interface/trans.c (gnat_to_gnu) <N_Raise_Constraint_Error>: Tidy.
2659 * gcc-interface/utils2.c (build_unary_op): Remove local variable.
2661 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
2663 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not promote
2664 the alignment if this doesn't prevent BLKmode access to the object.
2666 2011-09-24 Iain Sandoe <iains@gcc.gnu.org>
2668 * gcc-interface/Makefile.in (darwin): Do not issue the
2669 '-flat_namespace' linker flag during Ada build.
2670 * mlib-tgt-specific-darwin.adb: Remove '-flat_namespace' flag from the
2671 default shared library options.
2673 2011-09-19 Alexandre Oliva <aoliva@redhat.com>
2675 * gcc-interface/decl.c (annotate_value): Look up expression for
2676 insertion in the cache at the end.
2678 2011-09-19 Arnaud Charlet <charlet@adacore.com>
2680 * gcc-interface/Make-lang.in: Update dependencies.
2682 2011-09-19 Steve Baird <baird@adacore.com>
2684 * snames.ads-tmpl: Move declaration of Name_Annotate into range of
2685 configuration pragma names so that Is_Configuration_Pragma_Name
2686 will return True for Name_Annotate. Make corresponding change in
2687 Pragma_Id enumeration type. This is needed to allow an Annotate
2688 pragma to occur in a configuration pragma file (typically,
2690 * gnat_ugn.texi: Add Annotate to the list of configuration pragmas.
2691 * gnat_rm.texi: Note that pragma Annotate may be used as a
2692 configuration pragma.
2694 2011-09-19 Ed Schonberg <schonberg@adacore.com>
2696 * a-cbmutr.adb, a-cbmutr.ads, a-cimutr.adb, a-cimutr.ads,
2697 a-comutr.adb, a-comutr.ads: Add iterator machinery for multiway trees.
2699 2011-09-19 Yannick Moy <moy@adacore.com>
2701 * exp_alfa.adb, exp_alfa.ads (Expand_Alfa_N_In): New function
2702 for expansion of set membership.
2703 (Expand_Alfa): Call expansion for N_In and N_Not_In nodes.
2704 * exp_ch4.adb, exp_ch4.ads (Expand_Set_Membership): Make procedure
2705 visible for use in Alfa expansion.
2706 * sem_ch5.adb (Analyze_Iterator_Specification): Introduce loop
2707 variable in Alfa mode.
2709 2011-09-19 Thomas Quinot <quinot@adacore.com>
2711 * s-osinte-darwin.ads: Change SIGADAABRT on Darwin to SIGABRT.
2713 2011-09-19 Thomas Quinot <quinot@adacore.com>
2715 * exp_ch9.adb: Minor reformatting.
2717 2011-09-19 Hristian Kirtchev <kirtchev@adacore.com>
2719 * freeze.adb (Build_Renamed_Body): Generic subprograms
2720 instantiations cannot be poperly inlined by the compiler, do
2721 not set the Body_To_Inline attribute in such cases.
2722 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Inherit all
2723 inlining-related flags from the generic subprogram declaration.
2725 2011-09-19 Thomas Quinot <quinot@adacore.com>
2727 * exp_dist.adb, rtsfind.ads, sem_util.adb, sem_util.ads
2728 (Build_Stub_Type): Remove, instead copy components from
2729 System.Partition_Interface.RACW_Stub_Type.
2730 (RPC_Receiver_Decl): Remainder of code from old Build_Stub_Type routine.
2731 (Copy_Component_List): New subprogram.
2733 2011-09-19 Yannick Moy <moy@adacore.com>
2735 * lib-xref.adb (Generate_Reference): Ignore references to
2736 constants in Standard.
2738 2011-09-19 Robert Dewar <dewar@adacore.com>
2740 * err_vars.ads, errout.ads: Minor reformatting.
2742 2011-09-19 Robert Dewar <dewar@adacore.com>
2744 * aspects.ads (Impl_Defined_Aspects): New array
2745 * lib-writ.adb (No_Dependences): New name for No_Dependence
2746 * restrict.adb (No_Dependences): New name for No_Dependence
2747 (Check_Restriction_No_Specification_Of_Aspect): New
2749 (Set_Restriction_No_Specification_Of_Aspect): New procedure
2750 (Restricted_Profile_Result): New variable
2751 (No_Specification_Of_Aspects): New variable
2752 (No_Specification_Of_Aspect_Warning): New variable
2753 * restrict.ads (No_Dependences): New name for No_Dependence
2754 (Check_Restriction_No_Specification_Of_Aspect): New procedure
2755 (Set_Restriction_No_Specification_Of_Aspect): New procedure
2756 * s-rident.ads: Add restriction
2757 No_Implementation_Aspect_Specifications, this is also added to
2758 the No_Implementation_Extensions profile.
2759 * sem_ch13.adb (Analyze_Aspect_Specifications): Check
2760 No_Implementation_Defined_Aspects
2761 (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
2762 * sem_prag.adb (Analyze_Aspect_Specifications): Check
2763 No_Implementation_Aspects
2764 (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
2765 * snames.ads-tmpl (Name_No_Specification_Of_Aspect): New name
2767 2011-09-19 Yannick Moy <moy@adacore.com>
2769 * lib-xref.adb (Generate_Reference): Take into account multiple
2770 renamings for Alfa refs.
2772 2011-09-19 Thomas Quinot <quinot@adacore.com>
2774 * g-socthi-mingw.adb: Minor reformatting.
2776 2011-09-19 Yannick Moy <moy@adacore.com>
2778 * gnat1drv.adb (Adjust_Global_Switches): Set tagged type
2779 expansion to False in mode Alfa
2781 2011-09-19 Pascal Obry <obry@adacore.com>
2783 * mingw32.h: Remove obsolete code needed for old versions
2786 2011-09-19 Robert Dewar <dewar@adacore.com>
2788 * errout.ads: Minor reformatting.
2790 2011-09-19 Ed Schonberg <schonberg@adacore.com>
2792 * sem_ch6.adb (Analyze_Expression_Function): When the expression
2793 function is transformed into a declaration and a body, insert
2794 body at the end of the declarative part, to prevent premature
2795 freeze actions, and preserve original specification in the
2796 subprogram declaration.
2798 2011-09-19 Vincent Celier <celier@adacore.com>
2800 * projects.texi: Minor editing.
2802 2011-09-19 Robert Dewar <dewar@adacore.com>
2804 * sem_aggr.adb, lib-writ.ads, s-restri.ads, sem_ch6.adb,
2805 exp_aggr.adb: Minor reformatting.
2807 2011-09-19 Yannick Moy <moy@adacore.com>
2809 * lib-xref.adb (Generate_Reference): Change entity referenced
2810 to underlying object if any, or else reference to the HEAP.
2812 2011-09-15 Arnaud Charlet <charlet@adacore.com>
2814 * gcc-interface/Make-lang.in: Update dependencies.
2816 2011-09-15 Robert Dewar <dewar@adacore.com>
2818 * tree_io.ads: Minor reformatting.
2819 * a-intnam.ads: Fix bad header.
2821 2011-09-15 Thomas Quinot <quinot@adacore.com>
2823 * a-exexpr-gcc.adb: Minor reformatting.
2825 2011-09-15 Yannick Moy <moy@adacore.com>
2827 * sem_ch6.adb: Propagate information that an expression function comes
2828 from source (otherwise references to this entity are not stored).
2830 2011-09-15 Robert Dewar <dewar@adacore.com>
2832 * a-cdlili.adb, a-coinve.adb, a-stzunb-shared.ads, a-suezst.adb,
2833 a-suenco.adb, a-stwiun-shared.ads, a-cobove.adb, a-convec.adb,
2834 a-btgbso.adb, a-cbdlli.adb, a-suewst.adb: Minor reformatting.
2836 2011-09-15 Ed Schonberg <schonberg@adacore.com>
2838 * sem_ch6.adb (Analyze_Expression_Function): Code cleanup:
2839 if the expression function is not a completion, create a
2840 new specification for the generated declaration, and keep the
2841 original specification in the generated body. Shorter code also
2842 ensures that proper warnings are generated for unused formals
2845 2011-09-15 Sergey Rybin <rybin@adacore.com>
2847 * tree_io.ads: Update ASIS_Version_Number because of the changes
2848 in the tree structures for expression functions.
2850 2011-09-15 Arnaud Charlet <charlet@adacore.com>
2852 * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
2853 s-osinte-hpux.ads, s-osinte-lynxos.ads, s-osinte-solaris-posix.ads,
2854 s-taprop-posix.adb (CLOCK_MONOTONIC): New constant.
2855 (CLOCK_REALTIME): Fix wrong value on some OSes.
2856 * s-taprop-posix.adb (Monotonic_Clock): Use CLOCK_MONOTONIC.
2858 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
2860 * gcc-interface/utils.c (maybe_unconstrained_array): In the reference
2861 to unconstrained array case, deal with each branch of a COND_EXPR.
2862 * gcc-interface/utils2.c (build_allocator): Deal with each branch of
2863 a COND_EXPR in the initializer, if present.
2865 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
2867 * gcc-interface/decl.c (maybe_pad_type): Do not try to change the form
2868 of an addressable type.
2869 * gcc-interface/trans.c (gnat_gimplify_expr) <VIEW_CONVERT_EXPR>: New.
2870 Deal with those cases for which creating a temporary is mandatory.
2872 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
2874 * gcc-interface/trans.c (call_to_gnu): Use local variable. Make sure
2875 this is a real formal parameter before testing whether it is by ref.
2877 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
2879 * gcc-interface/gigi.h (build_call_0_expr): Delete.
2880 (build_call_1_expr): Likewise.
2881 (build_call_2_expr): Likewise.
2882 (build_call_n_expr): New prototype.
2883 * gcc-interface/decl.c (gnat_to_gnu_entity): Use build_call_n_expr.
2884 * gcc-interface/trans.c (establish_gnat_vms_condition_handler): Ditto.
2885 (Handled_Sequence_Of_Statements_to_gnu): Likewise.
2886 (Exception_Handler_to_gnu_zcx): Likewise.
2887 (gnat_to_gnu): Likewise.
2888 (build_binary_op_trapv): Likewise.
2889 * gcc-interface/utils2.c (build_call_0_expr): Delete.
2890 (build_call_1_expr): Likewise.
2891 (build_call_2_expr): Likewise.
2892 (build_call_n_expr): New function.
2893 (build_call_raise): Use build_call_n_expr.
2894 (build_call_raise_range): Likewise.
2895 (build_call_raise_column): Likewise.
2896 (build_call_alloc_dealloc_proc): Likewise.
2897 (maybe_wrap_malloc): Likewise.
2898 (maybe_wrap_free): Likewise.
2900 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
2902 * gcc-interface/trans.c (build_return_expr): Use void_type_node for
2904 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Assert that
2905 the result type is null if ENABLE_CHECKING. Set operation_type at the
2906 end unconditionally if not set in the previous cases.
2907 Use build2 and void_type_node for MODIFY_EXPR.
2908 (build_allocator): Use NULL_TREE for MODIFY_EXPR.
2910 2011-09-08 Eric Botcazou <ebotcazou@adacore.com>
2912 * gcc-interface/utils.c (unchecked_convert): Use a field of the right
2913 precision when converting to or from an integral type whose precision
2914 is not equal to its size.
2916 2011-09-08 Iain Sandoe <iains@gcc.gnu.org>
2918 * traceback.c (Darwin) USE_GCC_UNWINDER for Darwin versions >= 8.
2920 2011-09-07 Iain Sandoe <iains@gcc.gnu.org>
2922 * gcc-interface/Makefile.in (darwin): Provide powerpc64 system
2924 * system-darwin-ppc64.ads: New file.
2926 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
2928 * gcc-interface/Makefile.in (gnatlib-shared-darwin): Remove
2931 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
2933 * gcc-interface/Makefile.in (darwin, SO_OPTS): Provide architecture
2934 size switches to the link phase for shared libs.
2936 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
2938 * gcc-interface/Makefile.in (x86_64 darwin arch): Adjust
2939 LIBGNAT_TARGET_PAIRS for x86 and x86_64 variants.
2941 2011-09-06 Arnaud Charlet <charlet@adacore.com>
2943 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in
2944 (gnattools, regnattools, cross-gnattools, canadian-gnattools,
2945 gnatlib, gnatlib-sjlj, gnatlib-zcx, gnatlib-shared, gnatlib_and_tools):
2947 (TOOLS_FLAGS_TO_PASS): New.
2948 (../stamp-tools): Reintroduce, to avoid merge conflicts.
2950 2011-09-06 Robert Dewar <dewar@adacore.com>
2952 * sem_ch10.adb, impunit.ads, impunit.adb (Not_Impl_Defined_Unit): New
2953 name for Is_RM_Defined_Unit. Also several fixes to this unit.
2955 2011-09-06 Robert Dewar <dewar@adacore.com>
2957 * impunit.ads, impunit.adb (Is_RM_Defined_Unit): New function.
2958 * s-rident.ads: New restriction No_Implementation_Units
2959 (this restriction is also part of the profile
2960 No_Implementation_Extensions)
2961 * sem_ch10.adb (Analyze_With_Clause): Add check for
2962 No_Implementation_Units restriction.
2964 2011-09-06 Jerome Guitton <guitton@adacore.com>
2966 * sysdep.c (__gnat_get_task_options): Disable VX_SPE_TASK
2969 2011-09-06 Thomas Quinot <quinot@adacore.com>
2971 * s-solita.adb: Minor reformatting.
2973 2011-09-06 Ed Schonberg <schonberg@adacore.com>
2975 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The body that
2976 is a rewriting of an expression function does not freeze previous
2979 2011-09-06 Robert Dewar <dewar@adacore.com>
2981 * impunit.adb (Is_Known_Unit): Fix bad handling of Ada 2012 case
2983 2011-09-06 Tristan Gingold <gingold@adacore.com>
2985 * gcc-interface/Makefile.in: Handle e500v2-wrs-vxworksae like
2986 powerpc-wrs-vxworksae.
2988 2011-09-06 Thomas Quinot <quinot@adacore.com>
2990 * s-os_lib.ads (Spawn): Minor documentation clarification,
2991 Success is True for a zero exit status.
2993 2011-09-06 Ed Schonberg <schonberg@adacore.com>
2995 * sem_ch5.adb: Add message for common iterator error.
2997 2011-09-06 Ed Schonberg <schonberg@adacore.com>
2999 * exp_ch3.adb (Build_Initialization_Call): If the target is a
3000 selected component discriminated by a current instance, replace
3001 the constraint with a reference to the target object, regardless
3002 of whether the context is an init_proc.
3004 2011-09-06 Robert Dewar <dewar@adacore.com>
3006 * exp_attr.adb: Descriptor_Size is never static.
3008 2011-09-06 Robert Dewar <dewar@adacore.com>
3010 * gnat_ugn.texi: Add documentation for LSLOC metric in gnatmetric
3012 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
3014 * gnat_rm.texi: Clarify that attribute Descriptor_Size is
3017 2011-09-06 Ed Schonberg <schonberg@adacore.com>
3019 * sem_res.adb (Resolve): An expression that is the body of an
3020 expression function does not freeze.
3022 2011-09-06 Matthew Heaney <heaney@adacore.com>
3024 * a-csquin.ads, a-cusyqu.adb, a-cbprqu.adb, a-cbsyqu.adb,
3025 a-cuprqu.adb: Changed copyright notice to indicate current
3028 2011-09-06 Vincent Celier <celier@adacore.com>
3030 * prj.adb: Minor spelling error fix in comment
3031 * sem_res.adb: Minor reformatting
3033 2011-09-06 Pascal Obry <obry@adacore.com>
3035 * sysdep.c (winflush_nt): Removed as not needed anymore.
3036 (winflush_95): Likewise.
3037 (winflush_init): Likewise.
3038 (winflush_function): Likewise.
3039 (getc_immediate_common): Remove call to winflush_function.
3041 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
3043 * exp_attr.adb (Expand_N_Attribute_Reference): Rewrite the
3044 processing for Descriptor_Size.
3045 * gnat_rm.texi: Rephrase the wording for attribute Descriptor_Size
3046 to account for its broader usage.
3047 * sem_attr.adb (Analyze_Attribute): Change the error detection
3048 circuitry for Descriptor_Size as the attribute is now applicable
3051 2011-09-06 Robert Dewar <dewar@adacore.com>
3053 * sem_attr.adb, prj-nmsc.adb, exp_aggr.adb: Minor reformatting.
3055 2011-09-06 Ed Schonberg <schonberg@adacore.com>
3057 * lib-xref.adb (OK_To_Set_Referenced): A reference to a formal
3058 in a parameter association must not set the Referenced flag on
3060 * prj-nmsc.adb (Check_File_Naming_Schemes): Remove useless formal
3062 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
3064 * gnat_rm.texi: Add a section on attribute Descriptor_Size
3066 2011-09-06 Arnaud Charlet <charlet@adacore.com>
3068 * gcc-interface/Makefile.in (common-tools, gnatmake-re,
3069 gnatlink-re): Speed up by using -j0.
3071 2011-09-06 Yannick Moy <moy@adacore.com>
3073 * sem_ch13.adb (Analyze_Aspect_Specifications): Call
3074 Set_Corresponding_Aspect when creating pragma from aspect.
3075 (Add_Predicates): Use new field Corresponding_Aspect.
3076 * sem_prag.adb (Analyze_Pragma): Make Pname hold source aspect
3077 name when present, for the purpose of issuing error messages;
3078 remove local procedure Error_Pragma_Arg_Alternate_Name.
3079 * sinfo.adb, sinfo.ads (Corresponding_Aspect): New field in
3081 (From_Dynamic_Predicate, From_Static_Predicate): Remove fields from
3084 2011-09-06 Robert Dewar <dewar@adacore.com>
3086 * checks.adb, s-except.ads, g-socket.adb: Minor reformatting.
3088 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
3090 * exp_ch6.adb (Build_Heap_Allocator): Add new
3091 local variable Desig_Typ. Code and comment reformatting. Add
3092 machinery to ensure that the allocation uses a fat pointer when
3093 the type of the return object is a constrained array and the
3094 function return type is an unconstrained array.
3096 2011-09-06 Vincent Celier <celier@adacore.com>
3098 * make.adb, prj-part.adb, prj-nmsc.adb: Remove unused formal
3099 parameters in subprograms.
3101 2011-09-06 Arnaud Charlet <charlet@adacore.com>
3103 * s-taprop-mingw.adb (Finalize_TCB): Fix typo.
3105 2011-09-06 Thomas Quinot <quinot@adacore.com>
3107 * s-taprop-vxworks.adb, s-tpoaal.adb, s-tpopsp-vxworks.adb
3108 (System.Tasking.Primitive_Operations.Specific.Delete): Remove
3110 (System.Tasking.Primitive_Operations.Specific.Set): If argument
3111 is null, destroy task specific data, to make API consistent with
3112 other platforms, and thus compatible with the shared version
3114 (System.Tasking.Primitive_Operations.ATCB_Allocation.Free_ATCB):
3115 Document the above assumption.
3117 2011-09-06 Ed Schonberg <schonberg@adacore.com>
3119 * exp_ch6.adb (Expand_Inlined_Call): Fix use of uninitialized
3120 variable for type of return value when return type is
3121 unconstrained and context is an assignment.
3123 2011-09-06 Ed Schonberg <schonberg@adacore.com>
3125 * sem_ch8.adb (Check_Class_Wide_Actual): Do not generate body of
3126 class-wide operation if expansion is not enabled.
3128 2011-09-06 Eric Botcazou <ebotcazou@adacore.com>
3130 * checks.adb (Apply_Scalar_Range_Check): Deal with access
3133 2011-09-06 Yannick Moy <moy@adacore.com>
3135 * sem_ch13.adb (Analyze_Aspect_Specifications, case
3136 Aspect_Invariant): Do not issue error at this point on illegal
3137 pragma placement, as this is checked later on when analyzing
3138 the corresponding pragma.
3139 * sem_prag.adb (Error_Pragma_Arg_Alternate_Name): New procedure
3140 similar to Error_Pragma_Arg, except the source name of the
3141 aspect/pragma to use in warnings may be equal to parameter
3142 Alt_Name (Analyze_Pragma, case Pragma_Invariant): refine error
3143 message to distinguish source name of pragma/aspect, and whether
3144 the illegality resides in the type being public, or being private
3145 without a public declaration
3147 2011-09-06 Thomas Quinot <quinot@adacore.com>
3149 * g-socket.adb (Check_For_Fd_Set): On Windows, no need for bitmap
3150 size check (fd_set is implemented differently on that platform).
3152 2011-09-06 Thomas Quinot <quinot@adacore.com>
3154 * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
3155 s-tpoaal.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
3156 s-taprop-solaris.adb, s-taprop-irix.adb, s-taprop.ads,
3157 s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
3158 (ATCB_Allocation): New subpackage of
3159 System.Tasking.Primitive_Operations, shared across all targets
3160 with full tasking runtime.
3161 (ATCB_Allocation.New_ATCB): Moved there (from target specific
3163 (ATCB_Allocation.Free_ATCB): New subprogram. Deallocate an ATCB,
3164 taking care of establishing a local temporary ATCB if the one
3165 being deallocated is Self, to avoid a reference to the freed
3166 ATCB in Abort_Undefer.
3168 2011-09-06 Thomas Quinot <quinot@adacore.com>
3170 * s-tassta.adb, s-taskin.ads (Free_Task): If the task is not
3171 terminated, mark it for deallocation upon termination.
3172 (Terminate_Task): Call Free_Task again if the task is marked
3173 for automatic deallocation upon termination.
3175 2011-09-06 Robert Dewar <dewar@adacore.com>
3177 * a-cbprqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cusyqu.ads,
3178 a-intnam-aix.ads, a-intnam-darwin.ads, a-intnam-dummy.ads,
3179 a-intnam-freebsd.ads, a-intnam-hpux.ads, a-intnam-irix.ads,
3180 a-intnam-linux.ads, a-intnam-lynxos.ads, a-intnam-mingw.ads,
3181 a-intnam-solaris.ads, a-intnam-tru64.ads,
3182 a-intnam-vms.ads, a-intnam-vxworks.ads, a-intnam.ads, interfac.ads,
3183 cstand.adb, s-maccod.ads: Mark all entities as Implementation_Defined
3184 * einfo.ads, einfo.adb (Is_Implementation_Defined): New flag
3185 * par-prag.adb: Add dummy entry for pragma Implementation_Defined
3186 * s-rident.ads: Add new restriction No_Implementation_Identifiers
3187 Add new profile No_Implementation_Extensions
3188 * sem_prag.adb: Implement pragma Implementation_Defined Implement
3189 profile No_Implementation_Extensions
3190 * sem_util.adb: Minor reformatting (Set_Entity_With_Style_Check):
3191 Check violation of restriction No_Implementation_Identifiers
3192 * snames.ads-tmpl: Add entries for pragma Implementation_Defined
3193 Add entry for Name_No_Implementation_Extensions
3195 2011-09-06 Robert Dewar <dewar@adacore.com>
3197 * impunit.ads: Minor reformatting.
3199 2011-09-06 Robert Dewar <dewar@adacore.com>
3201 * ali.adb, sem_ch13.adb, lib-xref.adb: Minor reformatting.
3203 2011-09-06 Pascal Obry <obry@adacore.com>
3205 * s-osinte-linux.ads, s-oscons-tmplt.c: Use oscons to define sigset_t
3208 2011-09-06 Robert Dewar <dewar@adacore.com>
3210 * g-socket.adb: Minor reformatting
3212 2011-09-06 Javier Miranda <miranda@adacore.com>
3214 * ali.adb (Scan_ALI): Add missing support to load references of
3215 entities imported from other languages.
3216 * ali.ads (Xref_Record): Adding new fields to store the language and
3217 name of an imported entity.
3218 * lib-xref.adb (Output_Import_Export_Info): Fix typo
3221 2011-09-06 Ed Schonberg <schonberg@adacore.com>
3223 * sem_prag.adb (Analyze_Pragma, case Type_Invariant): A type invariant
3224 is allowed on a full type declaration if it is the completion of
3225 a private declarations.
3226 * sem_ch13.adb (Analyze_Aspect_Specifications): An invariant
3227 aspect is allowed on a full type declaration in the private part
3230 2011-09-06 Robert Dewar <dewar@adacore.com>
3232 * sem_ch8.ads: Minor reformatting
3234 2011-09-06 Thomas Quinot <quinot@adacore.com>
3236 * s-oscons-tmplt.c, g-socket.adb (GNAT.Sockets.Clear,Set,Is_Set):
3237 Guard against socket values that are not in [0;FD_SETSIZE[
3239 2011-09-06 Robert Dewar <dewar@adacore.com>
3241 * s-osinte-linux.ads, a-iteint.ads, exp_ch6.adb, s-solita.adb: Minor
3244 2011-09-06 Arnaud Charlet <charlet@adacore.com>
3246 * s-linux-alpha.ads: Minor reformatting
3247 * s-oscons-tmplt.c: Fix generated comments in s-oscons template.
3248 Use sizeof instead of corresponding C defines in s-oscons template.
3250 2011-09-06 Vadim Godunko <godunko@adacore.com>
3252 * a-convec.ads, a-iteint.ads: Minor reformatting.
3254 2011-09-06 Vincent Celier <celier@adacore.com>
3256 * projects.texi: Add menus and @node lines.
3258 2011-09-06 Ed Schonberg <schonberg@adacore.com>
3260 * exp_ch6.adb (Expand_Inlined_Call): Handle properly the case
3261 where the return type is an unconstrained array and the context
3262 is an assignment. Optimize the case when the target of the
3263 assignment is a selected component.
3265 2011-09-06 Arnaud Charlet <charlet@adacore.com>
3267 * s-solita.adb: Update comments.
3269 2011-09-06 Pascal Obry <obry@adacore.com>
3271 * s-linux.ads, s-linux-alpha.ads, s-linux-hppa.ads, s-linux-mipsel.ads,
3272 s-linux-sparc.ads: Remove hard coded and now wrong definitions.
3273 * s-oscons-tmplt.c: Add support for generating pthread related
3274 types size on GNU/Linux as done for Darwin.
3275 * s-osinte-linux.ads: Use s-oscons to define the pthread types.
3277 2011-09-06 Robert Dewar <dewar@adacore.com>
3279 * exp_ch6.adb: Fix minor typo.
3281 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
3283 * exp_ch7.adb: Remove with and use clauses for Get_Targ.
3284 (Alignment_Of): Moved to the body of Nearest_Multiple_Rounded_Up.
3285 (Double_Size_Of): Alphabetized. Update the comment on usage.
3286 (Make_Finalize_Address_Stmts): Update comments and reformat code.
3287 (Nearest_Multiple_Rounded_Up): New routine.
3288 (Size_Of): Update comment on usage. The generated expression now
3289 accounts for alignment gaps by rounding the size of the type to the
3290 nearest multiple rounded up of the type's alignment.
3292 2011-09-06 Robert Dewar <dewar@adacore.com>
3294 * exp_ch7.adb, g-comlin.adb: Minor reformatting.
3296 2011-09-06 Steve Baird <baird@adacore.com>
3298 * exp_ch4.adb (Expand_Allocator_Expression): Look through
3299 derived subprograms in checking for presence of an
3300 Extra_Accessibility_Of_Result formal parameter.
3301 * exp_ch6.adb (Expand_Call): Look through derived subprograms in
3302 checking for presence of an Extra_Accessibility_Of_Result formal
3304 (Expand_Call.Add_Actual_Parameter): Fix a bug in the
3305 case where the Parameter_Associatiations attribute is already set,
3306 but set to an empty list.
3307 (Needs_Result_Accessibility_Level):
3308 Unconditionally return False. This is a temporary
3309 change, disabling the Extra_Accessibility_Of_Result
3311 (Expand_Simple_Function_Return): Check for
3312 Extra_Accessibility_Of_Result parameter's presence instead of
3313 testing Ada_Version when generating a runtime accessibility
3314 check which makes use of the parameter.
3316 2011-09-06 Ed Schonberg <schonberg@adacore.com>
3318 * exp_ch4.adb (Expand_N_Case_Expression): Actions created for the
3319 expression in a given case alternative must be attached to the
3320 statement list of the ccrresponding case statement alternative
3321 They cannot be propagated ahead of the case statement, because
3322 the validity of the expression that generated the action may
3323 hold only for that alternative.
3325 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
3327 * exp_ch7.adb: Remove with and use clauses for Get_Targ.
3328 (Alignment_Of): Remove the code for strict alignment targets.
3329 (Double_Alignment_Of): Removed.
3330 (Double_Size_Of): New routine.
3331 (Make_Finalize_Address_Stmts): Change the
3332 calculation of the dope's size. Update relevant comments.
3333 (Size_Of): New routine.
3335 2011-09-06 Steve Baird <baird@adacore.com>
3337 * einfo.ads (Extra_Accessibility): Update associated comment to use
3338 the term "present" correctly ("present" just means that it is not
3339 an error to query the value of the attribute - it does not imply
3340 that the value must be non-null).
3341 (Extra_Constrained): Ditto.
3342 (Is_Visible_Formal): Ditto.
3343 (Extra_Accessibility_Of_Result) Ditto; also add Inline pragma.
3344 (Set_Extra_Accessibility_Of_Result): Add Inline pragma.
3345 * exp_ch4.adb (Expand_Allocator_Expression): Improve a comment.
3346 * exp_ch6.adb (Expand_Call): The callee may require an
3347 Extra_Accessibility_Of_Result actual parameter even if Ada_Version
3348 < Ada_2012. This can occur if the callee is exported from a Gnat
3349 runtimes unit. Also improve a comment.
3351 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
3353 * exp_ch7.adb: Add with and use clauses for Get_Targ.
3354 (Alignment_Of): Rename formal parameter Some_Typ
3355 to Typ, update related comment. Use the allocator alignment on
3356 strict alignment targets such as SPARC.
3357 (Double_Alignment_Of): Rename formal parameter Some_Typ to Typ, update
3360 2011-09-06 Gary Dismukes <dismukes@adacore.com>
3362 * sem_ch9.adb (Check_Interfaces): Test
3363 Is_Limited_Type rather than Is_Limited_Record when checking that
3364 the partial view of a synchronized full view must be limited.
3366 2011-09-06 Emmanuel Briot <briot@adacore.com>
3368 * g-comlin.adb (Free): Fix memory leak.
3370 2011-09-06 Robert Dewar <dewar@adacore.com>
3372 * sem_util.adb, exp_ch6.adb: Minor reformatting and code reorganization.
3374 2011-09-06 Steve Baird <baird@adacore.com>
3376 * einfo.ads (Extra_Accessibility_Of_Result): New function; in the
3377 (Ada2012) cases described in AI05-0234 where the accessibility
3378 level of a function result is "determined by the point of
3379 call", an implicit parameter representing that accessibility
3380 level is passed in. Extra_Accessibilty_Of_Result yields this
3381 additional formal parameter. Extra_Accessibility_Of_Result
3382 is analogous to the existing Extra_Accessibility
3383 function used in the implementation of access parameters.
3384 (Set_Extra_Accessibility_Of_Result): New procedure; sets
3385 Extra_Accessibility_Of_Result attribute.
3386 * einfo.adb (Extra_Accessibility_Of_Result): New function.
3387 (Set_Extra_Accessibility_Of_Result): New procedure.
3388 (Write_Field19_Name): Display Extra_Accessibilty_Of_Result attribute.
3389 * sem_util.adb (Dynamic_Accessibility_Level): Set Etype of
3390 an accessibility level literal to Natural; introduce a nested
3391 function, Make_Level_Literal, to do this.
3392 * exp_ch6.ads (Needs_Result_Accessibility_Level): New function;
3393 determines whether a given function (or access-to-function
3394 type) needs to have an implicitly-declared accessibility-level
3395 parameter added to its profile.
3396 (Add_Extra_Actual_To_Call): Export an existing procedure which was
3397 previously declared in the body of Exp_Ch6.
3398 * exp_ch6.adb (Add_Extra_Actual_To_Call): Export declaration by moving
3400 (Has_Unconstrained_Access_Discriminants): New Function; a
3401 predicate on subtype entities which returns True if the given
3402 subtype is unconstrained and has one or more access discriminants.
3403 (Expand_Call): When expanding a call to a function which takes an
3404 Extra_Accessibility_Of_Result parameter, pass in the appropriate
3405 actual parameter value. In the case of a function call which is
3406 used to initialize an allocator, this may not be possible because
3407 the Etype of the allocator may not have been set yet. In this
3408 case, we defer passing in the parameter and handle it later in
3409 Expand_Allocator_Expression.
3410 (Expand_Simple_Function_Return): When returning from a function which
3411 returns an unconstrained subtype having at least one access
3412 discriminant, generate the accessibility check needed to ensure that
3413 the function result will not outlive any objects designated by its
3415 (Needs_Result_Accessibility_Level): New function; see exp_ch6.ads
3417 * exp_ch4.adb (Expand_Allocator_Expression): When a function call
3418 is used to initialize an allocator, we may need to pass in "the
3419 accessibility level determined by the point of call" (AI05-0234)
3420 to the function. Expand_Call, where such actual parameters are
3421 usually generated, is too early in this case because the Etype of
3422 the allocator (which is used in determining the level to be passed
3423 in) may not have been set yet when Expand_Call executes. Instead,
3424 we generate code to pass in the appropriate actual parameter
3425 in Expand_Allocator_Expression.
3426 * sem_ch6.adb (Create_Extra_Formals): Create
3427 the new Extra_Accessibility_Of_Result formal if
3428 Needs_Result_Accessibility_Level returns True. This includes the
3429 introduction of a nested procedure, Check_Against_Result_Level.
3431 2011-09-06 Arnaud Charlet <charlet@adacore.com>
3433 * gcc-interface/Makefile.in (X86_TARGET_PAIRS): Remove duplicate
3436 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
3438 * s-finmas.adb (Set_Finalize_Address): Explain the reason
3439 for the synchronization. Move the test for null from
3440 s-stposu.Allocate_Any_Controlled to this routine since the check
3441 needs to be protected too.
3442 (Set_Heterogeneous_Finalize_Address): Explain the reason for the
3443 synchronization code.
3444 * s-finmas.ads (Set_Heterogeneous_Finalize_Address): Add comment
3445 explaining the context in which this routine is used.
3446 * s-stposu.adb (Allocate_Any_Controlled): Move the test for null
3447 to s-finmas.Set_Finalize_Address.
3449 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3451 * einfo.ads: Document that itypes have no parent field.
3453 2011-09-05 Robert Dewar <dewar@adacore.com>
3455 * rtsfind.adb (Check_CRT): Check for overloaded entity
3456 * rtsfind.ads: Document that entities to be found by rtsfind
3457 cannot be overloaded
3458 * s-taenca.adb, s-tasren.adb, s-tpobop.adb, s-tpoben.ads, s-tpoben.adb
3459 (Lock_Entries_With_Status): New name for Lock_Entries with two
3460 arguments (changed to meet rtsfind no overloading rule).
3462 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
3464 * s-finmas.adb (Set_Finalize_Address (Address,
3465 Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
3466 (Set_Finalize_Address (in out Finalization_Master,
3467 Finalize_Address_Ptr): Add synchronization code.
3468 * s-finmas.ads (Set_Finalize_Address (Address,
3469 Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
3470 * s-stposu.adb (Allocate_Any_Controlled): Update the call to
3471 Set_Finalize_Address for the heterogeneous case.
3473 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3475 * sem_ch3.adb: Undo previous change, not suitable after all.
3477 2011-09-05 Robert Dewar <dewar@adacore.com>
3479 * einfo.ads: Minor comment clarification.
3481 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
3483 * exp_ch6.adb (Move_Activation_Chain): Rewritten. The routine
3484 no longer needs to search through the entities of the return
3485 statement scope to find the _chain.
3486 * sem_ch5.adb: Add with and use clauses for Exp_Ch6 and Sem_Ch6.
3487 (Analyze_Block_Statement): Add local variable
3488 Is_BIP_Return_Statement. Add machinery to install all entities
3489 produced by the expansion of the return object declaration.
3490 (Install_Return_Entities): New routine.
3491 * sem_ch6.ads, sem_ch6.adb (Install_Entity): Moved from body to spec.
3493 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3495 * sem_ch10.adb (Analyze_Context): Apply simple fixup if context
3496 of subunit is incomplete.
3497 (Analyze_Proper_Body): If parent spec is not available, do not
3500 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3502 * sem_disp.adb (Find_Controlling_Arg): Add checks for
3503 interface type conversions, that are expanded into dereferences.
3505 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
3507 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
3508 Examine the parameter and return profile of a subprogram and swap
3509 any incomplete types coming from a limited context with their
3510 corresponding non-limited views.
3511 (Exchange_Limited_Views): New routine.
3513 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3515 * sem_ch3.adb (Prepare_Private_Subtype_Completion): Set parent
3516 of internal entity to the subtype declaration, so that when
3517 entities are subsequently exchanged in a package body, the tree
3518 remains properly formatted for ASIS.
3520 2011-09-05 Johannes Kanig <kanig@adacore.com>
3522 * g-comlin.adb (Set_Usage): Additional optional argument to set help
3524 (Display_Help): display the user given help message, if available.
3526 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3528 * sem_ch3.adb (OK_For_Limited_Init_In_05): The expression
3529 is legal if the original node is an identifier that is a
3530 parameterless function call.
3532 2011-09-05 Pascal Obry <obry@adacore.com>
3534 * prj-nmsc.adb: Minor reformatting.
3535 Add support for standalone aggregate library.
3536 (Check_Stand_Alone_Library): Handle standalone aggregate library.
3537 * projects.texi: Fix documentation for aggregate library projects.
3539 2011-09-05 Robert Dewar <dewar@adacore.com>
3541 * sem_ch6.adb: Minor reformatting.
3543 2011-09-05 Matthew Gingell <gingell@adacore.com>
3545 * s-tassta.adb (Task_Wrapper): Ensure that we don't try to write the
3546 stack guard page on PPC Linux. This patch ensures the 64K guard page at
3547 the bottom of the stack is not overwritten.
3549 2011-09-05 Thomas Quinot <quinot@adacore.com>
3551 * exp_intr.adb, s-tasini.adb: Minor reformatting.
3553 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3555 * sem_ch3.adb (Access_Definition): If an access type declaration
3556 appears in a child unit, the scope of whatever anonymous type
3557 may be generated is the child unit itself.
3559 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3561 * sem_ch6.adb (Analyze_Expression_Function): Do not set
3562 Comes_From_Source on rewritten body.
3563 (Analyze_Subprogram_Body_Helper): Check that the original node for
3564 the body comes from source, when determining whether expansion
3565 of a protected operation is needed.
3567 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3569 * exp_aggr.adb (Replace_Type): If the target of the assignment is
3570 a selected component and the right-hand side is a self-referential
3571 access, the proper prefix of the rewritten attribute is a copy
3572 of the left-hand side, not of its prefix.
3574 2011-09-05 Robert Dewar <dewar@adacore.com>
3576 * sem_ch5.adb: Minor reformatting.
3577 * sem_ch3.adb: Minor code clean up.
3579 2011-09-05 Jose Ruiz <ruiz@adacore.com>
3581 * exp_ch9.adb (Make_Initialize_Protection): The fact that
3582 restriction No_Dynamic_Attachment is in effect or not should
3583 not influence the default priority associated to a protected
3584 object. With this change, when the restriction is in effect (as
3585 is the case for the Ravenscar profile) the default priority of
3586 a protected object with an interrupt handler is in the range of
3587 interrupt priorities (Default_Interrupt_Priority) as required
3590 2011-09-05 Arnaud Charlet <charlet@adacore.com>
3592 * a-iteint.ads: Fix header.
3594 2011-09-05 Vincent Celier <celier@adacore.com>
3596 * prj-conf.adb (Do_Autoconf): Make sure Obj_Dir always ends
3597 with a directory separator to avoid output such as:
3598 "/path/to/objauto.cgpr" has been deleted.
3600 2011-09-05 Robert Dewar <dewar@adacore.com>
3602 * sem_ch3.adb: Minor reformatting.
3604 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3606 * sem_ch5.adb: Better error message.
3608 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
3610 * exp_aggr.adb: Add with and use clause for Exp_Ch6.
3611 (Expand_Array_Aggregate): Detect a special case of an aggregate
3612 which contains tasks in the context of an unexpanded return
3613 statement of a build-in-place function.
3614 * exp_ch6.adb: Add with and use clause for Exp_Aggr.
3615 (Expand_N_Extended_Return_Statement): Detect a delayed aggregate
3616 which contains tasks and expand it now that the original simple
3617 return statement has been rewritten.
3618 * exp_ch9.adb (Build_Activation_Chain_Entity): Code
3619 reformatting. Do not create a chain for an extended return
3620 statement if one is already available.
3621 (Has_Activation_Chain): New routine.
3623 2011-09-05 Marc Sango <sango@adacore.com>
3625 * sem_ch3.adb (Analyze_Object_Declaration): Remove
3626 the wrong test and add the correct test to detect the violation
3627 of illegal use of unconstrained string type in SPARK mode.
3629 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3631 * sem_ch5.adb (Analyze_Iteration_Specification): Improve error
3632 message on an iterator over an array.
3634 2011-09-05 Robert Dewar <dewar@adacore.com>
3636 * lib-xref-alfa.adb: Minor reformatting.
3638 2011-09-05 Robert Dewar <dewar@adacore.com>
3640 * sem_ch3.adb, sem_res.adb, par.adb, par-ch6.adb, g-comlin.adb,
3641 exp_ch6.adb, lib-xref-alfa.adb: Minor reformatting.
3643 2011-09-05 Gary Dismukes <dismukes@adacore.com>
3645 * exp_ch7.adb, exp_ch6.adb: Minor reformatting.
3647 2011-09-05 Johannes Kanig <kanig@adacore.com>
3649 * lib-xref-alfa.adb: Update comments.
3651 2011-09-05 Thomas Quinot <quinot@adacore.com>
3653 * sem_res.adb: Minor reformatting
3655 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3657 * exp_ch6.adb (Build_In_Place_Formal): If extra formals are not
3658 present, create them now. Needed in case the return type was
3659 a limited view in the function declaration.
3660 (Make_Build_In_Place_Call_In_Allocator): If return type contains
3661 tasks, build the activation chain for it. Pass a reference to
3662 the Master_Id in call to Add_Task_Actuals_To_Build_In_Place call.
3663 * exp_ch7.adb (Make_Set_Finalize_Address_Call): Clean up interface
3664 with build_in_place calls.
3665 * sem_ch9.adb (Analyze_Task_Type_Declaration): If partial view was
3666 incomplete, inatialize its Corresponding_Record_Type component.
3667 * sem_ch10.adb (Build_Chain): Initialize Private_Dependents field
3670 2011-09-05 Johannes Kanig <kanig@adacore.com>
3672 * lib-xref-alfa.adb (Is_Alfa_Reference): Filter constants from effect
3675 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3677 * par-ch6.adb (P_Subprogram): In Ada2012 mode, if the subprogram
3678 appears within a package specification and the token after "IS"
3679 is not a parenthesis, assume that this is an unparenthesized
3680 expression function, even if the token appears in a line by
3682 * par.adb: Clarify use of Labl field of scope stack in error
3685 2011-09-05 Bob Duff <duff@adacore.com>
3687 * sem_res.adb (Resolve_Intrinsic_Operator): Use unchecked
3688 conversions instead of normal type conversions in all cases where a
3689 type conversion would be illegal. In particular, use unchecked
3690 conversions when the operand types are private.
3692 2011-09-05 Johannes Kanig <kanig@adacore.com>
3694 * lib-xref-alfa.adb (Is_Alfa_Reference): Never declare effects on
3695 objects of task type or protected type.
3697 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3699 * sem_ch6.adb (Analyze_Expression_Function): If the expression
3700 function comes from source, indicate that so does its rewriting,
3701 so it is compatible with any subsequent expansion of the
3702 subprogram body (e.g. when it is a protected operation).
3703 * sem_ch4.adb: minor reformatting
3705 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
3707 * lib.adb (Check_Same_Extended_Unit): Comment rewriting. Use
3708 Get_Source_Unit rather than Get_Code_Unit as instantiation unfolding
3709 may lead to wrong ancestor package in the case of instantiated subunit
3710 bodies. If a subunit is instantiated, follow the chain of instantiations
3711 rather than the stub structure.
3713 2011-09-02 Robert Dewar <dewar@adacore.com>
3715 * sem_ch4.adb, sem_ch6.adb: Minor reformatting.
3716 * gcc-interface/Make-lang.in: Update dependencies.
3718 2011-09-02 Marc Sango <sango@adacore.com>
3720 * sem_ch3.adb (Analyze_Object_Declaration): Change
3721 comment and add additional check to differentiate constant of
3722 type string from others unconstrained type.
3724 2011-09-02 Ed Schonberg <schonberg@adacore.com>
3726 * sinfo.ads, sinfo.adb: New semantic attribute Premature_Use,
3727 present in incomplete type declarations to refine the error
3728 message the full declaration is in the same unit.
3729 * sem_ch4.adb (Analyze_Selected_Component): If the prefix is of
3730 an incomplete type, set the Premature_Use for additional message.
3731 * sem_ch3.adb (Find_Type_Name): If partial view is incomplete
3732 and Premature_Use is set, place additional information at the
3733 point of premature use.
3735 2011-09-02 Bob Duff <duff@adacore.com>
3737 * sem_ch6.adb: (Check_Post_State): Suppress warning
3738 "postcondition refers only to pre-state" when the expression has not
3739 yet been analyzed, because it causes false alarms. This can happen when
3740 the postcondition contains a quantified expression, because those are
3741 analyzed later. This is a temporary/partial fix.
3742 (Process_Post_Conditions): Minor: change wording of warning.
3744 2011-09-02 Marc Sango <sango@adacore.com>
3746 * sem_ch3.adb (Analyze_Object_Declaration): Detect the violation of
3747 illegal use of unconstrained string type in SPARK mode.
3748 * sem_res.adb (Analyze_Operator_Symbol): Set the
3749 right place where the string operand of concatenation should be
3750 violate in SPARK mode.
3752 2011-09-02 Robert Dewar <dewar@adacore.com>
3754 * sem_prag.adb, sem_util.adb, sem_ch6.adb, prj-nmsc.adb,
3755 exp_ch3.adb: Minor reformatting.
3757 2011-09-02 Vincent Celier <celier@adacore.com>
3759 * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Declare "gcc"
3760 as the compiler driver so Is_Compilable returns True for sources.
3761 * prj-nmsc.adb (Override_Kind): When Kind is Sep, set the source
3764 2011-09-02 Ed Schonberg <schonberg@adacore.com>
3766 * sem_prag.adb (Analyze_PPC_In_Decl_Part): for a class-wide
3767 condition, a reference to a controlling formal must be interpreted
3768 as having the class-wide type (or an access to such) so that the
3769 inherited condition can be properly applied to any overriding
3770 operation (see ARM12 6.6.1 (7)).
3772 2011-09-02 Tristan Gingold <gingold@adacore.com>
3774 * init.c (__gnat_is_vms_v7): Fix case and add prototype
3777 2011-09-02 Javier Miranda <miranda@adacore.com>
3779 * exp_ch3.adb (Expand_N_Object_Declaration): Do not copy the
3780 initializing expression of a class-wide interface object declaration
3781 if its type is limited.
3783 2011-09-02 Johannes Kanig <kanig@adacore.com>
3785 * sem_util.adb (Unique_Name): To obtain a unique name for enumeration
3786 literals, take into account the type name; the type is *not*
3787 the scope for an enumeration literal.
3789 2011-09-02 Ed Schonberg <schonberg@adacore.com>
3791 * sem_ch6.adb (Check_Overriding_Indicator): add special check
3792 to reject an overriding indicator on a user-defined Adjust
3793 subprogram for a limited controlled type.
3795 2011-09-02 Ed Schonberg <schonberg@adacore.com>
3797 * sem_res.adb (Resolve_Actuals): add missing call to Resolve
3798 for an actual that is a function call returning an unconstrained
3799 limited controlled type.
3801 2011-09-02 Tristan Gingold <gingold@adacore.com>
3803 * g-socthi-vms.adb (c_sendmsg, c_recvmsg): Use unpacked msg if on vms 7
3805 2011-09-02 Johannes Kanig <kanig@adacore.com>
3807 * alfa.ads (Name_Of_Heap_Variable): Change value of the HEAP variable
3808 from "HEAP" to __HEAP Change comment that refers to that variable
3809 * put_alfa.adb: Change comment that refers to that variable
3811 2011-09-02 Robert Dewar <dewar@adacore.com>
3813 * exp_ch4.adb, exp_ch6.adb, prj-nmsc.adb: Minor reformatting.
3815 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
3817 * exp_util.adb (Extract_Renamed_Object): Renamed to
3818 Find_Renamed_Object. This routine has been reimplemented and now uses
3819 tree traversal to locate a renamed object.
3820 (Is_Aliased): Replace call to Extract_Renamed_Object with
3821 Find_Renamed_Object.
3823 2011-09-02 Tristan Gingold <gingold@adacore.com>
3825 * init.c: (__gnat_is_vms_v7): New function.
3827 2011-09-02 Olivier Hainque <hainque@adacore.com>
3829 * tracebak.c (STOP_FRAME, ppc elf/vxworks case): Stop on frames
3830 that have a misaligned backchain, necessarily bogus.
3832 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
3834 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not create
3835 TSS routine Finalize_Address when compiling in Alfa mode.
3836 (Expand_Freeze_Record_Type): Do not create TSS routine
3837 Finalize_Address when compiling in Alfa mode.
3838 * exp_ch4.adb (Expand_Allocator_Expression): Do not produce a
3839 call to Set_Finalize_Address in Alfa mode because Finalize_Address is
3841 (Expand_N_Allocator): Do not produce a call to
3842 Set_Finalize_Address in Alfa mode because Finalize_Address is not built.
3843 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Do not
3844 produce a call to primitive Set_Finalize_Address in Alfa mode because
3845 Finalize_Address is not built.
3846 * exp_ch7.adb (Build_Finalization_Master): Do not create
3847 finalization masters in Afa mode since they are not needed.
3848 (Build_Finalizer): Do not create scope and library-level
3849 finalizers in Alfa mode since they are not needed.
3850 * exp_util.adb (Build_Allocate_Deallocate_Proc): Do not expand
3851 "new" and "free" when applied to controlled objects in Alfa mode since
3854 2011-09-02 Vincent Celier <celier@adacore.com>
3856 * prj-nmsc.db: (Check_Stand_Alone_Library): For SALs, allow
3857 only library names with the syntax of Ada identifiers, to avoid errors
3858 when compiling the binder generated files.
3859 * projects.texi: Document restriction on SAL library names
3861 2011-09-02 Thomas Quinot <quinot@adacore.com>
3863 * a-chtgbo.adb: Minor comment fix.
3865 2011-09-02 Robert Dewar <dewar@adacore.com>
3867 * lib-xref.adb: Minor reformatting
3869 2011-09-02 Vincent Celier <celier@adacore.com>
3871 * bindusg.adb, clean.adb, gnatchop.adb, gnatfind.adb, gnatlink.adb,
3872 gnatls.adb, gnatname.adb, gnatxref.adb, gprep.adb, makeusg.adb: Add
3873 --version and --help in usage.
3874 * switch.ads, switch.adb (Display_Usage_Version_And_Help): New procedure
3876 2011-09-02 Bob Duff <duff@adacore.com>
3878 * lib-xref.adb: (Hash): Avoid use of 'Mod attribute, because old
3879 compilers don't understand it.
3881 2011-09-02 Gary Dismukes <dismukes@adacore.com>
3883 * exp_attr.adb (Expand_N_Attribute_Reference): Pass the
3884 underlying subtype rather than its base type on the call to
3885 Build_Record_Or_Elementary_Input_Function, so that any
3886 constraints on a discriminated subtype will be available for
3887 doing the check required by AI05-0192.
3888 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
3889 If the prefix subtype of the 'Input attribute is a constrained
3890 discriminated subtype, then check each constrained discriminant value
3891 against the corresponding value read from the stream.
3893 2011-09-02 Yannick Moy <moy@adacore.com>
3895 * usage.adb, warnsw.adb, sem_ch6.adb, opt.ads: Disable by default
3896 warnings on suspicious contracts, and enable them with -gnatwa.
3898 2011-09-02 Robert Dewar <dewar@adacore.com>
3900 * exp_util.adb, exp_ch9.adb, sem_attr.adb, sem_ch6.adb: Minor
3903 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
3905 * exp_ch9.adb (Install_Private_Data_Declarations): Add guards
3906 which ensure that restriction No_Dynamic_Attachment has not been
3908 (Make_Initialize_Protection): Protected types with attach or
3909 interrupt handlers must not violate restriction No_Dynamic_Attachment.
3910 * exp_util.adb (Corresponding_Runtime_Package): Add a guard
3911 which ensures that restriction No_Dynamic_Attachment has not been
3913 * sem_attr.adb: (Eval_Attribute): Transform
3914 VAX_Float_Type'First and 'Last into references to
3915 the temporaries which store the corresponding bounds. The
3916 transformation is needed since the back end cannot evaluate
3917 'First and 'Last on VAX.
3918 (Is_VAX_Float): New routine.
3920 2011-09-02 Ed Schonberg <schonberg@adacore.com>
3922 * sem_ch12.adb (Analyze_Subprogram_Instantiation): If the
3923 generic unit is not intrinsic and has an explicit convention,
3924 the instance inherits it.
3926 2011-09-02 Robert Dewar <dewar@adacore.com>
3928 * prj-dect.adb, prj-env.adb, prj-nmsc.adb, prj-proc.adb, prj-tree.adb,
3929 prj.adb, prj.ads, sem_ch5.adb: Minor reformatting.
3931 2011-09-02 Thomas Quinot <quinot@adacore.com>
3933 * sem_attr.adb (Analyze_Attribute, case Unrestriced_Access):
3934 Guard against a prefix that is an N_Has_Entity but has no
3937 2011-09-02 Yannick Moy <moy@adacore.com>
3939 * lib-xref-alfa.adb (Is_Alfa_Reference): Ignore IN parameters in Alfa
3942 2011-09-02 Yannick Moy <moy@adacore.com>
3944 * opt.ads (Warn_On_Suspicious_Contract): New warning flag.
3945 * sem_ch3.adb (Analyze_Declarations): Call checker for suspicious
3947 * sem_ch6.adb, sem_ch6.ads (Check_Subprogram_Contract): New
3948 procedure looking for suspicious postconditions.
3949 * usage.adb (Usage): New options -gnatw.t and -gnatw.T.
3950 * warnsw.adb (Set_Dot_Warning_Switch): Take into account new
3951 options -gnatw.t and -gnatw.T.
3953 2011-09-02 Pascal Obry <obry@adacore.com>
3955 * prj.adb: Minor code refactoring. Move check for null project in
3957 * projects.texi: Fix minor typos.
3959 2011-09-02 Ed Schonberg <schonberg@adacore.com>
3961 * sem_ch5.adb (Analyze_Iterator_Specification): If the domain
3962 of iteration is an expression, its value must be captured in a
3963 renaming declaration, so that modification of the elements is
3964 propagated to the original container.
3966 2011-09-02 Pascal Obry <obry@adacore.com>
3968 * prj-proc.adb, prj.adb, makeutl.adb, makeutl.ads, prj-dect.adb,
3969 prj-nmsc.adb, prj-util.adb, prj-conf.adb, prj-env.adb,
3970 prj-tree.adb: Minor reformatting and style fixes.
3972 2011-09-02 Robert Dewar <dewar@adacore.com>
3974 * s-rident.ads: Add new restriction No_Implicit_Aliasing
3975 * sem_attr.adb: (Analyze_Access_Attribute): Deal with
3976 No_Implicit_Aliasing
3977 (Analyze_Attribute, case Address): ditto
3978 (Analyze_Attribute, case Unrestricted_Access): ditto
3979 * sem_util.ads, sem_util.adb: (Is_Aliased_View): Handle
3980 No_Implicit_Aliasing restriction.
3981 * gnat_rm.texi: Add documentation for No_Implicit_Aliasing
3983 2011-09-02 Ed Schonberg <schonberg@adacore.com>
3985 * exp_util.adb: (Possible_Bit_Aligned_Object): If the object
3986 is an unchecked conversion, apply test to its expression.
3988 2011-09-02 Javier Miranda <miranda@adacore.com>
3990 * sem_ch3.adb (Check_Abstract_Overriding): When
3991 traversing the chain of aliased subprograms avoid reporting a
3992 redundant error on the current entity.
3994 2011-09-02 Sergey Rybin <rybin@adacore.com>
3996 * gnat_ugn.texi: Minor clean up.
3998 2011-09-02 Bob Duff <duff@adacore.com>
4000 * s-htable.adb (Set_If_Not_Present): Use renaming
4001 instead of ":=", because the type Key is limited in the generic (even
4002 if not in the instances).
4004 2011-09-02 Robert Dewar <dewar@adacore.com>
4006 * exp_util.adb, sem_ch10.adb, sem_attr.adb, s-htable.adb,
4007 g-comlin.adb, g-comlin.ads, lib-xref-alfa.adb, lib-xref.adb: Minor
4010 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
4012 * sem_ch3.adb: (Set_Anonymous_Type): Associate the itype of an
4013 inherited component with the enclosing derived type. Code reformatting.
4015 2011-09-02 Gary Dismukes <dismukes@adacore.com>
4017 * checks.adb: (Determine_Range): Add test of OK1 to prevent the early
4018 return done when overflow checks are enabled, since comparisons against
4019 Lor and Hir should not be done when OK1 is False.
4021 2011-09-02 Gary Dismukes <dismukes@adacore.com>
4023 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
4024 Add new formal Master_Exp. When present, add that expression to the
4025 call as an extra actual.
4026 (Make_Build_In_Place_Call_In_Object_Declaration): Add variable
4027 Fmaster_Actual and in the case of a BIP call initializing a return
4028 object of an enclosing BIP function set it to a
4029 new reference to the implicit finalization master
4030 formal of the enclosing function. Fmaster_Actual is
4031 then passed to the new formal Master_Exp on the call to
4032 Add_Finalization_Master_Actual_To_Build_ In_Place_Call. Move
4033 initializations of Enclosing_Func to its declaration.
4035 2011-09-02 Thomas Quinot <quinot@adacore.com>
4037 * csets.ads: Minor reformatting
4039 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
4041 * exp_aggr.adb: (Get_Constraint_Association): Add code to retrieve
4042 the full view of a private type coming from an instantiation.
4043 * exp_ch4.adb: (Current_Anonymous_Master): Reimplement the search
4044 loop to iterate over the declarations rather than use the
4045 First_Entity / Next_Entity scheme.
4047 2011-09-02 Ed Schonberg <schonberg@adacore.com>
4049 * sem_attr.adb: (Analyze_Attribute, case 'Range): when expanding
4050 X'range (N) into X'First (N) .. X'Last (N), do not share the
4051 dimension indicator N, if present. Even though it is a static
4052 constant, its source location may be modified when printing
4053 expanded code under -gnatDL, and node sharing will lead to chaos
4054 in Sprint on large files, by generating a sloc value that does
4055 not correspond to any source file.
4057 2011-09-02 Bob Duff <duff@adacore.com>
4059 * einfo.adb: (Has_Xref_Entry): Do not call
4060 Implementation_Base_Type. Lib.Xref has been
4061 rewritten to avoid the need for it, and it was costly.
4062 * s-htable.ads,s-htable.adb: (Present,Set_If_Not_Present): New
4063 functions in support of efficient xref.
4064 * lib-xref-alfa.adb: Misc changes related to Key component of
4066 * lib-xref.adb: (Add_Entry,etc): Speed improvement.
4067 (New_Entry): Call Implementation_Base_Type, because Has_Xref_Entry
4068 no longer does. This is the one place where it is needed.
4070 2011-09-02 Johannes Kanig <kanig@adacore.com>
4072 * g-comlin.adb (Getopt): New optional argument Concatenate to have
4073 similar interface as the other Getopt function.
4075 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
4077 * exp_ch4.adb: (Expand_Allocator_Expression): Do not generate
4078 a call to Set_Finalize_Address if there is no allocator available.
4079 * exp_util.adb: (Build_Allocate_Deallocate_Proc): Account for
4080 a case of allocator expansion where the allocator is not expanded but
4081 needs a custom allocate routine. Code reformatting.
4082 (Is_Finalizable_Transient): Remove local variables Has_Rens and
4083 Ren_Obj. Code reformatting.
4084 (Is_Renamed): Renamed to Is_Aliased. Add code to detect aliasing
4085 through the use of 'reference.
4086 * sem_ch4.adb: (Analyze_Allocator): Detect allocators generated
4087 as part of build-in-place expansion. They are intentionally marked as
4088 coming from source, but their parents are not.
4090 2011-09-02 Ed Schonberg <schonberg@adacore.com>
4092 * sem_ch10.adb (Analyze_With_Clause): If the library unit
4093 is the generated subprogram declaration for a child unit body
4094 that acts as spec, use the original body in the with_clause,
4095 to prevent binding errors.
4097 2011-09-02 Vincent Celier <celier@adacore.com>
4099 * gnat_ugn.texi: Adapt documentation of -gnateInnn to new VMS
4100 qualifier /MULTI_UNIT_INDEX=
4102 2011-09-02 Johannes Kanig <kanig@adacore.com>
4104 * g-comlin.adb (Getopt): Return when switch is dealt with automatically,
4105 instead of calling the callback function
4107 2011-09-02 Robert Dewar <dewar@adacore.com>
4109 * prj-proc.adb, prj.ads, sem_util.adb, s-taprop-linux.adb,
4110 prj-nmsc.adb, prj-util.ads, prj-env.adb: Minor reformatting.
4112 2011-09-02 Vincent Celier <celier@adacore.com>
4114 * prj-nmsc.adb: (Find_Sources): When the list of sources is
4115 explicitly declared in an extending project, do not warn if a source
4116 for an inherited naming exception is not found.
4118 2011-09-02 Gary Dismukes <dismukes@adacore.com>
4120 * exp_ch6.adb: (Is_Build_In_Place_Function_Call): Return False if
4121 expansion is inactive.
4123 2011-09-02 Ed Schonberg <schonberg@adacore.com>
4125 * sem_util.adb (Note_Possible_Modification): If the entity
4126 being modified is the renaming generated for an Ada2012 iterator
4127 element, the enclosing container or array is modified as well.
4129 2011-09-02 Jose Ruiz <ruiz@adacore.com>
4131 * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB,
4132 Initialize): Define and initialize the
4133 mutex attributes and condition variable attributes locally.
4135 2011-09-02 Vincent Celier <celier@adacore.com>
4137 * prj-nmsc.adb (Check_File): Mark as Locally_Removed a naming
4138 exception replaced in an extending project.
4139 (Check_Object): No error when the other source is locally removed.
4141 2011-09-02 Yannick Moy <moy@adacore.com>
4143 * exp_ch6.adb (Is_Build_In_Place_Function_Call): in Alfa mode, allow
4146 2011-08-31 Arnaud Charlet <charlet@adacore.com>
4148 * gcc-interface/Makefile.in: Clean up handling of x86 and x86-64
4150 * gcc-interface/Make-lang.in: Update dependencies.
4152 2011-09-01 Robert Dewar <dewar@adacore.com>
4154 * sem_ch3.adb, s-taprop-linux.adb, gnatls.adb: Minor reformatting.
4156 2011-09-01 Jose Ruiz <ruiz@adacore.com>
4158 * adaint.h (__gnat_cpu_free): Fix the name of this profile.
4159 * adaint.c (__gnat_cpu_alloc, __gnat_cpu_alloc_size, __gnat_cpu_free,
4160 __gnat_cpu_zero, __gnat_cpu_set): Create version of these subprograms
4161 specific for systems where their glibc version does not define the
4162 routines to handle dynamically allocated CPU sets.
4164 2011-09-01 Vincent Celier <celier@adacore.com>
4166 * prj-proc.adb, prj.ads, prj-nmsc.adb, prj-util.adb, prj-util.ads,
4167 prj-env.adb: Implement inheritance of naming exceptions in extending
4170 2011-09-01 Romain Berrendonner <berrendo@adacore.com>
4172 * gnatls.adb: Display simple message instead of content of
4175 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
4177 * sem_ch3.adb: (Build_Derived_Record_Type) Remove the kludgy update of
4178 access discriminant and anonymous access component scopes.
4179 (Inherit_Component): Reuse the itype of an access discriminant
4180 or anonymous access component by copying it in order to set the proper
4181 scope. This is done only when the parent and the derived type
4182 are in different scopes.
4183 (Set_Anonymous_Etype): New routine.
4185 2011-09-01 Robert Dewar <dewar@adacore.com>
4187 * a-convec.adb: Minor reformatting throughout.
4189 2011-09-01 Jose Ruiz <ruiz@adacore.com>
4191 * adaint.c, adaint.h (__gnat_cpu_alloc, __gnat_cpu_alloc_size,
4192 __gnat_cpu_set_free): Create these wrappers around the CPU_ALLOC,
4193 CPU_ALLOC_SIZE and CPU_FREE linux macros.
4194 (__gnat_cpu_zero, __gnat_cpu_set): Use the CPU_ZERO_S and
4195 CPU_SET_S respectively because we are now using dynamically allocated
4196 CPU sets which are more portable across different glibc versions.
4197 * s-osinte-linux.ads (cpu_set_t_ptr, CPU_ALLOC, CPU_ALLOC_SIZE,
4198 CPU_FREE): Add this type and subprograms to be able to create cpu_set_t
4199 masks dynamically according to the number of processors in the target
4201 (CPU_ZERO, CPU_SET): They are now mapped to the CPU_ZERO_S and CPU_SET_S
4202 respectively, so we need to pass the size of the masks as
4204 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use dynamically
4205 created cpu_set_t masks
4206 with the number of processors available in the target platform,
4207 instead of static bit arrays. It enhances portability because
4208 it uses the information from the target platform.
4209 * sem_ch8.adb: (Attribute_Renaming): When checking whether we
4210 are using a restricted run-time library, use the flag
4211 Configurable_Run_Time_Mode instead of Restricted_Profile.
4213 2011-09-01 Vincent Celier <celier@adacore.com>
4215 * ug_words: Add /MULTI_UNIT_INDEX= -> -gnateI
4216 * vms_data.ads: Add new VMS qualifier equivalent for -gnateInnn
4218 2011-09-01 Nicolas Roche <roche@adacore.com>
4220 * adaint.c (__gnat_tmp_name): Don't use tmpnam function from the system
4221 on VxWorks in kernel mode.
4223 2011-09-01 Jose Ruiz <ruiz@adacore.com>
4225 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use the linux
4226 macros for handling CPU sets (CPU_ZERO, CPU_SET) instead of modifying
4227 directly the bit array.
4228 * s-osinte-linux.ads (CPU_ZERO, CPU_SET): Import these wrappers around
4229 the linux macros with the same name.
4230 * adaint.h, adaint.c (__gnat_cpu_zero, __gnat_cpu_set): Create these
4231 wrappers around the CPU_ZERO and CPU_SET linux macros.
4233 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
4235 * exp_ch7.adb (Find_Insertion_List): Removed.
4236 (Process_Transient_Objects): Insert the declarations of the hook
4237 access type and the hook object before the associated transient object.
4239 2011-09-01 Jose Ruiz <ruiz@adacore.com>
4241 * sem_ch8.adb (Attribute_Renaming): Add missing check to avoid loading
4242 package System.Aux_Dec when using restricted run-time libraries which
4243 do not have this package.
4245 2011-09-01 Tristan Gingold <gingold@adacore.com>
4247 * s-vaflop-vms-alpha.adb: Remove pragma optimize, useless.
4249 2011-09-01 Bob Duff <duff@adacore.com>
4251 * sem_attr.adb (Analyze_Access_Attribute): Do not call
4252 Kill_Current_Values for P'Unrestricted_Access, where P is library level
4254 2011-09-01 Thomas Quinot <quinot@adacore.com>
4256 * exp_ch5.adb: Minor reformatting
4257 * gnat_ugn.texi: Fix minor typos.
4258 * gcc-interface/Make-lang.in: Update dependencies.
4260 2011-09-01 Robert Dewar <dewar@adacore.com>
4262 * inline.adb, sem_aggr.adb: Minor reformatting.
4264 2011-09-01 Ed Schonberg <schonberg@adacore.com>
4266 * a-convec.adb: Proper handling of cursors for Ada2012 iterators.
4268 2011-09-01 Robert Dewar <dewar@adacore.com>
4270 * prj-proc.adb, exp_ch6.adb, prj-env.adb: Minor reformatting.
4272 2011-09-01 Bob Duff <duff@adacore.com>
4274 * sem_aggr.adb (Resolve_Aggregate): Need to treat "in instance
4275 body" the same as "in inlined body", because visibility shouldn't
4278 2011-09-01 Eric Botcazou <ebotcazou@adacore.com>
4280 * inline.adb (Add_Inlined_Body): Refine previous change.
4282 2011-09-01 Gary Dismukes <dismukes@adacore.com>
4284 * exp_ch6.ads (Needs_BIP_Alloc_Form): New utility function.
4285 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
4286 Test for case where call
4287 initializes an object of a return statement before testing for
4288 a constrained call, to ensure that all such cases get handled
4289 by simply passing on the caller's parameters. Also, in that
4290 case call Needs_BIP_Alloc_Form to determine whether to pass on
4291 the BIP_Alloc_Form parameter of the enclosing function rather
4292 than testing Is_Constrained. Add similar tests for the return
4293 of a BIP call to later processing to ensure consistent handling.
4294 (Needs_BIP_Alloc_Form): New utility function.
4295 * sem_ch6.adb: (Create_Extra_Formals): Replace test for adding
4296 a BIP_Alloc_Form formal with call to new utility function
4297 Needs_BIP_Alloc_Form.
4299 2011-09-01 Pascal Obry <obry@adacore.com>
4301 * prj-part.adb: Minor reformatting.
4303 2011-09-01 Vincent Celier <celier@adacore.com>
4305 * prj-env.adb (Create_Mapping_File.Process): Encode the upper
4306 half character in the unit name.
4308 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
4310 * exp_ch4.adb: Minor code and comment reformatting.
4312 2011-09-01 Thomas Quinot <quinot@adacore.com>
4314 * exp_ch6.adb (Expand_Inlined_Call): Remove redundant tests
4315 for Is_Limited_Type and Is_Tagged_Type in condition checking
4316 for by-reference type.
4317 * inline.adb (Add_Inlined_Body): Only exclude init_procs. Other
4318 subprograms may have a completion because of a previous
4319 Inline_Always clause, but the enclosing package must be marked
4320 inlined for the subprogram body to become visible to the backend.
4322 2011-09-01 Thomas Quinot <quinot@adacore.com>
4324 * sem_aux.adb, exp_ch4.adb: Minor reformatting
4326 2011-09-01 Pascal Obry <obry@adacore.com>
4328 * prj-proc.adb, prj.ads, sinput-p.adb: Minor reformatting.
4330 2011-09-01 Ed Schonberg <schonberg@adacore.com>
4332 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Generate references to
4333 the formals of a subprogram stub that acts as a spec.
4335 2011-09-01 Ed Schonberg <schonberg@adacore.com>
4337 * exp_ch6.adb (Expand_Inlined_Call): If an actual is a by_reference
4338 type, declare a renaming for it, not an object declaration.
4340 2011-09-01 Yannick Moy <moy@adacore.com>
4342 * ali-util.adb, ali-util.ads (Read_Withed_ALIs): Add parameter
4343 Ignore_Errors to ignore failures to read ALI files when True.
4345 2011-09-01 Javier Miranda <miranda@adacore.com>
4347 * exp_ch3.adb (Expand_N_Object_Declaration): Handle non-default
4348 constructor calls associated with non-tagged record types.
4350 2011-09-01 Robert Dewar <dewar@adacore.com>
4352 * g-socthi-vms.adb: Minor reformatting.
4354 2011-09-01 Nicolas Roche <roche@adacore.com>
4356 * sysdep.c: Don't use macro functions for stdio functions on VxWorks
4357 in order to avoid impact of imcompatible changes.
4358 * cstreams.c: Likewise
4360 * aux-io.c: Likewise
4362 2011-09-01 Yannick Moy <moy@adacore.com>
4364 * lib-writ.adb (Write_With_Lines): Always output complete information
4365 on "with" line in Alfa mode, as this is required by formal verification
4368 2011-09-01 Tristan Gingold <gingold@adacore.com>
4370 * g-socthi-vms.adb: Add comments.
4372 2011-09-01 Pascal Obry <obry@adacore.com>
4374 * prj.ads: Minor reformatting.
4376 2011-09-01 Vincent Celier <celier@adacore.com>
4378 * prj-env.adb (Create_Config_Pragmas_File.Check): Put all naming
4379 exceptions in the config pragmas file.
4381 2011-09-01 Tristan Gingold <gingold@adacore.com>
4383 * gnat_ugn.texi: Document GNAT_STACK_SIZE on IVMS.
4385 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
4387 * exp_ch7.adb (Find_Insertion_List): New routine.
4388 (Process_Transient_Objects): Add code to handle the abnormal
4389 finalization of a controlled transient associated with a subprogram
4390 call. Since transients are cleaned up right after the associated
4391 context, an exception raised during a subprogram call may bypass the
4394 2011-09-01 Robert Dewar <dewar@adacore.com>
4396 * exp_ch6.adb (Expand_Call): Check actual for aliased parameter is
4399 2011-09-01 Robert Dewar <dewar@adacore.com>
4401 * exp_ch4.adb, a-exexda.adb: Minor reformatting.
4403 2011-09-01 Robert Dewar <dewar@adacore.com>
4405 * s-taskin.ads, s-tassta.adb, sem_ch13.adb: Minor reformatting.
4407 2011-09-01 Thomas Quinot <quinot@adacore.com>
4409 * Makefile.rtl: Move s-oscons.o from GNATRTL_TASKING_OBJS to
4410 GNATRTL_NONTASKING_OBJS.
4412 2011-09-01 Robert Dewar <dewar@adacore.com>
4414 * einfo.ads (Is_Aliased): Fix existing documentation and add note on
4415 possibility of this flag being set for formals in Ada 2012 mode.
4416 * par-ch6.adb (P_Formal_Part): Handle aliased for parameters for Ada
4418 * sem_ch6.adb (Process_Formals): Handle aliased parameters in Ada 2012
4420 * sinfo.adb (Aliased_Present): Allowed in N_Parameter_Specification for
4422 * sinfo.ads (Aliased_Present): Allowed in N_Parameter_Specification for
4425 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
4427 * exp_ch4.adb (Find_Insertion_Node): New routine. Determines the proper
4428 insertion node in a tree of nested Expression_With_Actions nodes.
4429 (Process_Transient_Object): In the case where a complex if statement
4430 has been converted into nested Expression_With_Actions nodes, the
4431 "hook" object and the associated access type must be inserted before
4432 the top most Expression_With_Actions.
4434 2011-09-01 Robert Dewar <dewar@adacore.com>
4436 * a-cbprqu.adb, a-cbprqu.ads, a-cuprqu.adb, a-cuprqu.ads,
4437 a-cbsyqu.adb, a-cbsyqu.ads: Minor reformatting.
4439 2011-09-01 Ed Schonberg <schonberg@adacore.com>
4441 * sem_attr.adb: Conditionalize aliasing predicates to Ada2012.
4443 2011-09-01 Jose Ruiz <ruiz@adacore.com>
4445 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the CPU
4447 * aspects.adb (Canonical_Aspect): Add entry for the CPU aspect.
4448 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the CPU aspect
4449 in a similar way as we do for the Priority or Dispatching_Domain aspect.
4450 * s-mudido-affinity.adb (Dispatching_Domain_Tasks,
4451 Dispatching_Domains_Frozen): Move this local data to package
4452 System.Tasking because with the CPU aspect we need to have access
4453 to this data when creating the task in System.Tasking.Stages.Create_Task
4454 * s-taskin.ads (Dispatching_Domain_Tasks, Dispatching_Domains_Frozen):
4455 Move these variables from the body of
4456 System.Multiprocessors.Dispatching_Domains because with the CPU aspect
4457 we need to have access to this data when creating the task in
4458 System.Tasking.Stages.Create_Task.
4459 * s-taskin.adb (Initialize): Signal the allocation of the environment
4460 task to a CPU, if any, so that we know whether the CPU can be
4461 transferred to a different dispatching domain.
4462 * s-tassta.adb (Create_Task): Check whether the CPU to which this task
4463 is being allocated belongs to the dispatching domain where the task
4464 lives. Signal the allocation of the task to a CPU, if any, so that we
4465 know whether the CPU can be transferred to a different dispatching
4468 2011-09-01 Ed Schonberg <schonberg@adacore.com>
4470 * exp_attr.adb, sem_attr.adb, snames.ads-tmpl: Implementation of
4471 attributes Same_Storage and Overlaps_Storage.
4473 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
4475 * exp_strm.adb: Remove with and use clause for Opt.
4476 (Build_Array_Input_Function): Remove the version-dependent generation
4477 of the return statement. The Ada 2005 tree is now the default.
4479 2011-09-01 Yannick Moy <moy@adacore.com>
4481 * put_alfa.adb: Unconditionnally write files in Alfa section, so that
4482 it is never empty when compiling in Alfa mode.
4484 2011-09-01 Robert Dewar <dewar@adacore.com>
4486 * sem_aggr.adb, sem_ch3.adb, a-direct.adb, s-taprop-vxworks.adb,
4487 comperr.adb, exp_ch9.adb, exp_pakd.adb, sem_ch12.adb, freeze.adb,
4488 s-taprop-mingw.adb, s-taprop-linux.adb, s-taprop-solaris.adb,
4489 gnat1drv.adb, a-rbtgbo.adb, exp_dist.adb: Minor reformatting
4491 2011-09-01 Matthew Heaney <heaney@adacore.com>
4493 * Makefile.rtl, impunit.adb: Add a-csquin.ads, a-cusyqu.ad[sb],
4494 a-cuprqu.ad[sb], a-cbsyqu.ad[sb], a-cbprqu.ad[sb]
4495 * a-csquin.ads: New Ada 2012 unit that specifies the queue interface
4496 * a-cusyqu.ads, a-cusyqu.adb: New Ada 2012 unit that specifies the
4497 unbounded queue container.
4498 * a-cbsyqu.ads, a-cbsyqu.adb: New Ada 2012 unit that specifies the
4499 bounded queue container.
4500 * a-cuprqu.ads, a-cuprqu.adb: New Ada 2012 unit that specifies the
4501 unbounded priority queue container.
4502 * a-cbprqu.ads, a-cbprqu.adb: New Ada 2012 unit that specifies the
4503 bounded priority queue container.
4505 2011-08-31 Pascal Obry <obry@adacore.com>
4507 * a-direct.adb: Do not try to create an UNC path on Windows.
4508 (Create_Path): Skip leading computer name in UNC path if any.
4510 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
4512 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): Remove the
4513 version-dependent generation of the return statement. The Ada 2005 tree
4516 2011-08-31 Thomas Quinot <quinot@adacore.com>
4518 * rtsfind.ads, exp_dist.adb (Find_Numeric_Representation): Predefined
4519 types Stream_Element_Offset and Storage_Offset have a different native
4520 type depending on whether the platform is 32 or 64 bits. When
4521 exchanging them, always convert to 64 bits.
4523 2011-08-31 Yannick Moy <moy@adacore.com>
4525 * debug.adb: Reserve debug option -gnatd.E for passing gnatprove option
4526 --force-alfa to gnat2why.
4528 2011-08-31 Ed Schonberg <schonberg@adacore.com>
4530 * sem_ch12.adb (Save_References): If the node has aspects, save
4531 references within the corresponding expressions in a separate step,
4532 because the aspects are not directly in the tree for the declaration
4533 to which they belong.
4535 2011-08-31 Arnaud Charlet <charlet@adacore.com>
4537 * freeze.adb (Freeze_Record_Type): Omit test on variable size component
4538 in CodePeer mode, since representation clauses are partially ignored.
4539 * gcc-interface/Make-lang.in: Update dependencies.
4541 2011-08-31 Jose Ruiz <ruiz@adacore.com>
4543 * s-taprop-vxworks.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
4544 s-taprop-solaris.adb (Create_Task): Not_A_Specific_CPU can be assigned
4545 to any dispatching domain.
4547 2011-08-31 Thomas Quinot <quinot@adacore.com>
4549 * exp_ch4.adb: Minor reformatting.
4551 2011-08-31 Bob Duff <duff@adacore.com>
4553 * sem_ch6.adb (Get_Generic_Parent_Type): Don't query Subtype_Indication
4554 on nodes for which it is not defined.
4555 (Is_Non_Overriding_Operation): Exit the loop when we find a generic
4558 2011-08-31 Bob Duff <duff@adacore.com>
4560 * sem_ch3.adb (Process_Full_View): Disable legality check if
4561 In_Instance, to avoid spurious errors.
4562 * sem_ch12.adb (Validate_Derived_Type_Instance): Disable legality check
4563 if In_Instance, to avoid spurious errors.
4565 2011-08-31 Pascal Obry <obry@adacore.com>
4567 * a-direct.adb: Use Dir_Seps everywhere to properly handle all
4568 directory speparators.
4569 (Compose): Use Dir_Seps to handle both forms.
4570 (Create_Path): Use Dir_Seps instead of explicit check, no semantic
4572 (Extension): Use Dir_Seps to handle both forms.
4574 2011-08-31 Pascal Obry <obry@adacore.com>
4576 * prj-conf.adb: Minor reformatting.
4578 2011-08-31 Jose Ruiz <ruiz@adacore.com>
4580 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the
4581 dispatching domain aspect.
4582 * aspects.adb (Canonical_Aspect): Add entry for the dispatching domain
4584 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the
4585 Dispatching_Domain aspect in a similar way as we do for the Priority
4587 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Add the
4588 Dispatching_Domain component if a Dispatching_Domain pragma or aspect
4590 (Make_Task_Create_Call): Add the Dispatching_Domain when creating a task
4591 * par-prag.adb (Prag): Add Pragma_Dispatching_Domain as a known pragma.
4592 * sem_prag.adb (Analyze_Pragma): Check the correctness of a pragma
4593 Dispatching_Domain and add it to the task definition.
4594 (Sig_Flags): Add Pragma_Dispatching_Domain.
4595 * rtsfind.ads, rtsfind.adb (RTU_Id, RE_Id, Get_Unit_Name): Add the
4596 support to find the types Dispatching_Domain and
4597 Dispatching_Domain_Access.
4598 * sinfo.ads, sinfo.adb (Has_Pragma_Dispatching_Domain,
4599 Set_Has_Pragma_Dispatching_Domain): Add these subprograms to set and
4600 query the availability of a pragma Dispatching_Domain.
4601 * snames.ads-tmpl (Name_uDispatching_Domain): Add this name required by
4602 the expander to pass the Dispatching_Domain when creating a task.
4603 (Name_Dispatching_Domain): Add this new name for a pragma.
4604 (Pragma_Id): Add the new Pragma_Dispatching_Domain.
4605 * s-tassta.ads, s-tassta.adb (Create_Task): Set the domain to which the
4606 task has been allocated at creation time.
4607 * s-tarest.adb (Create_Restricted_Task): The dispatching domain using
4608 Ravenscar is always null.
4609 * s-taskin.ads, s-taskin.adb (Initialize_ATCB): Set the domain to which
4610 the task has been allocated at creation time.
4611 * s-tporft.adb (Register_Foreign_Thread): A foreign task will not have
4612 a specific dispatching domain.
4613 * s-taprop-linux.adb, s-taprop-solaris.adb, s-taprop-vxworks.adb,
4614 s-taprop-mingw.adb (Create_Task): Check whether both Dispatching_Domain
4615 and CPU are specified for the task, and the CPU value is not contained
4616 within the range of processors for the domain.
4618 2011-08-31 Vincent Celier <celier@adacore.com>
4620 * make.adb (Original_Gcc) : New constant String_Access.
4621 (Gnatmake): For VM targets, do not use VM version of the compiler if
4622 --GCC= has been specified.
4624 2011-08-31 Thomas Quinot <quinot@adacore.com>
4626 * sem_ch5.adb: Minor reformatting.
4628 2011-08-31 Ed Schonberg <schonberg@adacore.com>
4630 * exp_pakd.adb (Convert_To_PAT_Type): If prefix is a function call, do
4633 2011-08-31 Bob Duff <duff@adacore.com>
4635 * exp_ch4.adb (Expand_N_Selected_Component): Use the full type, in case
4636 the access type is private; we don't care about privacy in expansion.
4638 2011-08-31 Ed Schonberg <schonberg@adacore.com>
4640 * sem_aggr.adb (Resolve_Aggregate): In an instance, ignore aggregate
4641 subcomponents tnat may be limited, because they originate in view
4642 conflicts. If the original aggregate is legal and the actuals are
4643 legal, the aggregate itself is legal.
4645 2011-08-31 Matthew Heaney <heaney@adacore.com>
4647 * a-rbtgbo.adb (Clear_Tree): Assert representation invariant for lock
4650 2011-08-31 Ed Schonberg <schonberg@adacore.com>
4652 * sem_ch5.adb: Set kind of loop parameter properly, to preserve all
4655 2011-08-31 Jose Ruiz <ruiz@adacore.com>
4657 * sem_ch13.adb (Analyze_Aspect_Specifications): For the Priority and
4658 Interrupt_Priority aspects, force the analysis of the aspect expression
4659 (when building the equivalent pragma). Otherwise, its analysis is done
4660 too late, after the task or protected object has been created.
4661 * sem_ch9.adb (Analyze_Single_Protected_Declaration,
4662 Analyze_Single_Task_Declaration): Remove the code to move the aspects
4663 to the object declaration because they are needed in the type
4666 2011-08-31 Robert Dewar <dewar@adacore.com>
4668 * exp_ch5.adb, exp_ch7.ads, sem_ch5.adb, put_scos.adb, s-rannum.adb,
4669 a-rbtgbo.adb, exp_intr.adb, a-cbdlli.adb, a-cbdlli.ads: Minor
4672 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
4674 * exp_util.adb (Find_Protection_Type): Do not look for fields _object
4675 if the corresponding type is malformed due to restriction violations.
4677 2011-08-31 Robert Dewar <dewar@adacore.com>
4679 * s-ransee.ads, s-ransee.adb: Minor reformatting.
4681 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
4683 * exp_ch4.adb (Expand_N_Allocator): Correct faulty condition which
4684 would cause the generation of Set_Finalize_Address if the target is a
4685 VM and the designated type is not derived from [Limited_]Controlled.
4687 2011-08-31 Arnaud Charlet <charlet@adacore.com>
4689 * comperr.adb, comperr.ads, gnat1drv.adb (Delete_SCIL_Files): New
4691 (Compiler_Abort, Gnat1drv): Call Delete_SCIL_Files in codepeer mode in
4692 case of a compilation error.
4694 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
4696 * init.c (__gnat_error_handler): Standardize the stack overflow or
4697 erroneous memory access message.
4698 * seh_init.c (__gnat_SEH_error_handler): Standardize the stack overflow
4699 or erroneous memory access message.
4701 2011-08-31 Robert Dewar <dewar@adacore.com>
4703 * sem_ch4.adb: Minor reformatting.
4704 * sem_ch6.adb: Minor code reorganization (use Ekind_In).
4706 2011-08-31 Thomas Quinot <quinot@adacore.com>
4708 * scos.ads: Minor documentation clarification.
4709 * put_scos.adb: Do not generate SCO unit header line for a unit that
4712 2011-08-31 Robert Dewar <dewar@adacore.com>
4714 * a-rbtgbo.adb, alfa_test.adb: Minor reformatting.
4716 2011-08-31 Tristan Gingold <gingold@adacore.com>
4718 * exp_ch7.ads, exp_ch7.adb (Finalization_Exception_Data): New type to
4719 hold variables between these following subprograms.
4720 (Build_Exception_Handler, Build_Object_Declarations,
4721 Build_Raise_Statement): Use the above type as parameter.
4722 Make the above adjustments.
4723 * exp_intr.adb (Expand_Unc_Deallocation): Adjust.
4725 2011-08-31 Pascal Obry <obry@adacore.com>
4727 * projects.texi: Minor reformatting.
4729 2011-08-31 Tristan Gingold <gingold@adacore.com>
4731 * s-ransee.ads, s-ransee.adb: Add system.random_seed unit.
4732 * s-rannum.adb (Reset): Use Get_Seed from s-ransee.
4734 2011-08-31 Ed Schonberg <schonberg@adacore.com>
4736 * exp_ch5.adb: Minor code cleanup.
4737 * sem_ch5.adb (Analyze_Iteration_Scheme): Set ekind of loop variable to
4738 prevent cascaded errors.
4739 (Analyze_Loop_Statement): In semantics-only mode, introduce loop
4740 variable of an iterator specification in current scope.
4741 * sem_ch6.adb (Analyze_Return_Statement, Find_what_It_Apples_To): Skip
4742 postconditions on the stack, as they contain no return statements.
4744 2011-08-31 Yannick Moy <moy@adacore.com>
4746 * exp_alfa.adb (Expand_Alfa_N_Package_Declaration,
4747 Expand_Alfa_N_Subprogram_Body): Remove useless procedures which simply
4748 call Qualify_Entity_Names.
4749 (Expand_Alfa): call Qualify_Entity_Names in more cases
4750 * lib-xref-alfa.adb: Take into account system package.
4751 * sem_prag.adb Take into account restrictions in Alfa mode, contrary to
4752 CodePeer mode in which we are interested in finding bugs even if
4753 compiler cannot compile source.
4754 * sem_util.adb, sem_util.ads (Unique_Entity): Take into account case of
4757 2011-08-31 Gary Dismukes <dismukes@adacore.com>
4759 * sem_ch3.adb (Constrain_Concurrent): Retrieve Base_Type of the subtype
4760 denoted by the subtype mark to ensure getting the concurrent type in
4761 the case where the subtype mark denotes a private subtype of a
4762 concurrent type (needed when using -gnatc).
4763 (Process_Subtype): For the processing specific to type kinds, case on
4764 the Base_Type kind of the Subtype_Mark_Id, to handle cases where the
4765 subtype denotes a private subtype whose base type is nonprivate (needed
4766 for subtypes of private fulfilled by task types when compiling with
4769 2011-08-31 Gary Dismukes <dismukes@adacore.com>
4771 * sem_disp.adb (Check_Dispatching_Operation): Bypass registration of
4772 late primitives that override interface operations when the full
4773 expander is not active, to avoid blowups in Register_Primitive when
4774 types don't have associated secondary dispatch tables.
4776 2011-08-31 Yannick Moy <moy@adacore.com>
4778 * alfa_test.adb: Code clean up.
4780 2011-08-31 Marc Sango <sango@adacore.com>
4782 * restrict.adb (Check_SPARK_Restriction): Change Comes_From_Source (N)
4783 by Comes_From_Source (Original_Node (N)) in order to treat also the
4784 nodes which have been rewritten.
4785 * sem_ch4.adb (Analyze_Explicit_Dereference, Analyze_Slice): Guard the
4786 explicit dereference and slice violation in spark mode on the nodes
4787 coming only from the source code.
4789 2011-08-31 Robert Dewar <dewar@adacore.com>
4791 * exp_ch5.adb, exp_alfa.ads, prj.ads, sem_attr.adb,
4792 lib-xref-alfa.adb: Minor reformatting.
4794 2011-08-31 Matthew Heaney <heaney@adacore.com>
4796 * a-crbltr.ads (Tree_Type): Default-initialize the Nodes component.
4798 2011-08-31 Javier Miranda <miranda@adacore.com>
4800 * sem_ch4.adb (Try_Object_Operation): Addition of one formal to search
4801 only for class-wide subprograms conflicting with entities of concurrent
4804 2011-08-31 Matthew Heaney <heaney@adacore.com>
4806 * a-rbtgbo.adb (Generic_Allocate): Initialize pointer components of
4809 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
4811 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): Provide a more
4812 general description of the routine.
4814 2011-08-31 Ed Schonberg <schonberg@adacore.com>
4816 * a-cbdlli.adb, a-cbdlli.ads: Add iterator machinery to bounded
4817 doubly-linked lists.
4819 2011-08-31 Gary Dismukes <dismukes@adacore.com>
4821 * exp_ch5.adb (Expand_N_Assignment_Statement): When a discriminant
4822 check is needed for a left-hand side that is a dereference, and the
4823 base type is private without discriminants (whereas the full type does
4824 have discriminants), an extra retrieval of the underlying type may be
4825 needed in the case where the subtype is a record subtype whose base
4826 type is private. Update comments.
4828 2011-08-31 Javier Miranda <miranda@adacore.com>
4830 * sem_ch4.adb (Try_Object_Operation): When a dispatching primitive is
4831 found check if there is a class-wide subprogram covering the primitive.
4833 2011-08-31 Yannick Moy <moy@adacore.com>
4835 * sem_res.adb: Further cases where full expansion test is needed,
4836 rather than expansion test.
4838 2011-08-31 Pascal Obry <obry@adacore.com>
4840 * prj-attr.adb: Fix Source_File_Switches attribute kind (must be a list)
4842 2011-08-31 Ed Schonberg <schonberg@adacore.com>
4844 * exp_ch5.adb: Handle iterators over derived container types.
4846 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
4848 * einfo.ads, einfo.adb: Add new flag Has_Anonymous_Master.
4849 (Has_Anonymous_Master): New routine.
4850 (Set_Has_Anonymous_Master): New routine.
4851 (Write_Entity_Flags): Add an entry for Has_Anonymous_Master.
4852 * exp_ch4.adb: Add with and use clause for Sem_Ch8.
4853 (Current_Anonymous_Master): New routine.
4854 (Current_Unit_First_Declaration): Removed.
4855 (Current_Unit_Scope): Removed.
4856 (Expand_N_Allocator): Anonymous access-to-controlled types now chain
4857 their objects on a per-unit heterogeneous finalization master.
4859 2011-08-31 Matthew Heaney <heaney@adacore.com>
4861 * a-cbhama.adb, a-cbhase.adb (Insert): Check for zero-length buckets
4864 2011-08-31 Jose Ruiz <ruiz@adacore.com>
4866 * s-taprop-linux.adb (Create_Task): Avoid changing the affinity mask
4869 2011-08-31 Gary Dismukes <dismukes@adacore.com>
4871 * sem_disp.adb (Propagate_Tag): Return without propagating in the case
4872 where the actual is an unexpanded call to 'Input.
4874 2011-08-31 Yannick Moy <moy@adacore.com>
4876 * sem_ch4.adb: Code clean up.
4878 2011-08-31 Yannick Moy <moy@adacore.com>
4880 * exp_alfa.adb, exp_alfa.ads: Minor correction of copyright notice.
4882 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
4884 * exp_ch7.adb (Build_Array_Deep_Procs): Do not generate Deep_Finalize
4885 and TSS primitive Finalize_Address if finalization is suppressed.
4886 (Build_Record_Deep_Procs): Do not generate Deep_Finalize and TSS
4887 primitive Finalize_Address if finalization is suppressed.
4889 2011-08-31 Jose Ruiz <ruiz@adacore.com>
4891 * s-mudido-affinity.adb, s-taprop-linux.adb, s-taprop-mingw.adb,
4892 s-taprop-solaris.adb, s-taprop-vxworks.adb (Set_Task_Affinity): Make
4893 sure that the underlying task has already been created before trying
4894 to change its affinity.
4895 (Set_CPU): Use the term processor instead of CPU, as we do in
4898 2011-08-31 Vincent Celier <celier@adacore.com>
4900 * prj-attr.adb: New Compiler attribute Source_File_Switches.
4901 * prj-nmsc.adb (Process_Compiler): Process attribute
4902 Source_File_Switches.
4903 * prj.ads (Language_Config): New name list component
4904 Name_Source_File_Switches.
4905 * snames.ads-tmpl (Name_Source_File_Switches): New standard name.
4907 2011-08-31 Ed Schonberg <schonberg@adacore.com>
4909 * sem_attr.adb (Analyze_Attribute, case 'Old): If prefix may be a
4910 discriminated component of an actual, expand at once to prevent
4911 ouf-of-order references with generated subtypes.
4913 2011-08-31 Yannick Moy <moy@adacore.com>
4915 * lib-xref-alfa.adb (Add_Alfa_Xrefs): Do not take into account read
4916 reference to operator in Alfa xrefs.
4918 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
4920 * sem_ch12.adb (Freeze_Subprogram_Body): Add code to handle the case
4921 where the parent instance was frozen before the current instance due to
4922 the presence of a source body. Update calls to Insert_After_Last_Decl.
4923 (Insert_After_Last_Decl): Renamed to Insert_Freeze_Node_For_Instance.
4924 Update the comment which illustrates the purpose of the routine.
4925 Package instances are now frozen by source bodies which appear after
4926 the instance. This ensures that entities coming from within the
4927 instance are available for use in the said bodies.
4928 (Install_Body): Add code to handle the case where the parent instance
4929 was frozen before the current instance due to the presence of a source
4930 body. Update calls to Insert_After_Last_Decl.
4932 2011-08-31 Jose Ruiz <ruiz@adacore.com>
4934 * s-taprop-linux.adb (Set_Task_Affinity): Avoid the use of anonymous
4936 * affinity.c (__gnat_set_affinity_mask): Declare index variable.
4938 2011-08-31 Yannick Moy <moy@adacore.com>
4940 * sem_ch8.adb (Analyze_Subprogram_Renaming): Refine expander test in
4942 * alfa.adb, alfa.ads, alfa_test.adb, ali.adb, debug.adb, errout.adb,
4943 errout.ads, erroutc.adb, expander.adb, exp_ch4.adb, exp_ch7.adb,
4944 freeze.adb, get_alfa.adb, get_alfa.ads, gnat1drv.adb, lib-writ.adb,
4945 lib-writ.ads, lib-xref.adb, lib-xref.ads, lib-xref-alfa.adb, opt.adb,
4946 opt.ads, put_alfa.adb, put_alfa.ads, restrict.adb, sem_ch12.adb,
4947 sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
4948 sem_prag.adb, sem_res.adb, sem_util.adb: Minor reformatting, renaming
4949 ALFA in Alfa (we dropped acronym).
4950 * einfo.adb (Primitive_Operations): Correctly return list of primitive
4951 operations in a case where it returned previously No_Elist.
4953 2011-08-31 Robert Dewar <dewar@adacore.com>
4955 * s-taprop-vxworks.adb, sem_ch5.adb, s-taprop-tru64.adb, exp_alfa.adb,
4956 s-taprop-vms.adb, bindgen.adb, s-mudido.adb, s-mudido.ads,
4957 sem_res.adb, expander.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
4958 s-taprop-solaris.adb, s-mudido-affinity.adb, vms_conv.adb,
4959 s-taprop-irix.adb, s-taprop.ads, s-taskin.adb, s-taskin.ads,
4960 s-taprop-hpux-dce.adb, a-chtgbo.adb, s-taprop-posix.adb: Minor
4963 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
4965 * sem_ch12 (Check_Private_View): Revert previous change.
4966 * sem_res.adb (Conversion_Check): Do not emit the error message if the
4967 conversion is in a generic instance.
4969 2011-08-31 Matthew Heaney <heaney@adacore.com>
4971 * a-cbhase.adb (Symmetric_Difference): Dereference correct node array.
4972 * a-chtgbo.adb (Free): Allow 0 as index value.
4974 2011-08-31 Matthew Heaney <heaney@adacore.com>
4976 * a-cborma.adb (Insert): Add comment to explain why no element
4979 2011-08-31 Gary Dismukes <dismukes@adacore.com>
4981 * sem_util.adb (Find_Body_Discriminal): Test whether the scope of the
4982 spec discriminant is already a concurrent type, in which case just use
4983 it, otherwise fetch the Corresponding_Concurrent_Type as before.
4985 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
4987 * system-irix-n64.ads, system-linux-armeb.ads, system-linux-armel.ads,
4988 system-linux-mips.ads, system-linux-mipsel.ads,
4989 system-linux-mips64el.ads, system-linux-ppc64.ads,
4990 system-linux-sparcv9.ads, system-rtems.ads: Remove GCC_ZCX_Support.
4992 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
4994 * gcc-interface/ada-tree.h (TYPE_EXTRA_SUBTYPE_P): Add internal check.
4995 * gcc-interface/utils2.c (build_binary_op): Tighten condition.
4996 (build_unary_op): Likewise.
4998 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
5000 * raise-gcc.c: Do not include coretypes.h and tm.h.
5001 (setup_to_install): Remove test for compiler macro.
5002 * targext.c: Document use for the library.
5003 * gcc-interface/Makefile.in: Fix comment on the use of IN_GCC.
5005 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
5007 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not convert
5008 the expression to the nominal type if the latter is a record type with
5009 a variant part and the type of the former is a record type without one.
5011 2011-08-30 Yannick Moy <moy@adacore.com>
5013 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
5014 expansion in Alfa mode.
5015 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public
5016 * exp_alfa.adb, exp_alfa.ads: New package defining light expansion for
5018 * gnat1drv.adb (Adjust_Global_Switches): Update Comment.
5019 * sem_res.adb: Ditto.
5020 * gcc-interface/Make-lang.in: Update dependencies.
5022 2011-08-30 Thomas Quinot <quinot@adacore.com>
5024 * g-socket.ads: Minor documentation adjustment.
5026 2011-08-30 Robert Dewar <dewar@adacore.com>
5028 * exp_ch9.adb, s-tassta.adb, s-secsta.adb: Minor reformatting.
5030 2011-08-30 Yannick Moy <moy@adacore.com>
5032 * exp_ch6_light.adb, exp_ch6_light.ads, exp_attr_light.adb,
5033 exp_attr_light.ads, exp_ch7_light.adb, exp_ch7_light.ads,
5034 exp_light.adb, exp_light.ads, exp_prag.adb, expander.adb,
5035 gnat1drv.adb, exp_ch11.adb, exp_ch6.adb, exp_ch6.ads, exp_aggr.adb:
5036 Revert change which introduced files for "light"
5037 expansion, to be replaced by a single file for Alfa expansion.
5039 2011-08-30 Robert Dewar <dewar@adacore.com>
5041 * opt.ads, s-soflin.adb, exp_ch9.adb, sem_res.adb: Update comment.
5042 Minor code reorg/reformatting.
5044 2011-08-30 Yannick Moy <moy@adacore.com>
5046 * opt.adb, opt.ads (Full_Expander_Active): New function defines a
5047 common shorthand for (Expander_Active and not ALFA_Mode) that can be
5048 used for testing full expansion, that is active expansion not in the
5049 reduced mode for Alfa
5050 * exp_ch4.adb, exp_ch9.adb, exp_disp.adb, sem_ch10.adb, sem_ch12.adb,
5051 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Use newly defined "flag" instead
5052 of the verbose (Expander_Active and not ALFA_Mode)
5054 2011-08-30 Tristan Gingold <gingold@adacore.com>
5056 * s-parame-vms-alpha.ads, s-parame-hpux.ads, s-tassta.adb,
5057 s-tarest.adb, s-parame-vms-ia64.ads, s-soflin.adb, s-secsta.adb,
5058 s-secsta.ads, s-parame.ads, s-parame-vxworks.ads, s-parame-ae653.ads:
5059 Renames Ratio to Percentage, and Sec_Stack_Ratio to Sec_Stack_Percentage
5061 2011-08-30 Gary Dismukes <dismukes@adacore.com>
5063 * sem_res.adb (Valid_Conversion): Revise test for implicit anonymous
5064 access conversions to check that the conversion is a rewritten node,
5065 rather than just having Comes_From_Source set to False, which wasn't
5068 2011-08-30 Robert Dewar <dewar@adacore.com>
5070 * exp_ch9.adb, sem_ch9.adb, sem_ch6.adb, exp_disp.adb,
5071 g-socket.ads: Minor reformatting.
5073 2011-08-30 Thomas Quinot <quinot@adacore.com>
5075 * sem_util.adb: Minor reformatting.
5077 2011-08-30 Tristan Gingold <gingold@adacore.com>
5079 * raise-gcc.c: Never catch exception if _UA_FORCE_UNWIND flag is set,
5080 to be compliant with the ABI.
5082 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
5084 * sem_ch12.adb (Check_Private_View): Exchange the private and full view
5085 of a designated type when the related access type is an actual in an
5086 instance. This ensures that the full view of designated type is
5087 available when inside the body of the instance.
5089 2011-08-30 Ed Schonberg <schonberg@adacore.com>
5091 * sem_util.adb (May_Be_Lvalue): To determine whether a reference may be
5092 in a position to be modified, a slice is treated like an indexed
5095 2011-08-30 Thomas Quinot <quinot@adacore.com>
5097 * s-oscons-tmplt.c, g-socket.ads: Adjust maximum allowed value for
5098 field tv_sec in struct timeval.
5100 2011-08-30 Yannick Moy <moy@adacore.com>
5102 * exp_ch9.adb, exp_disp.adb, sem_ch9.adb, sem_res.adb: Protect several
5103 blocks of code doing full expansion, previously only guarded by
5104 Expander_Active, by anding the test that ALFA_Mode is not set
5106 2011-08-30 Ed Schonberg <schonberg@adacore.com>
5108 * sem_ch6.adb (Analyze_Return_Type): If the return type is incomplete,
5109 add the function to the list of private dependents, for subsequent
5110 legality check on Taft amendment types.
5111 * sem_ch12.adb (Analyze_Formal_Incomplete_Type): Initialize
5112 Private_Dependents, as for other incomplete types.
5113 * sem_util.adb (Wrong_Type): Avoid cascaded errors when a
5114 Taft-amendment type is used as the return type of a function.
5116 2011-08-30 Javier Miranda <miranda@adacore.com>
5118 * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup: replace code
5119 which emits an error by a call to a new routine which report the error.
5120 * exp_ch9.adb (Build_Wrapper_Spec): Build the wrapper even if the
5121 entity does not cover an existing interface.
5122 * errout.ads, errout.adb (Error_Msg_PT): New routine. Used to factorize
5124 * sem_ch6.adb (Check_Conformance): Add specific error for wrappers of
5125 protected procedures or entries whose mode is not conformant.
5126 (Check_Synchronized_Overriding): Code cleanup: replace code which emits
5127 an error by a call to a new routine which report the error.
5129 2011-08-30 Robert Dewar <dewar@adacore.com>
5131 * gnat_rm.texi: Minor change.
5132 * exp_attr_light.adb: Minor reformatting.
5134 2011-08-30 Ed Schonberg <schonberg@adacore.com>
5136 * sem_ch3.adb: Patch inheritance of aspects in
5137 Complete_Private_Subtype, to avoid infinite loop.
5139 2011-08-30 Javier Miranda <miranda@adacore.com>
5141 * sem_ch3.adb (Add_Internal_Interface_Entities): If serious errors have
5142 been reported and a subprogram covering an interface primitive is not
5143 found then skip generating the internal entity. Done to avoid crashing
5145 (Check_Abstract_Overriding): Change text of error of wrong formal of
5146 protected subprogram or entry. Done for consistency to emit exactly the
5147 same error reported by Check_Synchronized_Overriding. In addition, the
5148 error is restricted to protected types (bug found working on AI05-0090)
5150 2011-08-30 Yannick Moy <moy@adacore.com>
5152 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
5153 expansion in Alfa mode.
5154 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public.
5155 * exp_light.adb, exp_light.ads: New package defining light expansion.
5156 * expander.adb (Expand): Call light expansion in Alfa mode
5157 * exp_ch6_light.adb, exp_ch6_light.ads: Light expansion of chapter 6
5159 * exp_ch7_light.adb, exp_ch7_light.ads: Light expansion of chapter 7
5161 * exp_attr_light.adb, exp_attr_light.ads: Light expansion of attributes
5162 * gnat1drv.adb (Adjust_Global_Switches): Comment
5164 2011-08-30 Yannick Moy <moy@adacore.com>
5166 * lib-xref-alfa.adb: Minor refactoring.
5168 2011-08-30 Yannick Moy <moy@adacore.com>
5170 * exp_ch9.adb (Expand_Entry_Barrier): Do not perform expansion in Alfa
5172 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not perform
5173 expansion in Alfa mode.
5174 * sem_ch9.adb (Analyze_Entry_Body): Do not perform expansion in Alfa
5177 2011-08-30 Robert Dewar <dewar@adacore.com>
5179 * debug_a.adb: Update comment.
5181 2011-08-30 Robert Dewar <dewar@adacore.com>
5183 * exp_ch5.adb, sem_ch3.adb, sem_ch5.adb, einfo.adb, checks.adb,
5184 sem_util.adb, sem_util.ads, sem_res.adb, s-stposu.adb, sem_attr.adb,
5185 exp_ch4.adb, exp_ch6.adb, lib-xref-alfa.adb,
5186 sem_ch8.adb, sem_disp.adb, exp_ch3.adb: Minor reformatting
5188 2011-08-30 Robert Dewar <dewar@adacore.com>
5190 * gnat_rm.texi: Add section on C.6(16) implementation advice for pragma
5193 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
5195 * exp_ch3.adb (Expand_Freeze_Array_Type): Correct the call to
5196 Build_Finalization_Master by supplying an insertion node and enclosing
5197 scope. In its old version, the call did not generate a finalization
5199 (Expand_Freeze_Record_Type): Add local variable Has_AACC. Add code to
5200 recognize anonymous access-to-controlled components. Rewrite the
5201 machinery which creates finalization masters to service anonymous
5202 access-to-controlled components of a record type. In its current state,
5203 only one heterogeneous master is necessary to handle multiple anonymous
5205 (Freeze_Type): Comment reformatting.
5206 * rtsfind.ads: Add RE_Set_Is_Heterogeneous to tables RE_Id and
5208 * s-stposu.adb (Allocate_Any_Controlled): Rewrite the machinery which
5209 associates TSS primitive Finalize_Address with either the master itself
5210 or with the internal hash table depending on the mode of operation of
5213 2011-08-30 Javier Miranda <miranda@adacore.com>
5215 * exp_ch3.adb (Make_Eq_If): If the etype of the _parent component is an
5216 interface type then do not generate code to compare this component.
5217 Required since they have no components and their equality operator is
5220 2011-08-30 Steve Baird <baird@adacore.com>
5222 * sem_util.ads (Deepest_Type_Access_Level): New function; for the type
5223 of a saooaaat (i.e, a stand-alone object of an anonymous access type),
5224 returns the (static) accessibility level of the object. Otherwise, the
5225 same as Type_Access_Level.
5226 (Dynamic_Accessibility_Level): New function; given an expression which
5227 could occur as the rhs of an assignment to a saooaaat (i.e., an
5228 expression of an access-to-object type), return the new value for the
5229 saooaaat's associated Extra_Accessibility object.
5230 (Effective_Extra_Accessibility): New function; same as
5231 Einfo.Extra_Accessibility except that object renames are looked through.
5233 (Deepest_Type_Access_Level): New function; see sem_util.ads description.
5234 (Dynamic_Accessibility_Level): New function; see sem_util.ads
5236 (Effective_Extra_Accessibility): New function; see sem_util.ads
5238 * einfo.ads (Is_Local_Anonymous_Access): Update comments.
5239 (Extra_Accessibility): Update comments.
5240 (Init_Object_Size_Align): New procedure; same as Init_Size_Align
5241 except RM_Size field (which is only for types) is unaffected.
5243 (Extra_Accessibility): Expand domain to allow objects, not just formals.
5244 (Set_Extra_Accessibility): Expand domain to allow objects, not just
5246 (Init_Size): Add assertion that we are not trashing the
5247 Extra_Accessibility attribute of an object.
5248 (Init_Size_Align): Add assertion that we are not trashing the
5249 Extra_Accessibility attribute of an object.
5250 (Init_Object_Size_Align): New procedure; see einfo.ads description.
5251 * sem_ch3.adb (Find_Type_Of_Object): Set Is_Local_Anonymous_Access
5252 differently for the type of a (non-library-level) saooaaat depending
5253 whether Ada_Version < Ada_2012. This is the only point where Ada_Version
5254 is queried in this set of changes - everything else (in particular,
5255 setting of the Extra_Accessibility attribute in exp_ch3.adb) is
5256 driven off of the setting of the Is_Local_Anonymous_Access attribute.
5257 The special treatment of library-level saooaaats is an optimization,
5258 not required for correctnesss. This is based on the observation that the
5259 Ada2012 rules (static and dynamic) for saooaaats turn out to be
5260 equivalent to the Ada2005 rules in the case of a library-level saooaaat.
5262 (Expand_N_Object_Declaration): If Is_Local_Anonymous_Access is
5263 false for the type of a saooaaat, declare and initialize its
5264 accessibility level object and set the Extra_Accessibility attribute
5265 of the saooaaat to refer to this object.
5266 * checks.adb (Apply_Accessibility_Check): Add Ada 2012 saooaaat support.
5267 * exp_ch4.adb (Expand_N_In): Replace some Extra_Accessibility calls with
5268 calls to Effective_Extra_Accessibility in order to support
5269 renames of saooaaats.
5270 (Expand_N_Type_Conversion): Add new local function,
5271 Has_Extra_Accessibility, and call it when determining whether an
5272 accessibility check is needed.
5273 It returns True iff Present (Effective_Extra_Accessibility (Id)) would
5274 evaluate to True (without raising an exception).
5276 (Expand_N_Assignment_Statement): When assigning to an Ada2012
5277 saooaaat, update its associated Extra_Accessibility object (if
5278 it has one). This includes an accessibility check.
5279 * exp_ch6.adb (Add_Call_By_Copy_Code): When parameter copy-back updates
5280 a saooaaat, update its Extra_Accessibility object too (if it
5282 (Expand_Call): Replace a couple of calls to Type_Access_Level
5283 with calls to Dynamic_Access_Level to handle cases where
5284 passing a literal (any literal) is incorrect.
5285 * sem_attr.adb (Resolve_Attribute): Handle the static accessibility
5286 checks associated with "Saooaat := Some_Object'Access;"; this must
5287 be rejected if Some_Object is declared in a more nested scope
5289 * sem_ch5.adb (Analyze_Assignment): Force accessibility checking for an
5290 assignment to a saooaaat even if Is_Local_Anonymous_Access
5291 returns False for its type (indicating a 2012-style saooaaat).
5293 (Analyze_Object_Renaming): Replace a call to Init_Size_Align
5294 (which is only appropriate for objects, not types) with a call
5295 of Init_Object_Size_Align in order to avoid trashing the
5296 Extra_Accessibility attribute of a rename (the two attributes
5299 (Valid_Conversion) Replace six calls to Type_Access_Level with
5300 calls to Deepest_Type_Access_Level. This is a bit tricky. For an
5301 Ada2012 non-library-level saooaaat, the former returns library level
5302 while the latter returns the (static) accessibility level of the
5303 saooaaat. A type conversion to the anonymous type of a saooaaat
5304 can only occur as part of an assignment to the saooaaat, so we
5305 know that such a conversion must be in a lhs context, so Deepest
5306 yields the result that we need. If such a conversion could occur,
5307 say, as the operand of an equality operator, then this might not
5308 be right. Also add a test so that static accessibilty checks are
5309 performed for converting to a saooaaat's type even if
5310 Is_Local_Anonymous_Access yields False for the type.
5312 2011-08-30 Javier Miranda <miranda@adacore.com>
5314 * sem_disp.adb (Check_Dispatching_Operation): Complete condition that
5315 controls generation of a warning associated with late declaration of
5316 dispatching functions. Required to avoid generating spurious
5319 2011-08-30 Gary Dismukes <dismukes@adacore.com>
5321 * sem_ch6.adb (Check_Return_Subtype_Indication): Issue error if the
5322 return object has an anonymous access type and the function's type is
5323 a named access type.
5324 * sem_ch8.adb (Analyze_Object_Renaming): Suppress error about renaming
5325 conversions on implicit conversions, since such conversions can occur
5326 for anonymous access cases due to expansion. Issue error for attempt
5327 to rename an anonymous expression as an object of a named access type.
5328 * sem_res.ads (Valid_Conversion): Add defaulted parameter Report_Errs,
5329 to indicate whether this function should report errors on invalid
5331 * sem_res.adb (Resolve): For Ada 2012, in the case where the type of
5332 the expression is of an anonymous access type and the expected type is
5333 a named general access type, rewrite the expression as a type
5334 conversion, unless this is an expression of a membership test.
5335 (Valid_Conversion.Error_Msg_N): New procedure that conditions the
5336 calling of Error_Msg_N on new formal Report_Errs.
5337 (Valid_Conversion.Error_Msg_NE): New procedure that conditions the
5338 calling of Error_Msg_NE on new formal Report_Errs.
5339 (Valid_Conversion): Move declaration of this function to the package
5340 spec, to allow calls from membership test processing. For Ada 2012,
5341 enforce legality restrictions on implicit conversions of anonymous
5342 access values to general access types, disallowing such conversions in
5343 cases where the expression has a dynamic accessibility level (access
5344 parameters, stand-alone anonymous access objects, or a component of a
5345 dereference of one of the first two cases).
5346 * sem_type.adb (Covers): For Ada 2012, allow an anonymous access type
5347 in the context of a named general access expected type.
5348 * exp_ch4.adb Add with and use of Exp_Ch2.
5349 (Expand_N_In): Add processing for membership tests applied to
5350 expressions of an anonymous access type. First, Valid_Conversion is
5351 called to check whether the test is statically False, and then the
5352 conversion is expanded to test that the expression's accessibility
5353 level is no deeper than that of the tested type. In the case of
5354 anonymous access-to-tagged types, a tagged membership test is applied
5356 (Tagged_Membership): Extend to handle access type cases, applying the
5357 test to the designated types.
5358 * exp_ch6.adb (Expand_Call): When creating an extra actual for an
5359 accessibility level, and the actual is a 'Access applied to a current
5360 instance, pass the accessibility level of the type of the current
5361 instance rather than applying Object_Access_Level to the prefix. Add a
5362 ??? comment, since this level isn't quite right either (will eventually
5363 need to pass an implicit level parameter to init procs).
5365 2011-08-30 Bob Duff <duff@adacore.com>
5367 * s-taskin.ads: Minor comment fix.
5369 2011-08-30 Ed Schonberg <schonberg@adacore.com>
5371 * sem_res.adb (Check_Parameterless_Call): If the node is a selected
5372 component and the selector is a dispatching operation, check if it is
5373 a prefixed call before rewriting as a parameterless function call.
5375 2011-08-29 Jakub Jelinek <jakub@redhat.com>
5377 * gcc-interface/Makefile.in (../stamp-gnatlib1-$(RTSDIR)): Copy
5378 tsystem.h into $(RTSDIR) instead of rts.
5380 2011-08-29 Robert Dewar <dewar@adacore.com>
5382 * sem_ch10.adb, a-coorse.adb, exp_dist.adb, exp_ch3.adb: Minor
5384 * gcc-interface/Make-lang.in: Update dependencies.
5386 2011-08-29 Yannick Moy <moy@adacore.com>
5388 * alfa.ads (Name_Of_Heap_Variable): New constant name.
5389 * lib-xref-alfa.adb, lib-xref.adb, lib-xref.ads (Drefs): New global
5390 table to hold dereferences.
5391 (Add_ALFA_Xrefs): Take into account dereferences as special
5392 reads/writes to the variable "HEAP".
5393 (Enclosing_Subprogram_Or_Package): Move subprogram here.
5394 (Generate_Dereference): New procedure to store a read/write dereferencew
5396 * put_alfa.adb (Put_ALFA): Use different default than (0,0) used for
5397 the special "HEAP" var.
5398 * sem_ch4.adb (Analyze_Explicit_Dereference): Store read dereference
5400 * sem_util.adb (Note_Possible_Modification): Store write dereference
5403 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5405 * exp_ch3.adb (Freeze_Type): Generate an accessibility check which
5406 ensures that the level of the subpool access type is not deeper than
5407 that of the pool object.
5408 * sem_util.adb (Object_Access_Level): Expand to handle defining
5410 * sem_res.adb (Resolve_Allocator): Add a guard to avoid examining the
5411 subpool handle name of a rewritten allocator.
5413 2011-08-29 Robert Dewar <dewar@adacore.com>
5415 * impunit.adb, exp_ch4.adb, s-finmas.adb: Minor reformatting.
5417 2011-08-29 Thomas Quinot <quinot@adacore.com>
5419 * exp_dist.adb (TC_Rec_Add_Process_Element): For a choice with multiple
5420 values, we generate multiple triples of parameters in the TypeCode.
5421 Bump Choice_Index for each such triple so that a subsequent default
5422 choice is associated with the correct index in the typecode.
5424 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5426 * a-cdlili.adb (Iterate): Initialize properly an iterator over a null
5428 (First, Last): Handle properly an iterator over a null container.
5430 2011-08-29 Bob Duff <duff@adacore.com>
5432 * sem_ch10.adb (Analyze_With_Clause,Install_Withed_Unit): Abandon
5433 processing if we run across a node with no Scope. This can happen if
5434 we're with-ing an library-level instance, and that instance got errors
5435 that caused "instantiation abandoned".
5436 * sem_util.adb (Unit_Declaration_Node): Make it more robust, by raising
5437 an exception instead of using Assert, so it won't go into an infinite
5438 loop, even when assertions are turned off.
5440 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5442 * a-coorse.adb: Proper handling of empty ordered sets.
5444 2011-08-29 Johannes Kanig <kanig@adacore.com>
5446 * debug.adb: Add comments.
5448 2011-08-29 Thomas Quinot <quinot@adacore.com>
5450 * a-except.adb, a-except-2005.adb: Minor comment rewording and
5453 2011-08-29 Yannick Moy <moy@adacore.com>
5455 * sem_ch3.adb (Array_Type_Declaration): Remove insertion of
5456 declaration for Itypes in Alfa mode.
5458 2011-08-29 Robert Dewar <dewar@adacore.com>
5460 * a-cdlili.ads, a-coinve.ads, a-coorma.adb, a-coorma.ads, s-tassta.adb,
5461 a-cborma.adb, a-cborma.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
5462 a-cborse.ads, a-cobove.adb, a-cobove.ads, a-cbhase.ads: Minor
5465 2011-08-29 Tristan Gingold <gingold@adacore.com>
5467 * exp_ch7.adb, exp_ch7.ads (Build_Exception_Handler): Move its spec to
5469 * exp_intr.adb (Expand_Unc_Deallocation): Use Build_Exception_Handler.
5470 * a-except.adb, a-except-2005.adb (Rcheck_22): Do not defer aborts
5473 2011-08-29 Robert Dewar <dewar@adacore.com>
5475 * a-cbhama.adb, a-cbhama.ads: Minor reformatting.
5477 2011-08-29 Javier Miranda <miranda@adacore.com>
5479 * sem_ch8.adb (Analyze_Subprogram_Renaming): Complete support for
5480 renamings of formal subprograms when the actual for a formal type is
5483 2011-08-29 Matthew Heaney <heaney@adacore.com>
5485 * a-cbhama.ads, a-cbhase.ads (Move): Clear Source following assignment
5488 2011-08-29 Matthew Heaney <heaney@adacore.com>
5490 * a-cborma.ads, a-cborse.ads (Cursor): Default-initialize all
5491 components of record type.
5492 * a-cborma.adb, a-cborse.adb (Move): Clear Source following assignmentw
5495 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5497 * a-cbhama.adb, a-cbhama.ads, a-cborma.adb, a-cborma.ads, a-cobove.adb,
5498 a-cobove.ads, a-coorma.adb, a-coorma.ads: Add iterator machinery to
5501 2011-08-29 Robert Dewar <dewar@adacore.com>
5503 * sem_ch3.adb, sem_util.adb, gnat1drv.adb, s-parint.ads: Minor
5506 2011-08-29 Matthew Heaney <heaney@adacore.com>
5508 * a-cbhama.ads, a-cbhase.ads (Cursor): Default-initialize all
5509 components of record type.
5511 2011-08-29 Bob Duff <duff@adacore.com>
5513 * s-tassta.adb (Task_Wrapper): Handle and ignore exceptions propagated
5514 by the termination handler.
5516 2011-08-29 Yannick Moy <moy@adacore.com>
5518 * sem_ch3.adb (Array_Type_Declaration): Create declarations for Itypes
5519 created in Alfa mode, instead of inserting artificial declarations of
5520 non-Itypes in the tree.
5521 * sem_util.adb, sem_util.ads (Itype_Has_Declaration): New function to
5522 know if an Itype has a corresponding declaration, as defined in
5525 2011-08-29 Yannick Moy <moy@adacore.com>
5527 * gnat1drv.adb: Minor rewrite.
5529 2011-08-29 Bob Duff <duff@adacore.com>
5531 * s-tasuti.adb (Make_Passive): Work around race condition in
5532 Make_Independent, which can cause Wait_Count to be zero. So instead of
5533 asserting that Wait_Count > 0, and then decrementing it, decrement it
5534 only if Wait_Count > 0.
5535 * s-taskin.ads (Wait_Count, Alive_Count, Awake_Count): All of these
5536 should be nonnegative, so declare them Natural instead of Integer.
5538 2011-08-29 Robert Dewar <dewar@adacore.com>
5540 * exp_ch5.adb, sem_ch3.adb, a-cihama.adb, a-cihama.ads, exp_ch7.adb,
5541 sem_ch5.adb, a-ciorse.adb, a-ciorse.ads, sem_ch12.adb, a-cidlli.adb,
5542 a-cidlli.ads, sem_util.adb, sem_res.adb, gnat1drv.adb, a-except.adb,
5543 a-except.ads, a-except-2005.ads, sem_ch4.adb, exp_disp.adb,
5544 exp_aggr.adb, sem_ch13.adb, par-ch3.adb: Minor reformatting.
5546 2011-08-29 Tristan Gingold <gingold@adacore.com>
5548 * s-auxdec-vms-alpha.adb: Add comments, remove some HT before labels.
5550 2011-08-29 Vadim Godunko <godunko@adacore.com>
5552 * s-parint.ads: Minor comment clarification.
5554 2011-08-29 Vincent Celier <celier@adacore.com>
5556 * prj.adb (Initialize): Make sure that new reserved words after Ada 95
5557 may be used as identifiers.
5559 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5561 * a-coinho.ads: Minor reformating.
5563 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5565 * exp_ch5.adb (Expand_Iterator_Loop): Handle properly a loop over a
5566 container of a derived type.
5568 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5570 * a-cidlli.adb, a-cidlli.ads, a-cihama.adb, a-cihama.ads,
5571 a-ciorse.adb, a-ciorse.ads: Add iterator machinery to containers.
5573 2011-08-29 Pascal Obry <obry@adacore.com>
5575 * exp_disp.adb: Minor comment fix.
5576 (Make_Disp_Asynchronous_Select_Body): Properly initialize out parameters
5577 to avoid warnings when compiling with -Wall.
5578 (Make_Disp_Conditional_Select_Body): Likewise.
5579 (Make_Disp_Timed_Select_Body): Likewise.
5581 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5583 * sem_ch12.adb (Analyze_Formal_Subprogram_Declaration): If default is
5584 an entity name, generate reference for it.
5586 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5588 * exp_ch5.adb (Expand_Iterator_Loop): Uniform handling of "X of S"
5590 * sem_util.adb (Is_Iterator, Is_Reversible_Iterator): Yield True for
5591 the class-wide type.
5592 * sem_ch5.adb: Move some rewriting to the expander, where it belongs.
5594 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5596 * sem_ch8.adb (Check_Constrained_Object): Do not create an actual
5597 subtype for an object whose type is an unconstrained union.
5599 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5601 * par-ch3.adb (P_Array_Type_Definiation, P_Component_Items): "aliased"
5602 is allowed in a component definition, by AI95-406.
5604 2011-08-29 Matthew Heaney <heaney@adacore.com>
5606 * a-chtgbo.adb (Generic_Iteration): Use correct overloading of Next.
5608 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5610 * a-except-2005.adb: Alphabetize all routines.
5611 (Triggered_By_Abort): New routine.
5612 * a-except-2005.ads (Triggered_By_Abort): New routine.
5613 * a-except.adb Alphabetize all routines.
5614 (Triggered_By_Abort): New routine.
5615 * a-except.ads (Triggered_By_Abort): New routine.
5616 * exp_ch7.adb: Update all comments involving the detection of aborts in
5618 (Build_Object_Declarations): Do not generate code to detect the
5619 presence of an abort at the start of finalization code, use a runtime
5621 * rtsfind.ads: Add RE_Triggered_By_Abort to tables RE_Id and
5623 * sem_res.adb (Resolve_Allocator): Emit a warning when attempting to
5624 allocate a task on a subpool.
5625 * s-stposu.adb: Add library-level flag Finalize_Address_Table_In_Use.
5626 The flag disables all actions related to the maintenance of
5627 Finalize_Address_Table when subpools are not in use.
5628 (Allocate_Any_Controlled): Signal the machinery that subpools are in
5630 (Deallocate_Any_Controlled): Do not call Delete_Finalize_Address which
5631 performs costly task locking when subpools are not in use.
5633 2011-08-29 Yannick Moy <moy@adacore.com>
5635 * gnat1drv.adb (Adjust_Global_Switches): Restore expansion of tagged
5636 types and dispatching calls in Alfa mode.
5637 * lib-xref-alfa.adb (Collect_ALFA): Rewrite computation of
5638 correspondance between body and spec scopes, to reuse utility functions
5639 (Traverse_Declarations_Or_Statements): Protect access to body for stub
5640 by testing the presence of the library unit for the body
5641 * sem_ch6.adb (Set_Actual_Subtypes): take into account that in Alfa
5642 mode the expansion of accept statements is skipped
5643 * sem_util.adb, sem_util.ads (Unique_Entity): New function returning
5644 the unique entity corresponding to the one returned by
5645 Unique_Defining_Entity applied to the enclosing declaration of the
5648 2011-08-29 Bob Duff <duff@adacore.com>
5650 * treepr.ads: Improve debugging facilities. pn(x) no longer crashes in
5651 gdb when x is not a node (it can be a node list, name_id, etc). pp is
5652 an alias for pn. ppp is an alias for pt.
5654 2011-08-29 Javier Miranda <miranda@adacore.com>
5656 * exp_aggr.adb (Expand_Record_Aggregate): Use the top-level enclosing
5657 aggregate to take a consistent decision on the need to convert into
5658 assignments aggregates that initialize constant objects.
5660 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5662 * exp_ch4.adb (Expand_Allocator_Expression): Add a call to
5663 Build_Allocate_Deallocate_Proc in order to handle allocation of
5664 non-controlled objects on subpools.
5665 * impunit.adb: Remove s-finmas and s-spsufi since they were never meant
5666 to be end-user visible.
5667 * s-finmas.adb: Add with and use clause for System.HTable.
5668 Add an instantiation of Simple_HTable which provides a mapping between
5669 the address of a controlled object and the corresponding
5670 Finalize_Address used to clean up the object. The table is used when a
5671 master is operating in heterogeneous mode.
5672 (Attach): Explain why the input node is not verified on being already
5674 (Delete_Finalize_Address): New routine.
5675 (Detach): Add pragma Assert which ensures that a node is already
5677 (Finalize): Add local variable Cleanup. Rewrite the iteration scheme
5678 since nodes are no longer removed on traversal. Explain why node
5679 detachment is undesirable in this case.
5680 (Get_Finalize_Address): New routine.
5681 (Hash): New routine.
5682 (Is_Empty_List): Removed.
5683 (pm): Renamed to Print_Master. Add output for discriminant
5685 Comment reformatting.
5686 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
5687 * s-finmas.ads: Various comments additions / improvements.
5688 Type Finalization_Master has a discriminant which determines the mode of
5690 (Delete_Finalize_Address): New routine.
5691 (Get_Finalize_Address): New routine.
5692 (pm): Renamed to Print_Master.
5693 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
5694 * s-stposu.adb: Add with clause for System.Address_Image; Add with and
5695 use clause for System.IO.
5696 (Allocate_Any_Controlled): Add machinery to set TSS primitive
5697 Finalize_Address depending on the mode of allocation and the mode of
5699 (Deallocate_Any_Controlled): Remove the relation pair object -
5700 Finalize_Address regardless of the master mode. Add comment explaining
5702 (Detach): Ensure that fields Prev and Next are null after detachment.
5703 (Finalize_Pool): Remove local variable Next_Ptr. Rewrite the iteration
5704 scheme to check whether the list of subpools is empty. There is no
5705 longer need to store the next subpool or advance the current pointer.
5706 (Is_Empty_List): New routine.
5707 (Print_Pool): New routine.
5708 (Print_Subpool): New routine.
5709 * s-stposu.ads: Various comments additions / improvements.
5710 Field Master of type Root_Subpool is now a heterogeneous collection.
5711 (Print_Pool): New routine.
5712 (Print_Subpool): New routine.
5714 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5716 * exp_ch5.adb (Expand_N_Iterator_Loop): Implement Ada2012 loop iterator
5717 forms, using aspects of container types.
5718 * sem_ch3.adb (Find_Type_Name): Preserve Has_Delayed_Aspects and
5719 Has_Implicit_Dereference flags, that may be set on the partial view.
5720 * sem_ch4.adb (Process_Overloaded_Indexed_Component): Prefix may be a
5721 container type with an indexing aspect.
5722 (Analyze_Quantified_Expression): Analyze construct with expansion
5723 disabled, because it will be rewritten as a loop during expansion.
5724 (Try_Container_Indexing): The prefix itself may be a container type
5725 with an indexing aspect, as with a vector of vectors.
5726 * sem_ch5.adb (Analyze_Iteration_Scheme): In a generic context, analyze
5727 the original doamin of iteration, for name capture.
5728 (Analyze_Iterator_Specification): If the domain is an expression that
5729 needs finalization, create a separate declaration for it.
5730 For an iterator with "of" retrieve default iterator info from aspect of
5731 container type. For "in" iterator, retrieve type of Iterate function.
5732 * sem_ch13.adb (Check_Iterator_Function): Fix typo.
5733 (Check_Aspect_At_End_Of_Declaration): Make type unfrozen before
5734 analysis, to prevent spurious errors about late attributes.
5735 * sprint.adb: Handle quantified expression with either loop or iterator
5737 * a-convec.ads, a-convec.adb: Iterate function returns a reversible
5740 2011-08-29 Vincent Celier <celier@adacore.com>
5742 * make.adb (Scan_Make_Arg): Take any option as is in packages Compiler,
5743 Binder or Linker of the main project file.
5745 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5747 * inline.adb (Add_Scopes_To_Clean): Exclude any entity within a generic
5750 2011-08-29 Yannick Moy <moy@adacore.com>
5752 * exp_ch9.adb: Partial revert of previous change for Alfa mode
5754 2011-08-29 Yannick Moy <moy@adacore.com>
5756 * exp_ch11.adb: Minor expansion of comment.
5758 2011-08-29 Yannick Moy <moy@adacore.com>
5760 * lib-xref-alfa.adb (Add_ALFA_Scope): Treat generic entities.
5762 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5764 * sem_res.adb (Resolve_Arithmetic_Op): If the node has a universal
5765 interpretation, set the type before resolving the operands, because
5766 legality checks on an exponention operand need to know the type of the
5769 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5771 * sem_ch12.adb (Analyze_Package_Instantiation): Do not set delayed
5772 cleanups on a master if the instance is within a generic unit.
5773 Complement to the corresponding fix to inline.adb for K520-030.
5775 2011-08-29 Tristan Gingold <gingold@adacore.com>
5777 * exp_ch7.adb (Build_Raise_Statement): Raise PE instead of the current
5779 * exp_intr.adb: Minor comment fix.
5781 2011-08-29 Bob Duff <duff@adacore.com>
5783 * sem_ch13.adb (Analyze_Aspect_Specifications): Fix cases where
5784 Delay_Required was used as an uninitialized variable.
5786 2011-08-29 Robert Dewar <dewar@adacore.com>
5788 * a-cdlili.adb, a-cdlili.ads, a-coinve.adb, a-coinve.ads,
5789 sem_util.adb, sem_util.ads, a-cohama.adb, a-cohama.ads, a-coorse.adb,
5790 a-coorse.ads, aspects.ads, sem_ch8.adb: Minor reformatting.
5792 2011-08-29 Thomas Quinot <quinot@adacore.com>
5794 * system-freebsd-x86_64.ads (Backend_Overflow_Checks): Set true True.
5795 Remove unused variables.
5797 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5799 * sem_res.adb: Remove Build_Explicit_Dereference.
5800 * sem_util.adb, sem_util.ads (Build_Explicit_Dereference): Moved here
5801 from sem_res.adb, used in analysis of additional constructs.
5802 (Is_Iterator, Is_Reversible_Iterator): New predicates for Ada2012
5803 expansion of iterators.
5804 (Is_Object_Reference): Recognize variables rewritten as explicit
5805 dereferences in Ada2012.
5806 * snames.ads-tmpl: Add Has_Element, Forward_Iterator,
5807 Reversible_Iterator names, for expansion of Ada2012 iterators.
5808 * aspects.ads, aspects.adb (Find_Aspect): Utility.
5809 * a-cdlili.ads, a-cdlili.adb: Add new iterator machinery to doubly
5810 linked list container.
5811 * a-coinve.ads, a-coinve.adb: Ditto for indefinite vector containers.
5812 * a-coorse.ads, a-coorse.adb: Ditto for ordered sets.
5814 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5816 * a-cohama.adb, a-cohama.ads: Add iterator primitives to hashed map
5819 2011-08-29 Vincent Celier <celier@adacore.com>
5821 * make.adb (Gnatmake): Get the maximum number of simultaneous
5822 compilation processes after the Builder switches has been scanned, as
5823 there may include -jnn.
5825 2011-08-29 Matthew Heaney <heaney@adacore.com>
5827 * a-chtgbo.adb (Generic_Equal): Use correct overloading of Next.
5829 2011-08-29 Tristan Gingold <gingold@adacore.com>
5831 * gnatcmd.adb (GNATCmd): On OpenVMS, truncate the length of
5832 GNAT_DRIVER_COMMAND_LINE to 255.
5834 2011-08-29 Pascal Obry <obry@adacore.com>
5836 * freeze.adb, sem_ch8.adb, a-convec.adb, a-convec.ads: Minor
5837 reformatting and style fix (class attribute casing).
5839 2011-08-29 Yannick Moy <moy@adacore.com>
5841 * exp_ch11.adb: Yet another case where expansion should be common
5842 between CodePeer and Alfa.
5844 2011-08-29 Yannick Moy <moy@adacore.com>
5846 * exp_ch9.adb: Partial revert of previous change for Alfa mode.
5848 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5850 * sem_ch6.adb (Matches_Limited_With_View): The limited views of an
5851 incomplete type and its completion match.
5853 2011-08-29 Yannick Moy <moy@adacore.com>
5855 * exp_ch13.adb: Adjust previous change.
5857 2011-08-29 Robert Dewar <dewar@adacore.com>
5859 * sem_prag.adb, prj.adb, sem_util.adb, sem_res.adb, gnat1drv.adb,
5860 exp_ch4.adb, sem_ch8.adb: Minor code reorganization
5863 2011-08-29 Emmanuel Briot <briot@adacore.com>
5865 * make.adb, prj.adb, prj.ads (Compute_All_Imported_Projects): Also
5866 initialize aggregated projects.
5868 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5870 * sem_ch8.adb (Find_Renamed_Entity): Within an instance, use scope
5871 depth of candidates to resolve a potentially spurious ambiguity between
5872 two visible subprograms.
5874 2011-08-29 Yannick Moy <moy@adacore.com>
5876 * sem_prag.adb (Analyze_Pragma): Allow Test_Case pragma without
5878 * sem_util.adb (Get_Ensures_From_Test_Case_Pragma,
5879 Get_Requires_From_Test_Case_Pragma): Allow Test_Case pragma without
5882 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5884 * gnat1drv.adb (Adjust_Global_Switches): Improve previous change.
5887 2011-08-29 Thomas Quinot <quinot@adacore.com>
5889 * sem_res.adb: Minor reformatting.
5891 2011-08-29 Johannes Kanig <kanig@adacore.com>
5893 * exp_ch4.adb (Expand_Quantified_Expression): Do not expand in ALFA
5895 * gnat1drv.adb (Adjust_Global_Switches): Set
5896 Use_Expressions_With_Actions to False in ALFA mode.
5897 * sem_res.adb (Resolve_Quantified_Expression): Simpler treatment in
5900 2011-08-29 Yannick Moy <moy@adacore.com>
5902 * exp_ch13.adb (Expand_N_Freeze_Entity): Do nothing in Alfa mode.
5903 * exp_ch9.adb: Do not expand tasking constructs in Alfa mode.
5904 * gnat1drv.adb (Adjust_Global_Switches): Suppress the expansion of
5905 tagged types and dispatching calls in Alfa mode.
5907 2011-08-29 Javier Miranda <miranda@adacore.com>
5909 * sem_ch3.adb (Process_Discriminants): Add missing check to ensure that
5910 we do not report an error on an Empty node.
5912 2011-08-29 Geert Bosch <bosch@adacore.com>
5914 * Makefile.rtl (GNATRTL_NONTASKING_OBJECTS): Add a-nllrar.o,
5915 a-nlrear.o and a-nurear.o.
5917 2011-08-29 Robert Dewar <dewar@adacore.com>
5919 * freeze.adb: Minor code reorganization.
5921 * sem_util.adb, errout.adb, exp_ch11.adb, a-ngrear.adb, s-gearop.adb,
5922 sem_ch6.adb: Minor reformatting
5924 2011-08-29 Tristan Gingold <gingold@adacore.com>
5926 * s-except.ads, s-except.adb: Provide dummy body.
5928 2011-08-29 Yannick Moy <moy@adacore.com>
5930 * sem_warn.adb (Within_Postcondition): Take into account the case of
5931 an Ensures component in a Test_Case.
5933 2011-08-29 Tristan Gingold <gingold@adacore.com>
5935 * s-excdeb.ads, s-excdeb.adb: New files, created from s-except.
5936 * rtsfind.ads (RTU_Id): Replaces System_Exceptions by
5937 System_Exceptions_Debug
5938 (RE_Unit_Table): Search RE_Local_Raise in System_Exceptions_Debug
5939 * a-except.adb: With and use System.Exceptions_Debug instead of
5941 * a-except-2005.adb: Likewise.
5942 * s-assert.adb: Likewise.
5943 * s-except.adb, s-except.ads: Move debugging hooks to s-excdeb.
5944 * Makefile.rtl: Add s-excdeb. Adjust compilation rule.
5945 * gcc-interfaces/Makefile.in, gcc-interface/Make-lang.in: Add
5946 s-excdeb. Update dependencies.
5947 (GNATRTL_LINEARALGEBRA_OBJS): Remove a-nlrear.o a-nurear.o a-nllrar.o
5948 as these no longer need external libraries.
5950 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5952 * sem_res.adb (Resolve_Op_Expon): Additional check to reject an
5953 exponentiation operator on universal values in a context that requires
5956 2011-08-29 Tristan Gingold <gingold@adacore.com>
5958 * raise-gcc.c (personnality_routine): Fix thinko. Set Ada occurrence
5959 before calling notify_handled_exception.
5960 * a-exextr.adb: Fix comment.
5962 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5964 * exp_ch4.adb (Expand_Allocator_Expression): Add code to set attribute
5965 Finalize_Address of the access type's finalization master.
5966 (Expand_N_Allocator): Add code to set attribute Finalize_Address of the
5967 access type's finalization master. Add a guard to prevent
5968 Associated_Storage_Pool from being set on .NET/JVM.
5969 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add code to set
5970 attribute Finalize_Address of the access type's finalization master.
5971 * exp_ch7.adb (Make_Finalize_Address_Call): New routine.
5972 * exp_ch7.ads (Make_Finalize_Address_Call): New routine.
5973 * rtsfind.ads: Add RE_Set_Finalize_Address to tables RE_Id and
5975 * s-finmas.adb: Add with clause for System.Address_Image. Add with and
5976 use clause for System.IO
5977 (Detach): Relax the assertion, to be reinstated later.
5978 (Finalize): Rewrite the iteration loop to avoid pointer comparison.
5979 Relax the assertion on Finalize_Address, to be reinstated later.
5980 (Is_Empty_List): New routine.
5981 (pm): New debug routine.
5982 (Set_Finalize_Address): New routine.
5983 * s-finmas.ads (pm): New debug routine.
5984 (Set_Finalize_Address): New routine.
5985 * s-stposu.adb (Allocate_Any_Controlled): Code reformatting.
5987 2011-08-29 Tristan Gingold <gingold@adacore.com>
5989 * a-exexpr-gcc.adb (GCC_Exception_Access, GNAT_GCC_Exception_Access):
5990 Remove convention C.
5992 2011-08-29 Tristan Gingold <gingold@adacore.com>
5994 * s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove.
5995 (Initialize_TCB): Remove Exc_Stack_Ptr initialization.
5996 (Finalize_TCB): Remove its finalization.
5997 (Initialize): Remove assignment of GET_Exc_Stack_Addr
5998 * s-soflin.adb (NT_Exc_Stack): Remove
5999 (Get_Exc_Stack_Addr_NT): Likewise.
6000 (Get_Exc_Stack_Addr_Soft): Likewise.
6001 * s-soflin.ads (Get_Exc_Stack_Addr_NT): Remove.
6002 (Get_Exc_Stack_Addr): Likewise.
6003 (Get_Exc_Stack_Addr_Soft): Likewise
6004 * s-taspri-vms.ads (Exc_Stack_T): Remove.
6005 (Exc_Stack_Ptr_T): Likewise.
6006 (Private_Data): Remove Exc_Stack_Ptr component.
6008 2011-08-29 Tristan Gingold <gingold@adacore.com>
6010 * raise-gcc.c (get_ip_from_context): New function. Factorize code.
6012 2011-08-29 Tristan Gingold <gingold@adacore.com>
6014 * gnat_ugn.texi: Fix aix and x86-solaris info for run-time.
6016 2011-08-29 Geert Bosch <bosch@adacore.com>
6018 * s-gearop.ads (Back_Substitute, Diagonal, Forward_Eliminate,
6019 L2_Norm, Swap_Column): New generic subprograms
6020 * s-gearop.adb (Back_Substitute, Diagonal, Forward_Eliminate,
6021 L2_Norm, Swap_Column): Implement new subprograms in order to
6022 eliminate dependency on BLAS and LAPACK libraries in
6023 Ada.Numerics.Generic_Real_Arrays and eventually also the complex
6024 version. Forward_Eliminate/Back_Substitute can be used to put a
6025 matrix in row echelon or reduced row echelon form using partial
6027 * a-ngrear.adb: (Back_Substitute, Diagonal, Forward_Eleminate,
6028 Swap_Column): Instantiate from System.Generic_Array_Operations.
6029 ("*", "abs"): Implement by instantiation from Generic_Array_Operations.
6030 (Sqrt): Local function for simple computation of square root without
6031 adding dependencies on Generic_Elementary_Functions.
6032 (Swap): New subprogram to exchange floating point numbers.
6033 (Inverse): Reimplement using Jordan-Gauss elimination.
6034 (Jacobi): New procedure implementing Jacobi's method for computation
6035 of eigensystems, based on Rutishauser's implementation.
6036 (L2_Norm): Implement directly using the inner product.
6037 (Sort_Eigensystem): Sort eigenvalue/eigenvector pairs in order of
6038 decreasing eigenvalue as required by the Ada RM.
6039 (Swap_Column): New helper procedure for Sort_Eigensystem.
6040 Remove with of System.Generic_Real_BLAS and System.Generic_Real_LAPACK.
6041 Add with of Ada.Containers.Generic_Anonymous_Array_Sort, for
6044 2011-08-29 Thomas Quinot <quinot@adacore.com>
6046 * put_scos.adb (Put_SCOs): Do not emit a newline for an empty
6049 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
6051 * s-finmas.adb (Finalize): Check Finalize_Address of the master rather
6052 than the current node.
6053 * s-finmas.ads: Move field Finalize_Address from type FM_Node to
6054 Finalization_Master. The list headers have two fields instead of three.
6055 This should fix alignment issue but subpool allocations are now
6056 unusable. Alphabetize subprograms.
6057 * s-stposu.adb (Allocate_Any_Controlled): Use the offset rather than
6058 the size of the header when converting the beginning of the object to
6059 a FM_Node. Set the master's Finalize_Address attribute if not already
6061 (Deallocate_Any_Controlled): Use the offset rather than the size of the
6062 header when converting the beginning of the object to a FM_Node.
6064 2011-08-29 Gary Dismukes <dismukes@adacore.com>
6066 * exp_ch11.adb (Expand_N_Raise_Statement): Don't suppress expansion of
6067 reraise when compiling for CodePeer.
6069 2011-08-29 Arnaud Charlet <charlet@adacore.com>
6071 * a-iteint.ads, Makefile.rtl: Add missing compilation of a-iteint.ads,
6072 now needed by a-convec.adb. Fix warning.
6074 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
6076 * exp_util.adb (Build_Allocate_Deallocate_Proc): Add a guard for the
6077 processing of TSS routine Finalize_Address when compiling in
6080 2011-08-29 Thomas Quinot <quinot@adacore.com>
6082 * a-strunb.ads, einfo.ads, g-comlin.ads, sem_ch6.adb,
6083 sem_warn.adb: Minor reformatting.
6085 2011-08-29 Emmanuel Briot <briot@adacore.com>
6087 * prj-conf.adb (Get_Config_Switches): Also collect the list of
6088 languages from aggregated projects.
6090 2011-08-29 Yannick Moy <moy@adacore.com>
6092 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Declarations_Or_Statements,
6093 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
6094 Traverse_Package_Declaration, Traverse_Subprogram_Body,
6095 Traverse_Compilation_Unit): Add a parameter Inside_Stubs so that bodies
6096 for stubs are traversed too when parameter is set
6097 (Traverse_All_Compilation_Units): Traverse without going inside stubs
6098 (Traverse_Declarations_Or_Statements): Do the special traversing for
6099 stubs when required.
6100 * sem_util.adb, sem_util.ads (Get_Body_From_Stub): New function to
6101 return subprogram or package body from stub.
6102 (Is_Subprogram_Stub_Without_Prior_Declaration): New function to detect
6103 stubs without prior subprogram decl.
6105 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
6107 * gnat_ugn.texi: Fix typo.
6109 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
6111 * s-stposu.adb (Allocate_Any_Controlled): Reimplement the mechanism
6112 which accounts for size vs alignment issues and calculates the size of
6114 (Deallocate_Any_Controlled): Ditto.
6115 (Nearest_Multiple_Rounded_Up): New routine.
6117 2011-08-29 Tristan Gingold <gingold@adacore.com>
6119 * a-exstat.adb (String_To_EO): Do no set Cleanup_Flag.
6120 * a-exexda.adb (Set_Exception_C_Msg): Ditto.
6121 (Set_Exception_Msg): Ditto.
6122 * a-exexpr-gcc.adb (Setup_Current_Excep): Ditto. Do not set
6124 * a-except.adb, a-except-2005.adb (Save_Occurrence_No_Private): Remove.
6125 Use Save_Occurrence instead of Save_Occurrence_No_Private.
6126 (Raise_With_Msg): Remove Cleanup_Flag.
6127 * a-except.ads, a-except-2005.ads (Exception_Occurrence): Remove
6128 Clean_Flag and Private_Data components.
6130 2011-08-29 Yannick Moy <moy@adacore.com>
6132 * freeze.adb (Freeze_Record_Type): Ignore packing in Alfa mode, like
6134 * sem_ch3.adb (Signed_Integer_Type_Declaration): Correct the generation
6135 of an explicitly declared type, so that the base types of the original
6136 type and this generated type are the same, and a "type" (not a subtype
6138 * errout.adb (Special_Msg_Delete): Do not issue messages "Size too
6139 small" in Alfa mode, like in CodePeer mode.
6140 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore rep
6141 clauses in Alfa mode.
6143 2011-08-29 Javier Miranda <miranda@adacore.com>
6145 * exp_ch6.ads, exp_ch6.adb (Is_Null_Procedure): Move the spec of this
6146 function to the package spec.
6147 * sem_ch6.adb (Find_Corresponding_Spec, New_Overloaded_Entity): For
6148 internally generated bodies of null procedures locate the internally
6149 generated spec enforcing mode conformance.
6150 (Is_Interface_Conformant): Ensure that the controlling formal of the
6153 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6155 * sem_prag.adb (Analyze_Pragma, case Inline): In an instance, do not
6156 reject the pragma if it appears to apply to a formal subprogram.
6158 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6160 * exp_ch4.adb (Expand_Allocator_Expression): Use consistent name for
6161 inner expression, to prevent double evaluation.
6163 2011-08-29 Tristan Gingold <gingold@adacore.com>
6165 * a-exexpr.adb (Propagate_Exception): Remove all the parameters as
6167 * a-exexpr-gcc.adb (Propagate_Exception): Ditto.
6168 * a-except-2005.adb (Propagate_Exception): Adjust spec.
6169 (Raise_Current_Excep): Adjust call.
6170 (Raise_From_Signal_Handler): Call now simply call Raise_Current_Excep.
6172 2011-08-29 Thomas Quinot <quinot@adacore.com>
6174 * exp_disp.adb: Minor reformatting.
6176 2011-08-29 Tristan Gingold <gingold@adacore.com>
6178 * a-exexpr.adb (Setup_Exception): Removed.
6179 * a-exexpr-gcc.adb (Setup_Exception): Removed.
6180 * a-except.adb (Exception_Propagation): Removed.
6181 * a-except-2005.adb (Setup_Exception): Removed.
6182 (Reraise): Remove call to Setup_Exception.
6183 (Reraise_Occurrence): Ditto.
6184 (Reraise_Occurrence_Always): Ditto.
6185 (Reraise_Occurrence_No_Defer): Ditto.
6186 (Transfer_Occurrence): Ditto.
6187 * a-exexda.adb (Set_Exception_C_Msg): Remove call to Setup_Exception.
6188 (Set_Exception_Msg): Ditto.
6190 2011-08-29 Robert Dewar <dewar@adacore.com>
6192 * a-convec.adb, exp_disp.adb: Minor reformatting.
6194 2011-08-29 Tristan Gingold <gingold@adacore.com>
6196 * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C.
6198 2011-08-29 Gary Dismukes <dismukes@adacore.com>
6200 * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set
6201 Exception_Handlers to No_List instead of Empty_List in the case where
6202 there are no handlers.
6204 2011-08-29 Tristan Gingold <gingold@adacore.com>
6206 * gcc-interface/gigi.h (enum standard_datatypes): Add
6207 ADT_reraise_zcx_decl
6208 (reraise_zcx_decl): New macro.
6209 * gcc-interface/trans.c (gnu_incoming_exc_ptr): New variable.
6210 (gigi): Set reraise_zcx_decl.
6211 (Exception_Handler_to_gnu_zcx): Save and restore gnu_incoming_exc_ptr.
6212 (gnat_to_gnu): Handle N_Raise_Statement.
6214 2011-08-29 Robert Dewar <dewar@adacore.com>
6216 * sem_ch6.adb, exp_ch3.adb, s-stposu.adb, a-undesu.ads,
6217 a-undesu.adb: Minor reformatting.
6219 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6221 * exp_disp.adb (Check_Premature_Freezing): When building a dispatch
6222 table, accept an unfrozen untagged component if it is an actual for a
6223 formal incomplete type.
6224 * a-convec.ads, a-convec.adb: Instantiate Ada.Iterator_Interfaces to
6225 provide new iterator forms over vectors.
6226 Introduce type Iterator in package body to implement operations of
6227 Reversible_Iterator interface.
6228 * a-iteint.ads: Make package pure so it is usable with new container
6229 packages, that are categorized Remote_Types.
6231 2011-08-29 Robert Dewar <dewar@adacore.com>
6233 * a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting.
6235 2011-08-29 Bob Duff <duff@adacore.com>
6237 * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case
6238 of <>, because this is the routine that checks for dimensionality
6239 errors (for example, for a two-dimensional array, (others => <>) should
6240 be (others => (others => <>)).
6242 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
6244 * impunit.adb: Add new run-time units.
6245 * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb,
6246 s-stposu.ads, s-stposu.adb: Code clean up.
6247 Handle protected class-wide or task class-wide types
6248 Handle C/C++/CIL/Java types.
6249 * s-spsufi.adb, s-spsufi.ads: New files.
6251 2011-08-29 Yannick Moy <moy@adacore.com>
6253 * sem_ch13.adb (Analyze_Aspect_Specifications): Reject test-case on
6254 library-level subprogram.
6255 * sem_prag.adb (Check_Test_Case): Stricter rules for test-case
6257 (Analyze_Pragma): Change name "Normal" for "Nominal" in test-case
6259 * snames.ads-tmpl: Change name "Normal" for "Nominal" in test-case
6261 * gnat_rm.texi: Update doc for Test_Case pragma.
6263 2011-08-29 Tristan Gingold <gingold@adacore.com>
6265 * a-exexpr-gcc.adb (Unwind_Exception): Remove default value, made it
6267 (GCC_Exception_Access): New type.
6268 (Unwind_DeleteException): New imported procedure
6269 (Foreign_Exception): Import it.
6270 (GNAT_GCC_Exception): Simply have the occurrence inside.
6271 (To_GCC_Exception): New function.
6272 (To_GNAT_GCC_Exception): New function.
6273 (GNAT_GCC_Exception_Cleanup): New procedure..
6274 (Propagate_GCC_Exception): New procedure.
6275 (Reraise_GCC_Exception): New procedure.
6276 (Setup_Current_Excep): New procedure.
6277 (CleanupUnwind_Handler): Change type of UW_Exception parameter.
6278 (Unwind_RaiseException): Ditto.
6279 (Unwind_ForcedUnwind): Ditto.
6281 (Begin_Handler): Change type of parameter.
6282 (End_Handler): Ditto. Now delete the exception if still present.
6283 (Setup_Key): Removed.
6284 (Is_Setup_And_Not_Propagated): Removed.
6285 (Set_Setup_And_Not_Propagated): Ditto.
6286 (Clear_Setup_And_Not_Propagated): Ditto.
6287 (Save_Occurrence_And_Private): Ditto.
6288 (EID_For): Add 'not null' constraint on parameter.
6289 (Setup_Exception): Does nothing.
6290 (Propagate_Exception): Simplified.
6291 * exp_ch11.adb (Expand_N_Raise_Statement): In back-end exception model,
6292 re-raise is not expanded anymore.
6293 * s-except.ads (Foreign_Exception): New exception - placeholder for
6295 * raise-gcc.c (__gnat_setup_current_excep): Declare
6296 (CXX_EXCEPTION_CLASS): Define (not yet used)
6297 (GNAT_EXCEPTION_CLASS): Define.
6298 (is_handled_by): Handle foreign exceptions.
6299 (PERSONALITY_FUNCTION): Call __gnat_setup_current_excep.
6301 2011-08-29 Jose Ruiz <ruiz@adacore.com>
6303 * a-synbar.adb (Synchronous_Barrier): Some additional clarification.
6305 2011-08-29 Thomas Quinot <quinot@adacore.com>
6307 * a-synbar-posix.adb: Minor reformatting.
6309 2011-08-29 Jose Ruiz <ruiz@adacore.com>
6311 * a-exetim-posix.adb, a-exetim-mingw.adb, a-exetim-mingw.ads,
6312 a-exetim-default.ads (Interrupt_Clocks_Supported,
6313 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
6314 definitions to be compliant with AI-0171. The target systems do not
6315 support separate account for the execution time of interrupt handlers.
6317 2011-08-29 Jose Ruiz <ruiz@adacore.com>
6319 * a-synbar.adb (Wait): Change the order of evaluation of the conditions
6320 in the barrier to put first the easiest to evaluate (and the one which
6321 will be True more often). More efficient.
6323 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
6325 * s-atocou-x86.adb: Fix constraint in machine code insertion.
6327 2011-08-29 Bob Duff <duff@adacore.com>
6329 * aspects.ads, aspects.adb: Add new aspects for various pragmas and
6330 attributes that are now aspects, as specified by AI05-0229-1.
6331 * sem_ch13.adb (Analyze_Aspect_Specifications,
6332 Check_Aspect_At_Freeze_Point): Analyze the new aspects. Turn them into
6333 pragmas or attribute references, as appropriate.
6335 2011-08-29 Robert Dewar <dewar@adacore.com>
6337 * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
6338 a-synbar-posix.ads: Minor reformatting.
6340 2011-08-29 Yannick Moy <moy@adacore.com>
6342 * snames.ads-tmpl: Add name Force.
6344 2011-08-29 Pascal Obry <obry@adacore.com>
6346 * prj-nmsc.adb: Minor reformatting.
6348 2011-08-29 Jose Ruiz <ruiz@adacore.com>
6350 * a-exetim.ads (Interrupt_Clocks_Supported,
6351 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
6352 definitions to be compliant with AI-0171.
6354 2011-08-29 Robert Dewar <dewar@adacore.com>
6356 * a-ngelfu.adb: Add comments.
6358 2011-08-29 Geert Bosch <bosch@adacore.com>
6360 * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
6361 the closest machine number to Pi / 2.0.
6363 2011-08-29 Jose Ruiz <ruiz@adacore.com>
6365 * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
6366 package Ada.Synchronous_Barriers.
6367 * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
6368 Add new specs and bodies for Ada.Synchronous_Barriers. There is a
6369 default implementation using protected objects and another one
6370 a-synbar-posix using POSIX barriers as the underlying support.
6371 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
6372 x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
6373 Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
6374 Clean up dependencies.
6375 * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
6377 2011-08-29 Robert Dewar <dewar@adacore.com>
6379 * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
6380 exp_dist.adb: Minor code reorganization.
6383 2011-08-29 Thomas Quinot <quinot@adacore.com>
6385 * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
6386 primitive operation must support external streaming if it is not a
6387 controlling access result.
6389 2011-08-29 Thomas Quinot <quinot@adacore.com>
6391 * sinfo.ads, sem_ch7.adb: Minor reformatting.
6393 2011-08-29 Bob Duff <duff@adacore.com>
6395 * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
6396 restriction on allocators, as required by AI05-0013-1.
6397 * restrict.ads: Minor comment fix.
6399 2011-08-29 Tristan Gingold <gingold@adacore.com>
6401 * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
6402 (To_Jmpbuf_Address): Ditto
6403 (builtin_longjmp): Ditto
6405 2011-08-29 Thomas Quinot <quinot@adacore.com>
6407 * sem_res.adb: Minor reformatting.
6409 2011-08-29 Vincent Celier <celier@adacore.com>
6411 * make.adb (Gnatmake): Move special processing for VM targets after the
6412 call to Get_Target_Parameters.
6414 2011-08-29 Thomas Quinot <quinot@adacore.com>
6416 * sem_ch12.adb, par-ch12.adb: Minor reformatting.
6418 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
6420 * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
6421 where an anonymous access discriminant of a limited designated type
6422 appears in a non-immutably limited discriminated type and issue an
6423 error message. Add local variable Desig_T and replace all occurrences
6426 2011-08-29 Jose Ruiz <ruiz@adacore.com>
6428 * a-rttiev.adb (Set_Handler): Update comment to indicate that our
6429 implementation is compliant to RM D.15(15/2) after the modification
6430 imposed by AI05-0094-1 (binding interpretation).
6432 2011-08-29 Robert Dewar <dewar@adacore.com>
6434 * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
6435 s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
6437 2011-08-29 Thomas Quinot <quinot@adacore.com>
6439 * par-endh.adb (Check_End): For an END where it is mandatory to repeat
6440 the scope name, do not report a missing label as a style violation (it
6441 will be diagnosed as an illegality).
6442 * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
6443 variant records: Get_Enum_Lit_From_Pos already returns a usage
6444 occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
6445 on Expr in Integer_Literal case so that it can be used by
6448 2011-08-29 Tristan Gingold <gingold@adacore.com>
6450 * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
6452 * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
6453 (Build_Abort_Block_Handler): New function to build an Abort_Signal
6455 * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
6456 Build_Abort_Block_Handler to build the exception handler. Do not
6457 undefer aborts for the Abort_Signal exception handler if back-end
6458 exception mechanism.
6459 * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
6460 back_end exceptions for all others and abort_signal.
6461 * s-except.ads (ZCX_By_Default): New constant.
6462 * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
6463 (Raise_Exception_Always): Ditto.
6464 (Raise_From_Signal_Handler): Ditto.
6465 (Raise_With_Location_And_Msg): Ditto.
6466 (Raise_With_Msg): Ditto.
6468 (Reraise_Occurence): Ditto.
6469 (Reraise_Occurrence_Always): Ditto.
6470 * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
6471 * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
6473 2011-08-29 Thomas Quinot <quinot@adacore.com>
6475 * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
6477 2011-08-29 Robert Dewar <dewar@adacore.com>
6479 * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
6480 Minor code reorganization.
6482 2011-08-29 Bob Duff <duff@adacore.com>
6484 * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
6485 2012, not just Ada 2005.
6487 2011-08-29 Vincent Celier <celier@adacore.com>
6489 * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
6490 with a project file or with gprbuid, if -gnatep= is specified, the
6491 builder may need to be invoked with -x.
6493 2011-08-29 Tristan Gingold <gingold@adacore.com>
6495 * a-exexpr-gcc.adb: Minor comment fix.
6497 2011-08-29 Robert Dewar <dewar@adacore.com>
6499 * sem_ch8.adb: Minor reformatting.
6501 2011-08-29 Bob Duff <duff@adacore.com>
6503 * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
6504 * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
6505 treating "some" as unreserved in earlier Ada versions. This is now
6506 handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
6507 rather than Name_Some, since Tok_Some is now recognized as reserved.
6508 * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
6510 * scans.ads: Minor comment fixes.
6511 * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
6512 for other language versions.
6513 * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
6514 treating "some" as unreserved in earlier Ada versions. This is now
6515 handled in Snames.Is_Keyword_Name.
6516 * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
6518 (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
6519 unreserved in earlier Ada versions. This is now handled in
6520 Snames.Is_Keyword_Name.
6521 * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
6522 words as for other language versions.
6523 * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
6524 Ada 2012, not just Ada 2005.
6526 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6528 * sem_ch13.adb: Additional semantic checks for aspects involved in
6531 2011-08-29 Matthew Heaney <heaney@adacore.com>
6533 * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
6534 a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
6535 Container parameter.
6536 (Ancestor_Find): ditto.
6538 2011-08-29 Thomas Quinot <quinot@adacore.com>
6540 * par-endh.adb: Minor reformatting.
6542 2011-08-29 Tristan Gingold <gingold@adacore.com>
6544 * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
6545 (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
6546 (Adjust_N_CLeanups_For): Remove.
6547 (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
6549 (Propgate_Exception): Adjust.
6550 * raise-gcc.c: Add a few static/const.
6551 (Adjust_N_Cleanups_For): Remove declaration.
6552 (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
6554 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6556 * sem_ch8.adb: Use type of function return when rewriting as object
6559 2011-08-29 Gary Dismukes <dismukes@adacore.com>
6561 * sem_type.adb: Minor reformatting.
6563 2011-08-29 Robert Dewar <dewar@adacore.com>
6565 * makeutl.adb: Minor reformatting.
6567 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6569 * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
6570 function call of a limited type, the expansion of the renaming is
6571 complicated by the presence of various temporaries and subtypes that
6572 capture constraints of the renamed object.
6573 Rewrite node as an object declaration, whose expansion is simpler.
6574 Given that the object is limited there is no copy involved and no
6577 2011-08-29 Robert Dewar <dewar@adacore.com>
6579 * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
6580 freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
6582 2011-08-29 Tristan Gingold <gingold@adacore.com>
6584 * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
6585 system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
6586 system-linux-hppa.ads, system-linux-s390.ads,
6587 system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
6588 system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
6589 system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
6590 system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
6591 system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
6592 system-solaris-sparc.ads, system-lynxos-x86.ads,
6593 system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
6594 system-solaris-x86_64.ads, system-mingw-x86_64.ads,
6595 system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
6596 system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
6597 system-vxworks-x86.ads: Remove GCC_ZCX_Support.
6598 * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
6599 s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
6600 * opt.ads: Adjust comment.
6601 * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
6602 * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
6603 * system.ads: Move GCC_ZCX_Support to obsolete entries.
6605 2011-08-29 Emmanuel Briot <briot@adacore.com>
6607 * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
6608 file name is specified on the gnatmake or gprbuild command line, and
6609 before we search for that file in the project.
6611 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6613 * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
6614 used to determine whether a possible interpretation for an overloadable
6615 entity is declared within the current instantiation and should be
6616 included in the candidate set.
6618 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
6620 * gnat_rm.texi, gnat_ugn.texi: Clean ups.
6622 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6624 * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
6625 access subtype is access_to_subprogram, when applying checks for
6628 2011-08-29 Matthew Heaney <heaney@adacore.com>
6630 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
6631 for sibling when common parent.
6633 2011-08-29 Thomas Quinot <quinot@adacore.com>
6635 * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
6638 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6640 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
6641 for the return type when in ASIS mode.
6643 2011-08-29 Vincent Celier <celier@adacore.com>
6645 * make.adb (Gnatmake): Get the default search dirs, then the target
6646 parameters after getting the Builder switches, as the Builder switches
6647 may include --RTS= and that could change the default search dirs.
6649 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
6651 * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
6652 Make_Final_Call. Move the processing for class-wide types before the
6653 processing for derivations from [Limited_]Controlled.
6654 (Make_Final_Call): Move the processing for class-wide types before the
6655 processing for derivations from [Limited_]Controlled.
6656 * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
6657 Add code to account for alignments larger than the list header. Add a
6658 comment illustrating the structure of the allocated object + padding +
6660 (Deallocate_Any_Controlled): Add code to account for alignments larger
6661 than the list header.
6663 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6665 * sinfo.ads, sinfo.adb: New node kind
6666 N_Formal_Incomplete_Type_Definition, related flags.
6667 par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
6668 Parse formal incomplete types.
6669 * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
6671 * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
6672 Formal incomplete types do not need completion.
6673 * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
6674 Validate_Incomplete_Type_Instance): New procedures to handle formal
6676 * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
6677 that corresponds to a formal incomplete type.
6678 * sprint.adb: Handle formal incomplete type declarations.
6679 * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
6682 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
6684 * a-fihema.ads, a-fihema.adb: Unit removed.
6685 * a-undesu.ads, a-undesu.adb: New unit implementing
6686 Ada.Unchecked_Deallocate_Subpool.
6687 * einfo.adb: Remove Associated_Collection from the node usage.
6688 Add Finalization_Master to the node usage.
6689 (Associated_Collection): Removed.
6690 (Finalization_Master): New routine.
6691 (Set_Associated_Collection): Removed.
6692 (Set_Finalization_Master): New routine.
6693 (Write_Field23_Name): Remove Associated_Collection from the output. Add
6694 Finalization_Master to the output.
6695 * einfo.ads: Remove attribute Associated_Collection and its uses in
6697 Add new attribute Finalization_Master along with its uses in entitites.
6698 (Associated_Collection): Removed along with its pragma import.
6699 (Finalization_Master): New routine along with a pragma import.
6700 (Set_Associated_Collection): Removed along with its pragma import.
6701 (Set_Finalization_Master): New routine along with a pragma import.
6702 * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
6703 Build_Finalization_Collection with Build_Finalization_Master.
6704 (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
6705 before the bodies of the predefined routines. Add comment explaining
6706 this. Replace call to Build_Finalization_Collection with
6707 Build_Finalization_Master.
6708 (Freeze_Type): Replace call to Build_Finalization_Collection with
6709 Build_Finalization_Master.
6710 (Make_Finalize_Address_Body): Comment reformatting.
6711 (Make_Predefined_Primitive_Specs): Code reformatting.
6712 (Stream_Operation_OK): Update comment mentioning finalization
6713 collections. Replace RE_Finalization_Collection with
6714 RE_Finalization_Master.
6715 * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
6716 Associated_Collection with Finalization_Master. Replace call to
6717 Build_Finalization_Collection with Build_Finalization_Master.
6718 (Expand_Allocator_Expression): Replace call to Associated_Collection
6719 with Finalization_Master. Replace call to Set_Associated_Collection with
6720 Set_Finalization_Master. Remove the generation of
6721 Set_Finalize_Address_Ptr.
6722 (Expand_N_Allocator): Replace call to Associated_Collection with
6723 Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
6724 * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
6725 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
6726 comment on usage. Replace call to Needs_BIP_Collection with
6727 Needs_BIP_Finalization_Master Remplace BIP_Collection with
6728 BIP_Finalization_Master. Update all comments which mention finalization
6729 collections. Replace Associated_Collection with
6730 Finalization_Master. Replace Build_Finalization_Collection with
6731 Build_Finalization_Master.
6732 (BIP_Formal_Suffix): Update BIP_Collection's case.
6733 (Build_Heap_Allocator): Update the related comment. Rename local
6734 variable Collect to Fin_Mas_Id and update its occurrences. Update
6735 comments which mention finalization collections. Replace
6736 Set_Associated_Collection with Set_Finalization_Master.
6737 (Expand_Call): Update the code which detects a special piece of library
6739 (Make_Build_In_Place_Call_In_Allocator): Replace the call to
6740 Add_Collection_Actual_To_Build_In_Place_Call with
6741 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
6742 which generates a call to Make_Set_Finalize_Address_Ptr_Call.
6743 (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
6744 Add_Collection_Actual_To_Build_In_Place_Call with
6745 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
6746 (Make_Build_In_Place_Call_In_Assignment): Replace call to
6747 Add_Collection_Actual_To_Build_In_Place_Call with
6748 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
6749 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
6750 * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
6751 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
6752 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
6753 Rename local variable Collect to Fin_Mas_Id and update its occurrences.
6754 Replace call to Set_Associated_Collection with Set_Finalization_Master.
6755 (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
6756 Replace the call to Associated_Collection with Finalization_Master.
6757 Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
6758 Update the way finalization master names are generated. Update the
6759 retrieval of the correct access type which will carry the pool and
6761 (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
6762 (Make_Finalize_Address_Body): Abstract types do not need
6763 Finalize_Address. Code reformatting.
6764 (Make_Finalize_Address_Stmts): Update comment on usage.
6765 (Make_Set_Finalize_Address_Ptr_Call): Removed.
6766 (Process_Declarations): Update comments.
6767 * exp_ch7.ads (Build_Finalization_Collection): Renamed to
6768 Build_Finalization_Master. Update associated comment.
6769 (Make_Set_Finalize_Address_Ptr_Call): Removed.
6770 * exp_ch13.adb: Update comments which mention finalization collections.
6771 (Expand_N_Free_Statement): Replace the call to Associated_Collection
6772 with Finalization_Master.
6773 * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
6774 create calls to routines Allocate_Any_Controlled and
6775 Deallocate_Any_Controlled.
6776 (Find_Finalize_Address): New routine.
6777 (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
6779 (Requires_Cleanup_Actions): Update the comment on freeze node
6781 * exp_util.ads: Remove comment on generated code for
6782 Build_Allocate_Deallocate_Proc. The code is now quite complex and it
6783 is better to simply look in the body.
6784 * freeze.adb (Freeze_All): Update the comment of finalization
6785 collections. Replace the call to Associated_Collection with
6786 Finalization_Master. Replace the call to Build_Finalization_Collection
6787 with Build_Finalization_Master.
6788 * impunit.adb: Add a-undesu and s-stposu to the list of units.
6789 * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
6791 * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
6792 Ada.Finalization. Add processing for children of System.Storage_Pools.
6793 * rtsfind.ads: Remove the naming of second level children of
6795 Remove Ada_Finalization_Heap_Management from the list of units.
6796 Remove subtype Ada_Finalization_Child.
6797 Remove the following subprogram entities:
6801 RE_Finalization_Collection
6802 RE_Finalization_Collection_Ptr
6803 RE_Set_Finalize_Address_Ptr
6805 Add the naming of second level children of System.Storage_Pools.
6806 Add System_Finalization_Masters and System_Storage_Pools_Subpools to
6808 Add subtype System_Storage_Pools_Child.
6809 Add the following subprogram entities to System.Finalization_Masters:
6811 RE_Finalization_Master
6812 RE_Finalization_Master_Ptr
6814 Add the following subprogram entities to System.Storage_Pools.Subpools:
6816 RE_Allocate_Any_Controlled
6817 RE_Deallocate_Any_Controlled
6818 RE_Root_Storage_Pool_With_Subpools
6822 Move the following subprogram entities from
6823 Ada.Finalization.Heap_Management to System.Finalization_Masters:
6825 RE_Add_Offset_To_Address
6830 * sem_ch3.adb (Access_Type_Declaration): Replace the call to
6831 Set_Associated_Collection with Set_Finalization_Master.
6832 * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
6833 BIP_Finalization_Master is created.
6834 * s-finmas.adb: New unit System.Finalization_Masters.
6835 * s-finmas.ads: New unit System.Finalization_Masters.
6836 * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
6837 * s-stposu.ads, s-stposu.adb: New unit implementing
6838 System.Storage_Pools.Subpools.
6840 2011-08-29 Bob Duff <duff@adacore.com>
6842 * tbuild.adb: Add assertion.
6844 2011-08-29 Thomas Quinot <quinot@adacore.com>
6846 * s-pooglo.adb: Minor reformatting.
6848 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6850 * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
6851 an indexed component of a packed array whose element type is a record
6852 with a representation clause different from that of the right-hand
6853 side, generate a temporary to minimuze the number of bit-field
6854 operations generated.
6856 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6858 * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
6859 declarations, and thus are likely insertion points for actions.
6861 2011-08-29 Bob Duff <duff@adacore.com>
6863 * einfo.ads: Minor comment fix.
6865 2011-08-29 Robert Dewar <dewar@adacore.com>
6867 * frontend.adb, gnat1drv.adb: Minor reformatting.
6869 2011-08-29 Tristan Gingold <gingold@adacore.com>
6871 * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
6872 * a-fihema.adb (Allocate, Deallocate): Ditto. Possibly add padding
6873 space in front of the header.
6875 2011-08-29 Johannes Kanig <kanig@adacore.com>
6877 * frontend.adb (Frontend): Exit after creating Standard package when
6878 -gnatd.H is present.
6879 * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
6882 2011-08-29 Robert Dewar <dewar@adacore.com>
6884 * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
6885 makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
6886 snames.ads-tmpl: Minor reformatting.
6888 2011-08-29 Philippe Gil <gil@adacore.com>
6890 * prj.adb (Reset_Units_In_Table): New procedure.
6891 Reset units to avoid access to freed memory.
6893 2011-08-29 Thomas Quinot <quinot@adacore.com>
6895 * get_scos.adb: When reading a P statement SCO without a pragma name
6896 (from an older ALI file), ensure that the Pragma_Name component is set
6897 to Unknown_Pragma (not left uninitialized).
6899 2011-08-29 Vincent Celier <celier@adacore.com>
6901 * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
6902 modified to compute correctly the object path of a SAL project that is
6903 extending another library project.
6904 (Write_Path_File): New procedure.
6905 * makeutl.ads (Directories): New table moved from Buildgpr
6906 (Get_Directories): New procedure moved from Buildgpr
6907 (Write_Path_File): New procedure
6908 * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
6909 paths before binding SALs, instead of Set_Ada_Paths.
6910 * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
6912 * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
6913 (Current_Source_Path_File_Of): New function
6914 (Set_Current_Object_Path_File_Of): New procedure
6915 (Current_Source_Object_File_Of): New function
6916 (Set_Current_Object_Path_File_Of): New procedure
6917 * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
6918 (Current_Source_Path_File_Of): New function
6919 (Set_Current_Object_Path_File_Of): New procedure
6920 (Current_Source_Object_File_Of): New function
6921 (Set_Current_Object_Path_File_Of): New procedure
6923 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6925 * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
6926 packed entity, use a bit-field assignment only if there is no change of
6929 2011-08-29 Thomas Quinot <quinot@adacore.com>
6931 * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
6932 Is_RTU instead of using Chars comparisons.
6934 2011-08-29 Thomas Quinot <quinot@adacore.com>
6936 * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
6937 temporary object if the actual is constrained, and the discriminants
6938 read from the stream don't match.
6940 2011-08-29 Tristan Gingold <gingold@adacore.com>
6942 * sem_attr.adb, exp_attr.adb: Add handling of
6943 Attribute_System_Allocator_Alignment
6944 * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
6945 Attribute_System_Allocator_Alignment.
6946 * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
6947 * gcc-interface/targtyps.c, gcc-interface/utils2.c,
6948 gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
6949 get_target_system_allocator_alignment.
6951 2011-08-29 Arnaud Charlet <charlet@adacore.com>
6953 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
6956 2011-08-29 Arnaud Charlet <charlet@adacore.com>
6958 * exp_ch3.adb (In_Runtime): Fix typo.
6960 2011-08-29 Bob Duff <duff@adacore.com>
6962 * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
6964 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6966 * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
6967 and a separate tag assignment is generated, ensure that the tag
6968 assignment is analyzed.
6970 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6972 * atree.ads, atree.adb (Copy_Separate_List): New function that applies
6973 Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
6974 of statement lists that may contain local declarations.
6975 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
6976 duplicate the triggering statements needed for the expansion of this
6977 construct, when the trigger is a dispatching call to a synchronized
6980 2011-08-29 Arnaud Charlet <charlet@adacore.com>
6982 * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
6983 * bindgen.adb: Add comments.
6984 * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
6987 2011-08-29 Robert Dewar <dewar@adacore.com>
6989 * exp_attr.adb: Minor reformatting.
6990 Minor code reorganization and commenting.
6991 * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
6994 2011-08-29 Thomas Quinot <quinot@adacore.com>
6996 * get_scos.adb: Ignore chaining indicators not currently supported
6999 2011-08-29 Arnaud Charlet <charlet@adacore.com>
7001 * system.ads: Minor editing.
7003 2011-08-29 Arnaud Charlet <charlet@adacore.com>
7005 * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
7007 * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
7008 Attribute_Elab_Subp_Body.
7009 * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
7010 * sem_util.adb: Update comments.
7012 2011-08-29 Thomas Quinot <quinot@adacore.com>
7014 * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
7015 pragma name for each SCO statement corresponding to a pragma.
7017 2011-08-29 Arnaud Charlet <charlet@adacore.com>
7019 * opt.ads: Minor editing.
7021 2011-08-29 Yannick Moy <moy@adacore.com>
7023 * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
7024 that only made sense for CodePeer mode.
7026 2011-08-29 Jose Ruiz <ruiz@adacore.com>
7028 * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
7029 which is no longer used.
7030 * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
7031 handling of the 64-bit division check.
7032 * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
7034 * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
7037 2011-08-29 Thomas Quinot <quinot@adacore.com>
7039 * get_scos.adb: Minor reformatting.
7041 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
7043 * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
7044 statement list is wrapped in a block, the block is explicitly analyzed
7045 in order to properly redecorate the entities and create a servicing
7048 2011-08-29 Tristan Gingold <gingold@adacore.com>
7050 * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
7051 (Set_Zero_Cost_Handling): Remove.
7053 2011-08-29 Thomas Quinot <quinot@adacore.com>
7055 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
7057 2011-08-29 Geert Bosch <bosch@adacore.com>
7059 * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
7060 instruction, as the latter may produce -0.0, which is not a valid VAX
7062 (Neg_G): Likewise for VAX F float.
7064 2011-08-29 Robert Dewar <dewar@adacore.com>
7066 * exp_util.adb: Minor reformatting.
7068 2011-08-29 Yannick Moy <moy@adacore.com>
7070 * sem_ch3.adb: Minor comment update.
7072 2011-08-29 Thomas Quinot <quinot@adacore.com>
7074 * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
7077 2011-08-29 Thomas Quinot <quinot@adacore.com>
7079 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
7080 current statement sequence on a generic instantiation or a subprogram
7083 2011-08-29 Robert Dewar <dewar@adacore.com>
7085 * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
7088 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
7090 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
7091 Correct the check which involves the freeze node of a controlled or
7092 access-to-controlled type.
7094 2011-08-29 Geert Bosch <bosch@adacore.com>
7096 * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
7098 * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
7101 2011-08-29 Yannick Moy <moy@adacore.com>
7103 * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
7104 for every index type and component type that is not a subtype_mark.
7105 (Process_Subtype): Set Etype of subtype.
7107 2011-08-29 Robert Dewar <dewar@adacore.com>
7109 * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
7110 reorganization. Minor reformatting.
7112 2011-08-29 Steve Baird <baird@adacore.com>
7114 * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
7115 for CodePeer and ALFA modes.
7117 2011-08-29 Ed Schonberg <schonberg@adacore.com>
7119 * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
7120 that comes from an enclosing scope if it is not the renaming of an
7121 actual, to handle properly a spurious ambiguity in an instance.
7123 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
7125 * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
7126 (Alignment_Check_For_Size_Change): ...this. Add SIZE parameter and
7127 use it instead of the Esize of the first parameter.
7128 (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
7130 <Size>: Likewise. Call it for composite types on the RM size.
7132 2011-08-29 Yannick Moy <moy@adacore.com>
7134 * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
7135 * sem_util.adb (Unique_Name): Correct behaviour for names of
7138 2011-08-29 Yannick Moy <moy@adacore.com>
7140 * sem_prag.adb (Check_Precondition_Postcondition): In formal
7141 verification mode, analyze pragma expression for correctness, for
7142 pre/post on library-level subprogram, as it is not expanded later.
7144 2011-08-29 Yannick Moy <moy@adacore.com>
7146 * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
7147 in formal verification.
7149 2011-08-29 Thomas Quinot <quinot@adacore.com>
7151 * sem_util.adb: Minor reformatting.
7152 * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
7154 * par_sco.ads, par_sco.adb: Update comments.
7156 2011-08-29 Yannick Moy <moy@adacore.com>
7158 * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
7159 associated getter/setter.
7160 * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
7162 2011-08-29 Vincent Celier <celier@adacore.com>
7164 * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
7165 * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
7166 with declarations for Language_Kind and Dependency_Kind for Ada.
7167 * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
7168 (Process_Compiler): Take into account the new attributes Dependency_Kind
7170 (Check_Configuration): Check if language kind is unit based, not if the
7171 language name is Ada.
7172 (Process_Exceptions_Unit_Based): Ditto
7173 (Add_Language): Remove default additions of language and dependency kind
7174 * prj.ads: Minor comment change
7175 * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
7177 2011-08-29 Johannes Kanig <kanig@adacore.com>
7179 * debug.adb: Update comments.
7181 2011-08-24 Joseph Myers <joseph@codesourcery.com>
7183 * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
7184 (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
7185 (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
7186 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
7187 (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
7189 2011-08-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7191 * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
7192 (GNATLIBCFLAGS_FOR_C): Replace
7193 TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
7194 (gnatlib-shared-default, gnatlib-shared-dual-win32)
7195 (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
7196 (gnatlib-sjlj, gnatlib-zcx): Likewise.
7198 2011-08-07 Eric Botcazou <ebotcazou@adacore.com>
7200 * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
7202 * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
7204 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
7206 2011-08-05 Nicolas Roche <roche@adacore.com>
7208 * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
7209 libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
7211 * gcc-interface/Make-lang.in: Add support for canadian cross setting.
7213 2011-08-05 Matthew Heaney <heaney@adacore.com>
7215 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
7216 subprogram bodies declared out-of-order.
7218 2011-08-05 Yannick Moy <moy@adacore.com>
7220 * sem_util.adb (Unique_Name): only prefix with "standard" the names of
7221 entities directly in package Standard, otherwise skip the standard
7224 2011-08-05 Robert Dewar <dewar@adacore.com>
7226 * a-cbmutr.adb: Minor reformatting
7227 (Allocate_Node): refactor node allocation algorithm
7229 2011-08-05 Robert Dewar <dewar@adacore.com>
7231 * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
7232 * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
7234 (Analyze_Pragma, case Check_Policy): Ditto.
7235 * sem_prag.ads (Check_Disabled): New function
7236 * snames.ads-tmpl: Add Name_Disable.
7238 2011-08-05 Robert Dewar <dewar@adacore.com>
7240 * gnat_rm.texi: Document implementation-defined policy DISABLE for
7241 pragmas Assertion_Policy, Check_Policy, Debug_Policy.
7243 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7245 * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
7246 that appears in a generic formal part and applies to a formal
7249 2011-08-05 Robert Dewar <dewar@adacore.com>
7251 * a-cbmutr.ads: Minor reformatting.
7253 2011-08-05 Matthew Heaney <heaney@adacore.com>
7255 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
7256 to check count, check sign of value instead.
7257 * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
7258 (Copy_Subtree): allocate copy of source element
7259 (Equal_Subtree): compare elements, not access objects
7261 2011-08-05 Vincent Celier <celier@adacore.com>
7263 * gnat_ugn.texi: Fix VMS alternative.
7265 2011-08-05 Thomas Quinot <quinot@adacore.com>
7267 * sem_ch11.adb: Add comment.
7269 2011-08-05 Robert Dewar <dewar@adacore.com>
7271 * exp_util.adb: Minor comment fix.
7273 2011-08-05 Robert Dewar <dewar@adacore.com>
7275 * scng.adb (Error_Unterminated_String): Improve flag position when
7278 2011-08-05 Matthew Heaney <heaney@adacore.com>
7280 * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
7282 * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
7283 multiway tree containers.
7285 2011-08-05 Robert Dewar <dewar@adacore.com>
7287 * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
7288 * stylesw.adb: Implement -gnatyC to control comment spacing
7289 * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
7291 * usage.adb: Add line for -gnatyC.
7293 2011-08-05 Robert Dewar <dewar@adacore.com>
7295 * gnat_ugn.texi: Document -gnatyC.
7296 * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
7297 synonym for COMMENTS2).
7299 2011-08-05 Robert Dewar <dewar@adacore.com>
7301 * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
7302 a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
7303 sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
7304 a-comutr.ads, lib-xref.adb: Minor reformatting.
7306 2011-08-05 Robert Dewar <dewar@adacore.com>
7308 * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
7309 warning if there is an exception handler present.
7311 2011-08-05 Pascal Obry <obry@adacore.com>
7313 * a-iteint.ads: Fix copyright year.
7315 2011-08-05 Thomas Quinot <quinot@adacore.com>
7317 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
7318 statement SCO for a USE clause or a representation clause.
7320 2011-08-05 Yannick Moy <moy@adacore.com>
7322 * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
7323 between body and spec for stub.
7324 (Detect_And_Add_ALFA_Scope): take into account subprogram stub
7325 * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
7326 pragma precondition or postcondition, for which the enclosing
7327 subprogram or package in the AST is not the desired one, return empty.
7329 2011-08-05 Thomas Quinot <quinot@adacore.com>
7331 * g-expect.adb: Minor reformatting.
7333 2011-08-05 Bob Duff <duff@adacore.com>
7335 * a-fihema.adb: Comment out OS_Lib.
7337 2011-08-05 Matthew Heaney <heaney@adacore.com>
7339 * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
7340 (unbounded multiway tree containers) and a-iteint.ads.
7341 * a-comutr.ads, a-comutr.adb:
7342 This is the new Ada 2012 unit for unbounded multiway tree containers
7343 * a-cimutr.ads, a-cimutr.adb
7344 This is the new Ada 2012 unit for indefinite multiway tree containers
7345 * a-iteint.ads: New file.
7347 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7349 * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
7351 2011-08-05 Bob Duff <duff@adacore.com>
7353 * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
7355 * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
7357 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7359 * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
7360 general indexing aspects of Ada2012. Called when analyzing indexed
7361 components when other interpretations fail.
7362 * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
7363 in an expression context where overloading is meaningful. This excludes
7364 the occurrence in an aspect specification (efficiency only).
7365 * sem_attr.adb (Analyze_Attribute): indicate that the attributes
7366 related to iterators can be set by an attribute specification, but
7368 * sem_ch13.adb (Analyze_Aspect_Specifications): handle
7369 Constant_Indexing and Variable_Indexing.
7370 (Check_Indexing_Functions): New procedure to perform legality checks.
7371 Additional semantic checks at end of declarations.
7373 2011-08-05 Sergey Rybin <rybin@adacore.com>
7375 * tree_io.ads: Update ASIS_Version_Number because of the change of the
7376 order of calling Tree_Write/Tree_Read routines made for aspects.
7378 2011-08-05 Bob Duff <duff@adacore.com>
7380 * a-fihema.adb (Finalize): Fix race condition.
7382 2011-08-05 Yannick Moy <moy@adacore.com>
7384 * sem_ch12.adb (Analyze_Package_Instantiation,
7385 Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
7388 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7390 * sem_type.adb (Specific_Type): in an instance, the type-specific
7391 operand of an equality check that involves null may have a private
7392 type. Use full view to determine legality of construct.
7394 2011-08-05 Vincent Celier <celier@adacore.com>
7396 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
7397 delete or close the file when the call to gnatmake was successful.
7399 2011-08-05 Yannick Moy <moy@adacore.com>
7401 * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
7402 Global_Discard_Names.
7404 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7406 * sinfo.ads: comments on use of entity field for aspect specifications.
7408 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7410 * sem_ch12.adb (Reset_Entity): If the entity field of the associated
7411 node is not itself an entity but a selected component, it is a
7412 rewritten parameterless call to an en enclosing synchronized operation,
7413 and this expansion will be performed again in the instance, so there is
7414 no global information to preserve.
7416 2011-08-05 Javier Miranda <miranda@adacore.com>
7418 * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
7419 for renamings of predefined primitives.
7420 (In_Predef_Prims_DT): New subprogram.
7422 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7424 * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
7425 possible interpretation of name is a reference type, add an
7426 interpretation that is the designated type of the reference
7427 discriminant of that type.
7428 * sem_res.adb (resolve): If the interpretation imposed by context is an
7429 implicit dereference, rewrite the node as the deference of the
7430 reference discriminant.
7431 * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
7432 Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
7433 parent type or base type.
7434 * sem_ch4.adb (Process_Indexed_Component,
7435 Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
7436 Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
7437 Check for implicit dereference.
7438 (List_Operand_Interps): Indicate when an implicit dereference is
7440 * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
7442 2011-08-05 Thomas Quinot <quinot@adacore.com>
7444 * scos.ads: Update documentation of SCO table. Pragma statements can now
7445 be marked as disabled (using 'p' instead of 'P' as the statement kind).
7446 * par_sco.ads, par_sco.adb: Implement the above change.
7447 (Process_Decisions_Defer): Generate a P decision for the first parameter
7448 of a dyadic pragma Debug.
7449 * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
7451 * put_scos.adb: Code simplification based on above change.
7453 2011-08-05 Robert Dewar <dewar@adacore.com>
7455 * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
7456 bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
7457 a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
7458 prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
7460 2011-08-05 Bob Duff <duff@adacore.com>
7462 * a-stunau.ads, g-spipat.adb: Update comments.
7464 2011-08-05 Bob Duff <duff@adacore.com>
7466 * a-fihema.ads: Minor comment fix.
7467 * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
7469 (Attach, Detach): Remove some unnecessary code.
7470 (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
7472 2011-08-05 Bob Duff <duff@adacore.com>
7474 * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
7475 allocation for Objects component. This simplifies the code somewhat. It
7476 is also a little more efficient in the not-so-unusual case where there
7477 are no controlled objects allocated.
7478 Make Finalization_Started flag atomic.
7479 (Finalize): Avoid unnecessary detachment of items from the list.
7480 (pcol): Minor cleanup.
7482 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7484 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
7485 package whose name is the same as that of the generic unit, or its
7488 2011-08-05 Bob Duff <duff@adacore.com>
7490 * a-fihema.adb, a-fihema.ads: Minor comment improvements.
7491 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
7492 Minor comment fixes.
7494 2011-08-05 Arnaud Charlet <charlet@adacore.com>
7496 * make.adb (Linking_Phase): No longer need to set source search path
7497 before calling gnatlink in CodePeer mode.
7498 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
7499 gcc in CodePeer mode, since the binder generated file no longer has a
7501 * switch.ads, switch.adb (Is_Language_Switch): Removed.
7502 * switch-c.adb: Update comment.
7504 2011-08-05 Thomas Quinot <quinot@adacore.com>
7506 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
7508 2011-08-05 Nicolas Roche <roche@adacore.com>
7510 * gnat_ugn.texi: Fix minor syntax error issue.
7512 2011-08-05 Vincent Celier <celier@adacore.com>
7514 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
7515 delete or close the file when the call to gnatmake returns a non
7516 successful return code.
7518 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7520 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
7521 check, indicate that the copy of the original node does not come from
7522 source, to prevent an infinite recursion of the expansion.
7524 2011-08-05 Johannes Kanig <kanig@adacore.com>
7526 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
7527 VC generation for subprogram bodies.
7529 2011-08-05 Yannick Moy <moy@adacore.com>
7532 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
7533 the base type with the smallest allowed base type.
7535 2011-08-05 Sergey Rybin <rybin@adacore.com>
7537 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
7540 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7542 * sem_ch12.ads: minor comment updates.
7544 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7546 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
7547 instantiation and a formal package the compiler generates a package
7548 renaming declaration so that the generic name within the declaration
7549 is interpreted as a renaming of the instance. At the end of a formal
7550 package declaration, this renaming must become invisible.
7552 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
7554 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
7555 comparison and rely on concrete entities instead.
7557 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7559 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
7560 and discriminants, to indicate that the type has an access discriminant
7561 that supports implicit dereference.
7562 * snames.ads-tmpl: Add names of aspects and attributes related to
7563 Ada2012 iterators: constant_indexing, default_iterator,
7564 iterator_element, implicit_dereference, variable_indexing.
7565 * aspects.ads, aspects.adb: entries for iterator-related aspects.
7566 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
7567 iterator-related aspects.
7568 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
7570 2011-08-05 Sergey Rybin <rybin@adacore.com>
7572 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
7573 metrics in gnatmetric to cover new kinds of coupling mentrics.
7575 2011-08-05 Steve Baird <baird@adacore.com>
7577 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
7578 of calling the user-defined main subprogram.
7579 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode
7580 is set) Call_Main_Subprogram ahead of, as opposed to
7582 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
7583 generation of a "with" of the user-defined main subprogram.
7584 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
7585 (which is now called from Gen_Main instead).
7587 2011-08-05 Emmanuel Briot <briot@adacore.com>
7589 * projects.texi: Added reference to the Makefile package.
7591 2011-08-05 Thomas Quinot <quinot@adacore.com>
7593 * exp_ch7.adb: Minor comment rewording.
7595 2011-08-05 Ed Falis <falis@adacore.com>
7597 * env.c: Fix comment.
7599 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
7601 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
7602 character comparison and rely on concrete entities instead.
7604 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7606 * sem_ch3.adb: (Check_Private_Overriding): better error message,
7607 suggested by AI95-0068.
7609 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
7611 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
7612 the two potential initialization calls. This accounts for any
7613 access-before-elaboration checks which may precede the initialization
7615 (Next_Suitable_Statement): New routine. Returns the next real statement
7616 after the input node while skipping generated checks.
7617 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
7618 with comment on usage.
7619 Do not generate Elaborate_All when the trigger is a finalization call
7620 coming from a type init proc.
7621 (Check_Elab_Call): Propagate the initialization procedure context to
7622 subsequent calls to Check_A_Call.
7623 (Check_Internal_Call_Continue): Propagate the initialization procedure
7624 context to subsequent calls to Check_Elab_Call.
7625 (Is_Finalization_Procedure): New routine. Returns True if the input
7626 entity denotes a [Deep_]Finalize routine.
7627 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
7628 along with comment on usage.
7630 2011-08-05 Vadim Godunko <godunko@adacore.com>
7632 * s-atocou.ads: Add list of supported platforms.
7634 2011-08-05 Yannick Moy <moy@adacore.com>
7636 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
7638 * opt.ads (Disable_ALI_File): new Boolean flag
7639 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
7641 2011-08-05 Ed Falis <falis@adacore.com>
7643 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
7644 environ is properly defined.
7646 2011-08-05 Vincent Celier <celier@adacore.com>
7648 * make.adb (Compilation_Phase): Exit immediately when all objects have
7649 been found up to date, to avoid multiple exit messages.
7650 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
7651 same project for languages with no compiler.
7652 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
7654 2011-08-05 Robert Dewar <dewar@adacore.com>
7656 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
7657 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
7658 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
7659 s-atocou-builtin.adb: Minor reformatting.
7661 2011-08-05 Yannick Moy <moy@adacore.com>
7663 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
7664 if the node to wrap is a pragma check, this node and enclosed
7665 expression are not expanded, so do not apply any transformations here.
7666 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
7667 introducing transient scopes.
7669 2011-08-05 Jose Ruiz <ruiz@adacore.com>
7671 * adaint.c (__gnat_set_writable, __gnat_set_readable,
7672 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
7673 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
7674 routine is available, so we use the default implementation of these
7676 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
7677 support for copying attributes on VxWorks 6.
7679 2011-08-05 Yannick Moy <moy@adacore.com>
7681 * debug.adb: Remove use of -gnatd.D.
7682 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
7683 * opt.ads: Simplify variables for ALFA mode, to keep one only
7684 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
7687 2011-08-05 Vincent Celier <celier@adacore.com>
7689 * prj-conf.adb (Do_Autoconf): Look also for --RTS in
7690 Builder'Default_Switches.
7692 2011-08-05 Vincent Celier <celier@adacore.com>
7694 * makeusg.adb: Add lines for --create-map-file switches.
7696 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7698 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
7699 profile is incomplete and the full view is available, replace it with
7701 * sem_ch6.adb (Possible_Freeze): if a type in the profile is
7702 incomplete, freezing the subprogram is delayed until the full view is
7704 * sem_type.adb (Disambiguate): an ambiguity between a user-defined
7705 fixed-point multiplication operator and the predefined operator is
7706 resolved in favor of the user-defined one.
7708 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7710 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
7713 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7715 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
7716 whether a type lacks user-defined Read or Write operations, or has a
7717 component that lacks them.
7718 * sem_attr.adb (Check_Stream_Attribute): if restriction
7719 No_Default_Stream_Attributes is active, verify that all subcomponent
7720 types of the target have user-defined stream operations, and report
7722 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
7723 * exp_strm.adb: Build_Elementary_Input_Call,
7724 Build_Elementary_Write_Call): remove checks for restriction
7725 No_Default_Stream_Attributes, now checked in semantics.
7727 2011-08-04 Vincent Celier <celier@adacore.com>
7729 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
7730 switches on the command line, look for all valid --RTS switches in the
7731 Builder switches and for each language use the first runtime name found
7732 to invoke gprconfig.
7733 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
7734 command line and there is no auto-configuration.
7735 (Runtime_Name_Set_For): New function.
7737 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7739 * exp_ch7.adb (Build_Object_Declarations): Do not generate the
7740 elaborate initialization expression for variable Abort when processing
7741 a package body or a declaration.
7742 (Create_Finalizer): Propagate the package context when creating the
7743 exception-related variables.
7744 * exp_ch7.ads (Build_Object_Declarations): New formal parameter
7745 For_Package along with usage comment.
7747 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7749 * gcc-interface/Makefile.in: Clean up targets.
7750 Enable new package for atomic counters and copy-on-write implementation
7751 of unbounded strings on x86 platforms.
7752 * gcc-interface/Make-lang.in: Update dependencies.
7754 2011-08-04 Robert Dewar <dewar@adacore.com>
7756 * exp_ch7.adb: Minor reformatting.
7758 2011-08-04 Robert Dewar <dewar@adacore.com>
7760 * exp_strm.adb: Minor reformatting.
7762 2011-08-04 Vadim Godunko <godunko@adacore.com>
7764 * s-atocou.adb: Replace by dummy version and use on targets where atomic
7765 operations are not supported.
7766 * s-atocou-builtin.adb: Renamed from s-atocou.adb.
7767 * s-atocou-x86.adb: New file.
7768 * Makefile.rtl: Add s-atocou.o file
7770 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7772 * make.adb (Compile): Move setting of CodePeer_Mode to ...
7773 (Compilation_Phase): ... here.
7774 (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
7776 2011-08-04 Thomas Quinot <quinot@adacore.com>
7778 * Make-generated.in: Fix minor typo in comment.
7780 2011-08-04 Thomas Quinot <quinot@adacore.com>
7782 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
7785 2011-08-04 Robert Dewar <dewar@adacore.com>
7787 * a-coinho.adb: Minor reformatting.
7789 2011-08-04 Robert Dewar <dewar@adacore.com>
7791 * a-coinho.ads: Minor reformatting.
7793 2011-08-04 Vadim Godunko <godunko@adacore.com>
7795 * s-atocou.ads, s-atocou.adb: New files.
7796 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
7797 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
7798 direct use of GCC's atomic builtins and replace them by use of new
7799 atomic counter package.
7801 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7803 * exp_strm.adb: better error message for No_Default_Stream_Attributes.
7805 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7807 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
7808 with a call to Get_External_Tag.
7809 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
7810 subprogram usage. Remove the guard against package declarations and
7811 bodies since Build_Cleanup_Statements is no longer invoked in that
7813 (Build_Components): Initialize Tagged_Type_Stmts when the context
7814 contains at least one library-level tagged type.
7815 (Build_Finalizer): New local variables Has_Tagged_Types and
7816 Tagged_Type_Stmts along with associated comments on usage. Update the
7817 logic to include tagged type processing.
7818 (Create_Finalizer): Insert all library-level tagged type unregistration
7819 code before the jump block circuitry.
7820 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
7821 (Expand_N_Package_Declaration): Remove the call to
7822 Build_Cleanup_Statements.
7823 (Process_Tagged_Type_Declaration): New routine. Generate a call to
7824 unregister the external tag of a tagged type.
7825 (Processing_Actions): Reimplemented to handle tagged types.
7826 (Process_Declarations): Detect the declaration of a library-level
7827 tagged type and carry out the appropriate actions.
7828 (Unregister_Tagged_Types): Removed. The machinery has been directly
7829 merged with Build_Finalizer.
7831 2011-08-04 Robert Dewar <dewar@adacore.com>
7833 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
7834 gnatls.adb, exp_ch3.adb: Minor reformatting.
7836 2011-08-04 Marc Sango <sango@adacore.com>
7838 * sem_attr.adb (Analyze_Attribute): Replace the message
7839 "invisible attribute of}" of the spark restriction violation in
7840 attribute reference by the simple message "invisible attribute of type".
7841 Indeed, the node value Error_Msg_Node_1 used is in conflit with the
7842 two insertion characters: '&' and '}'.
7844 2011-08-04 Vadim Godunko <godunko@adacore.com>
7846 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
7847 * a-coinho.ads, a-coinho.adb: New file.
7848 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
7850 2011-08-04 Nicolas Roche <roche@adacore.com>
7852 * alfa_test.adb: Not all ali files are containing alfa information even
7853 if compiled with -gnatd.F. So suppress warning about missing ALFA
7856 2011-08-04 Yannick Moy <moy@adacore.com>
7858 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
7860 * put_alfa.adb: Check that scope name is not empty.
7862 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7864 * exp_ch3.adb (Stream_Operation_Ok): new predicate
7865 Needs_Elementary_Stream_Operation, to determine whether user-defined
7866 Read and Write attributes are available for the elementary components
7867 of the given type. If only the predefined attributes are available,
7868 then when restriction No_Default_Stream_Attributes is active the
7869 predefined stream attributes for the composite type cannot be created.
7871 2011-08-04 Robert Dewar <dewar@adacore.com>
7873 * bindgen.adb: Fix obsolete comments and names from Ada/C days.
7874 Put routines in alpha order
7876 2011-08-04 Jose Ruiz <ruiz@adacore.com>
7878 * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
7879 * gcc-interface/Make-lang.in: Update dependencies.
7881 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7883 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
7884 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
7887 2011-08-04 Robert Dewar <dewar@adacore.com>
7889 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
7890 lib-xref-alfa.adb: Minor reformatting.
7892 2011-08-04 Marc Sango <sango@adacore.com>
7894 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
7895 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
7896 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
7899 2011-08-04 Tristan Gingold <gingold@adacore.com>
7901 * bindgen.adb (Gen_Adainit_C): Remove.
7902 (Gen_Adafinal_C): Ditto.
7903 (Gen_Elab_Externals_C): Ditto.
7904 (Gen_Elab_Calls_C): Ditto.
7905 (Gen_Elab_Order_C): Ditto.
7906 (Gen_Elab_Defs_C): Ditto.
7907 (Gen_Finalize_Library_C): Ditto.
7908 (Gen_Finalize_Library_Defs_C): Ditto.
7909 (Gen_Main_C): Ditto.
7910 (Gen_Output_File_C): Ditto.
7911 (Gen_Restrictions_C): Ditto.
7912 (Gen_Versions_C): Ditto.
7913 (Write_Info_Ada_C): Ditto.
7914 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
7915 (Gen_Output_File): Do not force Ada_Bind_File anymore.
7916 Always call Gen_Output_File_Ada.
7917 * gnatlink.adb (Begin_Info): Now a constant.
7919 (Ada_Bind_File): Remove
7920 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases.
7921 * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
7922 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
7923 * opt.ads (Ada_Bind_File): Remove.
7925 2011-08-04 Thomas Quinot <quinot@adacore.com>
7927 * projects.texi: Document target-specific directory in default project
7930 2011-08-04 Thomas Quinot <quinot@adacore.com>
7932 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
7935 2011-08-04 Yannick Moy <moy@adacore.com>
7937 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
7938 opt.ads, lib-xref.ads: Code clean up.
7940 2011-08-04 Yannick Moy <moy@adacore.com>
7942 * gnat_rm.texi: Update description of Test_Case
7943 * gnat_ugn.texi: Typo.
7945 2011-08-04 Ed Falis <falis@adacore.com>
7947 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
7949 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7951 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
7952 it is of type Root_Controlled. This action eliminates fields Prev and
7953 Next from type equality.
7955 2011-08-04 Yannick Moy <moy@adacore.com>
7957 * lib-xref-alfa.adb: Correct typo.
7959 2011-08-04 Matthew Heaney <heaney@adacore.com>
7961 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
7964 2011-08-04 Yannick Moy <moy@adacore.com>
7966 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
7967 (Analyze_Pragma): allow static string expression for name of Test_Case,
7968 instead of simply string literals.
7969 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
7972 2011-08-04 Vincent Celier <celier@adacore.com>
7974 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
7975 case suffixes to find truncated main sources.
7977 2011-08-04 Tristan Gingold <gingold@adacore.com>
7979 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
7980 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
7981 (Compute_Current_Task): Ditto.
7983 2011-08-04 Tristan Gingold <gingold@adacore.com>
7985 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
7987 2011-08-04 Yannick Moy <moy@adacore.com>
7989 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
7990 library-level constant.
7991 (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
7992 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
7993 used as selector of parameter association, in ALFA mode.
7995 2011-08-04 Robert Dewar <dewar@adacore.com>
7997 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
7998 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
8001 2011-08-04 Arnaud Charlet <charlet@adacore.com>
8003 * make.adb (Linking_Phase): Set source search path before calling
8004 gnatlink in CodePeer mode.
8006 2011-08-04 Javier Miranda <miranda@adacore.com>
8008 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
8009 Remove code which takes care of building TSDs.
8010 * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
8011 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
8012 the accessibility check in VM targets.
8013 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
8014 (Building_Static_DT): Now returns false for VM targets.
8015 (Build_VM_TSDs): Removed.
8016 (Expand_Interface_Conversion): Generate missing runtime check for
8017 conversions to interface types whose target type is unknown at compile
8019 (Make_VM_TSD): Add missing code to disable the generation of calls to
8020 Check_TSD if the tagged type is not defined at library level, or not
8021 has a representation clause specifying its external tag, or -gnatdQ is
8023 * exp_disp.ads (Build_VM_TSDs): Removed.
8024 (Make_VM_TSDs): Spec relocated from exp_disp.adb
8025 * sem_disp.adb (Check_Dispatching_Operation): No code required to
8026 register primitives in the dispatch tables in VM targets.
8027 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
8028 initialization of class-wide interface objects in VM targets.
8029 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
8032 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
8034 * gnatlink.adb (Gnatlink): Correct missleading error message displayed
8035 when dotnet-ld cannot be found.
8037 2011-08-04 Arnaud Charlet <charlet@adacore.com>
8039 * bindgen.adb: Simplify significantly generation of binder body file in
8041 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
8042 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
8045 2011-08-04 Yannick Moy <moy@adacore.com>
8047 * sem_prag.adb, sem.ads: Code cleanup.
8049 2011-08-04 Tristan Gingold <gingold@adacore.com>
8051 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
8052 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
8053 results if possible.
8054 * s-stusta.adb (Print): Adjust after changes in s-stausa.
8055 * gnat_ugn.texi: Update dynamic stack usage section.
8057 2011-08-04 Steve Baird <baird@adacore.com>
8059 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
8060 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
8061 contains only a call to the user-defined main subprogram.
8062 (Gen_Main_Ada) - If CodePeer_Mode is set, then
8063 call the "wrapper" subprogram instead of directly
8064 calling the user-defined main subprogram.
8066 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8068 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
8069 alternatives of a case statement for controlled objects. Rename local
8070 variable A to Dead_Alt.
8071 (Expand_N_If_Statement): Check the then and else statements of an if
8072 statement for controlled objects. Check the then statements of all
8073 elsif parts of an if statement for controlled objects.
8074 (Expand_N_Loop_Statement): Check the statements of a loop for controlled
8076 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
8077 detects a loop associated with the expansion of an array object.
8078 Augment the processing of the loop statements to account for a possible
8079 wrap done by Process_Statements_For_Controlled_Objects.
8080 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
8081 statements and abortable part of an asynchronous select for controlled
8083 (Expand_N_Conditional_Entry_Call): Check the else statements of a
8084 conditional entry call for controlled objects.
8085 (Expand_N_Selective_Accept): Check the alternatives of a selective
8086 accept for controlled objects.
8087 (Expand_N_Timed_Entry_Call): Check the entry call and delay
8088 alternatives of a timed entry call for controlled objects.
8089 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
8090 exception handler for controlled objects.
8091 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
8092 Add formal parameter Nested_Constructs along with its associated
8094 (Requires_Cleanup_Actions (Node_Id)): Update all calls to
8095 Requires_Cleanup_Actions.
8096 (Process_Statements_For_Controlled_Objects): New routine.
8097 * exp_util.ads (Process_Statements_For_Controlled_Objects): New
8098 routine. Inspect a node which contains a non-handled sequence of
8099 statements for controlled objects. If such an object is found, the
8100 statements are wrapped in a block.
8102 2011-08-04 Bob Duff <duff@adacore.com>
8104 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
8105 need to compare with Class_Wide_Type (T2), in order to get at the
8106 original class-wide type node.
8107 * sem_type.ads (Covers): Improve the comment.
8108 * einfo.ads (Class_Wide_Type): Improve the comment.
8109 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
8110 the type of the Deref.
8112 2011-08-04 Yannick Moy <moy@adacore.com>
8114 * gnat_rm.texi: Document that Test_Case pragma can only appear on
8115 separate declarations.
8116 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
8117 check identifier of pragma argument.
8118 (Chain_TC): check that no other test case associated to the same entity
8119 share the same name.
8120 (Check_Test_Case): disallow test case inside subprogram body
8121 (Analyze_Pragma): correct call to check identifier and not argument
8122 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
8123 function gets name from test case pragma.
8125 2011-08-04 Yannick Moy <moy@adacore.com>
8127 * gnat_rm.texi: Document new pragma and aspect.
8128 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
8129 (No_Duplicates_Allowed): new constant array defining whether duplicates
8130 aspects of each kind can appear on the same declaration.
8131 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
8132 field, which points to a node holding the previous Spec_PPC_List.
8133 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
8134 through the indirection with Contract.
8135 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
8136 * par-prag.adb (Prag): do nothing on Test_Case pragma
8137 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
8139 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
8140 component Ensures of Test_Case.
8141 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
8142 (Analyze_Generic_Subprogram_Declaration,
8143 Analyze_Subprogram_Instantiation,
8144 Analyze_Abstract_Subprogram_Declaration,
8145 Analyze_Subprogram_Body_Helper,
8146 Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
8147 insert contract in subprogram node at point of definition
8149 (Aspect_Loop): do not raise error on duplicate Test_Case aspect
8150 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
8151 corresponding pragma
8152 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
8153 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
8154 similar to the analysis of pre/post
8155 (Derive_Subprogram): insert contract in subprogram node at point of
8157 * sem_prag.adb, sem_prag.ads
8158 (Check_Arg_Is_String_Literal, Check_Identifier):
8159 new checking procedures to be called in treatment of pragmas
8160 (Check_Test_Case): new procedure to check that a Test_Case aspect or
8161 pragma is well-formed. This does not check currently that 'Result is
8162 used only in the Ensures component of a Test_Case.
8163 (Analyze_Pragma): add case for Test_Case
8164 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
8165 components of a Test_Case.
8166 (Preanalyze_TC_Args): new procedure to preanalyze the boolean
8167 expressions in the 3rd (and 4th if present) arguments of a Test_Case
8168 pragma, treated as spec expressions.
8169 (Sig_Flags): add value -1 for Test_Case.
8170 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
8171 Get_Requires_From_Test_Case_Pragma): getters for both expression
8172 components of a Test_Case.
8173 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
8174 indirection between an entry or [generic] subprogram entity and its
8175 pre/post + test-cases.
8176 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
8177 get/set for fields of an N_Contract node.
8178 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
8179 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
8180 names and pragma for Test_Case.
8181 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
8183 2011-08-04 Vincent Celier <celier@adacore.com>
8185 * gnat_ugn.texi: Improve documentation of gnatmake switch
8186 --source-info-file=.
8188 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8190 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
8191 type). Initialize Atyp to the appropriate type which is later checked
8192 for completion. Rewrite the assertion associated with private type
8195 2011-08-04 Ed Falis <falis@adacore.com>
8197 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
8198 initialize the number of CPUs.
8200 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8202 * sem_type.adb (Disambiguate): New subsidiary routine
8203 In_Same_Declaration_List, to implement AI05-0020: a user-defined
8204 equality on an anonymous access type whose designated type is private
8205 does not lead to an ambiguity with the universal access equality
8206 operator in the body or child units of the defining package. The same
8207 is true for a multiplication operator on a private type completed with
8210 2011-08-04 Javier Miranda <miranda@adacore.com>
8212 * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
8213 (Normalize_Scalars_Config): Removed.
8215 (Register_Opt_Config_Switches): Remove registering config values of
8216 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
8217 (Restore_Opt_Config_Switches): Remove code which restores the values of
8218 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
8219 Init_Or_Norm_Scalars.
8220 (Save_Opt_Config_Switches): Remove code which saves values of
8221 Init_Or_Norm_Scalars and Normalize_Scalars.
8222 (Set_Opt_Config_Switches): Remove code which restores config values of
8223 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
8224 Init_Or_Norm_Scalars.
8226 2011-08-04 Yannick Moy <moy@adacore.com>
8228 * frontend.adb (Frontend): remove previous patch to avoid full
8229 qualification in ALFA mode.
8230 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
8231 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
8232 unique name for an entity, which could be used to identify the entity
8233 across compilation units.
8235 2011-08-04 Thomas Quinot <quinot@adacore.com>
8238 (Initialize_Default_Project_Path): Add target specific directory
8239 ($prefix/$target/lib/gnat) in front of project path in all cases
8240 (making gnatmake's behaviour consistent with gprbuild).
8241 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
8242 Pass target name from Sdefault to project subsystem.
8243 * gnatls.adb: Show new target specific default project directory.
8245 2011-08-04 Johannes Kanig <kanig@adacore.com>
8247 * cstand.adb: Add Information to Identifier in Standard
8248 (Identifer_For): Set Entity to the corresponding entity
8250 2011-08-04 Sergey Rybin <rybin@adacore.com>
8252 * gnat_ugn.texi: Update doc on gnatcheck.
8254 2011-08-04 Yannick Moy <moy@adacore.com>
8256 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
8259 2011-08-04 Yannick Moy <moy@adacore.com>
8261 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
8262 performing expansion.
8263 * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
8264 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
8265 it is not called in ALFA mode.
8267 2011-08-04 Emmanuel Briot <briot@adacore.com>
8269 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
8270 after all, so removed.
8272 2011-08-04 Sergey Rybin <rybin@adacore.com>
8274 * vms_data.ads: Add missing VMS qualifiers.
8276 2011-08-04 Emmanuel Briot <briot@adacore.com>
8278 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
8279 the list of files on the command line after processing it through
8282 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8284 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
8285 processing for .NET/JVM. These targets can now benefit from
8286 Raise_From_Controlled_Operation and they share the same processing with
8288 (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
8289 These targets need transient scopes in order to properly finalize short
8290 lived controlled objects.
8291 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
8292 NET/JVM. These targets can now benefit from
8293 Raise_From_Controlled_Operation and they share the same processing with
8296 2011-08-04 Geert Bosch <bosch@adacore.com>
8298 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
8300 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8302 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
8303 Expand_Record_Aggregate, to determine whether aggregate must be
8304 expanded into assignments. This is the case if the ancestor part is
8305 private, regarless of the setting of the flag Has_Private_Ancestor.
8307 2011-08-04 Ed Falis <falis@adacore.com>
8309 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
8311 2011-08-04 Bob Duff <duff@adacore.com>
8313 * sinfo.ads: Fix comment.
8315 2011-08-04 Steve Baird <baird@adacore.com>
8317 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
8318 choose a package name in much the same way as is
8319 done for JGNAT when VM_Target /= No_VM, except that
8320 a slightly more distinctive prefix string is used.
8322 2011-08-04 Emmanuel Briot <briot@adacore.com>
8324 * makeutl.adb (Complete_Mains): no longer accept unit names on the
8325 gnatmake command line.
8326 This behavior was never documented (and was supported only because of
8327 an early bug in the code). This case might lead to ambiguous cases
8328 (between unit names and truncated base names without suffixes).
8330 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8332 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
8333 Remove the external tag of a tagged type from the internal hash table.
8334 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
8335 expanded usage of the routine. Strenghten the check for Is_Master. Add
8336 processing for tagged types.
8337 (Build_Finalizer): Create all the necessary lists used in finalizer
8338 creation when the processed context is a package that may contain
8340 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
8341 Requires_Cleanup_Actions.
8342 (Expand_N_Package_Body): Package bodies may need clean up code
8343 depending on whether they contain tagged types.
8344 (Expand_N_Package_Declaration): Package declarations may need clean up
8345 code depending on whether they contain tagged types.
8346 (Unregister_Tagged_Types): New routine. Search through a list of
8347 declarations or statements, looking for non-abstract Ada tagged types.
8348 For each such type, generate code to unregister the external tag.
8349 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
8350 Requires_Cleanup_Actions.
8351 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
8352 through a list of declarations or statements looking for non-abstract
8353 Ada tagged types or controlled objects.
8354 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
8355 Requires_Cleanup_Actions.
8356 (Has_Controlled_Objects (List_Id, Boolean)): Removed.
8357 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
8360 2011-08-04 Vincent Celier <celier@adacore.com>
8362 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
8363 has Ada sources, not project Project, because if the root project
8364 Project has no sources of its own, all projects will be deemed without
8367 2011-08-04 Gary Dismukes <dismukes@adacore.com>
8369 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
8370 of the No_Param_Proc acc-to-subp type used for initialization of
8371 __gnat_finalize_library_objects so that it's declared at library level
8372 rather than nested inside of the adainit routine.
8374 2011-08-04 Javier Miranda <miranda@adacore.com>
8376 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
8377 if the tagged type has a representation clause which specifies its
8380 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8382 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
8383 Remove previous procedure with that name.
8384 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
8386 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
8387 subtype mark, the ancestor cannot have unknown discriminants.
8388 (Resolve_Record_Aggregate): if the type has invisible components
8389 because of a private ancestor, the aggregate is illegal.
8391 2011-08-04 Vincent Celier <celier@adacore.com>
8393 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
8394 account switches -gnat2005, -gnat12 and -gnat2012.
8396 2011-08-04 Bob Duff <duff@adacore.com>
8398 * s-tasdeb.ads: Minor comment fix.
8400 2011-08-04 Arnaud Charlet <charlet@adacore.com>
8402 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
8404 * switch.ads, switch.adb (Is_Language_Switch): New function.
8406 2011-08-04 Vincent Celier <celier@adacore.com>
8408 * switch-c.adb: Minor comment addition.
8410 2011-08-04 Vincent Celier <celier@adacore.com>
8412 * vms_conv.adb (Process_Argument): Fail graciously when qualifier
8413 ending with '=' is followed by a space (missing file name).
8415 2011-08-04 Pascal Obry <obry@adacore.com>
8417 * g-regist.ads: Fix size of HKEY on x86_64-windows.
8419 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8421 * sem_ch12.adb (Analyze_Associations): New routine
8422 Check_Overloaded_Formal_Subprogram to reject a formal package when
8423 there is a named association or a box initialisation for an overloaded
8424 formal subprogram of the corresponding generic.
8426 2011-08-04 Yannick Moy <moy@adacore.com>
8428 * alfa.ads (ALFA_Xref_Record): add component for type of entity
8429 * get_alfa.adb, put_alfa.adb: Read and write new component of
8431 * lib-xref-alfa.adb (Collect_ALFA): generate new component.
8433 2011-08-04 Pascal Obry <obry@adacore.com>
8435 * urealp.adb: Minor reformatting.
8437 2011-08-04 Tristan Gingold <gingold@adacore.com>
8439 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
8440 Handle the case when Cleanup_Protected_Object returns Empty.
8442 2011-08-04 Yannick Moy <moy@adacore.com>
8444 * frontend.adb (Frontend): only qualify names in non-ALFA mode
8446 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8448 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
8449 call, ignore functions.
8451 2011-08-04 Geert Bosch <bosch@adacore.com>
8453 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
8456 2011-08-04 Emmanuel Briot <briot@adacore.com>
8458 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
8459 as an index for Builder'Switches. This conforms to the documentation.
8460 * make.adb (Insert_Project_Sources): avoid duplicate code
8462 2011-08-04 Emmanuel Briot <briot@adacore.com>
8464 * makeutl.adb (Complete_Mains): if the user has passed a relative file
8465 name on the command line (for instance "../dummy"), never assume it can
8468 2011-08-04 Tristan Gingold <gingold@adacore.com>
8470 * bindgen.adb: Remove code the reference or create the
8471 Break_Start/__gnat_break_start procedure.
8472 * s-stalib.adb (Break_Start): Removed.
8474 2011-08-04 Emmanuel Briot <briot@adacore.com>
8476 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
8477 shared with gprbuild.
8479 2011-08-04 Yannick Moy <moy@adacore.com>
8481 * par-ch4.adb (P_Primary): preferentially issue an error message about
8482 a missing parenthesis arount a conditional or case expression in Ada
8483 2012 mode, if we detect that the alignment is not correct for a
8486 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8488 * exp_ch7.adb (Process_Declarations): Do not consider the result of a
8489 tag-to-class-wide conversion as needing finalization actions.
8490 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
8491 a tag-to-class-wide conversion as needing finalization actions.
8492 (Is_Finalizable_Transient): The result of a tag-to-class-wide
8493 conversion does not need finalization actions.
8494 (Is_Tag_To_CW_Conversion): New routine.
8495 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
8496 whether an object is the result of a tag-to-class-wide conversion.
8498 2011-08-04 Yannick Moy <moy@adacore.com>
8500 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
8501 the left-hand-side and right-hand-side of a conjunct are inserted when
8502 translating a pre- or postcondition
8503 * sem_ch6.adb: Correct typo in comment
8505 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8507 * gnat_rm.texi: Ravenscar does not prohibit dependence on
8508 Unchecked_Conversion and Unchecked_Deallocation.
8510 2011-08-04 Thomas Quinot <quinot@adacore.com>
8512 * make.adb: Minor reformatting.
8514 2011-08-04 Emmanuel Briot <briot@adacore.com>
8516 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
8517 sources in the project and its imported projects, but not in the whole
8520 2011-08-04 Emmanuel Briot <briot@adacore.com>
8522 * make.adb: Remove debug trace.
8524 2011-08-04 Vincent Celier <celier@adacore.com>
8526 * makeutl.adb (Do_Complete): Get the absolute path name of a relative
8527 path in canonical form, to be able to compare path names on platforms
8528 such as Windows or Darwin.
8530 2011-08-04 Thomas Quinot <quinot@adacore.com>
8532 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
8533 For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
8534 * scos.ads: Update documentation accordingly.
8535 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
8538 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8540 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
8541 attribute only if prefix type is scalar.
8543 2011-08-04 Emmanuel Briot <briot@adacore.com>
8545 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
8546 in gnatmake for specifying mains on the command line that do not belong
8547 to the main project. These mains must currently all belong to the same
8549 (Ultimate_Extension_Of): removed, since duplicated
8550 Ultimate_Extending_Project.
8552 2011-08-04 Arnaud Charlet <charlet@adacore.com>
8554 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
8556 (CodePeer_Mode_String): New.
8557 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
8559 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
8560 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
8561 mode, since no useful elaboration subprogram is needed by CodePeer.
8562 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
8563 In this mode, compile binder file with -gnatC and do stop after this
8566 2011-08-04 Vincent Celier <celier@adacore.com>
8568 * exp_ch7.adb: Minor comment fix.
8570 2011-08-04 Robert Dewar <dewar@adacore.com>
8572 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
8573 exp_ch4.adb, makeutl.adb: Minor reformatting.
8575 2011-08-04 Emmanuel Briot <briot@adacore.com>
8577 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
8578 Create several new subprograms to move code out of Make. This makes the
8579 code more readable, removes code duplication, and is a preparation work
8580 for adding support for aggregate projects.
8582 2011-08-04 Tristan Gingold <gingold@adacore.com>
8584 * s-po32gl.ads, s-po32gl.adb: New files.
8585 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
8586 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
8587 (Build_Finalization_Collection): Use it.
8588 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
8589 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
8591 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
8592 * gcc-interface/Make-lang.in: Update dependencies.
8594 2011-08-04 Emmanuel Briot <briot@adacore.com>
8596 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
8599 2011-08-04 Emmanuel Briot <briot@adacore.com>
8601 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
8602 command line is not a file name, also check whether it could be a unit
8605 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
8607 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
8608 the header of the finalization routine.
8609 If the unit has no finalizer but is a body whose spec has one, then
8610 generate the decrement of the elaboration entity only.
8611 If the unit has a finalizer and is a spec, then do not generate the
8612 decrement of the elaboration entity.
8613 (Gen_Finalize_Library_C): Likewise.
8615 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8617 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
8618 (Bounds_Size_Expression): Removed.
8619 (Double_Alignment_Of): New subsidiary routine.
8620 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
8621 for a hole in the dope vector of unconstrained arrays due to different
8622 index and element alignments.
8624 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8626 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
8627 raise program_error because body has not been seen yet.
8629 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8631 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
8634 2011-08-04 Vincent Celier <celier@adacore.com>
8636 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
8638 2011-08-04 Yannick Moy <moy@adacore.com>
8640 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
8641 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
8643 2011-08-04 Thomas Quinot <quinot@adacore.com>
8645 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
8646 instantiation in RCI.
8648 2011-08-04 Emmanuel Briot <briot@adacore.com>
8650 * make.adb: Share more code with gprbuild
8652 2011-08-04 Emmanuel Briot <briot@adacore.com>
8654 * projects.texi: Added documentation for the IDE'Gnat project file
8657 2011-08-04 Nicolas Roche <roche@adacore.com>
8659 * gnat_rm.texi: Minor editing.
8661 2011-08-04 Javier Miranda <miranda@adacore.com>
8663 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
8664 and the library case for VM targets.
8665 (Gen_Adainit_Ada): Likewise.
8667 2011-08-04 Robert Dewar <dewar@adacore.com>
8669 * g-altive.ads: Minor comment updates.
8670 * prj-nmsc.adb: Minor reformatting.
8672 2011-08-04 Javier Miranda <miranda@adacore.com>
8675 (Normalize_Scalars_Config): Value of the configuration switch set by
8676 pragma Normalize_Scalars when it appears in the gnat.adc file.
8677 (Normalize_Scalars): New field for record Config_Switches_Type. Used
8678 to save and restore settings of this pragma.
8680 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
8681 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
8683 2011-08-04 Vincent Celier <celier@adacore.com>
8685 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
8687 2011-08-04 Arnaud Charlet <charlet@adacore.com>
8689 * makeutl.adb: Minor reformatting.
8691 2011-08-04 Olivier Hainque <hainque@adacore.com>
8693 * g-altive.ads: Update comments to reflect that only the soft
8694 binding is available today.
8696 2011-08-04 Robert Dewar <dewar@adacore.com>
8698 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
8699 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
8700 * gcc-interface/Make-lang.in: Update dependencies.
8702 2011-08-04 Arnaud Charlet <charlet@adacore.com>
8704 * prj-env.adb: Remove local debug traces.
8706 2011-08-04 Yannick Moy <moy@adacore.com>
8708 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
8709 was used instead of Hi_OK, which could cause a read of an uninitialized
8710 value later on. Detected while working on the new warning.
8711 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
8713 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
8714 in more cases, in order to detect more unreferenced values.
8715 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
8716 object for expression, if any.
8718 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
8720 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
8721 the operand types instead of the Esize.
8723 2011-08-04 Steve Baird <baird@adacore.com>
8725 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
8726 enable CodePeer_Mode.
8727 * bindusg.adb (Display): Add help message describing -P binder switch.
8728 * gnat_ugn.texi: Document -P binder switch.
8729 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
8730 user-defined main program directly.
8731 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
8732 user-defined main program in the context clause of the package body.
8734 2011-08-04 Yannick Moy <moy@adacore.com>
8736 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
8737 duplicate of Defining_Entity
8738 (Get_Unique_Entity_For_Decl): rename function into
8739 Unique_Defining_Entity
8740 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
8741 (Formal_Proof_On): remove synthesized flag
8742 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
8743 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
8744 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
8745 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
8746 Annotate (Formal_Proof)
8748 2011-08-04 Emmanuel Briot <briot@adacore.com>
8750 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
8751 source files with non-standard naming schemes, in imported projects
8753 2011-08-04 Emmanuel Briot <briot@adacore.com>
8755 * makeutl.adb (Complete_Mains): when a multi-unit source file is
8756 specified on the gprbuild command line, we need to compile all units
8757 within that file, not just the first one we find
8758 Fix error message for mains that are not found.
8760 2011-08-04 Thomas Quinot <quinot@adacore.com>
8762 * sem_ch6.adb: Update comment.
8763 * sem_ch12.adb: Minor reformatting.
8765 2011-08-04 Bob Duff <duff@adacore.com>
8767 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
8768 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
8769 race condition whose symptom is to fail to lock Parent. That, in turn,
8770 causes Parent.Awake_Count to be accessed without locking Parent, which
8771 causes another race condition whose symptom is that Parent.Awake_Count
8772 can be off by 1 (either too high or too low). The solution is to lock
8773 Parent unconditionally, and then lock Acceptor, before reading
8774 Acceptor.Terminate_Alternative.
8776 2011-08-04 Arnaud Charlet <charlet@adacore.com>
8778 * debug.adb: Update comment.
8780 2011-08-04 Robert Dewar <dewar@adacore.com>
8782 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
8783 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
8784 exp_ch6.adb: Minor reformatting.
8786 2011-08-04 Gary Dismukes <dismukes@adacore.com>
8788 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
8791 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8793 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
8795 2011-08-04 Thomas Quinot <quinot@adacore.com>
8797 * sinfo.ads: Minor reformatting.
8799 2011-08-04 Emmanuel Briot <briot@adacore.com>
8801 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
8802 even if there is no location.
8804 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8806 * sem_res.adb, sem_ch4.adb: move check for restriction
8807 No_Task_Hierarchy to resolve_allocator.
8809 2011-08-04 Thomas Quinot <quinot@adacore.com>
8811 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
8812 This flag of N_Pragma nodes is not used, remove it as well as all of
8813 the associated circuitry.
8815 2011-08-04 Javier Miranda <miranda@adacore.com>
8817 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
8818 runtime check on duplicated externa tags
8819 * debug.adb Document switch -gnatdQ.
8821 2011-08-04 Gary Dismukes <dismukes@adacore.com>
8823 * a-fihema.ads: Minor typo fix.
8825 2011-08-04 Yannick Moy <moy@adacore.com>
8827 * sem_ch10.adb: Minor comment update.
8829 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8831 * einfo.adb: Update the node field usage to reflect the renaming of
8832 Return_Flag to Return_ Flag_Or_Transient_Decl.
8833 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
8834 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
8835 (Write_Field15_Name): Change Return_Flag to
8836 Return_Flag_Or_Transient_Decl.
8837 * einfo.ads: Rename node field Return_Flag to
8838 Return_Flag_Or_Transient_Decl. Update the associated comment and all
8839 occurrences in entities.
8840 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
8841 associated Inline pragma.
8842 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
8843 associated Inline pragma.
8844 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
8846 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
8847 Return_Flag and Set_Return_Flag.
8848 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
8849 objects generated for controlled transients declared inside an
8850 Exception_With_Actions. Update the calls to Return_Flag.
8851 (Process_Object_Declaration): Add code to add a null guard for hook
8852 objects generated for controlled transients declared inside an
8853 Exception_With_Actions. Update related comment.
8854 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
8855 objects generated for controlled transients declared inside an
8856 Exception_With_Actions. Update the calls to Return_Flag.
8857 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
8859 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8861 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
8862 positional aggregate.
8864 2011-08-04 Vincent Celier <celier@adacore.com>
8866 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
8867 SLOC only for pragmas.
8869 2011-08-04 Emmanuel Briot <briot@adacore.com>
8871 * projects.texi: Minor typo fix.
8873 2011-08-04 Emmanuel Briot <briot@adacore.com>
8875 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
8876 on case-sensitive file systems.
8878 2011-08-04 Thomas Quinot <quinot@adacore.com>
8880 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
8881 nested in a disabled pragma.
8882 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
8883 enclosing pragma, if any, for X decisions.
8885 2011-08-04 Thomas Quinot <quinot@adacore.com>
8887 * sem_prag.adb: Minor reformatting.
8889 2011-08-04 Vincent Celier <celier@adacore.com>
8891 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
8892 allowed in no run time mode.
8894 2011-08-04 Vincent Celier <celier@adacore.com>
8896 * make.adb (Check): When -gnatc is used, check for the source file
8897 inside the ALI file with a canonical case file name.
8899 2011-08-04 Emmanuel Briot <briot@adacore.com>
8901 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
8902 overriding the separator.
8904 2011-08-04 Robert Dewar <dewar@adacore.com>
8906 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
8907 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
8909 2011-08-04 Robert Dewar <dewar@adacore.com>
8911 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
8913 2011-08-04 Yannick Moy <moy@adacore.com>
8915 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
8916 'Result only appears in postcondition of function.
8918 2011-08-04 Thomas Quinot <quinot@adacore.com>
8920 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
8921 external tag, include the value of the external tag in the exception
8924 2011-08-04 Yannick Moy <moy@adacore.com>
8926 * sem_attr.adb (Result): modify error message for misplaced 'Result
8928 2011-08-04 Sergey Rybin <rybin@adacore.com>
8930 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
8931 clear that the second argument must be an identifier.
8933 2011-08-04 Thomas Quinot <quinot@adacore.com>
8935 * exp_ch9.adb (Build_Barrier_Function): When compiling with
8936 -fpreserve-control-flow, insert an IF statement on the barrier
8937 condition to ensure that a conditional branch instruction is generated.
8939 2011-08-04 Emmanuel Briot <briot@adacore.com>
8941 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
8942 (Processing_Flags.Ignore_Missing_With): new flag.
8944 2011-08-04 Emmanuel Briot <briot@adacore.com>
8946 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
8947 Source_List_File on case-insensitive systems where the file is actually
8948 on a case-sensitive file system (NFS,...).
8950 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8952 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
8953 function return contains a controlled [extension] aggregate and the
8954 return statement is not part of a handled sequence of statements, wrap
8955 the return in a block. This ensures that all controlled temporaries
8956 generated during aggregate resolution will be picked up by the
8957 finalization machinery.
8959 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8961 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
8962 components, freeze type before resolution, to ensure that default
8963 initializations are present for all components.
8964 * sem_res.adb (Resolve_Actuals): the designated object of an
8965 accces-to-constant type is a legal actual in a call to an
8966 initialization procedure.
8968 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8970 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
8971 N_Unchecked_Type_Conversion to the possible containers of a renamed
8974 2011-08-04 Yannick Moy <moy@adacore.com>
8976 * par-ch13.adb (Aspect_Specifications_Present): recognize
8977 "with Identifier'Class =>" as an aspect, so that a meaningful warning
8978 is issued in Strict mode.
8979 * par.adb: Fix typos in comments.
8981 2011-08-04 Yannick Moy <moy@adacore.com>
8983 * sem_attr.adb (Result): modify error message to take into account Post
8984 aspect when compiling Ada 2012 (or newer) code.
8986 2011-08-04 Nicolas Roche <roche@adacore.com>
8988 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
8989 remove need for GCC exceptions.
8991 2011-08-04 Vincent Celier <celier@adacore.com>
8993 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
8994 project, not the source file name.
8995 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
8996 excluded, continue looking. This excluded source will only be returned
8997 if there is no other source with the same base name that is not locally
9000 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9002 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
9003 private and one of the operands is a real literal, use a qualified
9004 expression rather than a conversion which is not meaningful to the
9007 2011-08-04 Yannick Moy <moy@adacore.com>
9009 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
9010 corresponding aspect X'Class are allowed, proceed with analysis of the
9011 aspect instead of skipping it.
9013 2011-08-04 Tristan Gingold <gingold@adacore.com>
9015 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
9016 This will allow to have an Ada implementation for the subprogram.
9018 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9020 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
9021 completion and aspects are present, apply them to the entity for the
9022 type which is currently the partial view, but which is the one that
9024 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
9025 applies to a partial view, indicate that the full view has predicates
9026 and delayed aspects.
9027 (Replace_Type_Reference): Handle properly predicates that apply to the
9028 full view of a private completion.
9030 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
9032 * layout.adb (Layout_Type): For composite types, do not set Esize.
9033 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
9035 (Size_Known): Look at the RM size of components instead of the Esize.
9036 (Freeze_Record_Type): Look at the RM size instead of the Esize to
9037 issue warning and activate Implicit_Packing.
9038 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
9039 if the Esize is not known.
9040 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
9041 for elementary types only.
9042 (Analyze_Record_Representation_Clause): Look at the RM size instead
9043 of the Esize to issue errors.
9044 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
9046 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
9048 Look at the RM size instead of the Esize for types if the latter is
9050 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
9052 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9054 * sem_type.adb: proper handling of equality not involving anonymous
9057 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9059 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
9060 Vis_Decls. When creating a library-level finalizer for a package spec,
9061 both the declaration and body of the finalizer are inserted either in
9062 the visible or private declarations of the package spec.
9064 2011-08-04 Javier Miranda <miranda@adacore.com>
9066 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
9067 use of the full-view of a type when invoking Is_Ancestor.
9068 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
9069 the full-view of private parents is requested, then use also the
9070 full-view of the parent of the first derivation.
9072 2011-08-04 Tristan Gingold <gingold@adacore.com>
9074 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
9075 instead of the locally imported procedure.
9076 * s-taprop-mingw.adb (Enter_Task): Ditto.
9077 * s-valrea.adb (Scan_Real): Ditto.
9078 * s-imgrea.adb (Set_Image_Real): Ditto.
9079 * s-flocon.ads: Make the package pure.
9081 2011-08-04 Thomas Quinot <quinot@adacore.com>
9083 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
9084 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
9085 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
9086 New subprogram, moved here from...
9087 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
9088 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
9089 rewriting of the last argument into a procedure call statement here...
9090 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
9093 2011-08-04 Thomas Quinot <quinot@adacore.com>
9095 * par_sco.adb: Minor reformatting.
9097 2011-08-04 Robert Dewar <dewar@adacore.com>
9099 * erroutc.adb: Minor reformatting.
9101 2011-08-04 Thomas Quinot <quinot@adacore.com>
9103 * par_sco.adb: Comment update.
9105 2011-08-04 Tristan Gingold <gingold@adacore.com>
9107 * s-flocon.ads: New file.
9108 * g-flocon.ads: Now a renaming of s-flocon.
9109 * Makefile.rtl: Add s-flocon.o
9111 2011-08-04 Javier Miranda <miranda@adacore.com>
9113 * exp_strm.adb (Build_Array_Input_Function): if the array type is
9114 constrained, do not attempt to build a subtype of it.
9116 2011-08-04 Yannick Moy <moy@adacore.com>
9118 * errout.ads Change comments: remove 'R'M as an example where quotes
9119 are needed; add ALFA as another case where quotes are not needed
9120 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
9121 case where quotes are not needed.
9122 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
9123 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
9124 Remove all occurrences of 'A'L'F'A
9126 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9128 * sem_ch13.adb: check legality of invariant pragma.
9130 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
9132 * bindgen.adb: Add comments.
9134 2011-08-04 Yannick Moy <moy@adacore.com>
9136 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
9138 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
9139 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
9141 2011-08-04 Robert Dewar <dewar@adacore.com>
9143 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
9144 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
9145 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
9147 2011-08-04 Thomas Quinot <quinot@adacore.com>
9149 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
9151 2011-08-04 Thomas Quinot <quinot@adacore.com>
9154 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
9157 2011-08-04 Robert Dewar <dewar@adacore.com>
9159 * einfo.ads, exp_ch4.adb: Minor reformatting.
9161 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
9163 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
9165 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9167 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
9168 type in all cases to compute list of primitive operations, because full
9169 view may be an itype that is not attached to the list of declarations.
9171 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
9173 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
9174 library has already been finalized.
9175 (Gen_Adafinal_C): Likewise.
9176 (Gen_Adainit_Ada): Generate an early return if the library has
9177 already been elaborated.
9178 (Gen_Adainit_C): Likewise.
9179 (Gen_Output_File_Ada): Generate an elaboration flag.
9180 (Gen_Output_File_C): Likewise.
9182 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9184 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
9185 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
9186 built in the first place.
9187 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
9188 for CodePeer because Finalize_Address was not built to begin with.
9189 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
9191 2011-08-04 Pascal Obry <obry@adacore.com>
9193 * adaint.c (__gnat_tmp_name): Use current process id to create temp
9194 filenames, this ensures unicity of filenames across processes.
9196 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9198 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
9199 Raise_Controlled to Raise_From_Controlled_Operation. Update the
9200 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
9201 Add False as the actual to From_Abort in the generated call to
9202 Raise_From_Controlled_Operation.
9204 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
9206 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
9207 so that the ali file name can be retrieved from outside of this package.
9208 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
9209 doing nothing in the general case, but used to update the object file
9210 timestamp if directly generated by the backend.
9211 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
9212 to a later time than the ali file one.
9214 2011-08-04 Yannick Moy <moy@adacore.com>
9216 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
9217 entities whose body contains an Annotate pragma which forces formal
9219 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
9220 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
9221 Mark_Non_ALFA_Subprogram to pass in a message and node.
9222 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
9223 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
9224 surrounding subprogram.
9225 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
9226 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
9227 as not in ALFA is annotated with Formal_Proof being On, then an error
9228 is issued based on the additional parameters for message and node.
9229 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
9230 * gcc-interface/Make-lang.in: Update dependencies.
9232 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9234 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
9235 Finalize_Address when CodePeer is enabled.
9237 2011-08-04 Pascal Obry <obry@adacore.com>
9239 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
9240 the latter returns a pointer to a static buffer which is deallocated
9241 at the end of the routine.
9243 2011-08-04 Yannick Moy <moy@adacore.com>
9245 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
9246 after index creation; mark unconstrained base array type generated as
9247 being in/not in ALFA as well
9248 (Make_Index): mark subtype created as in/not in ALFA
9249 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
9250 over a loop as in/not in ALFA, depending on its type and form of loop
9253 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9255 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
9256 directly to False on .NET and JVM.
9258 2011-08-04 Yannick Moy <moy@adacore.com>
9260 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
9261 constraint that subtype must come from source code to be in ALFA, so
9262 that anonymous subtypes can be in ALFA too.
9264 2011-08-04 Yannick Moy <moy@adacore.com>
9266 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
9267 reference for ALFA mode.
9268 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
9269 procedure public so as to use it from formal verification back-end.
9271 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
9273 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
9274 invalid checks of the Parameter, making Remove_Switch not working
9277 2011-08-04 Arnaud Charlet <charlet@adacore.com>
9279 * targparm.ads: Update header: no run-time exception is needed on this
9282 2011-08-04 Vincent Celier <celier@adacore.com>
9284 * a-fihema.adb: Use System.IO instead of GNAT.IO
9286 2011-08-04 Thomas Quinot <quinot@adacore.com>
9288 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
9289 are forbidden in Compiler_Unit mode.
9291 2011-08-04 Robert Dewar <dewar@adacore.com>
9293 * sem_util.adb: Minor reformatting.
9295 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9297 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
9298 library-level finalizers.
9299 (Gen_Finalize_Library_C): Update the import string for library-level
9301 (Gen_Finalize_Library_Defs_C): Update the definition name of a
9302 library-level finalizer.
9303 * exp_ch7.adb: Remove with and use clauses for Stringt.
9304 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
9305 Spec_Decl. Add local variable Body_Id. The names of library-level
9306 finalizers are now manually fully qualified and are no longer external.
9307 A single name is now capable of servicing .NET, JVM and non-VM targets.
9308 Pragma Export is no longer required to provide visibility for the name.
9309 (Create_Finalizer_String): Removed.
9310 (New_Finalizer_Name): New routine which mimics New_..._Name.
9312 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
9314 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
9315 elaboration counter to Standard_Short_Integer.
9316 * sem_util.adb (Build_Elaboration_Entity): Likewise.
9317 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
9318 (Gen_Elab_Externals_C): Likewise.
9320 2011-08-04 Ed Falis <falis@adacore.com>
9322 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
9323 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
9324 system-vxworks-mips.ads, system-vxworks-x86.ads
9325 (Always_Compatible_Rep): set to False for all VxWorks targets.
9327 2011-08-04 Robert Dewar <dewar@adacore.com>
9329 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
9330 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
9331 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
9332 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
9333 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
9334 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
9335 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
9336 Minor reformatting and code reorganization.
9338 2011-08-04 Emmanuel Briot <briot@adacore.com>
9340 * projects.texi: Added doc for aggregate projects.
9342 2011-08-04 Emmanuel Briot <briot@adacore.com>
9344 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
9345 Add support for overriding the Project_Path in aggregate projects.
9347 2011-08-04 Robert Dewar <dewar@adacore.com>
9349 * a-cofove.ads: Minor reformatting.
9351 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9353 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
9354 on the generated code.
9355 (Build_Finalize_Statements): Update the comment on the generated code.
9356 (Build_Initialize_Statements): Update the comment on the generated code.
9357 (Build_Object_Declarations): Add local variable Result. The object
9358 declarations are now built in sequence.
9359 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
9362 2011-08-04 Robert Dewar <dewar@adacore.com>
9364 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
9366 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
9368 * einfo.ads (Elaboration_Entity): Document new definition and use.
9369 (Elaboration_Entity_Required): Adjust to above change.
9370 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
9371 * exp_ch12.adb: And with and use for Snames.
9372 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
9373 * exp_util.adb (Set_Elaboration_Flag): Likewise.
9374 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
9375 <Check_Unit_Name>: Deal with N_Expanded_Name.
9376 <Attribute_Elaborated>: Extend to all unit names.
9377 * sem_elab.adb: And with and use for Uintp.
9378 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
9379 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
9380 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
9381 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
9382 from Gen_Adainit_Ada.
9383 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
9384 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
9385 case, do not call System.Standard_Library.Adafinal; instead call
9386 finalize_library if needed.
9387 (Gen_Adafinal_C): Likewise.
9388 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
9389 non-main program case.
9390 (Gen_Adainit_C): Generate a couple of external declarations here.
9391 In the main program case, set SSL.Finalize_Library_Objects.
9392 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
9393 (Gen_Elab_Calls_C): Likewise.
9394 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
9395 (Gen_Finalize_Library_C): Likewise. Generate a full function.
9396 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
9398 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
9399 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
9401 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
9402 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
9403 of external declarations. Call Gen_Finalize_Library_C.
9405 2011-08-04 Emmanuel Briot <briot@adacore.com>
9407 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
9408 Compute_Compilation_Phases): new subprogram.
9409 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
9410 The number of mains as well as the various compilation phases that
9411 need to be run are now project tree specific, since various
9412 aggregated trees might have different requirements. In particular,
9413 they do not all require bind or link phases.
9415 2011-08-04 Emmanuel Briot <briot@adacore.com>
9417 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
9418 (Project_Tree_Appdata): New type.
9419 It is now possible to associate application-specific data to a project
9420 tree. In particular, this is used in the gprbuild builder to avoid a
9421 number of global tables and htables, especially now that there can be
9422 several project trees loaded at once because of aggregate projects.
9423 (Debug_Name): new procedure.
9424 * projects.texi: Clarify syntax of "**" for Source_Dirs
9426 2011-08-03 Emmanuel Briot <briot@adacore.com>
9428 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
9429 the "roots" for a main.
9430 (Fill_From_Project): add support for aggregate projects. Main units
9431 in aggregated projects are now automatically added in the list of
9432 files to build (although this fails later on in gprbuild, because
9433 these files are not using the root proejct tree, so this needs
9435 * gcc-interface/Make-lang.in: Update dependencies.
9437 2011-08-03 Yannick Moy <moy@adacore.com>
9439 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
9440 conditional expression in ALFA.
9441 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
9442 expressions as not in ALFA.
9444 2011-08-03 Robert Dewar <dewar@adacore.com>
9446 * a-cofove.adb: Minor reformatting.
9448 2011-08-03 Emmanuel Briot <briot@adacore.com>
9450 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
9451 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
9453 These packages are more logically placed in the Queue package, since
9454 they manipulate the queue. It is also likely that they can be adapted
9455 for gnatmake, thus sharing more code.
9456 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
9457 that we could move the above.
9459 2011-08-03 Emmanuel Briot <briot@adacore.com>
9461 * errutil.adb (Finalize): clean up the list of error messages on exit.
9462 Calling this subprogram multiple times will no longer show duplicate
9463 error messages on stderr.
9465 2011-08-03 Emmanuel Briot <briot@adacore.com>
9467 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
9468 Getopt_Switches when we have already define a command line
9471 2011-08-03 Yannick Moy <moy@adacore.com>
9473 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
9474 in ALFA. Instead, they are considered as assertions to prove.
9475 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
9476 nodes as not in ALFA. Instead, include conditional expressions in ALFA
9477 if they have no ELSE part, or if they occur in pre- and postconditions,
9478 where the Condition cannot have side-effects in ALFA
9479 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
9480 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
9481 Instead, include type conversion between scalar types in ALFA.
9482 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
9483 if-and-only-if its type is in ALFA.
9485 2011-08-03 Thomas Quinot <quinot@adacore.com>
9487 * scos.adb, get_scos.adb, put_scos.adb
9488 New code letter for decisions: G (entry guard)
9490 (Traverse_Subprogram_Body): Rename to...
9491 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
9492 (Traverse_Protected_Body): New subprogram
9493 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
9494 protected bodies and entry bodies.
9496 2011-08-03 Yannick Moy <moy@adacore.com>
9498 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
9499 entities with get/set subprograms, which is set on procedure entities
9500 generated by the compiler for a postcondition.
9501 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
9502 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
9503 entity for a declaration
9504 (Get_Unique_Entity_For_Decl): new function returning an entity which
9505 represents a declaration, so that matching spec and body have the same
9508 2011-08-03 Robert Dewar <dewar@adacore.com>
9510 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
9511 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
9513 2011-08-03 Yannick Moy <moy@adacore.com>
9515 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
9516 library-level because retriction No_Implicit_Dynamic_Code in the
9517 front-end prevents its definition as a local subprogram
9518 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
9519 for reuse in other contexts
9520 (Traverse_Declarations_Or_Statements,
9521 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
9522 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
9523 procedures take a callback parameter to be called on all declarations
9525 (Traverse_All_Compilation_Units): new generic function to traverse a
9526 compilation unit and call a callback parameter on all declarations
9528 2011-08-03 Javier Miranda <miranda@adacore.com>
9530 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
9531 in Java since they are always enclosed in a namespace that
9532 differentiates them, and overloaded entities are supported by the VM.
9534 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9536 * checks.adb (Determine_Range): If a computed bound of an operation is
9537 outside the range of the base type of the expression, and overflow
9538 checks are enabled, the result is unknown and cannot be used for any
9539 subsequent constant folding.
9540 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
9541 unknown, so is the result of the comparison.
9543 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
9545 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
9546 From_Abort. When finalization was triggered by an abort, propagate
9547 Standard'Abort_Signal rather than Program_Error.
9548 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
9550 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
9551 From_Abort. When finalization was triggered by an abort, propagate
9552 Standard'Abort_Signal rather than Program_Error.
9553 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
9555 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
9556 Abort_Id. Update the calls to Build_Object_Declarations and
9557 Build_Raise_Statement to include Abort_Id.
9558 (Build_Adjust_Statements): New local variable Abort_Id. Update the
9559 calls to Build_Object_Declarations and Build_Raise_Statement to include
9561 (Build_Finalize_Statements): New local variable Abort_Id. Update the
9562 calls to Build_Object_Declarations and Build_Raise_Statement to include
9564 (Build_Components): Create an entity for Abort_Id when exceptions are
9565 allowed on the target.
9566 (Build_Finalizer): New local variable Abort_Id.
9567 (Build_Initialize_Statements): New local variable Abort_Id. Update the
9568 calls to Build_Object_Declarations and Build_Raise_Statement to include
9570 (Build_Object_Declarations): Add new formal Abort_Id. Create the
9571 declaration of flag Abort_Id to preserve the original abort status
9572 before finalization code is executed.
9573 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
9574 runtime routine Raise_From_Controlled_Operation.
9575 (Create_Finalizer): Update the call to Build_Raise_Statement to include
9576 Abort_Id. Update the call to Build_Object_Declarations to include
9577 Abort_Id. Update the layout of the finalizer body.
9578 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
9579 (Process_Transient_Objects): New local variable Abort_Id. Remove the
9580 clunky code to create all flags and objects related to
9581 exception propagation and replace it with a call to
9582 Build_Object_Declarations. Update the call to Build_Raise_Statement to
9584 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
9585 Add new formal Abort_Id and associated comment on its use.
9586 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
9588 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
9589 Remove the clunky code to create all flags and objects related to
9590 exception propagation and replace it with a call to
9591 Build_Object_Declarations. Update the call to Build_Raise_Statement.
9593 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
9595 * s-tassta.adb: Fix minor typos.
9597 2011-08-03 Robert Dewar <dewar@adacore.com>
9599 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
9600 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
9602 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
9604 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
9605 to packages. This ensures that the finalizer body will not end up
9606 inside the freeze node.
9607 (Process_Declarations): Add code to detect whether a freeze node has a
9608 nested finalization collection.
9610 2011-08-03 Pascal Obry <obry@adacore.com>
9612 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
9613 (Current_Session): Return a not null access to Session_Type.
9614 (Default_Session): Likewise.
9616 2011-08-03 Robert Dewar <dewar@adacore.com>
9618 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
9619 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
9621 2011-08-03 Pascal Obry <obry@adacore.com>
9623 * g-awk.ads: Minor comment fix.
9625 2011-08-03 Sergey Rybin <rybin@adacore.com>
9627 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
9628 the tree structure related to discriminant constraints.
9629 Original_Discriminant cannot be used any more for computing the
9630 defining name for the reference to a discriminant.
9632 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9634 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
9635 function is not visibly tagged, this is not a dispatching call and
9636 therfore is not Tag_Indeterminate, even if the function is marked as
9637 dispatching on result.
9639 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
9641 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
9642 (Expand_N_Free_Statement): Add a guard to protect against run-times
9643 which do not support controlled types.
9644 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
9645 against run-times which do not support controlled types.
9646 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
9647 against run-times which do not support controlled types.
9648 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
9649 against run-times which do not support controlled types.
9650 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
9651 protect against run-times which do not support controlled types.
9653 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
9655 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
9656 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
9658 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9660 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
9661 modified in the source, to prevent spurious warnings when compiling
9664 2011-08-03 Thomas Quinot <quinot@adacore.com>
9666 * a-except-2005.adb: Minor reformatting.
9668 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9670 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
9671 is a renaming declaration in the private part of a package, do not emit
9672 a warning that the with_clause could be moved because the renaming may
9673 be used in the body or in a child unit.
9675 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
9677 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
9678 Propagate the Comes_From_Source attribute from the original return
9679 object to the renaming.
9681 2011-08-03 Jose Ruiz <ruiz@adacore.com>
9683 * exp_ch7.adb (Build_Raise_Statement): Do not call
9684 Raise_From_Controlled_Operation when this routine is not present in
9685 the run-time library.
9686 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
9687 libraries (Ravenscar), tasks are non-terminating, and protected objects
9688 and tasks can only appear at library level, so we do not want
9689 finalization of protected objects nor tasks.
9690 * exp_intr.adb: Minor clarification in comment.
9691 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
9692 Gen_Output_File_C): Remove references to finalization of library-level
9693 objects when using restricted run-time libraries.
9695 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9697 * sem_ch3.adb (Build_Discriminant_Constraints): Set
9698 Original_Discriminant only if the parent type is a generic formal.
9700 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
9702 * exp_ch13.adb: Add with and use clause for Targparm;
9703 (Expand_N_Free_Statement): Prevent the generation of a custom
9704 Deallocate on .NET/JVM targets since this requires pools and address
9706 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
9707 .NET/JVM targets, attach the newly allocated object to the access
9708 type's finalization collection. Do not generate a call to
9709 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
9710 exist in the runtime.
9711 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
9712 create a custom Allocate for object that do not require initialization.
9713 Attach a newly allocated object to the access type's finalization
9714 collection on .NET/JVM.
9715 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
9716 assignment of controlled types on .NET/JVM. The two hidden pointers
9717 Prev and Next and stored and later restored after the assignment takes
9719 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
9720 kludge for .NET/JVM to recognize a particular piece of code coming from
9721 Heap_Management and change the call to Finalize into Deep_Finalize.
9722 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
9723 finalization collections on .NET/JVM only for types derived from
9724 Controlled. Separate the association of storage pools with a collection
9725 and only allow it on non-.NET/JVM targets.
9726 (Make_Attach_Call): New routine.
9727 (Make_Detach_Call): New routine.
9728 (Process_Object_Declarations): Suppress the generation of
9729 build-in-place return object clean up code on .NET/JVM since it uses
9731 * exp_ch7.ads (Make_Attach_Call): New routine.
9732 (Make_Detach_Call): New routine.
9733 * exp_intr.adb Add with and use clause for Targparm.
9734 (Expand_Unc_Deallocation): Detach a controlled object from a collection
9735 on .NET/JVM targets.
9736 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
9737 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
9738 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
9739 names used in finalization.
9741 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
9743 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
9744 (Attach, Detach): Lock the current task when chaining an object onto a
9747 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
9749 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
9750 Rewritten to create the message strings when the exception is not
9751 raised by an abort during finalization.
9752 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
9753 Raise_From_Controlled_Operation and update its associated comment.
9754 * a-fihema.ads, a-fihema.adb: New GNAT unit.
9755 Ada.Finalization.Heap_Management provides key functionality
9756 associated with controlled objects on the heap, their creation,
9757 finalization and reclamation. Type Finalization_Collection is
9758 effectively a wrapper which sits ontop of a storage pool and performs
9759 all necessary bookkeeping for all the objects it contains. Each
9760 access-to-controlled or access-to-class-wide type receives a collection
9761 as part of its expansion. The compiler generates buffer code and
9762 invokes Allocate / Deallocate to create and destroy allocated
9764 * a-finali.adb ("="): Removed.
9765 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
9766 fields Prev and Next.
9767 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
9768 A library unit with at least one controlled object on the library level
9769 has a special finalizer which is invoked by the binder. To signal this,
9770 ali files carry field PF.
9771 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
9772 associated comment on field usage.
9773 * a-tags.adb (Get_RC_Offset): Removed.
9774 (Needs_Finalization): New routine.
9775 * a-tags.ads: Update the structure of the GNAT dispatch tables.
9776 Dispatch tables now carry field Needs_Finalization which provides
9777 runtime indication whether a type is controlled or has controlled
9778 components or both. Remove field RC_Offset.
9779 (Get_RC_Offset): Removed along with its associated pragma Export.
9780 Since tagged types with controlled components no longer carry hidden
9781 field _controller, the special mechanism to retrieve its location is no
9783 (Needs_Finalization): New routine.
9784 * atree.ads, atree.adb (Elist24): New routine.
9785 (Set_Elist24): New routine.
9786 * atree.h: Add a define clause for Elist24.
9787 * bindgen.adb New library-level variable Lib_Final_Built.
9788 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
9789 presence of a VM target, the routine generates calls to the proper
9790 library finalization routine.
9791 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
9792 targets. Set the correct library finalization routine depending on
9793 whether the library has controlled objects or this is a VM compilation.
9794 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
9795 to library-level finalizers of compiled units in reverse order of
9796 elaboration. It also produces exception management code and reraises a
9797 potential exception after all units have been finalized.
9798 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
9799 library-level finalizers of compiled units in reverse order of
9801 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
9802 definitions of all library-level finalizers available to the compilation
9803 (Gen_Main_Ada): Directly call Adafinal which now contails all target
9805 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
9806 System.Standard_Library.Adafinal directly. If the library needs
9807 finalization actions, create the sequence of finalization calls.
9808 (Gen_Output_File_Ada): Alphabetize local variables and constants.
9809 Generate a with clause for System.Soft_Links when compiling for a VM.
9810 Remove the code which imports System.Standard_Library.Adafinal as
9811 Do_Finalize. Generate the library finalization routine.
9812 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
9813 If the library needs finalization actions, create all the definitions
9814 of library- level finalizers.
9815 (Has_Finalizer): New routine. Determines whether at least one compiled
9816 unit has a library-level finalizer.
9817 Add type Qualification_Mode.
9818 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
9819 * einfo.adb: New usage of field 15 as Return_Flag.
9820 Remove Finalization_Chain_Entity from the usages of field 19.
9821 Remove Associated_Final_Chain from the usages of field 23.
9822 New usage of field 23 as Associated_Collection.
9823 New usage of field 24 as Finalizer.
9824 New usage of flag 252 as Is_Processed_Transient.
9825 (Associated_Final_Chain): Removed.
9826 (Associated_Collection): New routine.
9827 (Finalization_Chain_Entity): Removed.
9828 (Finalizer): New routine.
9829 (Is_Finalizer): New routine.
9830 (Is_Processed_Transient): New routine.
9831 (Return_Flag): New routine.
9832 (Set_Associated_Final_Chain): Removed.
9833 (Set_Associated_Collection): New routine.
9834 (Set_Finalization_Chain_Entity): Removed.
9835 (Set_Finalizer): New routine.
9836 (Set_Is_Processed_Transient): New routine.
9837 (Set_Return_Flag): New routine.
9838 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
9840 (Write_Field8_Name): Alphabetize the output.
9841 (Write_Field11_Name): Alphabetize the output.
9842 (Write_Field12_Name): Alphabetize the output.
9843 (Write_Field13_Name): Alphabetize the output.
9844 (Write_Field14_Name): Alphabetize the output.
9845 (Write_Field15_Name): Alphabetize the output.
9846 (Write_Field16_Name): Alphabetize the output.
9847 (Write_Field17_Name): Alphabetize the output.
9848 (Write_Field18_Name): Alphabetize the output.
9849 (Write_Field19_Name): Alphabetize the output. Remove the output of
9850 Finalization_Chain_Entity.
9851 (Write_Field20_Name): Alphabetize the output.
9852 (Write_Field21_Name): Alphabetize the output.
9853 (Write_Field22_Name): Alphabetize the output.
9854 (Write_Field23_Name): Alphabetize the output. Remove the output of
9855 Associated_Final_Chain. Add output for Associated_Collection.
9856 (Write_Field24_Name): Alphabetize the output.
9857 (Write_Field25_Name): Add output for Finalizer.
9858 (Write_Field26_Name): Alphabetize the output.
9859 (Write_Field27_Name): Alphabetize the output.
9860 (Write_Field28_Name): Alphabetize the output.
9861 * einfo.ads: Add new field description for Associated_Collection and
9863 Remove Associated_Final_Chain and its uses in nodes.
9864 Remove Finalization_Chain_Entity and its uses in nodes.
9865 Add new field description for Finalizer and its uses in nodes.
9866 Add new synthesized attribute Is_Finalizer.
9867 Add new flag description for Is_Processed_Transient and its uses in
9869 Add new field description for Return_Flag and its uses in nodes.
9870 (Associated_Final_Chain): Removed along with its pragma Inline.
9871 (Associated_Collection): New routine and pragma Inline.
9872 (Finalization_Chain_Entity): Removed along with its pragma Inline.
9873 (Finalizer): New routine and pragma Inline.
9874 (Is_Finalizer): New routine and pragma Inline.
9875 (Is_Processed_Transient): New routine and pragma Inline.
9876 (Return_Flag): New routine and pragma Inline.
9877 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
9878 (Set_Associated_Collection): New routine and pragma Inline.
9879 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
9880 (Set_Finalizer): New routine and pragma Inline.
9881 (Set_Is_Processed_Transient): New routine and pragma Inline.
9882 (Set_Return_Flag): New routine and pragma Inline.
9883 * exp_aggr.adb: Alphabetize subprograms.
9884 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
9885 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
9886 associated comments. Remove local variables External_Final_List and
9888 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
9889 Ancestor. Remove the retrieval of finalization lists. Update the call to
9891 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
9892 lists. Update the call to Late_Expansion.
9893 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
9894 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
9895 (Gen_Assign): Remove the retrieval of the finalization list used to
9896 build the assignment. Update the calls to Make_Init_Call and
9898 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
9899 Remove the mechanism to determine attachment levels and finalization
9900 list retrieval. Remove the processing for coextensions.
9901 (Init_Controller): Removed. Controllers no longer exist.
9902 (Late_Expansion): Remove formals Flist and Obj along with their
9903 associated comments. Update the calls to Build_Record_Aggr_Code and
9904 Build_Array_Aggr_Code.
9905 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
9906 (Expand_N_Freeze_Entity): Add special processing for finalizers which
9907 appear in entry bodies, protected subprograms and task bodies.
9908 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
9909 * exp_ch3.adb (Add_Final_Chain): Removed.
9910 (Build_Array_Init_Proc): Alphabetize local variables.
9911 (Build_Assignment): Alphabetize local variables. Update the call to
9913 (Build_Class_Wide_Master): Rename local variables to better reflect
9915 (Build_Discriminant_Assignments): Code reformatting.
9916 (Build_Init_Call_Thru): Code reformatting.
9917 (Build_Init_Procedure): Code reformatting. Generate a special version
9918 of Deep_Finalize which is capable of finalizing all initialized
9919 components and ignore the rest.
9920 (Build_Init_Statements): Rename local variables to better reflect their
9922 Reimplement the mechanism to include the creation and update of an index
9923 variable called a "counter". It is used as a bookmark for tracing
9924 initialized and non-initialized components.
9925 (Build_Initialization_Call): Remove local variable Controller_Typ.
9926 Alphabetize all local variables. Remove the initialization of the
9927 record controller and update the call to Make_Init_Call.
9928 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
9929 New local variable Counter.
9930 (Constrain_Array): Alphabetize.
9931 (Expand_Freeze_Array_Type): Create a collection instead of a
9933 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
9934 Finalize_Address which is used in conjunction with allocated controlled
9936 (Expand_N_Object_Declaration): Remove the creation of a finalization
9937 list for anonymous access types. Update the calls to Make_Init_Call and
9939 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
9940 retrieval of finalization lists. Remove the expansion of the record
9941 controller. Create TSS primitive Finalize_Address used in conjunction
9942 with controlled objects on the heap. Create finalization collections
9943 for access-to-controlled record components.
9944 (Expand_Record_Controller): Removed.
9945 (Freeze_Type): Remove the freezing of record controllers. Freezing of
9946 class-wide types now requires additional processing. Create
9947 finalization collections for access-to-controlled types.
9948 (Increment_Counter): New routine.
9949 (Make_Counter): New routine.
9950 (Make_Eq_If): Remove the mention of Name_uController.
9951 (Make_Predefined_Primitive_Specs): There is no longer need to skip
9952 types coming from System.Finalization_Root.
9953 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
9954 (Predefined_Primitive_Bodies): There is no longer need to skip types
9955 coming from System.Finalization_Root.
9956 (Stream_Operation_OK): Do not generate stream routines for
9957 type Ada.Finalization.Heap_Management.Finalization_Collection.
9958 * exp_ch3.ads: Alphabetize subprograms.
9959 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
9960 Add with and use clause for Lib.
9961 (Complete_Coextension_Finalization): Removed.
9962 (Complete_Controlled_Allocation): New routine. Create a finalization
9963 collection for anonymous access-to-controlled types. Create a custom
9964 Allocate which interfaces with the back end and the machinery in
9966 (Expand_Allocator_Expression): Add necessary calls to
9967 Complete_Controlled_Allocation. Remove the retrieval of finalization
9968 lists. Update the calls to Make_Adjust_Call. Generate a call to
9969 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
9970 the associated collection.
9971 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
9972 Code clean up. Remove the retrieval of finalization lists and
9974 Update the call to Make_Init_Call. Generate a call to
9975 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
9976 the associated collection.
9977 (Get_Allocator_Final_List): Removed. Finalization lists are not
9979 (Suitable_Element): Remove the mention of Name_uController.
9980 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
9981 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
9982 the left hand side, carry out the assignment and adjust the left hand
9984 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
9985 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
9986 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
9987 BIP_Collection and BIPcollection.
9988 (Build_Heap_Allocator): New routine used to allocate the return object
9989 of a build-in-place function onto a collection.
9990 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
9991 (Expand_Call): Do not replace direct calls to Deep routines with their
9993 (Expand_N_Extended_Return_Statement): Give all variables shorter names
9994 and update their occurrences. Add a special return flag to monitor the
9995 [ab]normal execution of the function. The flag is set right before the
9997 Rewrite the mechanism used to allocate a build-in-place return object
9998 on the heap or on a storage pool.
9999 (Is_Direct_Deep_Call): New routine.
10000 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
10001 build-in-place function call instead of a final list. Build a call to
10002 Set_Finalize_Address_Ptr to decorate the associated collection.
10003 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
10004 order to name the build-in-place function call's result for later
10005 finalization. Add a collection to a build-in-place function call
10006 instead of a final list.
10007 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
10008 build-in-place function call instead of a final list. Remove the code
10009 which moves one final list and transforms it into the actual in a
10010 nested build-in-place call.
10011 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
10012 build-in-place function call instead of a final list.
10013 (Move_Final_List): Removed.
10014 (Needs_BIP_Collection): New routine.
10015 (Needs_BIP_Final_List): Removed.
10016 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
10017 enumeration type BIP_Formal_Kind.
10018 Update the related comment.
10019 (Needs_BIP_Collection): New routine.
10020 (Needs_BIP_Final_List): Removed.
10021 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
10022 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
10023 majority of subprograms in this unit. Add Name_Finalize_Address to
10024 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
10025 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
10026 statements for an array type.
10027 (Build_Adjust_Statements): Create the adjust statements for a record
10029 (Build_Cleanup_Statements): New routine. A procedure which given any
10030 construct containing asynchronous calls, references to _master, or is a
10031 task body, a task allocation or a protected body produces the necessary
10032 runtime calls to clean up these constructs.
10033 (Build_Exception_Handler): New routine.
10034 (Build_Final_List): Removed.
10035 (Build_Finalization_Collection): New routine. A core procedure which
10036 creates a collection to service heap allocated controlled objects
10037 associated with an access-to-controlled type.
10038 (Build_Finalize_Statements): Create the finalization statements for a
10040 (Build_Finalizer): New routine. A core procedure which given any
10041 construct with declarations and/or statements detects all objects which
10042 need any type of clean up (controlled objects, protected objects) and
10043 generates all necessary code to clean up the said objects in the proper
10045 (Build_Finalizer_Call): New routine.
10046 (Build_Initialize_Statements): Create the initialization statements for
10047 an array type. The generated routine contains code to finalize partially
10048 initialized arrays.
10049 (Build_Object_Declarations): New routine.
10050 (Build_Raise_Statement): New routine.
10051 (Clean_Simple_Protected_Objects): Removed.
10052 (Controller_Component): Removed.
10053 (Enclosing_Function): New routine.
10054 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
10055 either declarations or statements or both.
10056 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
10057 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
10059 (Find_Final_List): Removed.
10060 (Global_Flist_Ref): Removed.
10061 (In_Finalization_Root): Removed.
10062 (Insert_Actions_In_Scope_Around): Determine the range of the transient
10063 scope in terms of tree nodes. Process all transient variables within
10065 (Make_Adjust_Call): Rewritten. There is no longer an attach call
10066 generated after the adjust.
10067 (Make_Attach_Call): Removed.
10068 (Make_Call): New routine.
10069 (Make_Clean): Removed.
10070 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
10072 (Make_Deep_Proc): Rewritten to generate the new profile signature used
10074 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
10076 (Make_Final_Call): Modified to simply create a call to either
10077 Deep_Finalize or Finalize.
10078 (Make_Finalize_Address_Body): New routine.
10079 (Make_Finalize_Address_Stmts): New routine. A function which produces
10080 TSS primitive Finalize_Address used in conjunction with heap allocated
10081 controlled objects.
10082 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
10083 (Make_Init_Call): Rewritten. There is no longer an attach call
10084 generated after initialization.
10085 (Make_Local_Deep_Finalize): New routine.
10086 (Make_Set_Finalize_Address_Ptr_Call): New routine.
10087 (Make_Transient_Block): Remove the finalization list retrieval and
10089 (Needs_Finalization): Moved to Exp_Util.
10090 (Parent_Field_Type): New routine.
10091 (Preprocess_Components): New routine.
10092 (Process_Transient_Objects): New routine.
10093 (Wrap_HSS_In_Block): New routine.
10094 (Wrap_Transient_Declaration): Remove finalization list management and
10095 controller insertion.
10096 (Wrap_Transient_Expression): Code reformatting.
10097 (Wrap_Transient_Statement): Code reformatting.
10098 * exp_ch7.ads (Build_Final_List): Removed.
10099 (Build_Finalization_Collection): New routine.
10100 (Build_Raise_Statement): New routine.
10101 (Controller_Component): Removed.
10102 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
10103 (Find_Final_List): Removed.
10104 (In_Finalization_Root): Removed.
10105 (Is_Simple_Protected_Type): Update related comment.
10106 (Make_Adjust_Call): New parameter profile and associated comments.
10107 (Make_Attach_Call): Removed.
10108 (Make_Final_Call): New parameter profile and associated comments.
10109 (Make_Finalize_Address_Body): New routine.
10110 (Make_Init_Call): New parameter profile and associated comments.
10111 (Make_Local_Deep_Finalize): New routine.
10112 (Make_Set_Finalize_Address_Ptr_Call): New routine.
10113 (Needs_Finalization): Moved to Exp_Util.
10114 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
10115 (Expand_N_Protected_Body): Remove the handling of finalization lists.
10116 (Find_Protection_Type): Moved to Exp_Util.
10117 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
10118 (Make_DT): Update sequence of dispatch table initialization. Remove the
10119 initialization of field RC_Offset. Add initialization of field Needs_
10121 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
10122 Reimplement how an object is first finalized, then deallocated.
10123 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
10125 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
10126 Register TSS_Finalize_Address with type TSS_Names.
10127 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
10128 procedure provides the interface between an allocation / deallocation
10129 and the support machinery in Ada.Finalization.Heap_Management.
10130 (Find_Init_Call): Code reformatting.
10131 (Find_Init_Call_In_List): Code reformatting.
10132 (Find_Protection_Type): Moved from Exp_Ch9.
10133 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
10134 (Has_Controlled_Coextensions): Removed.
10135 (Has_Controlled_Objects): New routine.
10136 (In_Library_Level_Package_Body): New routine.
10137 (Insert_Action_After): New routine.
10138 (Is_Finalizable_Transient): New routine. This predicate determines
10139 whether an object declaration is one of the many variants of controlled
10141 (Is_Null_Access_BIP_Func_Call): New routine.
10142 (Is_Non_BIP_Func_Call): New routine.
10143 (Is_Related_To_Func_Return): New routine.
10144 (Needs_Finalization): Moved from Exp_Ch7.
10145 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
10146 (Find_Protection_Type): Moved from Exp_Ch9.
10147 (Has_Controlled_Coextensions): Removed.
10148 (Has_Controlled_Objects): New routine.
10149 (In_Library_Level_Package_Body): New routine.
10150 (Insert_Action_After): New routine.
10151 (Is_Finalizable_Transient): New routine.
10152 (Is_Null_Access_BIP_Func_Call): New routine.
10153 (Is_Non_BIP_Func_Call): New routine.
10154 (Is_Related_To_Func_Return): New routine.
10155 (Needs_Finalization): Moved from Exp_ch7.
10156 * expander.adb (Expand): Add a case for N_Free_Statement.
10157 * freeze.adb (Freeze_All): Replace the generation of a finalization
10158 list with a collection for access-to-controlled types.
10159 (Freeze_Entity): Code reformatting.
10160 (Freeze_Record_Type): Remove the freezing of a record controller
10162 (Freeze_Subprogram): Code reformatting.
10163 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
10165 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
10166 has a library-level finalizer.
10167 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
10168 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
10169 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
10170 files. Add a-fihema to the list of object files.
10172 Alphabetize the associations in type Is_Parameterless_Attribute.
10173 * rtsfind.ads: Ada.Finalization_List.Controller and
10174 System.Finalization_Implementation are no longer a GNAT unit.
10175 Update the range of type Ada_Finalization_Child. Remove the following
10176 recoverable entities:
10178 RE_Attach_To_Final_List
10182 RE_Finalizable_Ptr_Ptr
10183 RE_Global_Final_List
10184 RE_Limited_Record_Controller
10187 RE_Record_Controller
10188 RE_Simple_List_Controller
10190 Add the following recoverable entities:
10192 RE_Add_Offset_To_Address
10196 RE_Exception_Identity
10197 RE_Finalization_Collection
10198 RE_Finalization_Collection_Ptr
10199 RE_Needs_Finalization
10200 RE_Save_Library_Occurrence
10201 RE_Set_Finalize_Address_Ptr
10202 RE_Set_Storage_Pool_Ptr
10204 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
10206 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
10207 (First_Stored_Discriminant): Remove the mention of Name_uController.
10208 * sem_aux.ads: Comment reformatting.
10209 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
10210 to redecorate an already existing class-wide type.
10211 (Decorate_Tagged_Type): New parameter profile and associated comment.
10212 Create a "shadow class-wide type" for a shadow entity.
10213 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
10214 of the final chain along with the associated comment.
10215 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
10216 Full_Desig and set it to the full view of the designated type.
10217 Initialize the finalization collection to empty.
10218 (Build_Derived_Record_Type): Alphabetize local variables. Code
10220 (Collect_Fixed_Components): Remove the mention of Name_uController.
10221 (Create_Constrained_Components): Remove the mention of Name_uController.
10222 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
10223 class-wide type of a shadow entity.
10224 (Process_Full_View): Update the machinery which marks type
10225 Limited_Controlled's entity as limited.
10226 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
10227 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
10228 list, instead make a collection build-in-place formal.
10229 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
10230 a designated type in order to establish a match between the renaming
10231 and the renamed entity.
10232 (Find_Selected_Component): Add guard to prevent spurious exceptions
10233 from being raised on .NET/JVM.
10234 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
10235 to the list of primitive that need special processing. Update arrays
10236 C_Names and D_Names.
10237 (Replace_Types): Handle class-wide types.
10238 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
10239 different parameter profile, look at the first formal.
10240 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
10241 use clauses for Exp_Util.
10242 * sem_res.adb: Remove with and use clauses for Elists.
10243 (Propagate_Coextensions): Removed.
10244 (Resolve_Allocator): Do not propagate the list of coextensions from one
10245 allocator to another.
10246 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
10247 Deaccessed_T to Desig_Typ.
10248 (Enter_Name): Remove the mention of Name_uController.
10249 (Gather_Components): Remove the mention of Name_uController.
10250 (Incomplete_Or_Private_View): New routine.
10251 (Is_Coextension_Root): Removed.
10252 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
10253 * sem_util.ads (Incomplete_Or_Private_View): New routine.
10254 (Is_Coextension_Root): Removed.
10255 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
10256 Controlled types are now derived from a null tagged record. Remove
10257 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
10258 * sinfo.adb (Coextensions): Removed.
10259 (Set_Coextensions): Removed.
10260 * sinfo.ads: Remove Coextensions from the explanation of node fields
10261 and its uses in nodes.
10262 Update the field usage of N_Allocator.
10263 (Coextensions): Removed along with its pragma Inline.
10264 (Set_Coextensions): Removed along with its pragma Inline.
10265 * snames.ads-tmpl: Remove names
10270 Name_uLocal_Final_List
10271 Name_Finalization_Root
10278 Name_Finalize_Address
10279 * s-pooglo.adb (Allocate): Add overriding indicator.
10280 (Deallocate): Add overriding indicator.
10281 (Storage_Size): Add overriding indicator.
10282 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
10283 than Finalize_Global_List.
10284 (Null_Finalize_Global_List): Removed.
10285 (Save_Library_Occurrence): New routine.
10286 * s-soflin.ads: Remove variable Finalize_Global_List along with its
10287 initialization. Add variable Finalize_Library_Objects along with its
10288 pragma Export. Add variables Library_Exception and
10289 Library_Exception_Set along with their pragma Export.
10290 (Null_Finalize_Global_List): Removed.
10291 (Save_Library_Occurrence): New routine.
10292 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
10293 rather than Finalize_Global_List.
10294 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
10295 of the constructed node.
10297 2011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10299 * link.c: Include "auto-host.h" before system headers.
10301 2011-08-03 Vincent Celier <celier@adacore.com>
10303 * make.adb (Gnatmake): Add to table Library_Projs only library projects
10304 that are not extended. Do not check if a library project that is
10305 extended should be regenerated. Do not add to table Library_Paths the
10306 libraries that are in extended projects. Link only with libraries that
10307 are in libray projects that are not extended.
10308 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
10309 for a library project that is extended.
10311 2011-08-03 Gary Dismukes <dismukes@adacore.com>
10313 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
10314 conforming subprogram renamings that appear to be completions if they
10315 are not fully conformant.
10316 Such renamings are homographs but not completions.
10317 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
10318 names in a subprogram renaming that appears in an instance.
10320 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10322 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
10323 not immutably limited, build actual subtype from expression to provide
10324 proper bounds to caller.
10326 2011-08-03 Gary Dismukes <dismukes@adacore.com>
10328 * sem_ch8.adb: Minor comment correction.
10330 2011-08-03 Thomas Quinot <quinot@adacore.com>
10332 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
10333 returning a limited array, use an extended return statement.
10335 2011-08-03 Vincent Celier <celier@adacore.com>
10337 * make.adb (Initialize): If --subdirs= is used, but no project file is
10338 specified, attempt to create the specify subdir if it does not already
10339 exist and use it as the object directory as if -D had been specified.
10341 2011-08-03 Arnaud Charlet <charlet@adacore.com>
10343 * s-tpopsp-vms.adb: New file.
10344 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
10345 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
10347 2011-08-03 Emmanuel Briot <briot@adacore.com>
10349 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
10352 2011-08-03 Yannick Moy <moy@adacore.com>
10354 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
10355 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
10356 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
10357 detect that an array has static bounds.
10359 2011-08-03 Thomas Quinot <quinot@adacore.com>
10361 * exp_dist.adb: Minor reformatting.
10363 2011-08-03 Arnaud Charlet <charlet@adacore.com>
10365 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
10366 (ATCB_Key): Removed, not always used.
10368 2011-08-03 Emmanuel Briot <briot@adacore.com>
10370 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
10371 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
10372 most remaining global variables.
10374 2011-08-03 Robert Dewar <dewar@adacore.com>
10376 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
10377 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
10380 2011-08-03 Javier Miranda <miranda@adacore.com>
10382 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
10383 that must be passed by copy in VM targets.
10385 2011-08-03 Emmanuel Briot <briot@adacore.com>
10387 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
10388 duplicates a similar htable now in the project tree.
10390 2011-08-03 Claire Dross <dross@adacore.com>
10392 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
10393 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
10394 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
10395 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
10396 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
10397 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
10398 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
10401 2011-08-03 Arnaud Charlet <charlet@adacore.com>
10403 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
10404 (ATCB_Key): Removed, not always used.
10405 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
10406 s-taprop-posix.adb.
10407 * s-tpopsp-tls.adb: New file.
10408 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
10409 x86/x64/ia64/powerpc/sparc Linux.
10411 2011-08-03 Arnaud Charlet <charlet@adacore.com>
10413 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
10414 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
10416 2011-08-03 Thomas Quinot <quinot@adacore.com>
10418 * rtsfind.ads, exp_dist.adb, exp_dist.ads
10419 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
10420 Fix type selection for mapping integer types to PolyORB types.
10422 2011-08-03 Bob Duff <duff@adacore.com>
10424 * sem_ch7.adb: Minor comment clarification.
10426 2011-08-03 Bob Duff <duff@adacore.com>
10428 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
10429 an error analyzing a choice, skip further processing. Further
10430 processing could cause a crash or cascade errors.
10432 2011-08-03 Emmanuel Briot <briot@adacore.com>
10434 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
10435 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
10436 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
10437 prj-env.ads (Shared_Project_Tree_Data): new type
10438 An aggregate project and its aggregated trees need to share the common
10439 data structures used for lists of strings, packages,... This makes the
10440 code simpler since otherwise we have to pass the root tree (also used
10441 for the configuration file data) in addition to the current project
10442 tree. This also avoids ambiguities as to which tree should be used.
10443 And finally this saves a bit of memory.
10444 (For_Every_Project_Imported): new parameter Tree.
10445 Since aggregated projects are using a different tree, we need to let
10446 the caller know which tree to use to manipulate the returned project.
10448 2011-08-03 Robert Dewar <dewar@adacore.com>
10450 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
10451 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
10452 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
10453 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
10455 2011-08-03 Javier Miranda <miranda@adacore.com>
10457 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
10458 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
10460 2011-08-03 Bob Duff <duff@adacore.com>
10462 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
10465 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
10467 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
10468 g-sehash.ads: Fix typo. Update header.
10470 2011-08-03 Thomas Quinot <quinot@adacore.com>
10472 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
10475 2011-08-03 Gary Dismukes <dismukes@adacore.com>
10477 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
10478 prefixes of private types along with records, since the selector may be
10480 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
10481 private types along with records, since the selector may be a
10484 2011-08-03 Emmanuel Briot <briot@adacore.com>
10486 * prj-pp.adb (Pretty_Print): Remove trailing blank line.
10488 2011-08-03 Javier Miranda <miranda@adacore.com>
10490 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
10491 Tagged_Type_Expansion.
10493 2011-08-03 Yannick Moy <moy@adacore.com>
10495 * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
10496 violation when the argument of concatenation is the name of a
10499 2011-08-03 Emmanuel Briot <briot@adacore.com>
10501 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
10502 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
10503 (Process_Declarative_Items): new parameter Child_Env.
10505 2011-08-03 Yannick Moy <moy@adacore.com>
10507 * alfa.ads: Update format of ALFA section in ALI file in order to
10508 add a mapping from bodies to specs when both are present.
10509 (ALFA_Scope_Record): Add components for spec file/scope.
10510 * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
10512 * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
10513 collected, fill in the spec information when relevant.
10514 * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
10517 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
10519 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
10520 code unit to decide whether to add internally generated subprograms.
10522 2011-08-03 Javier Miranda <miranda@adacore.com>
10524 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
10525 * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
10526 be handled by copy in VM targets.
10528 2011-08-03 Emmanuel Briot <briot@adacore.com>
10530 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
10531 code with Makeutl.Get_Switches.
10532 * prj-tree.adb: Update comment.
10534 2011-08-03 Thomas Quinot <quinot@adacore.com>
10536 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
10537 subprogram with a limited formal that does not support external
10540 2011-08-03 Yannick Moy <moy@adacore.com>
10542 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
10544 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
10545 not from current unit in two phases, because it is not possible to
10546 change the table while iterating over its content.
10547 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
10549 2011-08-03 Sergey Rybin <rybin@adacore.com>
10551 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
10552 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
10554 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10556 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
10557 and the component type is composite, this is ambiguous for predefined
10558 concatenation, but if the node is not overloaded and the entity is a use
10559 -defined function its profile can be used to resolve that aggregate.
10561 2011-08-03 Robert Dewar <dewar@adacore.com>
10563 * exp_ch4.adb: Minor code cleanup.
10565 2011-08-03 Thomas Quinot <quinot@adacore.com>
10567 * exp_dist.adb: Do not generate distribution stubs if serious errors
10568 have been diagnosed.
10570 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10572 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
10573 the first formal of a primitive operation, go to the base type to
10574 handle properly an access to a derived type with constrained
10576 * sem_type.adb (Disambiguate): an immediately visible operator hides a
10577 user-defined function that is only use-visible.
10579 2011-08-03 Robert Dewar <dewar@adacore.com>
10581 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
10582 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
10583 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
10584 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
10585 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
10586 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
10587 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
10588 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
10590 2011-08-03 Robert Dewar <dewar@adacore.com>
10592 * repinfo.adb (List_Mechanism): Add handling of
10593 Convention_Ada_Pass_By_XXX.
10594 * sem_mech.adb (Set_Mechanism): Ditto.
10595 * sem_prag.adb (Process_Convention): Add entries for
10596 Convention_Ada_Pass_By_XXX.
10597 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
10599 2011-08-03 Pascal Obry <obry@adacore.com>
10601 * makeutl.adb: Minor reformatting.
10603 2011-08-03 Vincent Celier <celier@adacore.com>
10606 (Get_File_Name) If the file cannot be found when there are no config
10607 pragmas file and May_Fail is True, return No_File instead of the file
10608 name, to be consistent.
10610 2011-08-03 Pascal Obry <obry@adacore.com>
10612 * adaint.c (__gnat_is_executable_file_attr): Avoid access
10615 2011-08-03 Javier Miranda <miranda@adacore.com>
10618 (Same_Representation): In VM targets the representation of arrays with
10619 aliased components differs from arrays with non-aliased components.
10621 2011-08-03 Emmanuel Briot <briot@adacore.com>
10623 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
10624 not systematically lower case attribute indexes that contain no "."
10625 Fix definition of several Naming attributes, which take
10626 a unit name as index and therefore should be case insensitive.
10627 Minor refactoring (reduce length of variable names).
10629 2011-08-03 Emmanuel Briot <briot@adacore.com>
10631 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
10633 2011-08-03 Emmanuel Briot <briot@adacore.com>
10635 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
10636 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
10637 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
10638 prj-tree.ads (Prj.Tree.Environment): new type.
10640 2011-08-03 Emmanuel Briot <briot@adacore.com>
10642 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
10643 prj-tree.adb, prj-tree.ads (Environment): new type.
10645 2011-08-03 Emmanuel Briot <briot@adacore.com>
10647 * prj-tree.ads: Remove unused variable.
10649 2011-08-03 Yannick Moy <moy@adacore.com>
10651 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
10652 issuing messages related to SPARK restriction violation.
10654 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10656 * sem_ch6.adb: guard against error nodes in return statements.
10658 2011-08-03 Arnaud Charlet <charlet@adacore.com>
10660 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
10661 a warning can only appear on a configuration file, so emit warning
10662 without further checks.
10664 2011-08-03 Arnaud Charlet <charlet@adacore.com>
10666 * s-interr.ads: add overriding keyword.
10668 2011-08-03 Geert Bosch <bosch@adacore.com>
10670 * exp_attr.adb: Fix minor typo.
10672 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10674 * par-ch4.adb: improve error recovery.
10676 2011-08-03 Emmanuel Briot <briot@adacore.com>
10678 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
10679 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
10680 to Errout_Handling.
10682 2011-08-03 Emmanuel Briot <briot@adacore.com>
10684 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
10685 "external" as an attribute name in aggregate projects.
10687 2011-08-03 Jose Ruiz <ruiz@adacore.com>
10689 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
10690 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
10691 from 0, so we need to adjust.
10693 2011-08-03 Emmanuel Briot <briot@adacore.com>
10695 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
10696 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
10698 2011-08-03 Yannick Moy <moy@adacore.com>
10700 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
10701 restriction on overloaded entity if the entity is not an operator.
10703 2011-08-03 Yannick Moy <moy@adacore.com>
10705 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
10706 restrict.ads: Rename remaining Check_Formal_Restriction* into
10707 Check_SPARK_Restriction*.
10709 2011-08-03 Emmanuel Briot <briot@adacore.com>
10711 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
10712 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
10714 (Project_Empty): removed
10715 (Empty_Project): new parameter Qualifier
10716 This is used to have fields specific to aggregate projects, cleaner
10717 New field to store the list of aggregated projects.
10718 (Check_Aggregate_Project): removed
10719 (Process_Aggregated_Projects, Free): new subprograms.
10721 2011-08-03 Olivier Hainque <hainque@adacore.com>
10723 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
10725 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10727 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
10728 explicit dereference of an unconstrained type, create a constrained
10729 subtype for it, as is done for function calls that return an
10730 unconstrained type.
10732 2011-08-03 Thomas Quinot <quinot@adacore.com>
10734 * g-pehage.adb (Finalize): Avoid possible double-free.
10736 2011-08-03 Steve Baird <baird@adacore.com>
10738 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
10739 Elab_Spec/Body attrs in CodePeer_Mode.
10741 2011-08-03 Javier Miranda <miranda@adacore.com>
10743 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
10744 low bound is not known at compile time but they have no others choice.
10745 Done because in this case the bounds can be obtained directly from the
10748 2011-08-03 Ed Falis <falis@adacore.com>
10750 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
10751 on VxWorks SMP. Remove unusable constant ANY_CPU.
10753 2011-08-03 Emmanuel Briot <briot@adacore.com>
10755 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
10756 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
10757 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
10758 Prj.Env.Initialize_Empty): new subprograms
10759 (Get_Env, Find_Project): remove parameter Target_Name.
10761 2011-08-03 Gary Dismukes <dismukes@adacore.com>
10763 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
10764 as a condition for the delayed call to Derived_Subprograms done for the
10765 case of the rewriting of a derived type that constrains the
10766 discriminants of its parent type.
10767 Avoids redundant subprogram derivations for private subtype derivations.
10769 2011-08-03 Javier Miranda <miranda@adacore.com>
10771 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
10772 Build_Record_Aggr_Code.
10773 (Build_Record_Aggr_Code): Add missing support to initialize hidden
10774 discriminants in extension aggregates.
10776 2011-08-03 Emmanuel Briot <briot@adacore.com>
10778 * prj-pp.adb (Print): also output project qualifiers, since in
10779 particular "aggregate" is mandatory in an aggregate project.
10781 2011-08-03 Emmanuel Briot <briot@adacore.com>
10783 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
10784 (Debug_Output): new function.
10786 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
10788 * gnat_ugn.texi: Document -Wstack-usage.
10789 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
10791 2011-08-03 Thomas Quinot <quinot@adacore.com>
10793 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
10794 have keyword LIMITED.
10796 2011-08-03 Yannick Moy <moy@adacore.com>
10798 * alfa.adb, alfa.ads, alfa_test.adb: New files.
10799 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
10800 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
10801 section (does not happen in compiler, only if code directly calls
10803 * get_alfa.adb, get_alfa.ads: New files.
10804 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
10806 * lib-xref-alfa.adb: New file.
10807 * lib-xref.adb, lib-xref.ads
10808 (Xref_Entry): redefine information needed in cross-references for ALFA.
10809 Push ALFA treatments in separated local package.
10810 (Enclosing_Subpragram_Or_Package): treat specially subprogram
10811 identifiers. Return entity of package body instead of spec. Return
10812 Empty for a scope with no location.
10813 (Generate_Reference): adapt to new components for ALFA information.
10814 Remove the need for D references on definitions.
10815 (Is_Local_Reference): moved to ALFA local package
10816 (Output_References): extract subfunction as Extract_Source_Name
10817 (Output_Local_References): remove procedure, replaced by filtering of
10818 cross-references in package ALFA and printing in Put_ALFA.
10819 (Write_Entity_Name): remove procedure
10820 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
10821 print exact name of entity as it appears in source file
10822 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
10823 * put_alfa.adb, put_alfa.ads: New files.
10824 * xref_lib.adb (Search_Xref): protect read of cross-references against
10825 reading other sections of the ALI file, in gnatxref
10826 (Search): protect read of cross-references against reading other
10827 sections of the ALI file, in gnatfind.
10828 * gcc-interface/Make-lang.in: Update dependencies.
10830 2011-08-03 Thomas Quinot <quinot@adacore.com>
10832 * sem_ch3.adb: Minor reformatting.
10834 2011-08-03 Jose Ruiz <ruiz@adacore.com>
10836 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
10837 raising an exception.
10839 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10841 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
10842 type, always use 1 as the lower bound or string, even if lower bound of
10843 context is not static, to handle properly null strings in a non-static
10846 2011-08-03 Bob Duff <duff@adacore.com>
10848 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
10849 always legal on the right-hand side of an assignment statement; there
10850 is always an applicable index constraint in this case. Therefore, the
10851 check for Pkind = N_Assignment_Statement is now unconditional -- it
10852 doesn't depend on whether Is_Constrained (Typ).
10854 2011-08-03 Robert Dewar <dewar@adacore.com>
10856 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
10858 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10860 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
10861 for an itype created within a generic unit.
10863 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
10865 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
10866 suppresses all inlining.
10868 2011-08-03 Robert Dewar <dewar@adacore.com>
10870 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
10871 exp_aggr.adb: Minor reformatting.
10873 2011-08-03 Thomas Quinot <quinot@adacore.com>
10875 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
10876 tagged assignment when discriminant checks are suppressed. This is
10877 useless and extremely costly in terms of static stack usage.
10879 2011-08-03 Bob Duff <duff@adacore.com>
10881 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
10882 of generics, because this leads to the wrong entity in the wrong scope,
10883 causing (e.g.) pragma Export_Procedure to get an error if the entity is
10885 (Process_Interface_Name): Follow Alias for instances of generics, to
10886 correct for the above change.
10888 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10890 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
10891 is an integer literal it is always safe to replace the reference. In
10892 addition, if the reference appears in the generated code for an object
10893 declaration it is necessary to copy because otherwise the reference
10894 might be to the uninitilized value of the discriminant of the object
10897 2011-08-03 Pascal Obry <obry@adacore.com>
10899 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
10900 ACL used, in this case we want to check for ending .exe, not .exe
10901 anywhere in the path.
10903 2011-08-03 Sergey Rybin <rybin@adacore.com>
10905 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
10906 the tree structure (semantic decoration of references to record
10909 2011-08-03 Gary Dismukes <dismukes@adacore.com>
10911 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
10912 choices of a named array aggregate, bail out when any choices are
10913 marked as Errors_Posted.
10915 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10917 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
10918 in which entity is frozen, to handle properly loop variables in
10921 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10923 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
10924 subtype is not static, compute the upper bound using attributes, to
10925 handle properly index types that are not integer types.
10927 2011-08-03 Bob Duff <duff@adacore.com>
10929 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
10930 Update copyright notice.
10932 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10934 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
10935 Original_Discriminant if within an instance.
10936 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
10938 2011-08-03 Thomas Quinot <quinot@adacore.com>
10940 * einfo.ads: Minor reformatting.
10942 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10944 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
10945 composite type with an unfrozen subcomponent, in the profile of a
10946 primitive operation.
10948 2011-08-03 Robert Dewar <dewar@adacore.com>
10950 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
10952 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10954 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
10955 unconstrained type with discriminants is initialized with an aggregate,
10956 use the constrained subtype of the aggregate as the type of the object,
10957 because it is immutable, and this allows the back-end to generate no
10958 code for the object declaration.
10960 2011-08-03 Robert Dewar <dewar@adacore.com>
10962 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
10963 comparison operand is variable, and turns out to be zero or negative.
10965 2011-08-03 Javier Miranda <miranda@adacore.com>
10968 (Expand_Dispatching_Constructor_Call): Disable expansion of
10969 code required for native targets. Done to avoid generating
10970 references to unavailable runtime entities in VM targets.
10972 (Expand_N_Object_Declaration): Add missing support to handle
10973 the explicit initialization of class-wide interface objects.
10976 2011-08-03 Matthew Heaney <heaney@adacore.com>
10978 * a-cobove.adb (Merge): Move source onto target, instead of using
10981 2011-08-03 Matthew Heaney <heaney@adacore.com>
10983 * a-cbdlli.adb (Splice): Move source items from first to last.
10985 2011-08-03 Yannick Moy <moy@adacore.com>
10987 * sem_util.ads: Add comment.
10989 2011-08-03 Javier Miranda <miranda@adacore.com>
10992 (Expand_Record_Aggregate): In VM targets disable the expansion into
10993 assignments of aggregates whose type is not known at compile time.
10995 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10997 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
10998 protected entries and task entries, to build the proper renaming
10999 declaration for entry formals, used in debugging.
11000 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
11001 parameters in the same way.
11003 2011-08-02 Robert Dewar <dewar@adacore.com>
11005 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
11006 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
11007 code reorganization.
11009 2011-08-02 Robert Dewar <dewar@adacore.com>
11011 * debug.adb: Debug flag d.P to suppress length comparison optimization
11012 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
11013 comparison of Length by comparing First/Last instead.
11015 2011-08-02 Matthew Heaney <heaney@adacore.com>
11017 * a-cobove.ads: Code clean up.
11019 2011-08-02 Vincent Celier <celier@adacore.com>
11021 * adaint.c (file_names_case_sensitive_cache): New static int.
11022 (__gnat_get_file_names_case_sensitive): Cache the return value in
11023 file_names_case_sensitive_cache at the first invocation, to avoid
11024 multiple calls to getenv.
11026 2011-08-02 Bob Duff <duff@adacore.com>
11028 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
11030 2011-08-02 Yannick Moy <moy@adacore.com>
11032 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
11033 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
11034 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
11035 indicate that we are in a precondition or postcondition. This is used in
11036 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
11037 decide whether to flag the spec or body of the current subprogram as
11040 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
11042 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
11044 * a-extiin.ads: New file.
11046 2011-08-02 Bob Duff <duff@adacore.com>
11048 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
11049 now raises Name_Error instead of Use_Error in certain cases. The other
11050 parts of this AI were already implemented properly.
11052 2011-08-02 Vincent Celier <celier@adacore.com>
11054 * link.c: Only import "auto-host.h" when building the gnattools.
11056 2011-08-02 Yannick Moy <moy@adacore.com>
11058 * sem_util.adb: Inter-unit inlining does not work for a subprogram
11059 which calls a local subprogram, so extract subprogram
11060 from Mark_Non_ALFA_Subprogram_Body.
11062 2011-08-02 Javier Miranda <miranda@adacore.com>
11065 (Extract_Dispatching_Call): If the type of the dispatching object is an
11066 access type then return an explicit dereference in the Object out-mode
11069 2011-08-02 Gary Dismukes <dismukes@adacore.com>
11071 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
11072 compatibility checks for all indexes of an array subtype, not just the
11073 first. Reset Has_Dynamic_Range_Check on the subtype before each
11074 potential check to ensure that Insert_Range_Checks will not elide any
11075 of the dynamic checks.
11077 2011-08-02 Yannick Moy <moy@adacore.com>
11079 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
11080 SPARK restriction at parsing time.
11081 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
11082 directive only if the SPARK restriction is set for this unit.
11084 2011-08-02 Yannick Moy <moy@adacore.com>
11086 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
11087 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
11088 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
11089 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
11090 Mark_Non_ALFA_Subprogram_Body.
11091 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
11094 2011-08-02 Yannick Moy <moy@adacore.com>
11096 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
11099 2011-08-02 Robert Dewar <dewar@adacore.com>
11101 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
11102 exp_ch3.adb: Minor reformatting.
11104 2011-08-02 Emmanuel Briot <briot@adacore.com>
11106 * adaint.c (__gnat_locate_exec_on_path): only returns executable
11107 files, not any regular file.
11108 (__gnat_locate_file_with_predicate): new subprogram.
11110 2011-08-02 Yannick Moy <moy@adacore.com>
11112 * sinfo.adb, sinfo.ads: Restrict the use of flags
11113 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
11114 nodes, plus N_Subtype_Declaration for the 2nd one.
11116 2011-08-02 Sergey Rybin <rybin@adacore.com>
11118 * gnat_rm.texi: Ramification of pragma Eliminate documentation
11119 - fix bugs in the description of Source_Trace;
11120 - get rid of UNIT_NAME;
11122 2011-08-02 Javier Miranda <miranda@adacore.com>
11125 (Build_Dispatching_Requeue): Adding support for VM targets
11126 since we cannot directly reference the Tag entity.
11127 * exp_sel.adb (Build_K): Adding support for VM targets.
11128 (Build_S_Assignment): Adding support for VM targets.
11130 (Default_Prim_Op_Position): In VM targets do not restrict availability
11131 of predefined interface primitives to compiling in Ada 2005 mode.
11132 (Is_Predefined_Interface_Primitive): In VM targets this service is not
11133 restricted to compiling in Ada 2005 mode.
11134 (Make_VM_TSD): Generate code that declares and initializes the OSD
11135 record. Needed to support dispatching calls through synchronized
11138 (Make_Predefined_Primitive_Specs): Enable generation of predefined
11139 primitives associated with synchronized interfaces.
11140 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
11141 primitives associated with synchronized interfaces.
11143 2011-08-02 Yannick Moy <moy@adacore.com>
11145 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
11146 statements hidden in SPARK if preceded by the HIDE directive
11147 (Parse_Exception_Handlers): mark each exception handler in a sequence of
11148 exception handlers as hidden in SPARK if preceded by the HIDE directive
11149 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
11150 if starting with the HIDE directive
11151 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
11152 starting with the HIDE directive; mark the declarations in a private
11153 part as hidden in SPARK if the private part starts with the HIDE
11155 * restrict.adb, restrict.ads
11156 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
11157 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
11158 argument node belongs to a part which is hidden in SPARK
11159 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
11160 parts in SPARK; protect the possibly costly call to
11161 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
11162 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
11163 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
11164 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
11166 (Scan): recognize special comment starting with '#' and followed by
11167 SPARK keyword "hide" as a HIDE directive.
11169 2011-08-02 Yannick Moy <moy@adacore.com>
11171 * types.ads, erroutc.ads: Minor reformatting.
11173 2011-08-02 Vincent Celier <celier@adacore.com>
11175 * link.c: Add response file support for cross platforms.
11177 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11179 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
11180 in an association, set parent field of copy before partial analysis.
11181 * sem_res.adb (Resolve_Slice): create reference to itype only when
11182 expansion is enabled.
11184 2011-08-02 Yannick Moy <moy@adacore.com>
11186 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
11187 for new flag denoting which subprogram bodies are in ALFA
11188 * restrict.adb, sem_ch7.adb: Update comment
11189 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
11190 sem_ch9.adb, sem_res.adb: Add calls to
11191 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
11192 * sem_ch6.adb (Analyze_Function_Return): add calls to
11193 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
11194 middle of the body, and extended return.
11195 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
11196 False when missing return.
11197 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
11198 to True for subprograms whose spec is in ALFA. Remove later on the flag
11199 on the entity used for a subprogram body when there exists a separate
11201 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
11202 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
11203 False, otherwise do nothing.
11205 2011-08-02 Robert Dewar <dewar@adacore.com>
11207 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
11209 2011-08-02 Yannick Moy <moy@adacore.com>
11211 * sem_ch4.ads: minor formatting.
11213 2011-08-02 Yannick Moy <moy@adacore.com>
11215 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
11216 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
11217 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
11218 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
11219 opt.ads: cleanup of SPARK mode
11221 2011-08-02 Yannick Moy <moy@adacore.com>
11223 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
11225 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
11226 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
11228 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
11229 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
11230 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
11231 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
11233 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
11235 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
11236 functions whose return type is not in ALFA.
11237 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
11239 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
11240 parameter's type is not in ALFA.
11241 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
11244 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11246 * sem_ch6 (Analyze_Expression_Function): treat the function as
11247 Inline_Always, and introduce a subprogram declaration for it when it is
11249 * inline.adb (Add_Inlined_Body): recognize bodies that come from
11250 expression functions, so that the back-end can determine whether they
11251 can in fact be inlined.
11252 * sem_util.adb (Is_Expression_Function): predicate to determine whether
11253 a function body comes from an expression function.
11255 2011-08-02 Gary Dismukes <dismukes@adacore.com>
11257 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
11258 null exclusions to test Can_Never_Be_Null on the anonymous access types
11259 of the formals rather than testing the formals themselves. Exclude this
11260 check in cases where the Old_Formal is marked as a controlling formal,
11261 to avoid issuing spurious errors for bodies completing dispatching
11262 operations (due to the flag not getting set on controlling access
11263 formals in body specs).
11264 (Find_Corresponding_Spec): When checking full and subtype conformance of
11265 subprogram bodies in instances, pass Designated and E in that order, for
11266 consistency with the expected order of the formals (New_Id followed by
11269 2011-08-02 Robert Dewar <dewar@adacore.com>
11271 * sem_ch8.adb: Minor reformatting.
11273 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11275 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
11276 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
11277 primitive operations of class-wide actuals.
11279 2011-08-02 Javier Miranda <miranda@adacore.com>
11281 * exp_atag.ads, exp_atag.adb
11282 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
11283 since its value is implicitly passed in argument Typ.
11284 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
11285 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
11286 Build_Common_Dispatching_Select_Statements.
11288 2011-08-02 Robert Dewar <dewar@adacore.com>
11290 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
11291 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
11292 Minor reformatting.
11294 2011-08-02 Robert Dewar <dewar@adacore.com>
11296 * sem_res.adb: Minor reformatting.
11297 * sem_prag.adb: Minor reformatting.
11299 2011-08-02 Javier Miranda <miranda@adacore.com>
11301 * exp_atag.adb, exp_atags.ads
11302 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
11303 by the tagged type Entity. Required to use this routine in the VM
11304 targets since we do not have available the Tag entity in the VM
11307 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
11308 Ada.Tags has not been previously loaded.
11310 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
11311 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
11313 (Enclosing_Dynamic_Scope): Add missing support to handle the full
11314 view of enclosing scopes. Required to handle enclosing scopes that
11315 are synchronized types whose full view is a task type.
11317 (Build_VM_TSDs): Minor code improvement to avoid generating and
11318 analyzing lists with empty nodes.
11319 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
11320 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
11321 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
11322 (Make_Disp_Timed_Select_Body): Add support for VM targets.
11323 (Make_Select_Specific_Data_Table): Add support for VM targets.
11324 (Make_VM_TSD): Generate code to initialize the SSD structure of
11327 2011-08-02 Yannick Moy <moy@adacore.com>
11329 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
11330 cross-references section in ALI.
11331 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
11332 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
11334 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
11335 subprogram or package entity of a node
11336 (Is_Local_Reference_Type): new function returns True for references
11337 selected in local cross-references.
11338 (Lt): function extracted from Lt in Output_References
11339 (Write_Entity_Name): function extracted from Output_References
11340 (Generate_Definition): generate reference with type 'D' for definition
11341 of objects (object declaration and parameter specification), with
11342 appropriate locations and units, for use in local cross-references.
11343 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
11344 references of type 'I' for initialization in object definition.
11345 (Output_References): move part of function Lt and procedure
11346 Write_Entity_Name outside of the body. Ignore references of types 'D'
11347 and 'I' introduced for local cross-references.
11348 (Output_Local_References): new procedure to output the local
11349 cross-references sections.
11350 (Lref_Entity_Status): new array defining whether an entity is a local
11351 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
11352 with 'I' type when initialization expression is present.
11353 * get_scos.adb, get_scos.ads: Correct comments and typos
11355 2011-08-02 Javier Miranda <miranda@adacore.com>
11357 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
11359 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
11361 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
11364 2011-08-02 Vincent Celier <celier@adacore.com>
11366 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
11367 (No_Space_Img): New function
11368 (Find_Excluded_Sources): When reading from a file, record the file name
11369 and the line number for each excluded source.
11370 (Mark_Excluded_Sources): When reporting an error, if the excluded
11371 sources were read from a file, include file name and line number in
11374 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11376 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
11378 2011-08-02 Robert Dewar <dewar@adacore.com>
11380 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
11382 2011-08-02 Javier Miranda <miranda@adacore.com>
11384 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
11385 generation of TSDs to the DOTNET compiler.
11386 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
11387 generation of TSDs to the DOTNET compiler.
11389 2011-08-02 Javier Miranda <miranda@adacore.com>
11391 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
11392 record of all the tagged types declared inside library level package
11393 declarations, library level package bodies or library level subprograms.
11394 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
11395 associated with a given tagged type.
11396 (Build_VM_TSDs): New subprogram.
11397 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
11398 compilation units that are subprograms.
11399 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
11400 compilation units that are package bodies.
11401 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
11402 units that are a package declaration or a package instantiation.
11403 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
11404 reorganization to improve the error generated by the frontend when the
11405 function Ada.Tags.Secondary_Tag is not available.
11406 * rtsfind.ads (RE_Register_TSD): New runtime entity.
11407 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
11409 2011-08-02 Javier Miranda <miranda@adacore.com>
11411 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
11413 2011-08-02 Robert Dewar <dewar@adacore.com>
11415 * s-imenne.ads: Minor reformatting.
11417 2011-08-02 Robert Dewar <dewar@adacore.com>
11419 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
11420 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
11421 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
11423 2011-08-02 Robert Dewar <dewar@adacore.com>
11425 * einfo.ads (Materialize_Entity): Document this is only for renamings
11426 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
11427 required debug information in the case where we transform the object
11428 declaration into a renaming declaration.
11429 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
11431 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
11432 Materialize_Entity.
11434 2011-08-02 Robert Dewar <dewar@adacore.com>
11436 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
11437 Suppress_Init_Procs.
11438 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
11439 Suppress_Initialization/Initialization_Suppressed.
11440 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
11441 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
11442 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
11443 * sem_prag.adb: New processing for pragma Suppress_Initialization.
11445 2011-08-02 Robert Dewar <dewar@adacore.com>
11447 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
11448 Minor reformatting.
11450 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11452 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
11453 only have inheritable classwide pre/postconditions.
11455 2011-08-02 Javier Miranda <miranda@adacore.com>
11457 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
11458 * rtsfind.ads (RE_Check_TSD): New runtime entity.
11459 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
11460 checks if the external tag of a type is the same as the external tag
11461 of some other declaration.
11463 2011-08-02 Thomas Quinot <quinot@adacore.com>
11465 * s-taskin.ads: Minor reformatting.
11467 2011-08-02 Emmanuel Briot <briot@adacore.com>
11469 * g-comlin.adb (Display_Help): swap the order in which it prints the
11470 short help and the general usage.
11472 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11474 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
11475 the aspect declarations and attach them to the generic copy for
11476 subsequent analysis.
11477 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
11478 declarations of the generic tree to the new subprogram declarations.
11479 * sem_attr.adb (Check_Precondition_Postcondition): recognize
11480 conditions that apply to a subprogram instance.
11482 2011-08-02 Robert Dewar <dewar@adacore.com>
11484 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
11486 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11488 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
11489 private type with a tagged full view is not derived in the immediate
11490 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
11492 2011-08-02 Robert Dewar <dewar@adacore.com>
11494 * exp_ch4.adb: Minor reformatting.
11496 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11498 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
11499 Ada2012 iterator, the loop will be rewritten during expansion into a
11500 while loop with a cursor and an element declaration. Do not analyze the
11501 body in this case, because if the container is for indefinite types the
11502 actual subtype of the elements will only be determined when the cursor
11503 declaration is analyzed.
11505 2011-08-02 Arnaud Charlet <charlet@adacore.com>
11507 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
11508 size/alignment related attributes in CodePeer_Mode.
11510 2011-08-02 Gary Dismukes <dismukes@adacore.com>
11512 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
11513 Prepend_Element, since this can result in the operation getting the
11514 wrong slot in the full type's dispatch table if the full type has
11515 inherited operations. The incomplete type's operation will get added
11516 to the proper position in the full type's primitives
11517 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
11518 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
11519 dispatching operations, since there are cases where nonprimitive
11520 subprograms can get added to the list of incomplete dependents (such
11521 as subprograms in nested packages).
11522 * sem_ch6.adb (Process_Formals): First, remove test for being in a
11523 private part when determining whether to add a primitive with a
11524 parameter of a tagged incomplete type to the Private_Dependents list.
11525 Such primitives can also occur in the visible part, and should not have
11526 been excluded from being private dependents.
11527 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
11528 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
11529 list of a Taft-amendment incomplete type is a primitive before issuing
11530 an error that the full type must appear in the same unit. There are
11531 cases where nonprimitives can be in the list (such as subprograms in
11533 * sem_disp.adb (Derives_From): Use correct condition for checking that
11534 a formal's type is derived from the type of the corresponding formal in
11535 the parent subprogram (the condition was completely wrong). Add
11536 checking that was missing for controlling result types being derived
11537 from the result type of the parent operation.
11539 2011-08-02 Yannick Moy <moy@adacore.com>
11541 * errout.adb (First_Node): minor renaming
11542 * restrict.adb (Check_Formal_Restriction): put restriction warning on
11545 2011-08-02 Yannick Moy <moy@adacore.com>
11547 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
11548 before accessing operands.
11549 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
11550 decide whether an initialization expression respects SPARK rules, as
11551 the plain node is the expanded one. This allows for more valid warnings
11553 * gnat_rm.texi: Minor update.
11555 2011-08-02 Arnaud Charlet <charlet@adacore.com>
11557 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
11560 2011-08-02 Robert Dewar <dewar@adacore.com>
11562 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
11564 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
11566 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
11567 loop statements and the element renaming declaration with a block when
11568 the element type is controlled.
11570 2011-08-02 Yannick Moy <moy@adacore.com>
11572 * sinfo.ads: Minor formatting.
11574 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11576 * sem_aggr.adb (Add_Association): if the association has a box and no
11577 expression, use the Sloc of the aggregate itself for the new
11579 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
11582 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
11584 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
11585 When a container is provided via a function call, generate a renaming
11586 of the function result. This avoids the creation of a transient scope
11587 and the premature finalization of the container.
11588 * exp_ch7.adb (Is_Container_Cursor): Removed.
11589 (Wrap_Transient_Declaration): Remove the supression of the finalization
11590 of the list controller when the declaration denotes a container cursor,
11593 2011-08-02 Yannick Moy <moy@adacore.com>
11595 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
11596 node is from source, instead of the original node being from source.
11598 (Resolve_Array_Aggregate): refine the check for a static expression, to
11599 recognize also static ranges
11600 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
11601 Array_Type_Declaration): postpone the test for the type being a subtype
11602 mark after the type has been resolved, so that component-selection and
11603 expanded-name are discriminated.
11604 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
11605 to distinguish the case of an iteration scheme, so that an error is
11606 issed on a non-static range in SPARK except in an iteration scheme.
11607 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
11608 In_Iter_Schm = True.
11609 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
11610 user-defined operators so that they are allowed in renaming
11612 (Find_Selected_Component): refine the check for prefixing of operators
11613 so that they are allowed in renaming. Move the checks for restrictions
11614 on selector name after analysis discriminated between
11615 component-selection and expanded-name.
11616 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
11617 concatenation argument of string type if it is static.
11618 * sem_util.adb, sem_util.ads
11619 (Check_Later_Vs_Basic_Declarations): add a new function
11620 Is_Later_Declarative_Item to decice which declarations are allowed as
11621 later items, in the two different modes Ada 83 and SPARK. In the SPARK
11622 mode, add that renamings are considered as later items.
11623 (Enclosing_Package): new function to return the enclosing package
11624 (Enter_Name): correct the rule for homonyms in SPARK
11625 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
11626 from source (result of expansion) to avoid issuing wrong warnings.
11628 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11630 * errout.adb: On anything but an expression First_Node returns its
11633 2011-08-02 Pascal Obry <obry@adacore.com>
11635 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
11637 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
11639 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
11640 Set the associated loop as the related expression of internally
11642 * exp_ch7.adb (Is_Container_Cursor): New routine.
11643 (Wrap_Transient_Declaration): Supress the finalization of the list
11644 controller when the declaration denotes a container cursor.
11646 2011-08-02 Yannick Moy <moy@adacore.com>
11648 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
11650 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
11651 expression is a simple expression. This check cannot be performed in
11652 the semantics, so just drop it.
11653 (P_Index_Or_Discriminant_Constraint): move check that the index or
11654 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
11655 semantics. Other cases were previously checked in the semantics.
11656 * par-ch4.adb (P_Name): move checks that a selector name is not
11657 character literal or an operator symbol to Find_Selected_Component in
11659 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
11660 declarations are not placed after later declarations in a separate
11661 procedure in Sem_Util (possibly not the best choice?), to be used both
11662 during parsing, for Ada 83 mode, and during semantic analysis, for
11664 * par-endh.adb (Check_End): move check that end label is not missing
11665 to Process_End_Label in the semantics
11666 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
11667 the special case for SPARK restriction
11668 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
11669 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
11670 parameter Force to issue the error message even on internal node (used
11671 for generated end label). Call Check_Restriction to check when an error
11672 must be issued. In SPARK mode, issue an error message even if the
11673 restriction is not set.
11674 (Check_Restriction): new procedure with an additional out parameter to
11675 inform the caller that a message has been issued
11676 * sem_aggr.adb: Minor modification of message
11677 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
11678 instead of issuing an error message directly
11679 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
11680 declarations are not placed after later declarations, by calling
11681 Check_Later_Vs_Basic_Declarations
11682 (Analyze_Subtype_Declaration): move here the check that an index or
11683 discriminant constraint must be a subtype mark. Change the check that
11684 a subtype of String must start at one so that it works on subtype marks.
11685 * sem_ch4.adb (Analyze_Call): move here the check that a named
11686 association cannot follow a positional one in a call
11687 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
11688 instead of issuing an error message directly
11689 * sem_ch8.adb (Find_Selected_Component): move here the check that a
11690 selector name is not a character literal or an operator symbol. Move
11691 here the check that the prefix of an expanded name cannot be a
11692 subprogram or a loop statement.
11693 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
11694 procedure called from parsing and semantics to check that basic
11695 declarations are not placed after later declarations
11696 (Process_End_Label): move here the check that end label is not missing
11698 2011-08-02 Arnaud Charlet <charlet@adacore.com>
11700 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
11701 representation clause in codepeer mode, since it confuses CodePeer and
11702 does not bring useful info.
11704 2011-08-02 Ed Falis <falis@adacore.com>
11706 * init.c: initialize fp hw on MILS.
11708 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11710 * errout.adb (First_Node): for bodies, return the node itself (small
11711 optimization). For other nodes, do not check source_unit if the node
11712 comes from Standard.
11714 2011-08-02 Robert Dewar <dewar@adacore.com>
11716 * exp_ch3.adb: Minor comment additions.
11717 * sem_ch13.adb: Minor reformatting.
11719 2011-08-02 Pascal Obry <obry@adacore.com>
11721 * make.adb, makeutl.adb: Removes some superfluous directory separator.
11723 2011-08-02 Robert Dewar <dewar@adacore.com>
11725 * sem_attr.adb: Minor reformatting.
11727 2011-08-02 Robert Dewar <dewar@adacore.com>
11729 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
11730 (Has_Default_Component_Value): Removed
11731 * einfo.ads Comment updates
11732 (Has_Default_Aspect): Replaces Has_Default_Value
11733 (Has_Default_Component_Value): Removed
11735 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
11737 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
11738 (Get_Simple_Init_Val): Handle Default_Value aspect
11739 (Needs_Simple_Initialization): Handle Default_Value aspect
11740 * exp_ch3.ads: Needs_Simple_Initialization
11741 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
11742 * par-prag.adb (Pragma_Default[_Component]Value) Removed
11744 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
11745 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
11746 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
11748 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11750 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
11751 package containing iteration primitives.
11752 exp_ch5.adb (Expand_Iterator_Loop): ditto.
11754 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11756 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
11757 "of", pre-analyze expression in case it is a function call with
11758 finalization actions that must be placed ahead of the loop.
11759 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
11760 on an Ada2012 iterator, insert them ahead of the rewritten loop.
11762 2011-08-02 Geert Bosch <bosch@adacore.com>
11764 * cstand.adb (Create_Float_Types): Only consider C's long double for
11765 Long_Long_Float, in addition to double.
11767 2011-08-02 Robert Dewar <dewar@adacore.com>
11769 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
11770 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
11771 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
11772 Minor reformatting.
11774 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11776 * sem_attr.adb: handle properly 'Result when it is a prefix of an
11779 2011-08-02 Javier Miranda <miranda@adacore.com>
11781 * einfo.ads, einfo.adb
11782 (Original_Access_Type): Move this attribute to Node26 since there was
11783 an undocumented use of Node21 in E_Access_Subprogram_Type entities
11784 which causes conflicts and breaks the generation of the .NET compiler.
11785 (Interface_Name): Add missing documentation on JGNAT only uses of
11788 2011-08-02 Geert Bosch <bosch@adacore.com>
11790 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
11791 (Find_Back_End_Float_Type): Likewise
11792 (Create_Back_End_Float_Types): Likewise
11793 (Create_Float_Types): Likewise
11794 (Register_Float_Type): Likewise
11795 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
11796 Nlist and split out type selection in new local Find_Base_Type function.
11797 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
11799 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
11801 2011-08-02 Robert Dewar <dewar@adacore.com>
11803 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
11805 * opt.ads: Minor comment change.
11806 * sem_ch12.adb: Minor code reorganization.
11808 2011-08-02 Gary Dismukes <dismukes@adacore.com>
11810 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
11811 subtype's list of rep items to the list on the full subtype in the case
11812 where the lists are the same.
11814 2011-08-02 Geert Bosch <bosch@adacore.com>
11816 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
11817 using the one from System.Strings, which also deallocates all strings.
11819 2011-08-02 Geert Bosch <bosch@adacore.com>
11821 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
11823 * gcc-interface/Make-lang.in: Update dependencies.
11825 2011-08-02 Olivier Hainque <hainque@adacore.com>
11827 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
11830 2011-08-02 Javier Miranda <miranda@adacore.com>
11832 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
11833 associated with anonymous access to subprograms.
11835 2011-08-02 Geert Bosch <bosch@adacore.com>
11838 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
11839 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
11840 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
11841 (Add_Symbol_Definition): Move to switch-c.adb
11842 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
11843 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
11844 (Add_Symbol_Definition): Move to switch-c.adb.
11845 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
11847 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
11848 Move to warnsw.adb.
11849 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
11850 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
11851 Move to warnsw.adb.
11852 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
11853 (Add_Symbol_Definition): Moved from Prepcomp.
11854 * switch-c.ads: Update copyright notice. Use String_List instead of
11855 Argument_List, removing dependency on System.OS_Lib.
11857 2011-08-02 Yannick Moy <moy@adacore.com>
11859 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
11860 mode on initialization expression which does not respect SPARK
11862 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
11863 if the tree referenced by its argument represents an initialization
11864 expression in SPARK, suitable for initializing an object in an object
11867 2011-08-02 Javier Miranda <miranda@adacore.com>
11869 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
11870 internally generated access to subprogram with its associated protected
11872 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
11874 2011-08-02 Geert Bosch <bosch@adacore.com>
11876 * cstand.adb (Register_Float_Type): Print information about type to
11877 register, if the Debug_Flag_Dot_B is set.
11878 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
11879 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
11880 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
11881 with a requested precision of more than Max_Digits digits and no more
11882 than Max_Base_Digits digits, if a range specification is present and the
11883 Predefined_Float_Types list has a suitable type to derive from.
11884 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
11885 case of type completion with pragma Import
11887 (Process_Import_Predefined_Type): Processing to complete a type
11888 with pragma Import. Currently supports floating point types only.
11889 (Set_Convention_From_Pragma): Do nothing without underlying type.
11890 (Process_Convention): Guard against absence of underlying type,
11891 which may happen when importing incomplete types.
11892 (Process_Import_Or_Interface): Handle case of importing predefined
11893 types. Tweak error message.
11895 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11897 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
11898 functions to previous change. Reorganize code slightly.
11900 2011-08-02 Geert Bosch <bosch@adacore.com>
11902 * back_end.ads (Register_Type_Proc): New call back procedure type for
11903 allowing the back end to provide information about available types.
11904 (Register_Back_End_Types): New procedure to register back end types.
11905 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
11907 * cstand.adb (Back_End_Float_Types): New list for floating point types
11908 supported by the back end.
11909 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
11910 (Copy_Float_Type): New procedure to make new copies of predefined types.
11911 (Register_Float_Type): New call back procedure to populate the BEFT list
11912 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
11913 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
11914 (Create_Float_Types): New procedure to create entities for floating
11915 point types predefined in Standard, and put these and any remaining
11916 BEFTs on the Predefined_Float_Types list.
11917 * stand.ads (Predefined_Float_Types): New list for predefined floating
11918 point types that do not have declarations in package Standard.
11920 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11922 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
11923 entity node for the unit containing the parameter.
11924 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
11925 (Add_Inlined_Subprogram): Likewise.
11926 * gcc-interface/Make-lang.in: Update dependencies.
11928 2011-08-02 Thomas Quinot <quinot@adacore.com>
11930 * s-stusta.adb (Print): Make sure Pos is always initialized to a
11933 2011-08-02 Geert Bosch <bosch@adacore.com>
11935 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
11937 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11939 * sem_type.adb (Covers): Move trivial case to the top and reuse the
11940 computed value of Base_Type.
11942 2011-08-02 Yannick Moy <moy@adacore.com>
11944 * restrict.adb (Check_Restriction): issue an error for any use of
11945 class-wide, even if the No_Dispatch restriction is not set.
11946 * sem_aggr.adb: Correct typos in comments and messages in formal mode
11947 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
11948 when completing a private extension, the type named in the private part
11949 is not the same as that named in the visible part.
11950 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
11951 of an inherited primitive operations of a tagged type or type extension
11952 that returns the tagged type.
11953 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
11954 function which returns True for an implicit operation inherited by the
11955 derived type declaration for the argument type.
11956 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
11959 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11961 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
11962 Process_Bounds, to perform analysis with expansion of a range or an
11963 expression that is the iteration scheme for a loop.
11964 (Analyze_Iterator_Specification): If domain of iteration is given by a
11965 function call with a controlled result, as is the case if call returns
11966 a predefined container, ensure that finalization actions are properly
11968 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
11970 2011-08-02 Javier Miranda <miranda@adacore.com>
11972 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
11973 * gcc-interface/Make-lang.in: Update dependencies.
11975 2011-08-02 Javier Miranda <miranda@adacore.com>
11977 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
11978 determine if the analysis is performed using N or Original_Node (N).
11979 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
11980 functionality of routine Is_Variable avoids code duplication.
11981 * checks.adb (Determine_Range): Handle temporaries generated by
11982 Remove_Side_Effects.
11984 2011-08-02 Javier Miranda <miranda@adacore.com>
11986 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
11987 expansion of the condition. Required since the previous analysis was
11988 done with expansion disabled (see Resolve_Quantified_Expression) and
11989 hence checks were not inserted and record comparisons have not been
11992 2011-08-02 Ed Falis <falis@adacore.com>
11994 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
11997 2011-08-02 Bob Duff <duff@adacore.com>
11999 * opt.ads: Minor comment fix.
12001 2011-08-02 Bob Duff <duff@adacore.com>
12003 * sem_ch12.adb (Analyze_Package_Instantiation,
12004 Analyze_Subprogram_Instantiation): Turn off style checking while
12005 analyzing an instance. Whatever style checks that apply to the generic
12006 unit should apply, so it makes no sense to apply them in an instance.
12007 This was causing trouble when compiling an instance of a runtime
12008 unit that violates the -gnatyO switch.
12009 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
12010 one of the two case statements, causing spurious errors.
12012 2011-08-02 Robert Dewar <dewar@adacore.com>
12014 * uname.adb: Minor reformatting.
12015 * gnatcmd.adb: Minor reformatting.
12016 * exp_attr.adb: Minor reformatting.
12018 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12020 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
12021 No_Dispatching_Calls, do not look for the Assign primitive, because
12022 predefined primitives are not created in this case.
12024 2011-08-02 Bob Duff <duff@adacore.com>
12026 * stylesw.ads: Minor comment fixes.
12028 2011-08-02 Robert Dewar <dewar@adacore.com>
12030 * freeze.adb (Add_To_Result): New procedure.
12032 2011-08-02 Jose Ruiz <ruiz@adacore.com>
12034 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
12035 time, if the specific run-time routines for handling streams of strings
12036 are not available, use the default mechanism.
12038 2011-08-02 Arnaud Charlet <charlet@adacore.com>
12040 * s-regpat.ads: Fix typo.
12042 2011-08-02 Vincent Celier <celier@adacore.com>
12044 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
12045 not null, call it to create the in memory config project file without
12046 parsing an existing default config project file.
12048 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12050 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
12052 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12054 * sem_elim.adb: an abstract subprogram does not need an eliminate
12055 pragma for its descendant to be eliminable.
12057 2011-08-02 Ed Falis <falis@adacore.com>
12059 * init.c: revert to handling before previous checkin for VxWorks
12060 * s-intman-vxworks.adb: delete unnecessary declarations related to
12061 using Ada interrupt facilities for handling signals.
12062 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
12063 * s-intman-vxworks.ads: Import __gnat_install_handler as
12064 Initialize_Interrupts.
12065 * s-taprop-vxworks.adb: Delete Signal_Mask.
12066 (Abort_Handler): change construction of mask to unblock exception
12069 2011-08-02 Jerome Guitton <guitton@adacore.com>
12071 * a-except-2005.adb (Raise_From_Signal_Handler): Call
12072 Debug_Raise_Exception before propagation starts.
12074 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12076 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
12077 to Restriction_Check_Required.
12078 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
12079 * sem_res.adb (Resolve_Call): Likewise.
12080 * sem_attr.adb (Check_Stream_Attribute): Likewise.
12082 2011-08-02 Bob Duff <duff@adacore.com>
12084 * stylesw.ads: Update comment.
12085 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
12086 * errout.ads: Remove obsolete comment.
12088 2011-08-02 Javier Miranda <miranda@adacore.com>
12090 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
12091 (Set_Is_Safe_To_Reevaluate): new procedure.
12092 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
12093 assignment is allowed on safe-to-reevaluate variables.
12094 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
12095 temporary created to remove side effects in expressions that use
12096 the secondary stack as safe-to-reevaluate.
12097 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
12098 variables that are not true constants.
12100 2011-08-02 Robert Dewar <dewar@adacore.com>
12102 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
12103 sem_res.adb, sem_ch6.adb: Minor reformatting.
12105 2011-08-02 Jerome Guitton <guitton@adacore.com>
12107 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
12109 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12111 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
12112 not set Overridden_Operation if subprogram is an initialization
12115 2011-08-02 Yannick Moy <moy@adacore.com>
12117 * par-ch6.adb: Correct obsolete name in comments
12118 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
12119 which takes two message arguments (existing function takes one), with
12120 second message used for continuation.
12121 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
12122 block statements that originate from a source block statement, not
12123 generated block statements
12124 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
12125 symmetry with procedure case
12126 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
12127 function to issue an error in formal mode if a package specification
12128 contains more than one tagged type or type extension.
12129 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
12130 parameters matching formals of tagged types are objects (or ancestor
12131 type conversions of objects), not general expressions. Issue an error
12132 on view conversions that are not involving ancestor conversion of an
12134 (Resolve_Type_Conversion): in formal mode, issue an error on the
12135 operand of an ancestor type conversion which is not an object
12136 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
12137 procedure so that it works also for actuals of function calls
12138 (Is_Actual_Tagged_Parameter): new function which determines if its
12139 argument is an actual parameter of a formal of tagged type in a
12141 (Is_SPARK_Object_Reference): new function which determines if the tree
12142 referenced by its argument represents an object in SPARK
12144 2011-08-02 Robert Dewar <dewar@adacore.com>
12146 * sem_ch3.adb: Minor reformatting
12147 Minor comment addition
12148 Minor error msg text change
12150 2011-08-02 Javier Miranda <miranda@adacore.com>
12152 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
12153 function. Used to be more precise when we generate a variable plus one
12154 assignment to remove side effects in the evaluation of the Bound
12156 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
12157 of the bound expression to force its re-analysis and thus expand the
12158 associated transient scope (if required). Code cleanup replacing the
12159 previous code that declared the constant entity by an invocation to
12160 routine Force_Evaluation which centralizes this work in the frontend.
12162 2011-08-02 Robert Dewar <dewar@adacore.com>
12164 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
12165 (Base_Type): Now uses improved Is_Base_Type function
12166 * einfo.ads (Base_Type): Inline this function
12168 2011-08-02 Robert Dewar <dewar@adacore.com>
12170 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
12171 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
12173 2011-08-02 Arnaud Charlet <charlet@adacore.com>
12175 * gcc-interface/Make-lang.in: Update dependencies.
12176 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
12179 2011-08-02 Yannick Moy <moy@adacore.com>
12181 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
12182 non-simple expression used in delta constraint
12183 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
12184 index constraint which is not a subtype mark
12185 * par.adb: With and use Restrict
12186 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
12187 mode on component type which is not a subtype mark and default
12188 expression on component
12189 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
12190 of string which does not have a lower index bound equal to 1
12191 (Array_Type_Declaration): issue an error in formal mode on index or
12192 component type which is not a subtype mark, and on aliased keyword on
12194 (Derived_Type_Declaration): issue an error in formal mode on interface,
12195 limited or abstract type
12196 (Record_Type_Declaration): issue an error in formal mode on interface
12197 (Record_Type_Definition): issue an error in formal mode on tagged types
12198 and type extensions not declared in the specification of a library unit
12199 package; on null non-tagged record; on variant part
12201 2011-08-02 Vincent Celier <celier@adacore.com>
12203 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
12204 not declared for qualified library project when Library_Name is not
12205 declared, but Library_Dir is.
12207 2011-08-02 Robert Dewar <dewar@adacore.com>
12209 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
12210 pragmas (affects aspects [Component_]Default_Value
12211 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
12212 component type for the resolution
12214 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12216 * einfo.adb (Base_Type): Tune implementation for speed.
12218 2011-08-02 Robert Dewar <dewar@adacore.com>
12220 * freeze.adb: Minor reformatting.
12222 2011-08-02 Thomas Quinot <quinot@adacore.com>
12224 * scos.ads: Update comments.
12226 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12228 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
12229 base type, because the parent may be a subtype of a private type whose
12230 convention is established in a private part.
12232 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
12234 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
12235 statement in a block when the expansion of the return expression has
12236 created a finalization chain.
12237 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
12238 with the parent node.
12239 Add N_Extended_Return_Statement to handle the case where a transient
12240 object declaration appears in the Return_Object_Declarations list of
12241 an extended return statement.
12243 2011-08-02 Matthew Gingell <gingell@adacore.com>
12245 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
12246 unused parameter 'name'.
12248 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12250 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
12251 inherited operation, check whether its alias, which is the source
12252 operastion that it renames, has been marked eliminated.
12254 2011-08-02 Javier Miranda <miranda@adacore.com>
12256 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
12257 in-mode parameter whose type is an access type since it can be used to
12258 modify its designated object. Enforce code that handles as safe an
12259 access type that is not access-to-constant but it is the result of a
12260 previous removal of side-effects.
12261 (Remove_Side_Effects): Minor code reorganization of cases which require
12262 no action. Done to incorporate documentation on new cases uncovered
12263 working in this ticket: no action needed if this routine was invoked
12264 too early and the nodes are not yet decorated.
12265 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
12266 to routine Remove_Side_Effects by calls to Force_Evaluation since they
12267 were issued with actuals that are implicitly provided by
12270 2011-08-02 Robert Dewar <dewar@adacore.com>
12272 * sem_ch3.adb, sem_res.adb: Minor reformatting.
12274 2011-08-02 Yannick Moy <moy@adacore.com>
12276 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
12277 to issue an error in formal mode on attribute not supported in this mode
12278 (Analyze_Attribute): issue errors on standard attributes not supported
12280 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
12281 comment, and issue error in formal mode on modulus which is not a power
12283 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
12285 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
12287 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
12288 operator on modular type (except 'not').
12290 2011-08-02 Robert Dewar <dewar@adacore.com>
12292 * gnat_rm.texi: Minor reformatting.
12294 2011-08-02 Arnaud Charlet <charlet@adacore.com>
12296 * s-osinte-linux.ads: Minor comment update and reformatting.
12297 * i-cexten.ads: Make this unit pure, as for its parent.
12298 Will allow its usage in more contexts if needed.
12300 2011-08-02 Robert Dewar <dewar@adacore.com>
12302 * s-utf_32.ads: Minor comment fix.
12304 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12306 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
12307 operation of a tagged synchronized type, handle the case where the
12308 controlling argument is overloaded.
12310 2011-08-02 Yannick Moy <moy@adacore.com>
12312 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
12313 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
12314 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
12315 SPARK mode and formal verification mode on processing SPARK restriction
12316 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
12317 requiring consistency checking.
12319 2011-08-02 Robert Dewar <dewar@adacore.com>
12321 * sem_res.adb: Minor reformatting.
12323 2011-08-02 Robert Dewar <dewar@adacore.com>
12325 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
12326 a-cforse.ads: Remove unneeded with of Ada.Containers
12327 Remove commented out pragma Inline's
12328 Move specifications of new subprograms to the actual specs
12330 2011-08-02 Yannick Moy <moy@adacore.com>
12332 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
12333 a-cforse.ads: Update comments.
12335 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12337 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
12339 2011-08-02 Robert Dewar <dewar@adacore.com>
12341 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
12342 a-cforse.ads, a-cofove.ads: Minor reformatting.
12344 2011-08-02 Claire Dross <dross@adacore.com>
12346 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
12347 a-cofove.ads: Add comments.
12349 2011-08-02 Yannick Moy <moy@adacore.com>
12351 * gnat_rm.texi: Document formal containers.
12353 2011-08-02 Emmanuel Briot <briot@adacore.com>
12355 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
12356 are empty sections.
12358 2011-08-02 Robert Dewar <dewar@adacore.com>
12360 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
12363 2011-08-02 Robert Dewar <dewar@adacore.com>
12365 * aspects.adb: New aspects Default_Value and Default_Component_Value
12366 New format of Aspect_Names table checks for omitted entries
12367 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
12368 handling of boolean aspects for derived types.
12369 New aspects Default_Value and Default_Component_Value
12370 New format of Aspect_Names table checks for omitted entries
12371 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
12372 (Has_Default_Value): New flag
12373 (Has_Default_Component_Value): New flag
12374 (Has_Default_Value): New flag
12375 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
12377 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
12378 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
12379 Default_Value and Default_Component_Value
12380 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
12381 New aspects Default_Value and Default_Component_Value
12382 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
12383 * sprint.adb: Print N_Aspect_Specification node when called from gdb
12385 2011-08-02 Vincent Celier <celier@adacore.com>
12387 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
12388 inherit library kind.
12390 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12392 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
12393 Minor reformatting.
12395 2011-08-02 Robert Dewar <dewar@adacore.com>
12397 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
12399 2011-08-02 Yannick Moy <moy@adacore.com>
12401 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
12403 2011-08-02 Robert Dewar <dewar@adacore.com>
12405 * impunit.adb: Add comment.
12407 2011-08-02 Yannick Moy <moy@adacore.com>
12409 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
12410 qualification of aggregates in formal mode
12411 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
12413 (Resolve_Aggregate): complete the test that an aggregate is adequately
12414 qualified in formal mode
12416 2011-08-02 Pascal Obry <obry@adacore.com>
12418 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
12419 * mlib-prj.adb: Supress warning when compiling binder generated file.
12420 (Build_Library): Supress all warnings when compiling the binder
12423 2011-08-02 Yannick Moy <moy@adacore.com>
12425 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
12427 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
12428 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
12429 Add with/use clauses to make Check_Formal_Restriction visible
12431 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12433 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
12434 in-parameters when type of the generic formal is private in the generic
12435 spec and non-private in the body.
12437 2011-08-02 Claire Dross <dross@adacore.com>
12439 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
12440 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
12441 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
12442 * impunit.adb, Makefile.rtl: Take new files into account.
12444 2011-08-02 Robert Dewar <dewar@adacore.com>
12446 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
12447 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
12449 2011-08-02 Yannick Moy <moy@adacore.com>
12451 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
12453 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
12454 matching static array bounds, taking into account the special case of
12456 * sem_ch3.adb: Typo in comment.
12458 2011-08-02 Yannick Moy <moy@adacore.com>
12460 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
12461 which issues an error in formal mode if its argument node is originally
12463 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
12464 has a discriminant specification so that it does not include the case
12466 (Derived_Type_Declaration): move here the test that a derived type has a
12467 discriminant specification
12468 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
12469 first element of a component association before accessing its choices
12470 (presence of component association is not enough)
12471 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
12472 declaration is a library item before accessing the next element in a
12473 list, as library items are not member of lists
12474 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
12475 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
12476 Check_Formal_Restriction whenever possible.
12478 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12480 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
12481 reference when needed.
12483 2011-08-02 Bob Duff <duff@adacore.com>
12485 * gnat_ugn.texi: Fix typo.
12487 2011-08-02 Vincent Celier <celier@adacore.com>
12489 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
12490 archive file name. Do not use the full path name of archives for Open
12493 2011-08-02 Robert Dewar <dewar@adacore.com>
12495 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
12496 Analyze_Aspect_Specifications
12498 (Analyze_Aspect_Specifications): New handling for boolean aspects
12499 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
12500 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
12501 sequence for Analyze_Aspect_Specifications
12502 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
12503 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
12505 2011-08-02 Robert Dewar <dewar@adacore.com>
12507 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
12508 aspects, since these no longer exist.
12510 2011-08-02 Robert Dewar <dewar@adacore.com>
12512 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
12513 semicolon, do not try to see if there are aspects following it.
12514 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
12517 2011-08-02 Robert Dewar <dewar@adacore.com>
12519 * sem_ch8.adb, aspects.ads: Minor reformatting.
12521 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12523 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
12524 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
12526 (Analyze_Aspect_Specifications): ...here. Call above procedure.
12528 2011-08-02 Yannick Moy <moy@adacore.com>
12530 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
12531 mode on subprogram declaration outside of package specification, unless
12532 it is followed by a pragma Import
12533 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
12534 Access_Type_Declaration): issue error in formal mode on access type
12535 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
12537 (Analyze_Object_Declaration): issue error in formal mode on object
12538 declaration which does not respect SPARK restrictions
12539 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
12540 declaration which does not respect SPARK restrictions
12541 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
12542 error in formal mode on digits or delta constraint
12543 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
12544 decimal fixed point type
12545 (Derived_Type_Declaration): issue error in formal mode on derived type
12546 other than type extensions of tagged record types
12547 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
12548 with check on access definition
12549 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
12550 mode on protected definition.
12551 (Analyze_Task_Definition): issue error in formal mode on task definition
12553 2011-08-02 Robert Dewar <dewar@adacore.com>
12555 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
12557 2011-08-02 Javier Miranda <miranda@adacore.com>
12559 * sem_ch6.adb (Can_Override_Operator): New function.
12560 (Verify_Overriding_Indicator): Add missing code to check overriding
12561 indicator in operators. Fixes regression.
12562 (Check_Overriding_Indicator): Minor reformating after replacing the
12563 code that evaluates if the subprogram can override an operator by
12564 invocations to the above new function.
12566 (Write_Field26_Name): Add missing code to ensure that, following
12567 the documentation in einfo.ads, this field is not shown as attribute
12568 "Static_Initialization" on non-dispatching functions.
12570 2011-08-02 Jose Ruiz <ruiz@adacore.com>
12572 * sem_res.adb (Resolve_Call): A call to
12573 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
12574 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
12575 i.e., when the second parameter is of type Time_Span.
12577 2011-08-02 Vincent Celier <celier@adacore.com>
12579 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
12580 with an archive instead of -L<library dir> -l<library name>.
12582 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12584 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
12585 mark the base types In_Use in addition to making the operations
12588 2011-08-02 Ed Falis <falis@adacore.com>
12590 * init.c: add and setup __gnat_signal_mask for the exception signals
12591 * s-inmaop-vxworks.adb: new file.
12592 * s-intman-vxworks.adb: remove unnecessary initializations and
12594 * s-intman-vxworks.ads: remove unnecessary variable
12595 * s-taprop-vxworks.adb: simplify signal initialization
12597 2011-08-02 Robert Dewar <dewar@adacore.com>
12599 * sem_ch8.adb: Minor code reorganization, comment updates.
12601 2011-08-02 Robert Dewar <dewar@adacore.com>
12603 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
12604 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
12606 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
12607 (Matching_Static_Array_Bounds): Moved here from Sem_Res
12609 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12611 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
12612 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
12613 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
12614 use_type_clauses, to handle more efficiently use_type and use_all_type
12616 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
12617 Ada2012 Use_All_Type clause.
12618 (Use_Class_Wide_Operations): new procedure.
12620 2011-08-02 Robert Dewar <dewar@adacore.com>
12622 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
12623 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
12624 expression to expression function.
12626 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12628 * sem_ch4.adb: transform simple Ada2012 membership into equality only
12629 if types are compatible.
12631 2011-08-02 Yannick Moy <moy@adacore.com>
12633 * sem_res.adb (Matching_Static_Array_Bounds): new function which
12634 returns True if its argument array types have same dimension and same
12635 static bounds at each index.
12636 (Resolve_Actuals): issue an error in formal mode on actuals passed as
12637 OUT or IN OUT paramaters which are not view conversions in SPARK.
12638 (Resolve_Arithmetic_Op): issue an error in formal mode on
12639 multiplication or division with operands of fixed point types which are
12640 not qualified or explicitly converted.
12641 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
12642 Boolean or array type (except String) operands.
12643 (Resolve_Equality_Op): issue an error in formal mode on equality
12644 operators for array types other than String with non-matching static
12646 (Resolve_Logical_Op): issue an error in formal mode on logical operators
12647 for array types with non-matching static bounds. Factorize the code in
12648 Matching_Static_Array_Bounds.
12649 (Resolve_Qualified_Expression): issue an error in formal mode on
12650 qualified expressions for array types with non-matching static bounds.
12651 (Resolve_Type_Conversion): issue an error in formal mode on type
12652 conversion for array types with non-matching static bounds
12654 2011-08-02 Robert Dewar <dewar@adacore.com>
12656 * par-ch10.adb: Minor code reorganization (use Nkind_In).
12658 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12660 * par-ch9.adb: save location of entry for proper error message.
12662 2011-08-02 Javier Miranda <miranda@adacore.com>
12664 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
12665 (Use_Full_View) which permits this routine to climb through the
12666 ancestors using the full-view of private parents.
12667 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
12668 Use_Full_View to true in calls to Is_Ancestor.
12669 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
12670 true in call to Is_Ancestor.
12671 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
12672 Use_Full_View to true in call to Is_Ancestor.
12673 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
12674 call to Is_Ancestor.
12675 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
12676 Use_Full_View to true in calls to Is_Ancestor.
12677 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
12678 Make_Select_Specific_Data_Table, Register_Primitive,
12679 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
12680 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
12681 to true in call to Is_Ancestor.
12682 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
12683 Use_Full_View to true in calls to Is_Ancestor.
12685 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
12686 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
12688 2011-08-02 Robert Dewar <dewar@adacore.com>
12690 * gnat_rm.texi: Minor reformatting.
12691 * sem_prag.adb: Minor reformatting.
12693 2011-08-02 Tristan Gingold <gingold@adacore.com>
12695 * vms_data.ads: Add VMS qualifier for -gnateP.
12697 2011-08-02 Robert Dewar <dewar@adacore.com>
12699 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
12700 * par-ch7.adb (P_Package): Proper placement of aspects for package
12701 decl/instantiation.
12702 * par-endh.adb (Check_End): Ad Is_Sloc parameter
12703 (End_Statements): Add Is_Sloc parameterr
12704 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
12705 (Check_End): Ad Is_Sloc parameter
12706 (End_Statements): Add Is_Sloc parameterr
12708 2011-08-02 Vincent Celier <celier@adacore.com>
12710 * ug_words: Add VMS qualifier equivalent to -gnateP:
12711 /SYMBOL_PREPROCESSING.
12713 2011-08-02 Jose Ruiz <ruiz@adacore.com>
12715 * gnat-style.texi: For hexadecimal numeric literals the typical
12716 grouping of digits is 4 to represent 2 bytes.
12717 A procedure spec which is split into several lines is indented two
12720 2011-08-02 Yannick Moy <moy@adacore.com>
12722 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
12723 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
12724 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
12726 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
12727 choice in array aggregate
12728 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
12730 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
12731 positional and named aggregate for record, or others in record
12732 aggregate, or multiple choice in record aggregate
12733 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
12734 array operands to logical operations AND, OR and XOR do not have the
12735 same static lower and higher bounds
12736 * sem_ch5.adb, sinfo.ads: Correct typos in comments
12738 2011-08-01 Robert Dewar <dewar@adacore.com>
12740 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
12741 Replaces Last_Source_Node_In_Sequence.
12742 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
12743 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
12744 parens and blank in string (this was inconsistently implemented).
12746 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
12747 blank in string (this was inconsistently implemented).
12749 (Set_Global_Switches): Set formal mode switches appropriately
12750 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
12752 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
12753 call Set_Error_Msg_Lang to set "spark" as language name.
12754 * par.adb: Remove unnecessary call to set formal language for errout
12755 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
12756 appropriately and call Set_Error_Msg_Lang to set "spark" as language
12758 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
12759 calls to it, moved after resolution so that types are known
12760 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
12761 result of concatenation is not of type String
12762 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
12763 concatenation is not properly restricted
12764 * gnat_rm.texi: Add doc on pragma Spark_95.
12765 * gcc-interface/Makefile.in: Remove obsolete target pairs for
12766 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
12767 * gcc-interface/Make-lang.in: Update dependencies.
12769 2011-08-01 Javier Miranda <miranda@adacore.com>
12771 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
12772 condition that detects if the overridden operation must replace an
12775 2011-08-01 Javier Miranda <miranda@adacore.com>
12777 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
12778 code declarations inserted by Insert_Actions in each alternative of the
12779 N_Case_Expression node.
12781 2011-08-01 Robert Dewar <dewar@adacore.com>
12783 * sem_ch6.adb: Minor code reorganization.
12784 * sem_util.adb: Minor reformatting.
12786 2011-08-01 Pascal Obry <obry@adacore.com>
12788 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
12789 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
12791 2011-08-01 Yannick Moy <moy@adacore.com>
12793 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
12794 literal or operator symbol which is prefixed
12795 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
12796 mode on access attributes.
12797 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
12798 that concatenation operands are properly restricted in formal mode
12799 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
12800 Analyze_Concatenation_Operand. Issue an error in formal mode if the
12801 result of the concatenation has a type different from String.
12802 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
12803 Analyze_Quantified_Expression, Analyze_Slice,
12804 Analyze_Null): issue an error in formal mode on unsupported constructs
12806 (Analyze_Block_Statement): only issue error on source block statement
12807 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
12808 function which returns the last node in a list of nodes for which
12809 Comes_From_Source returns True, if any
12810 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
12811 Last_Source_Node_In_Sequence
12812 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
12813 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
12814 mode on unsupported constructs
12815 * sem_ch9.adb Do not return after issuing error in formal mode, as the
12816 rest of the actions may be needed later on since the error is marked as
12818 * sinfo.ads: Typos in comments.
12820 2011-08-01 Pascal Obry <obry@adacore.com>
12822 * projects.texi: Minor editing.
12824 2011-08-01 Yannick Moy <moy@adacore.com>
12826 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
12827 insertion character ~~
12828 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
12829 (Set_Error_Msg_Lang): new procedure which fixes the language for use
12830 with insertion character ~~
12831 (Set_Msg_Text): treat insertion character ~~
12832 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
12833 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
12834 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
12835 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
12836 errors related to the formal language restriction not serious
12837 (insertion character |).
12838 * par.adb (Par): set formal language for error messages if needed
12839 * sem_ch6.adb (Check_Missing_Return): take into account possible
12840 generated statements at the end of the function
12841 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
12842 enumeration value to define a new pragma SPARK_95
12843 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
12844 SPARK_Version): new type and variables to store the SPARK version
12846 (SPARK_Mode): return True when SPARK_Version is set
12847 * par-prag.adb: Correct indentation
12848 (Prag): take Pragma_SPARK_95 into account
12849 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
12852 2011-08-01 Robert Dewar <dewar@adacore.com>
12854 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
12855 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
12856 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
12858 2011-08-01 Pascal Obry <obry@adacore.com>
12860 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
12861 Target_Name to Get_Path call.
12862 (Parse_Single_Project): Likewise.
12863 (Post_Parse_Context_Clause): Likewise.
12864 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
12865 Call Initialise_Project_Path with the proper Target_Name.
12866 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
12868 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
12869 with the proper Target_Name.
12870 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
12871 Part.Parse routine.
12872 (Parse_Project_And_Apply_Config): Likewise.
12873 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
12874 This is fine as this part of the code is supporting only native
12876 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
12877 is fine as this part of the code is supporting only native compilation.
12879 2011-08-01 Yannick Moy <moy@adacore.com>
12881 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
12882 of homonym, unless the homonym is one of the cases allowed in SPARK
12883 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
12884 package declaration occurring after a body.
12886 2011-08-01 Robert Dewar <dewar@adacore.com>
12888 * checks.adb, exp_ch4.adb: Minor reformatting.
12890 2011-08-01 Javier Miranda <miranda@adacore.com>
12892 * einfo.ads (Access_Disp_Table): Fix documentation.
12893 (Dispatch_Table_Wrappers): Fix documentation.
12895 2011-08-01 Pascal Obry <obry@adacore.com>
12897 * prj-env.adb, prj-env.ads: Minor reformatting.
12899 2011-08-01 Yannick Moy <moy@adacore.com>
12901 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
12902 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
12903 procedures out of these packages.
12904 * errout.ads, errout.adb
12905 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
12906 procedures in of this package
12907 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
12908 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
12909 on misplaced later vs initial declarations, like in Ada 83
12910 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
12911 formal mode on attribute of private type whose full type declaration
12913 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
12914 package declaration inside a package specification
12915 (Analyze_Full_Type_Declaration): issue error in formal mode on
12916 controlled type or discriminant type
12917 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
12918 user-defined operator means that it should come from the source
12919 (New_Overloaded_Entity): issue error in formal mode on overloaded
12921 * sem_ch6.ads, sem_ch13.ads: typos in comments.
12923 2011-08-01 Thomas Quinot <quinot@adacore.com>
12925 * atree.adb: Minor reformatting.
12926 * checks.adb: Minor reformatting.
12928 2011-08-01 Vincent Celier <celier@adacore.com>
12930 * s-parame-vms-ia64.ads: Fix typo in comment
12932 * s-parame-vms-restrict.ads: Removed, unused.
12934 2011-08-01 Javier Miranda <miranda@adacore.com>
12937 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
12939 (Constrain_Index): Remove side effects in the evaluation of the bounds.
12940 * sem_ch3.ads, sem_ch3.adb
12941 (Is_Constant_Bound): New extended version of the subprogram that was
12942 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
12943 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
12944 * sem_aux.ads (Constant_Value): Fix typo in comment.
12945 * checks.adb (Generate_Index_Checks): New implementation which, for
12946 array objects with constant bounds, generates the runtime check
12947 referencing the bounds of the array type. For other cases this routine
12948 provides its previous behavior obtaining such values from the array
12950 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
12952 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
12953 we cannot have semantic interpretations of the new node.
12955 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12957 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
12960 2011-08-01 Arnaud Charlet <charlet@adacore.com>
12962 * sem_ch8.adb: Minor code editing.
12963 * s-vxwext.adb: Remove trailing space.
12964 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
12965 consistency with other files.
12967 2011-08-01 Thomas Quinot <quinot@adacore.com>
12969 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
12971 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12973 * par-ch10.adb: reject parameterized expressions as compilation unit.
12974 * sem_ch4.adb: handle properly conditional expression with overloaded
12975 then_clause and no else_clause.
12977 2011-08-01 Tristan Gingold <gingold@adacore.com>
12979 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
12980 like done by System.Aux_DEC.
12981 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
12983 2011-08-01 Yannick Moy <moy@adacore.com>
12985 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
12986 missing label at end of declaration (subprogram or package)
12987 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
12988 of positional and named parameter association
12989 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
12990 Error_Msg_SP which adds a prefix to the error message giving the name
12991 of the formal language analyzed
12992 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
12993 access result type in subprogram, unconstrained array as result type,.
12994 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
12996 * sem_ch8.adb: Code clean up.
12998 2011-08-01 Javier Miranda <miranda@adacore.com>
13000 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
13001 * einfo.ads (Access_Disp_Table): Fix documentation.
13002 (Dispatch_Table_Wrappers): Fix documentation.
13003 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
13004 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
13005 to enforce the documentation of this attribute.
13006 (Set_Is_Interface): Cleanup the assertion.
13007 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
13008 the Underlying_Type entity before reading attribute Access_Disp_Table.
13009 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
13010 Locate the Underlying_Type before reading attribute Access_Disp_Table.
13011 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
13012 the Underlying_Type entity before reading attribute Access_Disp_Table.
13013 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
13014 Locate the Underlying_Type entity before reading attribute
13017 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13019 * s-poosiz.ads: Additional overriding indicators.
13021 2011-08-01 Yannick Moy <moy@adacore.com>
13023 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
13025 (Analyze_Iteration_Scheme): issue error in formal mode when loop
13026 parameter specification does not include a subtype mark.
13027 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
13028 formal mode on abstract subprogram.
13029 (Analyze_Subprogram_Specification): issue error in formal mode on
13030 user-defined operator.
13031 (Process_Formals): issue error in formal mode on access parameter and
13032 default expression.
13033 * sem_ch9.adb (Analyze_Abort_Statement,
13034 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
13035 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
13036 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
13037 Analyze_Requeue, Analyze_Selective_Accept,
13038 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
13039 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
13040 issue error in formal mode on user-defined raise statement.
13042 2011-08-01 Thomas Quinot <quinot@adacore.com>
13044 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
13045 declaration being hidden when overriding an implicit inherited
13047 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
13048 (-gnats), do not complain about a source file that contains only a
13051 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13053 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
13054 variable if already set.
13056 2011-08-01 Arnaud Charlet <charlet@adacore.com>
13058 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
13059 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
13060 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
13061 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
13062 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
13063 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
13064 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
13065 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
13066 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
13067 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
13068 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
13069 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
13070 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
13071 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
13072 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
13073 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
13074 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
13075 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
13076 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
13077 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
13078 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
13079 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
13080 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
13081 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
13082 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
13083 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
13084 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
13085 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
13086 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
13087 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
13088 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
13089 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
13090 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
13091 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
13092 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
13093 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
13094 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
13095 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
13096 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
13097 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
13098 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
13099 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
13100 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
13101 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
13102 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
13103 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
13104 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
13105 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
13106 s-osinte-mingw.ads: Update to GPLv3 run-time license.
13107 Use GNAT instead of GNARL.
13109 2011-08-01 Bob Duff <duff@adacore.com>
13111 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
13112 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
13113 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
13116 2011-08-01 Yannick Moy <moy@adacore.com>
13118 * debug.adb (d.D) reverve flag for the SPARK mode
13119 (d.E) reverve flag for SPARK generation mode
13120 (d.F) reverve flag for Why generation mode
13121 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
13122 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
13123 functions which return True when the corresponding modes are set
13124 (Formal_Language): return "spark" or "alfa" when in formal verification
13126 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
13127 Error_Msg to prefix the error message with a tag giving the formal
13129 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
13130 message with a tag giving the formal language
13131 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
13133 (Analyze_Case_Statement): issue error in formal mode on case statement
13134 with a single "others" case alternative
13135 (Analyze_Exit_Statement): issue errors in formal mode on exit
13136 statements which do not respect SPARK restrictions
13137 (Analyze_Goto_Statement): issue error in formal mode on goto statement
13138 (Check_Unreachable_Code): always issue an error (not a warning) in
13139 formal mode on unreachable code (concerns both code after an infinite
13140 loop and after an unconditional jump, both not allowed in SPARK)
13141 * sem_ch6.adb (Analyze_Return_Statement): add call to
13142 Set_Return_Present for a procedure containing a return statement
13143 (already done for functions in Analyze_Function_Return)
13144 (Analyze_Function_Return): issue error in formal mode on extended
13145 return or if return is not last statement in function
13146 (Check_Missing_Return): issue error in formal mode if function does
13147 not end with return or if procedure contains a return
13148 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
13149 function to detect if there is an inner scope of its parameter S which
13152 2011-08-01 Thomas Quinot <quinot@adacore.com>
13154 * sem_ch6.ads: Minor reformatting.
13156 2011-08-01 Javier Miranda <miranda@adacore.com>
13158 * sem_util.adb (Abstract_Interface_List): Complete condition when
13159 processing private type declarations to avoid reading unavailable
13161 (Is_Synchronized_Tagged_Type): Complete condition when processing
13162 private extension declaration nodes to avoid reading unavailable
13165 2011-08-01 Thomas Quinot <quinot@adacore.com>
13167 * sem_ch3.adb: Minor reformatting.
13169 2011-08-01 Thomas Quinot <quinot@adacore.com>
13171 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
13172 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
13173 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
13174 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
13175 for VMS, instead parametrize the common implementation with
13176 System.Parameters declarations.
13178 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
13180 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
13182 2011-08-01 Tristan Gingold <gingold@adacore.com>
13184 * seh_init.c: Fix SEH handler installation on win64.
13186 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13188 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
13189 double analysis of an anonymous access to subprogram, because it can
13190 lead to improper sharing of profiles and a back-end crash.
13192 2011-08-01 Robert Dewar <dewar@adacore.com>
13194 * make.adb, sem_ch4.adb: Minor reformatting.
13195 * gcc-interface/Make-lang.in: Update dependencies.
13196 * sem_util.adb, exp_ch5.adb: Minor reformatting.
13198 2011-08-01 Arnaud Charlet <charlet@adacore.com>
13200 * gnat_rm.texi: Fix definition of Long_Integer.
13202 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13204 * exp_aggr.adb: check limit size of static aggregate unconditionally,
13205 to prevent storage exhaustion.
13206 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
13207 finalized is a function body, insert the cleanup code before the final
13208 return statement, to prevent spurious warnings.
13209 * s-pooglo.ads: add overriding indicator.
13211 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13213 * sem_ch4.adb (Operator_Check): improve error message when both a
13214 with_clause and a use_clause are needed to make operator usage legal.
13215 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
13216 determine whether a compilation unit is visible within an other,
13217 either through a with_clause in the current unit, or a with_clause in
13218 its library unit or one one of its parents.
13220 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13222 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
13223 over an arbitrary expression of an array or container type.
13224 * lib-xref.adb: clarify comment.
13226 2011-08-01 Bob Duff <duff@adacore.com>
13228 * einfo.ads: Minor reformatting.
13229 * debug.adb: Minor comment improvement.
13231 2011-08-01 Javier Miranda <miranda@adacore.com>
13233 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
13234 consider hidden subprograms as valid candidates.
13236 2011-08-01 Arnaud Charlet <charlet@adacore.com>
13238 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
13240 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
13242 * gnat_ugn.texi: Fix typo.
13244 2011-08-01 Robert Dewar <dewar@adacore.com>
13246 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
13247 lib-xref.adb: Minor reformatting
13249 2011-08-01 Gary Dismukes <dismukes@adacore.com>
13251 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
13252 when to generate a call to Move_Final_List.
13253 (Has_Controlled_Parts): Remove this function.
13255 2011-08-01 Geert Bosch <bosch@adacore.com>
13257 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
13258 "," in choice list.
13260 2011-08-01 Thomas Quinot <quinot@adacore.com>
13262 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
13263 explicit raise of a predefined exception as Comes_From_Source if the
13264 original N_Raise_Statement comes from source.
13266 2011-08-01 Robert Dewar <dewar@adacore.com>
13268 * sinfo.ads: Add comment.
13269 * sem_ch6.adb: Minor reformatting.
13271 2011-08-01 Robert Dewar <dewar@adacore.com>
13273 * freeze.adb (Freeze_Entity): Refine check for bad component size
13274 clause to avoid rejecting confirming clause when atomic/aliased present.
13276 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13278 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
13279 better determine whether an entity reference is a write.
13280 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
13282 * lib-xref.adb (Output_References): Do no suppress a read reference at
13283 the same location as an immediately preceeding modify-reference, to
13284 handle properly in-out actuals.
13286 2011-08-01 Tristan Gingold <gingold@adacore.com>
13288 * env.c (__gnat_setenv) [VMS]: Refine previous change.
13290 2011-08-01 Quentin Ochem <ochem@adacore.com>
13292 * i-cstrin.adb (New_String): Changed implementation, now uses only the
13293 heap to compute the result.
13295 2011-08-01 Robert Dewar <dewar@adacore.com>
13297 * atree.ads: Minor reformatting.
13299 2011-08-01 Emmanuel Briot <briot@adacore.com>
13301 * g-expect.adb (Get_Command_Output): Fix memory leak.
13303 2011-08-01 Geert Bosch <bosch@adacore.com>
13305 * cstand.adb (P_Float_Type): New procedure to print the definition of
13306 predefined fpt types.
13307 (P_Mixed_Name): New procedure to print a name using mixed case
13308 (Print_Standard): Use P_Float_Type for printing floating point types
13309 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
13310 precision IEEE float.
13312 2011-08-01 Thomas Quinot <quinot@adacore.com>
13314 * sem_ch3.adb: Minor reformatting.
13316 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13318 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
13319 the completion of a generic function, insert the new body rather than
13320 rewriting the original.
13322 2011-08-01 Yannick Moy <moy@adacore.com>
13324 * sinfo.ads, errout.ads: Typos in comments.
13326 2011-08-01 Robert Dewar <dewar@adacore.com>
13328 * par-endh.adb: Minor reformatting.
13330 2011-08-01 Robert Dewar <dewar@adacore.com>
13332 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
13333 (Pre_Post_Aspects): New subtype.
13334 * par-ch12.adb (P_Generic): New syntax for aspects in packages
13335 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
13336 * par-ch7.adb (P_Package): Remove Decl parameter
13337 (P_Package): Handle new syntax for aspects (before IS)
13338 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
13340 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
13341 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
13342 (P_Package): Remove Decl parameter
13343 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
13345 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
13347 * sem_util.ads, sem_util.adb (Static_Boolean): New function
13348 * sinfo.ads: Document new syntax for aspects in packages etc.
13349 * sprint.adb: Handle new syntax of aspects before IS in package
13351 2011-08-01 Thomas Quinot <quinot@adacore.com>
13353 * atree.ads: Minor reformatting.
13354 * sem_prag.adb: Minor reformatting.
13356 2011-08-01 Robert Dewar <dewar@adacore.com>
13358 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
13359 case expr alternative.
13361 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13363 * sem_ch12.adb: Fix typo.
13365 2011-08-01 Geert Bosch <bosch@adacore.com>
13367 * sem_prag.adb (Check_No_Link_Name): New procedure.
13368 (Process_Import_Or_Interface): Use Check_No_Link_Name.
13369 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
13370 instead of Standard_Long_Long_Float_Size global. Preparation for
13371 eventual removal of per type constants.
13372 * exp_util.ads (Get_Stream_Size): New function returning the stream
13373 size value of subtype E.
13374 * exp_util.adb (Get_Stream_Size): Implement new function.
13375 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
13377 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
13379 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
13381 2011-08-01 Geert Bosch <bosch@adacore.com>
13383 * cstand.adb: Fix comments.
13384 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
13385 count of arguments.
13387 2011-08-01 Robert Dewar <dewar@adacore.com>
13389 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
13391 2011-08-01 Geert Bosch <bosch@adacore.com>
13393 * atree.ads: Fix comment.
13395 2011-08-01 Robert Dewar <dewar@adacore.com>
13397 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
13398 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
13399 * par.adb: Add with for Namet.Sp.
13400 * par-tchk.adb: Minor reformatting.
13402 2011-08-01 Vincent Celier <celier@adacore.com>
13404 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
13405 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
13406 of the init procedure of a SAL.
13407 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
13410 2011-08-01 Thomas Quinot <quinot@adacore.com>
13412 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
13415 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13417 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
13419 2011-08-01 Thomas Quinot <quinot@adacore.com>
13421 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
13422 conformant with its spec (return True only for types that have
13423 an overriding Initialize primitive operation that prevents them from
13424 having preelaborable initialization).
13425 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
13426 initialization for controlled types in Ada 2005 or later mode.
13428 2011-08-01 Robert Dewar <dewar@adacore.com>
13430 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
13432 (Same_Aspect): New function.
13433 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
13434 Type_Invariant, Precondition, Postcondition.
13435 * snames.ads-tmpl: Add Name_Type_Invariant.
13437 2011-08-01 Robert Dewar <dewar@adacore.com>
13439 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
13441 (Freeze_All_Ent): Fix error in handling inherited aspects.
13442 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
13443 already analyzed, but don't skip entire processing of a declaration,
13444 that's wrong in some cases of declarations being rewritten.
13445 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
13446 Don't delay for integer, string literals
13447 Treat predicates in usual manner for delay, remove special case code,
13449 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
13450 (Build_Predicate_Function): Update saved expression in aspect
13451 (Build_Invariant_Procedure): Update saved expression in aspect
13452 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
13453 of replacement of discriminant references if the reference is simple.
13455 2011-08-01 Robert Dewar <dewar@adacore.com>
13457 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
13458 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
13459 Static_Predicate and Dynamic_Predicate.
13460 (Build_Predicate_Function): Add processing for Static_Predicate
13461 and Dynamic_Predicate.
13462 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
13463 (From_Static_Predicate): New flag
13464 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
13466 2011-08-01 Robert Dewar <dewar@adacore.com>
13468 * usage.adb: Documentation cleanup for Ada version modes in usage.
13469 * expander.adb: Minor reformatting.
13471 2011-08-01 Robert Dewar <dewar@adacore.com>
13473 * atree.ads: Minor comment fix.
13474 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
13475 a-witeio.ads, sem_prag.adb: Minor reformatting.
13477 2011-08-01 Doug Rupp <rupp@adacore.com>
13479 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
13480 pointers. Use descrip.h header file for convenience. Add some
13483 2011-08-01 Robert Dewar <dewar@adacore.com>
13485 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
13486 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
13487 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
13489 (Check_Aspect_At_End_Of_Declarations): New procedure
13490 (Analye_Aspect_Specification): Minor changes for above procedures
13491 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
13492 specification node as well.
13494 2011-08-01 Pascal Obry <obry@adacore.com>
13496 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
13497 Windows files. Use GetFilesAttributes() in this case to check for file
13498 existence instead of returning with an error code.
13500 2011-08-01 Vincent Celier <celier@adacore.com>
13502 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
13503 High is above Source length.
13505 2011-08-01 Robert Dewar <dewar@adacore.com>
13507 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
13509 2011-08-01 Robert Dewar <dewar@adacore.com>
13511 * aspects.ads (Boolean_Aspects): New subtype.
13512 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
13513 for derived types in cases where the parent type and derived type have
13515 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
13516 with aspects when parent type also has aspects.
13517 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
13518 boolean expression at this point).
13519 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
13520 accordance with final decision on the Ada 2012 feature.
13521 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
13523 2011-08-01 Matthew Heaney <heaney@adacore.com>
13525 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
13527 2011-08-01 Pascal Obry <obry@adacore.com>
13529 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
13530 Fix Replace_Slice when High is above current string size.
13531 (Replace_Slice): Fix DL computation when High is above current
13534 2011-08-01 Gary Dismukes <dismukes@adacore.com>
13536 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
13538 2011-08-01 Matthew Heaney <heaney@adacore.com>
13540 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
13543 2011-08-01 Pascal Obry <obry@adacore.com>
13545 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
13548 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13550 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
13551 access to protected subprograms in generic bodies.
13552 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
13553 protected type, indicate that the convention of the subprogram is
13554 Convention_Protected, because it may be used in subsequent declarations
13555 within the protected declaration.
13557 2011-08-01 Vincent Celier <celier@adacore.com>
13559 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
13560 and "final" procedures when the name of the library is "ada", to avoid
13561 duplicate symbols "adainit" and "adafinal" in executables.
13563 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13565 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
13566 quantified expression that appears within a postcondition and uses the
13567 Ada2012 'Result attribute.
13569 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13571 * init.c (__gnat_error_handler): Cast reason to int.
13572 (__gnat_install_handler): Explain sa_sigaction use.
13574 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
13576 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
13577 subprogram has copy-in copy-out parameters, try to promote the mode of
13578 the return type if it is passed in registers.
13580 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
13582 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
13583 left operand as addressable.
13585 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
13587 * gcc-interface/gigi.h (build_function_stub): Remove.
13588 (build_return_expr): Likewise.
13589 (convert_vms_descriptor): Declare.
13590 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
13591 (build_function_stub): Move to...
13592 * gcc-interface/utils2.c (build_return_expr): Move to...
13593 * gcc-interface/trans.c (build_function_stub): ...here.
13594 (build_return_expr): ...here.
13595 (Subprogram_Body_to_gnu): Add local variable for language_function.
13596 Disconnect the parameter attributes cache, if any, once done with it.
13597 Call end_subprog_body only after setting the end_locus.
13598 Build the stub associated with the function, if any, at the very end.
13599 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
13600 variables and streamline control flow.
13602 2011-07-23 Arnaud Charlet <charlet@adacore.com>
13605 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
13606 g-trasym-dwarf.adb.
13608 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13611 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
13612 Assign to act.sa_sigaction.
13613 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
13614 current->return_address to char * before arithmetic.
13616 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13618 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
13619 Correct argument types.
13620 Extract code from reason.
13621 (__gnat_install_handler): Assign to act.sa_sigaction.
13623 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
13625 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
13626 (GNAT1_OBJS): ...here.
13628 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
13631 * g-socthi-mingw.adb (Fill): Fix formatting.
13633 * gcc-interface/gigi.h: Move around comment.
13635 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
13638 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
13640 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
13643 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
13645 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
13647 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
13648 range comparison if Pmode is SImode.
13650 2011-07-12 Laurent GUERBY <laurent@guerby.net>
13651 Eric Botcazou <ebotcazou@adacore.com>
13653 * adadecode.c: Wrap up in extern "C" block.
13654 * adadecode.h: Likewise.
13655 * adaint.c: Likewise. Remove 'const' keyword.
13656 * adaint.h: Likewise.
13657 * argv.c: Likewise.
13658 * atree.h: Likewise.
13660 * cstreams.c: Likewise.
13662 * exit.c: Likewise.
13664 * final.c: Likewise.
13665 * init.c: Likewise.
13666 * initialize.c: Likewise.
13667 * link.c: Likewise.
13668 * namet.h: Likewise.
13669 * nlists.h: Likewise.
13670 * raise.c: Likewise.
13671 * raise.h: Likewise.
13672 * repinfo.h: Likewise.
13673 * seh_init.c: Likewise.
13674 * targext.c: Likewise.
13675 * tracebak.c: Likewise.
13676 * uintp.h: Likewise.
13677 * urealp.h: Likewise.
13678 * xeinfo.adb: Wrap up generated C code in extern "C" block.
13679 * xsinfo.adb: Likewise.
13680 * xsnamest.adb: Likewise.
13681 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
13682 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
13683 * gcc-interface/misc.c: Likewise.
13684 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
13685 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
13686 ada/targext.o here...
13687 (GNAT_ADA_OBJS): ...and not here.
13688 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
13689 (GNATBIND_OBJS): Reorder.
13691 2011-07-07 Richard Henderson <rth@redhat.com>
13693 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
13694 dwarf2out_frame_init.
13696 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
13698 * gcc-interface/misc.c (gnat_init): Tweak previous change.
13700 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13703 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
13705 2011-07-06 Richard Guenther <rguenther@suse.de>
13707 * gcc-interface/misc.c (gnat_init): Merge calls to
13708 build_common_tree_nodes and build_common_tree_nodes_2.
13709 Re-initialize boolean_false_node.
13711 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
13712 Olivier Hainque <hainque@adacore.com>
13713 Nicolas Setton <setton@adacore.com>
13715 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
13716 the type according to the ARTIFICIAL_P parameter.
13717 (create_type_decl): Likewise.
13718 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
13720 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
13722 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
13723 (gnatbind): Likewise.
13725 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13727 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
13729 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
13731 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
13732 local variable throughout. Remove useless call to Base_Type.
13733 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
13734 Take it also into account for the volatileness of the field. Set the
13735 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
13737 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
13739 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
13740 on a dereference built for a by-ref object if it has an address clause.
13742 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
13744 * einfo.ads (Address_Taken): Document use for the second argument of
13745 Asm_Input and Asm_Output attributes.
13746 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
13747 argument is an entity name, then set Address_Taken on it.
13748 <Attribute_Asm_Output>: Likewise.
13749 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
13750 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
13751 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
13752 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
13754 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
13756 PR middle-end/46500
13757 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
13759 2011-06-14 Joseph Myers <joseph@codesourcery.com>
13761 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
13762 (ada/utils.o): Update dependencies.
13763 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
13764 ../../../libcpp/libcpp.a.
13765 * gcc-interface/utils.c: Include common/common-target.h.
13766 (process_attributes): Use targetm_common.have_named_sections.
13768 2011-06-07 Richard Guenther <rguenther@suse.de>
13770 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
13773 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
13775 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
13776 TREE_THIS_NOTRAP flag.
13778 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
13780 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
13783 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
13785 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
13786 constants whose full view has discriminants specially.
13788 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
13790 * gcc-interface/utils.c: Include diagnostic.h.
13791 (gnat_write_global_declarations): Output debug information for all
13792 global type declarations before finalizing the compilation unit.
13793 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
13795 2011-05-25 Jakub Jelinek <jakub@redhat.com>
13797 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
13799 2011-05-25 Kai Tietz <ktietz@redhat.com>
13801 * adaint.c (__gnat_to_canonical_file_list_next): Use array
13802 initialization instead of const/none-const pointer assignment.
13804 2011-05-24 Joseph Myers <joseph@codesourcery.com>
13806 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
13807 $(EXTRA_GNAT1_OBJS).
13808 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
13809 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
13810 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
13811 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
13812 libcommon-target.a instead of prefix.o.
13814 2011-05-21 Joseph Myers <joseph@codesourcery.com>
13817 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
13819 2011-05-20 Joseph Myers <joseph@codesourcery.com>
13821 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
13822 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
13823 instead of version.o.
13825 2011-05-18 Kai Tietz <ktietz@redhat.com>
13827 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
13828 boolean_false_node instead of integer_zero_node.
13829 (convert_with_check): Likewise.
13830 * gcc-interface/decl.c (choices_to_gnu): Likewise.
13832 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
13834 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
13835 type of the parameter is an unconstrained array, convert the actual to
13836 the type of the formal in the In Out and Out cases as well.
13838 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
13840 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
13841 call build_function_type_array or build_varargs_function_type_array
13843 (create_subprog_type): Don't call build_function_type; call
13844 build_function_type_vec instead.
13846 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
13848 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
13849 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
13850 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
13852 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
13854 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
13856 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
13857 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
13859 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
13861 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
13863 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
13865 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
13866 instead of accessing TYPE_ARG_TYPES directly.
13867 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
13869 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
13872 * gcc-interface/gigi.h (get_variant_part): Declare.
13873 * gcc-interface/decl.c (get_variant_part): Make global.
13874 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
13875 types have the same constant size, are record types and T1 has a
13876 variant part while T2 doesn't.
13878 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
13880 * gcc-interface/utils.c (begin_subprog_body): Do not call
13882 (end_subprog_body): Likewise.
13884 2011-05-04 Richard Guenther <rguenther@suse.de>
13886 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
13888 (pos_to_constructor): Likewise.
13890 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
13891 Eric Botcazou <ebotcazou@adacore.com>
13893 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
13894 of build_function_type. Adjust calls to...
13895 (build_raise_check): ...this. Do not take a void_tree parameter.
13896 Call build_function_type_list instead of build_function_type.
13897 Fix head comment and swap couple of conditional blocks.
13899 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
13901 * gnatvsn.ads (Library_Version): Bump to 4.7.
13902 (Current_Year): Bump to 2011.
13904 2011-04-29 Michael Matz <matz@suse.de>
13906 * gcc-interface/misc.c (gnat_handle_option): Set
13907 warn_maybe_uninitialized.
13909 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
13911 * gnat_ugn.texi (Complexity Metrics Control): Update link to
13912 the Watson/McCabe paper.
13914 2011-04-23 Jim Meyering <meyering@redhat.com>
13916 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
13918 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
13920 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
13923 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
13925 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
13927 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
13928 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
13929 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
13930 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
13931 <all>: Do not set flags on the reused DECL node coming from an alias.
13932 Set DECL_IGNORED_P on the DECL node built for subprograms if they
13933 don't need debug info here...
13934 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
13935 (gigi): Adjust calls to create_subprog_decl.
13936 (build_raise_check): Likewise.
13937 (establish_gnat_vms_condition_handler): Likewise.
13938 (Compilation_Unit_to_gnu): Likewise.
13939 (gnat_to_gnu): Likewise.
13941 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
13943 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
13944 (NO_REORDER_ADAFLAGS): New variable.
13945 (EXTRA_GNATTOOLS): Always define.
13946 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
13947 Clean up and adjust list of files compiled with special options.
13948 * gcc-interface/Make-lang.in: Likewise.
13949 (ada/decl.o): Cosmetical change.
13950 (ada/misc.o): Remove dependency on $(PLUGIN_H).
13952 2011-04-20 Jim Meyering <meyering@redhat.com>
13954 * initialize.c (__gnat_initialize): Remove useless if-before-free.
13956 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
13958 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
13959 $(CFLAGS) on the link line.
13961 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
13963 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
13964 padded type built for the return type if it is unconstrained.
13966 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
13968 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
13970 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
13972 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
13973 before calling TREE_CHAIN.
13974 * gcc-interface/misc.c (gnat_init_ts): New function.
13975 (LANG_HOOKS_INIT_TS): Define.
13977 2011-04-12 Martin Jambor <mjambor@suse.cz>
13979 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
13980 instead of cgraph_node.
13982 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
13984 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
13985 alignment on fields of the RETURN type built for the Copy-In Copy-Out
13988 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
13990 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
13991 of aggregate types that contain a placeholder.
13993 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
13995 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
13997 (handle_type_generic_attribute): Likewise.
13999 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
14002 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
14004 2011-04-04 Kai Tietz <ktietz@redhat.com>
14007 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
14010 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14012 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
14013 type case, do not strip a padding type around the array type.
14015 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14017 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
14020 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14022 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
14023 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
14024 code for -feliminate-unused-debug-types.
14025 (gnat_post_options): Likewise.
14027 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14029 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
14030 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
14033 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14035 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
14036 DECL_ARTIFICIAL flag on enumeration types.
14038 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14040 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
14041 fat pointer types artificial unconditionally.
14042 <E_Array_Subtype>: Attach the base array type as a parallel type if it
14045 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14047 * gcc-interface/gigi.h (get_dummy_type): Declare.
14048 (build_dummy_unc_pointer_types): Likewise.
14049 (finish_fat_pointer_type): Likewise.
14050 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
14051 fat pointer type has been built, complete it in place.
14052 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
14053 and thin pointers. Remove useless variable.
14054 (finish_fat_pointer_type): Make global and move to...
14055 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
14056 (get_dummy_type): New function.
14057 (build_dummy_unc_pointer_types): Likewise.
14058 (gnat_pushdecl): Propage the name to the anonymous variants only.
14059 (update_pointer_to): Only adjust the pointer types in the unconstrained
14062 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14064 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
14065 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
14066 if this is a Taft amendment type and the full declaration is available.
14067 * gcc-interface/trans.c (process_type): Likewise.
14068 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
14069 (process_freeze_entity): Likewise.
14070 * gcc-interface/utils.c (dummy_global): New static variable.
14071 (gnat_write_global_declarations): If there are types declared as used
14072 at the global level, insert them in the global hash table.
14074 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14076 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
14077 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
14078 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
14080 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
14081 flag of the type accordingly.
14082 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
14084 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14086 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
14087 finalizing types when updating the pointers to the designated type.
14088 <all>: Finalize the deferred types even if we didn't defer processing
14089 of incomplete types in this invocation.
14091 2011-04-01 Olivier Hainque <hainque@adacore.com>
14092 Nicolas Setton <setton@adacore.com>
14093 Eric Botcazou <ebotcazou@adacore.com>
14095 * gcc-interface/misc.c (gnat_descriptive_type): New function.
14096 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
14098 2011-03-28 Kai Tietz <ktietz@redhat.com>
14100 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
14102 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
14103 * system-mingw.ads (System): Change ZCX_By_Default default to True.
14105 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
14107 2011-03-28 Tristan Gingold <gingold@adacore.com>
14110 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
14111 Use ada output of gnatbind.
14112 (ada/b_gnatb.adb): Ditto.
14113 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
14114 (ada.mostlyclean, ada.stage1)
14115 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
14116 (ada.stagefeedback): Adjust.
14117 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
14118 Use ada output of gnatbind.
14119 (b_gnatm.adb): Ditto.
14120 (b_gnatl.o, b_gnatm.o): New rules.
14122 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
14124 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
14125 for the padded type built to support a specified size or alignment.
14127 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
14129 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
14130 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
14131 unconditionally to the end of the unit when the designated type is
14133 <all>: Rename local variable. Attempt to un-defer types only and do it
14134 for limited_with'ed types as well.
14135 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
14136 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
14137 consistently and remove redundant call to finalize_from_with_types.
14139 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
14141 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
14142 subprograms without a previous spec declared in the same unit.
14143 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
14144 subprograms at the end of the unit instead of at the beginning.
14145 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
14146 isn't public for the special handling of non-inline functions nested
14147 inside inline external functions.
14149 2011-03-25 Jeff Law <law@redhat.com>
14151 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
14153 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
14155 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
14156 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
14157 to compute Set_Size_Depends_On_Discriminant.
14158 (Layout_Type): Call it on array types in back-end layout mode.
14159 * sem_util.adb (Requires_Transient_Scope): Return true for array
14160 types only if the size depends on the value of discriminants.
14161 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
14162 type if the RHS is a call to a function that returns an unconstrained
14163 type with default discriminant.
14165 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
14167 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
14168 non-conversion to the nominal result type at the end.
14170 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
14172 * gcc-interface/trans.c (create_temporary): New function taken from...
14173 (create_init_temporary): ...here. Call it.
14174 (call_to_gnu): Create the temporary for the return value early, if any.
14175 Create it for a function with copy-in/copy-out parameters if there is
14176 no target; in other cases of copy-in/copy-out, use another temporary.
14177 Push the new binding level lazily. Add and rename local variables.
14179 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
14181 * gcc-interface/decl.c (validate_size): Improve comments and tweak
14183 (set_rm_size): Likewise.
14185 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
14187 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
14188 for the padded type built in order to support a specified alignment.
14189 Fix incorrect formatting.
14191 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
14194 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
14196 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
14198 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
14199 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
14200 to the end of the list. Adjust recursive call. Rename local variable.
14201 If REORDER is true, reorder components of the record type.
14202 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
14203 components_to_record and adjust the parameter list.
14205 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
14207 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
14208 disabled, use the variable for bounds of loop iteration scheme.
14210 2011-03-21 Kai Tietz <ktietz@redhat.com>
14213 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
14215 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
14217 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
14218 out whether the expression is read-only. Short-circuit placeholder
14219 case and rename a couple of local variables.
14221 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
14223 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
14224 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
14225 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
14226 (convert): Deal with conversions from a smaller form type specially.
14228 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
14230 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
14231 its argument, except for the special -I- switch.
14233 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
14235 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
14238 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
14240 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
14242 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
14244 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
14246 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
14247 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
14248 instead of GNAT_FORMAL. Protect the expression against multiple uses.
14249 Do not generate the check directly, instead instantiate the template
14250 check present in the descriptor.
14251 (make_descriptor_field): Move around.
14252 (build_vms_descriptor32): Build a template check in the POINTER field.
14253 (build_vms_descriptor): Remove useless suffixes.
14254 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
14256 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
14259 * targext.c: Include target files if IN_RTS is defined.
14261 2011-01-26 Richard Guenther <rguenther@suse.de>
14264 * targext.c: Include config.h.
14265 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
14268 2011-01-04 Pascal Obry <obry@adacore.com>
14269 Eric Botcazou <ebotcazou@adacore.com>
14271 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
14273 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
14275 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
14276 end-of-case on the end label and its associated gotos, if any.
14278 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
14280 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
14281 expressions of the parameter cache within the statement group of
14282 the CICO mechanism.
14284 2011-01-04 Olivier Hainque <hainque@adacore.com>
14285 Eric Botcazou <ebotcazou@adacore.com>
14287 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
14288 (set_end_locus_from_node): New function.
14289 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
14290 make and the function end_locus.
14291 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
14292 for the elaboration subprogram.
14293 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
14294 set the end_locus of the expression as well.
14296 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
14299 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
14300 variables that are referenced in exception handlers volatile.
14304 Copyright (C) 2011 Free Software Foundation, Inc.
14306 Copying and distribution of this file, with or without modification,
14307 are permitted in any medium without royalty provided the copyright
14308 notice and this notice are preserved.
14310 * gnat_rm.texi: Ramification of pragma Eliminate documentation
14311 - fix bugs in the description of Source_Trace;
14312 - get rid of UNIT_NAME;
14314 2011-08-02 Javier Miranda <miranda@adacore.com>
14317 (Build_Dispatching_Requeue): Adding support for VM targets
14318 since we cannot directly reference the Tag entity.
14319 * exp_sel.adb (Build_K): Adding support for VM targets.
14320 (Build_S_Assignment): Adding support for VM targets.
14322 (Default_Prim_Op_Position): In VM targets do not restrict availability
14323 of predefined interface primitives to compiling in Ada 2005 mode.
14324 (Is_Predefined_Interface_Primitive): In VM targets this service is not
14325 restricted to compiling in Ada 2005 mode.
14326 (Make_VM_TSD): Generate code that declares and initializes the OSD
14327 record. Needed to support dispatching calls through synchronized
14330 (Make_Predefined_Primitive_Specs): Enable generation of predefined
14331 primitives associated with synchronized interfaces.
14332 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
14333 primitives associated with synchronized interfaces.
14335 2011-08-02 Yannick Moy <moy@adacore.com>
14337 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
14338 statements hidden in SPARK if preceded by the HIDE directive
14339 (Parse_Exception_Handlers): mark each exception handler in a sequence of
14340 exception handlers as hidden in SPARK if preceded by the HIDE directive
14341 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
14342 if starting with the HIDE directive
14343 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
14344 starting with the HIDE directive; mark the declarations in a private
14345 part as hidden in SPARK if the private part starts with the HIDE
14347 * restrict.adb, restrict.ads
14348 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
14349 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
14350 argument node belongs to a part which is hidden in SPARK
14351 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
14352 parts in SPARK; protect the possibly costly call to
14353 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
14354 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
14355 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
14356 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
14358 (Scan): recognize special comment starting with '#' and followed by
14359 SPARK keyword "hide" as a HIDE directive.
14361 2011-08-02 Yannick Moy <moy@adacore.com>
14363 * types.ads, erroutc.ads: Minor reformatting.
14365 2011-08-02 Vincent Celier <celier@adacore.com>
14367 * link.c: Add response file support for cross platforms.
14369 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14371 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
14372 in an association, set parent field of copy before partial analysis.
14373 * sem_res.adb (Resolve_Slice): create reference to itype only when
14374 expansion is enabled.
14376 2011-08-02 Yannick Moy <moy@adacore.com>
14378 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
14379 for new flag denoting which subprogram bodies are in ALFA
14380 * restrict.adb, sem_ch7.adb: Update comment
14381 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
14382 sem_ch9.adb, sem_res.adb: Add calls to
14383 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
14384 * sem_ch6.adb (Analyze_Function_Return): add calls to
14385 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
14386 middle of the body, and extended return.
14387 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
14388 False when missing return.
14389 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
14390 to True for subprograms whose spec is in ALFA. Remove later on the flag
14391 on the entity used for a subprogram body when there exists a separate
14393 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
14394 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
14395 False, otherwise do nothing.
14397 2011-08-02 Robert Dewar <dewar@adacore.com>
14399 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
14401 2011-08-02 Yannick Moy <moy@adacore.com>
14403 * sem_ch4.ads: minor formatting.
14405 2011-08-02 Yannick Moy <moy@adacore.com>
14407 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
14408 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
14409 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
14410 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
14411 opt.ads: cleanup of SPARK mode
14413 2011-08-02 Yannick Moy <moy@adacore.com>
14415 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
14417 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
14418 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
14420 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
14421 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
14422 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
14423 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
14425 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
14427 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
14428 functions whose return type is not in ALFA.
14429 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
14431 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
14432 parameter's type is not in ALFA.
14433 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
14436 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14438 * sem_ch6 (Analyze_Expression_Function): treat the function as
14439 Inline_Always, and introduce a subprogram declaration for it when it is
14441 * inline.adb (Add_Inlined_Body): recognize bodies that come from
14442 expression functions, so that the back-end can determine whether they
14443 can in fact be inlined.
14444 * sem_util.adb (Is_Expression_Function): predicate to determine whether
14445 a function body comes from an expression function.
14447 2011-08-02 Gary Dismukes <dismukes@adacore.com>
14449 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
14450 null exclusions to test Can_Never_Be_Null on the anonymous access types
14451 of the formals rather than testing the formals themselves. Exclude this
14452 check in cases where the Old_Formal is marked as a controlling formal,
14453 to avoid issuing spurious errors for bodies completing dispatching
14454 operations (due to the flag not getting set on controlling access
14455 formals in body specs).
14456 (Find_Corresponding_Spec): When checking full and subtype conformance of
14457 subprogram bodies in instances, pass Designated and E in that order, for
14458 consistency with the expected order of the formals (New_Id followed by
14461 2011-08-02 Robert Dewar <dewar@adacore.com>
14463 * sem_ch8.adb: Minor reformatting.
14465 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14467 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
14468 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
14469 primitive operations of class-wide actuals.
14471 2011-08-02 Javier Miranda <miranda@adacore.com>
14473 * exp_atag.ads, exp_atag.adb
14474 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
14475 since its value is implicitly passed in argument Typ.
14476 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
14477 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
14478 Build_Common_Dispatching_Select_Statements.
14480 2011-08-02 Robert Dewar <dewar@adacore.com>
14482 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
14483 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
14484 Minor reformatting.
14486 2011-08-02 Robert Dewar <dewar@adacore.com>
14488 * sem_res.adb: Minor reformatting.
14489 * sem_prag.adb: Minor reformatting.
14491 2011-08-02 Javier Miranda <miranda@adacore.com>
14493 * exp_atag.adb, exp_atags.ads
14494 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
14495 by the tagged type Entity. Required to use this routine in the VM
14496 targets since we do not have available the Tag entity in the VM
14499 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
14500 Ada.Tags has not been previously loaded.
14502 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
14503 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
14505 (Enclosing_Dynamic_Scope): Add missing support to handle the full
14506 view of enclosing scopes. Required to handle enclosing scopes that
14507 are synchronized types whose full view is a task type.
14509 (Build_VM_TSDs): Minor code improvement to avoid generating and
14510 analyzing lists with empty nodes.
14511 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
14512 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
14513 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
14514 (Make_Disp_Timed_Select_Body): Add support for VM targets.
14515 (Make_Select_Specific_Data_Table): Add support for VM targets.
14516 (Make_VM_TSD): Generate code to initialize the SSD structure of
14519 2011-08-02 Yannick Moy <moy@adacore.com>
14521 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
14522 cross-references section in ALI.
14523 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
14524 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
14526 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
14527 subprogram or package entity of a node
14528 (Is_Local_Reference_Type): new function returns True for references
14529 selected in local cross-references.
14530 (Lt): function extracted from Lt in Output_References
14531 (Write_Entity_Name): function extracted from Output_References
14532 (Generate_Definition): generate reference with type 'D' for definition
14533 of objects (object declaration and parameter specification), with
14534 appropriate locations and units, for use in local cross-references.
14535 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
14536 references of type 'I' for initialization in object definition.
14537 (Output_References): move part of function Lt and procedure
14538 Write_Entity_Name outside of the body. Ignore references of types 'D'
14539 and 'I' introduced for local cross-references.
14540 (Output_Local_References): new procedure to output the local
14541 cross-references sections.
14542 (Lref_Entity_Status): new array defining whether an entity is a local
14543 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
14544 with 'I' type when initialization expression is present.
14545 * get_scos.adb, get_scos.ads: Correct comments and typos
14547 2011-08-02 Javier Miranda <miranda@adacore.com>
14549 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
14551 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
14553 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
14556 2011-08-02 Vincent Celier <celier@adacore.com>
14558 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
14559 (No_Space_Img): New function
14560 (Find_Excluded_Sources): When reading from a file, record the file name
14561 and the line number for each excluded source.
14562 (Mark_Excluded_Sources): When reporting an error, if the excluded
14563 sources were read from a file, include file name and line number in
14566 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14568 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
14570 2011-08-02 Robert Dewar <dewar@adacore.com>
14572 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
14574 2011-08-02 Javier Miranda <miranda@adacore.com>
14576 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
14577 generation of TSDs to the DOTNET compiler.
14578 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
14579 generation of TSDs to the DOTNET compiler.
14581 2011-08-02 Javier Miranda <miranda@adacore.com>
14583 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
14584 record of all the tagged types declared inside library level package
14585 declarations, library level package bodies or library level subprograms.
14586 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
14587 associated with a given tagged type.
14588 (Build_VM_TSDs): New subprogram.
14589 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
14590 compilation units that are subprograms.
14591 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
14592 compilation units that are package bodies.
14593 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
14594 units that are a package declaration or a package instantiation.
14595 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
14596 reorganization to improve the error generated by the frontend when the
14597 function Ada.Tags.Secondary_Tag is not available.
14598 * rtsfind.ads (RE_Register_TSD): New runtime entity.
14599 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
14601 2011-08-02 Javier Miranda <miranda@adacore.com>
14603 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
14605 2011-08-02 Robert Dewar <dewar@adacore.com>
14607 * s-imenne.ads: Minor reformatting.
14609 2011-08-02 Robert Dewar <dewar@adacore.com>
14611 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
14612 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
14613 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
14615 2011-08-02 Robert Dewar <dewar@adacore.com>
14617 * einfo.ads (Materialize_Entity): Document this is only for renamings
14618 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
14619 required debug information in the case where we transform the object
14620 declaration into a renaming declaration.
14621 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
14623 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
14624 Materialize_Entity.
14626 2011-08-02 Robert Dewar <dewar@adacore.com>
14628 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
14629 Suppress_Init_Procs.
14630 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
14631 Suppress_Initialization/Initialization_Suppressed.
14632 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
14633 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
14634 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
14635 * sem_prag.adb: New processing for pragma Suppress_Initialization.
14637 2011-08-02 Robert Dewar <dewar@adacore.com>
14639 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
14640 Minor reformatting.
14642 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14644 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
14645 only have inheritable classwide pre/postconditions.
14647 2011-08-02 Javier Miranda <miranda@adacore.com>
14649 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
14650 * rtsfind.ads (RE_Check_TSD): New runtime entity.
14651 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
14652 checks if the external tag of a type is the same as the external tag
14653 of some other declaration.
14655 2011-08-02 Thomas Quinot <quinot@adacore.com>
14657 * s-taskin.ads: Minor reformatting.
14659 2011-08-02 Emmanuel Briot <briot@adacore.com>
14661 * g-comlin.adb (Display_Help): swap the order in which it prints the
14662 short help and the general usage.
14664 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14666 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
14667 the aspect declarations and attach them to the generic copy for
14668 subsequent analysis.
14669 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
14670 declarations of the generic tree to the new subprogram declarations.
14671 * sem_attr.adb (Check_Precondition_Postcondition): recognize
14672 conditions that apply to a subprogram instance.
14674 2011-08-02 Robert Dewar <dewar@adacore.com>
14676 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
14678 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14680 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
14681 private type with a tagged full view is not derived in the immediate
14682 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
14684 2011-08-02 Robert Dewar <dewar@adacore.com>
14686 * exp_ch4.adb: Minor reformatting.
14688 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14690 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
14691 Ada2012 iterator, the loop will be rewritten during expansion into a
14692 while loop with a cursor and an element declaration. Do not analyze the
14693 body in this case, because if the container is for indefinite types the
14694 actual subtype of the elements will only be determined when the cursor
14695 declaration is analyzed.
14697 2011-08-02 Arnaud Charlet <charlet@adacore.com>
14699 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
14700 size/alignment related attributes in CodePeer_Mode.
14702 2011-08-02 Gary Dismukes <dismukes@adacore.com>
14704 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
14705 Prepend_Element, since this can result in the operation getting the
14706 wrong slot in the full type's dispatch table if the full type has
14707 inherited operations. The incomplete type's operation will get added
14708 to the proper position in the full type's primitives
14709 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
14710 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
14711 dispatching operations, since there are cases where nonprimitive
14712 subprograms can get added to the list of incomplete dependents (such
14713 as subprograms in nested packages).
14714 * sem_ch6.adb (Process_Formals): First, remove test for being in a
14715 private part when determining whether to add a primitive with a
14716 parameter of a tagged incomplete type to the Private_Dependents list.
14717 Such primitives can also occur in the visible part, and should not have
14718 been excluded from being private dependents.
14719 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
14720 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
14721 list of a Taft-amendment incomplete type is a primitive before issuing
14722 an error that the full type must appear in the same unit. There are
14723 cases where nonprimitives can be in the list (such as subprograms in
14725 * sem_disp.adb (Derives_From): Use correct condition for checking that
14726 a formal's type is derived from the type of the corresponding formal in
14727 the parent subprogram (the condition was completely wrong). Add
14728 checking that was missing for controlling result types being derived
14729 from the result type of the parent operation.
14731 2011-08-02 Yannick Moy <moy@adacore.com>
14733 * errout.adb (First_Node): minor renaming
14734 * restrict.adb (Check_Formal_Restriction): put restriction warning on
14737 2011-08-02 Yannick Moy <moy@adacore.com>
14739 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
14740 before accessing operands.
14741 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
14742 decide whether an initialization expression respects SPARK rules, as
14743 the plain node is the expanded one. This allows for more valid warnings
14745 * gnat_rm.texi: Minor update.
14747 2011-08-02 Arnaud Charlet <charlet@adacore.com>
14749 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
14752 2011-08-02 Robert Dewar <dewar@adacore.com>
14754 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
14756 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
14758 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
14759 loop statements and the element renaming declaration with a block when
14760 the element type is controlled.
14762 2011-08-02 Yannick Moy <moy@adacore.com>
14764 * sinfo.ads: Minor formatting.
14766 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14768 * sem_aggr.adb (Add_Association): if the association has a box and no
14769 expression, use the Sloc of the aggregate itself for the new
14771 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
14774 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
14776 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
14777 When a container is provided via a function call, generate a renaming
14778 of the function result. This avoids the creation of a transient scope
14779 and the premature finalization of the container.
14780 * exp_ch7.adb (Is_Container_Cursor): Removed.
14781 (Wrap_Transient_Declaration): Remove the supression of the finalization
14782 of the list controller when the declaration denotes a container cursor,
14785 2011-08-02 Yannick Moy <moy@adacore.com>
14787 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
14788 node is from source, instead of the original node being from source.
14790 (Resolve_Array_Aggregate): refine the check for a static expression, to
14791 recognize also static ranges
14792 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
14793 Array_Type_Declaration): postpone the test for the type being a subtype
14794 mark after the type has been resolved, so that component-selection and
14795 expanded-name are discriminated.
14796 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
14797 to distinguish the case of an iteration scheme, so that an error is
14798 issed on a non-static range in SPARK except in an iteration scheme.
14799 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
14800 In_Iter_Schm = True.
14801 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
14802 user-defined operators so that they are allowed in renaming
14804 (Find_Selected_Component): refine the check for prefixing of operators
14805 so that they are allowed in renaming. Move the checks for restrictions
14806 on selector name after analysis discriminated between
14807 component-selection and expanded-name.
14808 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
14809 concatenation argument of string type if it is static.
14810 * sem_util.adb, sem_util.ads
14811 (Check_Later_Vs_Basic_Declarations): add a new function
14812 Is_Later_Declarative_Item to decice which declarations are allowed as
14813 later items, in the two different modes Ada 83 and SPARK. In the SPARK
14814 mode, add that renamings are considered as later items.
14815 (Enclosing_Package): new function to return the enclosing package
14816 (Enter_Name): correct the rule for homonyms in SPARK
14817 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
14818 from source (result of expansion) to avoid issuing wrong warnings.
14820 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14822 * errout.adb: On anything but an expression First_Node returns its
14825 2011-08-02 Pascal Obry <obry@adacore.com>
14827 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
14829 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
14831 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
14832 Set the associated loop as the related expression of internally
14834 * exp_ch7.adb (Is_Container_Cursor): New routine.
14835 (Wrap_Transient_Declaration): Supress the finalization of the list
14836 controller when the declaration denotes a container cursor.
14838 2011-08-02 Yannick Moy <moy@adacore.com>
14840 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
14842 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
14843 expression is a simple expression. This check cannot be performed in
14844 the semantics, so just drop it.
14845 (P_Index_Or_Discriminant_Constraint): move check that the index or
14846 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
14847 semantics. Other cases were previously checked in the semantics.
14848 * par-ch4.adb (P_Name): move checks that a selector name is not
14849 character literal or an operator symbol to Find_Selected_Component in
14851 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
14852 declarations are not placed after later declarations in a separate
14853 procedure in Sem_Util (possibly not the best choice?), to be used both
14854 during parsing, for Ada 83 mode, and during semantic analysis, for
14856 * par-endh.adb (Check_End): move check that end label is not missing
14857 to Process_End_Label in the semantics
14858 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
14859 the special case for SPARK restriction
14860 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
14861 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
14862 parameter Force to issue the error message even on internal node (used
14863 for generated end label). Call Check_Restriction to check when an error
14864 must be issued. In SPARK mode, issue an error message even if the
14865 restriction is not set.
14866 (Check_Restriction): new procedure with an additional out parameter to
14867 inform the caller that a message has been issued
14868 * sem_aggr.adb: Minor modification of message
14869 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
14870 instead of issuing an error message directly
14871 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
14872 declarations are not placed after later declarations, by calling
14873 Check_Later_Vs_Basic_Declarations
14874 (Analyze_Subtype_Declaration): move here the check that an index or
14875 discriminant constraint must be a subtype mark. Change the check that
14876 a subtype of String must start at one so that it works on subtype marks.
14877 * sem_ch4.adb (Analyze_Call): move here the check that a named
14878 association cannot follow a positional one in a call
14879 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
14880 instead of issuing an error message directly
14881 * sem_ch8.adb (Find_Selected_Component): move here the check that a
14882 selector name is not a character literal or an operator symbol. Move
14883 here the check that the prefix of an expanded name cannot be a
14884 subprogram or a loop statement.
14885 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
14886 procedure called from parsing and semantics to check that basic
14887 declarations are not placed after later declarations
14888 (Process_End_Label): move here the check that end label is not missing
14890 2011-08-02 Arnaud Charlet <charlet@adacore.com>
14892 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
14893 representation clause in codepeer mode, since it confuses CodePeer and
14894 does not bring useful info.
14896 2011-08-02 Ed Falis <falis@adacore.com>
14898 * init.c: initialize fp hw on MILS.
14900 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14902 * errout.adb (First_Node): for bodies, return the node itself (small
14903 optimization). For other nodes, do not check source_unit if the node
14904 comes from Standard.
14906 2011-08-02 Robert Dewar <dewar@adacore.com>
14908 * exp_ch3.adb: Minor comment additions.
14909 * sem_ch13.adb: Minor reformatting.
14911 2011-08-02 Pascal Obry <obry@adacore.com>
14913 * make.adb, makeutl.adb: Removes some superfluous directory separator.
14915 2011-08-02 Robert Dewar <dewar@adacore.com>
14917 * sem_attr.adb: Minor reformatting.
14919 2011-08-02 Robert Dewar <dewar@adacore.com>
14921 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
14922 (Has_Default_Component_Value): Removed
14923 * einfo.ads Comment updates
14924 (Has_Default_Aspect): Replaces Has_Default_Value
14925 (Has_Default_Component_Value): Removed
14927 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
14929 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
14930 (Get_Simple_Init_Val): Handle Default_Value aspect
14931 (Needs_Simple_Initialization): Handle Default_Value aspect
14932 * exp_ch3.ads: Needs_Simple_Initialization
14933 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
14934 * par-prag.adb (Pragma_Default[_Component]Value) Removed
14936 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
14937 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
14938 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
14940 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14942 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
14943 package containing iteration primitives.
14944 exp_ch5.adb (Expand_Iterator_Loop): ditto.
14946 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14948 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
14949 "of", pre-analyze expression in case it is a function call with
14950 finalization actions that must be placed ahead of the loop.
14951 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
14952 on an Ada2012 iterator, insert them ahead of the rewritten loop.
14954 2011-08-02 Geert Bosch <bosch@adacore.com>
14956 * cstand.adb (Create_Float_Types): Only consider C's long double for
14957 Long_Long_Float, in addition to double.
14959 2011-08-02 Robert Dewar <dewar@adacore.com>
14961 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
14962 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
14963 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
14964 Minor reformatting.
14966 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14968 * sem_attr.adb: handle properly 'Result when it is a prefix of an
14971 2011-08-02 Javier Miranda <miranda@adacore.com>
14973 * einfo.ads, einfo.adb
14974 (Original_Access_Type): Move this attribute to Node26 since there was
14975 an undocumented use of Node21 in E_Access_Subprogram_Type entities
14976 which causes conflicts and breaks the generation of the .NET compiler.
14977 (Interface_Name): Add missing documentation on JGNAT only uses of
14980 2011-08-02 Geert Bosch <bosch@adacore.com>
14982 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
14983 (Find_Back_End_Float_Type): Likewise
14984 (Create_Back_End_Float_Types): Likewise
14985 (Create_Float_Types): Likewise
14986 (Register_Float_Type): Likewise
14987 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
14988 Nlist and split out type selection in new local Find_Base_Type function.
14989 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
14991 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
14993 2011-08-02 Robert Dewar <dewar@adacore.com>
14995 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
14997 * opt.ads: Minor comment change.
14998 * sem_ch12.adb: Minor code reorganization.
15000 2011-08-02 Gary Dismukes <dismukes@adacore.com>
15002 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
15003 subtype's list of rep items to the list on the full subtype in the case
15004 where the lists are the same.
15006 2011-08-02 Geert Bosch <bosch@adacore.com>
15008 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
15009 using the one from System.Strings, which also deallocates all strings.
15011 2011-08-02 Geert Bosch <bosch@adacore.com>
15013 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
15015 * gcc-interface/Make-lang.in: Update dependencies.
15017 2011-08-02 Olivier Hainque <hainque@adacore.com>
15019 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
15022 2011-08-02 Javier Miranda <miranda@adacore.com>
15024 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
15025 associated with anonymous access to subprograms.
15027 2011-08-02 Geert Bosch <bosch@adacore.com>
15030 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
15031 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
15032 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
15033 (Add_Symbol_Definition): Move to switch-c.adb
15034 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
15035 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
15036 (Add_Symbol_Definition): Move to switch-c.adb.
15037 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
15039 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
15040 Move to warnsw.adb.
15041 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
15042 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
15043 Move to warnsw.adb.
15044 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
15045 (Add_Symbol_Definition): Moved from Prepcomp.
15046 * switch-c.ads: Update copyright notice. Use String_List instead of
15047 Argument_List, removing dependency on System.OS_Lib.
15049 2011-08-02 Yannick Moy <moy@adacore.com>
15051 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
15052 mode on initialization expression which does not respect SPARK
15054 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
15055 if the tree referenced by its argument represents an initialization
15056 expression in SPARK, suitable for initializing an object in an object
15059 2011-08-02 Javier Miranda <miranda@adacore.com>
15061 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
15062 internally generated access to subprogram with its associated protected
15064 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
15066 2011-08-02 Geert Bosch <bosch@adacore.com>
15068 * cstand.adb (Register_Float_Type): Print information about type to
15069 register, if the Debug_Flag_Dot_B is set.
15070 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
15071 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
15072 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
15073 with a requested precision of more than Max_Digits digits and no more
15074 than Max_Base_Digits digits, if a range specification is present and the
15075 Predefined_Float_Types list has a suitable type to derive from.
15076 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
15077 case of type completion with pragma Import
15079 (Process_Import_Predefined_Type): Processing to complete a type
15080 with pragma Import. Currently supports floating point types only.
15081 (Set_Convention_From_Pragma): Do nothing without underlying type.
15082 (Process_Convention): Guard against absence of underlying type,
15083 which may happen when importing incomplete types.
15084 (Process_Import_Or_Interface): Handle case of importing predefined
15085 types. Tweak error message.
15087 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
15089 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
15090 functions to previous change. Reorganize code slightly.
15092 2011-08-02 Geert Bosch <bosch@adacore.com>
15094 * back_end.ads (Register_Type_Proc): New call back procedure type for
15095 allowing the back end to provide information about available types.
15096 (Register_Back_End_Types): New procedure to register back end types.
15097 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
15099 * cstand.adb (Back_End_Float_Types): New list for floating point types
15100 supported by the back end.
15101 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
15102 (Copy_Float_Type): New procedure to make new copies of predefined types.
15103 (Register_Float_Type): New call back procedure to populate the BEFT list
15104 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
15105 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
15106 (Create_Float_Types): New procedure to create entities for floating
15107 point types predefined in Standard, and put these and any remaining
15108 BEFTs on the Predefined_Float_Types list.
15109 * stand.ads (Predefined_Float_Types): New list for predefined floating
15110 point types that do not have declarations in package Standard.
15112 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
15114 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
15115 entity node for the unit containing the parameter.
15116 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
15117 (Add_Inlined_Subprogram): Likewise.
15118 * gcc-interface/Make-lang.in: Update dependencies.
15120 2011-08-02 Thomas Quinot <quinot@adacore.com>
15122 * s-stusta.adb (Print): Make sure Pos is always initialized to a
15125 2011-08-02 Geert Bosch <bosch@adacore.com>
15127 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
15129 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
15131 * sem_type.adb (Covers): Move trivial case to the top and reuse the
15132 computed value of Base_Type.
15134 2011-08-02 Yannick Moy <moy@adacore.com>
15136 * restrict.adb (Check_Restriction): issue an error for any use of
15137 class-wide, even if the No_Dispatch restriction is not set.
15138 * sem_aggr.adb: Correct typos in comments and messages in formal mode
15139 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
15140 when completing a private extension, the type named in the private part
15141 is not the same as that named in the visible part.
15142 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
15143 of an inherited primitive operations of a tagged type or type extension
15144 that returns the tagged type.
15145 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
15146 function which returns True for an implicit operation inherited by the
15147 derived type declaration for the argument type.
15148 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
15151 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15153 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
15154 Process_Bounds, to perform analysis with expansion of a range or an
15155 expression that is the iteration scheme for a loop.
15156 (Analyze_Iterator_Specification): If domain of iteration is given by a
15157 function call with a controlled result, as is the case if call returns
15158 a predefined container, ensure that finalization actions are properly
15160 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
15162 2011-08-02 Javier Miranda <miranda@adacore.com>
15164 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
15165 * gcc-interface/Make-lang.in: Update dependencies.
15167 2011-08-02 Javier Miranda <miranda@adacore.com>
15169 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
15170 determine if the analysis is performed using N or Original_Node (N).
15171 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
15172 functionality of routine Is_Variable avoids code duplication.
15173 * checks.adb (Determine_Range): Handle temporaries generated by
15174 Remove_Side_Effects.
15176 2011-08-02 Javier Miranda <miranda@adacore.com>
15178 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
15179 expansion of the condition. Required since the previous analysis was
15180 done with expansion disabled (see Resolve_Quantified_Expression) and
15181 hence checks were not inserted and record comparisons have not been
15184 2011-08-02 Ed Falis <falis@adacore.com>
15186 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
15189 2011-08-02 Bob Duff <duff@adacore.com>
15191 * opt.ads: Minor comment fix.
15193 2011-08-02 Bob Duff <duff@adacore.com>
15195 * sem_ch12.adb (Analyze_Package_Instantiation,
15196 Analyze_Subprogram_Instantiation): Turn off style checking while
15197 analyzing an instance. Whatever style checks that apply to the generic
15198 unit should apply, so it makes no sense to apply them in an instance.
15199 This was causing trouble when compiling an instance of a runtime
15200 unit that violates the -gnatyO switch.
15201 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
15202 one of the two case statements, causing spurious errors.
15204 2011-08-02 Robert Dewar <dewar@adacore.com>
15206 * uname.adb: Minor reformatting.
15207 * gnatcmd.adb: Minor reformatting.
15208 * exp_attr.adb: Minor reformatting.
15210 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15212 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
15213 No_Dispatching_Calls, do not look for the Assign primitive, because
15214 predefined primitives are not created in this case.
15216 2011-08-02 Bob Duff <duff@adacore.com>
15218 * stylesw.ads: Minor comment fixes.
15220 2011-08-02 Robert Dewar <dewar@adacore.com>
15222 * freeze.adb (Add_To_Result): New procedure.
15224 2011-08-02 Jose Ruiz <ruiz@adacore.com>
15226 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
15227 time, if the specific run-time routines for handling streams of strings
15228 are not available, use the default mechanism.
15230 2011-08-02 Arnaud Charlet <charlet@adacore.com>
15232 * s-regpat.ads: Fix typo.
15234 2011-08-02 Vincent Celier <celier@adacore.com>
15236 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
15237 not null, call it to create the in memory config project file without
15238 parsing an existing default config project file.
15240 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
15242 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
15244 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15246 * sem_elim.adb: an abstract subprogram does not need an eliminate
15247 pragma for its descendant to be eliminable.
15249 2011-08-02 Ed Falis <falis@adacore.com>
15251 * init.c: revert to handling before previous checkin for VxWorks
15252 * s-intman-vxworks.adb: delete unnecessary declarations related to
15253 using Ada interrupt facilities for handling signals.
15254 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
15255 * s-intman-vxworks.ads: Import __gnat_install_handler as
15256 Initialize_Interrupts.
15257 * s-taprop-vxworks.adb: Delete Signal_Mask.
15258 (Abort_Handler): change construction of mask to unblock exception
15261 2011-08-02 Jerome Guitton <guitton@adacore.com>
15263 * a-except-2005.adb (Raise_From_Signal_Handler): Call
15264 Debug_Raise_Exception before propagation starts.
15266 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
15268 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
15269 to Restriction_Check_Required.
15270 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
15271 * sem_res.adb (Resolve_Call): Likewise.
15272 * sem_attr.adb (Check_Stream_Attribute): Likewise.
15274 2011-08-02 Bob Duff <duff@adacore.com>
15276 * stylesw.ads: Update comment.
15277 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
15278 * errout.ads: Remove obsolete comment.
15280 2011-08-02 Javier Miranda <miranda@adacore.com>
15282 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
15283 (Set_Is_Safe_To_Reevaluate): new procedure.
15284 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
15285 assignment is allowed on safe-to-reevaluate variables.
15286 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
15287 temporary created to remove side effects in expressions that use
15288 the secondary stack as safe-to-reevaluate.
15289 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
15290 variables that are not true constants.
15292 2011-08-02 Robert Dewar <dewar@adacore.com>
15294 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
15295 sem_res.adb, sem_ch6.adb: Minor reformatting.
15297 2011-08-02 Jerome Guitton <guitton@adacore.com>
15299 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
15301 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15303 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
15304 not set Overridden_Operation if subprogram is an initialization
15307 2011-08-02 Yannick Moy <moy@adacore.com>
15309 * par-ch6.adb: Correct obsolete name in comments
15310 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
15311 which takes two message arguments (existing function takes one), with
15312 second message used for continuation.
15313 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
15314 block statements that originate from a source block statement, not
15315 generated block statements
15316 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
15317 symmetry with procedure case
15318 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
15319 function to issue an error in formal mode if a package specification
15320 contains more than one tagged type or type extension.
15321 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
15322 parameters matching formals of tagged types are objects (or ancestor
15323 type conversions of objects), not general expressions. Issue an error
15324 on view conversions that are not involving ancestor conversion of an
15326 (Resolve_Type_Conversion): in formal mode, issue an error on the
15327 operand of an ancestor type conversion which is not an object
15328 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
15329 procedure so that it works also for actuals of function calls
15330 (Is_Actual_Tagged_Parameter): new function which determines if its
15331 argument is an actual parameter of a formal of tagged type in a
15333 (Is_SPARK_Object_Reference): new function which determines if the tree
15334 referenced by its argument represents an object in SPARK
15336 2011-08-02 Robert Dewar <dewar@adacore.com>
15338 * sem_ch3.adb: Minor reformatting
15339 Minor comment addition
15340 Minor error msg text change
15342 2011-08-02 Javier Miranda <miranda@adacore.com>
15344 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
15345 function. Used to be more precise when we generate a variable plus one
15346 assignment to remove side effects in the evaluation of the Bound
15348 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
15349 of the bound expression to force its re-analysis and thus expand the
15350 associated transient scope (if required). Code cleanup replacing the
15351 previous code that declared the constant entity by an invocation to
15352 routine Force_Evaluation which centralizes this work in the frontend.
15354 2011-08-02 Robert Dewar <dewar@adacore.com>
15356 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
15357 (Base_Type): Now uses improved Is_Base_Type function
15358 * einfo.ads (Base_Type): Inline this function
15360 2011-08-02 Robert Dewar <dewar@adacore.com>
15362 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
15363 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
15365 2011-08-02 Arnaud Charlet <charlet@adacore.com>
15367 * gcc-interface/Make-lang.in: Update dependencies.
15368 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
15371 2011-08-02 Yannick Moy <moy@adacore.com>
15373 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
15374 non-simple expression used in delta constraint
15375 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
15376 index constraint which is not a subtype mark
15377 * par.adb: With and use Restrict
15378 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
15379 mode on component type which is not a subtype mark and default
15380 expression on component
15381 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
15382 of string which does not have a lower index bound equal to 1
15383 (Array_Type_Declaration): issue an error in formal mode on index or
15384 component type which is not a subtype mark, and on aliased keyword on
15386 (Derived_Type_Declaration): issue an error in formal mode on interface,
15387 limited or abstract type
15388 (Record_Type_Declaration): issue an error in formal mode on interface
15389 (Record_Type_Definition): issue an error in formal mode on tagged types
15390 and type extensions not declared in the specification of a library unit
15391 package; on null non-tagged record; on variant part
15393 2011-08-02 Vincent Celier <celier@adacore.com>
15395 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
15396 not declared for qualified library project when Library_Name is not
15397 declared, but Library_Dir is.
15399 2011-08-02 Robert Dewar <dewar@adacore.com>
15401 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
15402 pragmas (affects aspects [Component_]Default_Value
15403 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
15404 component type for the resolution
15406 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
15408 * einfo.adb (Base_Type): Tune implementation for speed.
15410 2011-08-02 Robert Dewar <dewar@adacore.com>
15412 * freeze.adb: Minor reformatting.
15414 2011-08-02 Thomas Quinot <quinot@adacore.com>
15416 * scos.ads: Update comments.
15418 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15420 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
15421 base type, because the parent may be a subtype of a private type whose
15422 convention is established in a private part.
15424 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
15426 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
15427 statement in a block when the expansion of the return expression has
15428 created a finalization chain.
15429 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
15430 with the parent node.
15431 Add N_Extended_Return_Statement to handle the case where a transient
15432 object declaration appears in the Return_Object_Declarations list of
15433 an extended return statement.
15435 2011-08-02 Matthew Gingell <gingell@adacore.com>
15437 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
15438 unused parameter 'name'.
15440 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15442 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
15443 inherited operation, check whether its alias, which is the source
15444 operastion that it renames, has been marked eliminated.
15446 2011-08-02 Javier Miranda <miranda@adacore.com>
15448 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
15449 in-mode parameter whose type is an access type since it can be used to
15450 modify its designated object. Enforce code that handles as safe an
15451 access type that is not access-to-constant but it is the result of a
15452 previous removal of side-effects.
15453 (Remove_Side_Effects): Minor code reorganization of cases which require
15454 no action. Done to incorporate documentation on new cases uncovered
15455 working in this ticket: no action needed if this routine was invoked
15456 too early and the nodes are not yet decorated.
15457 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
15458 to routine Remove_Side_Effects by calls to Force_Evaluation since they
15459 were issued with actuals that are implicitly provided by
15462 2011-08-02 Robert Dewar <dewar@adacore.com>
15464 * sem_ch3.adb, sem_res.adb: Minor reformatting.
15466 2011-08-02 Yannick Moy <moy@adacore.com>
15468 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
15469 to issue an error in formal mode on attribute not supported in this mode
15470 (Analyze_Attribute): issue errors on standard attributes not supported
15472 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
15473 comment, and issue error in formal mode on modulus which is not a power
15475 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
15477 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
15479 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
15480 operator on modular type (except 'not').
15482 2011-08-02 Robert Dewar <dewar@adacore.com>
15484 * gnat_rm.texi: Minor reformatting.
15486 2011-08-02 Arnaud Charlet <charlet@adacore.com>
15488 * s-osinte-linux.ads: Minor comment update and reformatting.
15489 * i-cexten.ads: Make this unit pure, as for its parent.
15490 Will allow its usage in more contexts if needed.
15492 2011-08-02 Robert Dewar <dewar@adacore.com>
15494 * s-utf_32.ads: Minor comment fix.
15496 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15498 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
15499 operation of a tagged synchronized type, handle the case where the
15500 controlling argument is overloaded.
15502 2011-08-02 Yannick Moy <moy@adacore.com>
15504 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
15505 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
15506 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
15507 SPARK mode and formal verification mode on processing SPARK restriction
15508 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
15509 requiring consistency checking.
15511 2011-08-02 Robert Dewar <dewar@adacore.com>
15513 * sem_res.adb: Minor reformatting.
15515 2011-08-02 Robert Dewar <dewar@adacore.com>
15517 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
15518 a-cforse.ads: Remove unneeded with of Ada.Containers
15519 Remove commented out pragma Inline's
15520 Move specifications of new subprograms to the actual specs
15522 2011-08-02 Yannick Moy <moy@adacore.com>
15524 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
15525 a-cforse.ads: Update comments.
15527 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15529 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
15531 2011-08-02 Robert Dewar <dewar@adacore.com>
15533 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
15534 a-cforse.ads, a-cofove.ads: Minor reformatting.
15536 2011-08-02 Claire Dross <dross@adacore.com>
15538 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
15539 a-cofove.ads: Add comments.
15541 2011-08-02 Yannick Moy <moy@adacore.com>
15543 * gnat_rm.texi: Document formal containers.
15545 2011-08-02 Emmanuel Briot <briot@adacore.com>
15547 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
15548 are empty sections.
15550 2011-08-02 Robert Dewar <dewar@adacore.com>
15552 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
15555 2011-08-02 Robert Dewar <dewar@adacore.com>
15557 * aspects.adb: New aspects Default_Value and Default_Component_Value
15558 New format of Aspect_Names table checks for omitted entries
15559 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
15560 handling of boolean aspects for derived types.
15561 New aspects Default_Value and Default_Component_Value
15562 New format of Aspect_Names table checks for omitted entries
15563 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
15564 (Has_Default_Value): New flag
15565 (Has_Default_Component_Value): New flag
15566 (Has_Default_Value): New flag
15567 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
15569 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
15570 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
15571 Default_Value and Default_Component_Value
15572 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
15573 New aspects Default_Value and Default_Component_Value
15574 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
15575 * sprint.adb: Print N_Aspect_Specification node when called from gdb
15577 2011-08-02 Vincent Celier <celier@adacore.com>
15579 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
15580 inherit library kind.
15582 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15584 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
15585 Minor reformatting.
15587 2011-08-02 Robert Dewar <dewar@adacore.com>
15589 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
15591 2011-08-02 Yannick Moy <moy@adacore.com>
15593 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
15595 2011-08-02 Robert Dewar <dewar@adacore.com>
15597 * impunit.adb: Add comment.
15599 2011-08-02 Yannick Moy <moy@adacore.com>
15601 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
15602 qualification of aggregates in formal mode
15603 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
15605 (Resolve_Aggregate): complete the test that an aggregate is adequately
15606 qualified in formal mode
15608 2011-08-02 Pascal Obry <obry@adacore.com>
15610 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
15611 * mlib-prj.adb: Supress warning when compiling binder generated file.
15612 (Build_Library): Supress all warnings when compiling the binder
15615 2011-08-02 Yannick Moy <moy@adacore.com>
15617 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
15619 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
15620 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
15621 Add with/use clauses to make Check_Formal_Restriction visible
15623 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15625 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
15626 in-parameters when type of the generic formal is private in the generic
15627 spec and non-private in the body.
15629 2011-08-02 Claire Dross <dross@adacore.com>
15631 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
15632 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
15633 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
15634 * impunit.adb, Makefile.rtl: Take new files into account.
15636 2011-08-02 Robert Dewar <dewar@adacore.com>
15638 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
15639 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
15641 2011-08-02 Yannick Moy <moy@adacore.com>
15643 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
15645 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
15646 matching static array bounds, taking into account the special case of
15648 * sem_ch3.adb: Typo in comment.
15650 2011-08-02 Yannick Moy <moy@adacore.com>
15652 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
15653 which issues an error in formal mode if its argument node is originally
15655 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
15656 has a discriminant specification so that it does not include the case
15658 (Derived_Type_Declaration): move here the test that a derived type has a
15659 discriminant specification
15660 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
15661 first element of a component association before accessing its choices
15662 (presence of component association is not enough)
15663 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
15664 declaration is a library item before accessing the next element in a
15665 list, as library items are not member of lists
15666 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
15667 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
15668 Check_Formal_Restriction whenever possible.
15670 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15672 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
15673 reference when needed.
15675 2011-08-02 Bob Duff <duff@adacore.com>
15677 * gnat_ugn.texi: Fix typo.
15679 2011-08-02 Vincent Celier <celier@adacore.com>
15681 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
15682 archive file name. Do not use the full path name of archives for Open
15685 2011-08-02 Robert Dewar <dewar@adacore.com>
15687 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
15688 Analyze_Aspect_Specifications
15690 (Analyze_Aspect_Specifications): New handling for boolean aspects
15691 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
15692 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
15693 sequence for Analyze_Aspect_Specifications
15694 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
15695 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
15697 2011-08-02 Robert Dewar <dewar@adacore.com>
15699 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
15700 aspects, since these no longer exist.
15702 2011-08-02 Robert Dewar <dewar@adacore.com>
15704 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
15705 semicolon, do not try to see if there are aspects following it.
15706 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
15709 2011-08-02 Robert Dewar <dewar@adacore.com>
15711 * sem_ch8.adb, aspects.ads: Minor reformatting.
15713 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
15715 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
15716 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
15718 (Analyze_Aspect_Specifications): ...here. Call above procedure.
15720 2011-08-02 Yannick Moy <moy@adacore.com>
15722 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
15723 mode on subprogram declaration outside of package specification, unless
15724 it is followed by a pragma Import
15725 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
15726 Access_Type_Declaration): issue error in formal mode on access type
15727 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
15729 (Analyze_Object_Declaration): issue error in formal mode on object
15730 declaration which does not respect SPARK restrictions
15731 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
15732 declaration which does not respect SPARK restrictions
15733 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
15734 error in formal mode on digits or delta constraint
15735 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
15736 decimal fixed point type
15737 (Derived_Type_Declaration): issue error in formal mode on derived type
15738 other than type extensions of tagged record types
15739 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
15740 with check on access definition
15741 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
15742 mode on protected definition.
15743 (Analyze_Task_Definition): issue error in formal mode on task definition
15745 2011-08-02 Robert Dewar <dewar@adacore.com>
15747 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
15749 2011-08-02 Javier Miranda <miranda@adacore.com>
15751 * sem_ch6.adb (Can_Override_Operator): New function.
15752 (Verify_Overriding_Indicator): Add missing code to check overriding
15753 indicator in operators. Fixes regression.
15754 (Check_Overriding_Indicator): Minor reformating after replacing the
15755 code that evaluates if the subprogram can override an operator by
15756 invocations to the above new function.
15758 (Write_Field26_Name): Add missing code to ensure that, following
15759 the documentation in einfo.ads, this field is not shown as attribute
15760 "Static_Initialization" on non-dispatching functions.
15762 2011-08-02 Jose Ruiz <ruiz@adacore.com>
15764 * sem_res.adb (Resolve_Call): A call to
15765 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
15766 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
15767 i.e., when the second parameter is of type Time_Span.
15769 2011-08-02 Vincent Celier <celier@adacore.com>
15771 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
15772 with an archive instead of -L<library dir> -l<library name>.
15774 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15776 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
15777 mark the base types In_Use in addition to making the operations
15780 2011-08-02 Ed Falis <falis@adacore.com>
15782 * init.c: add and setup __gnat_signal_mask for the exception signals
15783 * s-inmaop-vxworks.adb: new file.
15784 * s-intman-vxworks.adb: remove unnecessary initializations and
15786 * s-intman-vxworks.ads: remove unnecessary variable
15787 * s-taprop-vxworks.adb: simplify signal initialization
15789 2011-08-02 Robert Dewar <dewar@adacore.com>
15791 * sem_ch8.adb: Minor code reorganization, comment updates.
15793 2011-08-02 Robert Dewar <dewar@adacore.com>
15795 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
15796 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
15798 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
15799 (Matching_Static_Array_Bounds): Moved here from Sem_Res
15801 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15803 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
15804 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
15805 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
15806 use_type_clauses, to handle more efficiently use_type and use_all_type
15808 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
15809 Ada2012 Use_All_Type clause.
15810 (Use_Class_Wide_Operations): new procedure.
15812 2011-08-02 Robert Dewar <dewar@adacore.com>
15814 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
15815 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
15816 expression to expression function.
15818 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15820 * sem_ch4.adb: transform simple Ada2012 membership into equality only
15821 if types are compatible.
15823 2011-08-02 Yannick Moy <moy@adacore.com>
15825 * sem_res.adb (Matching_Static_Array_Bounds): new function which
15826 returns True if its argument array types have same dimension and same
15827 static bounds at each index.
15828 (Resolve_Actuals): issue an error in formal mode on actuals passed as
15829 OUT or IN OUT paramaters which are not view conversions in SPARK.
15830 (Resolve_Arithmetic_Op): issue an error in formal mode on
15831 multiplication or division with operands of fixed point types which are
15832 not qualified or explicitly converted.
15833 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
15834 Boolean or array type (except String) operands.
15835 (Resolve_Equality_Op): issue an error in formal mode on equality
15836 operators for array types other than String with non-matching static
15838 (Resolve_Logical_Op): issue an error in formal mode on logical operators
15839 for array types with non-matching static bounds. Factorize the code in
15840 Matching_Static_Array_Bounds.
15841 (Resolve_Qualified_Expression): issue an error in formal mode on
15842 qualified expressions for array types with non-matching static bounds.
15843 (Resolve_Type_Conversion): issue an error in formal mode on type
15844 conversion for array types with non-matching static bounds
15846 2011-08-02 Robert Dewar <dewar@adacore.com>
15848 * par-ch10.adb: Minor code reorganization (use Nkind_In).
15850 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15852 * par-ch9.adb: save location of entry for proper error message.
15854 2011-08-02 Javier Miranda <miranda@adacore.com>
15856 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
15857 (Use_Full_View) which permits this routine to climb through the
15858 ancestors using the full-view of private parents.
15859 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
15860 Use_Full_View to true in calls to Is_Ancestor.
15861 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
15862 true in call to Is_Ancestor.
15863 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
15864 Use_Full_View to true in call to Is_Ancestor.
15865 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
15866 call to Is_Ancestor.
15867 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
15868 Use_Full_View to true in calls to Is_Ancestor.
15869 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
15870 Make_Select_Specific_Data_Table, Register_Primitive,
15871 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
15872 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
15873 to true in call to Is_Ancestor.
15874 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
15875 Use_Full_View to true in calls to Is_Ancestor.
15877 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
15878 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
15880 2011-08-02 Robert Dewar <dewar@adacore.com>
15882 * gnat_rm.texi: Minor reformatting.
15883 * sem_prag.adb: Minor reformatting.
15885 2011-08-02 Tristan Gingold <gingold@adacore.com>
15887 * vms_data.ads: Add VMS qualifier for -gnateP.
15889 2011-08-02 Robert Dewar <dewar@adacore.com>
15891 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
15892 * par-ch7.adb (P_Package): Proper placement of aspects for package
15893 decl/instantiation.
15894 * par-endh.adb (Check_End): Ad Is_Sloc parameter
15895 (End_Statements): Add Is_Sloc parameterr
15896 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
15897 (Check_End): Ad Is_Sloc parameter
15898 (End_Statements): Add Is_Sloc parameterr
15900 2011-08-02 Vincent Celier <celier@adacore.com>
15902 * ug_words: Add VMS qualifier equivalent to -gnateP:
15903 /SYMBOL_PREPROCESSING.
15905 2011-08-02 Jose Ruiz <ruiz@adacore.com>
15907 * gnat-style.texi: For hexadecimal numeric literals the typical
15908 grouping of digits is 4 to represent 2 bytes.
15909 A procedure spec which is split into several lines is indented two
15912 2011-08-02 Yannick Moy <moy@adacore.com>
15914 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
15915 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
15916 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
15918 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
15919 choice in array aggregate
15920 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
15922 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
15923 positional and named aggregate for record, or others in record
15924 aggregate, or multiple choice in record aggregate
15925 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
15926 array operands to logical operations AND, OR and XOR do not have the
15927 same static lower and higher bounds
15928 * sem_ch5.adb, sinfo.ads: Correct typos in comments
15930 2011-08-01 Robert Dewar <dewar@adacore.com>
15932 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
15933 Replaces Last_Source_Node_In_Sequence.
15934 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
15935 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
15936 parens and blank in string (this was inconsistently implemented).
15938 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
15939 blank in string (this was inconsistently implemented).
15941 (Set_Global_Switches): Set formal mode switches appropriately
15942 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
15944 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
15945 call Set_Error_Msg_Lang to set "spark" as language name.
15946 * par.adb: Remove unnecessary call to set formal language for errout
15947 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
15948 appropriately and call Set_Error_Msg_Lang to set "spark" as language
15950 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
15951 calls to it, moved after resolution so that types are known
15952 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
15953 result of concatenation is not of type String
15954 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
15955 concatenation is not properly restricted
15956 * gnat_rm.texi: Add doc on pragma Spark_95.
15957 * gcc-interface/Makefile.in: Remove obsolete target pairs for
15958 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
15959 * gcc-interface/Make-lang.in: Update dependencies.
15961 2011-08-01 Javier Miranda <miranda@adacore.com>
15963 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
15964 condition that detects if the overridden operation must replace an
15967 2011-08-01 Javier Miranda <miranda@adacore.com>
15969 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
15970 code declarations inserted by Insert_Actions in each alternative of the
15971 N_Case_Expression node.
15973 2011-08-01 Robert Dewar <dewar@adacore.com>
15975 * sem_ch6.adb: Minor code reorganization.
15976 * sem_util.adb: Minor reformatting.
15978 2011-08-01 Pascal Obry <obry@adacore.com>
15980 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
15981 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
15983 2011-08-01 Yannick Moy <moy@adacore.com>
15985 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
15986 literal or operator symbol which is prefixed
15987 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
15988 mode on access attributes.
15989 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
15990 that concatenation operands are properly restricted in formal mode
15991 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
15992 Analyze_Concatenation_Operand. Issue an error in formal mode if the
15993 result of the concatenation has a type different from String.
15994 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
15995 Analyze_Quantified_Expression, Analyze_Slice,
15996 Analyze_Null): issue an error in formal mode on unsupported constructs
15998 (Analyze_Block_Statement): only issue error on source block statement
15999 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
16000 function which returns the last node in a list of nodes for which
16001 Comes_From_Source returns True, if any
16002 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
16003 Last_Source_Node_In_Sequence
16004 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
16005 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
16006 mode on unsupported constructs
16007 * sem_ch9.adb Do not return after issuing error in formal mode, as the
16008 rest of the actions may be needed later on since the error is marked as
16010 * sinfo.ads: Typos in comments.
16012 2011-08-01 Pascal Obry <obry@adacore.com>
16014 * projects.texi: Minor editing.
16016 2011-08-01 Yannick Moy <moy@adacore.com>
16018 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
16019 insertion character ~~
16020 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
16021 (Set_Error_Msg_Lang): new procedure which fixes the language for use
16022 with insertion character ~~
16023 (Set_Msg_Text): treat insertion character ~~
16024 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
16025 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
16026 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
16027 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
16028 errors related to the formal language restriction not serious
16029 (insertion character |).
16030 * par.adb (Par): set formal language for error messages if needed
16031 * sem_ch6.adb (Check_Missing_Return): take into account possible
16032 generated statements at the end of the function
16033 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
16034 enumeration value to define a new pragma SPARK_95
16035 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
16036 SPARK_Version): new type and variables to store the SPARK version
16038 (SPARK_Mode): return True when SPARK_Version is set
16039 * par-prag.adb: Correct indentation
16040 (Prag): take Pragma_SPARK_95 into account
16041 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
16044 2011-08-01 Robert Dewar <dewar@adacore.com>
16046 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
16047 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
16048 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
16050 2011-08-01 Pascal Obry <obry@adacore.com>
16052 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
16053 Target_Name to Get_Path call.
16054 (Parse_Single_Project): Likewise.
16055 (Post_Parse_Context_Clause): Likewise.
16056 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
16057 Call Initialise_Project_Path with the proper Target_Name.
16058 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
16060 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
16061 with the proper Target_Name.
16062 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
16063 Part.Parse routine.
16064 (Parse_Project_And_Apply_Config): Likewise.
16065 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
16066 This is fine as this part of the code is supporting only native
16068 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
16069 is fine as this part of the code is supporting only native compilation.
16071 2011-08-01 Yannick Moy <moy@adacore.com>
16073 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
16074 of homonym, unless the homonym is one of the cases allowed in SPARK
16075 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
16076 package declaration occurring after a body.
16078 2011-08-01 Robert Dewar <dewar@adacore.com>
16080 * checks.adb, exp_ch4.adb: Minor reformatting.
16082 2011-08-01 Javier Miranda <miranda@adacore.com>
16084 * einfo.ads (Access_Disp_Table): Fix documentation.
16085 (Dispatch_Table_Wrappers): Fix documentation.
16087 2011-08-01 Pascal Obry <obry@adacore.com>
16089 * prj-env.adb, prj-env.ads: Minor reformatting.
16091 2011-08-01 Yannick Moy <moy@adacore.com>
16093 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
16094 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
16095 procedures out of these packages.
16096 * errout.ads, errout.adb
16097 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
16098 procedures in of this package
16099 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
16100 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
16101 on misplaced later vs initial declarations, like in Ada 83
16102 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
16103 formal mode on attribute of private type whose full type declaration
16105 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
16106 package declaration inside a package specification
16107 (Analyze_Full_Type_Declaration): issue error in formal mode on
16108 controlled type or discriminant type
16109 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
16110 user-defined operator means that it should come from the source
16111 (New_Overloaded_Entity): issue error in formal mode on overloaded
16113 * sem_ch6.ads, sem_ch13.ads: typos in comments.
16115 2011-08-01 Thomas Quinot <quinot@adacore.com>
16117 * atree.adb: Minor reformatting.
16118 * checks.adb: Minor reformatting.
16120 2011-08-01 Vincent Celier <celier@adacore.com>
16122 * s-parame-vms-ia64.ads: Fix typo in comment
16124 * s-parame-vms-restrict.ads: Removed, unused.
16126 2011-08-01 Javier Miranda <miranda@adacore.com>
16129 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
16131 (Constrain_Index): Remove side effects in the evaluation of the bounds.
16132 * sem_ch3.ads, sem_ch3.adb
16133 (Is_Constant_Bound): New extended version of the subprogram that was
16134 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
16135 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
16136 * sem_aux.ads (Constant_Value): Fix typo in comment.
16137 * checks.adb (Generate_Index_Checks): New implementation which, for
16138 array objects with constant bounds, generates the runtime check
16139 referencing the bounds of the array type. For other cases this routine
16140 provides its previous behavior obtaining such values from the array
16142 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
16144 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
16145 we cannot have semantic interpretations of the new node.
16147 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16149 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
16152 2011-08-01 Arnaud Charlet <charlet@adacore.com>
16154 * sem_ch8.adb: Minor code editing.
16155 * s-vxwext.adb: Remove trailing space.
16156 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
16157 consistency with other files.
16159 2011-08-01 Thomas Quinot <quinot@adacore.com>
16161 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
16163 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16165 * par-ch10.adb: reject parameterized expressions as compilation unit.
16166 * sem_ch4.adb: handle properly conditional expression with overloaded
16167 then_clause and no else_clause.
16169 2011-08-01 Tristan Gingold <gingold@adacore.com>
16171 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
16172 like done by System.Aux_DEC.
16173 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
16175 2011-08-01 Yannick Moy <moy@adacore.com>
16177 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
16178 missing label at end of declaration (subprogram or package)
16179 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
16180 of positional and named parameter association
16181 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
16182 Error_Msg_SP which adds a prefix to the error message giving the name
16183 of the formal language analyzed
16184 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
16185 access result type in subprogram, unconstrained array as result type,.
16186 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
16188 * sem_ch8.adb: Code clean up.
16190 2011-08-01 Javier Miranda <miranda@adacore.com>
16192 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
16193 * einfo.ads (Access_Disp_Table): Fix documentation.
16194 (Dispatch_Table_Wrappers): Fix documentation.
16195 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
16196 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
16197 to enforce the documentation of this attribute.
16198 (Set_Is_Interface): Cleanup the assertion.
16199 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
16200 the Underlying_Type entity before reading attribute Access_Disp_Table.
16201 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
16202 Locate the Underlying_Type before reading attribute Access_Disp_Table.
16203 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
16204 the Underlying_Type entity before reading attribute Access_Disp_Table.
16205 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
16206 Locate the Underlying_Type entity before reading attribute
16209 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16211 * s-poosiz.ads: Additional overriding indicators.
16213 2011-08-01 Yannick Moy <moy@adacore.com>
16215 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
16217 (Analyze_Iteration_Scheme): issue error in formal mode when loop
16218 parameter specification does not include a subtype mark.
16219 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
16220 formal mode on abstract subprogram.
16221 (Analyze_Subprogram_Specification): issue error in formal mode on
16222 user-defined operator.
16223 (Process_Formals): issue error in formal mode on access parameter and
16224 default expression.
16225 * sem_ch9.adb (Analyze_Abort_Statement,
16226 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
16227 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
16228 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
16229 Analyze_Requeue, Analyze_Selective_Accept,
16230 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
16231 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
16232 issue error in formal mode on user-defined raise statement.
16234 2011-08-01 Thomas Quinot <quinot@adacore.com>
16236 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
16237 declaration being hidden when overriding an implicit inherited
16239 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
16240 (-gnats), do not complain about a source file that contains only a
16243 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16245 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
16246 variable if already set.
16248 2011-08-01 Arnaud Charlet <charlet@adacore.com>
16250 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
16251 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
16252 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
16253 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
16254 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
16255 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
16256 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
16257 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
16258 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
16259 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
16260 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
16261 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
16262 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
16263 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
16264 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
16265 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
16266 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
16267 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
16268 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
16269 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
16270 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
16271 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
16272 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
16273 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
16274 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
16275 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
16276 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
16277 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
16278 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
16279 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
16280 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
16281 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
16282 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
16283 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
16284 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
16285 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
16286 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
16287 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
16288 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
16289 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
16290 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
16291 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
16292 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
16293 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
16294 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
16295 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
16296 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
16297 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
16298 s-osinte-mingw.ads: Update to GPLv3 run-time license.
16299 Use GNAT instead of GNARL.
16301 2011-08-01 Bob Duff <duff@adacore.com>
16303 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
16304 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
16305 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
16308 2011-08-01 Yannick Moy <moy@adacore.com>
16310 * debug.adb (d.D) reverve flag for the SPARK mode
16311 (d.E) reverve flag for SPARK generation mode
16312 (d.F) reverve flag for Why generation mode
16313 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
16314 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
16315 functions which return True when the corresponding modes are set
16316 (Formal_Language): return "spark" or "alfa" when in formal verification
16318 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
16319 Error_Msg to prefix the error message with a tag giving the formal
16321 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
16322 message with a tag giving the formal language
16323 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
16325 (Analyze_Case_Statement): issue error in formal mode on case statement
16326 with a single "others" case alternative
16327 (Analyze_Exit_Statement): issue errors in formal mode on exit
16328 statements which do not respect SPARK restrictions
16329 (Analyze_Goto_Statement): issue error in formal mode on goto statement
16330 (Check_Unreachable_Code): always issue an error (not a warning) in
16331 formal mode on unreachable code (concerns both code after an infinite
16332 loop and after an unconditional jump, both not allowed in SPARK)
16333 * sem_ch6.adb (Analyze_Return_Statement): add call to
16334 Set_Return_Present for a procedure containing a return statement
16335 (already done for functions in Analyze_Function_Return)
16336 (Analyze_Function_Return): issue error in formal mode on extended
16337 return or if return is not last statement in function
16338 (Check_Missing_Return): issue error in formal mode if function does
16339 not end with return or if procedure contains a return
16340 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
16341 function to detect if there is an inner scope of its parameter S which
16344 2011-08-01 Thomas Quinot <quinot@adacore.com>
16346 * sem_ch6.ads: Minor reformatting.
16348 2011-08-01 Javier Miranda <miranda@adacore.com>
16350 * sem_util.adb (Abstract_Interface_List): Complete condition when
16351 processing private type declarations to avoid reading unavailable
16353 (Is_Synchronized_Tagged_Type): Complete condition when processing
16354 private extension declaration nodes to avoid reading unavailable
16357 2011-08-01 Thomas Quinot <quinot@adacore.com>
16359 * sem_ch3.adb: Minor reformatting.
16361 2011-08-01 Thomas Quinot <quinot@adacore.com>
16363 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
16364 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
16365 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
16366 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
16367 for VMS, instead parametrize the common implementation with
16368 System.Parameters declarations.
16370 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
16372 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
16374 2011-08-01 Tristan Gingold <gingold@adacore.com>
16376 * seh_init.c: Fix SEH handler installation on win64.
16378 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16380 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
16381 double analysis of an anonymous access to subprogram, because it can
16382 lead to improper sharing of profiles and a back-end crash.
16384 2011-08-01 Robert Dewar <dewar@adacore.com>
16386 * make.adb, sem_ch4.adb: Minor reformatting.
16387 * gcc-interface/Make-lang.in: Update dependencies.
16388 * sem_util.adb, exp_ch5.adb: Minor reformatting.
16390 2011-08-01 Arnaud Charlet <charlet@adacore.com>
16392 * gnat_rm.texi: Fix definition of Long_Integer.
16394 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16396 * exp_aggr.adb: check limit size of static aggregate unconditionally,
16397 to prevent storage exhaustion.
16398 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
16399 finalized is a function body, insert the cleanup code before the final
16400 return statement, to prevent spurious warnings.
16401 * s-pooglo.ads: add overriding indicator.
16403 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16405 * sem_ch4.adb (Operator_Check): improve error message when both a
16406 with_clause and a use_clause are needed to make operator usage legal.
16407 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
16408 determine whether a compilation unit is visible within an other,
16409 either through a with_clause in the current unit, or a with_clause in
16410 its library unit or one one of its parents.
16412 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16414 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
16415 over an arbitrary expression of an array or container type.
16416 * lib-xref.adb: clarify comment.
16418 2011-08-01 Bob Duff <duff@adacore.com>
16420 * einfo.ads: Minor reformatting.
16421 * debug.adb: Minor comment improvement.
16423 2011-08-01 Javier Miranda <miranda@adacore.com>
16425 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
16426 consider hidden subprograms as valid candidates.
16428 2011-08-01 Arnaud Charlet <charlet@adacore.com>
16430 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
16432 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
16434 * gnat_ugn.texi: Fix typo.
16436 2011-08-01 Robert Dewar <dewar@adacore.com>
16438 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
16439 lib-xref.adb: Minor reformatting
16441 2011-08-01 Gary Dismukes <dismukes@adacore.com>
16443 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
16444 when to generate a call to Move_Final_List.
16445 (Has_Controlled_Parts): Remove this function.
16447 2011-08-01 Geert Bosch <bosch@adacore.com>
16449 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
16450 "," in choice list.
16452 2011-08-01 Thomas Quinot <quinot@adacore.com>
16454 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
16455 explicit raise of a predefined exception as Comes_From_Source if the
16456 original N_Raise_Statement comes from source.
16458 2011-08-01 Robert Dewar <dewar@adacore.com>
16460 * sinfo.ads: Add comment.
16461 * sem_ch6.adb: Minor reformatting.
16463 2011-08-01 Robert Dewar <dewar@adacore.com>
16465 * freeze.adb (Freeze_Entity): Refine check for bad component size
16466 clause to avoid rejecting confirming clause when atomic/aliased present.
16468 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16470 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
16471 better determine whether an entity reference is a write.
16472 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
16474 * lib-xref.adb (Output_References): Do no suppress a read reference at
16475 the same location as an immediately preceeding modify-reference, to
16476 handle properly in-out actuals.
16478 2011-08-01 Tristan Gingold <gingold@adacore.com>
16480 * env.c (__gnat_setenv) [VMS]: Refine previous change.
16482 2011-08-01 Quentin Ochem <ochem@adacore.com>
16484 * i-cstrin.adb (New_String): Changed implementation, now uses only the
16485 heap to compute the result.
16487 2011-08-01 Robert Dewar <dewar@adacore.com>
16489 * atree.ads: Minor reformatting.
16491 2011-08-01 Emmanuel Briot <briot@adacore.com>
16493 * g-expect.adb (Get_Command_Output): Fix memory leak.
16495 2011-08-01 Geert Bosch <bosch@adacore.com>
16497 * cstand.adb (P_Float_Type): New procedure to print the definition of
16498 predefined fpt types.
16499 (P_Mixed_Name): New procedure to print a name using mixed case
16500 (Print_Standard): Use P_Float_Type for printing floating point types
16501 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
16502 precision IEEE float.
16504 2011-08-01 Thomas Quinot <quinot@adacore.com>
16506 * sem_ch3.adb: Minor reformatting.
16508 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16510 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
16511 the completion of a generic function, insert the new body rather than
16512 rewriting the original.
16514 2011-08-01 Yannick Moy <moy@adacore.com>
16516 * sinfo.ads, errout.ads: Typos in comments.
16518 2011-08-01 Robert Dewar <dewar@adacore.com>
16520 * par-endh.adb: Minor reformatting.
16522 2011-08-01 Robert Dewar <dewar@adacore.com>
16524 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
16525 (Pre_Post_Aspects): New subtype.
16526 * par-ch12.adb (P_Generic): New syntax for aspects in packages
16527 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
16528 * par-ch7.adb (P_Package): Remove Decl parameter
16529 (P_Package): Handle new syntax for aspects (before IS)
16530 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
16532 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
16533 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
16534 (P_Package): Remove Decl parameter
16535 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
16537 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
16539 * sem_util.ads, sem_util.adb (Static_Boolean): New function
16540 * sinfo.ads: Document new syntax for aspects in packages etc.
16541 * sprint.adb: Handle new syntax of aspects before IS in package
16543 2011-08-01 Thomas Quinot <quinot@adacore.com>
16545 * atree.ads: Minor reformatting.
16546 * sem_prag.adb: Minor reformatting.
16548 2011-08-01 Robert Dewar <dewar@adacore.com>
16550 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
16551 case expr alternative.
16553 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16555 * sem_ch12.adb: Fix typo.
16557 2011-08-01 Geert Bosch <bosch@adacore.com>
16559 * sem_prag.adb (Check_No_Link_Name): New procedure.
16560 (Process_Import_Or_Interface): Use Check_No_Link_Name.
16561 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
16562 instead of Standard_Long_Long_Float_Size global. Preparation for
16563 eventual removal of per type constants.
16564 * exp_util.ads (Get_Stream_Size): New function returning the stream
16565 size value of subtype E.
16566 * exp_util.adb (Get_Stream_Size): Implement new function.
16567 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
16569 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
16571 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
16573 2011-08-01 Geert Bosch <bosch@adacore.com>
16575 * cstand.adb: Fix comments.
16576 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
16577 count of arguments.
16579 2011-08-01 Robert Dewar <dewar@adacore.com>
16581 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
16583 2011-08-01 Geert Bosch <bosch@adacore.com>
16585 * atree.ads: Fix comment.
16587 2011-08-01 Robert Dewar <dewar@adacore.com>
16589 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
16590 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
16591 * par.adb: Add with for Namet.Sp.
16592 * par-tchk.adb: Minor reformatting.
16594 2011-08-01 Vincent Celier <celier@adacore.com>
16596 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
16597 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
16598 of the init procedure of a SAL.
16599 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
16602 2011-08-01 Thomas Quinot <quinot@adacore.com>
16604 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
16607 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
16609 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
16611 2011-08-01 Thomas Quinot <quinot@adacore.com>
16613 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
16614 conformant with its spec (return True only for types that have
16615 an overriding Initialize primitive operation that prevents them from
16616 having preelaborable initialization).
16617 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
16618 initialization for controlled types in Ada 2005 or later mode.
16620 2011-08-01 Robert Dewar <dewar@adacore.com>
16622 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
16624 (Same_Aspect): New function.
16625 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
16626 Type_Invariant, Precondition, Postcondition.
16627 * snames.ads-tmpl: Add Name_Type_Invariant.
16629 2011-08-01 Robert Dewar <dewar@adacore.com>
16631 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
16633 (Freeze_All_Ent): Fix error in handling inherited aspects.
16634 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
16635 already analyzed, but don't skip entire processing of a declaration,
16636 that's wrong in some cases of declarations being rewritten.
16637 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
16638 Don't delay for integer, string literals
16639 Treat predicates in usual manner for delay, remove special case code,
16641 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
16642 (Build_Predicate_Function): Update saved expression in aspect
16643 (Build_Invariant_Procedure): Update saved expression in aspect
16644 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
16645 of replacement of discriminant references if the reference is simple.
16647 2011-08-01 Robert Dewar <dewar@adacore.com>
16649 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
16650 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
16651 Static_Predicate and Dynamic_Predicate.
16652 (Build_Predicate_Function): Add processing for Static_Predicate
16653 and Dynamic_Predicate.
16654 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
16655 (From_Static_Predicate): New flag
16656 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
16658 2011-08-01 Robert Dewar <dewar@adacore.com>
16660 * usage.adb: Documentation cleanup for Ada version modes in usage.
16661 * expander.adb: Minor reformatting.
16663 2011-08-01 Robert Dewar <dewar@adacore.com>
16665 * atree.ads: Minor comment fix.
16666 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
16667 a-witeio.ads, sem_prag.adb: Minor reformatting.
16669 2011-08-01 Doug Rupp <rupp@adacore.com>
16671 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
16672 pointers. Use descrip.h header file for convenience. Add some
16675 2011-08-01 Robert Dewar <dewar@adacore.com>
16677 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
16678 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
16679 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
16681 (Check_Aspect_At_End_Of_Declarations): New procedure
16682 (Analye_Aspect_Specification): Minor changes for above procedures
16683 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
16684 specification node as well.
16686 2011-08-01 Pascal Obry <obry@adacore.com>
16688 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
16689 Windows files. Use GetFilesAttributes() in this case to check for file
16690 existence instead of returning with an error code.
16692 2011-08-01 Vincent Celier <celier@adacore.com>
16694 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
16695 High is above Source length.
16697 2011-08-01 Robert Dewar <dewar@adacore.com>
16699 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
16701 2011-08-01 Robert Dewar <dewar@adacore.com>
16703 * aspects.ads (Boolean_Aspects): New subtype.
16704 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
16705 for derived types in cases where the parent type and derived type have
16707 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
16708 with aspects when parent type also has aspects.
16709 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
16710 boolean expression at this point).
16711 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
16712 accordance with final decision on the Ada 2012 feature.
16713 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
16715 2011-08-01 Matthew Heaney <heaney@adacore.com>
16717 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
16719 2011-08-01 Pascal Obry <obry@adacore.com>
16721 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
16722 Fix Replace_Slice when High is above current string size.
16723 (Replace_Slice): Fix DL computation when High is above current
16726 2011-08-01 Gary Dismukes <dismukes@adacore.com>
16728 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
16730 2011-08-01 Matthew Heaney <heaney@adacore.com>
16732 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
16735 2011-08-01 Pascal Obry <obry@adacore.com>
16737 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
16740 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16742 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
16743 access to protected subprograms in generic bodies.
16744 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
16745 protected type, indicate that the convention of the subprogram is
16746 Convention_Protected, because it may be used in subsequent declarations
16747 within the protected declaration.
16749 2011-08-01 Vincent Celier <celier@adacore.com>
16751 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
16752 and "final" procedures when the name of the library is "ada", to avoid
16753 duplicate symbols "adainit" and "adafinal" in executables.
16755 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16757 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
16758 quantified expression that appears within a postcondition and uses the
16759 Ada2012 'Result attribute.
16761 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16763 * init.c (__gnat_error_handler): Cast reason to int.
16764 (__gnat_install_handler): Explain sa_sigaction use.
16766 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
16768 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
16769 subprogram has copy-in copy-out parameters, try to promote the mode of
16770 the return type if it is passed in registers.
16772 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
16774 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
16775 left operand as addressable.
16777 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
16779 * gcc-interface/gigi.h (build_function_stub): Remove.
16780 (build_return_expr): Likewise.
16781 (convert_vms_descriptor): Declare.
16782 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
16783 (build_function_stub): Move to...
16784 * gcc-interface/utils2.c (build_return_expr): Move to...
16785 * gcc-interface/trans.c (build_function_stub): ...here.
16786 (build_return_expr): ...here.
16787 (Subprogram_Body_to_gnu): Add local variable for language_function.
16788 Disconnect the parameter attributes cache, if any, once done with it.
16789 Call end_subprog_body only after setting the end_locus.
16790 Build the stub associated with the function, if any, at the very end.
16791 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
16792 variables and streamline control flow.
16794 2011-07-23 Arnaud Charlet <charlet@adacore.com>
16797 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
16798 g-trasym-dwarf.adb.
16800 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16803 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
16804 Assign to act.sa_sigaction.
16805 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
16806 current->return_address to char * before arithmetic.
16808 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16810 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
16811 Correct argument types.
16812 Extract code from reason.
16813 (__gnat_install_handler): Assign to act.sa_sigaction.
16815 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
16817 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
16818 (GNAT1_OBJS): ...here.
16820 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
16823 * g-socthi-mingw.adb (Fill): Fix formatting.
16825 * gcc-interface/gigi.h: Move around comment.
16827 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
16830 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
16832 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
16835 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
16837 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
16839 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
16840 range comparison if Pmode is SImode.
16842 2011-07-12 Laurent GUERBY <laurent@guerby.net>
16843 Eric Botcazou <ebotcazou@adacore.com>
16845 * adadecode.c: Wrap up in extern "C" block.
16846 * adadecode.h: Likewise.
16847 * adaint.c: Likewise. Remove 'const' keyword.
16848 * adaint.h: Likewise.
16849 * argv.c: Likewise.
16850 * atree.h: Likewise.
16852 * cstreams.c: Likewise.
16854 * exit.c: Likewise.
16856 * final.c: Likewise.
16857 * init.c: Likewise.
16858 * initialize.c: Likewise.
16859 * link.c: Likewise.
16860 * namet.h: Likewise.
16861 * nlists.h: Likewise.
16862 * raise.c: Likewise.
16863 * raise.h: Likewise.
16864 * repinfo.h: Likewise.
16865 * seh_init.c: Likewise.
16866 * targext.c: Likewise.
16867 * tracebak.c: Likewise.
16868 * uintp.h: Likewise.
16869 * urealp.h: Likewise.
16870 * xeinfo.adb: Wrap up generated C code in extern "C" block.
16871 * xsinfo.adb: Likewise.
16872 * xsnamest.adb: Likewise.
16873 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
16874 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
16875 * gcc-interface/misc.c: Likewise.
16876 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
16877 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
16878 ada/targext.o here...
16879 (GNAT_ADA_OBJS): ...and not here.
16880 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
16881 (GNATBIND_OBJS): Reorder.
16883 2011-07-07 Richard Henderson <rth@redhat.com>
16885 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
16886 dwarf2out_frame_init.
16888 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
16890 * gcc-interface/misc.c (gnat_init): Tweak previous change.
16892 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16895 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
16897 2011-07-06 Richard Guenther <rguenther@suse.de>
16899 * gcc-interface/misc.c (gnat_init): Merge calls to
16900 build_common_tree_nodes and build_common_tree_nodes_2.
16901 Re-initialize boolean_false_node.
16903 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
16904 Olivier Hainque <hainque@adacore.com>
16905 Nicolas Setton <setton@adacore.com>
16907 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
16908 the type according to the ARTIFICIAL_P parameter.
16909 (create_type_decl): Likewise.
16910 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
16912 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
16914 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
16915 (gnatbind): Likewise.
16917 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16919 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
16921 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
16923 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
16924 local variable throughout. Remove useless call to Base_Type.
16925 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
16926 Take it also into account for the volatileness of the field. Set the
16927 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
16929 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
16931 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
16932 on a dereference built for a by-ref object if it has an address clause.
16934 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
16936 * einfo.ads (Address_Taken): Document use for the second argument of
16937 Asm_Input and Asm_Output attributes.
16938 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
16939 argument is an entity name, then set Address_Taken on it.
16940 <Attribute_Asm_Output>: Likewise.
16941 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
16942 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
16943 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
16944 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
16946 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
16948 PR middle-end/46500
16949 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
16951 2011-06-14 Joseph Myers <joseph@codesourcery.com>
16953 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
16954 (ada/utils.o): Update dependencies.
16955 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
16956 ../../../libcpp/libcpp.a.
16957 * gcc-interface/utils.c: Include common/common-target.h.
16958 (process_attributes): Use targetm_common.have_named_sections.
16960 2011-06-07 Richard Guenther <rguenther@suse.de>
16962 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
16965 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
16967 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
16968 TREE_THIS_NOTRAP flag.
16970 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
16972 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
16975 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
16977 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
16978 constants whose full view has discriminants specially.
16980 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
16982 * gcc-interface/utils.c: Include diagnostic.h.
16983 (gnat_write_global_declarations): Output debug information for all
16984 global type declarations before finalizing the compilation unit.
16985 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
16987 2011-05-25 Jakub Jelinek <jakub@redhat.com>
16989 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
16991 2011-05-25 Kai Tietz <ktietz@redhat.com>
16993 * adaint.c (__gnat_to_canonical_file_list_next): Use array
16994 initialization instead of const/none-const pointer assignment.
16996 2011-05-24 Joseph Myers <joseph@codesourcery.com>
16998 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
16999 $(EXTRA_GNAT1_OBJS).
17000 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
17001 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
17002 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
17003 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
17004 libcommon-target.a instead of prefix.o.
17006 2011-05-21 Joseph Myers <joseph@codesourcery.com>
17009 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
17011 2011-05-20 Joseph Myers <joseph@codesourcery.com>
17013 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
17014 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
17015 instead of version.o.
17017 2011-05-18 Kai Tietz <ktietz@redhat.com>
17019 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
17020 boolean_false_node instead of integer_zero_node.
17021 (convert_with_check): Likewise.
17022 * gcc-interface/decl.c (choices_to_gnu): Likewise.
17024 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
17026 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
17027 type of the parameter is an unconstrained array, convert the actual to
17028 the type of the formal in the In Out and Out cases as well.
17030 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
17032 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
17033 call build_function_type_array or build_varargs_function_type_array
17035 (create_subprog_type): Don't call build_function_type; call
17036 build_function_type_vec instead.
17038 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
17040 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
17041 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
17042 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
17044 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
17046 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
17048 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
17049 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
17051 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
17053 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
17055 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
17057 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
17058 instead of accessing TYPE_ARG_TYPES directly.
17059 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
17061 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
17064 * gcc-interface/gigi.h (get_variant_part): Declare.
17065 * gcc-interface/decl.c (get_variant_part): Make global.
17066 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
17067 types have the same constant size, are record types and T1 has a
17068 variant part while T2 doesn't.
17070 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
17072 * gcc-interface/utils.c (begin_subprog_body): Do not call
17074 (end_subprog_body): Likewise.
17076 2011-05-04 Richard Guenther <rguenther@suse.de>
17078 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
17080 (pos_to_constructor): Likewise.
17082 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
17083 Eric Botcazou <ebotcazou@adacore.com>
17085 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
17086 of build_function_type. Adjust calls to...
17087 (build_raise_check): ...this. Do not take a void_tree parameter.
17088 Call build_function_type_list instead of build_function_type.
17089 Fix head comment and swap couple of conditional blocks.
17091 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
17093 * gnatvsn.ads (Library_Version): Bump to 4.7.
17094 (Current_Year): Bump to 2011.
17096 2011-04-29 Michael Matz <matz@suse.de>
17098 * gcc-interface/misc.c (gnat_handle_option): Set
17099 warn_maybe_uninitialized.
17101 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
17103 * gnat_ugn.texi (Complexity Metrics Control): Update link to
17104 the Watson/McCabe paper.
17106 2011-04-23 Jim Meyering <meyering@redhat.com>
17108 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
17110 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
17112 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
17115 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
17117 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
17119 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
17120 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
17121 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
17122 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
17123 <all>: Do not set flags on the reused DECL node coming from an alias.
17124 Set DECL_IGNORED_P on the DECL node built for subprograms if they
17125 don't need debug info here...
17126 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
17127 (gigi): Adjust calls to create_subprog_decl.
17128 (build_raise_check): Likewise.
17129 (establish_gnat_vms_condition_handler): Likewise.
17130 (Compilation_Unit_to_gnu): Likewise.
17131 (gnat_to_gnu): Likewise.
17133 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
17135 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
17136 (NO_REORDER_ADAFLAGS): New variable.
17137 (EXTRA_GNATTOOLS): Always define.
17138 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
17139 Clean up and adjust list of files compiled with special options.
17140 * gcc-interface/Make-lang.in: Likewise.
17141 (ada/decl.o): Cosmetical change.
17142 (ada/misc.o): Remove dependency on $(PLUGIN_H).
17144 2011-04-20 Jim Meyering <meyering@redhat.com>
17146 * initialize.c (__gnat_initialize): Remove useless if-before-free.
17148 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
17150 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
17151 $(CFLAGS) on the link line.
17153 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
17155 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
17156 padded type built for the return type if it is unconstrained.
17158 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
17160 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
17162 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
17164 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
17165 before calling TREE_CHAIN.
17166 * gcc-interface/misc.c (gnat_init_ts): New function.
17167 (LANG_HOOKS_INIT_TS): Define.
17169 2011-04-12 Martin Jambor <mjambor@suse.cz>
17171 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
17172 instead of cgraph_node.
17174 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
17176 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
17177 alignment on fields of the RETURN type built for the Copy-In Copy-Out
17180 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
17182 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
17183 of aggregate types that contain a placeholder.
17185 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
17187 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
17189 (handle_type_generic_attribute): Likewise.
17191 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
17194 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
17196 2011-04-04 Kai Tietz <ktietz@redhat.com>
17199 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
17202 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17204 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
17205 type case, do not strip a padding type around the array type.
17207 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17209 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
17212 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17214 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
17215 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
17216 code for -feliminate-unused-debug-types.
17217 (gnat_post_options): Likewise.
17219 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17221 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
17222 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
17225 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17227 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
17228 DECL_ARTIFICIAL flag on enumeration types.
17230 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17232 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
17233 fat pointer types artificial unconditionally.
17234 <E_Array_Subtype>: Attach the base array type as a parallel type if it
17237 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17239 * gcc-interface/gigi.h (get_dummy_type): Declare.
17240 (build_dummy_unc_pointer_types): Likewise.
17241 (finish_fat_pointer_type): Likewise.
17242 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
17243 fat pointer type has been built, complete it in place.
17244 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
17245 and thin pointers. Remove useless variable.
17246 (finish_fat_pointer_type): Make global and move to...
17247 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
17248 (get_dummy_type): New function.
17249 (build_dummy_unc_pointer_types): Likewise.
17250 (gnat_pushdecl): Propage the name to the anonymous variants only.
17251 (update_pointer_to): Only adjust the pointer types in the unconstrained
17254 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17256 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
17257 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
17258 if this is a Taft amendment type and the full declaration is available.
17259 * gcc-interface/trans.c (process_type): Likewise.
17260 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
17261 (process_freeze_entity): Likewise.
17262 * gcc-interface/utils.c (dummy_global): New static variable.
17263 (gnat_write_global_declarations): If there are types declared as used
17264 at the global level, insert them in the global hash table.
17266 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17268 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
17269 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
17270 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
17272 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
17273 flag of the type accordingly.
17274 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
17276 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17278 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
17279 finalizing types when updating the pointers to the designated type.
17280 <all>: Finalize the deferred types even if we didn't defer processing
17281 of incomplete types in this invocation.
17283 2011-04-01 Olivier Hainque <hainque@adacore.com>
17284 Nicolas Setton <setton@adacore.com>
17285 Eric Botcazou <ebotcazou@adacore.com>
17287 * gcc-interface/misc.c (gnat_descriptive_type): New function.
17288 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
17290 2011-03-28 Kai Tietz <ktietz@redhat.com>
17292 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
17294 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
17295 * system-mingw.ads (System): Change ZCX_By_Default default to True.
17297 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
17299 2011-03-28 Tristan Gingold <gingold@adacore.com>
17302 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
17303 Use ada output of gnatbind.
17304 (ada/b_gnatb.adb): Ditto.
17305 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
17306 (ada.mostlyclean, ada.stage1)
17307 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
17308 (ada.stagefeedback): Adjust.
17309 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
17310 Use ada output of gnatbind.
17311 (b_gnatm.adb): Ditto.
17312 (b_gnatl.o, b_gnatm.o): New rules.
17314 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
17316 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
17317 for the padded type built to support a specified size or alignment.
17319 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
17321 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
17322 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
17323 unconditionally to the end of the unit when the designated type is
17325 <all>: Rename local variable. Attempt to un-defer types only and do it
17326 for limited_with'ed types as well.
17327 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
17328 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
17329 consistently and remove redundant call to finalize_from_with_types.
17331 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
17333 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
17334 subprograms without a previous spec declared in the same unit.
17335 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
17336 subprograms at the end of the unit instead of at the beginning.
17337 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
17338 isn't public for the special handling of non-inline functions nested
17339 inside inline external functions.
17341 2011-03-25 Jeff Law <law@redhat.com>
17343 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
17345 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
17347 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
17348 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
17349 to compute Set_Size_Depends_On_Discriminant.
17350 (Layout_Type): Call it on array types in back-end layout mode.
17351 * sem_util.adb (Requires_Transient_Scope): Return true for array
17352 types only if the size depends on the value of discriminants.
17353 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
17354 type if the RHS is a call to a function that returns an unconstrained
17355 type with default discriminant.
17357 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
17359 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
17360 non-conversion to the nominal result type at the end.
17362 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
17364 * gcc-interface/trans.c (create_temporary): New function taken from...
17365 (create_init_temporary): ...here. Call it.
17366 (call_to_gnu): Create the temporary for the return value early, if any.
17367 Create it for a function with copy-in/copy-out parameters if there is
17368 no target; in other cases of copy-in/copy-out, use another temporary.
17369 Push the new binding level lazily. Add and rename local variables.
17371 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
17373 * gcc-interface/decl.c (validate_size): Improve comments and tweak
17375 (set_rm_size): Likewise.
17377 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
17379 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
17380 for the padded type built in order to support a specified alignment.
17381 Fix incorrect formatting.
17383 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
17386 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
17388 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
17390 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
17391 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
17392 to the end of the list. Adjust recursive call. Rename local variable.
17393 If REORDER is true, reorder components of the record type.
17394 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
17395 components_to_record and adjust the parameter list.
17397 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
17399 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
17400 disabled, use the variable for bounds of loop iteration scheme.
17402 2011-03-21 Kai Tietz <ktietz@redhat.com>
17405 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
17407 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
17409 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
17410 out whether the expression is read-only. Short-circuit placeholder
17411 case and rename a couple of local variables.
17413 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
17415 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
17416 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
17417 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
17418 (convert): Deal with conversions from a smaller form type specially.
17420 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
17422 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
17423 its argument, except for the special -I- switch.
17425 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
17427 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
17430 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
17432 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
17434 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
17436 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
17438 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
17439 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
17440 instead of GNAT_FORMAL. Protect the expression against multiple uses.
17441 Do not generate the check directly, instead instantiate the template
17442 check present in the descriptor.
17443 (make_descriptor_field): Move around.
17444 (build_vms_descriptor32): Build a template check in the POINTER field.
17445 (build_vms_descriptor): Remove useless suffixes.
17446 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
17448 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
17451 * targext.c: Include target files if IN_RTS is defined.
17453 2011-01-26 Richard Guenther <rguenther@suse.de>
17456 * targext.c: Include config.h.
17457 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
17460 2011-01-04 Pascal Obry <obry@adacore.com>
17461 Eric Botcazou <ebotcazou@adacore.com>
17463 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
17465 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
17467 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
17468 end-of-case on the end label and its associated gotos, if any.
17470 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
17472 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
17473 expressions of the parameter cache within the statement group of
17474 the CICO mechanism.
17476 2011-01-04 Olivier Hainque <hainque@adacore.com>
17477 Eric Botcazou <ebotcazou@adacore.com>
17479 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
17480 (set_end_locus_from_node): New function.
17481 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
17482 make and the function end_locus.
17483 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
17484 for the elaboration subprogram.
17485 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
17486 set the end_locus of the expression as well.
17488 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
17491 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
17492 variables that are referenced in exception handlers volatile.
17496 Copyright (C) 2011 Free Software Foundation, Inc.
17498 Copying and distribution of this file, with or without modification,
17499 are permitted in any medium without royalty provided the copyright
17500 notice and this notice are preserved.