1 2011-12-12 Robert Dewar <dewar@adacore.com>
3 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting.
5 2011-12-12 Steve Baird <baird@adacore.com>
7 * sem_ch3.adb (Check_Completion): Improve a comment.
9 2011-12-12 Tristan Gingold <gingold@adacore.com>
11 * cstand.adb: Minor comment fix.
13 2011-12-11 Eric Botcazou <ebotcazou@adacore.com>
15 * gcc-interface/utils2.c (gnat_build_constructor): Test the TREE_STATIC
16 flag of elements to compute that of the constructor.
18 2011-12-11 Eric Botcazou <ebotcazou@adacore.com>
20 * gcc-interface/decl.c (gnat_to_gnu_param): Set the restrict qualifier
21 on references built for parameters which aren't specifically by-ref.
23 2011-12-11 Eric Botcazou <ebotcazou@adacore.com>
25 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: If there is an
26 alignment set on a renaming, assert that the renamed object is aligned
27 enough as to make it possible to honor it.
29 2011-12-11 Eric Botcazou <ebotcazou@adacore.com>
31 * gcc-interface/trans.c (gigi): Initialize the linemap earlier.
33 2011-12-06 Dave Korn <dave.korn.cygwin@gmail.com>
35 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS [windows targets]):
36 Correctly detect cygwin, which no longer has the '32' suffix, and use
37 appropriate implementations of the sockets and memory packages.
38 * sysdep.c (WIN_SETMODE): New define to choose the correct spelling of
39 setmode/_setmode for MinGW and Cygwin, respectively.
40 (__gnat_set_binary_mode [windows targets]): Use the above, and enable
41 the windows version for Cygwin as well as MinGW.
42 (__gnat_set_text_mode [windows targets]): Likewise.
43 (__gnat_ttyname [windows targets]): Provide a Cygwin implementation
44 in addition to the MinGW version.
45 (__gnat_is_windows_xp): Make available to Cygwin as well as MinGW.
46 (__gnat_get_stack_bounds): Likewise.
48 2011-12-05 Bob Duff <duff@adacore.com>
50 * sem_ch4.adb: Minor comment fix.
52 2011-12-05 Robert Dewar <dewar@adacore.com>
54 * gnat_ugn.texi: Add documentation for -gnatw.e.
56 2011-12-05 Bob Duff <duff@adacore.com>
58 * treepr.adb (pn): Print something useful for
59 Elmt_Ids. Add Write_Eol to 'when others' case, so the output
60 will be seen immediately in gdb.
62 2011-12-05 Ed Schonberg <schonberg@adacore.com>
64 * lib-writ.adb (Output_Main_Program_Line): A generic subprogram
65 is never a main program.
67 2011-12-05 Thomas Quinot <quinot@adacore.com>
69 * par_sco.adb: Various minor adjustments to dominance markers
72 2011-12-05 Ed Schonberg <schonberg@adacore.com>
74 * sem_ch6.adb (Analyze_Expression_Function): If the function is
75 a completion, generate a body reference for its defining entity,
76 before rewriting the node as a body.
77 * sem_util.adb (Defining_Entity): Add entry for expression
80 2011-12-05 Bob Duff <duff@adacore.com>
82 * sem_ch3.adb (Derive_Progenitor_Subprograms): Add Ultimate_Alias
83 to the Comes_From_Source check, to deal properly with the case
84 of indirect inheritance of "=".
86 2011-12-05 Thomas Quinot <quinot@adacore.com>
89 * s-oscons-tmplt.c: On HP-UX, CLOCK_REALTIME is an enum literal,
92 2011-12-05 Thomas Quinot <quinot@adacore.com>
94 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Generate dominance
97 2011-12-02 Eric Botcazou <ebotcazou@adacore.com>
98 Thomas Quinot <quinot@adacore.com>
100 * gcc-interface/Makefile.in (INCLUDES): Remove $(srcdir)/config.
101 (INCLUDES_FOR_SUBDIR): Add $(fsrcdir) except for VxWorks.
102 Add thread.c to LIBGNAT_SRCS so that a symlink is created in ada/rts,
103 which allows the file to be installed in adainclude.
104 * gcc-interface/Make-lang.in: Update dependencies.
106 2011-12-02 Javier Miranda <miranda@adacore.com>
108 * sem_ch3.adb (Constrain_Access): Undo previous
109 patch for this routine. Required since the RM rule 3.7.1(7/3)
110 applies to all access types.
112 2011-12-02 Bob Duff <duff@adacore.com>
114 * sem_ch6.adb: Minor comment fix.
116 2011-12-02 Joel Sherrill <joel.sherrill@oarcorp.com>
118 * s-tpopsp-rtems.adb: Use ATCB_Key rather than RTEMS_Ada_Self variable
119 for consistency with other ports.
120 * s-osinte-rtems.adb: Add body for dummy implementation of
121 pthread_rwlockattr_setkind_np().
122 * s-osinte-rtems.ads: Add missing clock and rwlock bindings.
123 * terminals.c: Add __rtems__ conditionals to account for differences
124 in termios implementation.
126 2011-12-02 Robert Dewar <dewar@adacore.com>
128 * sem_ch3.adb, sem_attr.adb, a-comutr.adb, a-cbmutr.adb,
129 a-cbmutr.ads: Minor reformatting.
131 2011-12-02 Hristian Kirtchev <kirtchev@adacore.com>
133 * exp_dbug.adb: Comment reformatting.
134 (Get_External_Name): Use Reset_Buffers to reset the contents of
135 Name_Buffer and Homonym_Numbers.
136 (Qualify_All_Entity_Names): Reset the contents of Name_Buffer and
137 Homonym_Numbers before creating a new qualified name for a particular
139 (Reset_Buffers): New routine.
141 2011-12-02 Matthew Heaney <heaney@adacore.com>
143 * a-cbmutr.ads (No_Node): Moved declaration from body to spec
144 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Iterator): Derives
146 (Child_Iterator): Derives from Root_Iterator.
147 (Finalize): Implemented as an override operation for Root_Iterator.
148 (First): Return value depends on Subtree component.
149 (Last): Component was renamed from Parent to Subtree.
150 (Next): Checks parameter value, and uses simplified loop.
151 (Iterate): Forwards to Iterate_Subtree.
152 (Iterate_Children): Component was renamed from Parent to Subtree.
153 (Iterate_Subtree): Checks parameter value
155 2011-12-02 Robert Dewar <dewar@adacore.com>
157 * usage.adb: Add lines for -gnatw.n and -gnatw.N
158 (atomic sync info msgs).
160 2011-12-02 Steve Baird <baird@adacore.com>
162 * sem_ch3.adb (Check_Completion): An Ada 2012
163 generic formal type doesn't require a completion.
165 2011-12-02 Eric Botcazou <ebotcazou@adacore.com>
167 * sem_util.adb (Set_Debug_Info_Needed): Also set the flag on the
168 packed array type if it is to be set on the array type used to
171 2011-12-02 Robert Dewar <dewar@adacore.com>
173 * gnat_rm.texi: Eliminate confusing use of type name.
175 2011-12-02 Thomas Quinot <quinot@adacore.com>
177 * sem_ch10.adb (Analyze_Compilation_Unit): For a library subprogram
178 body that acts as spec, do not create a shallow copy of the context
179 clause for the synthetized spec (instead, use the same list as
182 2011-12-02 Bob Duff <duff@adacore.com>
184 * gnat_ugn.texi: Clarify usage of -p binder switch.
186 2011-12-02 Javier Miranda <miranda@adacore.com>
188 * sem_util.ads, sem_util.adb, sem_aux.ads, sem_aux.adb
189 (Effectively_Has_Constrained_Partial_View): Moved to sem_aux
190 (In_Generic_Body): Moved to sem_aux.
191 (Unit_Declaration_Node): Moved to sem_aux.
192 * einfo.ads (Effectively_Has_Constrained_Partial_View): Complete
194 * exp_attr.adb, live.adb, sem_ch10.adb, checks.adb, sem.adb,
195 rtsfind.adb, sem_attr.adb, sem_elab.adb, exp_ch4.adb, sem_ch4.adb,
196 exp_ch13.adb: Add with-clause on Sem_Aux.
198 2011-12-02 Yannick Moy <moy@adacore.com>
200 * sem_util.adb (Unique_Name): Reach through Unique_Entity to
201 get the name of the entity.
202 (Unique_Entity): Correct case for subprogram stubs.
204 2011-12-02 Yannick Moy <moy@adacore.com>
206 * sem_ch3.adb (Check_Initialization): Do not emit warning on
207 initialization of limited type object in Alfa mode.
209 2011-12-02 Robert Dewar <dewar@adacore.com>
211 * sinfo.ads: Minor reformatting.
212 * gnat_ugn.texi: Fix confusion in use of term "type name".
214 2011-12-02 Robert Dewar <dewar@adacore.com>
216 * sem_ch6.adb: Minor change in error message.
218 2011-12-02 Robert Dewar <dewar@adacore.com>
220 * sem_ch9.adb, prj-part.adb, vms_data.ads, sem_ch8.adb: Minor
223 2011-12-02 Javier Miranda <miranda@adacore.com>
225 * sem_ch3.adb (Constrain_Access): Enable on Ada 2005 mode the
226 static check of the rule of general access types whose designated
227 type has discriminants.
228 * sem_util.ads, sem_util.adb
229 (Effectively_Has_Constrained_Partial_View): New subprogram.
230 (In_Generic_Body): New subprogram.
231 * einfo.ads (Has_Constrained_Partial_View): Adding documentation.
232 * sem_prag.adb (Inside_Generic_Body): Removed. Replaced by new
233 subprogram In_Generic_Body.
234 * exp_attr.adb, checks.adb, sem_attr.adb, exp_ch4.adb,
235 sem_ch4.adb: In addition, this patch replaces the occurrences of
236 Has_Constrained_Partial_View by
237 Effectively_Has_Constrained_Partial_View.
239 2011-12-02 Matthew Heaney <heaney@adacore.com>
241 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Iterator): Rename
243 (Finalize): Remove unnecessary access check.
244 (First): Forward to First_Child.
245 (Last): Forward to Last_Child.
246 (Iterate): Check preconditions for parent node parameter.
247 (Next): Forward to Next_Sibling.
248 (Previous): Forward to Previous_Sibling.
250 2011-12-02 Robert Dewar <dewar@adacore.com>
252 * a-coinve.adb, a-coorma.adb, freeze.adb, a-coorse.adb, a-comutr.adb,
253 a-coormu.adb, a-convec.adb: Minor reformatting.
255 2011-12-02 Matthew Heaney <heaney@adacore.com>
257 * a-coormu.ads, a-ciormu.ads: Declare iterator factory function.
258 * a-ciormu.adb, a-ciormu.adb (Iterator): Declare concrete
260 (Finalize): Decrement busy counter.
261 (First, Last): Cursor return value depends on iterator node value.
262 (Iterate): Use start position as iterator node value.
263 (Next, Previous): Forward to corresponding cursor-based operation.
265 2011-12-02 Robert Dewar <dewar@adacore.com>
267 * a-cborma.adb, a-cbhama.adb, a-cbdlli.adb, a-cbmutr.adb,
268 a-cbhase.adb, a-cdlili.adb, a-cihama.adb, a-ciorse.adb, a-cidlli.adb,
269 a-cimutr.adb, a-cihase.adb, a-cohama.adb, a-cborse.adb,
270 a-ciorma.adb, a-cobove.adb: Minor reformatting.
272 2011-12-01 Jakub Jelinek <jakub@redhat.com>
275 * gcc-interface/Make-lang.in: Initialize RTS_DIR with = instead of :=.
277 2011-11-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
279 * s-taprop-tru64.adb (Create_Task): Use Unrestricted_Access.
281 2011-11-23 Thomas Quinot <quinot@adacore.com>
283 * thread.c, s-oscons-tmplt.c: Generate __gnat_pthread_condattr_setup
284 only on platforms where this is required, as determined by
287 2011-11-23 Ed Schonberg <schonberg@adacore.com>
289 * sem_ch9.adb: No check on entry index if error on index.
291 2011-11-23 Gary Dismukes <dismukes@adacore.com>
293 * sem_ch6.adb (Analyze_Return_Statement): Improve error messages for
294 return statements nested inside an extended_return_statement.
295 * gcc-interface/Make-lang.in: Update dependencies.
296 * gcc-interface/Makefile.in (MISCLIB): Add -lutil for BSD targets.
298 2011-11-23 Ed Schonberg <schonberg@adacore.com>
300 * freeze.adb (Freeze_All_Ent): An incomplete type is not
301 frozen by a subprogram body that does not come from source.
303 2011-11-23 Pascal Obry <obry@adacore.com>
305 * s-oscons-tmplt.c: Add PTY_Library constant. It contains
306 the library for pseudo terminal support.
307 * g-exptty.ads: Add pseudo-terminal library into a Linker_Options
310 2011-11-23 Ed Schonberg <schonberg@adacore.com>
312 * sem_ch9.adb: No check on entry family index if generic.
314 2011-11-23 Thomas Quinot <quinot@adacore.com>
316 * sem_ch9.adb, s-taprop.ads, s-taprop-hpux-dce.adb, s-taprop-irix.adb,
317 s-taprop-posix.adb, s-taprop-rtx.adb, s-taprop-solaris.adb,
318 s-taprop-tru64.adb, s-taprop-vxworks.adb: Move dependency on
319 System.OS_Constants from shared spec of
320 System.Tasking.Primitive_Operations to the specific body variants
321 that really require this dependency.
323 2011-11-23 Ed Schonberg <schonberg@adacore.com>
325 * sem_ch8.adb (Analyze_Subprogram_Renaming_Declaration):
326 If the declaration has aspects, analyze them so they can be
329 2011-11-23 Hristian Kirtchev <kirtchev@adacore.com>
331 * a-comutr.adb, a-coorma.adb, a-coorse.adb, a-convec.adb, a-cihase.adb,
332 a-cimutr.adb, a-coinve.adb, a-ciorma.adb, a-ciorse.adb, a-cobove.adb,
333 a-cohama.adb, a-cihama.adb, a-cidlli.adb, a-cdlili.adb, a-cbhama.adb,
334 a-cbhase.adb, a-cbmutr.adb, a-cborma.adb, a-cborse.adb, a-cbdlli.adb:
335 Add with and use clause for Ada.Finalization. Type
336 Iterator and Child_Iterator are now derived from Limited_Controlled.
337 (Finalize): New routine.
338 (Iterate): Add a renaming of counter Busy and
339 increment it. Update the return aggregate.
340 (Iterate_Children): Add a renaming of
341 counter Busy and increment it. Update the return aggregate.
342 (Iterate_Subtree): Add a renaming of counter Busy and increment
343 it. Update the return aggregate.
344 * a-cdlili.ads, a-cidlli.ads: Type List_Access is now a general access
346 * a-cihama.ads: Type Map_Access is now a general access type.
347 * a-comutr.ads, a-cimutr.ads: Use type Natural for the two locks
348 associated with the tree.
349 * a-cohama.ads: Type Map_Access is now a general access type.
350 * a-coinve.ads, a-convec.ads: Type Vector_Access is now a general
352 * exp_ch5.adb (Expand_Iterator_Loop): Do not create a block
353 to wrap the loop as this is done at an earlier step, during
354 analysis. The declarations of the iterator and the cursor use
355 the usual Insert_Action mechanism when added into the tree.
356 * sem_ch5.adb (Analyze_Loop_Statement): Remove local constant
357 Loop_Statement and replace all respective uses by N. Add local
358 constant Loc. Preanalyze the loop iterator to discover whether
359 it is a container iterator and if it is, wrap the loop in a
360 block. This ensures that any controlled temporaries produced
361 by the iteration scheme share the same lifetime of the loop.
362 (Is_Container_Iterator): New routine.
363 (Is_Wrapped_In_Block): New routine.
364 (Pre_Analyze_Range): Move spec and body to the library level.
366 2011-11-23 Sergey Rybin <rybin@adacore.com frybin>
368 * gnat_ugn.texi, vms_data.ads: Add documentation for new gnatpp option
369 that controls casing of type and subtype names.
371 2011-11-23 Yannick Moy <moy@adacore.com>
373 * sem_ch3.adb: Minor addition of comments.
375 2011-11-23 Thomas Quinot <quinot@adacore.com>
377 * prj-part.adb (Extension_Withs): New global variable,
378 contains the head of the list of WITH clauses from the EXTENDS
379 ALL projects for which virtual packages are being created.
380 (Look_For_Virtual_Projects_For): When recursing through
381 an EXTENDS ALL, add the WITH clauses of the extending
382 project to Extension_Withs. When adding a project to the
383 Virtual_Hash, record the associated Extension_Withs list.
384 (Create_Virtual_Extending_Project): Add a copy of the appropriate
385 Extension_Withs to the virtual project.
387 2011-11-23 Thomas Quinot <quinot@adacore.com>
389 * mlib-tgt-specific-vxworks.adb: Minor reformatting.
391 2011-11-23 Thomas Quinot <quinot@adacore.com>
393 * Make-generated.in (Sdefault.Target_Name): Set to
394 $(target_noncanonical) instead of $(target) for consistency.
396 2011-11-23 Matthew Heaney <heaney@adacore.com>
398 * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb (Iterator): Declared
399 Iterator type as limited (First, Last): Cursor return value
400 depends on iterator node value (Iterate): Use start position as
401 iterator node value (Next, Previous): Forward to corresponding
402 cursor-based operation.
404 2011-11-23 Matthew Heaney <heaney@adacore.com>
406 * a-coorse.ads, a-ciorse.ads, a-cborse.ads (Set_Iterator_Interfaces):
407 Renamed from Ordered_Set_Iterator_Interfaces.
408 * a-coorse.adb, a-ciorse.adb, a-cborse.adb (Iterator): Declared
409 Iterator type as limited (First, Last): Cursor return value
410 depends on iterator node value (Iterate): Use start position as
411 iterator node value (Next, Previous): Forward to corresponding
412 cursor-based operation.
413 * a-cohase.ads, a-cohase.adb: Implemented forward iterator.
414 * a-cihase.adb, a-cbhase.adb (Iterator): Removed unnecessary
415 node component (First, Next): Forward call to corresponding
416 cursor-based operation (Iterate): Representation of iterator no
417 longer has node component
419 2011-11-23 Hristian Kirtchev <kirtchev@adacore.com>
421 * exp_intr.adb (Expand_Unc_Deallocation): Ensure that the
422 dereference has a proper type before the side effect removal
424 * sem_ch3.adb (Analyze_Subtype_Declaration): Handle a rare case
425 where the base type of the subtype is a private itype created
426 to act as the partial view of a constrained record type. This
427 scenario manifests with equivalent class-wide types for records
428 with unknown discriminants.
430 2011-11-23 Jerome Guitton <guitton@adacore.com>
432 * s-osprim-vxworks.adb (Clock): Use Clock_RT_Ada.
434 2011-11-23 Thomas Quinot <quinot@adacore.com>
436 * s-oscons-tmplt.c: Fix unbalanced preprocessor directives Minor
437 reformatting/reorganization.
439 2011-11-23 Thomas Quinot <quinot@adacore.com>
441 * g-htable.ads: Remove old comments.
443 2011-11-23 Thomas Quinot <quinot@adacore.com>
445 * exp_imgv.adb: Minor reformatting.
447 2011-11-23 Robert Dewar <dewar@adacore.com>
449 * sem_ch9.adb (Analyze_Entry_Declaration): Check for entry
450 family bounds out of range.
452 2011-11-23 Matthew Heaney <heaney@adacore.com>
454 * a-cohama.adb, a-cihama.adb, a-cbhama.adb (Iterator): Declare
455 type as limited, and remove node component.
456 (First, Next): Forward call to corresponding cursor-based operation.
457 (Iterate): Representation of iterator no longer has node component.
459 2011-11-23 Yannick Moy <moy@adacore.com>
461 * exp_util.adb: Revert previous change to remove side-effects in Alfa
462 mode, which is not the correct thing to do for renamings.
464 2011-11-23 Thomas Quinot <quinot@adacore.com>
466 * s-osinte-hpux.ads, s-taprop-vxworks.adb, s-taprop-tru64.adb,
467 s-osinte-vxworks.ads, s-osinte-aix.ads, s-osinte-lynxos.ads,
468 s-osinte-solaris-posix.ads, s-taprop-solaris.adb, a-exetim-posix.adb,
469 s-osinte-irix.ads, s-osinte-solaris.ads, s-oscons-tmplt.c,
470 s-taprop-irix.adb, s-osinte-hpux-dce.ads, Makefile.rtl,
471 s-osinte-tru64.ads, s-osinte-darwin.ads, s-taprop.ads,
472 s-osinte-freebsd.ads, s-osinte-lynxos-3.ads, s-taprop-hpux-dce.adb,
473 s-taprop-posix.adb: Remove hard-coded clock ids;
474 instead, generate them in System.OS_Constants.
475 (System.OS_Constants.CLOCK_RT_Ada): New constant denoting the
476 id of the clock providing Ada.Real_Time.Monotonic_Clock.
477 * thread.c: New file.
478 (__gnat_pthread_condattr_setup): New function. For platforms where
479 CLOCK_RT_Ada is not CLOCK_REALTIME, set appropriate condition
482 2011-11-23 Yannick Moy <moy@adacore.com>
484 * sem_ch3.adb: Restore the use of Expander_Active instead of
485 Full_Expander_Active, so that the evaluation is forced in Alfa
486 mode too. Otherwise, we end up with an unexpected insertion in a
487 place where it is not supposed to happen, on default parameters
490 2011-11-23 Thomas Quinot <quinot@adacore.com>
492 * prj-pp.adb, prj-pp.ads: Minor new addition: wrapper procedure "wpr"
493 for Pretty_Print, for use from within gdb.
495 2011-11-23 Ed Schonberg <schonberg@adacore.com>
497 * exp_ch5.adb (Expand_Iterator_Loop): Wrap the expanded loop
498 and the cursor declarations in a block, so that the loop variable
499 is local to the construct.
501 2011-11-23 Matthew Heaney <heaney@adacore.com>
503 * a-coorma.ads, a-ciorma.ads, a-cborma.ads (Iterate): Returns
504 type Reversible_Iterator'Class.
505 * a-coorma.adb, a-ciorma.adb, a-cborma.adb (Iterator):
506 Declare type as limited.
507 (First, Last): Return value depends on iterator's start node value.
508 (Next, Previous): Call corresponding Cursor-based operation.
509 (Iterate): Indicate whether complete or partial iteration
511 2011-11-23 Robert Dewar <dewar@adacore.com>
513 * errout.adb: Minor reformattin (Finalize): Take templates into
514 account for warning suppression.
515 * errout.ads (Set_Specific_Warning_Off): Add Used parameter.
516 * erroutc.adb: Minor reformatting (Finalize): Take generic
517 templates into account for warning suppress.
518 * erroutc.ads (Set_Specific_Warning_Off): Add Used parameter.
519 * sem_prag.adb: Minor reformatting (Analyze_Pragma,
520 case Warnings): Provide Used parameter in call to
521 Set_Specific_Warnings_Off (to deal with generic template case).
523 2011-11-23 Pascal Obry <obry@adacore.com>
525 * sem_prag.adb (Process_Convention): Better error message for
526 stdcall convention on dispatching calls.
528 2011-11-23 Gary Dismukes <dismukes@adacore.com>
530 * sem_ch4.adb, sem_ch13.adb: Minor reformatting.
532 2011-11-23 Javier Miranda <miranda@adacore.com>
534 * exp_ch6.adb (Expand_Simple_Function_Return): Add missing
535 implicit type conversion when the returned object is allocated
536 in the secondary stack and the type of the returned object is
537 an interface. Done to force generation of displacement of the
540 2011-11-23 Pascal Obry <obry@adacore.com>
542 * impunit.adb: Add g-exptty and g-tty units.
544 2011-11-23 Robert Dewar <dewar@adacore.com>
546 * exp_imgv.adb: Minor code reorganization (use Make_Temporary).
548 2011-11-23 Robert Dewar <dewar@adacore.com>
550 * exp_util.adb, par-ch6.adb, sem_res.adb, par-util.adb: Minor
553 2011-11-23 Yannick Moy <moy@adacore.com>
555 * sem_ch13.adb (Analyze_Aspect_Specifications): Place error on
556 line of precondition/ postcondition/invariant.
558 2011-11-23 Pascal Obry <obry@adacore.com>
560 * g-exptty.ads, g-exptty.adb, g-tty.ads, g-tty.adb,
561 terminals.c: New files.
562 Makefile.rtl: Add these new files.
563 * gnat_rm.texi: Add documentation for GNAT.Expect.TTY.
564 * gcc-interface/Makefile.in: Add g-exptty, g-tty, terminals.o
565 * gcc-interface/Make-lang.in: Update dependencies.
567 2011-11-21 Robert Dewar <dewar@adacore.com>
569 * exp_imgv.adb (Expand_Width_Attribute): Handle case of Discard_Names.
570 * sem_attr.adb (Eval_Attribute, case Width): Ditto.
572 2011-11-21 Thomas Quinot <quinot@adacore.com>
574 * sinfo.ads: Minor reformatting.
576 2011-11-21 Yannick Moy <moy@adacore.com>
578 * exp_util.adb: Minor reformatting. Update comments.
580 2011-11-21 Robert Dewar <dewar@adacore.com>
582 * exp_prag.adb, exp_util.adb, sinfo.ads, sem_res.adb, s-stposu.adb,
583 sem_attr.adb, s-stposu.ads, s-taprop-solaris.adb, s-taprop-irix.adb,
584 sem_ch6.adb: Minor reformatting.
586 2011-11-21 Arnaud Charlet <charlet@adacore.com>
588 * s-taprop-irix.adb, s-taprop-solaris.adb (Create_Task): Use
589 Unrestricted_Access to deal with fact that we properly detect the
590 error if Access is used.
591 * gcc-interface/Make-lang.in: Update dependencies.
593 2011-11-21 Yannick Moy <moy@adacore.com>
595 * exp_prag.adb (Expand_Pragma_Check): Place error on first character
597 * sem_res.adb (Resolve_Short_Circuit): Place error on first
598 character of expression.
600 2011-11-21 Yannick Moy <moy@adacore.com>
602 * exp_util.adb (Remove_Side_Effects): Do nothing in Alfa mode.
604 2011-11-21 Hristian Kirtchev <kirtchev@adacore.com>
606 * exp_attr.adb (Expand_N_Attribute_Reference, case
607 Max_Size_In_Storage_Elements): Account for the size of the
608 hidden list header which precedes controlled objects allocated
610 * rtsfind.ads: Add RE_Header_Size_With_Padding to the runtime
612 * sinfo.adb (Header_Size_Added): New routine.
613 (Set_Header_Size_Added): New routine.
614 * sinfo.ads: Add flag Controlled_Header_Added along with
616 (Header_Size_Added): New inlined routine.
617 (Set_Header_Size_Added): New inlined routine.
618 * s-stposu.adb (Allocate_Any_Controlled): Use
619 Header_Size_With_Padding to calculate the proper
621 (Deallocate_Any_Controlled): Use
622 Header_Size_With_Padding to calculate the proper size
623 of the header. (Header_Size_With_Padding): New routine.
624 (Nearest_Multiple_Rounded_Up): Removed along with its uses.
625 * s-stposu.ads (Header_Size_With_Padding): New routine.
627 2011-11-21 Ed Schonberg <schonberg@adacore.com>
629 * aspects.adb: Aspect specifications are allowed on renaming
631 * par-ch6.adb (P_Subprogram): Parse aspect specifications in a
632 subprogram renaming declaration
634 2011-11-21 Tristan Gingold <gingold@adacore.com>
636 * env.c: Remove unused declaration.
638 2011-11-21 Pascal Obry <obry@adacore.com>
640 * s-os_lib.ads: Minor style fix.
642 2011-11-21 Pascal Obry <obry@adacore.com>
644 * adaint.c (__gnat_dup2): When fd are stdout, stdin or stderr and
645 identical, do nothing on Windows XP.
647 2011-11-21 Yannick Moy <moy@adacore.com>
649 * sem_ch3.adb (Constrain_Index, Process_Range_Expr_In_Decl):
650 Use Full_Expander_Active instead of Expander_Active to control
651 the forced evaluation of expressions for the sake of generating
654 2011-11-21 Thomas Quinot <quinot@adacore.com>
656 * init.c: On FreeBSD, stack checking failures may raise SIGBUS.
658 2011-11-21 Tristan Gingold <gingold@adacore.com>
660 * sysdep.c (mode_read_text, mode_write_text, mode_append_text,
661 mode_read_binary, mode_write_binary, mode_append_binary,
662 mode_read_text_plus, mode_write_text_plus, mode_append_text_plus,
663 mode_read_binary_plus, mode_write_binary_plus,
664 mode_append_binary_plus): Remove unused declarations.
666 2011-11-21 Yannick Moy <moy@adacore.com>
668 * gnat_rm.texi: Minor rewording.
670 2011-11-21 Hristian Kirtchev <kirtchev@adacore.com>
672 * exp_imgv.adb (Expand_Width_Attribute): Emit
673 an error message rather than a warning when pragma Discard_Names
674 prevents the computation of 'Width. Do not emit an error through
677 2011-11-21 Javier Miranda <miranda@adacore.com>
679 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add
680 implicit type conversion when the type of the allocator is an
681 interface. Done to force generation of displacement of the "this"
682 pointer when required.
684 2011-11-21 Ed Schonberg <schonberg@adacore.com>
686 * sinfo.ads, sinfo.adb: Corresponding_Spec applies to expression
687 functions, and is set when the expression is a completion of a
688 previous declaration.
689 * sem_ch6.adb (Analyze_Expression_Function): To determine properly
690 whether an expression function completes a previous declaration,
691 use Find_Corresponding_Spec, as when analyzing a subprogram body.
693 2011-11-21 Steve Baird <baird@adacore.com>
695 * sem_util.adb (Deepest_Type_Access_Level): Improve comment.
696 (Type_Access_Level): Improve comment.
698 2011-11-21 Eric Botcazou <ebotcazou@adacore.com>
700 * gcc-interface/Makefile.in (INCLUDES_FOR_SUBDIR): Add $(fsrcdir) by
701 means of -iquote unconditionally.
703 2011-11-21 Robert Dewar <dewar@adacore.com>
705 * sem_ch3.adb, sem_util.adb, sem_res.adb, sem_attr.adb: Minor
708 2011-11-21 Arnaud Charlet <charlet@adacore.com>
710 * s-taprop-posix.adb (Create_Task): Use Unrestricted_Access
711 to deal with fact that we properly detect the error if Access
714 2011-11-21 Steve Baird <baird@adacore.com>
716 * sem_util.ads: Update comment describing function
717 Deepest_Access_Level.
718 * sem_util.adb (Deepest_Type_Access_Level): Return Int'Last for a
720 (Type_Access_Level): Return library level
721 for a generic formal type.
722 * sem_attr.adb (Resolve_Attribute): Replace two Type_Access_Level
723 calls with calls to Deepest_Type_Access_Level.
724 * sem_ch3.adb (Analyze_Component_Declaration): replace a
725 Type_Access_Level call with a call to Deepest_Type_Access_Level.
726 * sem_res.adb (Resolve_Allocator.Check_Allocator_Discrim_Accessibility):
727 Replace three Type_Access_Level calls with calls to
728 Deepest_Type_Access_Level.
729 (Resolve_Allocator): Replace a Type_Access_Level call with a call to
730 Deepest_Type_Access_Level.
731 (Valid_Conversion.Valid_Array_Conversion): Replace a
732 Type_Access_Level call with a call to Deepest_Type_Access_Level.
734 2011-11-21 Robert Dewar <dewar@adacore.com>
736 * sem_ch3.adb, s-taprop-vms.adb, opt.ads: Minor reformatting.
738 2011-11-21 Robert Dewar <dewar@adacore.com>
740 * sinput.ads: Minor comment fix.
742 2011-11-21 Robert Dewar <dewar@adacore.com>
744 * exp_attr.adb (Expand_N_Attribute_Reference, case First_Bit,
745 Last_Bit, Position): Handle 2005 case.
747 2011-11-21 Robert Dewar <dewar@adacore.com>
749 * s-atocou-builtin.adb (Decrement): Use Unrestricted_Access
750 to deal with fact that we properly detect the error if Access
752 (Increment): Same fix.
753 * s-taprop-linux.adb (Create_Task): Use Unrestricted_Access
754 to deal with fact that we properly detect the error if Access
756 * sem_util.adb (Is_Volatile_Object): Properly record that A.B is
757 volatile if the B component is volatile. This affects the check
758 for passing such a by reference volatile actual to a non-volatile
759 formal (which should be illegal)
761 2011-11-21 Robert Dewar <dewar@adacore.com>
763 * freeze.adb (Freeze_Enumeration_Type): Make sure to set both
764 size and alignment for foreign convention enumeration types.
765 * layout.adb (Set_Elem_Alignment): Redo setting of alignment
768 2011-11-21 Yannick Moy <moy@adacore.com>
770 * checks.adb (Apply_Access_Check, Apply_Arithmetic_Overflow_Check,
771 Apply_Discriminant_Check, Apply_Divide_Check,
772 Apply_Selected_Length_Checks, Apply_Selected_Range_Checks,
773 Build_Discriminant_Checks, Insert_Range_Checks, Selected_Length_Checks,
774 Selected_Range_Checks): Replace reference to Expander_Active
775 with reference to Full_Expander_Active, so that expansion of
776 checks is not performed in Alfa mode
778 2011-11-21 Tristan Gingold <gingold@adacore.com>
780 * s-taprop-vms.adb (Create_Task): Use Unrestricted_Access to deal with
781 fact that we properly detect the error if Access is used.
783 2011-11-21 Hristian Kirtchev <kirtchev@adacore.com>
785 * par-ch4.adb (P_Quantified_Expression): Add an Ada 2012 check.
787 2011-11-21 Hristian Kirtchev <kirtchev@adacore.com>
789 * exp_imgv.adb: Add with and use clause for Errout.
790 (Expand_Width_Attribute): Emit a warning when in
791 configurable run-time mode to provide a better diagnostic message.
793 2011-11-21 Hristian Kirtchev <kirtchev@adacore.com>
795 * s-finmas.adb (Finalize): Add comment concerning double finalization.
797 2011-11-21 Ed Schonberg <schonberg@adacore.com>
799 * sem_ch3.adb (Access_Definition): If the access definition
800 is itself the return type of an access to function definition
801 which is ultimately the return type of an access to subprogram
802 declaration, its scope is the enclosing scope of the ultimate
803 access to subprogram.
805 2011-11-21 Steve Baird <baird@adacore.com>
807 * sem_res.adb (Valid_Conversion): If a conversion was legal
808 in the body of a generic, then the corresponding conversion is
809 legal in the expanded body of an instance of the generic.
811 2011-11-21 Robert Dewar <dewar@adacore.com>
813 * sem_ch3.adb: Minor reformatting.
815 2011-11-21 Robert Dewar <dewar@adacore.com>
817 * s-utf_32.adb (Is_UTF_32_Line_Terminator): Recognize NEL as
819 * sinput.ads: Add section on Handling of Source Line Terminators.
820 * types.ads (Line_Terminator): Adjust comments.
822 2011-11-21 Robert Dewar <dewar@adacore.com>
824 * frontend.adb (Frontend): Capture restrictions from config files
825 * lib-load.adb (Load_Unit): Save/set/restore restriction pragma
827 * lib-xref.adb (Generate_Reference): Fix handling of obsolescent
828 references. This was noticed during debugging, but it is not
829 known if it causes real bugs.
830 * restrict.ads, restrict.adb: New routines to save/set/restore
831 non-partition-wide restrictions.
832 * s-rident.ads: Comment changes for new handling of
834 * sem.adb (Sem): Save/Set/Restore non-partition-wide restrictions
835 * sem_ch10.adb (Analyze_Compilation_Unit): Remove incomplete
836 attempt to save/restore non-partition-wide restrictions (now
837 this work is all done in Sem).
838 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
839 Special handling for restriction No_Elaboration_Code.
841 2011-11-21 Robert Dewar <dewar@adacore.com>
843 * gnat_ugn.texi: Document new handling of restrictions pragmas.
845 2011-11-21 Pascal Obry <obry@adacore.com>
847 * s-taprop-linux.adb (Initialize_Lock): Do not allocate a cond
848 attribute as not needed.
850 2011-11-21 Robert Dewar <dewar@adacore.com>
852 * sem_prag.adb: Minor reformatting.
854 2011-11-21 Pascal Obry <obry@adacore.com>
856 * gnat_rm.texi: Document restriction for stdcall convention on
859 2011-11-21 Pascal Obry <obry@adacore.com>
861 * sem_prag.adb (Process_Convention): A dispatching call cannot
862 have a stdcall calling convention.
864 2011-11-21 Pascal Obry <obry@adacore.com>
866 * s-taprop-linux.adb (Initialize_Lock): Do not allocate a
867 mutex attribute as not needed.
868 (Initialize_TCB): Likewise.
869 (Initialize): Likewise.
871 2011-11-21 Robert Dewar <dewar@adacore.com>
873 * sem_ch6.adb (Is_Public_Subprogram_For): New procedure
874 (Process_PPCs): Invariants only apply to public subprograms.
876 2011-11-21 Robert Dewar <dewar@adacore.com>
878 * sem_util.adb, sem_util.ads, sem_attr.adb, restrict.adb,
879 restrict.ads: Fix for No_Implicit_Aliasing in the renames case.
881 2011-11-21 Robert Dewar <dewar@adacore.com>
883 * a-finali.ads: Use pragma Pure_12 for this unit
884 * aspects.adb: Add aspect Pure_12
885 * aspects.ads: Add aspect Pure_12
886 * opt.ads: Add note on Pure_12
887 * par-prag.adb: Add dummy entry for Pure_12
888 * sem_prag.adb: Implement Pure_12 pragma
889 * snames.ads-tmpl: Add Entry for Pure_12
891 2011-11-21 Sergey Rybin <rybin@adacore.com frybin>
893 * vms_data.ads: Add qualifiers for new gnatpp options
894 '--call_threshold' and '--par_threshold".
895 * gnat_ugn.texi: Add description for new gnatpp options
896 '--call_threshold' and '--par_threshold".
898 2011-11-21 Robert Dewar <dewar@adacore.com>
900 * lib.ads: Minor reformatting.
902 2011-11-21 Robert Dewar <dewar@adacore.com>
904 * lib-load.ads: Add comment.
906 2011-11-21 Gary Dismukes <dismukes@adacore.com>
908 * sem_elab.adb: Minor reformatting
910 2011-11-21 Robert Dewar <dewar@adacore.com>
912 * exp_ch6.adb: Minor reformatting.
914 2011-11-21 Ed Schonberg <schonberg@adacore.com>
916 * sem_ch12.adb (Check_Formal_Package_Instance): If a formal
917 subprogram of the formal package is covered by an others
918 association with a box initialization, no check is needed
919 against the actual in the instantiation of the formal package.
921 2011-11-21 Robert Dewar <dewar@adacore.com>
923 * sem_elab.adb (Check_Internal_Call_Continue): Suppress junk
924 elab warning from within precondition/postcondition etc.
926 2011-11-21 Ed Schonberg <schonberg@adacore.com>
928 * exp_ch6.adb (Expand_Actuals): In Ada 2012, a function call
929 with out parameters may generate assignments to force constraint
930 checks. These checks must be properly placed in the code after the
931 declaration or statement that contains the call.
933 2011-11-21 Fedor Rybin <frybin@adacore.com>
935 * gnat_ugn.texi: Adding info on current gnattest limitations an
936 support of -X option.
938 2011-11-21 Robert Dewar <dewar@adacore.com>
940 * a-cfdlli.adb, a-cbdlli.adb: Minor reformatting.
942 2011-11-20 Robert Dewar <dewar@adacore.com>
944 * exp_ch6.adb, exp_util.adb: Minor reformatting
946 2011-11-20 Eric Botcazou <ebotcazou@adacore.com>
948 * sinfo.ads (Reference): Document that it is OK to set
949 Is_Known_Non_Null on a temporary initialized to a N_Reference
952 2011-11-20 Matthew Heaney <heaney@adacore.com>
954 * a-cbdlli.adb, a-cfdlli.adb (Move): Set Last component to 0
957 2011-11-20 Eric Botcazou <ebotcazou@adacore.com>
959 * exp_ch6.adb (Make_Build_In_Place_Call_In_Assignment):
960 Declare NEW_EXPR local variable and attach the
961 temporary to it. Set Is_Known_Non_Null on the temporary.
962 (Make_Build_In_Place_Call_In_Object_Declaration): Likewise.
963 * exp_util.adb (Remove_Side_Effects): Set Is_Known_Non_Null on
964 the temporary created to hold the 'Reference of the expression,
966 * checks.adb (Install_Null_Excluding_Check): Bail out for the
967 Get_Current_Excep.all.all idiom generated by the expander.
969 2011-11-20 Eric Botcazou <ebotcazou@adacore.com>
971 * gcc-interface/trans.c (struct language_function): Add GNAT_RET.
972 (f_gnat_ret): New macro.
973 (struct nrv_data): Add GNAT_RET.
974 (finalize_nrv_unc_r): New helper function.
975 (finalize_nrv): Add GNAT_RET parameter. Copy it into DATA. If the
976 function returns unconstrained, use finalize_nrv_unc_r as callback.
977 (return_value_ok_for_nrv_p): Test the alignment of RET_OBJ only if
979 (Subprogram_Body_to_gnu): Pass GNAT_RET to finalize_nrv.
980 (gnat_to_gnu) <N_Return_Statement>: In the return-unconstrained case,
981 if optimization is enabled, record candidates for the Named Return
984 2011-11-20 Eric Botcazou <ebotcazou@adacore.com>
986 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Add comment.
987 (gnat_to_gnu) <N_Return_Statement>: Add 'else' to avoid doing a useless
988 test. Tweak default case.
989 <N_Goto_Statement>: Use better formatting.
990 * gcc-interface/utils2.c (maybe_wrap_malloc): Use INIT_EXPR instead of
991 MODIFY_EXPR to initialize the storage.
992 (build_allocator): Likewise.
994 2011-11-20 Eric Botcazou <ebotcazou@adacore.com>
996 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Adjust
997 call to components_to_record.
998 (components_to_record): Add FIRST_FREE_POS parameter. For the variant
999 part, reuse enclosing union even if there is a representation clause
1000 on the Unchecked_Union. If there is a variant part, compute the new
1001 first free position, if any. Adjust call to self. Use a single field
1002 directly only if it hasn't got a representation clause or is placed at
1003 offset zero. Create the variant part at offset 0 if all the fields
1004 down to this level have a rep clause. Do not chain the variant part
1005 immediately and adjust downstream.
1006 Do not test ALL_REP before moving the fields without rep clause to the
1007 previous level. Call create_rep_part to create the REP part and force
1008 a minimum size on it if necessary. Do not chain it immediately.
1009 Create a fake REP part if there are fields without rep clause that need
1010 to be laid out starting from FIRST_FREE_POS.
1011 At the end, chain the REP part and then the variant part.
1012 (create_rep_part): New function.
1013 (get_rep_part): Minor tweak.
1014 * gcc-interface/utils.c (tree_code_for_record_type): Minor tweak.
1016 2011-11-18 Iain Sandoe <iains@gcc.gnu.org>
1019 * init.c (__gnat_error_handler) [Darwin]: Move workaround to the
1020 bug filed as radar #10302855 from __gnat_error_handler to...
1021 (__gnat_adjust_context_for_raise) [Darwin]: ...here. New function.
1022 (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE) [Darwin]: Define.
1024 2011-11-18 Tristan Gingold <gingold@adacore.com>
1025 Iain Sandoe <iains@gcc.gnu.org>
1028 * mlib-tgt-specific-darwin.adb (Archive_Indexer_Options): Remove.
1029 * gcc-interface/Makefile.in (darwin): Remove ranlib special-casing.
1031 2011-11-12 Iain Sandoe <iains@gcc.gnu.org>
1033 * gcc-interface/Makefile.in (stamp-gnatlib-$(RTSDIR)): Don't link
1035 (OSCONS_CPP, OSCONS_EXTRACT): New.
1036 (./bldtools/oscons/xoscons): New target.
1037 ($(RTSDIR)/s-oscons.ads): Likewise.
1038 (gnatlib): Depend on $(RTSDIR)/s-oscons.ads.
1039 * gcc-interface/Make-lang.in (ada/s-oscons.ads) Remove as dependency.
1040 * Make-generated.in: Remove machinery to generate xoscons and
1043 2011-11-10 Eric Botcazou <ebotcazou@adacore.com>
1045 * fe.h (Serious_Errors_Detected): New macro.
1046 * gcc-interface/gigi.h (build_atomic_load): Declare.
1047 (build_atomic_store): Likewise.
1048 * gcc-interface/trans.c (atomic_sync_required_p): New predicate.
1049 (call_to_gnu): Add ATOMIC_SYNC parameter. Use local variable.
1050 Build an atomic load for an In or In Out parameter if needed.
1051 Build an atomic store for the assignment of an Out parameter if needed.
1052 Build an atomic store to the target if ATOMIC_SYNC is true.
1053 (present_in_lhs_or_actual_p): New predicate.
1054 (gnat_to_gnu) <N_Identifier>: Build an atomic load if needed.
1055 <N_Explicit_Dereference>: Likewise.
1056 <N_Indexed_Component>: Likewise.
1057 <N_Selected_Component>: Likewise.
1058 <N_Assignment_Statement>: Adjust call to call_to_gnu.
1059 Build an atomic store to the LHS if needed.
1060 <N_Function_Call>: Adjust call to call_to_gnu.
1061 * gcc-interface/utils2.c: Include toplev.h.
1062 (resolve_atomic_size): New static function.
1063 (build_atomic_load): New function.
1064 (build_atomic_store): Likewise.
1065 * gcc-interface/Make-lang.in (ada/utils2.o): Add toplev.h.
1067 2011-11-07 Olivier Hainque <hainque@adacore.com>
1069 * sigtramp-ppcvxw.c: Add general comments.
1070 (CFI_COMMON_REGS): Remove rule for r1, as in other unwinders. Add
1071 rules for r2 to r13, plus CTR and XER.
1072 (CFA_REG): New, register number used to hold the local CFA.
1073 (CFI_DEF_CFA, SIGTRAMP_BODY): Use it.
1074 Make that 15, not 14, with documentation.
1075 (TCR): Undef before definition, preventing conflict with reg number in
1078 2011-11-07 Robert Dewar <dewar@adacore.com>
1080 * exp_util.ads, exp_alfa.adb, a-cohama.adb, a-cohama.ads, sem_ch4.adb,
1081 aspects.ads, exp_ch8.adb, exp_ch8.ads, atree.ads: Minor reformatting.
1082 * gcc-interface/Make-lang.in: Update dependencies.
1084 2011-11-07 Ed Schonberg <schonberg@adacore.com>
1086 * exp_ch6.adb: A tagged type is a legal actual for an aliased
1089 2011-11-07 Pascal Obry <obry@adacore.com>
1091 * g-socket.adb, g-socket.ads: Minor reformatting.
1093 2011-11-07 Robert Dewar <dewar@adacore.com>
1095 * sem_res.adb (Resolve_Actuals): Minor error message improvement.
1097 2011-11-07 Robert Dewar <dewar@adacore.com>
1099 * gnat_ugn.texi: Add discussion of default mode handling of
1100 source representation with no -gnatW option given, in particular
1101 noting that NEL (next line) is not recognized in this context.
1103 2011-11-07 Yannick Moy <moy@adacore.com>
1105 * sem_util.adb (Note_Possible_Modification): In Alfa mode,
1106 generate a reference for a modification even when the modification
1107 does not come from source.
1109 2011-11-07 Ed Schonberg <schonberg@adacore.com>
1111 * exp_ch5.adb (Expand_Iterator_Loop): For the "of" iterator form,
1112 use the indexing attributes rather than the Element function,
1113 to obtain variable references.
1114 * sem_ch4.adb (Try_Container_Indexing): Code cleanup. Use
1115 Find_Aspect rather than iterating over representation
1116 items. Improve error message.
1117 * a-cohama.adb, a-cohama.ads Update to latest RM, with two versions
1118 of Reference functions.
1120 2011-11-07 Yannick Moy <moy@adacore.com>
1122 * sem_util.adb (Unique_Entity): For a parameter on a subprogram
1123 body that has a corresponding parameter on the subprogram
1124 declaration, define the unique entity as being the declaration
1127 2011-11-07 Ed Schonberg <schonberg@adacore.com>
1129 * sem_ch6.adb (Analyze_Return_Type): In Ada 2012 mode, if the
1130 return type of a function is the class-wide type of an incomplete
1131 type T, T can be a Taft-amendment type and does not have to be
1132 completed in the current private part.
1134 2011-11-07 Ed Schonberg <schonberg@adacore.com>
1136 * aspects.ads (Inherited_Aspect): Map that indicates type aspects
1137 that are inherited by default, and apply to the class-wide type
1139 * aspects.adb (Find_Aspect): If the entity is class-wide and the
1140 aspect is inherited, use the aspect of the specific type.
1142 2011-11-07 Hristian Kirtchev <kirtchev@adacore.com>
1144 * exp_alfa.adb: Remove with and use clause for
1145 Exp_Ch8. Add with and use clause for Exp_Util.
1146 Remove local constant Disable_Processing_Of_Renamings.
1147 (Expand_Alfa_N_Object_Renaming_Declaration): The expansion of
1148 object renamings has been reenabled.
1149 (Expand_Possible_Renaming):
1150 The expansion of identifier and expanded names has been
1151 reenabled. Perform the substitutions only for entities that
1153 * exp_ch8.ads, exp_ch8.adb (Evaluate_Name): Moved to Exp_Util.
1154 * exp_util.adb (Evaluate_Name): Moved from Exp_Ch8.
1155 (Remove_Side_Effects): Alphabetize local variables. Add a guard
1156 to avoid the infinite expansion of an expression in Alfa mode. Add
1157 processing for function calls in Alfa mode.
1158 * exp_util.ads (Evaliate_Name): Moved from Exp_Ch8.
1160 2011-11-07 Ed Schonberg <schonberg@adacore.com>
1162 * freeze.adb (Freeze_Entity): If the entity is an access to
1163 subprogram whose designated type is itself a subprogram type,
1164 its own return type must be decorated with size information.
1166 2011-11-04 Arnaud Charlet <charlet@adacore.com>
1168 * gcc-interface/Make-lang.in: Update dependencies.
1170 2011-11-04 Robert Dewar <dewar@adacore.com>
1172 * sprint.adb (Sprint_Node_Actual, case Qualified_Expression):
1173 Avoid junk semicolon after argument of machine code Asm operand.
1175 2011-11-04 Robert Dewar <dewar@adacore.com>
1177 * exp_ch11.adb (Generate_Push_Pop): Inhibit push/pop nodes in
1178 CodePeer mode or if restriction No_Exception_Handlers is present.
1179 * exp_ch6.adb (Expand_N_Subprogram_Body): (Inhibit push/pop
1180 nodes in CodePeer mode or if restriction No_Exception_Handlers
1183 2011-11-04 Robert Dewar <dewar@adacore.com>
1185 * s-tassta.adb, atree.ads, errout.adb, sinput.adb: Minor reformatting.
1187 2011-11-04 Ed Schonberg <schonberg@adacore.com>
1189 * sem_ch6.adb (Analyze_Subprogram_Specification): The
1190 specification is legal if it is a function that returns an
1191 abstract type, if it comes from an attribute renaming of a stream
1192 attribute of an abstract type.
1194 2011-11-04 Gary Dismukes <dismukes@adacore.com>
1196 * exp_util.adb (Is_Possibly_Unaligned_Object): In case of indexed
1197 components, check whether recursively check whether the prefix
1198 denotes an unaligned object.
1200 2011-11-04 Ed Schonberg <schonberg@adacore.com>
1202 * sem_prag.adb (Analyze_Pragma, case Debug): The argument of
1203 the pragma is legal if it is an expanded name that denotes a
1204 procedure that be can called without parameters.
1206 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
1208 * gnat_ugn.texi (Performance Considerations) <Vectorization
1209 of loops>: New sub-section. <Other Optimization Switches>:
1212 2011-11-04 Robert Dewar <dewar@adacore.com>
1214 * gnat_rm.texi: Minor reformatting.
1216 2011-11-04 Matthew Heaney <heaney@adacore.com>
1218 * a-convec.adb, a-coinve.adb, a-cobove.adb (Merge): Raise PE
1219 when Target and Source denote same non-empty object
1220 * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb (Merge): Ditto
1222 2011-11-04 Robert Dewar <dewar@adacore.com>
1224 * exp_attr.adb: Minor reformatting.
1226 2011-11-04 Ed Schonberg <schonberg@adacore.com>
1228 * exp_ch5.adb (Expand_Assign_Record): Do not generate a
1229 discriminant assignment within an initialization proc if the
1230 record is an unchecked union, as it can only come from the
1231 initialization of an unchecked union component.
1233 2011-11-04 Robert Dewar <dewar@adacore.com>
1235 * gnat_ugn.texi: Minor reformatting.
1237 2011-11-04 Robert Dewar <dewar@adacore.com>
1239 * par-labl.adb (Rewrite_As_Loop): Generate info msg rather than
1242 2011-11-04 Robert Dewar <dewar@adacore.com>
1244 * exp_ch4.adb: Minor code reorganization (remove junk obsolete
1247 2011-11-04 Hristian Kirtchev <kirtchev@adacore.com>
1249 * exp_alfa.adb: Add local constant
1250 Disable_Processing_Of_Renamings;
1251 (Expand_Alfa_N_Object_Renaming_Declaration): Disable
1252 the name evaluation of object renamings for now.
1253 (Expand_Potential_Renaming): Do not perform the substitution
1255 * exp_util.adb (Remove_Side_Effects): Remove processing for
1256 functions with side effects in Alfa mode.
1258 2011-11-04 Gary Dismukes <dismukes@adacore.com>
1260 * bindgen.adb (Gen_Elab_Calls): In the case
1261 of the AAMP target, set elaboration entities to 1 rather than
1264 2011-11-04 Ed Schonberg <schonberg@adacore.com>
1266 * sem_ch10.adb (Install_Limited_With_Unit): To establish the
1267 proper entities on the ancestors of a child unit that appear
1268 in a limited_with clause, follow the unit links because the
1269 units are not analyzed and scope information is incomplete.
1271 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
1273 * exp_ch4.adb (Expand_N_Selected_Component): Refine code
1274 setting the Atomic_Sync_Required flag to detect one more case.
1275 * exp_util.adb (Activate_Atomic_Synchronization): Refine code
1276 setting the Atomic_Sync_Required flag to exclude more cases,
1277 depending on the parent of the node to be examined.
1279 2011-11-04 Bob Duff <duff@adacore.com>
1281 * g-excact.adb: Minor: use named notation.
1283 2011-11-04 Ed Schonberg <schonberg@adacore.com>
1285 * sem_ch5.adb: Improve error messages for illegal iterators.
1287 2011-11-04 Hristian Kirtchev <kirtchev@adacore.com>
1289 * exp_alfa.adb: Add with and use clauses for Exp_Ch8 and
1291 (Expand_Alfa): Alphabetize cases on first choice. Add
1292 processing for object renaming declarations, identifiers and
1294 (Expand_Alfa_N_In): Remove useless return.
1295 (Expand_Alfa_N_Object_Renaming_Declaration): New routine.
1296 (Expand_Potential_Renaming): New routine.
1297 * exp_ch8.adb (Evaluate_Name): Moved to the top level.
1298 (Expand_N_Object_Declaration): Alphabetize local variables. Move
1299 Evaluate_Name out to the top level.
1300 * exp_ch8.ads (Evaluate_Name): Moved from body to package spec.
1301 * exp_util.adb (Remove_Side_Effects): Add processing for
1302 functions with side effects in Alfa mode.
1304 2011-11-04 Hristian Kirtchev <kirtchev@adacore.com>
1306 * gnat_rm.texi: Add entries for
1307 restrictions No_Relative_Delay, No_Requeue_Statements and
1308 No_Stream_Optimizations.
1310 2011-11-04 Ed Schonberg <schonberg@adacore.com>
1312 * sem_ch4.adb: Set type of entity in prefixed call, for
1313 completeness in a generic context.
1315 2011-11-04 Yannick Moy <moy@adacore.com>
1317 * sem_prag.adb: Minor refactoring (renaming of a parameter).
1319 2011-11-04 Robert Dewar <dewar@adacore.com>
1321 * atree.ads: Minor reformatting.
1323 2011-11-04 Robert Dewar <dewar@adacore.com>
1325 * checks.adb (Atomic_Synchronization_Disabled): Check -gnatd.d
1327 * exp_ch2.adb (Expand_Entity_Reference): Use
1328 Activate_Atomic_Synchronization
1329 * exp_ch4.adb (Expand_N_Explicit_Dereference): Use
1330 Activate_Atomic_Synchronization (Expand_N_Indexed_Compoonent):
1331 Activate_Atomic_Synchronization (Expand_N_Selected_Component):
1332 Use Activate_Atomic_Synchronization
1333 * exp_util.ads, exp_util.adb (Activate_Atomic_Synchronization): New
1335 * sinfo.ads, sinfo.adb (Atomic_Sync_Required): Can now apply to
1336 N_Selected_Component node
1338 2011-11-04 Robert Dewar <dewar@adacore.com>
1340 * sem_prag.adb, atree.ads, prj-env.adb, prj-env.ads: Minor reformatting.
1342 2011-11-04 Yannick Moy <moy@adacore.com>
1344 * atree.adb, atree.ads (Set_Original_Node): New set procedure.
1345 * sem_ch13.adb (Analyze_Aspect_Specifications/Pre_Post_Aspects):
1346 In ASIS mode, no splitting of aspects between conjuncts.
1347 (Analyze_Aspect_Specifications/Aspect_Test_Case): Make pragma
1348 expressions refer to the original aspect expressions through
1349 the Original_Node link. This is used in semantic analysis for
1350 ASIS mode, so that the original expression also gets analyzed.
1351 * sem_prag.adb (Preanalyze_TC_Args,
1352 Check_Precondition_Postcondition,
1353 Analyze_Pragma/Pragma_Test_Case): In ASIS mode, for a pragma
1354 generated from a source aspect, also analyze the original aspect
1356 (Check_Expr_Is_Static_Expression): New procedure
1357 similar to existing procedure Check_Arg_Is_Static_Expression,
1358 except called on expression inside pragma.
1360 2011-11-04 Tristan Gingold <gingold@adacore.com>
1362 * prj-env.adb, prj-env.ads (Find_Name_In_Path): New function, from
1363 Find_Project.Try_Path_Name.
1364 (Find_Project): Use Find_Name_In_Path to implement Try_Path_Name.
1366 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
1368 * s-atocou.ads (Atomic_Counter): Remove redundant pragma Volatile.
1370 2011-11-04 Pascal Obry <obry@adacore.com>
1372 * projects.texi: Add short description for qualifiers aggregate
1373 and aggregate library.
1375 2011-11-04 Matthew Heaney <heaney@adacore.com>
1377 * Makefile.rtl, impunit.adb: Added a-cogeso.ad[sb]
1378 * a-cgaaso.adb: Replaced implementation with instantiation
1380 * a-cogeso.ad[sb] This is the new Ada 2012 unit
1381 Ada.Containers.Generic_Sort
1383 2011-11-04 Robert Dewar <dewar@adacore.com>
1385 * exp_ch2.adb (Expand_Entity_Reference): Do not set
1386 Atomic_Sync_Required for the case of a prefix of an attribute.
1387 * exp_ch4.adb (Expand_N_Explicit_Dereference): May require
1388 atomic synchronization
1389 (Expand_N_Indexed_Component): Ditto.
1390 (Expand_B_Selected_Component): Ditto.
1391 * sem_prag.adb (Process_Suppress_Unsuppress):
1392 Disable/Enable_Atomic_Synchronization can now occur for array
1393 types with pragma Atomic_Components.
1394 * sinfo.ads, sinfo.adb (Atomic_Sync_Required): Can now occur on
1395 N_Explicit_Dereference nodes and on N_Indexed_Component nodes.
1397 2011-11-04 Gary Dismukes <dismukes@adacore.com>
1399 * gnat_ugn.texi: Editorial corrections for gnattest section.
1401 2011-11-04 Robert Dewar <dewar@adacore.com>
1403 * sem_prag.adb: Minor reformatting.
1404 * gnat_rm.texi: Update documentation for pragma Warnings (Off,
1406 * exp_ch2.adb (Expand_Entity_Reference): Only set
1407 Atomic_Sync_Required on entities that are variables. Doesn't
1408 make any sense on anything else.
1410 2011-11-04 Robert Dewar <dewar@adacore.com>
1412 * exp_ch2.adb (Expand_Entity_Reference): Extend handling of
1413 atomic sync to type case.
1414 * sem_prag.adb (Process_Suppress_Unsuppress): Atomic Sync can
1417 2011-11-04 Robert Dewar <dewar@adacore.com>
1419 * sem_warn.adb (Warn_On_Useless_Assignment): More accurate test
1421 * gcc-interface/Make-lang.in: Update dependencies.
1423 2011-11-04 Robert Dewar <dewar@adacore.com>
1425 * sem_prag.adb: Detect more cases of Long_Float inconsistencies at
1428 2011-11-04 Matthew Heaney <heaney@adacore.com>
1430 * Makefile.rtl, impunit.adb: Added a-sfecin.ads,
1431 * a-sfhcin.ads, a-sflcin.ads, a-sbecin.ad[sb], a-sbhcin.ad[sb],
1432 a-sblcin.ad[sb], a-suecin.ad[sb], a-suhcin.ad[sb], a-sulcin.ad[sb]
1433 * a-sfecin.ads, a-sfhcin.ads, a-sflcin.ads, a-sbecin.ad[sb],
1434 a-sbhcin.ad[sb], a-sblcin.ad[sb], a-suecin.ad[sb], a-suhcin.ad[sb],
1435 a-sulcin.ad[sb]: New files.
1437 2011-11-04 Geert Bosch <bosch@adacore.com>
1439 * i-forbla-unimplemented.ads, s-gecola.adb, s-gecola.ads,
1440 s-gerebl.adb, s-gerebl.ads, i-forbla.adb, i-forbla.ads,
1441 i-forlap.ads, i-forbla-darwin.adb, s-gecobl.adb, s-gecobl.ads,
1442 s-gerela.adb, s-gerela.ads: Remove partial interface to BLAS/LAPACK.
1443 * gcc-interface/Makefile.in: Remove libgnala and related objects.
1445 2011-11-04 Matthew Heaney <heaney@adacore.com>
1447 * a-cdlili.ad[sb], a-cidlli.ad[sb], a-coorse.ad[sb], a-ciorse.ad[sb],
1448 a-coorma.ad[sb], a-ciorma.ad[sb], a-coormu.ad[sb], a-ciormu.ad[sb],
1449 a-cohama.ad[sb], a-cihama.ad[sb], a-cohase.ad[sb], a-cihase.ad[sb],
1450 a-convec.ad[sb], a-coinve.ad[sb] (Assign, Copy): New operations
1453 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
1455 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Do not assert
1456 that the type of the parameters isn't dummy in type_annotate_only mode.
1458 2011-11-04 Robert Dewar <dewar@adacore.com>
1460 * sem_ch12.adb: Minor reformatting
1462 2011-11-04 Gary Dismukes <dismukes@adacore.com>
1464 * bindgen.adb (Gen_Elab_Calls): In the case of the AAMP target,
1465 initialize elaboration entities to zero when specs are processed.
1467 2011-10-28 Iain Sandoe <iains@gcc.gnu.org>
1468 Eric Botcazou <ebotcazou@adacore.com>
1471 * init.c (__gnat_error_handler) [Darwin]: Apply a work-around to the
1472 bug filed as radar #10302855 (inconsistent unwind data for sigtramp).
1474 2011-10-28 Eric Botcazou <ebotcazou@adacore.com>
1477 * gcc-interface/Makefile.in (SYMDEPS): Delete.
1478 (LIBICONV): New variable.
1479 (LIBICONV_DEP): Likewise.
1480 (LIBS): Add $(LIBICONV).
1481 (LIBDEPS): Add $(LIBICONV_DEP).
1482 (EXTRA_GNATTOOLS_OBJS): Merge into...
1483 (TOOLS_LIBS): ...this. Add $(LIBICONV).
1485 2011-10-26 Eric Botcazou <ebotcazou@adacore.com>
1487 * gcc-interface/decl.c (elaborate_expression_1): Add EXPR_PUBLIC_P local
1488 variable. Always create the elaboration variable, if any, as constant.
1490 2011-10-26 Eric Botcazou <ebotcazou@adacore.com>
1492 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Try to
1493 make a packable type for fields of union types as well.
1494 <is_type>: Use RECORD_OR_UNION_TYPE_P predicate.
1495 (gnat_to_gnu_component_type): Try to make a packable type for fields
1496 of union types as well.
1497 (make_packable_type): Use RECORD_OR_UNION_TYPE_P predicate.
1498 (maybe_pad_type): Try to make a packable type for fields of union types
1500 (gnat_to_gnu_field): Likewise.
1501 (is_variable_size): Use RECORD_OR_UNION_TYPE_P predicate.
1502 (set_rm_size): Likewise.
1503 (rm_size): Likewise.
1504 * gcc-interface/misc.c (gnat_type_max_size): Likewise.
1505 * gcc-interface/trans.c (add_decl_expr): Likewise.
1506 * gcc-interface/utils.c (finish_record_type): Likewise.
1507 * gcc-interface/utils2.c (build_simple_component_ref): Likewise.
1509 2011-10-26 Eric Botcazou <ebotcazou@adacore.com>
1511 * gcc-interface/decl.c (gnat_to_gnu_field): Always check components
1512 declared as atomic. Move around conditionally executed code.
1514 2011-10-24 Robert Dewar <dewar@adacore.com>
1516 * sem.adb (Initialize): Fix bug that blew up if called a second time.
1518 2011-10-24 Robert Dewar <dewar@adacore.com>
1520 * tb-alvxw.c, tracebak.c, expect.c, initflt.c, tb-alvms.c,
1521 tb-ivms.c, tb-gcc.c: Update headers to GPL 3.
1523 2011-10-24 Robert Dewar <dewar@adacore.com>
1525 * sem_prag.adb (Analyze_Pragma, case Debug): Give proper pragma
1528 2011-10-24 Hristian Kirtchev <kirtchev@adacore.com>
1530 * gnat_rm.texi: Add an entry for restriction No_Finalization.
1532 2011-10-24 Ed Schonberg <schonberg@adacore.com>
1534 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): If the
1535 current instance is within the one that contains the generic,
1536 the freeze node for the current one must appear in the current
1537 declarative part. Ditto if the current instance is within another
1538 package instance. In both of these cases the freeze node of the
1539 previous instance is not relevant.
1541 2011-10-24 Gary Dismukes <dismukes@adacore.com>
1543 * switch-m.adb (Normalize_Compiler_Switches): Add recognition
1544 of AAMP-specific switches -univ and -aamp_target.
1546 2011-10-24 Robert Dewar <dewar@adacore.com>
1548 * a-tienau.adb (Put): Deal properly with limited line length.
1550 2011-10-24 Robert Dewar <dewar@adacore.com>
1552 * sem_warn.adb, sem_ch12.adb: Minor reformatting.
1554 2011-10-24 Tristan Gingold <gingold@adacore.com>
1556 * gcc-interface/Makefile.in: Use GNU ld switches to generate map files
1559 2011-10-24 Ed Schonberg <schonberg@adacore.com>
1561 * sem_ch12.adb (Earlier): make available globally. If both
1562 nodes have the same sloc, the freeze node that does not come
1563 from source is the later one.
1564 (True_Parent): Make available globally.
1565 (Previous_Instance): Subsidiary of
1566 Insert_Freeze_Node_For_Instance, to check whether the generic
1567 parent of the current instance is declared within a previous
1568 instance in the same unit or declarative part, in which case the
1569 freeze nodes of both instances must appear in order to prevent
1570 elaboration problems in gigi.
1571 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): A stub is a
1572 freeze point, and the freeze node of a preceding instantiation
1573 must be inserted before it.
1575 2011-10-24 Robert Dewar <dewar@adacore.com>
1577 * checks.ads, checks.adb: Add handling of Synchronization_Check
1578 * debug.adb: Add doc for -gnatd.d and -gnatd.e (disable/enable
1580 * exp_ch2.adb (Expand_Entity_Reference): Set Atomic_Sync_Required
1581 flag Minor code reorganization.
1582 * opt.ads (Warn_On_Atomic_Synchronization): New switch.
1583 * par-prag.adb: Add dummy entries for pragma
1584 Disable/Enable_Atomic_Synchronization.
1585 * sem_prag.adb (Process_Suppress_Unsuppress): Handle
1586 case of Atomic_Synchronization specially (not suppressed
1587 by All_Checks, cannot be set from Source).
1588 (Pragma Disable/Enable_Atomic_Synchronization): Add processing.
1589 * sinfo.ads, sinfo.adb: Add Atomic_Sync_Required flag
1590 * snames.ads-tmpl: Add entry for Atomic_Synchronization Add
1591 entry for pragma Disable/Enable_Atomic_Synchronization
1592 * switch-c.adb: The -gnatp switch does not disable
1593 Atomic_Synchronization Add -gnatep switch to disable
1594 Atomic_Synchronization.
1595 * types.ads: Add entry for Synchronization_Check
1596 * usage.adb: Add line for -gnated switch
1597 * warnsw.adb: Settings for Warn_On_Atomic_Synchronization
1599 2011-10-24 Geert Bosch <bosch@adacore.com>
1601 * s-gearop.adb (Back_Substitute): Avoid overflow if matrix bounds start
1604 2011-10-24 Robert Dewar <dewar@adacore.com>
1606 * sem_ch12.adb, s-gearop.adb: Minor reformatting.
1608 2011-10-24 Robert Dewar <dewar@adacore.com>
1610 * warnsw.adb: Add some missing warnings to Set_GNAT_Mode_Warnings.
1611 * warnsw.ads: Add comments to Set_GNAT_Mode_Warnings.
1613 2011-10-24 Emmanuel Briot <briot@adacore.com>
1615 * prj-proc.adb (Process_Expression_Variable_Decl): No special
1616 handling for Project_Path unless it is an attribute.
1618 2011-10-24 Javier Miranda <miranda@adacore.com>
1620 * sem_ch12.adb (Check_Hidden_Primitives): New subprogram.
1621 (Install_Hidden_Primitives): New subprogram.
1622 (Restore_Hidden_Primitives): New subprogram.
1623 (Analyze_Formal_Package_Declaration,
1624 Analyze_Package_Instantiation, Analyze_Subprogram_Instantiation):
1625 Invoke Check_Hidden_Primitives after every call to
1626 Analyze_Associations, and invoke Restore_Hidden_Primitives to
1627 restore their visibility after processing the instantiation.
1628 (Instantiate_Package_Body): Install visible primitives before
1629 analyzing the instantiation and uninstall them to restore their
1630 visibility when the instantiation has been analyzed.
1631 * sem_util.ads, sem_util.adb (Add_Suffix): New subprogram
1632 (Remove_Suffix): New subprogram
1633 * sem_ch3.adb (Derive_Subprogram): When handling
1634 a derived subprogram for the instantiation of a formal derived
1635 tagged type, inherit the dispatching attributes from the actual
1636 subprogram (not from the parent type).
1638 2011-10-24 Vasiliy Fofanov <fofanov@adacore.com>
1640 * gnat_ugn.texi: Document explicit use of XDECGNAT library.
1642 2011-10-24 Hristian Kirtchev <kirtchev@adacore.com>
1644 * exp_ch3.adb (Build_Assignment): Add local constant N_Loc and
1646 (Build_Discriminant_Assignments): Add local variable D_Loc and update
1648 (Build_Init_Statements): Add local variables Comp_Loc, Decl_Loc and
1649 Var_Loc and update their uses.
1650 (Build_Record_Init_Proc): Code reformatting.
1651 (Increment_Counter): Add formal parameter Loc.
1652 (Make_Counter): Add formal parameter Loc.
1654 2011-10-24 Eric Botcazou <ebotcazou@adacore.com>
1656 * sem_disp.adb (Covers_Some_Interface): Fix typo.
1658 2011-10-24 Matthew Heaney <heaney@adacore.com>
1660 * a-cuprqu.adb, a-cbprqu.adb (Dequeue_Only_High_Priority): Fix sense
1663 2011-10-24 Yannick Moy <moy@adacore.com>
1665 * sem_ch13.adb (Analyze_Aspect_Specifications/Aspect_Test_Case):
1666 Translate arguments in positional notation into pragma argument
1667 association arguments for the generated pragma.
1669 2011-10-24 Arnaud Charlet <charlet@adacore.com>
1671 * exp_ch5.adb: Fix minor typo.
1673 2011-10-24 Ed Schonberg <schonberg@adacore.com>
1675 * sem_ch3.adb (Is_Visible_Component): Refine predicate for
1676 the case of a component reference in an instance body, when the
1677 enclosing type is private.
1679 2011-10-24 Sergey Rybin <rybin@adacore.com frybin>
1681 * gnat_ugn.texi: For gnatelim, move the note about using the GNAT
1682 driver for getting the project support into gnatelim section.
1684 2011-10-24 Robert Dewar <dewar@adacore.com>
1686 * gnat_rm.texi: Minor correction to documentation on address clause.
1688 2011-10-24 Hristian Kirtchev <kirtchev@adacore.com>
1690 * s-finmas.adb (Attach): Synchronize and call the unprotected version.
1691 (Attach_Unprotected): New routine.
1692 (Delete_Finalize_Address): Removed.
1693 (Delete_Finalize_Address_Unprotected): New routine.
1694 (Detach): Synchronize and call the unprotected version.
1695 (Detach_Unprotected): Remove locking.
1696 (Finalize): Add various comment on synchronization. Lock the critical
1697 region and call the unprotected versions of routines.
1698 (Finalize_Address): Removed.
1699 (Finalize_Address_Unprotected): New routine.
1700 (Set_Finalize_Address): Synchronize and call
1701 the unprotected version.
1702 (Set_Finalize_Address_Unprotected): New routine.
1703 (Set_Heterogeneous_Finalize_Address): Removed.
1704 (Set_Heterogeneous_Finalize_Address_Unprotected): New routine.
1705 (Set_Is_Heterogeneous): Add comment on synchronization and
1707 * s-finmas.ads: Flag Finalization_Started is no longer atomic
1708 because synchronization uses task locking / unlocking.
1709 (Attach): Add comment on usage.
1710 (Attach_Unprotected): New routine.
1711 (Delete_Finalize_Address): Renamed to
1712 Delete_Finalize_Address_Unprotected.
1713 (Detach): Add comment on usage.
1714 (Detach_Unprotected): New routine.
1715 (Finalize_Address): Renamed to Finalize_Address_Unprotected.
1716 (Set_Finalize_Address): Add comment on usage.
1717 (Set_Finalize_Address_Unprotected): New routine.
1718 (Set_Heterogeneous_Finalize_Address): Renamed to
1719 Set_Heterogeneous_Finalize_Address_Unprotected.
1720 * s-stposu.adb (Allocate_Any_Controlled): Add local variable
1721 Allocation_Locked. Add various comments on synchronization. Lock
1722 the critical region and call the unprotected version of
1724 (Deallocate_Any_Controlled): Add various comments on
1725 synchronization. Lock the critical region and call the unprotected
1726 version of routines.
1728 2011-10-24 Ed Schonberg <schonberg@adacore.com>
1730 * sem_ch3.adb (Set_Fixed_Range): The bounds of a fixed point type
1731 are universal and must carry the corresponding type.
1732 * sem_eval.adb (Check_Non_Static_Context): If the type of the
1733 expression is universal real, as may be the case for a fixed point
1734 expression with constant operands in the context of a conversion,
1735 there is nothing to check.
1736 * s-finmas.adb: Minor reformatting
1738 2011-10-23 Eric Botcazou <ebotcazou@adacore.com>
1740 * gcc-interface/decl.c (create_concat_name): Add explicit cast.
1742 2011-10-20 Eric Botcazou <ebotcazou@adacore.com>
1744 * gcc-interface/Make-lang.in (GNATLIBFLAGS, GNATLIBCFLAGS, THREAD_KIND,
1745 TRACE): Reintroduce.
1746 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o,
1747 ada/initialize.o, ada/raise.o): Reintroduce explicit compilation rules.
1749 2011-10-20 Eric Botcazou <ebotcazou@adacore.com>
1751 * gcc-interface/trans.c (lhs_or_actual_p): New predicate.
1752 (unchecked_conversion_nop): Use it.
1753 (gnat_to_gnu): Likewise.
1755 2011-10-20 Eric Botcazou <ebotcazou@adacore.com>
1757 * back_end.adb (Call_Back_End): Pass the maximum logical line number
1758 instead of the maximum physical line number to gigi.
1759 * gcc-interface/trans.c (Sloc_to_locus): Cope with line zero.
1761 2011-10-16 Tom Tromey <tromey@redhat.com>
1762 Dodji Seketeli <dodji@redhat.com>
1764 * gcc-interface/trans.c (gigi, Sloc_to_locus): Adjust to use the new
1765 public ordinary map interface.
1767 2011-10-16 Tristan Gingold <gingold@adacore.com>
1769 * link.c (_AIX): Add support for GNU ld.
1771 2011-10-16 Fedor Rybin <frybin@adacore.com>
1773 * gnat_ugn.texi: Fixing gnattest example names in the doc.
1774 Adding explanation to additional tests usage.
1776 2011-10-16 Robert Dewar <dewar@adacore.com>
1778 * exp_ch6.adb, sem_ch6.adb: Minor reformatting.
1780 2011-10-16 Eric Botcazou <ebotcazou@adacore.com>
1782 * a-convec.adb: Fix minor inconsistencies.
1784 2011-10-16 Matthew Heaney <heaney@adacore.com>
1786 * a-cusyqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cbprqu.ads (package
1787 Implementation): Specify pragma Implementation_Defined.
1789 2011-10-15 Nicolas Roche <roche@adacore.com>
1791 * gcc-interface/lang-specs.h: Ensure -mrtp switch is passed when using
1792 either rtp-smp or ravenscar-cert-rtp runtimes.
1794 2011-10-15 Bob Duff <duff@adacore.com>
1796 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call):
1797 Do not create a pool formal on unless RE_Root_Storage_Pool_Ptr
1799 (Expand_N_Extended_Return_Statement): Do not create a renaming of the
1800 build-in-place pool parameter unless RE_Root_Storage_Pool_Ptr is
1802 (Make_Build_In_Place_Call_In_Allocator): Add the user-defined
1803 pool only if RE_Root_Storage_Pool_Ptr is available.
1804 (Make_Build_In_Place_Call_In_Object_Declaration): Do not add a
1805 pool actual unless RE_Root_Storage_Pool_Ptr is available.
1806 * sem_ch6.adb (Create_Extra_Formals): Add build-in-place pool
1807 formal only if RE_Root_Storage_Pool_Ptr is available.
1809 2011-10-15 Matthew Heaney <heaney@adacore.com>
1811 * a-cusyqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cbprqu.ads (Queue
1812 type): Specify Priority aspect for protected type.
1814 2011-10-14 Ed Schonberg <schonberg@adacore.com>
1816 * exp_disp.adb (Check_Premature_Freezing): If an untagged type
1817 is a generic actual, it is a subtype of a type that was frozen
1818 by the instantiation, and even if not marked frozen it does not
1819 affect the construction of the dispatch table.
1821 2011-10-14 Robert Dewar <dewar@adacore.com>
1823 * make.adb, mlib-utl.adb, sem_util.adb, sem_ch4.adb: Minor code
1825 * s-rident.ads: Add missing Compiler_Unit pragma.
1827 2011-10-14 Gary Dismukes <dismukes@adacore.com>
1829 * sem_res.adb: Minor reformatting.
1831 2011-10-14 Hristian Kirtchev <kirtchev@adacore.com>
1833 * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call):
1834 Code and comment reformatting. Use BIP_Task_Master
1835 when creating a _master.
1836 (BIP_Formal_Suffix): Code reformatting. Correct the case for
1838 (Make_Build_In_Place_Call_In_Object_Declaration): Use
1839 BIP_Task_Master when creating a reference to the enclosing
1840 function's _master formal.
1841 (Move_Activation_Chain): Use BIP_Task_Master when creating a reference
1843 * exp_ch6.ads: Change BIP_Master to BIP_Task_Master.
1844 (Needs_BIP_Finalization_Master): Alphabetized.
1845 * sem_ch6.adb (Create_Extra_Formals): Update the usage of
1848 2011-10-14 Ed Schonberg <schonberg@adacore.com>
1850 * par-ch6.adb (P_Return_Object_Declaration): In Ada 2012 mode,
1851 reject an aliased keyword on the object declaration of an extended
1852 return statement. In older versions of the language indicate
1853 that this is illegal in the standard.
1855 2011-10-14 Pascal Obry <obry@adacore.com>
1857 * sem_util.adb, sem_ch4.adb: Minor reformatting.
1859 2011-10-14 Ed Schonberg <schonberg@adacore.com>
1861 * sem_ch13.adb: Recognize properly procedure calls that are
1862 transformed into code statements.
1864 2011-10-14 Vincent Celier <celier@adacore.com>
1866 * projects.texi: Minor fix in project example.
1868 2011-10-14 Ed Schonberg <schonberg@adacore.com>
1870 * sem_util.adb: Return objects are aliased if their type is
1871 immutably limited as per AI05-0053.
1873 2011-10-14 Gary Dismukes <dismukes@adacore.com>
1875 * exp_ch4.adb (Expand_N_Op_And): Remove Short_Circuit_And_Or
1876 expansion code (moved to sem_res) (Expand_N_Op_Or): Remove
1877 Short_Circuit_And_Or expansion code (moved to sem_res).
1878 * sem_res.adb (Resolve_Logical_Op): Add code to rewrite Boolean
1879 "and" and "or" operators as short-circuit "and then" and "or
1880 else", when pragma Short_Circuit_And_Or is active.
1882 2011-10-13 Robert Dewar <dewar@adacore.com>
1884 * sem_ch9.adb, sem_util.adb, sem_util.ads, exp_ch6.adb, sem_ch4.adb,
1885 sem_ch6.adb, exp_ch3.adb: Minor reformatting.
1887 2011-10-13 Arnaud Charlet <charlet@adacore.com>
1889 * Makefile.rtl (GNATRTL_NONTASKING_OBJS): Add a-ngcoar.o.
1891 2011-10-13 Jerome Guitton <guitton@adacore.com>
1893 * sysdep.c (__gnat_get_task_options): Re-enable VX_SPE_TASK on vThreads
1895 2011-10-13 Eric Botcazou <ebotcazou@adacore.com>
1897 * a-convec.ads (Cursor): Minor reformatting.
1898 * a-convec.adb (Next): Fix minor inconsistencies.
1899 (Previous): Likewise.
1901 2011-10-13 Ed Schonberg <schonberg@adacore.com>
1903 * sem_util.ads, sem_util.adb (Available_Full_View_Of_Component):
1904 New predicate to determine whether some operations on an array
1905 type are available when the full view of its component may differ
1906 from the view of the point of the array declaration.
1907 * sem_ch4.adb (Find_Equality_Types): Use
1908 Available_Full_View_Of_Component.
1909 * sem_type.adb (Valid_Boolean_Arg, Valid_Comparison_Arg): Ditto
1911 2011-10-13 Ed Schonberg <schonberg@adacore.com>
1913 * sem_ch9.adb: Analyze aspects while discriminants of protected
1916 2011-10-13 Geert Bosch <bosch@adacore.com>
1918 * Makefile.rtl (GNATRTL_TASKING_OBJECTS): Add
1919 a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o, as these no
1920 longer depend on an external library.
1921 * gcc-interface/Makefile.in (GNATRTL_LINEARALGEBRA_OBJS): Remove
1922 a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o.
1923 Update dependencies.
1924 * gcc-interface/Make-lang.in: Update dependencies.
1926 2011-10-13 Cyrille Comar <comar@adacore.com>
1928 * gnat_ugn.texi: Minor editing.
1930 2011-10-13 Vincent Celier <celier@adacore.com>
1932 * projects.texi: Add documentation on packages and attributes
1933 that are inherited from a project being extended into the
1936 2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
1938 * exp_ch3.adb (Build_Master): Rewritten.
1939 (Expand_N_Full_Type_Declaration): Reformat the declarative
1940 region. Update the call to Build_Master_Renaming.
1941 (Expand_Previous_Access_Type): Rewritten.
1942 * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call):
1943 Add local constant Result_Subt and update related usage.
1944 (Expand_N_Extended_Return_Statement): Add local constant
1945 Result_Subt and update related usage.
1946 * exp_ch9.adb (Build_Activation_Chain): Rewritten to use the
1947 new context detection mechanism.
1948 (Build_Class_Wide_Master):
1949 Use Insert_Action to add the renaming into the tree.
1950 (Build_Master_Entity): Rewritten to use the new context detection
1952 (Build_Master_Renaming): Add formal parameter Ins_Nod
1953 and related usage. Use Insert_Action to add the renaming into the
1955 (Find_Enclosing_Context): New subsidiary routine. Rather
1956 than relying on enclosing scopes, this routine looks at the
1957 tree structure to figure out the proper context for a _master
1958 or a _chain. This approach eliminates the issues with transient
1959 scopes which have not been converted into blocks.
1960 * exp_ch9.ads (Build_Master_Entity): Change parameter profile
1961 to better reflect the new usage. Update the related comment.
1962 (Build_Master_Renaming): Add formal parameter Ins_Nod. Update
1963 the comment on usage.
1964 * sem_ch3.adb (Access_Definition): Update the calls to
1965 Build_Master_Entity and Build_Master_Renaming.
1966 * sem_ch6.adb (Create_Extra_Formals): Add local variable
1967 Full_Subt. Code reformatting.
1968 * sem_util.adb (Is_Iterator): Alphabetized.
1969 (Is_LHS): Alphabetized.
1970 (Is_Limited_Class_Wide_Type): New routine.
1971 * sem_util.ads (Is_Limited_Class_Wide_Type): New routine.
1973 2011-10-13 Geert Bosch <bosch@adacore.com>
1975 * a-ngrear.adb (Solve): Make generic and move to
1976 System.Generic_Array_Operations.
1977 * s-gearop.ads (Matrix_Vector_Solution, Matrix_Matrix_Solution):
1978 New generic solvers to compute a vector resp. matrix Y such
1979 that A * Y = X, approximately.
1980 * s-gearop.adb (Matrix_Vector_Solution, Matrix_Matrix_Solution):
1981 Implement using Forward_Eliminate and Back_Substitute
1982 * a-ngcoar.adb: Reimplement in pure Ada to remove dependencies
1984 * a-ngcoar.ads ("abs"): Fix return type to be real.
1986 2011-10-13 Eric Botcazou <ebotcazou@adacore.com>
1989 * s-linux-alpha.ads: Do not "with" Interfaces.C.
1990 * s-linux-sparc.ads: Likewise.
1992 2011-10-13 Geert Bosch <bosch@adacore.com>
1994 * s-gearop.ads (Forward_Eliminate): Add "abs" formal function
1996 * s-gearop.adb (Forward_Eliminate): Remove local "abs" function
1998 * a-ngrear.adb (Forward_Eliminate): Adjust instantiation for
2001 2011-10-13 Geert Bosch <bosch@adacore.com>
2003 * a-ngrear.adb, s-gearop.adb, s-gearop.ads (Sqrt): Make generic and
2004 move to System.Generic_Array_Operations.
2006 2011-10-13 Geert Bosch <bosch@adacore.com>
2008 * a-ngrear.adb ("abs"): Adjust for modified L2_Norm generic
2009 * s-gearop.ads (L2_Norm): Change profile to be suitable for
2011 * s-gearop.adb (L2_Norm): Reimplement using direct definition,
2014 2011-10-13 Robert Dewar <dewar@adacore.com>
2016 * exp_ch5.adb, sem_ch3.adb, impunit.adb, impunit.ads, sem_type.adb,
2017 prj-proc.adb, exp_ch9.adb, s-regpat.adb, sem_ch10.adb, sem_prag.adb,
2018 sem_ch12.adb, freeze.adb, sem_attr.adb, sem_attr.ads, gnatlink.adb,
2019 par-ch6.adb, exp_ch6.adb, sem_ch4.adb, sem_ch6.adb, sem_ch8.adb,
2020 par-util.adb, sem_ch13.adb, lib-xref.adb, g-trasym.adb, g-trasym.ads,
2021 exp_aggr.adb, s-taprop-posix.adb: Minor reformatting.
2023 2011-10-13 Geert Bosch <bosch@adacore.com>
2025 * s-gearop.adb: Minor comment additions.
2027 2011-10-13 Fedor Rybin <frybin@adacore.com>
2029 * gnat_ugn.texi: Add gnattest section.
2031 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2033 * freeze.adb: Do not create body of renaming if declaration has
2036 2011-10-13 Olivier Hainque <hainque@adacore.com>
2038 * init.c (__gnat_error_handler - vxworks case): Restrict sigtramp calls
2039 further, to the ppc+kernel case only.
2041 2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
2043 * exp_ch4.adb (Expand_N_Allocator): Comment reformatting.
2044 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call):
2045 Do not create a pool formal on .NET/JVM.
2046 (Expand_N_Extended_Return_Statement): Alphabetize local
2047 variables. Do not create a renaming of the build-in-place pool
2048 parameter on .NET/JVM. (Make_Build_In_Place_Call_In_Allocator):
2049 Add the user-defined pool only on non-VM targets.
2050 (Make_Build_In_Place_Call_In_Object_Declaration): Alphabetize
2051 local variables. Do not add a pool actual on .NET/JVM.
2052 * sem_ch6.adb: Add with and use clause for Targparm.
2053 (Create_Extra_Formals): Add build-in-place pool formal only on
2055 * rtsfind.ads: Alphabetize entries.
2057 2011-10-13 Sergey Rybin <rybin@adacore.com>
2059 * gnat_ugn.texi: Minor correction.
2061 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2063 * sem_ch8.adb: Minor error message improvement.
2065 2011-10-13 Robert Dewar <dewar@adacore.com>
2067 * a-cbprqu.adb, a-ciorma.adb, exp_ch3.adb: Minor reformatting.
2069 2011-10-13 Gary Dismukes <dismukes@adacore.com>
2071 * exp_ch5.adb (Expand_N_Loop_Statement): For the transformation
2072 of a for loop for an enumeration type with an enumeration rep
2073 clause, which involves moving the original loop parameter into
2074 a nested block, the loop parameter's entity must be removed from
2075 the entity list of the loop scope.
2077 2011-10-13 Bob Duff <duff@adacore.com>
2079 * exp_ch6.ads (BIP_Storage_Pool): New "extra implicit parameter"
2080 that gets passed in the same cases where BIP_Alloc_Form is passed
2081 (caller-unknown-size results). BIP_Storage_Pool is used when
2082 BIP_Alloc_Form = User_Storage_Pool. In that case, a pointer
2083 to the user-defined storage pool is passed at the call site,
2084 and this pool is used in callee to allocate the result.
2085 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call): New
2086 version of Add_Alloc_Form_Actual_To_Build_In_Place_Call. Passes
2087 the additional BIP_Storage_Pool actual.
2088 (Expand_N_Extended_Return_Statement): Allocate the function
2089 result using the user-defined storage pool, if BIP_Alloc_Form =
2091 * sem_ch6.adb: Add the "extra formal" for BIP_Storage_Pool.
2092 * exp_ch4.adb: Don't overwrite storage pool set by
2093 Expand_N_Extended_Return_Statement.
2094 * s-stopoo.ads, rtsfind.ads (Root_Storage_Pool_Ptr): New type,
2095 for use in build-in-place function calls within allocators
2096 where the access type has a user-defined storage pool.
2098 2011-10-13 Sergey Rybin <rybin@adacore.com>
2100 * gnat_ugn.texi, vms_data.ads: Add an option to control enumeration
2103 2011-10-13 Nicolas Roche <roche@adacore.com>
2105 * gnatlink.adb: Ensure that -mrtp is passed when runtime name ends
2108 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2110 * sem_prag.adb (Analyze_Pragma, case Unchecked_Union): Take into
2111 account that an unchecked union type can be limited.
2113 2011-10-13 Olivier Hainque <hainque@adacore.com>
2115 * init.c (__gnat_error_handler) <VxWorks version>: Add comments on
2116 the use of the signal trampoline for PPC in the sjlj case as well.
2117 Add legitimate casts, preventing compile time warnings on the
2118 (sighandler *) profile.
2120 2011-10-13 Yannick Moy <moy@adacore.com>
2122 * sem_aggr.adb (Resolve_Aggr_Expr): Always perform semantic analysis
2125 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2127 * sem_ch3.adb (OK_For_Limited_Init_In_05): Conditional and case
2128 expressions are legal limited return values if each one of their
2129 dependent expressions are legal.
2131 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2133 * sem_ch6.adb (Analyze_Procedure_Call_Statement): In Ada 2012 mode,
2134 if the prefix of the call is a qualified expression, rewrite as
2136 * sem_ch13.adb (Analyze_Code_Statement): In Ada 2012 mode, the
2137 code statement is legal if it is a rewriting of a procedure call.
2139 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2141 * exp_aggr.adb (Flatten): If a component association has a box,
2142 assume that aggregate is not static.
2143 (Safe_Aggregate): If a component association in a non-limited
2144 aggregate has a box, assume that it cannot be expanded in place.
2146 2011-10-13 Vincent Celier <celier@adacore.com>
2148 * prj-conf.adb (Get_Or_Create_Configuration_File): Call
2149 Process_Project_Tree_Phase_1 with Packages_To_Check.
2150 (Process_Project_And_Apply_Config): Ditto
2151 * prj-part.ads, prj-part.adb, prj-pars.ads, prj-pars.adb (Parse):
2152 Remove default for argument Packages_To_Check.
2153 * prj-proc.adb (Recursive_Process): New argument
2156 (Process_Project_Tree_Phase_1): Ditto.
2157 (Recursive_Project.Process_Aggregated_Projects): Call
2158 Prj.Part.Parse and Process_Project_Tree_Phase_1 with
2160 * prj-proc.ads (Process): New argument Packages_To_Check
2161 (Process_Project_Tree_Phase_1): Ditto
2163 2011-10-13 Arnaud Charlet <charlet@adacore.com>
2165 * gcc-interface/Makefile.in: Fix typo.
2167 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2169 * sem_ch12.adb (Analyze_Formal_{Floating_Type,
2170 Signed_Integer_Type, Decimal_Fixed_Point_Type, Discrete_Type}):
2171 Use sloc of defining identifier of farmal type declaration,
2172 as sloc of generated internal entity, to prevent misplaced
2175 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2177 * sem_intr.adb (Check_Intrinsic_Operator): Check that type
2178 is fully defined before checking that it is a numeric type.
2180 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2182 * sem_aggr.adb (Resolve_Record_Aggregate): If a component
2183 association for component X has a box, then X is covered in the
2184 aggregate even if there is not default value for X in the type
2185 declaration, and X has to be default-initialized.
2187 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2189 * sem_attr.adb (Check_Enum_Image, Analyze_Attribute case 'Value): Mark
2190 literals as referenced only if reference is in current source unit.
2192 2011-10-13 Matthew Heaney <heaney@adacore.com>
2194 * a-csquin.ads (Enque, Dequeue): Mark interface operations as entries.
2196 2011-10-13 Olivier Hainque <hainque@adacore.com>
2198 * sigtramp.h: New file. Prototype and spec of the signal
2199 trampoline to be called by an established handler to provide
2200 dwarf call frame info before the real signal processing code.
2201 * sigtramp-ppcvxw.c: New file. Implementation of the signal
2202 trampoline for ppc-vxworks.
2203 * init.c (vxworks section): Use it for ppc.
2205 2011-10-13 Thomas Quinot <quinot@adacore.com>
2207 * par-ch2.adb, par.adb, par-util.adb, par-ch3.adb
2208 (Check_Future_Identifier): New subprogram,
2209 factors duplicated code from Par.Ch2.P_Identifier and
2210 Par.Ch3.P_Defining_Identifier.
2212 2011-10-13 Thomas Quinot <quinot@adacore.com>
2214 * s-taprop-posix.adb (Initialize): Always raise Storage_Error
2215 if we fail to initialize CV attributes or CV.
2217 2011-10-13 Thomas Quinot <quinot@adacore.com>
2219 * s-tasren.adb (Timed_Selective_Wait, case
2220 Accept_Alternative_Selected): Use Defer_Abort_Nestable, since
2221 we know abortion is already deferred.
2223 2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
2225 * exp_ch3.adb (Build_Class_Wide_Master): Moved to exp_ch9.
2226 (Build_Master_Renaming (function)): Removed.
2227 (Build_Master_Renaming (procedure)): Moved to exp_ch9.
2228 (Expand_Full_Type_Declaration): Alphabetize
2229 variables. Reformatting of code and comments. Rewrite the
2230 section on processing of anonymous access-to-task types in
2232 * exp_ch3.ads (Build_Class_Wide_Master): Moved to exp_ch9.
2233 (Build_Master_Renaming): Moved to exp_ch9.
2234 * exp_ch9.adb (Build_Class_Wide_Master): Moved from exp_ch3.
2235 (Build_Master_Entity): Add formal parameter
2236 Use_Current. Reformatting of code and comments.
2237 (Build_Master_Renaming): Moved from exp_ch3.
2238 * exp_ch9.ads (Build_Class_Wide_Master): Moved from
2239 exp_ch3. Update comment on usage.
2240 (Build_Master_Entity):
2241 Add formal parameter Use_Current. Update comment on usage.
2242 (Build_Master_Renaming): Moved from exp_ch3.
2243 * sem_ch3.adb (Access_Definition): Remove redundant code to
2244 create a _master and a renaming.
2246 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2248 * lib-xref.adb: Do no emit reference to overridden operation,
2249 if it is internally generated.
2251 2011-10-13 Vincent Celier <celier@adacore.com>
2253 * bindgen.adb: Remove any processing related to g-trasym
2254 * Makefile.rtl: Add g-trasym.o to GNATRTL_NONTASKING_OBJS
2255 * mlib-prj.adb: Remove any processing related to g-trasym.
2257 2011-10-12 Eric Botcazou <ebotcazou@adacore.com>
2259 * sem_util.adb (Denotes_Same_Prefix): Fix fatal warning.
2260 * gcc-interface/Make-lang.in (WARN_ADAFLAGS): New.
2261 (ALL_ADAFLAGS): Include WARN_ADAFLAGS.
2262 (ADA_FLAGS_TO_PASS): Likewise.
2263 (COMMON_FLAGS_TO_PASS): New.
2264 (ADA_TOOLS_FLAGS_TO_PASS): Use COMMON_FLAGS_TO_PASS. In the regular
2265 native case, also use FLAGS_TO_PASS and ADA_FLAGS_TO_PASS.
2266 (gnatlib): Use COMMON_FLAGS_TO_PASS.
2267 (ada.install-common): Likewise.
2268 (install-gnatlib): Likewise.
2269 (install-gnatlib-obj): Likewise.
2270 (gnattools): Use ADA_TOOLS_FLAGS_TO_PASS for gnattools1 as well.
2271 (gnat-cross): Delete.
2272 (gnatboot): Likewise.
2273 (gnatboot2): Likewise.
2274 (gnatboot3): Likewise.
2275 (gnatstage1): Likewise.
2276 (gnatstage2): Likewise.
2277 * gcc-interface/Makefile.in (SOME_ADAFLAGS): Likewise.
2278 (MOST_ADAFLAGS): Likewise.
2279 (LOOSE_CFLAGS): Likewise.
2280 (gnat-cross): Likewise.
2281 (GNATLIBFLAGS): Add -W -Wall.
2282 (GNATLIBCFLAGS_FOR_C): Likewise.
2283 * gcc-interface/lang.opt: Remove C-specific warnings. Add doc lines.
2284 * gcc-interface/misc.c (gnat_handle_option): Remove obsolete cases.
2286 2011-10-12 Eric Botcazou <ebotcazou@adacore.com>
2288 * gcc-interface/trans.c (Attribute_to_gnu): Use remove_conversions.
2289 (push_range_check_info): Likewise.
2290 (gnat_to_gnu) <N_Code_Statement>: Likewise.
2291 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: Likewise.
2292 (gnat_invariant_expr): Likewise.
2293 * gcc-interface/utils.c (compute_related_constant): Likewise.
2294 (max_size): Fix handling of SAVE_EXPR.
2295 (remove_conversions): Fix formatting.
2297 2011-10-12 Eric Botcazou <ebotcazou@adacore.com>
2299 * gcc-interface/ada-tree.h (DECL_LOOP_PARM_P): New flag.
2300 (DECL_INDUCTION_VAR): New macro.
2301 (SET_DECL_INDUCTION_VAR): Likewise.
2302 * gcc-interface/gigi.h (convert_to_index_type): Declare.
2303 (gnat_invariant_expr): Likewise.
2304 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: If this is a loop
2305 parameter, set DECL_LOOP_PARM_P on it.
2306 * gcc-interface/misc.c (gnat_print_decl) <VAR_DECL>: If DECL_LOOP_PARM_P
2307 is set, print DECL_INDUCTION_VAR instead of DECL_RENAMED_OBJECT.
2308 * gcc-interface/trans.c (gnu_loop_label_stack): Delete.
2309 (struct range_check_info_d): New type.
2310 (struct loop_info_d): Likewise.
2311 (gnu_loop_stack): New stack.
2312 (Identifier_to_gnu): Set TREE_READONLY flag on the first dereference
2313 built for a by-double-ref read-only parameter. If DECL_LOOP_PARM_P
2314 is set, do not test DECL_RENAMED_OBJECT.
2315 (push_range_check_info): New function.
2316 (Loop_Statement_to_gnu): Push a new struct loop_info_d instead of just
2317 the label. Reference the label and the iteration variable from it.
2318 Build the special induction variable in the unsigned version of the
2319 size type, if it is larger than the base type. And attach it to the
2320 iteration variable if the latter isn't by-ref. In the iteration scheme
2321 case, initialize the invariant conditions in front of the loop if
2322 deemed profitable. Use gnu_loop_stack.
2323 (gnat_to_gnu) <N_Exit_Statement>: Use gnu_loop_stack.
2324 <N_Raise_Constraint_Error>: Always process the reason. In the range
2325 check and related cases, and if loop unswitching is enabled, compute
2326 invariant conditions and push this information onto the stack.
2327 Do not translate again the condition if it has been already translated.
2328 * gcc-interface/utils.c (record_global_renaming_pointer): Assert that
2329 DECL_LOOP_PARM_P isn't set.
2330 (convert_to_index_type): New function.
2331 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Use it in order
2332 to convert the index from the base index type to sizetype.
2333 (gnat_invariant_expr): New function.
2335 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
2337 * gcc-interface/utils.c (def_builtin_1): Delete old interface with
2338 two parallel arrays to hold standard builtin declarations, and
2339 replace it with a function based interface that can support
2340 creating builtins on the fly in the future.
2341 * gcc-interface/trans.c (Exception_Handler_to_gnu_zcx): Ditto.
2342 (gnat_to_gnu): Ditto.
2344 2011-10-07 Eric Botcazou <ebotcazou@adacore.com>
2347 * gcc-interface/gigi.h (gnat_pushdecl): Adjust comment.
2348 * gcc-interface/utils.c (global_context): New variable.
2349 (gnat_pushdecl): Initialize it and set it as the DECL_CONTEXT of DECLs
2350 that are either public external or at top level. Use "No" macro.
2351 (end_subprog_body): Call decl_function_context.
2352 (rest_of_subprog_body_compilation): Likewise.
2354 2011-10-07 Eric Botcazou <ebotcazou@adacore.com>
2356 * gcc-interface/gigi.h (gnat_useless_type_conversion): Declare.
2357 (rest_of_subprog_body_compilation): Likewise.
2358 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: For renaming,
2359 test for useless conversions by means of gnat_useless_type_conversion.
2360 * gcc-interface/trans.c: Include bitmap.h and cgraph.h.
2361 (language_function): Add named_ret_val and other_ret_val.
2362 (f_named_ret_val): New macro.
2363 (f_other_ret_val): Likewise.
2364 (gigi): Call rest_of_subprog_body_compilation.
2365 (struct nrv_data): New structure.
2366 (is_nrv_p): New predicate.
2367 (prune_nrv_r): New helper function.
2368 (prune_nrv_in_block): New function.
2369 (finalize_nrv_r): New helper function.
2370 (finalize_nrv): New function.
2371 (return_value_ok_for_nrv_p): New predicate.
2372 (build_return_expr): If optimization is enabled, record candidates for
2373 the Named Return Value optimization.
2374 (build_function_stub): Call rest_of_subprog_body_compilation.
2375 (Subprogram_Body_to_gnu): If optimization is enabled and there are
2376 candidates, finalize the Named Return Value optimization.
2377 Call rest_of_subprog_body_compilation.
2378 (call_to_gnu): At the end, if a return value is needed, simplify the
2379 result before wrapping it up in a COMPOUND_EXPR.
2380 * gcc-interface/utils.c (end_subprog_body): Split into...
2381 (rest_of_subprog_body_compilation): ...this. New function.
2382 (gnat_useless_type_conversion): Likewise.
2384 2011-10-06 Thomas Quinot <quinot@adacore.com>
2386 * einfo.ads, exp_attr.adb, exp_ch3.adb, exp_ch4.adb, exp_ch7.adb,
2387 exp_ch9.adb, exp_ch9.ads, exp_strm.adb, exp_util.adb, freeze.adb,
2388 g-debpoo.ads, opt.ads, par-ch12.adb, par-ch2.adb, par-ch3.adb,
2389 par-ch5.adb, par-ch6.adb, sem_aggr.adb, sem_attr.adb, sem_cat.adb,
2390 sem_ch10.adb, sem_ch12.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
2391 sem_ch6.adb, sem_intr.adb, sem_res.ads, sem_type.adb, sem_util.adb,
2392 s-regpat.adb, s-tpopde-vms.ads: Minor reformatting.
2393 * s-osinte-freebsd.ads: Fix for tasking failures on FreeBSD.
2395 2011-10-06 Ed Schonberg <schonberg@adacore.com>
2397 * a-cihase.adb, a-ciorma.adb: Avoid accessibility checks in container
2400 2011-10-06 Matthew Heaney <heaney@adacore.com>
2402 * a-cuprqu.ads, a-cuprqu.adb, a-cbprqu.ads, a-cbprqu.adb
2403 (Dequeue_Only_High_Priority): Protected procedure now implemented.
2405 2011-10-06 Vincent Celier <celier@adacore.com>
2407 * g-trasym.adb: Replace old implementation with the default
2408 implementation that returns list of addresses as "0x...".
2409 * g-trasym.ads: Update the list of platforms with the full
2410 capability. Indicate that there is a default implementation
2411 for other platforms.
2412 * g-trasym-unimplemented.ads, g-trasym-unimplemented.adb: Remove.
2413 * gcc-interface/Makefile.in: Remove g-trasym-unimplemented, as there
2414 is now a default implementation for all platforms without the full
2417 2011-10-06 Robert Dewar <dewar@adacore.com>
2419 * a-ciorse.adb, a-cihase.adb, a-cihase.ads, a-coorse.adb,
2420 a-cborse.adb, a-comutr.adb, a-ciorma.adb, a-cbmutr.adb,
2421 a-cbmutr.ads, a-cbhase.adb, a-cbhase.ads: Minor reformatting and code
2422 reorganization (use conditional expressions).
2424 2011-10-06 Robert Dewar <dewar@adacore.com>
2426 * sem_res.adb (Resolve_Arithmetic_Op): Fix bad warning for
2427 floating divide by zero.
2429 2011-10-06 Ed Schonberg <schonberg@adacore.com>
2431 * sem_ch6.adb: Limited interfaces that are not immutably limited
2432 are OK in return statements.
2434 2011-09-30 Iain Sandoe <iains@gcc.gnu.org>
2436 * gcc-interface/Makefile.in (Darwin): Partial reversion of previous
2437 change to powerpc section.
2439 2011-09-29 Iain Sandoe <iains@gcc.gnu.org>
2441 * gcc-interface/Makefile.in (Darwin): Factor LIBGNAT_TARGET_PAIRS
2444 2011-09-27 Ed Schonberg <schonberg@adacore.com>
2446 * a-cbhase.adb, a-cbhase.ads, a-cborse.adb, a-cborse.ads,
2447 a-cihase.adb, a-cihase.ads, a-ciorse.adb, a-ciorse.ads,
2448 a-coorse.adb, a-coorse.ads: Add iterator machinery to bounded sets and
2450 * a-coorma.ads: Minor reformmating.
2451 * einfo.ads: Improve the comment describing the
2452 Directly_Designated_Type function.
2453 * a-ciorma.adb, a-ciorma.ads: Add iterator machinery to indefinite
2455 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
2458 2011-09-27 Robert Dewar <dewar@adacore.com>
2460 * a-comutr.ads: Minor reformatting.
2462 2011-09-27 Ed Schonberg <schonberg@adacore.com>
2464 * a-cimutr.adb, a-cimutr.ads, a-cbmutr.adb, a-cbmutr.ads: Add children
2465 iterators to multiway trees.
2467 2011-09-27 Yannick Moy <moy@adacore.com>
2469 * debug.adb (d.D): New option for strict Alfa mode.
2470 * opt.ads (Strict_Alfa_Mode): New flag to interpret compiler
2471 permissions as strictly as possible.
2472 * sem_ch3.adb (Signed_Integer_Type_Declaration): In non-strict
2473 Alfa mode, now, interpret ranges of base types like GNAT does; in
2474 strict mode, simply change the range of the implicit base Itype.
2475 * gnat1drv.adb: Update comments. Set Strict_Alfa_Mode.
2477 2011-09-27 Robert Dewar <dewar@adacore.com>
2479 * exp_ch9.adb: Minor comment fixes.
2481 2011-09-27 Ed Schonberg <schonberg@adacore.com>
2483 * a-comutr.adb, a-comutr.ads: Add children iterators on multiway
2486 2011-09-27 Eric Botcazou <ebotcazou@adacore.com>
2488 * checks.adb (Apply_Scalar_Range_Check): Use Designated_Type
2489 instead of Directly_Designated_Type in the indirect array case.
2491 2011-09-27 Robert Dewar <dewar@adacore.com>
2493 * exp_util.adb, exp_aggr.adb: Minor reformatting.
2495 2011-09-27 Ed Schonberg <schonberg@adacore.com>
2497 * sinfo.ads, par-ch3.adb: Minor comment update: aspect specification
2498 on subtype declarations.
2499 * exp_aggr.adb: Minor comment update.
2501 2011-09-27 Eric Botcazou <ebotcazou@adacore.com>
2503 * exp_util.adb (Safe_Prefixed_Reference): Remove always-false
2504 test in the N_Explicit_Dereference case. Fold double logical
2505 negation in the special loop case and conditionalize it on
2506 Variable_Ref being true.
2508 2011-09-27 Ed Schonberg <schonberg@adacore.com>
2510 * sem_ch4.adb (Analyze_Selected_Component): If the prefix is a
2511 single protected object and the selector is a discriminant or an
2512 entry family, this is a non-overloaded candidate interpretation,
2513 and possible primitive operations of the type must not be
2516 2011-09-27 Arnaud Charlet <charlet@adacore.com>
2518 * s-taspri-posix-noaltstack.ads (Lock): Mark fields aliased.
2520 2011-09-27 Pascal Obry <obry@adacore.com>
2522 * s-osinte-hpux.ads, s-osinte-aix.ads, s-osinte-solaris-posix.ads,
2523 s-osinte-irix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads:
2524 Add dummy definitions for pthread_rwlock_t
2525 and pthread_rwlockattr_t on all POSIX platforms.
2526 * s-taprop-irix.adb, s-taprop-posix.adb (Initialize_Lock): Fix lock
2528 (Finalize_Lock): Likewise.
2529 (Write_Lock): Likewise.
2532 2011-09-27 Tristan Gingold <gingold@adacore.com>
2534 * s-tassta.adb (Task_Wrapper): Increase Guard_Page_Size value for
2537 2011-09-27 Pascal Obry <obry@adacore.com>
2539 * s-osinte-hpux.ads, s-taprop-vxworks.adb, s-taspri-vxworks.ads,
2540 s-taprop-tru64.adb, s-osinte-aix.ads, s-taspri-posix-noaltstack.ads,
2541 s-taspri-mingw.ads, s-taprop-vms.adb, s-tpoben.adb, s-tpoben.ads,
2542 s-taprop-mingw.adb, s-taprob.adb, s-taprob.ads,
2543 s-osinte-solaris-posix.ads, s-taprop-solaris.adb, s-taspri-solaris.ads,
2544 s-osinte-irix.ads, s-taprop-irix.adb, s-osinte-darwin.ads,
2545 s-taspri-dummy.ads, s-taspri-posix.ads, s-taprop.ads,
2546 s-taspri-vms.ads, s-osinte-freebsd.ads, s-taprop-hpux-dce.adb,
2547 s-taspri-hpux-dce.ads, s-taspri-tru64.ads, s-taprop-dummy.adb,
2548 s-taprop-posix.adb: Revert previous changes.
2549 (Lock): Now a record containing the two possible lock
2550 (mutex and read/write) defined in OS_Interface.
2551 * s-taprop-linux.adb (Finalize_Protection): Use r/w lock for
2553 (Initialize_Protection): Likewise.
2555 (Lock_Read_Only): Likewise.
2558 2011-09-27 Pascal Obry <obry@adacore.com>
2560 * s-taspri-posix-noaltstack.ads (RW_Lock): This type is now defined as
2561 OS_Interface.pthread_rwlock_t.
2563 2011-09-27 Robert Dewar <dewar@adacore.com>
2565 * exp_ch9.adb, a-cimutr.adb, a-cimutr.ads, gnat1drv.adb, a-comutr.adb,
2566 a-comutr.ads, exp_dist.adb, a-cbmutr.adb, a-cbmutr.ads,
2567 sem_ch5.adb, sem_util.adb: Minor reformatting.
2569 2011-09-27 Pascal Obry <obry@adacore.com>
2571 * s-taprop.ads (Initialize_Lock)[RW_Lock]: New spec for r/w lock.
2572 (Finalize_Lock)[RW_Lock]: Likewise.
2573 (Write_Lock)[RW_Lock]: Likewise.
2574 (Unlock)[RW_Lock]: Likewise.
2575 (Read_Lock): Define L as RW_Lock (instead of Lock).
2576 * s-taprop-linux.adb (Initialize_Lock)[RW_Lock]: New
2577 routine for r/w lock.
2578 (Finalize_Lock)[RW_Lock]: Likewise.
2579 (Write_Lock)[RW_Lock]: Likewise.
2580 (Unlock)[RW_Lock]: Likewise.
2581 (Read_Lock): Define L as RW_Lock (instead of Lock).
2583 * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
2584 s-taprop-mingw.adb, s-taprop-solaris.adb, s-taprop-irix.adb,
2585 s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
2586 (Initialize_Lock)[RW_Lock]: Same implementation as corresponding
2587 routine for standard lock.
2588 (Finalize_Lock)[RW_Lock]: Likewise.
2589 (Write_Lock)[RW_Lock]: Likewise.
2590 (Unlock)[RW_Lock]: Likewise.
2591 (Read_Lock): Define L as RW_Lock (instead of Lock).
2592 * s-taprob.ads, s-tpoben.ads (Protection): Add RWL (RW_Lock)
2593 in the record definition.
2594 * s-taprob.adb, s-taproben.adb (Finalize_Protection): Use r/w
2595 lock for 'R' locking policy.
2596 (Initialize_Protection): Likewise.
2598 (Lock_Read_Only): Likewise.
2600 * s-taspri-posix.ads (RW_Lock): New type defined as
2601 OS_Interface.pthread_rwlock_t.
2603 * s-taspri-vxworks.ads, s-taspri-posix-noaltstack.ads,
2604 s-taspri-mingw.ads, s-taspri-solaris.ads, s-taspri-dummy.ads,
2605 s-taspri-posix.ads, s-taspri-vms.ads, s-taspri-hpux-dce.ads,
2606 s-taspri-tru64.ads (RW_Lock): New type defined as alias to Lock.
2608 2011-09-27 Pascal Obry <obry@adacore.com>
2610 * exp_ch9.adb, s-taspri-posix.ads: Minor reformatting.
2612 2011-09-27 Pascal Obry <obry@adacore.com>
2614 * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
2615 s-osinte-hpux.ads, s-osinte-irix.ads,
2616 s-osinte-solaris-posix.ads (pthread_rwlock_t): New definition alias of
2618 (pthread_rwlockattr_t): New definition alias of pthread_mutexattr_t.
2619 * s-osinte-linux.ads (pthread_rwlock_t, pthread_rwlockattr_t,
2620 pthread_rwlockattr_init, pthread_rwlockattr_destroy,
2621 pthread_rwlockattr_setkind_np, pthread_rwlock_init,
2622 pthread_rwlock_destroy, pthread_rwlock_rdlock,
2623 pthread_rwlock_wrlock, pthread_rwlock_unlock): New.
2625 2011-09-27 Pascal Obry <obry@adacore.com>
2627 * rtsfind.ads: Add RE_Lock_Read_Only into rtsfind circuitry.
2628 (RE_Id): Add RE_Lock_Read_Only.
2629 (RE_Unit_Table): Likewise.
2630 * sem_prag.adb (Process_Convention): Change Pragma_Locking_Policy
2631 to lift restriction on first character. Handle now the
2632 Name_Concurrent_Readers_Locking where policy character is set to
2634 * snames.ads-tmpl (Name_Concurrent_Readers_Locking): New
2636 * exp_ch9.adb (Build_Protected_Subprogram_Body): Generate a
2637 read only lock for function in protected object.
2638 * s-taprob.ads (Lock_Read_Only): Remove obsolete comment as
2639 this routine is now used.
2641 2011-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2643 * s-atocou-x86.adb (Decrement): Use %;.
2644 (Increment): Likewise.
2646 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
2648 * gcc-interface/utils2.c (build_allocator): Set TREE_THIS_NOTRAP on the
2649 dereference of the pointer to the storage area. Remove useless type
2650 conversions and factor out common code.
2652 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
2654 * gcc-interface/utils.c (maybe_unconstrained_array): Declare TYPE local
2655 variable and use it throughout.
2656 <UNCONSTRAINED_ARRAY_TYPE>: Add 'break' at the end.
2657 <RECORD_TYPE>: Do not unconditionally convert to the unpadded type as a
2658 first step. Also convert to the unpadded type as a last step.
2660 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
2662 * gcc-interface/gigi.h (create_subprog_decl): Replace TREE_CHAIN with
2663 DECL_CHAIN in comment.
2664 * gcc-interface/trans.c (gigi): Likewise.
2665 (Attribute_to_gnu): Likewise.
2666 (build_function_stub): Likewise.
2667 (gnat_to_gnu): Likewise.
2668 * gcc-interface/utils.c (create_subprog_decl): Likewise.
2669 (convert_vms_descriptor64): Likewise.
2670 (convert_vms_descriptor32): Likewise.
2672 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
2674 * gcc-interface/trans.c (assoc_to_constructor): Minor tweaks.
2675 * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting
2676 issues. Use COMPLETE_TYPE_P in assertion. Also set TREE_READONLY if
2677 the type of the record is TYPE_READONLY.
2679 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
2680 Robert Dewar <dewar@adacore.com>
2682 * sem_ch6.adb (Set_Formal_Mode): Set Can_Never_Be_Null on an IN or IN
2683 OUT formal parameter which is of an null-exclusion access subtype.
2685 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
2687 * gcc-interface/ada-tree.h (DECL_CAN_NEVER_BE_NULL_P): New macro.
2688 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Set the flag.
2689 (gnat_to_gnu_param): Likewise.
2690 * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Invoke
2691 maybe_unconstrained_array instead of doing the work manually.
2692 (maybe_unconstrained_array): Propagate the TREE_THIS_NOTRAP flag.
2693 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: If operand
2694 is a DECL with the flag, set TREE_THIS_NOTRAP on the reference.
2695 (gnat_stabilize_reference_1): Propagate the TREE_THIS_NOTRAP flag.
2696 (gnat_stabilize_reference): Likewise.
2698 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
2700 * gcc-interface/ada-tree.h (TYPE_NULL_BOUNDS): New macro.
2701 (SET_TYPE_NULL_BOUNDS): Likewise.
2702 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Set again
2703 TREE_THIS_NOTRAP on the INDIRECT_REF node built for the template.
2704 * gcc-interface/trans.c (Identifier_to_gnu): Return initializers of fat
2706 * gcc-interface/utils.c (create_var_decl_1): If the object is external,
2707 check that the initializer is a valid constant expression for use in
2708 initializing a static variable. Add missing guard.
2709 (update_pointer_to): Adjust TYPE_NULL_BOUNDS if set.
2710 (convert_to_fat_pointer): In the null fat pointer case, build a valid
2711 pointer for the bounds.
2712 * gcc-interface/utils2.c (compare_fat_pointers): New function.
2713 (build_binary_op) <EQ_EXPR>: Call it to compare fat pointers.
2715 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
2717 * gcc-interface/ada-tree.h (TREE_THIS_NOTRAP): Redefine.
2718 * gcc-interface/trans.c (Identifier_to_gnu): Factor out common code in
2719 the by-ref case. Do not set TREE_READONLY on a renamed object. Set
2720 TREE_THIS_NOTRAP on UNCONSTRAINED_ARRAY_REF nodes.
2721 (Attribute_to_gnu) <Attr_Length>: Expand the use of the parameter cache
2722 to the indirect case.
2723 * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Preserve
2724 the TREE_THIS_NOTRAP flag.
2726 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
2728 * gcc-interface/trans.c (Loop_Statement_to_gnu): In the case of an
2729 iteration scheme, always generate the do-while form if optimization
2730 is enabled. Use more straightforward test at the end.
2732 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
2734 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Subtype>: Use
2735 XNEW instead of xmalloc. Do not build useless pointer type.
2736 <E_Anonymous_Access_Subprogram_Type>: Use XNEW instead of xmalloc.
2737 * gcc-interface/trans.c (gnat_to_gnu) <N_Raise_Constraint_Error>: Tidy.
2738 * gcc-interface/utils2.c (build_unary_op): Remove local variable.
2740 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
2742 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not promote
2743 the alignment if this doesn't prevent BLKmode access to the object.
2745 2011-09-24 Iain Sandoe <iains@gcc.gnu.org>
2747 * gcc-interface/Makefile.in (darwin): Do not issue the
2748 '-flat_namespace' linker flag during Ada build.
2749 * mlib-tgt-specific-darwin.adb: Remove '-flat_namespace' flag from the
2750 default shared library options.
2752 2011-09-19 Alexandre Oliva <aoliva@redhat.com>
2754 * gcc-interface/decl.c (annotate_value): Look up expression for
2755 insertion in the cache at the end.
2757 2011-09-19 Arnaud Charlet <charlet@adacore.com>
2759 * gcc-interface/Make-lang.in: Update dependencies.
2761 2011-09-19 Steve Baird <baird@adacore.com>
2763 * snames.ads-tmpl: Move declaration of Name_Annotate into range of
2764 configuration pragma names so that Is_Configuration_Pragma_Name
2765 will return True for Name_Annotate. Make corresponding change in
2766 Pragma_Id enumeration type. This is needed to allow an Annotate
2767 pragma to occur in a configuration pragma file (typically,
2769 * gnat_ugn.texi: Add Annotate to the list of configuration pragmas.
2770 * gnat_rm.texi: Note that pragma Annotate may be used as a
2771 configuration pragma.
2773 2011-09-19 Ed Schonberg <schonberg@adacore.com>
2775 * a-cbmutr.adb, a-cbmutr.ads, a-cimutr.adb, a-cimutr.ads,
2776 a-comutr.adb, a-comutr.ads: Add iterator machinery for multiway trees.
2778 2011-09-19 Yannick Moy <moy@adacore.com>
2780 * exp_alfa.adb, exp_alfa.ads (Expand_Alfa_N_In): New function
2781 for expansion of set membership.
2782 (Expand_Alfa): Call expansion for N_In and N_Not_In nodes.
2783 * exp_ch4.adb, exp_ch4.ads (Expand_Set_Membership): Make procedure
2784 visible for use in Alfa expansion.
2785 * sem_ch5.adb (Analyze_Iterator_Specification): Introduce loop
2786 variable in Alfa mode.
2788 2011-09-19 Thomas Quinot <quinot@adacore.com>
2790 * s-osinte-darwin.ads: Change SIGADAABRT on Darwin to SIGABRT.
2792 2011-09-19 Thomas Quinot <quinot@adacore.com>
2794 * exp_ch9.adb: Minor reformatting.
2796 2011-09-19 Hristian Kirtchev <kirtchev@adacore.com>
2798 * freeze.adb (Build_Renamed_Body): Generic subprograms
2799 instantiations cannot be poperly inlined by the compiler, do
2800 not set the Body_To_Inline attribute in such cases.
2801 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Inherit all
2802 inlining-related flags from the generic subprogram declaration.
2804 2011-09-19 Thomas Quinot <quinot@adacore.com>
2806 * exp_dist.adb, rtsfind.ads, sem_util.adb, sem_util.ads
2807 (Build_Stub_Type): Remove, instead copy components from
2808 System.Partition_Interface.RACW_Stub_Type.
2809 (RPC_Receiver_Decl): Remainder of code from old Build_Stub_Type routine.
2810 (Copy_Component_List): New subprogram.
2812 2011-09-19 Yannick Moy <moy@adacore.com>
2814 * lib-xref.adb (Generate_Reference): Ignore references to
2815 constants in Standard.
2817 2011-09-19 Robert Dewar <dewar@adacore.com>
2819 * err_vars.ads, errout.ads: Minor reformatting.
2821 2011-09-19 Robert Dewar <dewar@adacore.com>
2823 * aspects.ads (Impl_Defined_Aspects): New array
2824 * lib-writ.adb (No_Dependences): New name for No_Dependence
2825 * restrict.adb (No_Dependences): New name for No_Dependence
2826 (Check_Restriction_No_Specification_Of_Aspect): New
2828 (Set_Restriction_No_Specification_Of_Aspect): New procedure
2829 (Restricted_Profile_Result): New variable
2830 (No_Specification_Of_Aspects): New variable
2831 (No_Specification_Of_Aspect_Warning): New variable
2832 * restrict.ads (No_Dependences): New name for No_Dependence
2833 (Check_Restriction_No_Specification_Of_Aspect): New procedure
2834 (Set_Restriction_No_Specification_Of_Aspect): New procedure
2835 * s-rident.ads: Add restriction
2836 No_Implementation_Aspect_Specifications, this is also added to
2837 the No_Implementation_Extensions profile.
2838 * sem_ch13.adb (Analyze_Aspect_Specifications): Check
2839 No_Implementation_Defined_Aspects
2840 (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
2841 * sem_prag.adb (Analyze_Aspect_Specifications): Check
2842 No_Implementation_Aspects
2843 (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
2844 * snames.ads-tmpl (Name_No_Specification_Of_Aspect): New name
2846 2011-09-19 Yannick Moy <moy@adacore.com>
2848 * lib-xref.adb (Generate_Reference): Take into account multiple
2849 renamings for Alfa refs.
2851 2011-09-19 Thomas Quinot <quinot@adacore.com>
2853 * g-socthi-mingw.adb: Minor reformatting.
2855 2011-09-19 Yannick Moy <moy@adacore.com>
2857 * gnat1drv.adb (Adjust_Global_Switches): Set tagged type
2858 expansion to False in mode Alfa
2860 2011-09-19 Pascal Obry <obry@adacore.com>
2862 * mingw32.h: Remove obsolete code needed for old versions
2865 2011-09-19 Robert Dewar <dewar@adacore.com>
2867 * errout.ads: Minor reformatting.
2869 2011-09-19 Ed Schonberg <schonberg@adacore.com>
2871 * sem_ch6.adb (Analyze_Expression_Function): When the expression
2872 function is transformed into a declaration and a body, insert
2873 body at the end of the declarative part, to prevent premature
2874 freeze actions, and preserve original specification in the
2875 subprogram declaration.
2877 2011-09-19 Vincent Celier <celier@adacore.com>
2879 * projects.texi: Minor editing.
2881 2011-09-19 Robert Dewar <dewar@adacore.com>
2883 * sem_aggr.adb, lib-writ.ads, s-restri.ads, sem_ch6.adb,
2884 exp_aggr.adb: Minor reformatting.
2886 2011-09-19 Yannick Moy <moy@adacore.com>
2888 * lib-xref.adb (Generate_Reference): Change entity referenced
2889 to underlying object if any, or else reference to the HEAP.
2891 2011-09-15 Arnaud Charlet <charlet@adacore.com>
2893 * gcc-interface/Make-lang.in: Update dependencies.
2895 2011-09-15 Robert Dewar <dewar@adacore.com>
2897 * tree_io.ads: Minor reformatting.
2898 * a-intnam.ads: Fix bad header.
2900 2011-09-15 Thomas Quinot <quinot@adacore.com>
2902 * a-exexpr-gcc.adb: Minor reformatting.
2904 2011-09-15 Yannick Moy <moy@adacore.com>
2906 * sem_ch6.adb: Propagate information that an expression function comes
2907 from source (otherwise references to this entity are not stored).
2909 2011-09-15 Robert Dewar <dewar@adacore.com>
2911 * a-cdlili.adb, a-coinve.adb, a-stzunb-shared.ads, a-suezst.adb,
2912 a-suenco.adb, a-stwiun-shared.ads, a-cobove.adb, a-convec.adb,
2913 a-btgbso.adb, a-cbdlli.adb, a-suewst.adb: Minor reformatting.
2915 2011-09-15 Ed Schonberg <schonberg@adacore.com>
2917 * sem_ch6.adb (Analyze_Expression_Function): Code cleanup:
2918 if the expression function is not a completion, create a
2919 new specification for the generated declaration, and keep the
2920 original specification in the generated body. Shorter code also
2921 ensures that proper warnings are generated for unused formals
2924 2011-09-15 Sergey Rybin <rybin@adacore.com>
2926 * tree_io.ads: Update ASIS_Version_Number because of the changes
2927 in the tree structures for expression functions.
2929 2011-09-15 Arnaud Charlet <charlet@adacore.com>
2931 * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
2932 s-osinte-hpux.ads, s-osinte-lynxos.ads, s-osinte-solaris-posix.ads,
2933 s-taprop-posix.adb (CLOCK_MONOTONIC): New constant.
2934 (CLOCK_REALTIME): Fix wrong value on some OSes.
2935 * s-taprop-posix.adb (Monotonic_Clock): Use CLOCK_MONOTONIC.
2937 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
2939 * gcc-interface/utils.c (maybe_unconstrained_array): In the reference
2940 to unconstrained array case, deal with each branch of a COND_EXPR.
2941 * gcc-interface/utils2.c (build_allocator): Deal with each branch of
2942 a COND_EXPR in the initializer, if present.
2944 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
2946 * gcc-interface/decl.c (maybe_pad_type): Do not try to change the form
2947 of an addressable type.
2948 * gcc-interface/trans.c (gnat_gimplify_expr) <VIEW_CONVERT_EXPR>: New.
2949 Deal with those cases for which creating a temporary is mandatory.
2951 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
2953 * gcc-interface/trans.c (call_to_gnu): Use local variable. Make sure
2954 this is a real formal parameter before testing whether it is by ref.
2956 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
2958 * gcc-interface/gigi.h (build_call_0_expr): Delete.
2959 (build_call_1_expr): Likewise.
2960 (build_call_2_expr): Likewise.
2961 (build_call_n_expr): New prototype.
2962 * gcc-interface/decl.c (gnat_to_gnu_entity): Use build_call_n_expr.
2963 * gcc-interface/trans.c (establish_gnat_vms_condition_handler): Ditto.
2964 (Handled_Sequence_Of_Statements_to_gnu): Likewise.
2965 (Exception_Handler_to_gnu_zcx): Likewise.
2966 (gnat_to_gnu): Likewise.
2967 (build_binary_op_trapv): Likewise.
2968 * gcc-interface/utils2.c (build_call_0_expr): Delete.
2969 (build_call_1_expr): Likewise.
2970 (build_call_2_expr): Likewise.
2971 (build_call_n_expr): New function.
2972 (build_call_raise): Use build_call_n_expr.
2973 (build_call_raise_range): Likewise.
2974 (build_call_raise_column): Likewise.
2975 (build_call_alloc_dealloc_proc): Likewise.
2976 (maybe_wrap_malloc): Likewise.
2977 (maybe_wrap_free): Likewise.
2979 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
2981 * gcc-interface/trans.c (build_return_expr): Use void_type_node for
2983 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Assert that
2984 the result type is null if ENABLE_CHECKING. Set operation_type at the
2985 end unconditionally if not set in the previous cases.
2986 Use build2 and void_type_node for MODIFY_EXPR.
2987 (build_allocator): Use NULL_TREE for MODIFY_EXPR.
2989 2011-09-08 Eric Botcazou <ebotcazou@adacore.com>
2991 * gcc-interface/utils.c (unchecked_convert): Use a field of the right
2992 precision when converting to or from an integral type whose precision
2993 is not equal to its size.
2995 2011-09-08 Iain Sandoe <iains@gcc.gnu.org>
2997 * traceback.c (Darwin) USE_GCC_UNWINDER for Darwin versions >= 8.
2999 2011-09-07 Iain Sandoe <iains@gcc.gnu.org>
3001 * gcc-interface/Makefile.in (darwin): Provide powerpc64 system
3003 * system-darwin-ppc64.ads: New file.
3005 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
3007 * gcc-interface/Makefile.in (gnatlib-shared-darwin): Remove
3010 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
3012 * gcc-interface/Makefile.in (darwin, SO_OPTS): Provide architecture
3013 size switches to the link phase for shared libs.
3015 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
3017 * gcc-interface/Makefile.in (x86_64 darwin arch): Adjust
3018 LIBGNAT_TARGET_PAIRS for x86 and x86_64 variants.
3020 2011-09-06 Arnaud Charlet <charlet@adacore.com>
3022 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in
3023 (gnattools, regnattools, cross-gnattools, canadian-gnattools,
3024 gnatlib, gnatlib-sjlj, gnatlib-zcx, gnatlib-shared, gnatlib_and_tools):
3026 (TOOLS_FLAGS_TO_PASS): New.
3027 (../stamp-tools): Reintroduce, to avoid merge conflicts.
3029 2011-09-06 Robert Dewar <dewar@adacore.com>
3031 * sem_ch10.adb, impunit.ads, impunit.adb (Not_Impl_Defined_Unit): New
3032 name for Is_RM_Defined_Unit. Also several fixes to this unit.
3034 2011-09-06 Robert Dewar <dewar@adacore.com>
3036 * impunit.ads, impunit.adb (Is_RM_Defined_Unit): New function.
3037 * s-rident.ads: New restriction No_Implementation_Units
3038 (this restriction is also part of the profile
3039 No_Implementation_Extensions)
3040 * sem_ch10.adb (Analyze_With_Clause): Add check for
3041 No_Implementation_Units restriction.
3043 2011-09-06 Jerome Guitton <guitton@adacore.com>
3045 * sysdep.c (__gnat_get_task_options): Disable VX_SPE_TASK
3048 2011-09-06 Thomas Quinot <quinot@adacore.com>
3050 * s-solita.adb: Minor reformatting.
3052 2011-09-06 Ed Schonberg <schonberg@adacore.com>
3054 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The body that
3055 is a rewriting of an expression function does not freeze previous
3058 2011-09-06 Robert Dewar <dewar@adacore.com>
3060 * impunit.adb (Is_Known_Unit): Fix bad handling of Ada 2012 case
3062 2011-09-06 Tristan Gingold <gingold@adacore.com>
3064 * gcc-interface/Makefile.in: Handle e500v2-wrs-vxworksae like
3065 powerpc-wrs-vxworksae.
3067 2011-09-06 Thomas Quinot <quinot@adacore.com>
3069 * s-os_lib.ads (Spawn): Minor documentation clarification,
3070 Success is True for a zero exit status.
3072 2011-09-06 Ed Schonberg <schonberg@adacore.com>
3074 * sem_ch5.adb: Add message for common iterator error.
3076 2011-09-06 Ed Schonberg <schonberg@adacore.com>
3078 * exp_ch3.adb (Build_Initialization_Call): If the target is a
3079 selected component discriminated by a current instance, replace
3080 the constraint with a reference to the target object, regardless
3081 of whether the context is an init_proc.
3083 2011-09-06 Robert Dewar <dewar@adacore.com>
3085 * exp_attr.adb: Descriptor_Size is never static.
3087 2011-09-06 Robert Dewar <dewar@adacore.com>
3089 * gnat_ugn.texi: Add documentation for LSLOC metric in gnatmetric
3091 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
3093 * gnat_rm.texi: Clarify that attribute Descriptor_Size is
3096 2011-09-06 Ed Schonberg <schonberg@adacore.com>
3098 * sem_res.adb (Resolve): An expression that is the body of an
3099 expression function does not freeze.
3101 2011-09-06 Matthew Heaney <heaney@adacore.com>
3103 * a-csquin.ads, a-cusyqu.adb, a-cbprqu.adb, a-cbsyqu.adb,
3104 a-cuprqu.adb: Changed copyright notice to indicate current
3107 2011-09-06 Vincent Celier <celier@adacore.com>
3109 * prj.adb: Minor spelling error fix in comment
3110 * sem_res.adb: Minor reformatting
3112 2011-09-06 Pascal Obry <obry@adacore.com>
3114 * sysdep.c (winflush_nt): Removed as not needed anymore.
3115 (winflush_95): Likewise.
3116 (winflush_init): Likewise.
3117 (winflush_function): Likewise.
3118 (getc_immediate_common): Remove call to winflush_function.
3120 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
3122 * exp_attr.adb (Expand_N_Attribute_Reference): Rewrite the
3123 processing for Descriptor_Size.
3124 * gnat_rm.texi: Rephrase the wording for attribute Descriptor_Size
3125 to account for its broader usage.
3126 * sem_attr.adb (Analyze_Attribute): Change the error detection
3127 circuitry for Descriptor_Size as the attribute is now applicable
3130 2011-09-06 Robert Dewar <dewar@adacore.com>
3132 * sem_attr.adb, prj-nmsc.adb, exp_aggr.adb: Minor reformatting.
3134 2011-09-06 Ed Schonberg <schonberg@adacore.com>
3136 * lib-xref.adb (OK_To_Set_Referenced): A reference to a formal
3137 in a parameter association must not set the Referenced flag on
3139 * prj-nmsc.adb (Check_File_Naming_Schemes): Remove useless formal
3141 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
3143 * gnat_rm.texi: Add a section on attribute Descriptor_Size
3145 2011-09-06 Arnaud Charlet <charlet@adacore.com>
3147 * gcc-interface/Makefile.in (common-tools, gnatmake-re,
3148 gnatlink-re): Speed up by using -j0.
3150 2011-09-06 Yannick Moy <moy@adacore.com>
3152 * sem_ch13.adb (Analyze_Aspect_Specifications): Call
3153 Set_Corresponding_Aspect when creating pragma from aspect.
3154 (Add_Predicates): Use new field Corresponding_Aspect.
3155 * sem_prag.adb (Analyze_Pragma): Make Pname hold source aspect
3156 name when present, for the purpose of issuing error messages;
3157 remove local procedure Error_Pragma_Arg_Alternate_Name.
3158 * sinfo.adb, sinfo.ads (Corresponding_Aspect): New field in
3160 (From_Dynamic_Predicate, From_Static_Predicate): Remove fields from
3163 2011-09-06 Robert Dewar <dewar@adacore.com>
3165 * checks.adb, s-except.ads, g-socket.adb: Minor reformatting.
3167 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
3169 * exp_ch6.adb (Build_Heap_Allocator): Add new
3170 local variable Desig_Typ. Code and comment reformatting. Add
3171 machinery to ensure that the allocation uses a fat pointer when
3172 the type of the return object is a constrained array and the
3173 function return type is an unconstrained array.
3175 2011-09-06 Vincent Celier <celier@adacore.com>
3177 * make.adb, prj-part.adb, prj-nmsc.adb: Remove unused formal
3178 parameters in subprograms.
3180 2011-09-06 Arnaud Charlet <charlet@adacore.com>
3182 * s-taprop-mingw.adb (Finalize_TCB): Fix typo.
3184 2011-09-06 Thomas Quinot <quinot@adacore.com>
3186 * s-taprop-vxworks.adb, s-tpoaal.adb, s-tpopsp-vxworks.adb
3187 (System.Tasking.Primitive_Operations.Specific.Delete): Remove
3189 (System.Tasking.Primitive_Operations.Specific.Set): If argument
3190 is null, destroy task specific data, to make API consistent with
3191 other platforms, and thus compatible with the shared version
3193 (System.Tasking.Primitive_Operations.ATCB_Allocation.Free_ATCB):
3194 Document the above assumption.
3196 2011-09-06 Ed Schonberg <schonberg@adacore.com>
3198 * exp_ch6.adb (Expand_Inlined_Call): Fix use of uninitialized
3199 variable for type of return value when return type is
3200 unconstrained and context is an assignment.
3202 2011-09-06 Ed Schonberg <schonberg@adacore.com>
3204 * sem_ch8.adb (Check_Class_Wide_Actual): Do not generate body of
3205 class-wide operation if expansion is not enabled.
3207 2011-09-06 Eric Botcazou <ebotcazou@adacore.com>
3209 * checks.adb (Apply_Scalar_Range_Check): Deal with access
3212 2011-09-06 Yannick Moy <moy@adacore.com>
3214 * sem_ch13.adb (Analyze_Aspect_Specifications, case
3215 Aspect_Invariant): Do not issue error at this point on illegal
3216 pragma placement, as this is checked later on when analyzing
3217 the corresponding pragma.
3218 * sem_prag.adb (Error_Pragma_Arg_Alternate_Name): New procedure
3219 similar to Error_Pragma_Arg, except the source name of the
3220 aspect/pragma to use in warnings may be equal to parameter
3221 Alt_Name (Analyze_Pragma, case Pragma_Invariant): refine error
3222 message to distinguish source name of pragma/aspect, and whether
3223 the illegality resides in the type being public, or being private
3224 without a public declaration
3226 2011-09-06 Thomas Quinot <quinot@adacore.com>
3228 * g-socket.adb (Check_For_Fd_Set): On Windows, no need for bitmap
3229 size check (fd_set is implemented differently on that platform).
3231 2011-09-06 Thomas Quinot <quinot@adacore.com>
3233 * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
3234 s-tpoaal.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
3235 s-taprop-solaris.adb, s-taprop-irix.adb, s-taprop.ads,
3236 s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
3237 (ATCB_Allocation): New subpackage of
3238 System.Tasking.Primitive_Operations, shared across all targets
3239 with full tasking runtime.
3240 (ATCB_Allocation.New_ATCB): Moved there (from target specific
3242 (ATCB_Allocation.Free_ATCB): New subprogram. Deallocate an ATCB,
3243 taking care of establishing a local temporary ATCB if the one
3244 being deallocated is Self, to avoid a reference to the freed
3245 ATCB in Abort_Undefer.
3247 2011-09-06 Thomas Quinot <quinot@adacore.com>
3249 * s-tassta.adb, s-taskin.ads (Free_Task): If the task is not
3250 terminated, mark it for deallocation upon termination.
3251 (Terminate_Task): Call Free_Task again if the task is marked
3252 for automatic deallocation upon termination.
3254 2011-09-06 Robert Dewar <dewar@adacore.com>
3256 * a-cbprqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cusyqu.ads,
3257 a-intnam-aix.ads, a-intnam-darwin.ads, a-intnam-dummy.ads,
3258 a-intnam-freebsd.ads, a-intnam-hpux.ads, a-intnam-irix.ads,
3259 a-intnam-linux.ads, a-intnam-lynxos.ads, a-intnam-mingw.ads,
3260 a-intnam-solaris.ads, a-intnam-tru64.ads,
3261 a-intnam-vms.ads, a-intnam-vxworks.ads, a-intnam.ads, interfac.ads,
3262 cstand.adb, s-maccod.ads: Mark all entities as Implementation_Defined
3263 * einfo.ads, einfo.adb (Is_Implementation_Defined): New flag
3264 * par-prag.adb: Add dummy entry for pragma Implementation_Defined
3265 * s-rident.ads: Add new restriction No_Implementation_Identifiers
3266 Add new profile No_Implementation_Extensions
3267 * sem_prag.adb: Implement pragma Implementation_Defined Implement
3268 profile No_Implementation_Extensions
3269 * sem_util.adb: Minor reformatting (Set_Entity_With_Style_Check):
3270 Check violation of restriction No_Implementation_Identifiers
3271 * snames.ads-tmpl: Add entries for pragma Implementation_Defined
3272 Add entry for Name_No_Implementation_Extensions
3274 2011-09-06 Robert Dewar <dewar@adacore.com>
3276 * impunit.ads: Minor reformatting.
3278 2011-09-06 Robert Dewar <dewar@adacore.com>
3280 * ali.adb, sem_ch13.adb, lib-xref.adb: Minor reformatting.
3282 2011-09-06 Pascal Obry <obry@adacore.com>
3284 * s-osinte-linux.ads, s-oscons-tmplt.c: Use oscons to define sigset_t
3287 2011-09-06 Robert Dewar <dewar@adacore.com>
3289 * g-socket.adb: Minor reformatting
3291 2011-09-06 Javier Miranda <miranda@adacore.com>
3293 * ali.adb (Scan_ALI): Add missing support to load references of
3294 entities imported from other languages.
3295 * ali.ads (Xref_Record): Adding new fields to store the language and
3296 name of an imported entity.
3297 * lib-xref.adb (Output_Import_Export_Info): Fix typo
3300 2011-09-06 Ed Schonberg <schonberg@adacore.com>
3302 * sem_prag.adb (Analyze_Pragma, case Type_Invariant): A type invariant
3303 is allowed on a full type declaration if it is the completion of
3304 a private declarations.
3305 * sem_ch13.adb (Analyze_Aspect_Specifications): An invariant
3306 aspect is allowed on a full type declaration in the private part
3309 2011-09-06 Robert Dewar <dewar@adacore.com>
3311 * sem_ch8.ads: Minor reformatting
3313 2011-09-06 Thomas Quinot <quinot@adacore.com>
3315 * s-oscons-tmplt.c, g-socket.adb (GNAT.Sockets.Clear,Set,Is_Set):
3316 Guard against socket values that are not in [0;FD_SETSIZE[
3318 2011-09-06 Robert Dewar <dewar@adacore.com>
3320 * s-osinte-linux.ads, a-iteint.ads, exp_ch6.adb, s-solita.adb: Minor
3323 2011-09-06 Arnaud Charlet <charlet@adacore.com>
3325 * s-linux-alpha.ads: Minor reformatting
3326 * s-oscons-tmplt.c: Fix generated comments in s-oscons template.
3327 Use sizeof instead of corresponding C defines in s-oscons template.
3329 2011-09-06 Vadim Godunko <godunko@adacore.com>
3331 * a-convec.ads, a-iteint.ads: Minor reformatting.
3333 2011-09-06 Vincent Celier <celier@adacore.com>
3335 * projects.texi: Add menus and @node lines.
3337 2011-09-06 Ed Schonberg <schonberg@adacore.com>
3339 * exp_ch6.adb (Expand_Inlined_Call): Handle properly the case
3340 where the return type is an unconstrained array and the context
3341 is an assignment. Optimize the case when the target of the
3342 assignment is a selected component.
3344 2011-09-06 Arnaud Charlet <charlet@adacore.com>
3346 * s-solita.adb: Update comments.
3348 2011-09-06 Pascal Obry <obry@adacore.com>
3350 * s-linux.ads, s-linux-alpha.ads, s-linux-hppa.ads, s-linux-mipsel.ads,
3351 s-linux-sparc.ads: Remove hard coded and now wrong definitions.
3352 * s-oscons-tmplt.c: Add support for generating pthread related
3353 types size on GNU/Linux as done for Darwin.
3354 * s-osinte-linux.ads: Use s-oscons to define the pthread types.
3356 2011-09-06 Robert Dewar <dewar@adacore.com>
3358 * exp_ch6.adb: Fix minor typo.
3360 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
3362 * exp_ch7.adb: Remove with and use clauses for Get_Targ.
3363 (Alignment_Of): Moved to the body of Nearest_Multiple_Rounded_Up.
3364 (Double_Size_Of): Alphabetized. Update the comment on usage.
3365 (Make_Finalize_Address_Stmts): Update comments and reformat code.
3366 (Nearest_Multiple_Rounded_Up): New routine.
3367 (Size_Of): Update comment on usage. The generated expression now
3368 accounts for alignment gaps by rounding the size of the type to the
3369 nearest multiple rounded up of the type's alignment.
3371 2011-09-06 Robert Dewar <dewar@adacore.com>
3373 * exp_ch7.adb, g-comlin.adb: Minor reformatting.
3375 2011-09-06 Steve Baird <baird@adacore.com>
3377 * exp_ch4.adb (Expand_Allocator_Expression): Look through
3378 derived subprograms in checking for presence of an
3379 Extra_Accessibility_Of_Result formal parameter.
3380 * exp_ch6.adb (Expand_Call): Look through derived subprograms in
3381 checking for presence of an Extra_Accessibility_Of_Result formal
3383 (Expand_Call.Add_Actual_Parameter): Fix a bug in the
3384 case where the Parameter_Associatiations attribute is already set,
3385 but set to an empty list.
3386 (Needs_Result_Accessibility_Level):
3387 Unconditionally return False. This is a temporary
3388 change, disabling the Extra_Accessibility_Of_Result
3390 (Expand_Simple_Function_Return): Check for
3391 Extra_Accessibility_Of_Result parameter's presence instead of
3392 testing Ada_Version when generating a runtime accessibility
3393 check which makes use of the parameter.
3395 2011-09-06 Ed Schonberg <schonberg@adacore.com>
3397 * exp_ch4.adb (Expand_N_Case_Expression): Actions created for the
3398 expression in a given case alternative must be attached to the
3399 statement list of the ccrresponding case statement alternative
3400 They cannot be propagated ahead of the case statement, because
3401 the validity of the expression that generated the action may
3402 hold only for that alternative.
3404 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
3406 * exp_ch7.adb: Remove with and use clauses for Get_Targ.
3407 (Alignment_Of): Remove the code for strict alignment targets.
3408 (Double_Alignment_Of): Removed.
3409 (Double_Size_Of): New routine.
3410 (Make_Finalize_Address_Stmts): Change the
3411 calculation of the dope's size. Update relevant comments.
3412 (Size_Of): New routine.
3414 2011-09-06 Steve Baird <baird@adacore.com>
3416 * einfo.ads (Extra_Accessibility): Update associated comment to use
3417 the term "present" correctly ("present" just means that it is not
3418 an error to query the value of the attribute - it does not imply
3419 that the value must be non-null).
3420 (Extra_Constrained): Ditto.
3421 (Is_Visible_Formal): Ditto.
3422 (Extra_Accessibility_Of_Result) Ditto; also add Inline pragma.
3423 (Set_Extra_Accessibility_Of_Result): Add Inline pragma.
3424 * exp_ch4.adb (Expand_Allocator_Expression): Improve a comment.
3425 * exp_ch6.adb (Expand_Call): The callee may require an
3426 Extra_Accessibility_Of_Result actual parameter even if Ada_Version
3427 < Ada_2012. This can occur if the callee is exported from a Gnat
3428 runtimes unit. Also improve a comment.
3430 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
3432 * exp_ch7.adb: Add with and use clauses for Get_Targ.
3433 (Alignment_Of): Rename formal parameter Some_Typ
3434 to Typ, update related comment. Use the allocator alignment on
3435 strict alignment targets such as SPARC.
3436 (Double_Alignment_Of): Rename formal parameter Some_Typ to Typ, update
3439 2011-09-06 Gary Dismukes <dismukes@adacore.com>
3441 * sem_ch9.adb (Check_Interfaces): Test
3442 Is_Limited_Type rather than Is_Limited_Record when checking that
3443 the partial view of a synchronized full view must be limited.
3445 2011-09-06 Emmanuel Briot <briot@adacore.com>
3447 * g-comlin.adb (Free): Fix memory leak.
3449 2011-09-06 Robert Dewar <dewar@adacore.com>
3451 * sem_util.adb, exp_ch6.adb: Minor reformatting and code reorganization.
3453 2011-09-06 Steve Baird <baird@adacore.com>
3455 * einfo.ads (Extra_Accessibility_Of_Result): New function; in the
3456 (Ada2012) cases described in AI05-0234 where the accessibility
3457 level of a function result is "determined by the point of
3458 call", an implicit parameter representing that accessibility
3459 level is passed in. Extra_Accessibilty_Of_Result yields this
3460 additional formal parameter. Extra_Accessibility_Of_Result
3461 is analogous to the existing Extra_Accessibility
3462 function used in the implementation of access parameters.
3463 (Set_Extra_Accessibility_Of_Result): New procedure; sets
3464 Extra_Accessibility_Of_Result attribute.
3465 * einfo.adb (Extra_Accessibility_Of_Result): New function.
3466 (Set_Extra_Accessibility_Of_Result): New procedure.
3467 (Write_Field19_Name): Display Extra_Accessibilty_Of_Result attribute.
3468 * sem_util.adb (Dynamic_Accessibility_Level): Set Etype of
3469 an accessibility level literal to Natural; introduce a nested
3470 function, Make_Level_Literal, to do this.
3471 * exp_ch6.ads (Needs_Result_Accessibility_Level): New function;
3472 determines whether a given function (or access-to-function
3473 type) needs to have an implicitly-declared accessibility-level
3474 parameter added to its profile.
3475 (Add_Extra_Actual_To_Call): Export an existing procedure which was
3476 previously declared in the body of Exp_Ch6.
3477 * exp_ch6.adb (Add_Extra_Actual_To_Call): Export declaration by moving
3479 (Has_Unconstrained_Access_Discriminants): New Function; a
3480 predicate on subtype entities which returns True if the given
3481 subtype is unconstrained and has one or more access discriminants.
3482 (Expand_Call): When expanding a call to a function which takes an
3483 Extra_Accessibility_Of_Result parameter, pass in the appropriate
3484 actual parameter value. In the case of a function call which is
3485 used to initialize an allocator, this may not be possible because
3486 the Etype of the allocator may not have been set yet. In this
3487 case, we defer passing in the parameter and handle it later in
3488 Expand_Allocator_Expression.
3489 (Expand_Simple_Function_Return): When returning from a function which
3490 returns an unconstrained subtype having at least one access
3491 discriminant, generate the accessibility check needed to ensure that
3492 the function result will not outlive any objects designated by its
3494 (Needs_Result_Accessibility_Level): New function; see exp_ch6.ads
3496 * exp_ch4.adb (Expand_Allocator_Expression): When a function call
3497 is used to initialize an allocator, we may need to pass in "the
3498 accessibility level determined by the point of call" (AI05-0234)
3499 to the function. Expand_Call, where such actual parameters are
3500 usually generated, is too early in this case because the Etype of
3501 the allocator (which is used in determining the level to be passed
3502 in) may not have been set yet when Expand_Call executes. Instead,
3503 we generate code to pass in the appropriate actual parameter
3504 in Expand_Allocator_Expression.
3505 * sem_ch6.adb (Create_Extra_Formals): Create
3506 the new Extra_Accessibility_Of_Result formal if
3507 Needs_Result_Accessibility_Level returns True. This includes the
3508 introduction of a nested procedure, Check_Against_Result_Level.
3510 2011-09-06 Arnaud Charlet <charlet@adacore.com>
3512 * gcc-interface/Makefile.in (X86_TARGET_PAIRS): Remove duplicate
3515 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
3517 * s-finmas.adb (Set_Finalize_Address): Explain the reason
3518 for the synchronization. Move the test for null from
3519 s-stposu.Allocate_Any_Controlled to this routine since the check
3520 needs to be protected too.
3521 (Set_Heterogeneous_Finalize_Address): Explain the reason for the
3522 synchronization code.
3523 * s-finmas.ads (Set_Heterogeneous_Finalize_Address): Add comment
3524 explaining the context in which this routine is used.
3525 * s-stposu.adb (Allocate_Any_Controlled): Move the test for null
3526 to s-finmas.Set_Finalize_Address.
3528 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3530 * einfo.ads: Document that itypes have no parent field.
3532 2011-09-05 Robert Dewar <dewar@adacore.com>
3534 * rtsfind.adb (Check_CRT): Check for overloaded entity
3535 * rtsfind.ads: Document that entities to be found by rtsfind
3536 cannot be overloaded
3537 * s-taenca.adb, s-tasren.adb, s-tpobop.adb, s-tpoben.ads, s-tpoben.adb
3538 (Lock_Entries_With_Status): New name for Lock_Entries with two
3539 arguments (changed to meet rtsfind no overloading rule).
3541 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
3543 * s-finmas.adb (Set_Finalize_Address (Address,
3544 Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
3545 (Set_Finalize_Address (in out Finalization_Master,
3546 Finalize_Address_Ptr): Add synchronization code.
3547 * s-finmas.ads (Set_Finalize_Address (Address,
3548 Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
3549 * s-stposu.adb (Allocate_Any_Controlled): Update the call to
3550 Set_Finalize_Address for the heterogeneous case.
3552 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3554 * sem_ch3.adb: Undo previous change, not suitable after all.
3556 2011-09-05 Robert Dewar <dewar@adacore.com>
3558 * einfo.ads: Minor comment clarification.
3560 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
3562 * exp_ch6.adb (Move_Activation_Chain): Rewritten. The routine
3563 no longer needs to search through the entities of the return
3564 statement scope to find the _chain.
3565 * sem_ch5.adb: Add with and use clauses for Exp_Ch6 and Sem_Ch6.
3566 (Analyze_Block_Statement): Add local variable
3567 Is_BIP_Return_Statement. Add machinery to install all entities
3568 produced by the expansion of the return object declaration.
3569 (Install_Return_Entities): New routine.
3570 * sem_ch6.ads, sem_ch6.adb (Install_Entity): Moved from body to spec.
3572 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3574 * sem_ch10.adb (Analyze_Context): Apply simple fixup if context
3575 of subunit is incomplete.
3576 (Analyze_Proper_Body): If parent spec is not available, do not
3579 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3581 * sem_disp.adb (Find_Controlling_Arg): Add checks for
3582 interface type conversions, that are expanded into dereferences.
3584 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
3586 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
3587 Examine the parameter and return profile of a subprogram and swap
3588 any incomplete types coming from a limited context with their
3589 corresponding non-limited views.
3590 (Exchange_Limited_Views): New routine.
3592 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3594 * sem_ch3.adb (Prepare_Private_Subtype_Completion): Set parent
3595 of internal entity to the subtype declaration, so that when
3596 entities are subsequently exchanged in a package body, the tree
3597 remains properly formatted for ASIS.
3599 2011-09-05 Johannes Kanig <kanig@adacore.com>
3601 * g-comlin.adb (Set_Usage): Additional optional argument to set help
3603 (Display_Help): display the user given help message, if available.
3605 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3607 * sem_ch3.adb (OK_For_Limited_Init_In_05): The expression
3608 is legal if the original node is an identifier that is a
3609 parameterless function call.
3611 2011-09-05 Pascal Obry <obry@adacore.com>
3613 * prj-nmsc.adb: Minor reformatting.
3614 Add support for standalone aggregate library.
3615 (Check_Stand_Alone_Library): Handle standalone aggregate library.
3616 * projects.texi: Fix documentation for aggregate library projects.
3618 2011-09-05 Robert Dewar <dewar@adacore.com>
3620 * sem_ch6.adb: Minor reformatting.
3622 2011-09-05 Matthew Gingell <gingell@adacore.com>
3624 * s-tassta.adb (Task_Wrapper): Ensure that we don't try to write the
3625 stack guard page on PPC Linux. This patch ensures the 64K guard page at
3626 the bottom of the stack is not overwritten.
3628 2011-09-05 Thomas Quinot <quinot@adacore.com>
3630 * exp_intr.adb, s-tasini.adb: Minor reformatting.
3632 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3634 * sem_ch3.adb (Access_Definition): If an access type declaration
3635 appears in a child unit, the scope of whatever anonymous type
3636 may be generated is the child unit itself.
3638 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3640 * sem_ch6.adb (Analyze_Expression_Function): Do not set
3641 Comes_From_Source on rewritten body.
3642 (Analyze_Subprogram_Body_Helper): Check that the original node for
3643 the body comes from source, when determining whether expansion
3644 of a protected operation is needed.
3646 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3648 * exp_aggr.adb (Replace_Type): If the target of the assignment is
3649 a selected component and the right-hand side is a self-referential
3650 access, the proper prefix of the rewritten attribute is a copy
3651 of the left-hand side, not of its prefix.
3653 2011-09-05 Robert Dewar <dewar@adacore.com>
3655 * sem_ch5.adb: Minor reformatting.
3656 * sem_ch3.adb: Minor code clean up.
3658 2011-09-05 Jose Ruiz <ruiz@adacore.com>
3660 * exp_ch9.adb (Make_Initialize_Protection): The fact that
3661 restriction No_Dynamic_Attachment is in effect or not should
3662 not influence the default priority associated to a protected
3663 object. With this change, when the restriction is in effect (as
3664 is the case for the Ravenscar profile) the default priority of
3665 a protected object with an interrupt handler is in the range of
3666 interrupt priorities (Default_Interrupt_Priority) as required
3669 2011-09-05 Arnaud Charlet <charlet@adacore.com>
3671 * a-iteint.ads: Fix header.
3673 2011-09-05 Vincent Celier <celier@adacore.com>
3675 * prj-conf.adb (Do_Autoconf): Make sure Obj_Dir always ends
3676 with a directory separator to avoid output such as:
3677 "/path/to/objauto.cgpr" has been deleted.
3679 2011-09-05 Robert Dewar <dewar@adacore.com>
3681 * sem_ch3.adb: Minor reformatting.
3683 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3685 * sem_ch5.adb: Better error message.
3687 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
3689 * exp_aggr.adb: Add with and use clause for Exp_Ch6.
3690 (Expand_Array_Aggregate): Detect a special case of an aggregate
3691 which contains tasks in the context of an unexpanded return
3692 statement of a build-in-place function.
3693 * exp_ch6.adb: Add with and use clause for Exp_Aggr.
3694 (Expand_N_Extended_Return_Statement): Detect a delayed aggregate
3695 which contains tasks and expand it now that the original simple
3696 return statement has been rewritten.
3697 * exp_ch9.adb (Build_Activation_Chain_Entity): Code
3698 reformatting. Do not create a chain for an extended return
3699 statement if one is already available.
3700 (Has_Activation_Chain): New routine.
3702 2011-09-05 Marc Sango <sango@adacore.com>
3704 * sem_ch3.adb (Analyze_Object_Declaration): Remove
3705 the wrong test and add the correct test to detect the violation
3706 of illegal use of unconstrained string type in SPARK mode.
3708 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3710 * sem_ch5.adb (Analyze_Iteration_Specification): Improve error
3711 message on an iterator over an array.
3713 2011-09-05 Robert Dewar <dewar@adacore.com>
3715 * lib-xref-alfa.adb: Minor reformatting.
3717 2011-09-05 Robert Dewar <dewar@adacore.com>
3719 * sem_ch3.adb, sem_res.adb, par.adb, par-ch6.adb, g-comlin.adb,
3720 exp_ch6.adb, lib-xref-alfa.adb: Minor reformatting.
3722 2011-09-05 Gary Dismukes <dismukes@adacore.com>
3724 * exp_ch7.adb, exp_ch6.adb: Minor reformatting.
3726 2011-09-05 Johannes Kanig <kanig@adacore.com>
3728 * lib-xref-alfa.adb: Update comments.
3730 2011-09-05 Thomas Quinot <quinot@adacore.com>
3732 * sem_res.adb: Minor reformatting
3734 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3736 * exp_ch6.adb (Build_In_Place_Formal): If extra formals are not
3737 present, create them now. Needed in case the return type was
3738 a limited view in the function declaration.
3739 (Make_Build_In_Place_Call_In_Allocator): If return type contains
3740 tasks, build the activation chain for it. Pass a reference to
3741 the Master_Id in call to Add_Task_Actuals_To_Build_In_Place call.
3742 * exp_ch7.adb (Make_Set_Finalize_Address_Call): Clean up interface
3743 with build_in_place calls.
3744 * sem_ch9.adb (Analyze_Task_Type_Declaration): If partial view was
3745 incomplete, inatialize its Corresponding_Record_Type component.
3746 * sem_ch10.adb (Build_Chain): Initialize Private_Dependents field
3749 2011-09-05 Johannes Kanig <kanig@adacore.com>
3751 * lib-xref-alfa.adb (Is_Alfa_Reference): Filter constants from effect
3754 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3756 * par-ch6.adb (P_Subprogram): In Ada2012 mode, if the subprogram
3757 appears within a package specification and the token after "IS"
3758 is not a parenthesis, assume that this is an unparenthesized
3759 expression function, even if the token appears in a line by
3761 * par.adb: Clarify use of Labl field of scope stack in error
3764 2011-09-05 Bob Duff <duff@adacore.com>
3766 * sem_res.adb (Resolve_Intrinsic_Operator): Use unchecked
3767 conversions instead of normal type conversions in all cases where a
3768 type conversion would be illegal. In particular, use unchecked
3769 conversions when the operand types are private.
3771 2011-09-05 Johannes Kanig <kanig@adacore.com>
3773 * lib-xref-alfa.adb (Is_Alfa_Reference): Never declare effects on
3774 objects of task type or protected type.
3776 2011-09-05 Ed Schonberg <schonberg@adacore.com>
3778 * sem_ch6.adb (Analyze_Expression_Function): If the expression
3779 function comes from source, indicate that so does its rewriting,
3780 so it is compatible with any subsequent expansion of the
3781 subprogram body (e.g. when it is a protected operation).
3782 * sem_ch4.adb: minor reformatting
3784 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
3786 * lib.adb (Check_Same_Extended_Unit): Comment rewriting. Use
3787 Get_Source_Unit rather than Get_Code_Unit as instantiation unfolding
3788 may lead to wrong ancestor package in the case of instantiated subunit
3789 bodies. If a subunit is instantiated, follow the chain of instantiations
3790 rather than the stub structure.
3792 2011-09-02 Robert Dewar <dewar@adacore.com>
3794 * sem_ch4.adb, sem_ch6.adb: Minor reformatting.
3795 * gcc-interface/Make-lang.in: Update dependencies.
3797 2011-09-02 Marc Sango <sango@adacore.com>
3799 * sem_ch3.adb (Analyze_Object_Declaration): Change
3800 comment and add additional check to differentiate constant of
3801 type string from others unconstrained type.
3803 2011-09-02 Ed Schonberg <schonberg@adacore.com>
3805 * sinfo.ads, sinfo.adb: New semantic attribute Premature_Use,
3806 present in incomplete type declarations to refine the error
3807 message the full declaration is in the same unit.
3808 * sem_ch4.adb (Analyze_Selected_Component): If the prefix is of
3809 an incomplete type, set the Premature_Use for additional message.
3810 * sem_ch3.adb (Find_Type_Name): If partial view is incomplete
3811 and Premature_Use is set, place additional information at the
3812 point of premature use.
3814 2011-09-02 Bob Duff <duff@adacore.com>
3816 * sem_ch6.adb: (Check_Post_State): Suppress warning
3817 "postcondition refers only to pre-state" when the expression has not
3818 yet been analyzed, because it causes false alarms. This can happen when
3819 the postcondition contains a quantified expression, because those are
3820 analyzed later. This is a temporary/partial fix.
3821 (Process_Post_Conditions): Minor: change wording of warning.
3823 2011-09-02 Marc Sango <sango@adacore.com>
3825 * sem_ch3.adb (Analyze_Object_Declaration): Detect the violation of
3826 illegal use of unconstrained string type in SPARK mode.
3827 * sem_res.adb (Analyze_Operator_Symbol): Set the
3828 right place where the string operand of concatenation should be
3829 violate in SPARK mode.
3831 2011-09-02 Robert Dewar <dewar@adacore.com>
3833 * sem_prag.adb, sem_util.adb, sem_ch6.adb, prj-nmsc.adb,
3834 exp_ch3.adb: Minor reformatting.
3836 2011-09-02 Vincent Celier <celier@adacore.com>
3838 * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Declare "gcc"
3839 as the compiler driver so Is_Compilable returns True for sources.
3840 * prj-nmsc.adb (Override_Kind): When Kind is Sep, set the source
3843 2011-09-02 Ed Schonberg <schonberg@adacore.com>
3845 * sem_prag.adb (Analyze_PPC_In_Decl_Part): for a class-wide
3846 condition, a reference to a controlling formal must be interpreted
3847 as having the class-wide type (or an access to such) so that the
3848 inherited condition can be properly applied to any overriding
3849 operation (see ARM12 6.6.1 (7)).
3851 2011-09-02 Tristan Gingold <gingold@adacore.com>
3853 * init.c (__gnat_is_vms_v7): Fix case and add prototype
3856 2011-09-02 Javier Miranda <miranda@adacore.com>
3858 * exp_ch3.adb (Expand_N_Object_Declaration): Do not copy the
3859 initializing expression of a class-wide interface object declaration
3860 if its type is limited.
3862 2011-09-02 Johannes Kanig <kanig@adacore.com>
3864 * sem_util.adb (Unique_Name): To obtain a unique name for enumeration
3865 literals, take into account the type name; the type is *not*
3866 the scope for an enumeration literal.
3868 2011-09-02 Ed Schonberg <schonberg@adacore.com>
3870 * sem_ch6.adb (Check_Overriding_Indicator): add special check
3871 to reject an overriding indicator on a user-defined Adjust
3872 subprogram for a limited controlled type.
3874 2011-09-02 Ed Schonberg <schonberg@adacore.com>
3876 * sem_res.adb (Resolve_Actuals): add missing call to Resolve
3877 for an actual that is a function call returning an unconstrained
3878 limited controlled type.
3880 2011-09-02 Tristan Gingold <gingold@adacore.com>
3882 * g-socthi-vms.adb (c_sendmsg, c_recvmsg): Use unpacked msg if on vms 7
3884 2011-09-02 Johannes Kanig <kanig@adacore.com>
3886 * alfa.ads (Name_Of_Heap_Variable): Change value of the HEAP variable
3887 from "HEAP" to __HEAP Change comment that refers to that variable
3888 * put_alfa.adb: Change comment that refers to that variable
3890 2011-09-02 Robert Dewar <dewar@adacore.com>
3892 * exp_ch4.adb, exp_ch6.adb, prj-nmsc.adb: Minor reformatting.
3894 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
3896 * exp_util.adb (Extract_Renamed_Object): Renamed to
3897 Find_Renamed_Object. This routine has been reimplemented and now uses
3898 tree traversal to locate a renamed object.
3899 (Is_Aliased): Replace call to Extract_Renamed_Object with
3900 Find_Renamed_Object.
3902 2011-09-02 Tristan Gingold <gingold@adacore.com>
3904 * init.c: (__gnat_is_vms_v7): New function.
3906 2011-09-02 Olivier Hainque <hainque@adacore.com>
3908 * tracebak.c (STOP_FRAME, ppc elf/vxworks case): Stop on frames
3909 that have a misaligned backchain, necessarily bogus.
3911 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
3913 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not create
3914 TSS routine Finalize_Address when compiling in Alfa mode.
3915 (Expand_Freeze_Record_Type): Do not create TSS routine
3916 Finalize_Address when compiling in Alfa mode.
3917 * exp_ch4.adb (Expand_Allocator_Expression): Do not produce a
3918 call to Set_Finalize_Address in Alfa mode because Finalize_Address is
3920 (Expand_N_Allocator): Do not produce a call to
3921 Set_Finalize_Address in Alfa mode because Finalize_Address is not built.
3922 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Do not
3923 produce a call to primitive Set_Finalize_Address in Alfa mode because
3924 Finalize_Address is not built.
3925 * exp_ch7.adb (Build_Finalization_Master): Do not create
3926 finalization masters in Afa mode since they are not needed.
3927 (Build_Finalizer): Do not create scope and library-level
3928 finalizers in Alfa mode since they are not needed.
3929 * exp_util.adb (Build_Allocate_Deallocate_Proc): Do not expand
3930 "new" and "free" when applied to controlled objects in Alfa mode since
3933 2011-09-02 Vincent Celier <celier@adacore.com>
3935 * prj-nmsc.db: (Check_Stand_Alone_Library): For SALs, allow
3936 only library names with the syntax of Ada identifiers, to avoid errors
3937 when compiling the binder generated files.
3938 * projects.texi: Document restriction on SAL library names
3940 2011-09-02 Thomas Quinot <quinot@adacore.com>
3942 * a-chtgbo.adb: Minor comment fix.
3944 2011-09-02 Robert Dewar <dewar@adacore.com>
3946 * lib-xref.adb: Minor reformatting
3948 2011-09-02 Vincent Celier <celier@adacore.com>
3950 * bindusg.adb, clean.adb, gnatchop.adb, gnatfind.adb, gnatlink.adb,
3951 gnatls.adb, gnatname.adb, gnatxref.adb, gprep.adb, makeusg.adb: Add
3952 --version and --help in usage.
3953 * switch.ads, switch.adb (Display_Usage_Version_And_Help): New procedure
3955 2011-09-02 Bob Duff <duff@adacore.com>
3957 * lib-xref.adb: (Hash): Avoid use of 'Mod attribute, because old
3958 compilers don't understand it.
3960 2011-09-02 Gary Dismukes <dismukes@adacore.com>
3962 * exp_attr.adb (Expand_N_Attribute_Reference): Pass the
3963 underlying subtype rather than its base type on the call to
3964 Build_Record_Or_Elementary_Input_Function, so that any
3965 constraints on a discriminated subtype will be available for
3966 doing the check required by AI05-0192.
3967 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
3968 If the prefix subtype of the 'Input attribute is a constrained
3969 discriminated subtype, then check each constrained discriminant value
3970 against the corresponding value read from the stream.
3972 2011-09-02 Yannick Moy <moy@adacore.com>
3974 * usage.adb, warnsw.adb, sem_ch6.adb, opt.ads: Disable by default
3975 warnings on suspicious contracts, and enable them with -gnatwa.
3977 2011-09-02 Robert Dewar <dewar@adacore.com>
3979 * exp_util.adb, exp_ch9.adb, sem_attr.adb, sem_ch6.adb: Minor
3982 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
3984 * exp_ch9.adb (Install_Private_Data_Declarations): Add guards
3985 which ensure that restriction No_Dynamic_Attachment has not been
3987 (Make_Initialize_Protection): Protected types with attach or
3988 interrupt handlers must not violate restriction No_Dynamic_Attachment.
3989 * exp_util.adb (Corresponding_Runtime_Package): Add a guard
3990 which ensures that restriction No_Dynamic_Attachment has not been
3992 * sem_attr.adb: (Eval_Attribute): Transform
3993 VAX_Float_Type'First and 'Last into references to
3994 the temporaries which store the corresponding bounds. The
3995 transformation is needed since the back end cannot evaluate
3996 'First and 'Last on VAX.
3997 (Is_VAX_Float): New routine.
3999 2011-09-02 Ed Schonberg <schonberg@adacore.com>
4001 * sem_ch12.adb (Analyze_Subprogram_Instantiation): If the
4002 generic unit is not intrinsic and has an explicit convention,
4003 the instance inherits it.
4005 2011-09-02 Robert Dewar <dewar@adacore.com>
4007 * prj-dect.adb, prj-env.adb, prj-nmsc.adb, prj-proc.adb, prj-tree.adb,
4008 prj.adb, prj.ads, sem_ch5.adb: Minor reformatting.
4010 2011-09-02 Thomas Quinot <quinot@adacore.com>
4012 * sem_attr.adb (Analyze_Attribute, case Unrestriced_Access):
4013 Guard against a prefix that is an N_Has_Entity but has no
4016 2011-09-02 Yannick Moy <moy@adacore.com>
4018 * lib-xref-alfa.adb (Is_Alfa_Reference): Ignore IN parameters in Alfa
4021 2011-09-02 Yannick Moy <moy@adacore.com>
4023 * opt.ads (Warn_On_Suspicious_Contract): New warning flag.
4024 * sem_ch3.adb (Analyze_Declarations): Call checker for suspicious
4026 * sem_ch6.adb, sem_ch6.ads (Check_Subprogram_Contract): New
4027 procedure looking for suspicious postconditions.
4028 * usage.adb (Usage): New options -gnatw.t and -gnatw.T.
4029 * warnsw.adb (Set_Dot_Warning_Switch): Take into account new
4030 options -gnatw.t and -gnatw.T.
4032 2011-09-02 Pascal Obry <obry@adacore.com>
4034 * prj.adb: Minor code refactoring. Move check for null project in
4036 * projects.texi: Fix minor typos.
4038 2011-09-02 Ed Schonberg <schonberg@adacore.com>
4040 * sem_ch5.adb (Analyze_Iterator_Specification): If the domain
4041 of iteration is an expression, its value must be captured in a
4042 renaming declaration, so that modification of the elements is
4043 propagated to the original container.
4045 2011-09-02 Pascal Obry <obry@adacore.com>
4047 * prj-proc.adb, prj.adb, makeutl.adb, makeutl.ads, prj-dect.adb,
4048 prj-nmsc.adb, prj-util.adb, prj-conf.adb, prj-env.adb,
4049 prj-tree.adb: Minor reformatting and style fixes.
4051 2011-09-02 Robert Dewar <dewar@adacore.com>
4053 * s-rident.ads: Add new restriction No_Implicit_Aliasing
4054 * sem_attr.adb: (Analyze_Access_Attribute): Deal with
4055 No_Implicit_Aliasing
4056 (Analyze_Attribute, case Address): ditto
4057 (Analyze_Attribute, case Unrestricted_Access): ditto
4058 * sem_util.ads, sem_util.adb: (Is_Aliased_View): Handle
4059 No_Implicit_Aliasing restriction.
4060 * gnat_rm.texi: Add documentation for No_Implicit_Aliasing
4062 2011-09-02 Ed Schonberg <schonberg@adacore.com>
4064 * exp_util.adb: (Possible_Bit_Aligned_Object): If the object
4065 is an unchecked conversion, apply test to its expression.
4067 2011-09-02 Javier Miranda <miranda@adacore.com>
4069 * sem_ch3.adb (Check_Abstract_Overriding): When
4070 traversing the chain of aliased subprograms avoid reporting a
4071 redundant error on the current entity.
4073 2011-09-02 Sergey Rybin <rybin@adacore.com>
4075 * gnat_ugn.texi: Minor clean up.
4077 2011-09-02 Bob Duff <duff@adacore.com>
4079 * s-htable.adb (Set_If_Not_Present): Use renaming
4080 instead of ":=", because the type Key is limited in the generic (even
4081 if not in the instances).
4083 2011-09-02 Robert Dewar <dewar@adacore.com>
4085 * exp_util.adb, sem_ch10.adb, sem_attr.adb, s-htable.adb,
4086 g-comlin.adb, g-comlin.ads, lib-xref-alfa.adb, lib-xref.adb: Minor
4089 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
4091 * sem_ch3.adb: (Set_Anonymous_Type): Associate the itype of an
4092 inherited component with the enclosing derived type. Code reformatting.
4094 2011-09-02 Gary Dismukes <dismukes@adacore.com>
4096 * checks.adb: (Determine_Range): Add test of OK1 to prevent the early
4097 return done when overflow checks are enabled, since comparisons against
4098 Lor and Hir should not be done when OK1 is False.
4100 2011-09-02 Gary Dismukes <dismukes@adacore.com>
4102 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
4103 Add new formal Master_Exp. When present, add that expression to the
4104 call as an extra actual.
4105 (Make_Build_In_Place_Call_In_Object_Declaration): Add variable
4106 Fmaster_Actual and in the case of a BIP call initializing a return
4107 object of an enclosing BIP function set it to a
4108 new reference to the implicit finalization master
4109 formal of the enclosing function. Fmaster_Actual is
4110 then passed to the new formal Master_Exp on the call to
4111 Add_Finalization_Master_Actual_To_Build_ In_Place_Call. Move
4112 initializations of Enclosing_Func to its declaration.
4114 2011-09-02 Thomas Quinot <quinot@adacore.com>
4116 * csets.ads: Minor reformatting
4118 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
4120 * exp_aggr.adb: (Get_Constraint_Association): Add code to retrieve
4121 the full view of a private type coming from an instantiation.
4122 * exp_ch4.adb: (Current_Anonymous_Master): Reimplement the search
4123 loop to iterate over the declarations rather than use the
4124 First_Entity / Next_Entity scheme.
4126 2011-09-02 Ed Schonberg <schonberg@adacore.com>
4128 * sem_attr.adb: (Analyze_Attribute, case 'Range): when expanding
4129 X'range (N) into X'First (N) .. X'Last (N), do not share the
4130 dimension indicator N, if present. Even though it is a static
4131 constant, its source location may be modified when printing
4132 expanded code under -gnatDL, and node sharing will lead to chaos
4133 in Sprint on large files, by generating a sloc value that does
4134 not correspond to any source file.
4136 2011-09-02 Bob Duff <duff@adacore.com>
4138 * einfo.adb: (Has_Xref_Entry): Do not call
4139 Implementation_Base_Type. Lib.Xref has been
4140 rewritten to avoid the need for it, and it was costly.
4141 * s-htable.ads,s-htable.adb: (Present,Set_If_Not_Present): New
4142 functions in support of efficient xref.
4143 * lib-xref-alfa.adb: Misc changes related to Key component of
4145 * lib-xref.adb: (Add_Entry,etc): Speed improvement.
4146 (New_Entry): Call Implementation_Base_Type, because Has_Xref_Entry
4147 no longer does. This is the one place where it is needed.
4149 2011-09-02 Johannes Kanig <kanig@adacore.com>
4151 * g-comlin.adb (Getopt): New optional argument Concatenate to have
4152 similar interface as the other Getopt function.
4154 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
4156 * exp_ch4.adb: (Expand_Allocator_Expression): Do not generate
4157 a call to Set_Finalize_Address if there is no allocator available.
4158 * exp_util.adb: (Build_Allocate_Deallocate_Proc): Account for
4159 a case of allocator expansion where the allocator is not expanded but
4160 needs a custom allocate routine. Code reformatting.
4161 (Is_Finalizable_Transient): Remove local variables Has_Rens and
4162 Ren_Obj. Code reformatting.
4163 (Is_Renamed): Renamed to Is_Aliased. Add code to detect aliasing
4164 through the use of 'reference.
4165 * sem_ch4.adb: (Analyze_Allocator): Detect allocators generated
4166 as part of build-in-place expansion. They are intentionally marked as
4167 coming from source, but their parents are not.
4169 2011-09-02 Ed Schonberg <schonberg@adacore.com>
4171 * sem_ch10.adb (Analyze_With_Clause): If the library unit
4172 is the generated subprogram declaration for a child unit body
4173 that acts as spec, use the original body in the with_clause,
4174 to prevent binding errors.
4176 2011-09-02 Vincent Celier <celier@adacore.com>
4178 * gnat_ugn.texi: Adapt documentation of -gnateInnn to new VMS
4179 qualifier /MULTI_UNIT_INDEX=
4181 2011-09-02 Johannes Kanig <kanig@adacore.com>
4183 * g-comlin.adb (Getopt): Return when switch is dealt with automatically,
4184 instead of calling the callback function
4186 2011-09-02 Robert Dewar <dewar@adacore.com>
4188 * prj-proc.adb, prj.ads, sem_util.adb, s-taprop-linux.adb,
4189 prj-nmsc.adb, prj-util.ads, prj-env.adb: Minor reformatting.
4191 2011-09-02 Vincent Celier <celier@adacore.com>
4193 * prj-nmsc.adb: (Find_Sources): When the list of sources is
4194 explicitly declared in an extending project, do not warn if a source
4195 for an inherited naming exception is not found.
4197 2011-09-02 Gary Dismukes <dismukes@adacore.com>
4199 * exp_ch6.adb: (Is_Build_In_Place_Function_Call): Return False if
4200 expansion is inactive.
4202 2011-09-02 Ed Schonberg <schonberg@adacore.com>
4204 * sem_util.adb (Note_Possible_Modification): If the entity
4205 being modified is the renaming generated for an Ada2012 iterator
4206 element, the enclosing container or array is modified as well.
4208 2011-09-02 Jose Ruiz <ruiz@adacore.com>
4210 * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB,
4211 Initialize): Define and initialize the
4212 mutex attributes and condition variable attributes locally.
4214 2011-09-02 Vincent Celier <celier@adacore.com>
4216 * prj-nmsc.adb (Check_File): Mark as Locally_Removed a naming
4217 exception replaced in an extending project.
4218 (Check_Object): No error when the other source is locally removed.
4220 2011-09-02 Yannick Moy <moy@adacore.com>
4222 * exp_ch6.adb (Is_Build_In_Place_Function_Call): in Alfa mode, allow
4225 2011-08-31 Arnaud Charlet <charlet@adacore.com>
4227 * gcc-interface/Makefile.in: Clean up handling of x86 and x86-64
4229 * gcc-interface/Make-lang.in: Update dependencies.
4231 2011-09-01 Robert Dewar <dewar@adacore.com>
4233 * sem_ch3.adb, s-taprop-linux.adb, gnatls.adb: Minor reformatting.
4235 2011-09-01 Jose Ruiz <ruiz@adacore.com>
4237 * adaint.h (__gnat_cpu_free): Fix the name of this profile.
4238 * adaint.c (__gnat_cpu_alloc, __gnat_cpu_alloc_size, __gnat_cpu_free,
4239 __gnat_cpu_zero, __gnat_cpu_set): Create version of these subprograms
4240 specific for systems where their glibc version does not define the
4241 routines to handle dynamically allocated CPU sets.
4243 2011-09-01 Vincent Celier <celier@adacore.com>
4245 * prj-proc.adb, prj.ads, prj-nmsc.adb, prj-util.adb, prj-util.ads,
4246 prj-env.adb: Implement inheritance of naming exceptions in extending
4249 2011-09-01 Romain Berrendonner <berrendo@adacore.com>
4251 * gnatls.adb: Display simple message instead of content of
4254 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
4256 * sem_ch3.adb: (Build_Derived_Record_Type) Remove the kludgy update of
4257 access discriminant and anonymous access component scopes.
4258 (Inherit_Component): Reuse the itype of an access discriminant
4259 or anonymous access component by copying it in order to set the proper
4260 scope. This is done only when the parent and the derived type
4261 are in different scopes.
4262 (Set_Anonymous_Etype): New routine.
4264 2011-09-01 Robert Dewar <dewar@adacore.com>
4266 * a-convec.adb: Minor reformatting throughout.
4268 2011-09-01 Jose Ruiz <ruiz@adacore.com>
4270 * adaint.c, adaint.h (__gnat_cpu_alloc, __gnat_cpu_alloc_size,
4271 __gnat_cpu_set_free): Create these wrappers around the CPU_ALLOC,
4272 CPU_ALLOC_SIZE and CPU_FREE linux macros.
4273 (__gnat_cpu_zero, __gnat_cpu_set): Use the CPU_ZERO_S and
4274 CPU_SET_S respectively because we are now using dynamically allocated
4275 CPU sets which are more portable across different glibc versions.
4276 * s-osinte-linux.ads (cpu_set_t_ptr, CPU_ALLOC, CPU_ALLOC_SIZE,
4277 CPU_FREE): Add this type and subprograms to be able to create cpu_set_t
4278 masks dynamically according to the number of processors in the target
4280 (CPU_ZERO, CPU_SET): They are now mapped to the CPU_ZERO_S and CPU_SET_S
4281 respectively, so we need to pass the size of the masks as
4283 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use dynamically
4284 created cpu_set_t masks
4285 with the number of processors available in the target platform,
4286 instead of static bit arrays. It enhances portability because
4287 it uses the information from the target platform.
4288 * sem_ch8.adb: (Attribute_Renaming): When checking whether we
4289 are using a restricted run-time library, use the flag
4290 Configurable_Run_Time_Mode instead of Restricted_Profile.
4292 2011-09-01 Vincent Celier <celier@adacore.com>
4294 * ug_words: Add /MULTI_UNIT_INDEX= -> -gnateI
4295 * vms_data.ads: Add new VMS qualifier equivalent for -gnateInnn
4297 2011-09-01 Nicolas Roche <roche@adacore.com>
4299 * adaint.c (__gnat_tmp_name): Don't use tmpnam function from the system
4300 on VxWorks in kernel mode.
4302 2011-09-01 Jose Ruiz <ruiz@adacore.com>
4304 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use the linux
4305 macros for handling CPU sets (CPU_ZERO, CPU_SET) instead of modifying
4306 directly the bit array.
4307 * s-osinte-linux.ads (CPU_ZERO, CPU_SET): Import these wrappers around
4308 the linux macros with the same name.
4309 * adaint.h, adaint.c (__gnat_cpu_zero, __gnat_cpu_set): Create these
4310 wrappers around the CPU_ZERO and CPU_SET linux macros.
4312 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
4314 * exp_ch7.adb (Find_Insertion_List): Removed.
4315 (Process_Transient_Objects): Insert the declarations of the hook
4316 access type and the hook object before the associated transient object.
4318 2011-09-01 Jose Ruiz <ruiz@adacore.com>
4320 * sem_ch8.adb (Attribute_Renaming): Add missing check to avoid loading
4321 package System.Aux_Dec when using restricted run-time libraries which
4322 do not have this package.
4324 2011-09-01 Tristan Gingold <gingold@adacore.com>
4326 * s-vaflop-vms-alpha.adb: Remove pragma optimize, useless.
4328 2011-09-01 Bob Duff <duff@adacore.com>
4330 * sem_attr.adb (Analyze_Access_Attribute): Do not call
4331 Kill_Current_Values for P'Unrestricted_Access, where P is library level
4333 2011-09-01 Thomas Quinot <quinot@adacore.com>
4335 * exp_ch5.adb: Minor reformatting
4336 * gnat_ugn.texi: Fix minor typos.
4337 * gcc-interface/Make-lang.in: Update dependencies.
4339 2011-09-01 Robert Dewar <dewar@adacore.com>
4341 * inline.adb, sem_aggr.adb: Minor reformatting.
4343 2011-09-01 Ed Schonberg <schonberg@adacore.com>
4345 * a-convec.adb: Proper handling of cursors for Ada2012 iterators.
4347 2011-09-01 Robert Dewar <dewar@adacore.com>
4349 * prj-proc.adb, exp_ch6.adb, prj-env.adb: Minor reformatting.
4351 2011-09-01 Bob Duff <duff@adacore.com>
4353 * sem_aggr.adb (Resolve_Aggregate): Need to treat "in instance
4354 body" the same as "in inlined body", because visibility shouldn't
4357 2011-09-01 Eric Botcazou <ebotcazou@adacore.com>
4359 * inline.adb (Add_Inlined_Body): Refine previous change.
4361 2011-09-01 Gary Dismukes <dismukes@adacore.com>
4363 * exp_ch6.ads (Needs_BIP_Alloc_Form): New utility function.
4364 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
4365 Test for case where call
4366 initializes an object of a return statement before testing for
4367 a constrained call, to ensure that all such cases get handled
4368 by simply passing on the caller's parameters. Also, in that
4369 case call Needs_BIP_Alloc_Form to determine whether to pass on
4370 the BIP_Alloc_Form parameter of the enclosing function rather
4371 than testing Is_Constrained. Add similar tests for the return
4372 of a BIP call to later processing to ensure consistent handling.
4373 (Needs_BIP_Alloc_Form): New utility function.
4374 * sem_ch6.adb: (Create_Extra_Formals): Replace test for adding
4375 a BIP_Alloc_Form formal with call to new utility function
4376 Needs_BIP_Alloc_Form.
4378 2011-09-01 Pascal Obry <obry@adacore.com>
4380 * prj-part.adb: Minor reformatting.
4382 2011-09-01 Vincent Celier <celier@adacore.com>
4384 * prj-env.adb (Create_Mapping_File.Process): Encode the upper
4385 half character in the unit name.
4387 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
4389 * exp_ch4.adb: Minor code and comment reformatting.
4391 2011-09-01 Thomas Quinot <quinot@adacore.com>
4393 * exp_ch6.adb (Expand_Inlined_Call): Remove redundant tests
4394 for Is_Limited_Type and Is_Tagged_Type in condition checking
4395 for by-reference type.
4396 * inline.adb (Add_Inlined_Body): Only exclude init_procs. Other
4397 subprograms may have a completion because of a previous
4398 Inline_Always clause, but the enclosing package must be marked
4399 inlined for the subprogram body to become visible to the backend.
4401 2011-09-01 Thomas Quinot <quinot@adacore.com>
4403 * sem_aux.adb, exp_ch4.adb: Minor reformatting
4405 2011-09-01 Pascal Obry <obry@adacore.com>
4407 * prj-proc.adb, prj.ads, sinput-p.adb: Minor reformatting.
4409 2011-09-01 Ed Schonberg <schonberg@adacore.com>
4411 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Generate references to
4412 the formals of a subprogram stub that acts as a spec.
4414 2011-09-01 Ed Schonberg <schonberg@adacore.com>
4416 * exp_ch6.adb (Expand_Inlined_Call): If an actual is a by_reference
4417 type, declare a renaming for it, not an object declaration.
4419 2011-09-01 Yannick Moy <moy@adacore.com>
4421 * ali-util.adb, ali-util.ads (Read_Withed_ALIs): Add parameter
4422 Ignore_Errors to ignore failures to read ALI files when True.
4424 2011-09-01 Javier Miranda <miranda@adacore.com>
4426 * exp_ch3.adb (Expand_N_Object_Declaration): Handle non-default
4427 constructor calls associated with non-tagged record types.
4429 2011-09-01 Robert Dewar <dewar@adacore.com>
4431 * g-socthi-vms.adb: Minor reformatting.
4433 2011-09-01 Nicolas Roche <roche@adacore.com>
4435 * sysdep.c: Don't use macro functions for stdio functions on VxWorks
4436 in order to avoid impact of imcompatible changes.
4437 * cstreams.c: Likewise
4439 * aux-io.c: Likewise
4441 2011-09-01 Yannick Moy <moy@adacore.com>
4443 * lib-writ.adb (Write_With_Lines): Always output complete information
4444 on "with" line in Alfa mode, as this is required by formal verification
4447 2011-09-01 Tristan Gingold <gingold@adacore.com>
4449 * g-socthi-vms.adb: Add comments.
4451 2011-09-01 Pascal Obry <obry@adacore.com>
4453 * prj.ads: Minor reformatting.
4455 2011-09-01 Vincent Celier <celier@adacore.com>
4457 * prj-env.adb (Create_Config_Pragmas_File.Check): Put all naming
4458 exceptions in the config pragmas file.
4460 2011-09-01 Tristan Gingold <gingold@adacore.com>
4462 * gnat_ugn.texi: Document GNAT_STACK_SIZE on IVMS.
4464 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
4466 * exp_ch7.adb (Find_Insertion_List): New routine.
4467 (Process_Transient_Objects): Add code to handle the abnormal
4468 finalization of a controlled transient associated with a subprogram
4469 call. Since transients are cleaned up right after the associated
4470 context, an exception raised during a subprogram call may bypass the
4473 2011-09-01 Robert Dewar <dewar@adacore.com>
4475 * exp_ch6.adb (Expand_Call): Check actual for aliased parameter is
4478 2011-09-01 Robert Dewar <dewar@adacore.com>
4480 * exp_ch4.adb, a-exexda.adb: Minor reformatting.
4482 2011-09-01 Robert Dewar <dewar@adacore.com>
4484 * s-taskin.ads, s-tassta.adb, sem_ch13.adb: Minor reformatting.
4486 2011-09-01 Thomas Quinot <quinot@adacore.com>
4488 * Makefile.rtl: Move s-oscons.o from GNATRTL_TASKING_OBJS to
4489 GNATRTL_NONTASKING_OBJS.
4491 2011-09-01 Robert Dewar <dewar@adacore.com>
4493 * einfo.ads (Is_Aliased): Fix existing documentation and add note on
4494 possibility of this flag being set for formals in Ada 2012 mode.
4495 * par-ch6.adb (P_Formal_Part): Handle aliased for parameters for Ada
4497 * sem_ch6.adb (Process_Formals): Handle aliased parameters in Ada 2012
4499 * sinfo.adb (Aliased_Present): Allowed in N_Parameter_Specification for
4501 * sinfo.ads (Aliased_Present): Allowed in N_Parameter_Specification for
4504 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
4506 * exp_ch4.adb (Find_Insertion_Node): New routine. Determines the proper
4507 insertion node in a tree of nested Expression_With_Actions nodes.
4508 (Process_Transient_Object): In the case where a complex if statement
4509 has been converted into nested Expression_With_Actions nodes, the
4510 "hook" object and the associated access type must be inserted before
4511 the top most Expression_With_Actions.
4513 2011-09-01 Robert Dewar <dewar@adacore.com>
4515 * a-cbprqu.adb, a-cbprqu.ads, a-cuprqu.adb, a-cuprqu.ads,
4516 a-cbsyqu.adb, a-cbsyqu.ads: Minor reformatting.
4518 2011-09-01 Ed Schonberg <schonberg@adacore.com>
4520 * sem_attr.adb: Conditionalize aliasing predicates to Ada2012.
4522 2011-09-01 Jose Ruiz <ruiz@adacore.com>
4524 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the CPU
4526 * aspects.adb (Canonical_Aspect): Add entry for the CPU aspect.
4527 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the CPU aspect
4528 in a similar way as we do for the Priority or Dispatching_Domain aspect.
4529 * s-mudido-affinity.adb (Dispatching_Domain_Tasks,
4530 Dispatching_Domains_Frozen): Move this local data to package
4531 System.Tasking because with the CPU aspect we need to have access
4532 to this data when creating the task in System.Tasking.Stages.Create_Task
4533 * s-taskin.ads (Dispatching_Domain_Tasks, Dispatching_Domains_Frozen):
4534 Move these variables from the body of
4535 System.Multiprocessors.Dispatching_Domains because with the CPU aspect
4536 we need to have access to this data when creating the task in
4537 System.Tasking.Stages.Create_Task.
4538 * s-taskin.adb (Initialize): Signal the allocation of the environment
4539 task to a CPU, if any, so that we know whether the CPU can be
4540 transferred to a different dispatching domain.
4541 * s-tassta.adb (Create_Task): Check whether the CPU to which this task
4542 is being allocated belongs to the dispatching domain where the task
4543 lives. Signal the allocation of the task to a CPU, if any, so that we
4544 know whether the CPU can be transferred to a different dispatching
4547 2011-09-01 Ed Schonberg <schonberg@adacore.com>
4549 * exp_attr.adb, sem_attr.adb, snames.ads-tmpl: Implementation of
4550 attributes Same_Storage and Overlaps_Storage.
4552 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
4554 * exp_strm.adb: Remove with and use clause for Opt.
4555 (Build_Array_Input_Function): Remove the version-dependent generation
4556 of the return statement. The Ada 2005 tree is now the default.
4558 2011-09-01 Yannick Moy <moy@adacore.com>
4560 * put_alfa.adb: Unconditionnally write files in Alfa section, so that
4561 it is never empty when compiling in Alfa mode.
4563 2011-09-01 Robert Dewar <dewar@adacore.com>
4565 * sem_aggr.adb, sem_ch3.adb, a-direct.adb, s-taprop-vxworks.adb,
4566 comperr.adb, exp_ch9.adb, exp_pakd.adb, sem_ch12.adb, freeze.adb,
4567 s-taprop-mingw.adb, s-taprop-linux.adb, s-taprop-solaris.adb,
4568 gnat1drv.adb, a-rbtgbo.adb, exp_dist.adb: Minor reformatting
4570 2011-09-01 Matthew Heaney <heaney@adacore.com>
4572 * Makefile.rtl, impunit.adb: Add a-csquin.ads, a-cusyqu.ad[sb],
4573 a-cuprqu.ad[sb], a-cbsyqu.ad[sb], a-cbprqu.ad[sb]
4574 * a-csquin.ads: New Ada 2012 unit that specifies the queue interface
4575 * a-cusyqu.ads, a-cusyqu.adb: New Ada 2012 unit that specifies the
4576 unbounded queue container.
4577 * a-cbsyqu.ads, a-cbsyqu.adb: New Ada 2012 unit that specifies the
4578 bounded queue container.
4579 * a-cuprqu.ads, a-cuprqu.adb: New Ada 2012 unit that specifies the
4580 unbounded priority queue container.
4581 * a-cbprqu.ads, a-cbprqu.adb: New Ada 2012 unit that specifies the
4582 bounded priority queue container.
4584 2011-08-31 Pascal Obry <obry@adacore.com>
4586 * a-direct.adb: Do not try to create an UNC path on Windows.
4587 (Create_Path): Skip leading computer name in UNC path if any.
4589 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
4591 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): Remove the
4592 version-dependent generation of the return statement. The Ada 2005 tree
4595 2011-08-31 Thomas Quinot <quinot@adacore.com>
4597 * rtsfind.ads, exp_dist.adb (Find_Numeric_Representation): Predefined
4598 types Stream_Element_Offset and Storage_Offset have a different native
4599 type depending on whether the platform is 32 or 64 bits. When
4600 exchanging them, always convert to 64 bits.
4602 2011-08-31 Yannick Moy <moy@adacore.com>
4604 * debug.adb: Reserve debug option -gnatd.E for passing gnatprove option
4605 --force-alfa to gnat2why.
4607 2011-08-31 Ed Schonberg <schonberg@adacore.com>
4609 * sem_ch12.adb (Save_References): If the node has aspects, save
4610 references within the corresponding expressions in a separate step,
4611 because the aspects are not directly in the tree for the declaration
4612 to which they belong.
4614 2011-08-31 Arnaud Charlet <charlet@adacore.com>
4616 * freeze.adb (Freeze_Record_Type): Omit test on variable size component
4617 in CodePeer mode, since representation clauses are partially ignored.
4618 * gcc-interface/Make-lang.in: Update dependencies.
4620 2011-08-31 Jose Ruiz <ruiz@adacore.com>
4622 * s-taprop-vxworks.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
4623 s-taprop-solaris.adb (Create_Task): Not_A_Specific_CPU can be assigned
4624 to any dispatching domain.
4626 2011-08-31 Thomas Quinot <quinot@adacore.com>
4628 * exp_ch4.adb: Minor reformatting.
4630 2011-08-31 Bob Duff <duff@adacore.com>
4632 * sem_ch6.adb (Get_Generic_Parent_Type): Don't query Subtype_Indication
4633 on nodes for which it is not defined.
4634 (Is_Non_Overriding_Operation): Exit the loop when we find a generic
4637 2011-08-31 Bob Duff <duff@adacore.com>
4639 * sem_ch3.adb (Process_Full_View): Disable legality check if
4640 In_Instance, to avoid spurious errors.
4641 * sem_ch12.adb (Validate_Derived_Type_Instance): Disable legality check
4642 if In_Instance, to avoid spurious errors.
4644 2011-08-31 Pascal Obry <obry@adacore.com>
4646 * a-direct.adb: Use Dir_Seps everywhere to properly handle all
4647 directory speparators.
4648 (Compose): Use Dir_Seps to handle both forms.
4649 (Create_Path): Use Dir_Seps instead of explicit check, no semantic
4651 (Extension): Use Dir_Seps to handle both forms.
4653 2011-08-31 Pascal Obry <obry@adacore.com>
4655 * prj-conf.adb: Minor reformatting.
4657 2011-08-31 Jose Ruiz <ruiz@adacore.com>
4659 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the
4660 dispatching domain aspect.
4661 * aspects.adb (Canonical_Aspect): Add entry for the dispatching domain
4663 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the
4664 Dispatching_Domain aspect in a similar way as we do for the Priority
4666 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Add the
4667 Dispatching_Domain component if a Dispatching_Domain pragma or aspect
4669 (Make_Task_Create_Call): Add the Dispatching_Domain when creating a task
4670 * par-prag.adb (Prag): Add Pragma_Dispatching_Domain as a known pragma.
4671 * sem_prag.adb (Analyze_Pragma): Check the correctness of a pragma
4672 Dispatching_Domain and add it to the task definition.
4673 (Sig_Flags): Add Pragma_Dispatching_Domain.
4674 * rtsfind.ads, rtsfind.adb (RTU_Id, RE_Id, Get_Unit_Name): Add the
4675 support to find the types Dispatching_Domain and
4676 Dispatching_Domain_Access.
4677 * sinfo.ads, sinfo.adb (Has_Pragma_Dispatching_Domain,
4678 Set_Has_Pragma_Dispatching_Domain): Add these subprograms to set and
4679 query the availability of a pragma Dispatching_Domain.
4680 * snames.ads-tmpl (Name_uDispatching_Domain): Add this name required by
4681 the expander to pass the Dispatching_Domain when creating a task.
4682 (Name_Dispatching_Domain): Add this new name for a pragma.
4683 (Pragma_Id): Add the new Pragma_Dispatching_Domain.
4684 * s-tassta.ads, s-tassta.adb (Create_Task): Set the domain to which the
4685 task has been allocated at creation time.
4686 * s-tarest.adb (Create_Restricted_Task): The dispatching domain using
4687 Ravenscar is always null.
4688 * s-taskin.ads, s-taskin.adb (Initialize_ATCB): Set the domain to which
4689 the task has been allocated at creation time.
4690 * s-tporft.adb (Register_Foreign_Thread): A foreign task will not have
4691 a specific dispatching domain.
4692 * s-taprop-linux.adb, s-taprop-solaris.adb, s-taprop-vxworks.adb,
4693 s-taprop-mingw.adb (Create_Task): Check whether both Dispatching_Domain
4694 and CPU are specified for the task, and the CPU value is not contained
4695 within the range of processors for the domain.
4697 2011-08-31 Vincent Celier <celier@adacore.com>
4699 * make.adb (Original_Gcc) : New constant String_Access.
4700 (Gnatmake): For VM targets, do not use VM version of the compiler if
4701 --GCC= has been specified.
4703 2011-08-31 Thomas Quinot <quinot@adacore.com>
4705 * sem_ch5.adb: Minor reformatting.
4707 2011-08-31 Ed Schonberg <schonberg@adacore.com>
4709 * exp_pakd.adb (Convert_To_PAT_Type): If prefix is a function call, do
4712 2011-08-31 Bob Duff <duff@adacore.com>
4714 * exp_ch4.adb (Expand_N_Selected_Component): Use the full type, in case
4715 the access type is private; we don't care about privacy in expansion.
4717 2011-08-31 Ed Schonberg <schonberg@adacore.com>
4719 * sem_aggr.adb (Resolve_Aggregate): In an instance, ignore aggregate
4720 subcomponents tnat may be limited, because they originate in view
4721 conflicts. If the original aggregate is legal and the actuals are
4722 legal, the aggregate itself is legal.
4724 2011-08-31 Matthew Heaney <heaney@adacore.com>
4726 * a-rbtgbo.adb (Clear_Tree): Assert representation invariant for lock
4729 2011-08-31 Ed Schonberg <schonberg@adacore.com>
4731 * sem_ch5.adb: Set kind of loop parameter properly, to preserve all
4734 2011-08-31 Jose Ruiz <ruiz@adacore.com>
4736 * sem_ch13.adb (Analyze_Aspect_Specifications): For the Priority and
4737 Interrupt_Priority aspects, force the analysis of the aspect expression
4738 (when building the equivalent pragma). Otherwise, its analysis is done
4739 too late, after the task or protected object has been created.
4740 * sem_ch9.adb (Analyze_Single_Protected_Declaration,
4741 Analyze_Single_Task_Declaration): Remove the code to move the aspects
4742 to the object declaration because they are needed in the type
4745 2011-08-31 Robert Dewar <dewar@adacore.com>
4747 * exp_ch5.adb, exp_ch7.ads, sem_ch5.adb, put_scos.adb, s-rannum.adb,
4748 a-rbtgbo.adb, exp_intr.adb, a-cbdlli.adb, a-cbdlli.ads: Minor
4751 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
4753 * exp_util.adb (Find_Protection_Type): Do not look for fields _object
4754 if the corresponding type is malformed due to restriction violations.
4756 2011-08-31 Robert Dewar <dewar@adacore.com>
4758 * s-ransee.ads, s-ransee.adb: Minor reformatting.
4760 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
4762 * exp_ch4.adb (Expand_N_Allocator): Correct faulty condition which
4763 would cause the generation of Set_Finalize_Address if the target is a
4764 VM and the designated type is not derived from [Limited_]Controlled.
4766 2011-08-31 Arnaud Charlet <charlet@adacore.com>
4768 * comperr.adb, comperr.ads, gnat1drv.adb (Delete_SCIL_Files): New
4770 (Compiler_Abort, Gnat1drv): Call Delete_SCIL_Files in codepeer mode in
4771 case of a compilation error.
4773 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
4775 * init.c (__gnat_error_handler): Standardize the stack overflow or
4776 erroneous memory access message.
4777 * seh_init.c (__gnat_SEH_error_handler): Standardize the stack overflow
4778 or erroneous memory access message.
4780 2011-08-31 Robert Dewar <dewar@adacore.com>
4782 * sem_ch4.adb: Minor reformatting.
4783 * sem_ch6.adb: Minor code reorganization (use Ekind_In).
4785 2011-08-31 Thomas Quinot <quinot@adacore.com>
4787 * scos.ads: Minor documentation clarification.
4788 * put_scos.adb: Do not generate SCO unit header line for a unit that
4791 2011-08-31 Robert Dewar <dewar@adacore.com>
4793 * a-rbtgbo.adb, alfa_test.adb: Minor reformatting.
4795 2011-08-31 Tristan Gingold <gingold@adacore.com>
4797 * exp_ch7.ads, exp_ch7.adb (Finalization_Exception_Data): New type to
4798 hold variables between these following subprograms.
4799 (Build_Exception_Handler, Build_Object_Declarations,
4800 Build_Raise_Statement): Use the above type as parameter.
4801 Make the above adjustments.
4802 * exp_intr.adb (Expand_Unc_Deallocation): Adjust.
4804 2011-08-31 Pascal Obry <obry@adacore.com>
4806 * projects.texi: Minor reformatting.
4808 2011-08-31 Tristan Gingold <gingold@adacore.com>
4810 * s-ransee.ads, s-ransee.adb: Add system.random_seed unit.
4811 * s-rannum.adb (Reset): Use Get_Seed from s-ransee.
4813 2011-08-31 Ed Schonberg <schonberg@adacore.com>
4815 * exp_ch5.adb: Minor code cleanup.
4816 * sem_ch5.adb (Analyze_Iteration_Scheme): Set ekind of loop variable to
4817 prevent cascaded errors.
4818 (Analyze_Loop_Statement): In semantics-only mode, introduce loop
4819 variable of an iterator specification in current scope.
4820 * sem_ch6.adb (Analyze_Return_Statement, Find_what_It_Apples_To): Skip
4821 postconditions on the stack, as they contain no return statements.
4823 2011-08-31 Yannick Moy <moy@adacore.com>
4825 * exp_alfa.adb (Expand_Alfa_N_Package_Declaration,
4826 Expand_Alfa_N_Subprogram_Body): Remove useless procedures which simply
4827 call Qualify_Entity_Names.
4828 (Expand_Alfa): call Qualify_Entity_Names in more cases
4829 * lib-xref-alfa.adb: Take into account system package.
4830 * sem_prag.adb Take into account restrictions in Alfa mode, contrary to
4831 CodePeer mode in which we are interested in finding bugs even if
4832 compiler cannot compile source.
4833 * sem_util.adb, sem_util.ads (Unique_Entity): Take into account case of
4836 2011-08-31 Gary Dismukes <dismukes@adacore.com>
4838 * sem_ch3.adb (Constrain_Concurrent): Retrieve Base_Type of the subtype
4839 denoted by the subtype mark to ensure getting the concurrent type in
4840 the case where the subtype mark denotes a private subtype of a
4841 concurrent type (needed when using -gnatc).
4842 (Process_Subtype): For the processing specific to type kinds, case on
4843 the Base_Type kind of the Subtype_Mark_Id, to handle cases where the
4844 subtype denotes a private subtype whose base type is nonprivate (needed
4845 for subtypes of private fulfilled by task types when compiling with
4848 2011-08-31 Gary Dismukes <dismukes@adacore.com>
4850 * sem_disp.adb (Check_Dispatching_Operation): Bypass registration of
4851 late primitives that override interface operations when the full
4852 expander is not active, to avoid blowups in Register_Primitive when
4853 types don't have associated secondary dispatch tables.
4855 2011-08-31 Yannick Moy <moy@adacore.com>
4857 * alfa_test.adb: Code clean up.
4859 2011-08-31 Marc Sango <sango@adacore.com>
4861 * restrict.adb (Check_SPARK_Restriction): Change Comes_From_Source (N)
4862 by Comes_From_Source (Original_Node (N)) in order to treat also the
4863 nodes which have been rewritten.
4864 * sem_ch4.adb (Analyze_Explicit_Dereference, Analyze_Slice): Guard the
4865 explicit dereference and slice violation in spark mode on the nodes
4866 coming only from the source code.
4868 2011-08-31 Robert Dewar <dewar@adacore.com>
4870 * exp_ch5.adb, exp_alfa.ads, prj.ads, sem_attr.adb,
4871 lib-xref-alfa.adb: Minor reformatting.
4873 2011-08-31 Matthew Heaney <heaney@adacore.com>
4875 * a-crbltr.ads (Tree_Type): Default-initialize the Nodes component.
4877 2011-08-31 Javier Miranda <miranda@adacore.com>
4879 * sem_ch4.adb (Try_Object_Operation): Addition of one formal to search
4880 only for class-wide subprograms conflicting with entities of concurrent
4883 2011-08-31 Matthew Heaney <heaney@adacore.com>
4885 * a-rbtgbo.adb (Generic_Allocate): Initialize pointer components of
4888 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
4890 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): Provide a more
4891 general description of the routine.
4893 2011-08-31 Ed Schonberg <schonberg@adacore.com>
4895 * a-cbdlli.adb, a-cbdlli.ads: Add iterator machinery to bounded
4896 doubly-linked lists.
4898 2011-08-31 Gary Dismukes <dismukes@adacore.com>
4900 * exp_ch5.adb (Expand_N_Assignment_Statement): When a discriminant
4901 check is needed for a left-hand side that is a dereference, and the
4902 base type is private without discriminants (whereas the full type does
4903 have discriminants), an extra retrieval of the underlying type may be
4904 needed in the case where the subtype is a record subtype whose base
4905 type is private. Update comments.
4907 2011-08-31 Javier Miranda <miranda@adacore.com>
4909 * sem_ch4.adb (Try_Object_Operation): When a dispatching primitive is
4910 found check if there is a class-wide subprogram covering the primitive.
4912 2011-08-31 Yannick Moy <moy@adacore.com>
4914 * sem_res.adb: Further cases where full expansion test is needed,
4915 rather than expansion test.
4917 2011-08-31 Pascal Obry <obry@adacore.com>
4919 * prj-attr.adb: Fix Source_File_Switches attribute kind (must be a list)
4921 2011-08-31 Ed Schonberg <schonberg@adacore.com>
4923 * exp_ch5.adb: Handle iterators over derived container types.
4925 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
4927 * einfo.ads, einfo.adb: Add new flag Has_Anonymous_Master.
4928 (Has_Anonymous_Master): New routine.
4929 (Set_Has_Anonymous_Master): New routine.
4930 (Write_Entity_Flags): Add an entry for Has_Anonymous_Master.
4931 * exp_ch4.adb: Add with and use clause for Sem_Ch8.
4932 (Current_Anonymous_Master): New routine.
4933 (Current_Unit_First_Declaration): Removed.
4934 (Current_Unit_Scope): Removed.
4935 (Expand_N_Allocator): Anonymous access-to-controlled types now chain
4936 their objects on a per-unit heterogeneous finalization master.
4938 2011-08-31 Matthew Heaney <heaney@adacore.com>
4940 * a-cbhama.adb, a-cbhase.adb (Insert): Check for zero-length buckets
4943 2011-08-31 Jose Ruiz <ruiz@adacore.com>
4945 * s-taprop-linux.adb (Create_Task): Avoid changing the affinity mask
4948 2011-08-31 Gary Dismukes <dismukes@adacore.com>
4950 * sem_disp.adb (Propagate_Tag): Return without propagating in the case
4951 where the actual is an unexpanded call to 'Input.
4953 2011-08-31 Yannick Moy <moy@adacore.com>
4955 * sem_ch4.adb: Code clean up.
4957 2011-08-31 Yannick Moy <moy@adacore.com>
4959 * exp_alfa.adb, exp_alfa.ads: Minor correction of copyright notice.
4961 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
4963 * exp_ch7.adb (Build_Array_Deep_Procs): Do not generate Deep_Finalize
4964 and TSS primitive Finalize_Address if finalization is suppressed.
4965 (Build_Record_Deep_Procs): Do not generate Deep_Finalize and TSS
4966 primitive Finalize_Address if finalization is suppressed.
4968 2011-08-31 Jose Ruiz <ruiz@adacore.com>
4970 * s-mudido-affinity.adb, s-taprop-linux.adb, s-taprop-mingw.adb,
4971 s-taprop-solaris.adb, s-taprop-vxworks.adb (Set_Task_Affinity): Make
4972 sure that the underlying task has already been created before trying
4973 to change its affinity.
4974 (Set_CPU): Use the term processor instead of CPU, as we do in
4977 2011-08-31 Vincent Celier <celier@adacore.com>
4979 * prj-attr.adb: New Compiler attribute Source_File_Switches.
4980 * prj-nmsc.adb (Process_Compiler): Process attribute
4981 Source_File_Switches.
4982 * prj.ads (Language_Config): New name list component
4983 Name_Source_File_Switches.
4984 * snames.ads-tmpl (Name_Source_File_Switches): New standard name.
4986 2011-08-31 Ed Schonberg <schonberg@adacore.com>
4988 * sem_attr.adb (Analyze_Attribute, case 'Old): If prefix may be a
4989 discriminated component of an actual, expand at once to prevent
4990 ouf-of-order references with generated subtypes.
4992 2011-08-31 Yannick Moy <moy@adacore.com>
4994 * lib-xref-alfa.adb (Add_Alfa_Xrefs): Do not take into account read
4995 reference to operator in Alfa xrefs.
4997 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
4999 * sem_ch12.adb (Freeze_Subprogram_Body): Add code to handle the case
5000 where the parent instance was frozen before the current instance due to
5001 the presence of a source body. Update calls to Insert_After_Last_Decl.
5002 (Insert_After_Last_Decl): Renamed to Insert_Freeze_Node_For_Instance.
5003 Update the comment which illustrates the purpose of the routine.
5004 Package instances are now frozen by source bodies which appear after
5005 the instance. This ensures that entities coming from within the
5006 instance are available for use in the said bodies.
5007 (Install_Body): Add code to handle the case where the parent instance
5008 was frozen before the current instance due to the presence of a source
5009 body. Update calls to Insert_After_Last_Decl.
5011 2011-08-31 Jose Ruiz <ruiz@adacore.com>
5013 * s-taprop-linux.adb (Set_Task_Affinity): Avoid the use of anonymous
5015 * affinity.c (__gnat_set_affinity_mask): Declare index variable.
5017 2011-08-31 Yannick Moy <moy@adacore.com>
5019 * sem_ch8.adb (Analyze_Subprogram_Renaming): Refine expander test in
5021 * alfa.adb, alfa.ads, alfa_test.adb, ali.adb, debug.adb, errout.adb,
5022 errout.ads, erroutc.adb, expander.adb, exp_ch4.adb, exp_ch7.adb,
5023 freeze.adb, get_alfa.adb, get_alfa.ads, gnat1drv.adb, lib-writ.adb,
5024 lib-writ.ads, lib-xref.adb, lib-xref.ads, lib-xref-alfa.adb, opt.adb,
5025 opt.ads, put_alfa.adb, put_alfa.ads, restrict.adb, sem_ch12.adb,
5026 sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
5027 sem_prag.adb, sem_res.adb, sem_util.adb: Minor reformatting, renaming
5028 ALFA in Alfa (we dropped acronym).
5029 * einfo.adb (Primitive_Operations): Correctly return list of primitive
5030 operations in a case where it returned previously No_Elist.
5032 2011-08-31 Robert Dewar <dewar@adacore.com>
5034 * s-taprop-vxworks.adb, sem_ch5.adb, s-taprop-tru64.adb, exp_alfa.adb,
5035 s-taprop-vms.adb, bindgen.adb, s-mudido.adb, s-mudido.ads,
5036 sem_res.adb, expander.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
5037 s-taprop-solaris.adb, s-mudido-affinity.adb, vms_conv.adb,
5038 s-taprop-irix.adb, s-taprop.ads, s-taskin.adb, s-taskin.ads,
5039 s-taprop-hpux-dce.adb, a-chtgbo.adb, s-taprop-posix.adb: Minor
5042 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
5044 * sem_ch12 (Check_Private_View): Revert previous change.
5045 * sem_res.adb (Conversion_Check): Do not emit the error message if the
5046 conversion is in a generic instance.
5048 2011-08-31 Matthew Heaney <heaney@adacore.com>
5050 * a-cbhase.adb (Symmetric_Difference): Dereference correct node array.
5051 * a-chtgbo.adb (Free): Allow 0 as index value.
5053 2011-08-31 Matthew Heaney <heaney@adacore.com>
5055 * a-cborma.adb (Insert): Add comment to explain why no element
5058 2011-08-31 Gary Dismukes <dismukes@adacore.com>
5060 * sem_util.adb (Find_Body_Discriminal): Test whether the scope of the
5061 spec discriminant is already a concurrent type, in which case just use
5062 it, otherwise fetch the Corresponding_Concurrent_Type as before.
5064 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
5066 * system-irix-n64.ads, system-linux-armeb.ads, system-linux-armel.ads,
5067 system-linux-mips.ads, system-linux-mipsel.ads,
5068 system-linux-mips64el.ads, system-linux-ppc64.ads,
5069 system-linux-sparcv9.ads, system-rtems.ads: Remove GCC_ZCX_Support.
5071 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
5073 * gcc-interface/ada-tree.h (TYPE_EXTRA_SUBTYPE_P): Add internal check.
5074 * gcc-interface/utils2.c (build_binary_op): Tighten condition.
5075 (build_unary_op): Likewise.
5077 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
5079 * raise-gcc.c: Do not include coretypes.h and tm.h.
5080 (setup_to_install): Remove test for compiler macro.
5081 * targext.c: Document use for the library.
5082 * gcc-interface/Makefile.in: Fix comment on the use of IN_GCC.
5084 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
5086 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not convert
5087 the expression to the nominal type if the latter is a record type with
5088 a variant part and the type of the former is a record type without one.
5090 2011-08-30 Yannick Moy <moy@adacore.com>
5092 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
5093 expansion in Alfa mode.
5094 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public
5095 * exp_alfa.adb, exp_alfa.ads: New package defining light expansion for
5097 * gnat1drv.adb (Adjust_Global_Switches): Update Comment.
5098 * sem_res.adb: Ditto.
5099 * gcc-interface/Make-lang.in: Update dependencies.
5101 2011-08-30 Thomas Quinot <quinot@adacore.com>
5103 * g-socket.ads: Minor documentation adjustment.
5105 2011-08-30 Robert Dewar <dewar@adacore.com>
5107 * exp_ch9.adb, s-tassta.adb, s-secsta.adb: Minor reformatting.
5109 2011-08-30 Yannick Moy <moy@adacore.com>
5111 * exp_ch6_light.adb, exp_ch6_light.ads, exp_attr_light.adb,
5112 exp_attr_light.ads, exp_ch7_light.adb, exp_ch7_light.ads,
5113 exp_light.adb, exp_light.ads, exp_prag.adb, expander.adb,
5114 gnat1drv.adb, exp_ch11.adb, exp_ch6.adb, exp_ch6.ads, exp_aggr.adb:
5115 Revert change which introduced files for "light"
5116 expansion, to be replaced by a single file for Alfa expansion.
5118 2011-08-30 Robert Dewar <dewar@adacore.com>
5120 * opt.ads, s-soflin.adb, exp_ch9.adb, sem_res.adb: Update comment.
5121 Minor code reorg/reformatting.
5123 2011-08-30 Yannick Moy <moy@adacore.com>
5125 * opt.adb, opt.ads (Full_Expander_Active): New function defines a
5126 common shorthand for (Expander_Active and not ALFA_Mode) that can be
5127 used for testing full expansion, that is active expansion not in the
5128 reduced mode for Alfa
5129 * exp_ch4.adb, exp_ch9.adb, exp_disp.adb, sem_ch10.adb, sem_ch12.adb,
5130 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Use newly defined "flag" instead
5131 of the verbose (Expander_Active and not ALFA_Mode)
5133 2011-08-30 Tristan Gingold <gingold@adacore.com>
5135 * s-parame-vms-alpha.ads, s-parame-hpux.ads, s-tassta.adb,
5136 s-tarest.adb, s-parame-vms-ia64.ads, s-soflin.adb, s-secsta.adb,
5137 s-secsta.ads, s-parame.ads, s-parame-vxworks.ads, s-parame-ae653.ads:
5138 Renames Ratio to Percentage, and Sec_Stack_Ratio to Sec_Stack_Percentage
5140 2011-08-30 Gary Dismukes <dismukes@adacore.com>
5142 * sem_res.adb (Valid_Conversion): Revise test for implicit anonymous
5143 access conversions to check that the conversion is a rewritten node,
5144 rather than just having Comes_From_Source set to False, which wasn't
5147 2011-08-30 Robert Dewar <dewar@adacore.com>
5149 * exp_ch9.adb, sem_ch9.adb, sem_ch6.adb, exp_disp.adb,
5150 g-socket.ads: Minor reformatting.
5152 2011-08-30 Thomas Quinot <quinot@adacore.com>
5154 * sem_util.adb: Minor reformatting.
5156 2011-08-30 Tristan Gingold <gingold@adacore.com>
5158 * raise-gcc.c: Never catch exception if _UA_FORCE_UNWIND flag is set,
5159 to be compliant with the ABI.
5161 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
5163 * sem_ch12.adb (Check_Private_View): Exchange the private and full view
5164 of a designated type when the related access type is an actual in an
5165 instance. This ensures that the full view of designated type is
5166 available when inside the body of the instance.
5168 2011-08-30 Ed Schonberg <schonberg@adacore.com>
5170 * sem_util.adb (May_Be_Lvalue): To determine whether a reference may be
5171 in a position to be modified, a slice is treated like an indexed
5174 2011-08-30 Thomas Quinot <quinot@adacore.com>
5176 * s-oscons-tmplt.c, g-socket.ads: Adjust maximum allowed value for
5177 field tv_sec in struct timeval.
5179 2011-08-30 Yannick Moy <moy@adacore.com>
5181 * exp_ch9.adb, exp_disp.adb, sem_ch9.adb, sem_res.adb: Protect several
5182 blocks of code doing full expansion, previously only guarded by
5183 Expander_Active, by anding the test that ALFA_Mode is not set
5185 2011-08-30 Ed Schonberg <schonberg@adacore.com>
5187 * sem_ch6.adb (Analyze_Return_Type): If the return type is incomplete,
5188 add the function to the list of private dependents, for subsequent
5189 legality check on Taft amendment types.
5190 * sem_ch12.adb (Analyze_Formal_Incomplete_Type): Initialize
5191 Private_Dependents, as for other incomplete types.
5192 * sem_util.adb (Wrong_Type): Avoid cascaded errors when a
5193 Taft-amendment type is used as the return type of a function.
5195 2011-08-30 Javier Miranda <miranda@adacore.com>
5197 * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup: replace code
5198 which emits an error by a call to a new routine which report the error.
5199 * exp_ch9.adb (Build_Wrapper_Spec): Build the wrapper even if the
5200 entity does not cover an existing interface.
5201 * errout.ads, errout.adb (Error_Msg_PT): New routine. Used to factorize
5203 * sem_ch6.adb (Check_Conformance): Add specific error for wrappers of
5204 protected procedures or entries whose mode is not conformant.
5205 (Check_Synchronized_Overriding): Code cleanup: replace code which emits
5206 an error by a call to a new routine which report the error.
5208 2011-08-30 Robert Dewar <dewar@adacore.com>
5210 * gnat_rm.texi: Minor change.
5211 * exp_attr_light.adb: Minor reformatting.
5213 2011-08-30 Ed Schonberg <schonberg@adacore.com>
5215 * sem_ch3.adb: Patch inheritance of aspects in
5216 Complete_Private_Subtype, to avoid infinite loop.
5218 2011-08-30 Javier Miranda <miranda@adacore.com>
5220 * sem_ch3.adb (Add_Internal_Interface_Entities): If serious errors have
5221 been reported and a subprogram covering an interface primitive is not
5222 found then skip generating the internal entity. Done to avoid crashing
5224 (Check_Abstract_Overriding): Change text of error of wrong formal of
5225 protected subprogram or entry. Done for consistency to emit exactly the
5226 same error reported by Check_Synchronized_Overriding. In addition, the
5227 error is restricted to protected types (bug found working on AI05-0090)
5229 2011-08-30 Yannick Moy <moy@adacore.com>
5231 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
5232 expansion in Alfa mode.
5233 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public.
5234 * exp_light.adb, exp_light.ads: New package defining light expansion.
5235 * expander.adb (Expand): Call light expansion in Alfa mode
5236 * exp_ch6_light.adb, exp_ch6_light.ads: Light expansion of chapter 6
5238 * exp_ch7_light.adb, exp_ch7_light.ads: Light expansion of chapter 7
5240 * exp_attr_light.adb, exp_attr_light.ads: Light expansion of attributes
5241 * gnat1drv.adb (Adjust_Global_Switches): Comment
5243 2011-08-30 Yannick Moy <moy@adacore.com>
5245 * lib-xref-alfa.adb: Minor refactoring.
5247 2011-08-30 Yannick Moy <moy@adacore.com>
5249 * exp_ch9.adb (Expand_Entry_Barrier): Do not perform expansion in Alfa
5251 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not perform
5252 expansion in Alfa mode.
5253 * sem_ch9.adb (Analyze_Entry_Body): Do not perform expansion in Alfa
5256 2011-08-30 Robert Dewar <dewar@adacore.com>
5258 * debug_a.adb: Update comment.
5260 2011-08-30 Robert Dewar <dewar@adacore.com>
5262 * exp_ch5.adb, sem_ch3.adb, sem_ch5.adb, einfo.adb, checks.adb,
5263 sem_util.adb, sem_util.ads, sem_res.adb, s-stposu.adb, sem_attr.adb,
5264 exp_ch4.adb, exp_ch6.adb, lib-xref-alfa.adb,
5265 sem_ch8.adb, sem_disp.adb, exp_ch3.adb: Minor reformatting
5267 2011-08-30 Robert Dewar <dewar@adacore.com>
5269 * gnat_rm.texi: Add section on C.6(16) implementation advice for pragma
5272 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
5274 * exp_ch3.adb (Expand_Freeze_Array_Type): Correct the call to
5275 Build_Finalization_Master by supplying an insertion node and enclosing
5276 scope. In its old version, the call did not generate a finalization
5278 (Expand_Freeze_Record_Type): Add local variable Has_AACC. Add code to
5279 recognize anonymous access-to-controlled components. Rewrite the
5280 machinery which creates finalization masters to service anonymous
5281 access-to-controlled components of a record type. In its current state,
5282 only one heterogeneous master is necessary to handle multiple anonymous
5284 (Freeze_Type): Comment reformatting.
5285 * rtsfind.ads: Add RE_Set_Is_Heterogeneous to tables RE_Id and
5287 * s-stposu.adb (Allocate_Any_Controlled): Rewrite the machinery which
5288 associates TSS primitive Finalize_Address with either the master itself
5289 or with the internal hash table depending on the mode of operation of
5292 2011-08-30 Javier Miranda <miranda@adacore.com>
5294 * exp_ch3.adb (Make_Eq_If): If the etype of the _parent component is an
5295 interface type then do not generate code to compare this component.
5296 Required since they have no components and their equality operator is
5299 2011-08-30 Steve Baird <baird@adacore.com>
5301 * sem_util.ads (Deepest_Type_Access_Level): New function; for the type
5302 of a saooaaat (i.e, a stand-alone object of an anonymous access type),
5303 returns the (static) accessibility level of the object. Otherwise, the
5304 same as Type_Access_Level.
5305 (Dynamic_Accessibility_Level): New function; given an expression which
5306 could occur as the rhs of an assignment to a saooaaat (i.e., an
5307 expression of an access-to-object type), return the new value for the
5308 saooaaat's associated Extra_Accessibility object.
5309 (Effective_Extra_Accessibility): New function; same as
5310 Einfo.Extra_Accessibility except that object renames are looked through.
5312 (Deepest_Type_Access_Level): New function; see sem_util.ads description.
5313 (Dynamic_Accessibility_Level): New function; see sem_util.ads
5315 (Effective_Extra_Accessibility): New function; see sem_util.ads
5317 * einfo.ads (Is_Local_Anonymous_Access): Update comments.
5318 (Extra_Accessibility): Update comments.
5319 (Init_Object_Size_Align): New procedure; same as Init_Size_Align
5320 except RM_Size field (which is only for types) is unaffected.
5322 (Extra_Accessibility): Expand domain to allow objects, not just formals.
5323 (Set_Extra_Accessibility): Expand domain to allow objects, not just
5325 (Init_Size): Add assertion that we are not trashing the
5326 Extra_Accessibility attribute of an object.
5327 (Init_Size_Align): Add assertion that we are not trashing the
5328 Extra_Accessibility attribute of an object.
5329 (Init_Object_Size_Align): New procedure; see einfo.ads description.
5330 * sem_ch3.adb (Find_Type_Of_Object): Set Is_Local_Anonymous_Access
5331 differently for the type of a (non-library-level) saooaaat depending
5332 whether Ada_Version < Ada_2012. This is the only point where Ada_Version
5333 is queried in this set of changes - everything else (in particular,
5334 setting of the Extra_Accessibility attribute in exp_ch3.adb) is
5335 driven off of the setting of the Is_Local_Anonymous_Access attribute.
5336 The special treatment of library-level saooaaats is an optimization,
5337 not required for correctnesss. This is based on the observation that the
5338 Ada2012 rules (static and dynamic) for saooaaats turn out to be
5339 equivalent to the Ada2005 rules in the case of a library-level saooaaat.
5341 (Expand_N_Object_Declaration): If Is_Local_Anonymous_Access is
5342 false for the type of a saooaaat, declare and initialize its
5343 accessibility level object and set the Extra_Accessibility attribute
5344 of the saooaaat to refer to this object.
5345 * checks.adb (Apply_Accessibility_Check): Add Ada 2012 saooaaat support.
5346 * exp_ch4.adb (Expand_N_In): Replace some Extra_Accessibility calls with
5347 calls to Effective_Extra_Accessibility in order to support
5348 renames of saooaaats.
5349 (Expand_N_Type_Conversion): Add new local function,
5350 Has_Extra_Accessibility, and call it when determining whether an
5351 accessibility check is needed.
5352 It returns True iff Present (Effective_Extra_Accessibility (Id)) would
5353 evaluate to True (without raising an exception).
5355 (Expand_N_Assignment_Statement): When assigning to an Ada2012
5356 saooaaat, update its associated Extra_Accessibility object (if
5357 it has one). This includes an accessibility check.
5358 * exp_ch6.adb (Add_Call_By_Copy_Code): When parameter copy-back updates
5359 a saooaaat, update its Extra_Accessibility object too (if it
5361 (Expand_Call): Replace a couple of calls to Type_Access_Level
5362 with calls to Dynamic_Access_Level to handle cases where
5363 passing a literal (any literal) is incorrect.
5364 * sem_attr.adb (Resolve_Attribute): Handle the static accessibility
5365 checks associated with "Saooaat := Some_Object'Access;"; this must
5366 be rejected if Some_Object is declared in a more nested scope
5368 * sem_ch5.adb (Analyze_Assignment): Force accessibility checking for an
5369 assignment to a saooaaat even if Is_Local_Anonymous_Access
5370 returns False for its type (indicating a 2012-style saooaaat).
5372 (Analyze_Object_Renaming): Replace a call to Init_Size_Align
5373 (which is only appropriate for objects, not types) with a call
5374 of Init_Object_Size_Align in order to avoid trashing the
5375 Extra_Accessibility attribute of a rename (the two attributes
5378 (Valid_Conversion) Replace six calls to Type_Access_Level with
5379 calls to Deepest_Type_Access_Level. This is a bit tricky. For an
5380 Ada2012 non-library-level saooaaat, the former returns library level
5381 while the latter returns the (static) accessibility level of the
5382 saooaaat. A type conversion to the anonymous type of a saooaaat
5383 can only occur as part of an assignment to the saooaaat, so we
5384 know that such a conversion must be in a lhs context, so Deepest
5385 yields the result that we need. If such a conversion could occur,
5386 say, as the operand of an equality operator, then this might not
5387 be right. Also add a test so that static accessibilty checks are
5388 performed for converting to a saooaaat's type even if
5389 Is_Local_Anonymous_Access yields False for the type.
5391 2011-08-30 Javier Miranda <miranda@adacore.com>
5393 * sem_disp.adb (Check_Dispatching_Operation): Complete condition that
5394 controls generation of a warning associated with late declaration of
5395 dispatching functions. Required to avoid generating spurious
5398 2011-08-30 Gary Dismukes <dismukes@adacore.com>
5400 * sem_ch6.adb (Check_Return_Subtype_Indication): Issue error if the
5401 return object has an anonymous access type and the function's type is
5402 a named access type.
5403 * sem_ch8.adb (Analyze_Object_Renaming): Suppress error about renaming
5404 conversions on implicit conversions, since such conversions can occur
5405 for anonymous access cases due to expansion. Issue error for attempt
5406 to rename an anonymous expression as an object of a named access type.
5407 * sem_res.ads (Valid_Conversion): Add defaulted parameter Report_Errs,
5408 to indicate whether this function should report errors on invalid
5410 * sem_res.adb (Resolve): For Ada 2012, in the case where the type of
5411 the expression is of an anonymous access type and the expected type is
5412 a named general access type, rewrite the expression as a type
5413 conversion, unless this is an expression of a membership test.
5414 (Valid_Conversion.Error_Msg_N): New procedure that conditions the
5415 calling of Error_Msg_N on new formal Report_Errs.
5416 (Valid_Conversion.Error_Msg_NE): New procedure that conditions the
5417 calling of Error_Msg_NE on new formal Report_Errs.
5418 (Valid_Conversion): Move declaration of this function to the package
5419 spec, to allow calls from membership test processing. For Ada 2012,
5420 enforce legality restrictions on implicit conversions of anonymous
5421 access values to general access types, disallowing such conversions in
5422 cases where the expression has a dynamic accessibility level (access
5423 parameters, stand-alone anonymous access objects, or a component of a
5424 dereference of one of the first two cases).
5425 * sem_type.adb (Covers): For Ada 2012, allow an anonymous access type
5426 in the context of a named general access expected type.
5427 * exp_ch4.adb Add with and use of Exp_Ch2.
5428 (Expand_N_In): Add processing for membership tests applied to
5429 expressions of an anonymous access type. First, Valid_Conversion is
5430 called to check whether the test is statically False, and then the
5431 conversion is expanded to test that the expression's accessibility
5432 level is no deeper than that of the tested type. In the case of
5433 anonymous access-to-tagged types, a tagged membership test is applied
5435 (Tagged_Membership): Extend to handle access type cases, applying the
5436 test to the designated types.
5437 * exp_ch6.adb (Expand_Call): When creating an extra actual for an
5438 accessibility level, and the actual is a 'Access applied to a current
5439 instance, pass the accessibility level of the type of the current
5440 instance rather than applying Object_Access_Level to the prefix. Add a
5441 ??? comment, since this level isn't quite right either (will eventually
5442 need to pass an implicit level parameter to init procs).
5444 2011-08-30 Bob Duff <duff@adacore.com>
5446 * s-taskin.ads: Minor comment fix.
5448 2011-08-30 Ed Schonberg <schonberg@adacore.com>
5450 * sem_res.adb (Check_Parameterless_Call): If the node is a selected
5451 component and the selector is a dispatching operation, check if it is
5452 a prefixed call before rewriting as a parameterless function call.
5454 2011-08-29 Jakub Jelinek <jakub@redhat.com>
5456 * gcc-interface/Makefile.in (../stamp-gnatlib1-$(RTSDIR)): Copy
5457 tsystem.h into $(RTSDIR) instead of rts.
5459 2011-08-29 Robert Dewar <dewar@adacore.com>
5461 * sem_ch10.adb, a-coorse.adb, exp_dist.adb, exp_ch3.adb: Minor
5463 * gcc-interface/Make-lang.in: Update dependencies.
5465 2011-08-29 Yannick Moy <moy@adacore.com>
5467 * alfa.ads (Name_Of_Heap_Variable): New constant name.
5468 * lib-xref-alfa.adb, lib-xref.adb, lib-xref.ads (Drefs): New global
5469 table to hold dereferences.
5470 (Add_ALFA_Xrefs): Take into account dereferences as special
5471 reads/writes to the variable "HEAP".
5472 (Enclosing_Subprogram_Or_Package): Move subprogram here.
5473 (Generate_Dereference): New procedure to store a read/write dereferencew
5475 * put_alfa.adb (Put_ALFA): Use different default than (0,0) used for
5476 the special "HEAP" var.
5477 * sem_ch4.adb (Analyze_Explicit_Dereference): Store read dereference
5479 * sem_util.adb (Note_Possible_Modification): Store write dereference
5482 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5484 * exp_ch3.adb (Freeze_Type): Generate an accessibility check which
5485 ensures that the level of the subpool access type is not deeper than
5486 that of the pool object.
5487 * sem_util.adb (Object_Access_Level): Expand to handle defining
5489 * sem_res.adb (Resolve_Allocator): Add a guard to avoid examining the
5490 subpool handle name of a rewritten allocator.
5492 2011-08-29 Robert Dewar <dewar@adacore.com>
5494 * impunit.adb, exp_ch4.adb, s-finmas.adb: Minor reformatting.
5496 2011-08-29 Thomas Quinot <quinot@adacore.com>
5498 * exp_dist.adb (TC_Rec_Add_Process_Element): For a choice with multiple
5499 values, we generate multiple triples of parameters in the TypeCode.
5500 Bump Choice_Index for each such triple so that a subsequent default
5501 choice is associated with the correct index in the typecode.
5503 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5505 * a-cdlili.adb (Iterate): Initialize properly an iterator over a null
5507 (First, Last): Handle properly an iterator over a null container.
5509 2011-08-29 Bob Duff <duff@adacore.com>
5511 * sem_ch10.adb (Analyze_With_Clause,Install_Withed_Unit): Abandon
5512 processing if we run across a node with no Scope. This can happen if
5513 we're with-ing an library-level instance, and that instance got errors
5514 that caused "instantiation abandoned".
5515 * sem_util.adb (Unit_Declaration_Node): Make it more robust, by raising
5516 an exception instead of using Assert, so it won't go into an infinite
5517 loop, even when assertions are turned off.
5519 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5521 * a-coorse.adb: Proper handling of empty ordered sets.
5523 2011-08-29 Johannes Kanig <kanig@adacore.com>
5525 * debug.adb: Add comments.
5527 2011-08-29 Thomas Quinot <quinot@adacore.com>
5529 * a-except.adb, a-except-2005.adb: Minor comment rewording and
5532 2011-08-29 Yannick Moy <moy@adacore.com>
5534 * sem_ch3.adb (Array_Type_Declaration): Remove insertion of
5535 declaration for Itypes in Alfa mode.
5537 2011-08-29 Robert Dewar <dewar@adacore.com>
5539 * a-cdlili.ads, a-coinve.ads, a-coorma.adb, a-coorma.ads, s-tassta.adb,
5540 a-cborma.adb, a-cborma.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
5541 a-cborse.ads, a-cobove.adb, a-cobove.ads, a-cbhase.ads: Minor
5544 2011-08-29 Tristan Gingold <gingold@adacore.com>
5546 * exp_ch7.adb, exp_ch7.ads (Build_Exception_Handler): Move its spec to
5548 * exp_intr.adb (Expand_Unc_Deallocation): Use Build_Exception_Handler.
5549 * a-except.adb, a-except-2005.adb (Rcheck_22): Do not defer aborts
5552 2011-08-29 Robert Dewar <dewar@adacore.com>
5554 * a-cbhama.adb, a-cbhama.ads: Minor reformatting.
5556 2011-08-29 Javier Miranda <miranda@adacore.com>
5558 * sem_ch8.adb (Analyze_Subprogram_Renaming): Complete support for
5559 renamings of formal subprograms when the actual for a formal type is
5562 2011-08-29 Matthew Heaney <heaney@adacore.com>
5564 * a-cbhama.ads, a-cbhase.ads (Move): Clear Source following assignment
5567 2011-08-29 Matthew Heaney <heaney@adacore.com>
5569 * a-cborma.ads, a-cborse.ads (Cursor): Default-initialize all
5570 components of record type.
5571 * a-cborma.adb, a-cborse.adb (Move): Clear Source following assignmentw
5574 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5576 * a-cbhama.adb, a-cbhama.ads, a-cborma.adb, a-cborma.ads, a-cobove.adb,
5577 a-cobove.ads, a-coorma.adb, a-coorma.ads: Add iterator machinery to
5580 2011-08-29 Robert Dewar <dewar@adacore.com>
5582 * sem_ch3.adb, sem_util.adb, gnat1drv.adb, s-parint.ads: Minor
5585 2011-08-29 Matthew Heaney <heaney@adacore.com>
5587 * a-cbhama.ads, a-cbhase.ads (Cursor): Default-initialize all
5588 components of record type.
5590 2011-08-29 Bob Duff <duff@adacore.com>
5592 * s-tassta.adb (Task_Wrapper): Handle and ignore exceptions propagated
5593 by the termination handler.
5595 2011-08-29 Yannick Moy <moy@adacore.com>
5597 * sem_ch3.adb (Array_Type_Declaration): Create declarations for Itypes
5598 created in Alfa mode, instead of inserting artificial declarations of
5599 non-Itypes in the tree.
5600 * sem_util.adb, sem_util.ads (Itype_Has_Declaration): New function to
5601 know if an Itype has a corresponding declaration, as defined in
5604 2011-08-29 Yannick Moy <moy@adacore.com>
5606 * gnat1drv.adb: Minor rewrite.
5608 2011-08-29 Bob Duff <duff@adacore.com>
5610 * s-tasuti.adb (Make_Passive): Work around race condition in
5611 Make_Independent, which can cause Wait_Count to be zero. So instead of
5612 asserting that Wait_Count > 0, and then decrementing it, decrement it
5613 only if Wait_Count > 0.
5614 * s-taskin.ads (Wait_Count, Alive_Count, Awake_Count): All of these
5615 should be nonnegative, so declare them Natural instead of Integer.
5617 2011-08-29 Robert Dewar <dewar@adacore.com>
5619 * exp_ch5.adb, sem_ch3.adb, a-cihama.adb, a-cihama.ads, exp_ch7.adb,
5620 sem_ch5.adb, a-ciorse.adb, a-ciorse.ads, sem_ch12.adb, a-cidlli.adb,
5621 a-cidlli.ads, sem_util.adb, sem_res.adb, gnat1drv.adb, a-except.adb,
5622 a-except.ads, a-except-2005.ads, sem_ch4.adb, exp_disp.adb,
5623 exp_aggr.adb, sem_ch13.adb, par-ch3.adb: Minor reformatting.
5625 2011-08-29 Tristan Gingold <gingold@adacore.com>
5627 * s-auxdec-vms-alpha.adb: Add comments, remove some HT before labels.
5629 2011-08-29 Vadim Godunko <godunko@adacore.com>
5631 * s-parint.ads: Minor comment clarification.
5633 2011-08-29 Vincent Celier <celier@adacore.com>
5635 * prj.adb (Initialize): Make sure that new reserved words after Ada 95
5636 may be used as identifiers.
5638 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5640 * a-coinho.ads: Minor reformating.
5642 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5644 * exp_ch5.adb (Expand_Iterator_Loop): Handle properly a loop over a
5645 container of a derived type.
5647 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5649 * a-cidlli.adb, a-cidlli.ads, a-cihama.adb, a-cihama.ads,
5650 a-ciorse.adb, a-ciorse.ads: Add iterator machinery to containers.
5652 2011-08-29 Pascal Obry <obry@adacore.com>
5654 * exp_disp.adb: Minor comment fix.
5655 (Make_Disp_Asynchronous_Select_Body): Properly initialize out parameters
5656 to avoid warnings when compiling with -Wall.
5657 (Make_Disp_Conditional_Select_Body): Likewise.
5658 (Make_Disp_Timed_Select_Body): Likewise.
5660 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5662 * sem_ch12.adb (Analyze_Formal_Subprogram_Declaration): If default is
5663 an entity name, generate reference for it.
5665 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5667 * exp_ch5.adb (Expand_Iterator_Loop): Uniform handling of "X of S"
5669 * sem_util.adb (Is_Iterator, Is_Reversible_Iterator): Yield True for
5670 the class-wide type.
5671 * sem_ch5.adb: Move some rewriting to the expander, where it belongs.
5673 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5675 * sem_ch8.adb (Check_Constrained_Object): Do not create an actual
5676 subtype for an object whose type is an unconstrained union.
5678 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5680 * par-ch3.adb (P_Array_Type_Definiation, P_Component_Items): "aliased"
5681 is allowed in a component definition, by AI95-406.
5683 2011-08-29 Matthew Heaney <heaney@adacore.com>
5685 * a-chtgbo.adb (Generic_Iteration): Use correct overloading of Next.
5687 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5689 * a-except-2005.adb: Alphabetize all routines.
5690 (Triggered_By_Abort): New routine.
5691 * a-except-2005.ads (Triggered_By_Abort): New routine.
5692 * a-except.adb Alphabetize all routines.
5693 (Triggered_By_Abort): New routine.
5694 * a-except.ads (Triggered_By_Abort): New routine.
5695 * exp_ch7.adb: Update all comments involving the detection of aborts in
5697 (Build_Object_Declarations): Do not generate code to detect the
5698 presence of an abort at the start of finalization code, use a runtime
5700 * rtsfind.ads: Add RE_Triggered_By_Abort to tables RE_Id and
5702 * sem_res.adb (Resolve_Allocator): Emit a warning when attempting to
5703 allocate a task on a subpool.
5704 * s-stposu.adb: Add library-level flag Finalize_Address_Table_In_Use.
5705 The flag disables all actions related to the maintenance of
5706 Finalize_Address_Table when subpools are not in use.
5707 (Allocate_Any_Controlled): Signal the machinery that subpools are in
5709 (Deallocate_Any_Controlled): Do not call Delete_Finalize_Address which
5710 performs costly task locking when subpools are not in use.
5712 2011-08-29 Yannick Moy <moy@adacore.com>
5714 * gnat1drv.adb (Adjust_Global_Switches): Restore expansion of tagged
5715 types and dispatching calls in Alfa mode.
5716 * lib-xref-alfa.adb (Collect_ALFA): Rewrite computation of
5717 correspondance between body and spec scopes, to reuse utility functions
5718 (Traverse_Declarations_Or_Statements): Protect access to body for stub
5719 by testing the presence of the library unit for the body
5720 * sem_ch6.adb (Set_Actual_Subtypes): take into account that in Alfa
5721 mode the expansion of accept statements is skipped
5722 * sem_util.adb, sem_util.ads (Unique_Entity): New function returning
5723 the unique entity corresponding to the one returned by
5724 Unique_Defining_Entity applied to the enclosing declaration of the
5727 2011-08-29 Bob Duff <duff@adacore.com>
5729 * treepr.ads: Improve debugging facilities. pn(x) no longer crashes in
5730 gdb when x is not a node (it can be a node list, name_id, etc). pp is
5731 an alias for pn. ppp is an alias for pt.
5733 2011-08-29 Javier Miranda <miranda@adacore.com>
5735 * exp_aggr.adb (Expand_Record_Aggregate): Use the top-level enclosing
5736 aggregate to take a consistent decision on the need to convert into
5737 assignments aggregates that initialize constant objects.
5739 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5741 * exp_ch4.adb (Expand_Allocator_Expression): Add a call to
5742 Build_Allocate_Deallocate_Proc in order to handle allocation of
5743 non-controlled objects on subpools.
5744 * impunit.adb: Remove s-finmas and s-spsufi since they were never meant
5745 to be end-user visible.
5746 * s-finmas.adb: Add with and use clause for System.HTable.
5747 Add an instantiation of Simple_HTable which provides a mapping between
5748 the address of a controlled object and the corresponding
5749 Finalize_Address used to clean up the object. The table is used when a
5750 master is operating in heterogeneous mode.
5751 (Attach): Explain why the input node is not verified on being already
5753 (Delete_Finalize_Address): New routine.
5754 (Detach): Add pragma Assert which ensures that a node is already
5756 (Finalize): Add local variable Cleanup. Rewrite the iteration scheme
5757 since nodes are no longer removed on traversal. Explain why node
5758 detachment is undesirable in this case.
5759 (Get_Finalize_Address): New routine.
5760 (Hash): New routine.
5761 (Is_Empty_List): Removed.
5762 (pm): Renamed to Print_Master. Add output for discriminant
5764 Comment reformatting.
5765 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
5766 * s-finmas.ads: Various comments additions / improvements.
5767 Type Finalization_Master has a discriminant which determines the mode of
5769 (Delete_Finalize_Address): New routine.
5770 (Get_Finalize_Address): New routine.
5771 (pm): Renamed to Print_Master.
5772 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
5773 * s-stposu.adb: Add with clause for System.Address_Image; Add with and
5774 use clause for System.IO.
5775 (Allocate_Any_Controlled): Add machinery to set TSS primitive
5776 Finalize_Address depending on the mode of allocation and the mode of
5778 (Deallocate_Any_Controlled): Remove the relation pair object -
5779 Finalize_Address regardless of the master mode. Add comment explaining
5781 (Detach): Ensure that fields Prev and Next are null after detachment.
5782 (Finalize_Pool): Remove local variable Next_Ptr. Rewrite the iteration
5783 scheme to check whether the list of subpools is empty. There is no
5784 longer need to store the next subpool or advance the current pointer.
5785 (Is_Empty_List): New routine.
5786 (Print_Pool): New routine.
5787 (Print_Subpool): New routine.
5788 * s-stposu.ads: Various comments additions / improvements.
5789 Field Master of type Root_Subpool is now a heterogeneous collection.
5790 (Print_Pool): New routine.
5791 (Print_Subpool): New routine.
5793 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5795 * exp_ch5.adb (Expand_N_Iterator_Loop): Implement Ada2012 loop iterator
5796 forms, using aspects of container types.
5797 * sem_ch3.adb (Find_Type_Name): Preserve Has_Delayed_Aspects and
5798 Has_Implicit_Dereference flags, that may be set on the partial view.
5799 * sem_ch4.adb (Process_Overloaded_Indexed_Component): Prefix may be a
5800 container type with an indexing aspect.
5801 (Analyze_Quantified_Expression): Analyze construct with expansion
5802 disabled, because it will be rewritten as a loop during expansion.
5803 (Try_Container_Indexing): The prefix itself may be a container type
5804 with an indexing aspect, as with a vector of vectors.
5805 * sem_ch5.adb (Analyze_Iteration_Scheme): In a generic context, analyze
5806 the original doamin of iteration, for name capture.
5807 (Analyze_Iterator_Specification): If the domain is an expression that
5808 needs finalization, create a separate declaration for it.
5809 For an iterator with "of" retrieve default iterator info from aspect of
5810 container type. For "in" iterator, retrieve type of Iterate function.
5811 * sem_ch13.adb (Check_Iterator_Function): Fix typo.
5812 (Check_Aspect_At_End_Of_Declaration): Make type unfrozen before
5813 analysis, to prevent spurious errors about late attributes.
5814 * sprint.adb: Handle quantified expression with either loop or iterator
5816 * a-convec.ads, a-convec.adb: Iterate function returns a reversible
5819 2011-08-29 Vincent Celier <celier@adacore.com>
5821 * make.adb (Scan_Make_Arg): Take any option as is in packages Compiler,
5822 Binder or Linker of the main project file.
5824 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5826 * inline.adb (Add_Scopes_To_Clean): Exclude any entity within a generic
5829 2011-08-29 Yannick Moy <moy@adacore.com>
5831 * exp_ch9.adb: Partial revert of previous change for Alfa mode
5833 2011-08-29 Yannick Moy <moy@adacore.com>
5835 * exp_ch11.adb: Minor expansion of comment.
5837 2011-08-29 Yannick Moy <moy@adacore.com>
5839 * lib-xref-alfa.adb (Add_ALFA_Scope): Treat generic entities.
5841 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5843 * sem_res.adb (Resolve_Arithmetic_Op): If the node has a universal
5844 interpretation, set the type before resolving the operands, because
5845 legality checks on an exponention operand need to know the type of the
5848 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5850 * sem_ch12.adb (Analyze_Package_Instantiation): Do not set delayed
5851 cleanups on a master if the instance is within a generic unit.
5852 Complement to the corresponding fix to inline.adb for K520-030.
5854 2011-08-29 Tristan Gingold <gingold@adacore.com>
5856 * exp_ch7.adb (Build_Raise_Statement): Raise PE instead of the current
5858 * exp_intr.adb: Minor comment fix.
5860 2011-08-29 Bob Duff <duff@adacore.com>
5862 * sem_ch13.adb (Analyze_Aspect_Specifications): Fix cases where
5863 Delay_Required was used as an uninitialized variable.
5865 2011-08-29 Robert Dewar <dewar@adacore.com>
5867 * a-cdlili.adb, a-cdlili.ads, a-coinve.adb, a-coinve.ads,
5868 sem_util.adb, sem_util.ads, a-cohama.adb, a-cohama.ads, a-coorse.adb,
5869 a-coorse.ads, aspects.ads, sem_ch8.adb: Minor reformatting.
5871 2011-08-29 Thomas Quinot <quinot@adacore.com>
5873 * system-freebsd-x86_64.ads (Backend_Overflow_Checks): Set true True.
5874 Remove unused variables.
5876 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5878 * sem_res.adb: Remove Build_Explicit_Dereference.
5879 * sem_util.adb, sem_util.ads (Build_Explicit_Dereference): Moved here
5880 from sem_res.adb, used in analysis of additional constructs.
5881 (Is_Iterator, Is_Reversible_Iterator): New predicates for Ada2012
5882 expansion of iterators.
5883 (Is_Object_Reference): Recognize variables rewritten as explicit
5884 dereferences in Ada2012.
5885 * snames.ads-tmpl: Add Has_Element, Forward_Iterator,
5886 Reversible_Iterator names, for expansion of Ada2012 iterators.
5887 * aspects.ads, aspects.adb (Find_Aspect): Utility.
5888 * a-cdlili.ads, a-cdlili.adb: Add new iterator machinery to doubly
5889 linked list container.
5890 * a-coinve.ads, a-coinve.adb: Ditto for indefinite vector containers.
5891 * a-coorse.ads, a-coorse.adb: Ditto for ordered sets.
5893 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5895 * a-cohama.adb, a-cohama.ads: Add iterator primitives to hashed map
5898 2011-08-29 Vincent Celier <celier@adacore.com>
5900 * make.adb (Gnatmake): Get the maximum number of simultaneous
5901 compilation processes after the Builder switches has been scanned, as
5902 there may include -jnn.
5904 2011-08-29 Matthew Heaney <heaney@adacore.com>
5906 * a-chtgbo.adb (Generic_Equal): Use correct overloading of Next.
5908 2011-08-29 Tristan Gingold <gingold@adacore.com>
5910 * gnatcmd.adb (GNATCmd): On OpenVMS, truncate the length of
5911 GNAT_DRIVER_COMMAND_LINE to 255.
5913 2011-08-29 Pascal Obry <obry@adacore.com>
5915 * freeze.adb, sem_ch8.adb, a-convec.adb, a-convec.ads: Minor
5916 reformatting and style fix (class attribute casing).
5918 2011-08-29 Yannick Moy <moy@adacore.com>
5920 * exp_ch11.adb: Yet another case where expansion should be common
5921 between CodePeer and Alfa.
5923 2011-08-29 Yannick Moy <moy@adacore.com>
5925 * exp_ch9.adb: Partial revert of previous change for Alfa mode.
5927 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5929 * sem_ch6.adb (Matches_Limited_With_View): The limited views of an
5930 incomplete type and its completion match.
5932 2011-08-29 Yannick Moy <moy@adacore.com>
5934 * exp_ch13.adb: Adjust previous change.
5936 2011-08-29 Robert Dewar <dewar@adacore.com>
5938 * sem_prag.adb, prj.adb, sem_util.adb, sem_res.adb, gnat1drv.adb,
5939 exp_ch4.adb, sem_ch8.adb: Minor code reorganization
5942 2011-08-29 Emmanuel Briot <briot@adacore.com>
5944 * make.adb, prj.adb, prj.ads (Compute_All_Imported_Projects): Also
5945 initialize aggregated projects.
5947 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5949 * sem_ch8.adb (Find_Renamed_Entity): Within an instance, use scope
5950 depth of candidates to resolve a potentially spurious ambiguity between
5951 two visible subprograms.
5953 2011-08-29 Yannick Moy <moy@adacore.com>
5955 * sem_prag.adb (Analyze_Pragma): Allow Test_Case pragma without
5957 * sem_util.adb (Get_Ensures_From_Test_Case_Pragma,
5958 Get_Requires_From_Test_Case_Pragma): Allow Test_Case pragma without
5961 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5963 * gnat1drv.adb (Adjust_Global_Switches): Improve previous change.
5966 2011-08-29 Thomas Quinot <quinot@adacore.com>
5968 * sem_res.adb: Minor reformatting.
5970 2011-08-29 Johannes Kanig <kanig@adacore.com>
5972 * exp_ch4.adb (Expand_Quantified_Expression): Do not expand in ALFA
5974 * gnat1drv.adb (Adjust_Global_Switches): Set
5975 Use_Expressions_With_Actions to False in ALFA mode.
5976 * sem_res.adb (Resolve_Quantified_Expression): Simpler treatment in
5979 2011-08-29 Yannick Moy <moy@adacore.com>
5981 * exp_ch13.adb (Expand_N_Freeze_Entity): Do nothing in Alfa mode.
5982 * exp_ch9.adb: Do not expand tasking constructs in Alfa mode.
5983 * gnat1drv.adb (Adjust_Global_Switches): Suppress the expansion of
5984 tagged types and dispatching calls in Alfa mode.
5986 2011-08-29 Javier Miranda <miranda@adacore.com>
5988 * sem_ch3.adb (Process_Discriminants): Add missing check to ensure that
5989 we do not report an error on an Empty node.
5991 2011-08-29 Geert Bosch <bosch@adacore.com>
5993 * Makefile.rtl (GNATRTL_NONTASKING_OBJECTS): Add a-nllrar.o,
5994 a-nlrear.o and a-nurear.o.
5996 2011-08-29 Robert Dewar <dewar@adacore.com>
5998 * freeze.adb: Minor code reorganization.
6000 * sem_util.adb, errout.adb, exp_ch11.adb, a-ngrear.adb, s-gearop.adb,
6001 sem_ch6.adb: Minor reformatting
6003 2011-08-29 Tristan Gingold <gingold@adacore.com>
6005 * s-except.ads, s-except.adb: Provide dummy body.
6007 2011-08-29 Yannick Moy <moy@adacore.com>
6009 * sem_warn.adb (Within_Postcondition): Take into account the case of
6010 an Ensures component in a Test_Case.
6012 2011-08-29 Tristan Gingold <gingold@adacore.com>
6014 * s-excdeb.ads, s-excdeb.adb: New files, created from s-except.
6015 * rtsfind.ads (RTU_Id): Replaces System_Exceptions by
6016 System_Exceptions_Debug
6017 (RE_Unit_Table): Search RE_Local_Raise in System_Exceptions_Debug
6018 * a-except.adb: With and use System.Exceptions_Debug instead of
6020 * a-except-2005.adb: Likewise.
6021 * s-assert.adb: Likewise.
6022 * s-except.adb, s-except.ads: Move debugging hooks to s-excdeb.
6023 * Makefile.rtl: Add s-excdeb. Adjust compilation rule.
6024 * gcc-interfaces/Makefile.in, gcc-interface/Make-lang.in: Add
6025 s-excdeb. Update dependencies.
6026 (GNATRTL_LINEARALGEBRA_OBJS): Remove a-nlrear.o a-nurear.o a-nllrar.o
6027 as these no longer need external libraries.
6029 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6031 * sem_res.adb (Resolve_Op_Expon): Additional check to reject an
6032 exponentiation operator on universal values in a context that requires
6035 2011-08-29 Tristan Gingold <gingold@adacore.com>
6037 * raise-gcc.c (personnality_routine): Fix thinko. Set Ada occurrence
6038 before calling notify_handled_exception.
6039 * a-exextr.adb: Fix comment.
6041 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
6043 * exp_ch4.adb (Expand_Allocator_Expression): Add code to set attribute
6044 Finalize_Address of the access type's finalization master.
6045 (Expand_N_Allocator): Add code to set attribute Finalize_Address of the
6046 access type's finalization master. Add a guard to prevent
6047 Associated_Storage_Pool from being set on .NET/JVM.
6048 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add code to set
6049 attribute Finalize_Address of the access type's finalization master.
6050 * exp_ch7.adb (Make_Finalize_Address_Call): New routine.
6051 * exp_ch7.ads (Make_Finalize_Address_Call): New routine.
6052 * rtsfind.ads: Add RE_Set_Finalize_Address to tables RE_Id and
6054 * s-finmas.adb: Add with clause for System.Address_Image. Add with and
6055 use clause for System.IO
6056 (Detach): Relax the assertion, to be reinstated later.
6057 (Finalize): Rewrite the iteration loop to avoid pointer comparison.
6058 Relax the assertion on Finalize_Address, to be reinstated later.
6059 (Is_Empty_List): New routine.
6060 (pm): New debug routine.
6061 (Set_Finalize_Address): New routine.
6062 * s-finmas.ads (pm): New debug routine.
6063 (Set_Finalize_Address): New routine.
6064 * s-stposu.adb (Allocate_Any_Controlled): Code reformatting.
6066 2011-08-29 Tristan Gingold <gingold@adacore.com>
6068 * a-exexpr-gcc.adb (GCC_Exception_Access, GNAT_GCC_Exception_Access):
6069 Remove convention C.
6071 2011-08-29 Tristan Gingold <gingold@adacore.com>
6073 * s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove.
6074 (Initialize_TCB): Remove Exc_Stack_Ptr initialization.
6075 (Finalize_TCB): Remove its finalization.
6076 (Initialize): Remove assignment of GET_Exc_Stack_Addr
6077 * s-soflin.adb (NT_Exc_Stack): Remove
6078 (Get_Exc_Stack_Addr_NT): Likewise.
6079 (Get_Exc_Stack_Addr_Soft): Likewise.
6080 * s-soflin.ads (Get_Exc_Stack_Addr_NT): Remove.
6081 (Get_Exc_Stack_Addr): Likewise.
6082 (Get_Exc_Stack_Addr_Soft): Likewise
6083 * s-taspri-vms.ads (Exc_Stack_T): Remove.
6084 (Exc_Stack_Ptr_T): Likewise.
6085 (Private_Data): Remove Exc_Stack_Ptr component.
6087 2011-08-29 Tristan Gingold <gingold@adacore.com>
6089 * raise-gcc.c (get_ip_from_context): New function. Factorize code.
6091 2011-08-29 Tristan Gingold <gingold@adacore.com>
6093 * gnat_ugn.texi: Fix aix and x86-solaris info for run-time.
6095 2011-08-29 Geert Bosch <bosch@adacore.com>
6097 * s-gearop.ads (Back_Substitute, Diagonal, Forward_Eliminate,
6098 L2_Norm, Swap_Column): New generic subprograms
6099 * s-gearop.adb (Back_Substitute, Diagonal, Forward_Eliminate,
6100 L2_Norm, Swap_Column): Implement new subprograms in order to
6101 eliminate dependency on BLAS and LAPACK libraries in
6102 Ada.Numerics.Generic_Real_Arrays and eventually also the complex
6103 version. Forward_Eliminate/Back_Substitute can be used to put a
6104 matrix in row echelon or reduced row echelon form using partial
6106 * a-ngrear.adb: (Back_Substitute, Diagonal, Forward_Eleminate,
6107 Swap_Column): Instantiate from System.Generic_Array_Operations.
6108 ("*", "abs"): Implement by instantiation from Generic_Array_Operations.
6109 (Sqrt): Local function for simple computation of square root without
6110 adding dependencies on Generic_Elementary_Functions.
6111 (Swap): New subprogram to exchange floating point numbers.
6112 (Inverse): Reimplement using Jordan-Gauss elimination.
6113 (Jacobi): New procedure implementing Jacobi's method for computation
6114 of eigensystems, based on Rutishauser's implementation.
6115 (L2_Norm): Implement directly using the inner product.
6116 (Sort_Eigensystem): Sort eigenvalue/eigenvector pairs in order of
6117 decreasing eigenvalue as required by the Ada RM.
6118 (Swap_Column): New helper procedure for Sort_Eigensystem.
6119 Remove with of System.Generic_Real_BLAS and System.Generic_Real_LAPACK.
6120 Add with of Ada.Containers.Generic_Anonymous_Array_Sort, for
6123 2011-08-29 Thomas Quinot <quinot@adacore.com>
6125 * put_scos.adb (Put_SCOs): Do not emit a newline for an empty
6128 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
6130 * s-finmas.adb (Finalize): Check Finalize_Address of the master rather
6131 than the current node.
6132 * s-finmas.ads: Move field Finalize_Address from type FM_Node to
6133 Finalization_Master. The list headers have two fields instead of three.
6134 This should fix alignment issue but subpool allocations are now
6135 unusable. Alphabetize subprograms.
6136 * s-stposu.adb (Allocate_Any_Controlled): Use the offset rather than
6137 the size of the header when converting the beginning of the object to
6138 a FM_Node. Set the master's Finalize_Address attribute if not already
6140 (Deallocate_Any_Controlled): Use the offset rather than the size of the
6141 header when converting the beginning of the object to a FM_Node.
6143 2011-08-29 Gary Dismukes <dismukes@adacore.com>
6145 * exp_ch11.adb (Expand_N_Raise_Statement): Don't suppress expansion of
6146 reraise when compiling for CodePeer.
6148 2011-08-29 Arnaud Charlet <charlet@adacore.com>
6150 * a-iteint.ads, Makefile.rtl: Add missing compilation of a-iteint.ads,
6151 now needed by a-convec.adb. Fix warning.
6153 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
6155 * exp_util.adb (Build_Allocate_Deallocate_Proc): Add a guard for the
6156 processing of TSS routine Finalize_Address when compiling in
6159 2011-08-29 Thomas Quinot <quinot@adacore.com>
6161 * a-strunb.ads, einfo.ads, g-comlin.ads, sem_ch6.adb,
6162 sem_warn.adb: Minor reformatting.
6164 2011-08-29 Emmanuel Briot <briot@adacore.com>
6166 * prj-conf.adb (Get_Config_Switches): Also collect the list of
6167 languages from aggregated projects.
6169 2011-08-29 Yannick Moy <moy@adacore.com>
6171 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Declarations_Or_Statements,
6172 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
6173 Traverse_Package_Declaration, Traverse_Subprogram_Body,
6174 Traverse_Compilation_Unit): Add a parameter Inside_Stubs so that bodies
6175 for stubs are traversed too when parameter is set
6176 (Traverse_All_Compilation_Units): Traverse without going inside stubs
6177 (Traverse_Declarations_Or_Statements): Do the special traversing for
6178 stubs when required.
6179 * sem_util.adb, sem_util.ads (Get_Body_From_Stub): New function to
6180 return subprogram or package body from stub.
6181 (Is_Subprogram_Stub_Without_Prior_Declaration): New function to detect
6182 stubs without prior subprogram decl.
6184 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
6186 * gnat_ugn.texi: Fix typo.
6188 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
6190 * s-stposu.adb (Allocate_Any_Controlled): Reimplement the mechanism
6191 which accounts for size vs alignment issues and calculates the size of
6193 (Deallocate_Any_Controlled): Ditto.
6194 (Nearest_Multiple_Rounded_Up): New routine.
6196 2011-08-29 Tristan Gingold <gingold@adacore.com>
6198 * a-exstat.adb (String_To_EO): Do no set Cleanup_Flag.
6199 * a-exexda.adb (Set_Exception_C_Msg): Ditto.
6200 (Set_Exception_Msg): Ditto.
6201 * a-exexpr-gcc.adb (Setup_Current_Excep): Ditto. Do not set
6203 * a-except.adb, a-except-2005.adb (Save_Occurrence_No_Private): Remove.
6204 Use Save_Occurrence instead of Save_Occurrence_No_Private.
6205 (Raise_With_Msg): Remove Cleanup_Flag.
6206 * a-except.ads, a-except-2005.ads (Exception_Occurrence): Remove
6207 Clean_Flag and Private_Data components.
6209 2011-08-29 Yannick Moy <moy@adacore.com>
6211 * freeze.adb (Freeze_Record_Type): Ignore packing in Alfa mode, like
6213 * sem_ch3.adb (Signed_Integer_Type_Declaration): Correct the generation
6214 of an explicitly declared type, so that the base types of the original
6215 type and this generated type are the same, and a "type" (not a subtype
6217 * errout.adb (Special_Msg_Delete): Do not issue messages "Size too
6218 small" in Alfa mode, like in CodePeer mode.
6219 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore rep
6220 clauses in Alfa mode.
6222 2011-08-29 Javier Miranda <miranda@adacore.com>
6224 * exp_ch6.ads, exp_ch6.adb (Is_Null_Procedure): Move the spec of this
6225 function to the package spec.
6226 * sem_ch6.adb (Find_Corresponding_Spec, New_Overloaded_Entity): For
6227 internally generated bodies of null procedures locate the internally
6228 generated spec enforcing mode conformance.
6229 (Is_Interface_Conformant): Ensure that the controlling formal of the
6232 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6234 * sem_prag.adb (Analyze_Pragma, case Inline): In an instance, do not
6235 reject the pragma if it appears to apply to a formal subprogram.
6237 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6239 * exp_ch4.adb (Expand_Allocator_Expression): Use consistent name for
6240 inner expression, to prevent double evaluation.
6242 2011-08-29 Tristan Gingold <gingold@adacore.com>
6244 * a-exexpr.adb (Propagate_Exception): Remove all the parameters as
6246 * a-exexpr-gcc.adb (Propagate_Exception): Ditto.
6247 * a-except-2005.adb (Propagate_Exception): Adjust spec.
6248 (Raise_Current_Excep): Adjust call.
6249 (Raise_From_Signal_Handler): Call now simply call Raise_Current_Excep.
6251 2011-08-29 Thomas Quinot <quinot@adacore.com>
6253 * exp_disp.adb: Minor reformatting.
6255 2011-08-29 Tristan Gingold <gingold@adacore.com>
6257 * a-exexpr.adb (Setup_Exception): Removed.
6258 * a-exexpr-gcc.adb (Setup_Exception): Removed.
6259 * a-except.adb (Exception_Propagation): Removed.
6260 * a-except-2005.adb (Setup_Exception): Removed.
6261 (Reraise): Remove call to Setup_Exception.
6262 (Reraise_Occurrence): Ditto.
6263 (Reraise_Occurrence_Always): Ditto.
6264 (Reraise_Occurrence_No_Defer): Ditto.
6265 (Transfer_Occurrence): Ditto.
6266 * a-exexda.adb (Set_Exception_C_Msg): Remove call to Setup_Exception.
6267 (Set_Exception_Msg): Ditto.
6269 2011-08-29 Robert Dewar <dewar@adacore.com>
6271 * a-convec.adb, exp_disp.adb: Minor reformatting.
6273 2011-08-29 Tristan Gingold <gingold@adacore.com>
6275 * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C.
6277 2011-08-29 Gary Dismukes <dismukes@adacore.com>
6279 * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set
6280 Exception_Handlers to No_List instead of Empty_List in the case where
6281 there are no handlers.
6283 2011-08-29 Tristan Gingold <gingold@adacore.com>
6285 * gcc-interface/gigi.h (enum standard_datatypes): Add
6286 ADT_reraise_zcx_decl
6287 (reraise_zcx_decl): New macro.
6288 * gcc-interface/trans.c (gnu_incoming_exc_ptr): New variable.
6289 (gigi): Set reraise_zcx_decl.
6290 (Exception_Handler_to_gnu_zcx): Save and restore gnu_incoming_exc_ptr.
6291 (gnat_to_gnu): Handle N_Raise_Statement.
6293 2011-08-29 Robert Dewar <dewar@adacore.com>
6295 * sem_ch6.adb, exp_ch3.adb, s-stposu.adb, a-undesu.ads,
6296 a-undesu.adb: Minor reformatting.
6298 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6300 * exp_disp.adb (Check_Premature_Freezing): When building a dispatch
6301 table, accept an unfrozen untagged component if it is an actual for a
6302 formal incomplete type.
6303 * a-convec.ads, a-convec.adb: Instantiate Ada.Iterator_Interfaces to
6304 provide new iterator forms over vectors.
6305 Introduce type Iterator in package body to implement operations of
6306 Reversible_Iterator interface.
6307 * a-iteint.ads: Make package pure so it is usable with new container
6308 packages, that are categorized Remote_Types.
6310 2011-08-29 Robert Dewar <dewar@adacore.com>
6312 * a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting.
6314 2011-08-29 Bob Duff <duff@adacore.com>
6316 * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case
6317 of <>, because this is the routine that checks for dimensionality
6318 errors (for example, for a two-dimensional array, (others => <>) should
6319 be (others => (others => <>)).
6321 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
6323 * impunit.adb: Add new run-time units.
6324 * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb,
6325 s-stposu.ads, s-stposu.adb: Code clean up.
6326 Handle protected class-wide or task class-wide types
6327 Handle C/C++/CIL/Java types.
6328 * s-spsufi.adb, s-spsufi.ads: New files.
6330 2011-08-29 Yannick Moy <moy@adacore.com>
6332 * sem_ch13.adb (Analyze_Aspect_Specifications): Reject test-case on
6333 library-level subprogram.
6334 * sem_prag.adb (Check_Test_Case): Stricter rules for test-case
6336 (Analyze_Pragma): Change name "Normal" for "Nominal" in test-case
6338 * snames.ads-tmpl: Change name "Normal" for "Nominal" in test-case
6340 * gnat_rm.texi: Update doc for Test_Case pragma.
6342 2011-08-29 Tristan Gingold <gingold@adacore.com>
6344 * a-exexpr-gcc.adb (Unwind_Exception): Remove default value, made it
6346 (GCC_Exception_Access): New type.
6347 (Unwind_DeleteException): New imported procedure
6348 (Foreign_Exception): Import it.
6349 (GNAT_GCC_Exception): Simply have the occurrence inside.
6350 (To_GCC_Exception): New function.
6351 (To_GNAT_GCC_Exception): New function.
6352 (GNAT_GCC_Exception_Cleanup): New procedure..
6353 (Propagate_GCC_Exception): New procedure.
6354 (Reraise_GCC_Exception): New procedure.
6355 (Setup_Current_Excep): New procedure.
6356 (CleanupUnwind_Handler): Change type of UW_Exception parameter.
6357 (Unwind_RaiseException): Ditto.
6358 (Unwind_ForcedUnwind): Ditto.
6360 (Begin_Handler): Change type of parameter.
6361 (End_Handler): Ditto. Now delete the exception if still present.
6362 (Setup_Key): Removed.
6363 (Is_Setup_And_Not_Propagated): Removed.
6364 (Set_Setup_And_Not_Propagated): Ditto.
6365 (Clear_Setup_And_Not_Propagated): Ditto.
6366 (Save_Occurrence_And_Private): Ditto.
6367 (EID_For): Add 'not null' constraint on parameter.
6368 (Setup_Exception): Does nothing.
6369 (Propagate_Exception): Simplified.
6370 * exp_ch11.adb (Expand_N_Raise_Statement): In back-end exception model,
6371 re-raise is not expanded anymore.
6372 * s-except.ads (Foreign_Exception): New exception - placeholder for
6374 * raise-gcc.c (__gnat_setup_current_excep): Declare
6375 (CXX_EXCEPTION_CLASS): Define (not yet used)
6376 (GNAT_EXCEPTION_CLASS): Define.
6377 (is_handled_by): Handle foreign exceptions.
6378 (PERSONALITY_FUNCTION): Call __gnat_setup_current_excep.
6380 2011-08-29 Jose Ruiz <ruiz@adacore.com>
6382 * a-synbar.adb (Synchronous_Barrier): Some additional clarification.
6384 2011-08-29 Thomas Quinot <quinot@adacore.com>
6386 * a-synbar-posix.adb: Minor reformatting.
6388 2011-08-29 Jose Ruiz <ruiz@adacore.com>
6390 * a-exetim-posix.adb, a-exetim-mingw.adb, a-exetim-mingw.ads,
6391 a-exetim-default.ads (Interrupt_Clocks_Supported,
6392 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
6393 definitions to be compliant with AI-0171. The target systems do not
6394 support separate account for the execution time of interrupt handlers.
6396 2011-08-29 Jose Ruiz <ruiz@adacore.com>
6398 * a-synbar.adb (Wait): Change the order of evaluation of the conditions
6399 in the barrier to put first the easiest to evaluate (and the one which
6400 will be True more often). More efficient.
6402 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
6404 * s-atocou-x86.adb: Fix constraint in machine code insertion.
6406 2011-08-29 Bob Duff <duff@adacore.com>
6408 * aspects.ads, aspects.adb: Add new aspects for various pragmas and
6409 attributes that are now aspects, as specified by AI05-0229-1.
6410 * sem_ch13.adb (Analyze_Aspect_Specifications,
6411 Check_Aspect_At_Freeze_Point): Analyze the new aspects. Turn them into
6412 pragmas or attribute references, as appropriate.
6414 2011-08-29 Robert Dewar <dewar@adacore.com>
6416 * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
6417 a-synbar-posix.ads: Minor reformatting.
6419 2011-08-29 Yannick Moy <moy@adacore.com>
6421 * snames.ads-tmpl: Add name Force.
6423 2011-08-29 Pascal Obry <obry@adacore.com>
6425 * prj-nmsc.adb: Minor reformatting.
6427 2011-08-29 Jose Ruiz <ruiz@adacore.com>
6429 * a-exetim.ads (Interrupt_Clocks_Supported,
6430 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
6431 definitions to be compliant with AI-0171.
6433 2011-08-29 Robert Dewar <dewar@adacore.com>
6435 * a-ngelfu.adb: Add comments.
6437 2011-08-29 Geert Bosch <bosch@adacore.com>
6439 * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
6440 the closest machine number to Pi / 2.0.
6442 2011-08-29 Jose Ruiz <ruiz@adacore.com>
6444 * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
6445 package Ada.Synchronous_Barriers.
6446 * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
6447 Add new specs and bodies for Ada.Synchronous_Barriers. There is a
6448 default implementation using protected objects and another one
6449 a-synbar-posix using POSIX barriers as the underlying support.
6450 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
6451 x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
6452 Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
6453 Clean up dependencies.
6454 * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
6456 2011-08-29 Robert Dewar <dewar@adacore.com>
6458 * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
6459 exp_dist.adb: Minor code reorganization.
6462 2011-08-29 Thomas Quinot <quinot@adacore.com>
6464 * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
6465 primitive operation must support external streaming if it is not a
6466 controlling access result.
6468 2011-08-29 Thomas Quinot <quinot@adacore.com>
6470 * sinfo.ads, sem_ch7.adb: Minor reformatting.
6472 2011-08-29 Bob Duff <duff@adacore.com>
6474 * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
6475 restriction on allocators, as required by AI05-0013-1.
6476 * restrict.ads: Minor comment fix.
6478 2011-08-29 Tristan Gingold <gingold@adacore.com>
6480 * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
6481 (To_Jmpbuf_Address): Ditto
6482 (builtin_longjmp): Ditto
6484 2011-08-29 Thomas Quinot <quinot@adacore.com>
6486 * sem_res.adb: Minor reformatting.
6488 2011-08-29 Vincent Celier <celier@adacore.com>
6490 * make.adb (Gnatmake): Move special processing for VM targets after the
6491 call to Get_Target_Parameters.
6493 2011-08-29 Thomas Quinot <quinot@adacore.com>
6495 * sem_ch12.adb, par-ch12.adb: Minor reformatting.
6497 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
6499 * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
6500 where an anonymous access discriminant of a limited designated type
6501 appears in a non-immutably limited discriminated type and issue an
6502 error message. Add local variable Desig_T and replace all occurrences
6505 2011-08-29 Jose Ruiz <ruiz@adacore.com>
6507 * a-rttiev.adb (Set_Handler): Update comment to indicate that our
6508 implementation is compliant to RM D.15(15/2) after the modification
6509 imposed by AI05-0094-1 (binding interpretation).
6511 2011-08-29 Robert Dewar <dewar@adacore.com>
6513 * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
6514 s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
6516 2011-08-29 Thomas Quinot <quinot@adacore.com>
6518 * par-endh.adb (Check_End): For an END where it is mandatory to repeat
6519 the scope name, do not report a missing label as a style violation (it
6520 will be diagnosed as an illegality).
6521 * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
6522 variant records: Get_Enum_Lit_From_Pos already returns a usage
6523 occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
6524 on Expr in Integer_Literal case so that it can be used by
6527 2011-08-29 Tristan Gingold <gingold@adacore.com>
6529 * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
6531 * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
6532 (Build_Abort_Block_Handler): New function to build an Abort_Signal
6534 * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
6535 Build_Abort_Block_Handler to build the exception handler. Do not
6536 undefer aborts for the Abort_Signal exception handler if back-end
6537 exception mechanism.
6538 * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
6539 back_end exceptions for all others and abort_signal.
6540 * s-except.ads (ZCX_By_Default): New constant.
6541 * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
6542 (Raise_Exception_Always): Ditto.
6543 (Raise_From_Signal_Handler): Ditto.
6544 (Raise_With_Location_And_Msg): Ditto.
6545 (Raise_With_Msg): Ditto.
6547 (Reraise_Occurence): Ditto.
6548 (Reraise_Occurrence_Always): Ditto.
6549 * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
6550 * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
6552 2011-08-29 Thomas Quinot <quinot@adacore.com>
6554 * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
6556 2011-08-29 Robert Dewar <dewar@adacore.com>
6558 * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
6559 Minor code reorganization.
6561 2011-08-29 Bob Duff <duff@adacore.com>
6563 * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
6564 2012, not just Ada 2005.
6566 2011-08-29 Vincent Celier <celier@adacore.com>
6568 * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
6569 with a project file or with gprbuid, if -gnatep= is specified, the
6570 builder may need to be invoked with -x.
6572 2011-08-29 Tristan Gingold <gingold@adacore.com>
6574 * a-exexpr-gcc.adb: Minor comment fix.
6576 2011-08-29 Robert Dewar <dewar@adacore.com>
6578 * sem_ch8.adb: Minor reformatting.
6580 2011-08-29 Bob Duff <duff@adacore.com>
6582 * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
6583 * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
6584 treating "some" as unreserved in earlier Ada versions. This is now
6585 handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
6586 rather than Name_Some, since Tok_Some is now recognized as reserved.
6587 * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
6589 * scans.ads: Minor comment fixes.
6590 * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
6591 for other language versions.
6592 * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
6593 treating "some" as unreserved in earlier Ada versions. This is now
6594 handled in Snames.Is_Keyword_Name.
6595 * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
6597 (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
6598 unreserved in earlier Ada versions. This is now handled in
6599 Snames.Is_Keyword_Name.
6600 * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
6601 words as for other language versions.
6602 * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
6603 Ada 2012, not just Ada 2005.
6605 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6607 * sem_ch13.adb: Additional semantic checks for aspects involved in
6610 2011-08-29 Matthew Heaney <heaney@adacore.com>
6612 * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
6613 a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
6614 Container parameter.
6615 (Ancestor_Find): ditto.
6617 2011-08-29 Thomas Quinot <quinot@adacore.com>
6619 * par-endh.adb: Minor reformatting.
6621 2011-08-29 Tristan Gingold <gingold@adacore.com>
6623 * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
6624 (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
6625 (Adjust_N_CLeanups_For): Remove.
6626 (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
6628 (Propgate_Exception): Adjust.
6629 * raise-gcc.c: Add a few static/const.
6630 (Adjust_N_Cleanups_For): Remove declaration.
6631 (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
6633 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6635 * sem_ch8.adb: Use type of function return when rewriting as object
6638 2011-08-29 Gary Dismukes <dismukes@adacore.com>
6640 * sem_type.adb: Minor reformatting.
6642 2011-08-29 Robert Dewar <dewar@adacore.com>
6644 * makeutl.adb: Minor reformatting.
6646 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6648 * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
6649 function call of a limited type, the expansion of the renaming is
6650 complicated by the presence of various temporaries and subtypes that
6651 capture constraints of the renamed object.
6652 Rewrite node as an object declaration, whose expansion is simpler.
6653 Given that the object is limited there is no copy involved and no
6656 2011-08-29 Robert Dewar <dewar@adacore.com>
6658 * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
6659 freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
6661 2011-08-29 Tristan Gingold <gingold@adacore.com>
6663 * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
6664 system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
6665 system-linux-hppa.ads, system-linux-s390.ads,
6666 system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
6667 system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
6668 system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
6669 system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
6670 system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
6671 system-solaris-sparc.ads, system-lynxos-x86.ads,
6672 system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
6673 system-solaris-x86_64.ads, system-mingw-x86_64.ads,
6674 system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
6675 system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
6676 system-vxworks-x86.ads: Remove GCC_ZCX_Support.
6677 * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
6678 s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
6679 * opt.ads: Adjust comment.
6680 * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
6681 * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
6682 * system.ads: Move GCC_ZCX_Support to obsolete entries.
6684 2011-08-29 Emmanuel Briot <briot@adacore.com>
6686 * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
6687 file name is specified on the gnatmake or gprbuild command line, and
6688 before we search for that file in the project.
6690 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6692 * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
6693 used to determine whether a possible interpretation for an overloadable
6694 entity is declared within the current instantiation and should be
6695 included in the candidate set.
6697 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
6699 * gnat_rm.texi, gnat_ugn.texi: Clean ups.
6701 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6703 * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
6704 access subtype is access_to_subprogram, when applying checks for
6707 2011-08-29 Matthew Heaney <heaney@adacore.com>
6709 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
6710 for sibling when common parent.
6712 2011-08-29 Thomas Quinot <quinot@adacore.com>
6714 * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
6717 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6719 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
6720 for the return type when in ASIS mode.
6722 2011-08-29 Vincent Celier <celier@adacore.com>
6724 * make.adb (Gnatmake): Get the default search dirs, then the target
6725 parameters after getting the Builder switches, as the Builder switches
6726 may include --RTS= and that could change the default search dirs.
6728 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
6730 * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
6731 Make_Final_Call. Move the processing for class-wide types before the
6732 processing for derivations from [Limited_]Controlled.
6733 (Make_Final_Call): Move the processing for class-wide types before the
6734 processing for derivations from [Limited_]Controlled.
6735 * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
6736 Add code to account for alignments larger than the list header. Add a
6737 comment illustrating the structure of the allocated object + padding +
6739 (Deallocate_Any_Controlled): Add code to account for alignments larger
6740 than the list header.
6742 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6744 * sinfo.ads, sinfo.adb: New node kind
6745 N_Formal_Incomplete_Type_Definition, related flags.
6746 par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
6747 Parse formal incomplete types.
6748 * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
6750 * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
6751 Formal incomplete types do not need completion.
6752 * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
6753 Validate_Incomplete_Type_Instance): New procedures to handle formal
6755 * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
6756 that corresponds to a formal incomplete type.
6757 * sprint.adb: Handle formal incomplete type declarations.
6758 * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
6761 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
6763 * a-fihema.ads, a-fihema.adb: Unit removed.
6764 * a-undesu.ads, a-undesu.adb: New unit implementing
6765 Ada.Unchecked_Deallocate_Subpool.
6766 * einfo.adb: Remove Associated_Collection from the node usage.
6767 Add Finalization_Master to the node usage.
6768 (Associated_Collection): Removed.
6769 (Finalization_Master): New routine.
6770 (Set_Associated_Collection): Removed.
6771 (Set_Finalization_Master): New routine.
6772 (Write_Field23_Name): Remove Associated_Collection from the output. Add
6773 Finalization_Master to the output.
6774 * einfo.ads: Remove attribute Associated_Collection and its uses in
6776 Add new attribute Finalization_Master along with its uses in entitites.
6777 (Associated_Collection): Removed along with its pragma import.
6778 (Finalization_Master): New routine along with a pragma import.
6779 (Set_Associated_Collection): Removed along with its pragma import.
6780 (Set_Finalization_Master): New routine along with a pragma import.
6781 * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
6782 Build_Finalization_Collection with Build_Finalization_Master.
6783 (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
6784 before the bodies of the predefined routines. Add comment explaining
6785 this. Replace call to Build_Finalization_Collection with
6786 Build_Finalization_Master.
6787 (Freeze_Type): Replace call to Build_Finalization_Collection with
6788 Build_Finalization_Master.
6789 (Make_Finalize_Address_Body): Comment reformatting.
6790 (Make_Predefined_Primitive_Specs): Code reformatting.
6791 (Stream_Operation_OK): Update comment mentioning finalization
6792 collections. Replace RE_Finalization_Collection with
6793 RE_Finalization_Master.
6794 * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
6795 Associated_Collection with Finalization_Master. Replace call to
6796 Build_Finalization_Collection with Build_Finalization_Master.
6797 (Expand_Allocator_Expression): Replace call to Associated_Collection
6798 with Finalization_Master. Replace call to Set_Associated_Collection with
6799 Set_Finalization_Master. Remove the generation of
6800 Set_Finalize_Address_Ptr.
6801 (Expand_N_Allocator): Replace call to Associated_Collection with
6802 Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
6803 * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
6804 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
6805 comment on usage. Replace call to Needs_BIP_Collection with
6806 Needs_BIP_Finalization_Master Remplace BIP_Collection with
6807 BIP_Finalization_Master. Update all comments which mention finalization
6808 collections. Replace Associated_Collection with
6809 Finalization_Master. Replace Build_Finalization_Collection with
6810 Build_Finalization_Master.
6811 (BIP_Formal_Suffix): Update BIP_Collection's case.
6812 (Build_Heap_Allocator): Update the related comment. Rename local
6813 variable Collect to Fin_Mas_Id and update its occurrences. Update
6814 comments which mention finalization collections. Replace
6815 Set_Associated_Collection with Set_Finalization_Master.
6816 (Expand_Call): Update the code which detects a special piece of library
6818 (Make_Build_In_Place_Call_In_Allocator): Replace the call to
6819 Add_Collection_Actual_To_Build_In_Place_Call with
6820 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
6821 which generates a call to Make_Set_Finalize_Address_Ptr_Call.
6822 (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
6823 Add_Collection_Actual_To_Build_In_Place_Call with
6824 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
6825 (Make_Build_In_Place_Call_In_Assignment): Replace call to
6826 Add_Collection_Actual_To_Build_In_Place_Call with
6827 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
6828 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
6829 * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
6830 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
6831 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
6832 Rename local variable Collect to Fin_Mas_Id and update its occurrences.
6833 Replace call to Set_Associated_Collection with Set_Finalization_Master.
6834 (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
6835 Replace the call to Associated_Collection with Finalization_Master.
6836 Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
6837 Update the way finalization master names are generated. Update the
6838 retrieval of the correct access type which will carry the pool and
6840 (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
6841 (Make_Finalize_Address_Body): Abstract types do not need
6842 Finalize_Address. Code reformatting.
6843 (Make_Finalize_Address_Stmts): Update comment on usage.
6844 (Make_Set_Finalize_Address_Ptr_Call): Removed.
6845 (Process_Declarations): Update comments.
6846 * exp_ch7.ads (Build_Finalization_Collection): Renamed to
6847 Build_Finalization_Master. Update associated comment.
6848 (Make_Set_Finalize_Address_Ptr_Call): Removed.
6849 * exp_ch13.adb: Update comments which mention finalization collections.
6850 (Expand_N_Free_Statement): Replace the call to Associated_Collection
6851 with Finalization_Master.
6852 * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
6853 create calls to routines Allocate_Any_Controlled and
6854 Deallocate_Any_Controlled.
6855 (Find_Finalize_Address): New routine.
6856 (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
6858 (Requires_Cleanup_Actions): Update the comment on freeze node
6860 * exp_util.ads: Remove comment on generated code for
6861 Build_Allocate_Deallocate_Proc. The code is now quite complex and it
6862 is better to simply look in the body.
6863 * freeze.adb (Freeze_All): Update the comment of finalization
6864 collections. Replace the call to Associated_Collection with
6865 Finalization_Master. Replace the call to Build_Finalization_Collection
6866 with Build_Finalization_Master.
6867 * impunit.adb: Add a-undesu and s-stposu to the list of units.
6868 * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
6870 * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
6871 Ada.Finalization. Add processing for children of System.Storage_Pools.
6872 * rtsfind.ads: Remove the naming of second level children of
6874 Remove Ada_Finalization_Heap_Management from the list of units.
6875 Remove subtype Ada_Finalization_Child.
6876 Remove the following subprogram entities:
6880 RE_Finalization_Collection
6881 RE_Finalization_Collection_Ptr
6882 RE_Set_Finalize_Address_Ptr
6884 Add the naming of second level children of System.Storage_Pools.
6885 Add System_Finalization_Masters and System_Storage_Pools_Subpools to
6887 Add subtype System_Storage_Pools_Child.
6888 Add the following subprogram entities to System.Finalization_Masters:
6890 RE_Finalization_Master
6891 RE_Finalization_Master_Ptr
6893 Add the following subprogram entities to System.Storage_Pools.Subpools:
6895 RE_Allocate_Any_Controlled
6896 RE_Deallocate_Any_Controlled
6897 RE_Root_Storage_Pool_With_Subpools
6901 Move the following subprogram entities from
6902 Ada.Finalization.Heap_Management to System.Finalization_Masters:
6904 RE_Add_Offset_To_Address
6909 * sem_ch3.adb (Access_Type_Declaration): Replace the call to
6910 Set_Associated_Collection with Set_Finalization_Master.
6911 * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
6912 BIP_Finalization_Master is created.
6913 * s-finmas.adb: New unit System.Finalization_Masters.
6914 * s-finmas.ads: New unit System.Finalization_Masters.
6915 * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
6916 * s-stposu.ads, s-stposu.adb: New unit implementing
6917 System.Storage_Pools.Subpools.
6919 2011-08-29 Bob Duff <duff@adacore.com>
6921 * tbuild.adb: Add assertion.
6923 2011-08-29 Thomas Quinot <quinot@adacore.com>
6925 * s-pooglo.adb: Minor reformatting.
6927 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6929 * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
6930 an indexed component of a packed array whose element type is a record
6931 with a representation clause different from that of the right-hand
6932 side, generate a temporary to minimuze the number of bit-field
6933 operations generated.
6935 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6937 * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
6938 declarations, and thus are likely insertion points for actions.
6940 2011-08-29 Bob Duff <duff@adacore.com>
6942 * einfo.ads: Minor comment fix.
6944 2011-08-29 Robert Dewar <dewar@adacore.com>
6946 * frontend.adb, gnat1drv.adb: Minor reformatting.
6948 2011-08-29 Tristan Gingold <gingold@adacore.com>
6950 * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
6951 * a-fihema.adb (Allocate, Deallocate): Ditto. Possibly add padding
6952 space in front of the header.
6954 2011-08-29 Johannes Kanig <kanig@adacore.com>
6956 * frontend.adb (Frontend): Exit after creating Standard package when
6957 -gnatd.H is present.
6958 * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
6961 2011-08-29 Robert Dewar <dewar@adacore.com>
6963 * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
6964 makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
6965 snames.ads-tmpl: Minor reformatting.
6967 2011-08-29 Philippe Gil <gil@adacore.com>
6969 * prj.adb (Reset_Units_In_Table): New procedure.
6970 Reset units to avoid access to freed memory.
6972 2011-08-29 Thomas Quinot <quinot@adacore.com>
6974 * get_scos.adb: When reading a P statement SCO without a pragma name
6975 (from an older ALI file), ensure that the Pragma_Name component is set
6976 to Unknown_Pragma (not left uninitialized).
6978 2011-08-29 Vincent Celier <celier@adacore.com>
6980 * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
6981 modified to compute correctly the object path of a SAL project that is
6982 extending another library project.
6983 (Write_Path_File): New procedure.
6984 * makeutl.ads (Directories): New table moved from Buildgpr
6985 (Get_Directories): New procedure moved from Buildgpr
6986 (Write_Path_File): New procedure
6987 * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
6988 paths before binding SALs, instead of Set_Ada_Paths.
6989 * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
6991 * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
6992 (Current_Source_Path_File_Of): New function
6993 (Set_Current_Object_Path_File_Of): New procedure
6994 (Current_Source_Object_File_Of): New function
6995 (Set_Current_Object_Path_File_Of): New procedure
6996 * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
6997 (Current_Source_Path_File_Of): New function
6998 (Set_Current_Object_Path_File_Of): New procedure
6999 (Current_Source_Object_File_Of): New function
7000 (Set_Current_Object_Path_File_Of): New procedure
7002 2011-08-29 Ed Schonberg <schonberg@adacore.com>
7004 * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
7005 packed entity, use a bit-field assignment only if there is no change of
7008 2011-08-29 Thomas Quinot <quinot@adacore.com>
7010 * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
7011 Is_RTU instead of using Chars comparisons.
7013 2011-08-29 Thomas Quinot <quinot@adacore.com>
7015 * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
7016 temporary object if the actual is constrained, and the discriminants
7017 read from the stream don't match.
7019 2011-08-29 Tristan Gingold <gingold@adacore.com>
7021 * sem_attr.adb, exp_attr.adb: Add handling of
7022 Attribute_System_Allocator_Alignment
7023 * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
7024 Attribute_System_Allocator_Alignment.
7025 * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
7026 * gcc-interface/targtyps.c, gcc-interface/utils2.c,
7027 gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
7028 get_target_system_allocator_alignment.
7030 2011-08-29 Arnaud Charlet <charlet@adacore.com>
7032 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
7035 2011-08-29 Arnaud Charlet <charlet@adacore.com>
7037 * exp_ch3.adb (In_Runtime): Fix typo.
7039 2011-08-29 Bob Duff <duff@adacore.com>
7041 * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
7043 2011-08-29 Ed Schonberg <schonberg@adacore.com>
7045 * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
7046 and a separate tag assignment is generated, ensure that the tag
7047 assignment is analyzed.
7049 2011-08-29 Ed Schonberg <schonberg@adacore.com>
7051 * atree.ads, atree.adb (Copy_Separate_List): New function that applies
7052 Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
7053 of statement lists that may contain local declarations.
7054 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
7055 duplicate the triggering statements needed for the expansion of this
7056 construct, when the trigger is a dispatching call to a synchronized
7059 2011-08-29 Arnaud Charlet <charlet@adacore.com>
7061 * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
7062 * bindgen.adb: Add comments.
7063 * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
7066 2011-08-29 Robert Dewar <dewar@adacore.com>
7068 * exp_attr.adb: Minor reformatting.
7069 Minor code reorganization and commenting.
7070 * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
7073 2011-08-29 Thomas Quinot <quinot@adacore.com>
7075 * get_scos.adb: Ignore chaining indicators not currently supported
7078 2011-08-29 Arnaud Charlet <charlet@adacore.com>
7080 * system.ads: Minor editing.
7082 2011-08-29 Arnaud Charlet <charlet@adacore.com>
7084 * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
7086 * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
7087 Attribute_Elab_Subp_Body.
7088 * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
7089 * sem_util.adb: Update comments.
7091 2011-08-29 Thomas Quinot <quinot@adacore.com>
7093 * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
7094 pragma name for each SCO statement corresponding to a pragma.
7096 2011-08-29 Arnaud Charlet <charlet@adacore.com>
7098 * opt.ads: Minor editing.
7100 2011-08-29 Yannick Moy <moy@adacore.com>
7102 * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
7103 that only made sense for CodePeer mode.
7105 2011-08-29 Jose Ruiz <ruiz@adacore.com>
7107 * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
7108 which is no longer used.
7109 * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
7110 handling of the 64-bit division check.
7111 * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
7113 * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
7116 2011-08-29 Thomas Quinot <quinot@adacore.com>
7118 * get_scos.adb: Minor reformatting.
7120 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
7122 * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
7123 statement list is wrapped in a block, the block is explicitly analyzed
7124 in order to properly redecorate the entities and create a servicing
7127 2011-08-29 Tristan Gingold <gingold@adacore.com>
7129 * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
7130 (Set_Zero_Cost_Handling): Remove.
7132 2011-08-29 Thomas Quinot <quinot@adacore.com>
7134 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
7136 2011-08-29 Geert Bosch <bosch@adacore.com>
7138 * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
7139 instruction, as the latter may produce -0.0, which is not a valid VAX
7141 (Neg_G): Likewise for VAX F float.
7143 2011-08-29 Robert Dewar <dewar@adacore.com>
7145 * exp_util.adb: Minor reformatting.
7147 2011-08-29 Yannick Moy <moy@adacore.com>
7149 * sem_ch3.adb: Minor comment update.
7151 2011-08-29 Thomas Quinot <quinot@adacore.com>
7153 * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
7156 2011-08-29 Thomas Quinot <quinot@adacore.com>
7158 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
7159 current statement sequence on a generic instantiation or a subprogram
7162 2011-08-29 Robert Dewar <dewar@adacore.com>
7164 * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
7167 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
7169 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
7170 Correct the check which involves the freeze node of a controlled or
7171 access-to-controlled type.
7173 2011-08-29 Geert Bosch <bosch@adacore.com>
7175 * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
7177 * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
7180 2011-08-29 Yannick Moy <moy@adacore.com>
7182 * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
7183 for every index type and component type that is not a subtype_mark.
7184 (Process_Subtype): Set Etype of subtype.
7186 2011-08-29 Robert Dewar <dewar@adacore.com>
7188 * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
7189 reorganization. Minor reformatting.
7191 2011-08-29 Steve Baird <baird@adacore.com>
7193 * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
7194 for CodePeer and ALFA modes.
7196 2011-08-29 Ed Schonberg <schonberg@adacore.com>
7198 * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
7199 that comes from an enclosing scope if it is not the renaming of an
7200 actual, to handle properly a spurious ambiguity in an instance.
7202 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
7204 * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
7205 (Alignment_Check_For_Size_Change): ...this. Add SIZE parameter and
7206 use it instead of the Esize of the first parameter.
7207 (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
7209 <Size>: Likewise. Call it for composite types on the RM size.
7211 2011-08-29 Yannick Moy <moy@adacore.com>
7213 * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
7214 * sem_util.adb (Unique_Name): Correct behaviour for names of
7217 2011-08-29 Yannick Moy <moy@adacore.com>
7219 * sem_prag.adb (Check_Precondition_Postcondition): In formal
7220 verification mode, analyze pragma expression for correctness, for
7221 pre/post on library-level subprogram, as it is not expanded later.
7223 2011-08-29 Yannick Moy <moy@adacore.com>
7225 * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
7226 in formal verification.
7228 2011-08-29 Thomas Quinot <quinot@adacore.com>
7230 * sem_util.adb: Minor reformatting.
7231 * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
7233 * par_sco.ads, par_sco.adb: Update comments.
7235 2011-08-29 Yannick Moy <moy@adacore.com>
7237 * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
7238 associated getter/setter.
7239 * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
7241 2011-08-29 Vincent Celier <celier@adacore.com>
7243 * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
7244 * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
7245 with declarations for Language_Kind and Dependency_Kind for Ada.
7246 * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
7247 (Process_Compiler): Take into account the new attributes Dependency_Kind
7249 (Check_Configuration): Check if language kind is unit based, not if the
7250 language name is Ada.
7251 (Process_Exceptions_Unit_Based): Ditto
7252 (Add_Language): Remove default additions of language and dependency kind
7253 * prj.ads: Minor comment change
7254 * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
7256 2011-08-29 Johannes Kanig <kanig@adacore.com>
7258 * debug.adb: Update comments.
7260 2011-08-24 Joseph Myers <joseph@codesourcery.com>
7262 * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
7263 (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
7264 (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
7265 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
7266 (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
7268 2011-08-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7270 * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
7271 (GNATLIBCFLAGS_FOR_C): Replace
7272 TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
7273 (gnatlib-shared-default, gnatlib-shared-dual-win32)
7274 (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
7275 (gnatlib-sjlj, gnatlib-zcx): Likewise.
7277 2011-08-07 Eric Botcazou <ebotcazou@adacore.com>
7279 * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
7281 * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
7283 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
7285 2011-08-05 Nicolas Roche <roche@adacore.com>
7287 * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
7288 libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
7290 * gcc-interface/Make-lang.in: Add support for canadian cross setting.
7292 2011-08-05 Matthew Heaney <heaney@adacore.com>
7294 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
7295 subprogram bodies declared out-of-order.
7297 2011-08-05 Yannick Moy <moy@adacore.com>
7299 * sem_util.adb (Unique_Name): only prefix with "standard" the names of
7300 entities directly in package Standard, otherwise skip the standard
7303 2011-08-05 Robert Dewar <dewar@adacore.com>
7305 * a-cbmutr.adb: Minor reformatting
7306 (Allocate_Node): refactor node allocation algorithm
7308 2011-08-05 Robert Dewar <dewar@adacore.com>
7310 * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
7311 * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
7313 (Analyze_Pragma, case Check_Policy): Ditto.
7314 * sem_prag.ads (Check_Disabled): New function
7315 * snames.ads-tmpl: Add Name_Disable.
7317 2011-08-05 Robert Dewar <dewar@adacore.com>
7319 * gnat_rm.texi: Document implementation-defined policy DISABLE for
7320 pragmas Assertion_Policy, Check_Policy, Debug_Policy.
7322 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7324 * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
7325 that appears in a generic formal part and applies to a formal
7328 2011-08-05 Robert Dewar <dewar@adacore.com>
7330 * a-cbmutr.ads: Minor reformatting.
7332 2011-08-05 Matthew Heaney <heaney@adacore.com>
7334 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
7335 to check count, check sign of value instead.
7336 * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
7337 (Copy_Subtree): allocate copy of source element
7338 (Equal_Subtree): compare elements, not access objects
7340 2011-08-05 Vincent Celier <celier@adacore.com>
7342 * gnat_ugn.texi: Fix VMS alternative.
7344 2011-08-05 Thomas Quinot <quinot@adacore.com>
7346 * sem_ch11.adb: Add comment.
7348 2011-08-05 Robert Dewar <dewar@adacore.com>
7350 * exp_util.adb: Minor comment fix.
7352 2011-08-05 Robert Dewar <dewar@adacore.com>
7354 * scng.adb (Error_Unterminated_String): Improve flag position when
7357 2011-08-05 Matthew Heaney <heaney@adacore.com>
7359 * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
7361 * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
7362 multiway tree containers.
7364 2011-08-05 Robert Dewar <dewar@adacore.com>
7366 * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
7367 * stylesw.adb: Implement -gnatyC to control comment spacing
7368 * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
7370 * usage.adb: Add line for -gnatyC.
7372 2011-08-05 Robert Dewar <dewar@adacore.com>
7374 * gnat_ugn.texi: Document -gnatyC.
7375 * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
7376 synonym for COMMENTS2).
7378 2011-08-05 Robert Dewar <dewar@adacore.com>
7380 * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
7381 a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
7382 sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
7383 a-comutr.ads, lib-xref.adb: Minor reformatting.
7385 2011-08-05 Robert Dewar <dewar@adacore.com>
7387 * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
7388 warning if there is an exception handler present.
7390 2011-08-05 Pascal Obry <obry@adacore.com>
7392 * a-iteint.ads: Fix copyright year.
7394 2011-08-05 Thomas Quinot <quinot@adacore.com>
7396 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
7397 statement SCO for a USE clause or a representation clause.
7399 2011-08-05 Yannick Moy <moy@adacore.com>
7401 * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
7402 between body and spec for stub.
7403 (Detect_And_Add_ALFA_Scope): take into account subprogram stub
7404 * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
7405 pragma precondition or postcondition, for which the enclosing
7406 subprogram or package in the AST is not the desired one, return empty.
7408 2011-08-05 Thomas Quinot <quinot@adacore.com>
7410 * g-expect.adb: Minor reformatting.
7412 2011-08-05 Bob Duff <duff@adacore.com>
7414 * a-fihema.adb: Comment out OS_Lib.
7416 2011-08-05 Matthew Heaney <heaney@adacore.com>
7418 * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
7419 (unbounded multiway tree containers) and a-iteint.ads.
7420 * a-comutr.ads, a-comutr.adb:
7421 This is the new Ada 2012 unit for unbounded multiway tree containers
7422 * a-cimutr.ads, a-cimutr.adb
7423 This is the new Ada 2012 unit for indefinite multiway tree containers
7424 * a-iteint.ads: New file.
7426 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7428 * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
7430 2011-08-05 Bob Duff <duff@adacore.com>
7432 * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
7434 * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
7436 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7438 * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
7439 general indexing aspects of Ada2012. Called when analyzing indexed
7440 components when other interpretations fail.
7441 * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
7442 in an expression context where overloading is meaningful. This excludes
7443 the occurrence in an aspect specification (efficiency only).
7444 * sem_attr.adb (Analyze_Attribute): indicate that the attributes
7445 related to iterators can be set by an attribute specification, but
7447 * sem_ch13.adb (Analyze_Aspect_Specifications): handle
7448 Constant_Indexing and Variable_Indexing.
7449 (Check_Indexing_Functions): New procedure to perform legality checks.
7450 Additional semantic checks at end of declarations.
7452 2011-08-05 Sergey Rybin <rybin@adacore.com>
7454 * tree_io.ads: Update ASIS_Version_Number because of the change of the
7455 order of calling Tree_Write/Tree_Read routines made for aspects.
7457 2011-08-05 Bob Duff <duff@adacore.com>
7459 * a-fihema.adb (Finalize): Fix race condition.
7461 2011-08-05 Yannick Moy <moy@adacore.com>
7463 * sem_ch12.adb (Analyze_Package_Instantiation,
7464 Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
7467 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7469 * sem_type.adb (Specific_Type): in an instance, the type-specific
7470 operand of an equality check that involves null may have a private
7471 type. Use full view to determine legality of construct.
7473 2011-08-05 Vincent Celier <celier@adacore.com>
7475 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
7476 delete or close the file when the call to gnatmake was successful.
7478 2011-08-05 Yannick Moy <moy@adacore.com>
7480 * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
7481 Global_Discard_Names.
7483 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7485 * sinfo.ads: comments on use of entity field for aspect specifications.
7487 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7489 * sem_ch12.adb (Reset_Entity): If the entity field of the associated
7490 node is not itself an entity but a selected component, it is a
7491 rewritten parameterless call to an en enclosing synchronized operation,
7492 and this expansion will be performed again in the instance, so there is
7493 no global information to preserve.
7495 2011-08-05 Javier Miranda <miranda@adacore.com>
7497 * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
7498 for renamings of predefined primitives.
7499 (In_Predef_Prims_DT): New subprogram.
7501 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7503 * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
7504 possible interpretation of name is a reference type, add an
7505 interpretation that is the designated type of the reference
7506 discriminant of that type.
7507 * sem_res.adb (resolve): If the interpretation imposed by context is an
7508 implicit dereference, rewrite the node as the deference of the
7509 reference discriminant.
7510 * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
7511 Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
7512 parent type or base type.
7513 * sem_ch4.adb (Process_Indexed_Component,
7514 Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
7515 Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
7516 Check for implicit dereference.
7517 (List_Operand_Interps): Indicate when an implicit dereference is
7519 * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
7521 2011-08-05 Thomas Quinot <quinot@adacore.com>
7523 * scos.ads: Update documentation of SCO table. Pragma statements can now
7524 be marked as disabled (using 'p' instead of 'P' as the statement kind).
7525 * par_sco.ads, par_sco.adb: Implement the above change.
7526 (Process_Decisions_Defer): Generate a P decision for the first parameter
7527 of a dyadic pragma Debug.
7528 * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
7530 * put_scos.adb: Code simplification based on above change.
7532 2011-08-05 Robert Dewar <dewar@adacore.com>
7534 * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
7535 bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
7536 a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
7537 prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
7539 2011-08-05 Bob Duff <duff@adacore.com>
7541 * a-stunau.ads, g-spipat.adb: Update comments.
7543 2011-08-05 Bob Duff <duff@adacore.com>
7545 * a-fihema.ads: Minor comment fix.
7546 * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
7548 (Attach, Detach): Remove some unnecessary code.
7549 (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
7551 2011-08-05 Bob Duff <duff@adacore.com>
7553 * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
7554 allocation for Objects component. This simplifies the code somewhat. It
7555 is also a little more efficient in the not-so-unusual case where there
7556 are no controlled objects allocated.
7557 Make Finalization_Started flag atomic.
7558 (Finalize): Avoid unnecessary detachment of items from the list.
7559 (pcol): Minor cleanup.
7561 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7563 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
7564 package whose name is the same as that of the generic unit, or its
7567 2011-08-05 Bob Duff <duff@adacore.com>
7569 * a-fihema.adb, a-fihema.ads: Minor comment improvements.
7570 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
7571 Minor comment fixes.
7573 2011-08-05 Arnaud Charlet <charlet@adacore.com>
7575 * make.adb (Linking_Phase): No longer need to set source search path
7576 before calling gnatlink in CodePeer mode.
7577 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
7578 gcc in CodePeer mode, since the binder generated file no longer has a
7580 * switch.ads, switch.adb (Is_Language_Switch): Removed.
7581 * switch-c.adb: Update comment.
7583 2011-08-05 Thomas Quinot <quinot@adacore.com>
7585 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
7587 2011-08-05 Nicolas Roche <roche@adacore.com>
7589 * gnat_ugn.texi: Fix minor syntax error issue.
7591 2011-08-05 Vincent Celier <celier@adacore.com>
7593 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
7594 delete or close the file when the call to gnatmake returns a non
7595 successful return code.
7597 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7599 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
7600 check, indicate that the copy of the original node does not come from
7601 source, to prevent an infinite recursion of the expansion.
7603 2011-08-05 Johannes Kanig <kanig@adacore.com>
7605 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
7606 VC generation for subprogram bodies.
7608 2011-08-05 Yannick Moy <moy@adacore.com>
7611 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
7612 the base type with the smallest allowed base type.
7614 2011-08-05 Sergey Rybin <rybin@adacore.com>
7616 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
7619 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7621 * sem_ch12.ads: minor comment updates.
7623 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7625 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
7626 instantiation and a formal package the compiler generates a package
7627 renaming declaration so that the generic name within the declaration
7628 is interpreted as a renaming of the instance. At the end of a formal
7629 package declaration, this renaming must become invisible.
7631 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
7633 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
7634 comparison and rely on concrete entities instead.
7636 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7638 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
7639 and discriminants, to indicate that the type has an access discriminant
7640 that supports implicit dereference.
7641 * snames.ads-tmpl: Add names of aspects and attributes related to
7642 Ada2012 iterators: constant_indexing, default_iterator,
7643 iterator_element, implicit_dereference, variable_indexing.
7644 * aspects.ads, aspects.adb: entries for iterator-related aspects.
7645 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
7646 iterator-related aspects.
7647 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
7649 2011-08-05 Sergey Rybin <rybin@adacore.com>
7651 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
7652 metrics in gnatmetric to cover new kinds of coupling mentrics.
7654 2011-08-05 Steve Baird <baird@adacore.com>
7656 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
7657 of calling the user-defined main subprogram.
7658 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode
7659 is set) Call_Main_Subprogram ahead of, as opposed to
7661 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
7662 generation of a "with" of the user-defined main subprogram.
7663 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
7664 (which is now called from Gen_Main instead).
7666 2011-08-05 Emmanuel Briot <briot@adacore.com>
7668 * projects.texi: Added reference to the Makefile package.
7670 2011-08-05 Thomas Quinot <quinot@adacore.com>
7672 * exp_ch7.adb: Minor comment rewording.
7674 2011-08-05 Ed Falis <falis@adacore.com>
7676 * env.c: Fix comment.
7678 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
7680 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
7681 character comparison and rely on concrete entities instead.
7683 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7685 * sem_ch3.adb: (Check_Private_Overriding): better error message,
7686 suggested by AI95-0068.
7688 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
7690 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
7691 the two potential initialization calls. This accounts for any
7692 access-before-elaboration checks which may precede the initialization
7694 (Next_Suitable_Statement): New routine. Returns the next real statement
7695 after the input node while skipping generated checks.
7696 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
7697 with comment on usage.
7698 Do not generate Elaborate_All when the trigger is a finalization call
7699 coming from a type init proc.
7700 (Check_Elab_Call): Propagate the initialization procedure context to
7701 subsequent calls to Check_A_Call.
7702 (Check_Internal_Call_Continue): Propagate the initialization procedure
7703 context to subsequent calls to Check_Elab_Call.
7704 (Is_Finalization_Procedure): New routine. Returns True if the input
7705 entity denotes a [Deep_]Finalize routine.
7706 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
7707 along with comment on usage.
7709 2011-08-05 Vadim Godunko <godunko@adacore.com>
7711 * s-atocou.ads: Add list of supported platforms.
7713 2011-08-05 Yannick Moy <moy@adacore.com>
7715 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
7717 * opt.ads (Disable_ALI_File): new Boolean flag
7718 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
7720 2011-08-05 Ed Falis <falis@adacore.com>
7722 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
7723 environ is properly defined.
7725 2011-08-05 Vincent Celier <celier@adacore.com>
7727 * make.adb (Compilation_Phase): Exit immediately when all objects have
7728 been found up to date, to avoid multiple exit messages.
7729 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
7730 same project for languages with no compiler.
7731 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
7733 2011-08-05 Robert Dewar <dewar@adacore.com>
7735 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
7736 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
7737 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
7738 s-atocou-builtin.adb: Minor reformatting.
7740 2011-08-05 Yannick Moy <moy@adacore.com>
7742 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
7743 if the node to wrap is a pragma check, this node and enclosed
7744 expression are not expanded, so do not apply any transformations here.
7745 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
7746 introducing transient scopes.
7748 2011-08-05 Jose Ruiz <ruiz@adacore.com>
7750 * adaint.c (__gnat_set_writable, __gnat_set_readable,
7751 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
7752 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
7753 routine is available, so we use the default implementation of these
7755 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
7756 support for copying attributes on VxWorks 6.
7758 2011-08-05 Yannick Moy <moy@adacore.com>
7760 * debug.adb: Remove use of -gnatd.D.
7761 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
7762 * opt.ads: Simplify variables for ALFA mode, to keep one only
7763 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
7766 2011-08-05 Vincent Celier <celier@adacore.com>
7768 * prj-conf.adb (Do_Autoconf): Look also for --RTS in
7769 Builder'Default_Switches.
7771 2011-08-05 Vincent Celier <celier@adacore.com>
7773 * makeusg.adb: Add lines for --create-map-file switches.
7775 2011-08-05 Ed Schonberg <schonberg@adacore.com>
7777 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
7778 profile is incomplete and the full view is available, replace it with
7780 * sem_ch6.adb (Possible_Freeze): if a type in the profile is
7781 incomplete, freezing the subprogram is delayed until the full view is
7783 * sem_type.adb (Disambiguate): an ambiguity between a user-defined
7784 fixed-point multiplication operator and the predefined operator is
7785 resolved in favor of the user-defined one.
7787 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7789 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
7792 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7794 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
7795 whether a type lacks user-defined Read or Write operations, or has a
7796 component that lacks them.
7797 * sem_attr.adb (Check_Stream_Attribute): if restriction
7798 No_Default_Stream_Attributes is active, verify that all subcomponent
7799 types of the target have user-defined stream operations, and report
7801 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
7802 * exp_strm.adb: Build_Elementary_Input_Call,
7803 Build_Elementary_Write_Call): remove checks for restriction
7804 No_Default_Stream_Attributes, now checked in semantics.
7806 2011-08-04 Vincent Celier <celier@adacore.com>
7808 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
7809 switches on the command line, look for all valid --RTS switches in the
7810 Builder switches and for each language use the first runtime name found
7811 to invoke gprconfig.
7812 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
7813 command line and there is no auto-configuration.
7814 (Runtime_Name_Set_For): New function.
7816 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7818 * exp_ch7.adb (Build_Object_Declarations): Do not generate the
7819 elaborate initialization expression for variable Abort when processing
7820 a package body or a declaration.
7821 (Create_Finalizer): Propagate the package context when creating the
7822 exception-related variables.
7823 * exp_ch7.ads (Build_Object_Declarations): New formal parameter
7824 For_Package along with usage comment.
7826 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7828 * gcc-interface/Makefile.in: Clean up targets.
7829 Enable new package for atomic counters and copy-on-write implementation
7830 of unbounded strings on x86 platforms.
7831 * gcc-interface/Make-lang.in: Update dependencies.
7833 2011-08-04 Robert Dewar <dewar@adacore.com>
7835 * exp_ch7.adb: Minor reformatting.
7837 2011-08-04 Robert Dewar <dewar@adacore.com>
7839 * exp_strm.adb: Minor reformatting.
7841 2011-08-04 Vadim Godunko <godunko@adacore.com>
7843 * s-atocou.adb: Replace by dummy version and use on targets where atomic
7844 operations are not supported.
7845 * s-atocou-builtin.adb: Renamed from s-atocou.adb.
7846 * s-atocou-x86.adb: New file.
7847 * Makefile.rtl: Add s-atocou.o file
7849 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7851 * make.adb (Compile): Move setting of CodePeer_Mode to ...
7852 (Compilation_Phase): ... here.
7853 (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
7855 2011-08-04 Thomas Quinot <quinot@adacore.com>
7857 * Make-generated.in: Fix minor typo in comment.
7859 2011-08-04 Thomas Quinot <quinot@adacore.com>
7861 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
7864 2011-08-04 Robert Dewar <dewar@adacore.com>
7866 * a-coinho.adb: Minor reformatting.
7868 2011-08-04 Robert Dewar <dewar@adacore.com>
7870 * a-coinho.ads: Minor reformatting.
7872 2011-08-04 Vadim Godunko <godunko@adacore.com>
7874 * s-atocou.ads, s-atocou.adb: New files.
7875 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
7876 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
7877 direct use of GCC's atomic builtins and replace them by use of new
7878 atomic counter package.
7880 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7882 * exp_strm.adb: better error message for No_Default_Stream_Attributes.
7884 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7886 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
7887 with a call to Get_External_Tag.
7888 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
7889 subprogram usage. Remove the guard against package declarations and
7890 bodies since Build_Cleanup_Statements is no longer invoked in that
7892 (Build_Components): Initialize Tagged_Type_Stmts when the context
7893 contains at least one library-level tagged type.
7894 (Build_Finalizer): New local variables Has_Tagged_Types and
7895 Tagged_Type_Stmts along with associated comments on usage. Update the
7896 logic to include tagged type processing.
7897 (Create_Finalizer): Insert all library-level tagged type unregistration
7898 code before the jump block circuitry.
7899 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
7900 (Expand_N_Package_Declaration): Remove the call to
7901 Build_Cleanup_Statements.
7902 (Process_Tagged_Type_Declaration): New routine. Generate a call to
7903 unregister the external tag of a tagged type.
7904 (Processing_Actions): Reimplemented to handle tagged types.
7905 (Process_Declarations): Detect the declaration of a library-level
7906 tagged type and carry out the appropriate actions.
7907 (Unregister_Tagged_Types): Removed. The machinery has been directly
7908 merged with Build_Finalizer.
7910 2011-08-04 Robert Dewar <dewar@adacore.com>
7912 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
7913 gnatls.adb, exp_ch3.adb: Minor reformatting.
7915 2011-08-04 Marc Sango <sango@adacore.com>
7917 * sem_attr.adb (Analyze_Attribute): Replace the message
7918 "invisible attribute of}" of the spark restriction violation in
7919 attribute reference by the simple message "invisible attribute of type".
7920 Indeed, the node value Error_Msg_Node_1 used is in conflit with the
7921 two insertion characters: '&' and '}'.
7923 2011-08-04 Vadim Godunko <godunko@adacore.com>
7925 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
7926 * a-coinho.ads, a-coinho.adb: New file.
7927 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
7929 2011-08-04 Nicolas Roche <roche@adacore.com>
7931 * alfa_test.adb: Not all ali files are containing alfa information even
7932 if compiled with -gnatd.F. So suppress warning about missing ALFA
7935 2011-08-04 Yannick Moy <moy@adacore.com>
7937 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
7939 * put_alfa.adb: Check that scope name is not empty.
7941 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7943 * exp_ch3.adb (Stream_Operation_Ok): new predicate
7944 Needs_Elementary_Stream_Operation, to determine whether user-defined
7945 Read and Write attributes are available for the elementary components
7946 of the given type. If only the predefined attributes are available,
7947 then when restriction No_Default_Stream_Attributes is active the
7948 predefined stream attributes for the composite type cannot be created.
7950 2011-08-04 Robert Dewar <dewar@adacore.com>
7952 * bindgen.adb: Fix obsolete comments and names from Ada/C days.
7953 Put routines in alpha order
7955 2011-08-04 Jose Ruiz <ruiz@adacore.com>
7957 * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
7958 * gcc-interface/Make-lang.in: Update dependencies.
7960 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7962 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
7963 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
7966 2011-08-04 Robert Dewar <dewar@adacore.com>
7968 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
7969 lib-xref-alfa.adb: Minor reformatting.
7971 2011-08-04 Marc Sango <sango@adacore.com>
7973 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
7974 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
7975 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
7978 2011-08-04 Tristan Gingold <gingold@adacore.com>
7980 * bindgen.adb (Gen_Adainit_C): Remove.
7981 (Gen_Adafinal_C): Ditto.
7982 (Gen_Elab_Externals_C): Ditto.
7983 (Gen_Elab_Calls_C): Ditto.
7984 (Gen_Elab_Order_C): Ditto.
7985 (Gen_Elab_Defs_C): Ditto.
7986 (Gen_Finalize_Library_C): Ditto.
7987 (Gen_Finalize_Library_Defs_C): Ditto.
7988 (Gen_Main_C): Ditto.
7989 (Gen_Output_File_C): Ditto.
7990 (Gen_Restrictions_C): Ditto.
7991 (Gen_Versions_C): Ditto.
7992 (Write_Info_Ada_C): Ditto.
7993 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
7994 (Gen_Output_File): Do not force Ada_Bind_File anymore.
7995 Always call Gen_Output_File_Ada.
7996 * gnatlink.adb (Begin_Info): Now a constant.
7998 (Ada_Bind_File): Remove
7999 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases.
8000 * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
8001 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
8002 * opt.ads (Ada_Bind_File): Remove.
8004 2011-08-04 Thomas Quinot <quinot@adacore.com>
8006 * projects.texi: Document target-specific directory in default project
8009 2011-08-04 Thomas Quinot <quinot@adacore.com>
8011 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
8014 2011-08-04 Yannick Moy <moy@adacore.com>
8016 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
8017 opt.ads, lib-xref.ads: Code clean up.
8019 2011-08-04 Yannick Moy <moy@adacore.com>
8021 * gnat_rm.texi: Update description of Test_Case
8022 * gnat_ugn.texi: Typo.
8024 2011-08-04 Ed Falis <falis@adacore.com>
8026 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
8028 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8030 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
8031 it is of type Root_Controlled. This action eliminates fields Prev and
8032 Next from type equality.
8034 2011-08-04 Yannick Moy <moy@adacore.com>
8036 * lib-xref-alfa.adb: Correct typo.
8038 2011-08-04 Matthew Heaney <heaney@adacore.com>
8040 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
8043 2011-08-04 Yannick Moy <moy@adacore.com>
8045 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
8046 (Analyze_Pragma): allow static string expression for name of Test_Case,
8047 instead of simply string literals.
8048 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
8051 2011-08-04 Vincent Celier <celier@adacore.com>
8053 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
8054 case suffixes to find truncated main sources.
8056 2011-08-04 Tristan Gingold <gingold@adacore.com>
8058 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
8059 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
8060 (Compute_Current_Task): Ditto.
8062 2011-08-04 Tristan Gingold <gingold@adacore.com>
8064 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
8066 2011-08-04 Yannick Moy <moy@adacore.com>
8068 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
8069 library-level constant.
8070 (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
8071 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
8072 used as selector of parameter association, in ALFA mode.
8074 2011-08-04 Robert Dewar <dewar@adacore.com>
8076 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
8077 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
8080 2011-08-04 Arnaud Charlet <charlet@adacore.com>
8082 * make.adb (Linking_Phase): Set source search path before calling
8083 gnatlink in CodePeer mode.
8085 2011-08-04 Javier Miranda <miranda@adacore.com>
8087 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
8088 Remove code which takes care of building TSDs.
8089 * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
8090 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
8091 the accessibility check in VM targets.
8092 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
8093 (Building_Static_DT): Now returns false for VM targets.
8094 (Build_VM_TSDs): Removed.
8095 (Expand_Interface_Conversion): Generate missing runtime check for
8096 conversions to interface types whose target type is unknown at compile
8098 (Make_VM_TSD): Add missing code to disable the generation of calls to
8099 Check_TSD if the tagged type is not defined at library level, or not
8100 has a representation clause specifying its external tag, or -gnatdQ is
8102 * exp_disp.ads (Build_VM_TSDs): Removed.
8103 (Make_VM_TSDs): Spec relocated from exp_disp.adb
8104 * sem_disp.adb (Check_Dispatching_Operation): No code required to
8105 register primitives in the dispatch tables in VM targets.
8106 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
8107 initialization of class-wide interface objects in VM targets.
8108 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
8111 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
8113 * gnatlink.adb (Gnatlink): Correct missleading error message displayed
8114 when dotnet-ld cannot be found.
8116 2011-08-04 Arnaud Charlet <charlet@adacore.com>
8118 * bindgen.adb: Simplify significantly generation of binder body file in
8120 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
8121 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
8124 2011-08-04 Yannick Moy <moy@adacore.com>
8126 * sem_prag.adb, sem.ads: Code cleanup.
8128 2011-08-04 Tristan Gingold <gingold@adacore.com>
8130 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
8131 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
8132 results if possible.
8133 * s-stusta.adb (Print): Adjust after changes in s-stausa.
8134 * gnat_ugn.texi: Update dynamic stack usage section.
8136 2011-08-04 Steve Baird <baird@adacore.com>
8138 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
8139 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
8140 contains only a call to the user-defined main subprogram.
8141 (Gen_Main_Ada) - If CodePeer_Mode is set, then
8142 call the "wrapper" subprogram instead of directly
8143 calling the user-defined main subprogram.
8145 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8147 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
8148 alternatives of a case statement for controlled objects. Rename local
8149 variable A to Dead_Alt.
8150 (Expand_N_If_Statement): Check the then and else statements of an if
8151 statement for controlled objects. Check the then statements of all
8152 elsif parts of an if statement for controlled objects.
8153 (Expand_N_Loop_Statement): Check the statements of a loop for controlled
8155 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
8156 detects a loop associated with the expansion of an array object.
8157 Augment the processing of the loop statements to account for a possible
8158 wrap done by Process_Statements_For_Controlled_Objects.
8159 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
8160 statements and abortable part of an asynchronous select for controlled
8162 (Expand_N_Conditional_Entry_Call): Check the else statements of a
8163 conditional entry call for controlled objects.
8164 (Expand_N_Selective_Accept): Check the alternatives of a selective
8165 accept for controlled objects.
8166 (Expand_N_Timed_Entry_Call): Check the entry call and delay
8167 alternatives of a timed entry call for controlled objects.
8168 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
8169 exception handler for controlled objects.
8170 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
8171 Add formal parameter Nested_Constructs along with its associated
8173 (Requires_Cleanup_Actions (Node_Id)): Update all calls to
8174 Requires_Cleanup_Actions.
8175 (Process_Statements_For_Controlled_Objects): New routine.
8176 * exp_util.ads (Process_Statements_For_Controlled_Objects): New
8177 routine. Inspect a node which contains a non-handled sequence of
8178 statements for controlled objects. If such an object is found, the
8179 statements are wrapped in a block.
8181 2011-08-04 Bob Duff <duff@adacore.com>
8183 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
8184 need to compare with Class_Wide_Type (T2), in order to get at the
8185 original class-wide type node.
8186 * sem_type.ads (Covers): Improve the comment.
8187 * einfo.ads (Class_Wide_Type): Improve the comment.
8188 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
8189 the type of the Deref.
8191 2011-08-04 Yannick Moy <moy@adacore.com>
8193 * gnat_rm.texi: Document that Test_Case pragma can only appear on
8194 separate declarations.
8195 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
8196 check identifier of pragma argument.
8197 (Chain_TC): check that no other test case associated to the same entity
8198 share the same name.
8199 (Check_Test_Case): disallow test case inside subprogram body
8200 (Analyze_Pragma): correct call to check identifier and not argument
8201 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
8202 function gets name from test case pragma.
8204 2011-08-04 Yannick Moy <moy@adacore.com>
8206 * gnat_rm.texi: Document new pragma and aspect.
8207 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
8208 (No_Duplicates_Allowed): new constant array defining whether duplicates
8209 aspects of each kind can appear on the same declaration.
8210 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
8211 field, which points to a node holding the previous Spec_PPC_List.
8212 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
8213 through the indirection with Contract.
8214 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
8215 * par-prag.adb (Prag): do nothing on Test_Case pragma
8216 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
8218 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
8219 component Ensures of Test_Case.
8220 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
8221 (Analyze_Generic_Subprogram_Declaration,
8222 Analyze_Subprogram_Instantiation,
8223 Analyze_Abstract_Subprogram_Declaration,
8224 Analyze_Subprogram_Body_Helper,
8225 Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
8226 insert contract in subprogram node at point of definition
8228 (Aspect_Loop): do not raise error on duplicate Test_Case aspect
8229 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
8230 corresponding pragma
8231 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
8232 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
8233 similar to the analysis of pre/post
8234 (Derive_Subprogram): insert contract in subprogram node at point of
8236 * sem_prag.adb, sem_prag.ads
8237 (Check_Arg_Is_String_Literal, Check_Identifier):
8238 new checking procedures to be called in treatment of pragmas
8239 (Check_Test_Case): new procedure to check that a Test_Case aspect or
8240 pragma is well-formed. This does not check currently that 'Result is
8241 used only in the Ensures component of a Test_Case.
8242 (Analyze_Pragma): add case for Test_Case
8243 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
8244 components of a Test_Case.
8245 (Preanalyze_TC_Args): new procedure to preanalyze the boolean
8246 expressions in the 3rd (and 4th if present) arguments of a Test_Case
8247 pragma, treated as spec expressions.
8248 (Sig_Flags): add value -1 for Test_Case.
8249 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
8250 Get_Requires_From_Test_Case_Pragma): getters for both expression
8251 components of a Test_Case.
8252 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
8253 indirection between an entry or [generic] subprogram entity and its
8254 pre/post + test-cases.
8255 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
8256 get/set for fields of an N_Contract node.
8257 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
8258 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
8259 names and pragma for Test_Case.
8260 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
8262 2011-08-04 Vincent Celier <celier@adacore.com>
8264 * gnat_ugn.texi: Improve documentation of gnatmake switch
8265 --source-info-file=.
8267 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8269 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
8270 type). Initialize Atyp to the appropriate type which is later checked
8271 for completion. Rewrite the assertion associated with private type
8274 2011-08-04 Ed Falis <falis@adacore.com>
8276 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
8277 initialize the number of CPUs.
8279 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8281 * sem_type.adb (Disambiguate): New subsidiary routine
8282 In_Same_Declaration_List, to implement AI05-0020: a user-defined
8283 equality on an anonymous access type whose designated type is private
8284 does not lead to an ambiguity with the universal access equality
8285 operator in the body or child units of the defining package. The same
8286 is true for a multiplication operator on a private type completed with
8289 2011-08-04 Javier Miranda <miranda@adacore.com>
8291 * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
8292 (Normalize_Scalars_Config): Removed.
8294 (Register_Opt_Config_Switches): Remove registering config values of
8295 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
8296 (Restore_Opt_Config_Switches): Remove code which restores the values of
8297 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
8298 Init_Or_Norm_Scalars.
8299 (Save_Opt_Config_Switches): Remove code which saves values of
8300 Init_Or_Norm_Scalars and Normalize_Scalars.
8301 (Set_Opt_Config_Switches): Remove code which restores config values of
8302 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
8303 Init_Or_Norm_Scalars.
8305 2011-08-04 Yannick Moy <moy@adacore.com>
8307 * frontend.adb (Frontend): remove previous patch to avoid full
8308 qualification in ALFA mode.
8309 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
8310 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
8311 unique name for an entity, which could be used to identify the entity
8312 across compilation units.
8314 2011-08-04 Thomas Quinot <quinot@adacore.com>
8317 (Initialize_Default_Project_Path): Add target specific directory
8318 ($prefix/$target/lib/gnat) in front of project path in all cases
8319 (making gnatmake's behaviour consistent with gprbuild).
8320 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
8321 Pass target name from Sdefault to project subsystem.
8322 * gnatls.adb: Show new target specific default project directory.
8324 2011-08-04 Johannes Kanig <kanig@adacore.com>
8326 * cstand.adb: Add Information to Identifier in Standard
8327 (Identifer_For): Set Entity to the corresponding entity
8329 2011-08-04 Sergey Rybin <rybin@adacore.com>
8331 * gnat_ugn.texi: Update doc on gnatcheck.
8333 2011-08-04 Yannick Moy <moy@adacore.com>
8335 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
8338 2011-08-04 Yannick Moy <moy@adacore.com>
8340 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
8341 performing expansion.
8342 * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
8343 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
8344 it is not called in ALFA mode.
8346 2011-08-04 Emmanuel Briot <briot@adacore.com>
8348 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
8349 after all, so removed.
8351 2011-08-04 Sergey Rybin <rybin@adacore.com>
8353 * vms_data.ads: Add missing VMS qualifiers.
8355 2011-08-04 Emmanuel Briot <briot@adacore.com>
8357 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
8358 the list of files on the command line after processing it through
8361 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8363 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
8364 processing for .NET/JVM. These targets can now benefit from
8365 Raise_From_Controlled_Operation and they share the same processing with
8367 (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
8368 These targets need transient scopes in order to properly finalize short
8369 lived controlled objects.
8370 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
8371 NET/JVM. These targets can now benefit from
8372 Raise_From_Controlled_Operation and they share the same processing with
8375 2011-08-04 Geert Bosch <bosch@adacore.com>
8377 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
8379 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8381 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
8382 Expand_Record_Aggregate, to determine whether aggregate must be
8383 expanded into assignments. This is the case if the ancestor part is
8384 private, regarless of the setting of the flag Has_Private_Ancestor.
8386 2011-08-04 Ed Falis <falis@adacore.com>
8388 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
8390 2011-08-04 Bob Duff <duff@adacore.com>
8392 * sinfo.ads: Fix comment.
8394 2011-08-04 Steve Baird <baird@adacore.com>
8396 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
8397 choose a package name in much the same way as is
8398 done for JGNAT when VM_Target /= No_VM, except that
8399 a slightly more distinctive prefix string is used.
8401 2011-08-04 Emmanuel Briot <briot@adacore.com>
8403 * makeutl.adb (Complete_Mains): no longer accept unit names on the
8404 gnatmake command line.
8405 This behavior was never documented (and was supported only because of
8406 an early bug in the code). This case might lead to ambiguous cases
8407 (between unit names and truncated base names without suffixes).
8409 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8411 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
8412 Remove the external tag of a tagged type from the internal hash table.
8413 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
8414 expanded usage of the routine. Strenghten the check for Is_Master. Add
8415 processing for tagged types.
8416 (Build_Finalizer): Create all the necessary lists used in finalizer
8417 creation when the processed context is a package that may contain
8419 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
8420 Requires_Cleanup_Actions.
8421 (Expand_N_Package_Body): Package bodies may need clean up code
8422 depending on whether they contain tagged types.
8423 (Expand_N_Package_Declaration): Package declarations may need clean up
8424 code depending on whether they contain tagged types.
8425 (Unregister_Tagged_Types): New routine. Search through a list of
8426 declarations or statements, looking for non-abstract Ada tagged types.
8427 For each such type, generate code to unregister the external tag.
8428 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
8429 Requires_Cleanup_Actions.
8430 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
8431 through a list of declarations or statements looking for non-abstract
8432 Ada tagged types or controlled objects.
8433 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
8434 Requires_Cleanup_Actions.
8435 (Has_Controlled_Objects (List_Id, Boolean)): Removed.
8436 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
8439 2011-08-04 Vincent Celier <celier@adacore.com>
8441 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
8442 has Ada sources, not project Project, because if the root project
8443 Project has no sources of its own, all projects will be deemed without
8446 2011-08-04 Gary Dismukes <dismukes@adacore.com>
8448 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
8449 of the No_Param_Proc acc-to-subp type used for initialization of
8450 __gnat_finalize_library_objects so that it's declared at library level
8451 rather than nested inside of the adainit routine.
8453 2011-08-04 Javier Miranda <miranda@adacore.com>
8455 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
8456 if the tagged type has a representation clause which specifies its
8459 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8461 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
8462 Remove previous procedure with that name.
8463 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
8465 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
8466 subtype mark, the ancestor cannot have unknown discriminants.
8467 (Resolve_Record_Aggregate): if the type has invisible components
8468 because of a private ancestor, the aggregate is illegal.
8470 2011-08-04 Vincent Celier <celier@adacore.com>
8472 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
8473 account switches -gnat2005, -gnat12 and -gnat2012.
8475 2011-08-04 Bob Duff <duff@adacore.com>
8477 * s-tasdeb.ads: Minor comment fix.
8479 2011-08-04 Arnaud Charlet <charlet@adacore.com>
8481 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
8483 * switch.ads, switch.adb (Is_Language_Switch): New function.
8485 2011-08-04 Vincent Celier <celier@adacore.com>
8487 * switch-c.adb: Minor comment addition.
8489 2011-08-04 Vincent Celier <celier@adacore.com>
8491 * vms_conv.adb (Process_Argument): Fail graciously when qualifier
8492 ending with '=' is followed by a space (missing file name).
8494 2011-08-04 Pascal Obry <obry@adacore.com>
8496 * g-regist.ads: Fix size of HKEY on x86_64-windows.
8498 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8500 * sem_ch12.adb (Analyze_Associations): New routine
8501 Check_Overloaded_Formal_Subprogram to reject a formal package when
8502 there is a named association or a box initialisation for an overloaded
8503 formal subprogram of the corresponding generic.
8505 2011-08-04 Yannick Moy <moy@adacore.com>
8507 * alfa.ads (ALFA_Xref_Record): add component for type of entity
8508 * get_alfa.adb, put_alfa.adb: Read and write new component of
8510 * lib-xref-alfa.adb (Collect_ALFA): generate new component.
8512 2011-08-04 Pascal Obry <obry@adacore.com>
8514 * urealp.adb: Minor reformatting.
8516 2011-08-04 Tristan Gingold <gingold@adacore.com>
8518 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
8519 Handle the case when Cleanup_Protected_Object returns Empty.
8521 2011-08-04 Yannick Moy <moy@adacore.com>
8523 * frontend.adb (Frontend): only qualify names in non-ALFA mode
8525 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8527 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
8528 call, ignore functions.
8530 2011-08-04 Geert Bosch <bosch@adacore.com>
8532 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
8535 2011-08-04 Emmanuel Briot <briot@adacore.com>
8537 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
8538 as an index for Builder'Switches. This conforms to the documentation.
8539 * make.adb (Insert_Project_Sources): avoid duplicate code
8541 2011-08-04 Emmanuel Briot <briot@adacore.com>
8543 * makeutl.adb (Complete_Mains): if the user has passed a relative file
8544 name on the command line (for instance "../dummy"), never assume it can
8547 2011-08-04 Tristan Gingold <gingold@adacore.com>
8549 * bindgen.adb: Remove code the reference or create the
8550 Break_Start/__gnat_break_start procedure.
8551 * s-stalib.adb (Break_Start): Removed.
8553 2011-08-04 Emmanuel Briot <briot@adacore.com>
8555 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
8556 shared with gprbuild.
8558 2011-08-04 Yannick Moy <moy@adacore.com>
8560 * par-ch4.adb (P_Primary): preferentially issue an error message about
8561 a missing parenthesis arount a conditional or case expression in Ada
8562 2012 mode, if we detect that the alignment is not correct for a
8565 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8567 * exp_ch7.adb (Process_Declarations): Do not consider the result of a
8568 tag-to-class-wide conversion as needing finalization actions.
8569 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
8570 a tag-to-class-wide conversion as needing finalization actions.
8571 (Is_Finalizable_Transient): The result of a tag-to-class-wide
8572 conversion does not need finalization actions.
8573 (Is_Tag_To_CW_Conversion): New routine.
8574 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
8575 whether an object is the result of a tag-to-class-wide conversion.
8577 2011-08-04 Yannick Moy <moy@adacore.com>
8579 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
8580 the left-hand-side and right-hand-side of a conjunct are inserted when
8581 translating a pre- or postcondition
8582 * sem_ch6.adb: Correct typo in comment
8584 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8586 * gnat_rm.texi: Ravenscar does not prohibit dependence on
8587 Unchecked_Conversion and Unchecked_Deallocation.
8589 2011-08-04 Thomas Quinot <quinot@adacore.com>
8591 * make.adb: Minor reformatting.
8593 2011-08-04 Emmanuel Briot <briot@adacore.com>
8595 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
8596 sources in the project and its imported projects, but not in the whole
8599 2011-08-04 Emmanuel Briot <briot@adacore.com>
8601 * make.adb: Remove debug trace.
8603 2011-08-04 Vincent Celier <celier@adacore.com>
8605 * makeutl.adb (Do_Complete): Get the absolute path name of a relative
8606 path in canonical form, to be able to compare path names on platforms
8607 such as Windows or Darwin.
8609 2011-08-04 Thomas Quinot <quinot@adacore.com>
8611 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
8612 For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
8613 * scos.ads: Update documentation accordingly.
8614 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
8617 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8619 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
8620 attribute only if prefix type is scalar.
8622 2011-08-04 Emmanuel Briot <briot@adacore.com>
8624 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
8625 in gnatmake for specifying mains on the command line that do not belong
8626 to the main project. These mains must currently all belong to the same
8628 (Ultimate_Extension_Of): removed, since duplicated
8629 Ultimate_Extending_Project.
8631 2011-08-04 Arnaud Charlet <charlet@adacore.com>
8633 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
8635 (CodePeer_Mode_String): New.
8636 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
8638 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
8639 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
8640 mode, since no useful elaboration subprogram is needed by CodePeer.
8641 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
8642 In this mode, compile binder file with -gnatC and do stop after this
8645 2011-08-04 Vincent Celier <celier@adacore.com>
8647 * exp_ch7.adb: Minor comment fix.
8649 2011-08-04 Robert Dewar <dewar@adacore.com>
8651 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
8652 exp_ch4.adb, makeutl.adb: Minor reformatting.
8654 2011-08-04 Emmanuel Briot <briot@adacore.com>
8656 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
8657 Create several new subprograms to move code out of Make. This makes the
8658 code more readable, removes code duplication, and is a preparation work
8659 for adding support for aggregate projects.
8661 2011-08-04 Tristan Gingold <gingold@adacore.com>
8663 * s-po32gl.ads, s-po32gl.adb: New files.
8664 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
8665 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
8666 (Build_Finalization_Collection): Use it.
8667 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
8668 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
8670 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
8671 * gcc-interface/Make-lang.in: Update dependencies.
8673 2011-08-04 Emmanuel Briot <briot@adacore.com>
8675 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
8678 2011-08-04 Emmanuel Briot <briot@adacore.com>
8680 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
8681 command line is not a file name, also check whether it could be a unit
8684 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
8686 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
8687 the header of the finalization routine.
8688 If the unit has no finalizer but is a body whose spec has one, then
8689 generate the decrement of the elaboration entity only.
8690 If the unit has a finalizer and is a spec, then do not generate the
8691 decrement of the elaboration entity.
8692 (Gen_Finalize_Library_C): Likewise.
8694 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8696 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
8697 (Bounds_Size_Expression): Removed.
8698 (Double_Alignment_Of): New subsidiary routine.
8699 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
8700 for a hole in the dope vector of unconstrained arrays due to different
8701 index and element alignments.
8703 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8705 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
8706 raise program_error because body has not been seen yet.
8708 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8710 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
8713 2011-08-04 Vincent Celier <celier@adacore.com>
8715 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
8717 2011-08-04 Yannick Moy <moy@adacore.com>
8719 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
8720 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
8722 2011-08-04 Thomas Quinot <quinot@adacore.com>
8724 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
8725 instantiation in RCI.
8727 2011-08-04 Emmanuel Briot <briot@adacore.com>
8729 * make.adb: Share more code with gprbuild
8731 2011-08-04 Emmanuel Briot <briot@adacore.com>
8733 * projects.texi: Added documentation for the IDE'Gnat project file
8736 2011-08-04 Nicolas Roche <roche@adacore.com>
8738 * gnat_rm.texi: Minor editing.
8740 2011-08-04 Javier Miranda <miranda@adacore.com>
8742 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
8743 and the library case for VM targets.
8744 (Gen_Adainit_Ada): Likewise.
8746 2011-08-04 Robert Dewar <dewar@adacore.com>
8748 * g-altive.ads: Minor comment updates.
8749 * prj-nmsc.adb: Minor reformatting.
8751 2011-08-04 Javier Miranda <miranda@adacore.com>
8754 (Normalize_Scalars_Config): Value of the configuration switch set by
8755 pragma Normalize_Scalars when it appears in the gnat.adc file.
8756 (Normalize_Scalars): New field for record Config_Switches_Type. Used
8757 to save and restore settings of this pragma.
8759 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
8760 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
8762 2011-08-04 Vincent Celier <celier@adacore.com>
8764 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
8766 2011-08-04 Arnaud Charlet <charlet@adacore.com>
8768 * makeutl.adb: Minor reformatting.
8770 2011-08-04 Olivier Hainque <hainque@adacore.com>
8772 * g-altive.ads: Update comments to reflect that only the soft
8773 binding is available today.
8775 2011-08-04 Robert Dewar <dewar@adacore.com>
8777 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
8778 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
8779 * gcc-interface/Make-lang.in: Update dependencies.
8781 2011-08-04 Arnaud Charlet <charlet@adacore.com>
8783 * prj-env.adb: Remove local debug traces.
8785 2011-08-04 Yannick Moy <moy@adacore.com>
8787 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
8788 was used instead of Hi_OK, which could cause a read of an uninitialized
8789 value later on. Detected while working on the new warning.
8790 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
8792 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
8793 in more cases, in order to detect more unreferenced values.
8794 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
8795 object for expression, if any.
8797 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
8799 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
8800 the operand types instead of the Esize.
8802 2011-08-04 Steve Baird <baird@adacore.com>
8804 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
8805 enable CodePeer_Mode.
8806 * bindusg.adb (Display): Add help message describing -P binder switch.
8807 * gnat_ugn.texi: Document -P binder switch.
8808 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
8809 user-defined main program directly.
8810 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
8811 user-defined main program in the context clause of the package body.
8813 2011-08-04 Yannick Moy <moy@adacore.com>
8815 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
8816 duplicate of Defining_Entity
8817 (Get_Unique_Entity_For_Decl): rename function into
8818 Unique_Defining_Entity
8819 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
8820 (Formal_Proof_On): remove synthesized flag
8821 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
8822 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
8823 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
8824 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
8825 Annotate (Formal_Proof)
8827 2011-08-04 Emmanuel Briot <briot@adacore.com>
8829 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
8830 source files with non-standard naming schemes, in imported projects
8832 2011-08-04 Emmanuel Briot <briot@adacore.com>
8834 * makeutl.adb (Complete_Mains): when a multi-unit source file is
8835 specified on the gprbuild command line, we need to compile all units
8836 within that file, not just the first one we find
8837 Fix error message for mains that are not found.
8839 2011-08-04 Thomas Quinot <quinot@adacore.com>
8841 * sem_ch6.adb: Update comment.
8842 * sem_ch12.adb: Minor reformatting.
8844 2011-08-04 Bob Duff <duff@adacore.com>
8846 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
8847 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
8848 race condition whose symptom is to fail to lock Parent. That, in turn,
8849 causes Parent.Awake_Count to be accessed without locking Parent, which
8850 causes another race condition whose symptom is that Parent.Awake_Count
8851 can be off by 1 (either too high or too low). The solution is to lock
8852 Parent unconditionally, and then lock Acceptor, before reading
8853 Acceptor.Terminate_Alternative.
8855 2011-08-04 Arnaud Charlet <charlet@adacore.com>
8857 * debug.adb: Update comment.
8859 2011-08-04 Robert Dewar <dewar@adacore.com>
8861 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
8862 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
8863 exp_ch6.adb: Minor reformatting.
8865 2011-08-04 Gary Dismukes <dismukes@adacore.com>
8867 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
8870 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8872 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
8874 2011-08-04 Thomas Quinot <quinot@adacore.com>
8876 * sinfo.ads: Minor reformatting.
8878 2011-08-04 Emmanuel Briot <briot@adacore.com>
8880 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
8881 even if there is no location.
8883 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8885 * sem_res.adb, sem_ch4.adb: move check for restriction
8886 No_Task_Hierarchy to resolve_allocator.
8888 2011-08-04 Thomas Quinot <quinot@adacore.com>
8890 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
8891 This flag of N_Pragma nodes is not used, remove it as well as all of
8892 the associated circuitry.
8894 2011-08-04 Javier Miranda <miranda@adacore.com>
8896 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
8897 runtime check on duplicated externa tags
8898 * debug.adb Document switch -gnatdQ.
8900 2011-08-04 Gary Dismukes <dismukes@adacore.com>
8902 * a-fihema.ads: Minor typo fix.
8904 2011-08-04 Yannick Moy <moy@adacore.com>
8906 * sem_ch10.adb: Minor comment update.
8908 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8910 * einfo.adb: Update the node field usage to reflect the renaming of
8911 Return_Flag to Return_ Flag_Or_Transient_Decl.
8912 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
8913 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
8914 (Write_Field15_Name): Change Return_Flag to
8915 Return_Flag_Or_Transient_Decl.
8916 * einfo.ads: Rename node field Return_Flag to
8917 Return_Flag_Or_Transient_Decl. Update the associated comment and all
8918 occurrences in entities.
8919 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
8920 associated Inline pragma.
8921 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
8922 associated Inline pragma.
8923 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
8925 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
8926 Return_Flag and Set_Return_Flag.
8927 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
8928 objects generated for controlled transients declared inside an
8929 Exception_With_Actions. Update the calls to Return_Flag.
8930 (Process_Object_Declaration): Add code to add a null guard for hook
8931 objects generated for controlled transients declared inside an
8932 Exception_With_Actions. Update related comment.
8933 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
8934 objects generated for controlled transients declared inside an
8935 Exception_With_Actions. Update the calls to Return_Flag.
8936 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
8938 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8940 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
8941 positional aggregate.
8943 2011-08-04 Vincent Celier <celier@adacore.com>
8945 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
8946 SLOC only for pragmas.
8948 2011-08-04 Emmanuel Briot <briot@adacore.com>
8950 * projects.texi: Minor typo fix.
8952 2011-08-04 Emmanuel Briot <briot@adacore.com>
8954 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
8955 on case-sensitive file systems.
8957 2011-08-04 Thomas Quinot <quinot@adacore.com>
8959 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
8960 nested in a disabled pragma.
8961 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
8962 enclosing pragma, if any, for X decisions.
8964 2011-08-04 Thomas Quinot <quinot@adacore.com>
8966 * sem_prag.adb: Minor reformatting.
8968 2011-08-04 Vincent Celier <celier@adacore.com>
8970 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
8971 allowed in no run time mode.
8973 2011-08-04 Vincent Celier <celier@adacore.com>
8975 * make.adb (Check): When -gnatc is used, check for the source file
8976 inside the ALI file with a canonical case file name.
8978 2011-08-04 Emmanuel Briot <briot@adacore.com>
8980 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
8981 overriding the separator.
8983 2011-08-04 Robert Dewar <dewar@adacore.com>
8985 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
8986 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
8988 2011-08-04 Robert Dewar <dewar@adacore.com>
8990 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
8992 2011-08-04 Yannick Moy <moy@adacore.com>
8994 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
8995 'Result only appears in postcondition of function.
8997 2011-08-04 Thomas Quinot <quinot@adacore.com>
8999 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
9000 external tag, include the value of the external tag in the exception
9003 2011-08-04 Yannick Moy <moy@adacore.com>
9005 * sem_attr.adb (Result): modify error message for misplaced 'Result
9007 2011-08-04 Sergey Rybin <rybin@adacore.com>
9009 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
9010 clear that the second argument must be an identifier.
9012 2011-08-04 Thomas Quinot <quinot@adacore.com>
9014 * exp_ch9.adb (Build_Barrier_Function): When compiling with
9015 -fpreserve-control-flow, insert an IF statement on the barrier
9016 condition to ensure that a conditional branch instruction is generated.
9018 2011-08-04 Emmanuel Briot <briot@adacore.com>
9020 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
9021 (Processing_Flags.Ignore_Missing_With): new flag.
9023 2011-08-04 Emmanuel Briot <briot@adacore.com>
9025 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
9026 Source_List_File on case-insensitive systems where the file is actually
9027 on a case-sensitive file system (NFS,...).
9029 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9031 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
9032 function return contains a controlled [extension] aggregate and the
9033 return statement is not part of a handled sequence of statements, wrap
9034 the return in a block. This ensures that all controlled temporaries
9035 generated during aggregate resolution will be picked up by the
9036 finalization machinery.
9038 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9040 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
9041 components, freeze type before resolution, to ensure that default
9042 initializations are present for all components.
9043 * sem_res.adb (Resolve_Actuals): the designated object of an
9044 accces-to-constant type is a legal actual in a call to an
9045 initialization procedure.
9047 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9049 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
9050 N_Unchecked_Type_Conversion to the possible containers of a renamed
9053 2011-08-04 Yannick Moy <moy@adacore.com>
9055 * par-ch13.adb (Aspect_Specifications_Present): recognize
9056 "with Identifier'Class =>" as an aspect, so that a meaningful warning
9057 is issued in Strict mode.
9058 * par.adb: Fix typos in comments.
9060 2011-08-04 Yannick Moy <moy@adacore.com>
9062 * sem_attr.adb (Result): modify error message to take into account Post
9063 aspect when compiling Ada 2012 (or newer) code.
9065 2011-08-04 Nicolas Roche <roche@adacore.com>
9067 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
9068 remove need for GCC exceptions.
9070 2011-08-04 Vincent Celier <celier@adacore.com>
9072 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
9073 project, not the source file name.
9074 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
9075 excluded, continue looking. This excluded source will only be returned
9076 if there is no other source with the same base name that is not locally
9079 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9081 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
9082 private and one of the operands is a real literal, use a qualified
9083 expression rather than a conversion which is not meaningful to the
9086 2011-08-04 Yannick Moy <moy@adacore.com>
9088 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
9089 corresponding aspect X'Class are allowed, proceed with analysis of the
9090 aspect instead of skipping it.
9092 2011-08-04 Tristan Gingold <gingold@adacore.com>
9094 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
9095 This will allow to have an Ada implementation for the subprogram.
9097 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9099 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
9100 completion and aspects are present, apply them to the entity for the
9101 type which is currently the partial view, but which is the one that
9103 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
9104 applies to a partial view, indicate that the full view has predicates
9105 and delayed aspects.
9106 (Replace_Type_Reference): Handle properly predicates that apply to the
9107 full view of a private completion.
9109 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
9111 * layout.adb (Layout_Type): For composite types, do not set Esize.
9112 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
9114 (Size_Known): Look at the RM size of components instead of the Esize.
9115 (Freeze_Record_Type): Look at the RM size instead of the Esize to
9116 issue warning and activate Implicit_Packing.
9117 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
9118 if the Esize is not known.
9119 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
9120 for elementary types only.
9121 (Analyze_Record_Representation_Clause): Look at the RM size instead
9122 of the Esize to issue errors.
9123 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
9125 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
9127 Look at the RM size instead of the Esize for types if the latter is
9129 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
9131 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9133 * sem_type.adb: proper handling of equality not involving anonymous
9136 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9138 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
9139 Vis_Decls. When creating a library-level finalizer for a package spec,
9140 both the declaration and body of the finalizer are inserted either in
9141 the visible or private declarations of the package spec.
9143 2011-08-04 Javier Miranda <miranda@adacore.com>
9145 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
9146 use of the full-view of a type when invoking Is_Ancestor.
9147 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
9148 the full-view of private parents is requested, then use also the
9149 full-view of the parent of the first derivation.
9151 2011-08-04 Tristan Gingold <gingold@adacore.com>
9153 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
9154 instead of the locally imported procedure.
9155 * s-taprop-mingw.adb (Enter_Task): Ditto.
9156 * s-valrea.adb (Scan_Real): Ditto.
9157 * s-imgrea.adb (Set_Image_Real): Ditto.
9158 * s-flocon.ads: Make the package pure.
9160 2011-08-04 Thomas Quinot <quinot@adacore.com>
9162 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
9163 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
9164 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
9165 New subprogram, moved here from...
9166 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
9167 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
9168 rewriting of the last argument into a procedure call statement here...
9169 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
9172 2011-08-04 Thomas Quinot <quinot@adacore.com>
9174 * par_sco.adb: Minor reformatting.
9176 2011-08-04 Robert Dewar <dewar@adacore.com>
9178 * erroutc.adb: Minor reformatting.
9180 2011-08-04 Thomas Quinot <quinot@adacore.com>
9182 * par_sco.adb: Comment update.
9184 2011-08-04 Tristan Gingold <gingold@adacore.com>
9186 * s-flocon.ads: New file.
9187 * g-flocon.ads: Now a renaming of s-flocon.
9188 * Makefile.rtl: Add s-flocon.o
9190 2011-08-04 Javier Miranda <miranda@adacore.com>
9192 * exp_strm.adb (Build_Array_Input_Function): if the array type is
9193 constrained, do not attempt to build a subtype of it.
9195 2011-08-04 Yannick Moy <moy@adacore.com>
9197 * errout.ads Change comments: remove 'R'M as an example where quotes
9198 are needed; add ALFA as another case where quotes are not needed
9199 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
9200 case where quotes are not needed.
9201 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
9202 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
9203 Remove all occurrences of 'A'L'F'A
9205 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9207 * sem_ch13.adb: check legality of invariant pragma.
9209 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
9211 * bindgen.adb: Add comments.
9213 2011-08-04 Yannick Moy <moy@adacore.com>
9215 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
9217 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
9218 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
9220 2011-08-04 Robert Dewar <dewar@adacore.com>
9222 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
9223 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
9224 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
9226 2011-08-04 Thomas Quinot <quinot@adacore.com>
9228 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
9230 2011-08-04 Thomas Quinot <quinot@adacore.com>
9233 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
9236 2011-08-04 Robert Dewar <dewar@adacore.com>
9238 * einfo.ads, exp_ch4.adb: Minor reformatting.
9240 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
9242 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
9244 2011-08-04 Ed Schonberg <schonberg@adacore.com>
9246 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
9247 type in all cases to compute list of primitive operations, because full
9248 view may be an itype that is not attached to the list of declarations.
9250 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
9252 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
9253 library has already been finalized.
9254 (Gen_Adafinal_C): Likewise.
9255 (Gen_Adainit_Ada): Generate an early return if the library has
9256 already been elaborated.
9257 (Gen_Adainit_C): Likewise.
9258 (Gen_Output_File_Ada): Generate an elaboration flag.
9259 (Gen_Output_File_C): Likewise.
9261 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9263 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
9264 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
9265 built in the first place.
9266 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
9267 for CodePeer because Finalize_Address was not built to begin with.
9268 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
9270 2011-08-04 Pascal Obry <obry@adacore.com>
9272 * adaint.c (__gnat_tmp_name): Use current process id to create temp
9273 filenames, this ensures unicity of filenames across processes.
9275 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9277 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
9278 Raise_Controlled to Raise_From_Controlled_Operation. Update the
9279 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
9280 Add False as the actual to From_Abort in the generated call to
9281 Raise_From_Controlled_Operation.
9283 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
9285 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
9286 so that the ali file name can be retrieved from outside of this package.
9287 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
9288 doing nothing in the general case, but used to update the object file
9289 timestamp if directly generated by the backend.
9290 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
9291 to a later time than the ali file one.
9293 2011-08-04 Yannick Moy <moy@adacore.com>
9295 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
9296 entities whose body contains an Annotate pragma which forces formal
9298 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
9299 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
9300 Mark_Non_ALFA_Subprogram to pass in a message and node.
9301 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
9302 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
9303 surrounding subprogram.
9304 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
9305 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
9306 as not in ALFA is annotated with Formal_Proof being On, then an error
9307 is issued based on the additional parameters for message and node.
9308 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
9309 * gcc-interface/Make-lang.in: Update dependencies.
9311 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9313 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
9314 Finalize_Address when CodePeer is enabled.
9316 2011-08-04 Pascal Obry <obry@adacore.com>
9318 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
9319 the latter returns a pointer to a static buffer which is deallocated
9320 at the end of the routine.
9322 2011-08-04 Yannick Moy <moy@adacore.com>
9324 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
9325 after index creation; mark unconstrained base array type generated as
9326 being in/not in ALFA as well
9327 (Make_Index): mark subtype created as in/not in ALFA
9328 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
9329 over a loop as in/not in ALFA, depending on its type and form of loop
9332 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9334 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
9335 directly to False on .NET and JVM.
9337 2011-08-04 Yannick Moy <moy@adacore.com>
9339 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
9340 constraint that subtype must come from source code to be in ALFA, so
9341 that anonymous subtypes can be in ALFA too.
9343 2011-08-04 Yannick Moy <moy@adacore.com>
9345 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
9346 reference for ALFA mode.
9347 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
9348 procedure public so as to use it from formal verification back-end.
9350 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
9352 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
9353 invalid checks of the Parameter, making Remove_Switch not working
9356 2011-08-04 Arnaud Charlet <charlet@adacore.com>
9358 * targparm.ads: Update header: no run-time exception is needed on this
9361 2011-08-04 Vincent Celier <celier@adacore.com>
9363 * a-fihema.adb: Use System.IO instead of GNAT.IO
9365 2011-08-04 Thomas Quinot <quinot@adacore.com>
9367 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
9368 are forbidden in Compiler_Unit mode.
9370 2011-08-04 Robert Dewar <dewar@adacore.com>
9372 * sem_util.adb: Minor reformatting.
9374 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9376 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
9377 library-level finalizers.
9378 (Gen_Finalize_Library_C): Update the import string for library-level
9380 (Gen_Finalize_Library_Defs_C): Update the definition name of a
9381 library-level finalizer.
9382 * exp_ch7.adb: Remove with and use clauses for Stringt.
9383 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
9384 Spec_Decl. Add local variable Body_Id. The names of library-level
9385 finalizers are now manually fully qualified and are no longer external.
9386 A single name is now capable of servicing .NET, JVM and non-VM targets.
9387 Pragma Export is no longer required to provide visibility for the name.
9388 (Create_Finalizer_String): Removed.
9389 (New_Finalizer_Name): New routine which mimics New_..._Name.
9391 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
9393 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
9394 elaboration counter to Standard_Short_Integer.
9395 * sem_util.adb (Build_Elaboration_Entity): Likewise.
9396 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
9397 (Gen_Elab_Externals_C): Likewise.
9399 2011-08-04 Ed Falis <falis@adacore.com>
9401 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
9402 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
9403 system-vxworks-mips.ads, system-vxworks-x86.ads
9404 (Always_Compatible_Rep): set to False for all VxWorks targets.
9406 2011-08-04 Robert Dewar <dewar@adacore.com>
9408 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
9409 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
9410 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
9411 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
9412 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
9413 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
9414 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
9415 Minor reformatting and code reorganization.
9417 2011-08-04 Emmanuel Briot <briot@adacore.com>
9419 * projects.texi: Added doc for aggregate projects.
9421 2011-08-04 Emmanuel Briot <briot@adacore.com>
9423 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
9424 Add support for overriding the Project_Path in aggregate projects.
9426 2011-08-04 Robert Dewar <dewar@adacore.com>
9428 * a-cofove.ads: Minor reformatting.
9430 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
9432 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
9433 on the generated code.
9434 (Build_Finalize_Statements): Update the comment on the generated code.
9435 (Build_Initialize_Statements): Update the comment on the generated code.
9436 (Build_Object_Declarations): Add local variable Result. The object
9437 declarations are now built in sequence.
9438 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
9441 2011-08-04 Robert Dewar <dewar@adacore.com>
9443 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
9445 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
9447 * einfo.ads (Elaboration_Entity): Document new definition and use.
9448 (Elaboration_Entity_Required): Adjust to above change.
9449 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
9450 * exp_ch12.adb: And with and use for Snames.
9451 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
9452 * exp_util.adb (Set_Elaboration_Flag): Likewise.
9453 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
9454 <Check_Unit_Name>: Deal with N_Expanded_Name.
9455 <Attribute_Elaborated>: Extend to all unit names.
9456 * sem_elab.adb: And with and use for Uintp.
9457 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
9458 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
9459 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
9460 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
9461 from Gen_Adainit_Ada.
9462 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
9463 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
9464 case, do not call System.Standard_Library.Adafinal; instead call
9465 finalize_library if needed.
9466 (Gen_Adafinal_C): Likewise.
9467 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
9468 non-main program case.
9469 (Gen_Adainit_C): Generate a couple of external declarations here.
9470 In the main program case, set SSL.Finalize_Library_Objects.
9471 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
9472 (Gen_Elab_Calls_C): Likewise.
9473 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
9474 (Gen_Finalize_Library_C): Likewise. Generate a full function.
9475 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
9477 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
9478 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
9480 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
9481 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
9482 of external declarations. Call Gen_Finalize_Library_C.
9484 2011-08-04 Emmanuel Briot <briot@adacore.com>
9486 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
9487 Compute_Compilation_Phases): new subprogram.
9488 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
9489 The number of mains as well as the various compilation phases that
9490 need to be run are now project tree specific, since various
9491 aggregated trees might have different requirements. In particular,
9492 they do not all require bind or link phases.
9494 2011-08-04 Emmanuel Briot <briot@adacore.com>
9496 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
9497 (Project_Tree_Appdata): New type.
9498 It is now possible to associate application-specific data to a project
9499 tree. In particular, this is used in the gprbuild builder to avoid a
9500 number of global tables and htables, especially now that there can be
9501 several project trees loaded at once because of aggregate projects.
9502 (Debug_Name): new procedure.
9503 * projects.texi: Clarify syntax of "**" for Source_Dirs
9505 2011-08-03 Emmanuel Briot <briot@adacore.com>
9507 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
9508 the "roots" for a main.
9509 (Fill_From_Project): add support for aggregate projects. Main units
9510 in aggregated projects are now automatically added in the list of
9511 files to build (although this fails later on in gprbuild, because
9512 these files are not using the root proejct tree, so this needs
9514 * gcc-interface/Make-lang.in: Update dependencies.
9516 2011-08-03 Yannick Moy <moy@adacore.com>
9518 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
9519 conditional expression in ALFA.
9520 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
9521 expressions as not in ALFA.
9523 2011-08-03 Robert Dewar <dewar@adacore.com>
9525 * a-cofove.adb: Minor reformatting.
9527 2011-08-03 Emmanuel Briot <briot@adacore.com>
9529 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
9530 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
9532 These packages are more logically placed in the Queue package, since
9533 they manipulate the queue. It is also likely that they can be adapted
9534 for gnatmake, thus sharing more code.
9535 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
9536 that we could move the above.
9538 2011-08-03 Emmanuel Briot <briot@adacore.com>
9540 * errutil.adb (Finalize): clean up the list of error messages on exit.
9541 Calling this subprogram multiple times will no longer show duplicate
9542 error messages on stderr.
9544 2011-08-03 Emmanuel Briot <briot@adacore.com>
9546 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
9547 Getopt_Switches when we have already define a command line
9550 2011-08-03 Yannick Moy <moy@adacore.com>
9552 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
9553 in ALFA. Instead, they are considered as assertions to prove.
9554 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
9555 nodes as not in ALFA. Instead, include conditional expressions in ALFA
9556 if they have no ELSE part, or if they occur in pre- and postconditions,
9557 where the Condition cannot have side-effects in ALFA
9558 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
9559 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
9560 Instead, include type conversion between scalar types in ALFA.
9561 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
9562 if-and-only-if its type is in ALFA.
9564 2011-08-03 Thomas Quinot <quinot@adacore.com>
9566 * scos.adb, get_scos.adb, put_scos.adb
9567 New code letter for decisions: G (entry guard)
9569 (Traverse_Subprogram_Body): Rename to...
9570 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
9571 (Traverse_Protected_Body): New subprogram
9572 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
9573 protected bodies and entry bodies.
9575 2011-08-03 Yannick Moy <moy@adacore.com>
9577 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
9578 entities with get/set subprograms, which is set on procedure entities
9579 generated by the compiler for a postcondition.
9580 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
9581 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
9582 entity for a declaration
9583 (Get_Unique_Entity_For_Decl): new function returning an entity which
9584 represents a declaration, so that matching spec and body have the same
9587 2011-08-03 Robert Dewar <dewar@adacore.com>
9589 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
9590 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
9592 2011-08-03 Yannick Moy <moy@adacore.com>
9594 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
9595 library-level because retriction No_Implicit_Dynamic_Code in the
9596 front-end prevents its definition as a local subprogram
9597 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
9598 for reuse in other contexts
9599 (Traverse_Declarations_Or_Statements,
9600 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
9601 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
9602 procedures take a callback parameter to be called on all declarations
9604 (Traverse_All_Compilation_Units): new generic function to traverse a
9605 compilation unit and call a callback parameter on all declarations
9607 2011-08-03 Javier Miranda <miranda@adacore.com>
9609 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
9610 in Java since they are always enclosed in a namespace that
9611 differentiates them, and overloaded entities are supported by the VM.
9613 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9615 * checks.adb (Determine_Range): If a computed bound of an operation is
9616 outside the range of the base type of the expression, and overflow
9617 checks are enabled, the result is unknown and cannot be used for any
9618 subsequent constant folding.
9619 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
9620 unknown, so is the result of the comparison.
9622 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
9624 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
9625 From_Abort. When finalization was triggered by an abort, propagate
9626 Standard'Abort_Signal rather than Program_Error.
9627 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
9629 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
9630 From_Abort. When finalization was triggered by an abort, propagate
9631 Standard'Abort_Signal rather than Program_Error.
9632 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
9634 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
9635 Abort_Id. Update the calls to Build_Object_Declarations and
9636 Build_Raise_Statement to include Abort_Id.
9637 (Build_Adjust_Statements): New local variable Abort_Id. Update the
9638 calls to Build_Object_Declarations and Build_Raise_Statement to include
9640 (Build_Finalize_Statements): New local variable Abort_Id. Update the
9641 calls to Build_Object_Declarations and Build_Raise_Statement to include
9643 (Build_Components): Create an entity for Abort_Id when exceptions are
9644 allowed on the target.
9645 (Build_Finalizer): New local variable Abort_Id.
9646 (Build_Initialize_Statements): New local variable Abort_Id. Update the
9647 calls to Build_Object_Declarations and Build_Raise_Statement to include
9649 (Build_Object_Declarations): Add new formal Abort_Id. Create the
9650 declaration of flag Abort_Id to preserve the original abort status
9651 before finalization code is executed.
9652 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
9653 runtime routine Raise_From_Controlled_Operation.
9654 (Create_Finalizer): Update the call to Build_Raise_Statement to include
9655 Abort_Id. Update the call to Build_Object_Declarations to include
9656 Abort_Id. Update the layout of the finalizer body.
9657 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
9658 (Process_Transient_Objects): New local variable Abort_Id. Remove the
9659 clunky code to create all flags and objects related to
9660 exception propagation and replace it with a call to
9661 Build_Object_Declarations. Update the call to Build_Raise_Statement to
9663 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
9664 Add new formal Abort_Id and associated comment on its use.
9665 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
9667 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
9668 Remove the clunky code to create all flags and objects related to
9669 exception propagation and replace it with a call to
9670 Build_Object_Declarations. Update the call to Build_Raise_Statement.
9672 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
9674 * s-tassta.adb: Fix minor typos.
9676 2011-08-03 Robert Dewar <dewar@adacore.com>
9678 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
9679 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
9681 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
9683 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
9684 to packages. This ensures that the finalizer body will not end up
9685 inside the freeze node.
9686 (Process_Declarations): Add code to detect whether a freeze node has a
9687 nested finalization collection.
9689 2011-08-03 Pascal Obry <obry@adacore.com>
9691 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
9692 (Current_Session): Return a not null access to Session_Type.
9693 (Default_Session): Likewise.
9695 2011-08-03 Robert Dewar <dewar@adacore.com>
9697 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
9698 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
9700 2011-08-03 Pascal Obry <obry@adacore.com>
9702 * g-awk.ads: Minor comment fix.
9704 2011-08-03 Sergey Rybin <rybin@adacore.com>
9706 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
9707 the tree structure related to discriminant constraints.
9708 Original_Discriminant cannot be used any more for computing the
9709 defining name for the reference to a discriminant.
9711 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9713 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
9714 function is not visibly tagged, this is not a dispatching call and
9715 therfore is not Tag_Indeterminate, even if the function is marked as
9716 dispatching on result.
9718 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
9720 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
9721 (Expand_N_Free_Statement): Add a guard to protect against run-times
9722 which do not support controlled types.
9723 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
9724 against run-times which do not support controlled types.
9725 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
9726 against run-times which do not support controlled types.
9727 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
9728 against run-times which do not support controlled types.
9729 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
9730 protect against run-times which do not support controlled types.
9732 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
9734 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
9735 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
9737 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9739 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
9740 modified in the source, to prevent spurious warnings when compiling
9743 2011-08-03 Thomas Quinot <quinot@adacore.com>
9745 * a-except-2005.adb: Minor reformatting.
9747 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9749 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
9750 is a renaming declaration in the private part of a package, do not emit
9751 a warning that the with_clause could be moved because the renaming may
9752 be used in the body or in a child unit.
9754 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
9756 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
9757 Propagate the Comes_From_Source attribute from the original return
9758 object to the renaming.
9760 2011-08-03 Jose Ruiz <ruiz@adacore.com>
9762 * exp_ch7.adb (Build_Raise_Statement): Do not call
9763 Raise_From_Controlled_Operation when this routine is not present in
9764 the run-time library.
9765 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
9766 libraries (Ravenscar), tasks are non-terminating, and protected objects
9767 and tasks can only appear at library level, so we do not want
9768 finalization of protected objects nor tasks.
9769 * exp_intr.adb: Minor clarification in comment.
9770 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
9771 Gen_Output_File_C): Remove references to finalization of library-level
9772 objects when using restricted run-time libraries.
9774 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9776 * sem_ch3.adb (Build_Discriminant_Constraints): Set
9777 Original_Discriminant only if the parent type is a generic formal.
9779 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
9781 * exp_ch13.adb: Add with and use clause for Targparm;
9782 (Expand_N_Free_Statement): Prevent the generation of a custom
9783 Deallocate on .NET/JVM targets since this requires pools and address
9785 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
9786 .NET/JVM targets, attach the newly allocated object to the access
9787 type's finalization collection. Do not generate a call to
9788 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
9789 exist in the runtime.
9790 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
9791 create a custom Allocate for object that do not require initialization.
9792 Attach a newly allocated object to the access type's finalization
9793 collection on .NET/JVM.
9794 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
9795 assignment of controlled types on .NET/JVM. The two hidden pointers
9796 Prev and Next and stored and later restored after the assignment takes
9798 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
9799 kludge for .NET/JVM to recognize a particular piece of code coming from
9800 Heap_Management and change the call to Finalize into Deep_Finalize.
9801 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
9802 finalization collections on .NET/JVM only for types derived from
9803 Controlled. Separate the association of storage pools with a collection
9804 and only allow it on non-.NET/JVM targets.
9805 (Make_Attach_Call): New routine.
9806 (Make_Detach_Call): New routine.
9807 (Process_Object_Declarations): Suppress the generation of
9808 build-in-place return object clean up code on .NET/JVM since it uses
9810 * exp_ch7.ads (Make_Attach_Call): New routine.
9811 (Make_Detach_Call): New routine.
9812 * exp_intr.adb Add with and use clause for Targparm.
9813 (Expand_Unc_Deallocation): Detach a controlled object from a collection
9814 on .NET/JVM targets.
9815 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
9816 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
9817 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
9818 names used in finalization.
9820 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
9822 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
9823 (Attach, Detach): Lock the current task when chaining an object onto a
9826 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
9828 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
9829 Rewritten to create the message strings when the exception is not
9830 raised by an abort during finalization.
9831 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
9832 Raise_From_Controlled_Operation and update its associated comment.
9833 * a-fihema.ads, a-fihema.adb: New GNAT unit.
9834 Ada.Finalization.Heap_Management provides key functionality
9835 associated with controlled objects on the heap, their creation,
9836 finalization and reclamation. Type Finalization_Collection is
9837 effectively a wrapper which sits ontop of a storage pool and performs
9838 all necessary bookkeeping for all the objects it contains. Each
9839 access-to-controlled or access-to-class-wide type receives a collection
9840 as part of its expansion. The compiler generates buffer code and
9841 invokes Allocate / Deallocate to create and destroy allocated
9843 * a-finali.adb ("="): Removed.
9844 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
9845 fields Prev and Next.
9846 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
9847 A library unit with at least one controlled object on the library level
9848 has a special finalizer which is invoked by the binder. To signal this,
9849 ali files carry field PF.
9850 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
9851 associated comment on field usage.
9852 * a-tags.adb (Get_RC_Offset): Removed.
9853 (Needs_Finalization): New routine.
9854 * a-tags.ads: Update the structure of the GNAT dispatch tables.
9855 Dispatch tables now carry field Needs_Finalization which provides
9856 runtime indication whether a type is controlled or has controlled
9857 components or both. Remove field RC_Offset.
9858 (Get_RC_Offset): Removed along with its associated pragma Export.
9859 Since tagged types with controlled components no longer carry hidden
9860 field _controller, the special mechanism to retrieve its location is no
9862 (Needs_Finalization): New routine.
9863 * atree.ads, atree.adb (Elist24): New routine.
9864 (Set_Elist24): New routine.
9865 * atree.h: Add a define clause for Elist24.
9866 * bindgen.adb New library-level variable Lib_Final_Built.
9867 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
9868 presence of a VM target, the routine generates calls to the proper
9869 library finalization routine.
9870 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
9871 targets. Set the correct library finalization routine depending on
9872 whether the library has controlled objects or this is a VM compilation.
9873 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
9874 to library-level finalizers of compiled units in reverse order of
9875 elaboration. It also produces exception management code and reraises a
9876 potential exception after all units have been finalized.
9877 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
9878 library-level finalizers of compiled units in reverse order of
9880 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
9881 definitions of all library-level finalizers available to the compilation
9882 (Gen_Main_Ada): Directly call Adafinal which now contails all target
9884 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
9885 System.Standard_Library.Adafinal directly. If the library needs
9886 finalization actions, create the sequence of finalization calls.
9887 (Gen_Output_File_Ada): Alphabetize local variables and constants.
9888 Generate a with clause for System.Soft_Links when compiling for a VM.
9889 Remove the code which imports System.Standard_Library.Adafinal as
9890 Do_Finalize. Generate the library finalization routine.
9891 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
9892 If the library needs finalization actions, create all the definitions
9893 of library- level finalizers.
9894 (Has_Finalizer): New routine. Determines whether at least one compiled
9895 unit has a library-level finalizer.
9896 Add type Qualification_Mode.
9897 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
9898 * einfo.adb: New usage of field 15 as Return_Flag.
9899 Remove Finalization_Chain_Entity from the usages of field 19.
9900 Remove Associated_Final_Chain from the usages of field 23.
9901 New usage of field 23 as Associated_Collection.
9902 New usage of field 24 as Finalizer.
9903 New usage of flag 252 as Is_Processed_Transient.
9904 (Associated_Final_Chain): Removed.
9905 (Associated_Collection): New routine.
9906 (Finalization_Chain_Entity): Removed.
9907 (Finalizer): New routine.
9908 (Is_Finalizer): New routine.
9909 (Is_Processed_Transient): New routine.
9910 (Return_Flag): New routine.
9911 (Set_Associated_Final_Chain): Removed.
9912 (Set_Associated_Collection): New routine.
9913 (Set_Finalization_Chain_Entity): Removed.
9914 (Set_Finalizer): New routine.
9915 (Set_Is_Processed_Transient): New routine.
9916 (Set_Return_Flag): New routine.
9917 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
9919 (Write_Field8_Name): Alphabetize the output.
9920 (Write_Field11_Name): Alphabetize the output.
9921 (Write_Field12_Name): Alphabetize the output.
9922 (Write_Field13_Name): Alphabetize the output.
9923 (Write_Field14_Name): Alphabetize the output.
9924 (Write_Field15_Name): Alphabetize the output.
9925 (Write_Field16_Name): Alphabetize the output.
9926 (Write_Field17_Name): Alphabetize the output.
9927 (Write_Field18_Name): Alphabetize the output.
9928 (Write_Field19_Name): Alphabetize the output. Remove the output of
9929 Finalization_Chain_Entity.
9930 (Write_Field20_Name): Alphabetize the output.
9931 (Write_Field21_Name): Alphabetize the output.
9932 (Write_Field22_Name): Alphabetize the output.
9933 (Write_Field23_Name): Alphabetize the output. Remove the output of
9934 Associated_Final_Chain. Add output for Associated_Collection.
9935 (Write_Field24_Name): Alphabetize the output.
9936 (Write_Field25_Name): Add output for Finalizer.
9937 (Write_Field26_Name): Alphabetize the output.
9938 (Write_Field27_Name): Alphabetize the output.
9939 (Write_Field28_Name): Alphabetize the output.
9940 * einfo.ads: Add new field description for Associated_Collection and
9942 Remove Associated_Final_Chain and its uses in nodes.
9943 Remove Finalization_Chain_Entity and its uses in nodes.
9944 Add new field description for Finalizer and its uses in nodes.
9945 Add new synthesized attribute Is_Finalizer.
9946 Add new flag description for Is_Processed_Transient and its uses in
9948 Add new field description for Return_Flag and its uses in nodes.
9949 (Associated_Final_Chain): Removed along with its pragma Inline.
9950 (Associated_Collection): New routine and pragma Inline.
9951 (Finalization_Chain_Entity): Removed along with its pragma Inline.
9952 (Finalizer): New routine and pragma Inline.
9953 (Is_Finalizer): New routine and pragma Inline.
9954 (Is_Processed_Transient): New routine and pragma Inline.
9955 (Return_Flag): New routine and pragma Inline.
9956 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
9957 (Set_Associated_Collection): New routine and pragma Inline.
9958 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
9959 (Set_Finalizer): New routine and pragma Inline.
9960 (Set_Is_Processed_Transient): New routine and pragma Inline.
9961 (Set_Return_Flag): New routine and pragma Inline.
9962 * exp_aggr.adb: Alphabetize subprograms.
9963 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
9964 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
9965 associated comments. Remove local variables External_Final_List and
9967 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
9968 Ancestor. Remove the retrieval of finalization lists. Update the call to
9970 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
9971 lists. Update the call to Late_Expansion.
9972 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
9973 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
9974 (Gen_Assign): Remove the retrieval of the finalization list used to
9975 build the assignment. Update the calls to Make_Init_Call and
9977 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
9978 Remove the mechanism to determine attachment levels and finalization
9979 list retrieval. Remove the processing for coextensions.
9980 (Init_Controller): Removed. Controllers no longer exist.
9981 (Late_Expansion): Remove formals Flist and Obj along with their
9982 associated comments. Update the calls to Build_Record_Aggr_Code and
9983 Build_Array_Aggr_Code.
9984 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
9985 (Expand_N_Freeze_Entity): Add special processing for finalizers which
9986 appear in entry bodies, protected subprograms and task bodies.
9987 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
9988 * exp_ch3.adb (Add_Final_Chain): Removed.
9989 (Build_Array_Init_Proc): Alphabetize local variables.
9990 (Build_Assignment): Alphabetize local variables. Update the call to
9992 (Build_Class_Wide_Master): Rename local variables to better reflect
9994 (Build_Discriminant_Assignments): Code reformatting.
9995 (Build_Init_Call_Thru): Code reformatting.
9996 (Build_Init_Procedure): Code reformatting. Generate a special version
9997 of Deep_Finalize which is capable of finalizing all initialized
9998 components and ignore the rest.
9999 (Build_Init_Statements): Rename local variables to better reflect their
10001 Reimplement the mechanism to include the creation and update of an index
10002 variable called a "counter". It is used as a bookmark for tracing
10003 initialized and non-initialized components.
10004 (Build_Initialization_Call): Remove local variable Controller_Typ.
10005 Alphabetize all local variables. Remove the initialization of the
10006 record controller and update the call to Make_Init_Call.
10007 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
10008 New local variable Counter.
10009 (Constrain_Array): Alphabetize.
10010 (Expand_Freeze_Array_Type): Create a collection instead of a
10012 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
10013 Finalize_Address which is used in conjunction with allocated controlled
10015 (Expand_N_Object_Declaration): Remove the creation of a finalization
10016 list for anonymous access types. Update the calls to Make_Init_Call and
10018 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
10019 retrieval of finalization lists. Remove the expansion of the record
10020 controller. Create TSS primitive Finalize_Address used in conjunction
10021 with controlled objects on the heap. Create finalization collections
10022 for access-to-controlled record components.
10023 (Expand_Record_Controller): Removed.
10024 (Freeze_Type): Remove the freezing of record controllers. Freezing of
10025 class-wide types now requires additional processing. Create
10026 finalization collections for access-to-controlled types.
10027 (Increment_Counter): New routine.
10028 (Make_Counter): New routine.
10029 (Make_Eq_If): Remove the mention of Name_uController.
10030 (Make_Predefined_Primitive_Specs): There is no longer need to skip
10031 types coming from System.Finalization_Root.
10032 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
10033 (Predefined_Primitive_Bodies): There is no longer need to skip types
10034 coming from System.Finalization_Root.
10035 (Stream_Operation_OK): Do not generate stream routines for
10036 type Ada.Finalization.Heap_Management.Finalization_Collection.
10037 * exp_ch3.ads: Alphabetize subprograms.
10038 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
10039 Add with and use clause for Lib.
10040 (Complete_Coextension_Finalization): Removed.
10041 (Complete_Controlled_Allocation): New routine. Create a finalization
10042 collection for anonymous access-to-controlled types. Create a custom
10043 Allocate which interfaces with the back end and the machinery in
10045 (Expand_Allocator_Expression): Add necessary calls to
10046 Complete_Controlled_Allocation. Remove the retrieval of finalization
10047 lists. Update the calls to Make_Adjust_Call. Generate a call to
10048 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
10049 the associated collection.
10050 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
10051 Code clean up. Remove the retrieval of finalization lists and
10053 Update the call to Make_Init_Call. Generate a call to
10054 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
10055 the associated collection.
10056 (Get_Allocator_Final_List): Removed. Finalization lists are not
10058 (Suitable_Element): Remove the mention of Name_uController.
10059 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
10060 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
10061 the left hand side, carry out the assignment and adjust the left hand
10063 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
10064 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
10065 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
10066 BIP_Collection and BIPcollection.
10067 (Build_Heap_Allocator): New routine used to allocate the return object
10068 of a build-in-place function onto a collection.
10069 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
10070 (Expand_Call): Do not replace direct calls to Deep routines with their
10072 (Expand_N_Extended_Return_Statement): Give all variables shorter names
10073 and update their occurrences. Add a special return flag to monitor the
10074 [ab]normal execution of the function. The flag is set right before the
10076 Rewrite the mechanism used to allocate a build-in-place return object
10077 on the heap or on a storage pool.
10078 (Is_Direct_Deep_Call): New routine.
10079 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
10080 build-in-place function call instead of a final list. Build a call to
10081 Set_Finalize_Address_Ptr to decorate the associated collection.
10082 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
10083 order to name the build-in-place function call's result for later
10084 finalization. Add a collection to a build-in-place function call
10085 instead of a final list.
10086 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
10087 build-in-place function call instead of a final list. Remove the code
10088 which moves one final list and transforms it into the actual in a
10089 nested build-in-place call.
10090 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
10091 build-in-place function call instead of a final list.
10092 (Move_Final_List): Removed.
10093 (Needs_BIP_Collection): New routine.
10094 (Needs_BIP_Final_List): Removed.
10095 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
10096 enumeration type BIP_Formal_Kind.
10097 Update the related comment.
10098 (Needs_BIP_Collection): New routine.
10099 (Needs_BIP_Final_List): Removed.
10100 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
10101 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
10102 majority of subprograms in this unit. Add Name_Finalize_Address to
10103 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
10104 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
10105 statements for an array type.
10106 (Build_Adjust_Statements): Create the adjust statements for a record
10108 (Build_Cleanup_Statements): New routine. A procedure which given any
10109 construct containing asynchronous calls, references to _master, or is a
10110 task body, a task allocation or a protected body produces the necessary
10111 runtime calls to clean up these constructs.
10112 (Build_Exception_Handler): New routine.
10113 (Build_Final_List): Removed.
10114 (Build_Finalization_Collection): New routine. A core procedure which
10115 creates a collection to service heap allocated controlled objects
10116 associated with an access-to-controlled type.
10117 (Build_Finalize_Statements): Create the finalization statements for a
10119 (Build_Finalizer): New routine. A core procedure which given any
10120 construct with declarations and/or statements detects all objects which
10121 need any type of clean up (controlled objects, protected objects) and
10122 generates all necessary code to clean up the said objects in the proper
10124 (Build_Finalizer_Call): New routine.
10125 (Build_Initialize_Statements): Create the initialization statements for
10126 an array type. The generated routine contains code to finalize partially
10127 initialized arrays.
10128 (Build_Object_Declarations): New routine.
10129 (Build_Raise_Statement): New routine.
10130 (Clean_Simple_Protected_Objects): Removed.
10131 (Controller_Component): Removed.
10132 (Enclosing_Function): New routine.
10133 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
10134 either declarations or statements or both.
10135 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
10136 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
10138 (Find_Final_List): Removed.
10139 (Global_Flist_Ref): Removed.
10140 (In_Finalization_Root): Removed.
10141 (Insert_Actions_In_Scope_Around): Determine the range of the transient
10142 scope in terms of tree nodes. Process all transient variables within
10144 (Make_Adjust_Call): Rewritten. There is no longer an attach call
10145 generated after the adjust.
10146 (Make_Attach_Call): Removed.
10147 (Make_Call): New routine.
10148 (Make_Clean): Removed.
10149 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
10151 (Make_Deep_Proc): Rewritten to generate the new profile signature used
10153 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
10155 (Make_Final_Call): Modified to simply create a call to either
10156 Deep_Finalize or Finalize.
10157 (Make_Finalize_Address_Body): New routine.
10158 (Make_Finalize_Address_Stmts): New routine. A function which produces
10159 TSS primitive Finalize_Address used in conjunction with heap allocated
10160 controlled objects.
10161 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
10162 (Make_Init_Call): Rewritten. There is no longer an attach call
10163 generated after initialization.
10164 (Make_Local_Deep_Finalize): New routine.
10165 (Make_Set_Finalize_Address_Ptr_Call): New routine.
10166 (Make_Transient_Block): Remove the finalization list retrieval and
10168 (Needs_Finalization): Moved to Exp_Util.
10169 (Parent_Field_Type): New routine.
10170 (Preprocess_Components): New routine.
10171 (Process_Transient_Objects): New routine.
10172 (Wrap_HSS_In_Block): New routine.
10173 (Wrap_Transient_Declaration): Remove finalization list management and
10174 controller insertion.
10175 (Wrap_Transient_Expression): Code reformatting.
10176 (Wrap_Transient_Statement): Code reformatting.
10177 * exp_ch7.ads (Build_Final_List): Removed.
10178 (Build_Finalization_Collection): New routine.
10179 (Build_Raise_Statement): New routine.
10180 (Controller_Component): Removed.
10181 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
10182 (Find_Final_List): Removed.
10183 (In_Finalization_Root): Removed.
10184 (Is_Simple_Protected_Type): Update related comment.
10185 (Make_Adjust_Call): New parameter profile and associated comments.
10186 (Make_Attach_Call): Removed.
10187 (Make_Final_Call): New parameter profile and associated comments.
10188 (Make_Finalize_Address_Body): New routine.
10189 (Make_Init_Call): New parameter profile and associated comments.
10190 (Make_Local_Deep_Finalize): New routine.
10191 (Make_Set_Finalize_Address_Ptr_Call): New routine.
10192 (Needs_Finalization): Moved to Exp_Util.
10193 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
10194 (Expand_N_Protected_Body): Remove the handling of finalization lists.
10195 (Find_Protection_Type): Moved to Exp_Util.
10196 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
10197 (Make_DT): Update sequence of dispatch table initialization. Remove the
10198 initialization of field RC_Offset. Add initialization of field Needs_
10200 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
10201 Reimplement how an object is first finalized, then deallocated.
10202 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
10204 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
10205 Register TSS_Finalize_Address with type TSS_Names.
10206 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
10207 procedure provides the interface between an allocation / deallocation
10208 and the support machinery in Ada.Finalization.Heap_Management.
10209 (Find_Init_Call): Code reformatting.
10210 (Find_Init_Call_In_List): Code reformatting.
10211 (Find_Protection_Type): Moved from Exp_Ch9.
10212 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
10213 (Has_Controlled_Coextensions): Removed.
10214 (Has_Controlled_Objects): New routine.
10215 (In_Library_Level_Package_Body): New routine.
10216 (Insert_Action_After): New routine.
10217 (Is_Finalizable_Transient): New routine. This predicate determines
10218 whether an object declaration is one of the many variants of controlled
10220 (Is_Null_Access_BIP_Func_Call): New routine.
10221 (Is_Non_BIP_Func_Call): New routine.
10222 (Is_Related_To_Func_Return): New routine.
10223 (Needs_Finalization): Moved from Exp_Ch7.
10224 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
10225 (Find_Protection_Type): Moved from Exp_Ch9.
10226 (Has_Controlled_Coextensions): Removed.
10227 (Has_Controlled_Objects): New routine.
10228 (In_Library_Level_Package_Body): New routine.
10229 (Insert_Action_After): New routine.
10230 (Is_Finalizable_Transient): New routine.
10231 (Is_Null_Access_BIP_Func_Call): New routine.
10232 (Is_Non_BIP_Func_Call): New routine.
10233 (Is_Related_To_Func_Return): New routine.
10234 (Needs_Finalization): Moved from Exp_ch7.
10235 * expander.adb (Expand): Add a case for N_Free_Statement.
10236 * freeze.adb (Freeze_All): Replace the generation of a finalization
10237 list with a collection for access-to-controlled types.
10238 (Freeze_Entity): Code reformatting.
10239 (Freeze_Record_Type): Remove the freezing of a record controller
10241 (Freeze_Subprogram): Code reformatting.
10242 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
10244 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
10245 has a library-level finalizer.
10246 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
10247 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
10248 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
10249 files. Add a-fihema to the list of object files.
10251 Alphabetize the associations in type Is_Parameterless_Attribute.
10252 * rtsfind.ads: Ada.Finalization_List.Controller and
10253 System.Finalization_Implementation are no longer a GNAT unit.
10254 Update the range of type Ada_Finalization_Child. Remove the following
10255 recoverable entities:
10257 RE_Attach_To_Final_List
10261 RE_Finalizable_Ptr_Ptr
10262 RE_Global_Final_List
10263 RE_Limited_Record_Controller
10266 RE_Record_Controller
10267 RE_Simple_List_Controller
10269 Add the following recoverable entities:
10271 RE_Add_Offset_To_Address
10275 RE_Exception_Identity
10276 RE_Finalization_Collection
10277 RE_Finalization_Collection_Ptr
10278 RE_Needs_Finalization
10279 RE_Save_Library_Occurrence
10280 RE_Set_Finalize_Address_Ptr
10281 RE_Set_Storage_Pool_Ptr
10283 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
10285 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
10286 (First_Stored_Discriminant): Remove the mention of Name_uController.
10287 * sem_aux.ads: Comment reformatting.
10288 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
10289 to redecorate an already existing class-wide type.
10290 (Decorate_Tagged_Type): New parameter profile and associated comment.
10291 Create a "shadow class-wide type" for a shadow entity.
10292 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
10293 of the final chain along with the associated comment.
10294 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
10295 Full_Desig and set it to the full view of the designated type.
10296 Initialize the finalization collection to empty.
10297 (Build_Derived_Record_Type): Alphabetize local variables. Code
10299 (Collect_Fixed_Components): Remove the mention of Name_uController.
10300 (Create_Constrained_Components): Remove the mention of Name_uController.
10301 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
10302 class-wide type of a shadow entity.
10303 (Process_Full_View): Update the machinery which marks type
10304 Limited_Controlled's entity as limited.
10305 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
10306 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
10307 list, instead make a collection build-in-place formal.
10308 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
10309 a designated type in order to establish a match between the renaming
10310 and the renamed entity.
10311 (Find_Selected_Component): Add guard to prevent spurious exceptions
10312 from being raised on .NET/JVM.
10313 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
10314 to the list of primitive that need special processing. Update arrays
10315 C_Names and D_Names.
10316 (Replace_Types): Handle class-wide types.
10317 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
10318 different parameter profile, look at the first formal.
10319 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
10320 use clauses for Exp_Util.
10321 * sem_res.adb: Remove with and use clauses for Elists.
10322 (Propagate_Coextensions): Removed.
10323 (Resolve_Allocator): Do not propagate the list of coextensions from one
10324 allocator to another.
10325 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
10326 Deaccessed_T to Desig_Typ.
10327 (Enter_Name): Remove the mention of Name_uController.
10328 (Gather_Components): Remove the mention of Name_uController.
10329 (Incomplete_Or_Private_View): New routine.
10330 (Is_Coextension_Root): Removed.
10331 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
10332 * sem_util.ads (Incomplete_Or_Private_View): New routine.
10333 (Is_Coextension_Root): Removed.
10334 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
10335 Controlled types are now derived from a null tagged record. Remove
10336 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
10337 * sinfo.adb (Coextensions): Removed.
10338 (Set_Coextensions): Removed.
10339 * sinfo.ads: Remove Coextensions from the explanation of node fields
10340 and its uses in nodes.
10341 Update the field usage of N_Allocator.
10342 (Coextensions): Removed along with its pragma Inline.
10343 (Set_Coextensions): Removed along with its pragma Inline.
10344 * snames.ads-tmpl: Remove names
10349 Name_uLocal_Final_List
10350 Name_Finalization_Root
10357 Name_Finalize_Address
10358 * s-pooglo.adb (Allocate): Add overriding indicator.
10359 (Deallocate): Add overriding indicator.
10360 (Storage_Size): Add overriding indicator.
10361 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
10362 than Finalize_Global_List.
10363 (Null_Finalize_Global_List): Removed.
10364 (Save_Library_Occurrence): New routine.
10365 * s-soflin.ads: Remove variable Finalize_Global_List along with its
10366 initialization. Add variable Finalize_Library_Objects along with its
10367 pragma Export. Add variables Library_Exception and
10368 Library_Exception_Set along with their pragma Export.
10369 (Null_Finalize_Global_List): Removed.
10370 (Save_Library_Occurrence): New routine.
10371 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
10372 rather than Finalize_Global_List.
10373 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
10374 of the constructed node.
10376 2011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10378 * link.c: Include "auto-host.h" before system headers.
10380 2011-08-03 Vincent Celier <celier@adacore.com>
10382 * make.adb (Gnatmake): Add to table Library_Projs only library projects
10383 that are not extended. Do not check if a library project that is
10384 extended should be regenerated. Do not add to table Library_Paths the
10385 libraries that are in extended projects. Link only with libraries that
10386 are in libray projects that are not extended.
10387 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
10388 for a library project that is extended.
10390 2011-08-03 Gary Dismukes <dismukes@adacore.com>
10392 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
10393 conforming subprogram renamings that appear to be completions if they
10394 are not fully conformant.
10395 Such renamings are homographs but not completions.
10396 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
10397 names in a subprogram renaming that appears in an instance.
10399 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10401 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
10402 not immutably limited, build actual subtype from expression to provide
10403 proper bounds to caller.
10405 2011-08-03 Gary Dismukes <dismukes@adacore.com>
10407 * sem_ch8.adb: Minor comment correction.
10409 2011-08-03 Thomas Quinot <quinot@adacore.com>
10411 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
10412 returning a limited array, use an extended return statement.
10414 2011-08-03 Vincent Celier <celier@adacore.com>
10416 * make.adb (Initialize): If --subdirs= is used, but no project file is
10417 specified, attempt to create the specify subdir if it does not already
10418 exist and use it as the object directory as if -D had been specified.
10420 2011-08-03 Arnaud Charlet <charlet@adacore.com>
10422 * s-tpopsp-vms.adb: New file.
10423 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
10424 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
10426 2011-08-03 Emmanuel Briot <briot@adacore.com>
10428 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
10431 2011-08-03 Yannick Moy <moy@adacore.com>
10433 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
10434 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
10435 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
10436 detect that an array has static bounds.
10438 2011-08-03 Thomas Quinot <quinot@adacore.com>
10440 * exp_dist.adb: Minor reformatting.
10442 2011-08-03 Arnaud Charlet <charlet@adacore.com>
10444 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
10445 (ATCB_Key): Removed, not always used.
10447 2011-08-03 Emmanuel Briot <briot@adacore.com>
10449 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
10450 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
10451 most remaining global variables.
10453 2011-08-03 Robert Dewar <dewar@adacore.com>
10455 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
10456 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
10459 2011-08-03 Javier Miranda <miranda@adacore.com>
10461 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
10462 that must be passed by copy in VM targets.
10464 2011-08-03 Emmanuel Briot <briot@adacore.com>
10466 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
10467 duplicates a similar htable now in the project tree.
10469 2011-08-03 Claire Dross <dross@adacore.com>
10471 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
10472 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
10473 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
10474 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
10475 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
10476 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
10477 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
10480 2011-08-03 Arnaud Charlet <charlet@adacore.com>
10482 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
10483 (ATCB_Key): Removed, not always used.
10484 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
10485 s-taprop-posix.adb.
10486 * s-tpopsp-tls.adb: New file.
10487 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
10488 x86/x64/ia64/powerpc/sparc Linux.
10490 2011-08-03 Arnaud Charlet <charlet@adacore.com>
10492 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
10493 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
10495 2011-08-03 Thomas Quinot <quinot@adacore.com>
10497 * rtsfind.ads, exp_dist.adb, exp_dist.ads
10498 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
10499 Fix type selection for mapping integer types to PolyORB types.
10501 2011-08-03 Bob Duff <duff@adacore.com>
10503 * sem_ch7.adb: Minor comment clarification.
10505 2011-08-03 Bob Duff <duff@adacore.com>
10507 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
10508 an error analyzing a choice, skip further processing. Further
10509 processing could cause a crash or cascade errors.
10511 2011-08-03 Emmanuel Briot <briot@adacore.com>
10513 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
10514 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
10515 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
10516 prj-env.ads (Shared_Project_Tree_Data): new type
10517 An aggregate project and its aggregated trees need to share the common
10518 data structures used for lists of strings, packages,... This makes the
10519 code simpler since otherwise we have to pass the root tree (also used
10520 for the configuration file data) in addition to the current project
10521 tree. This also avoids ambiguities as to which tree should be used.
10522 And finally this saves a bit of memory.
10523 (For_Every_Project_Imported): new parameter Tree.
10524 Since aggregated projects are using a different tree, we need to let
10525 the caller know which tree to use to manipulate the returned project.
10527 2011-08-03 Robert Dewar <dewar@adacore.com>
10529 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
10530 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
10531 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
10532 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
10534 2011-08-03 Javier Miranda <miranda@adacore.com>
10536 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
10537 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
10539 2011-08-03 Bob Duff <duff@adacore.com>
10541 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
10544 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
10546 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
10547 g-sehash.ads: Fix typo. Update header.
10549 2011-08-03 Thomas Quinot <quinot@adacore.com>
10551 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
10554 2011-08-03 Gary Dismukes <dismukes@adacore.com>
10556 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
10557 prefixes of private types along with records, since the selector may be
10559 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
10560 private types along with records, since the selector may be a
10563 2011-08-03 Emmanuel Briot <briot@adacore.com>
10565 * prj-pp.adb (Pretty_Print): Remove trailing blank line.
10567 2011-08-03 Javier Miranda <miranda@adacore.com>
10569 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
10570 Tagged_Type_Expansion.
10572 2011-08-03 Yannick Moy <moy@adacore.com>
10574 * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
10575 violation when the argument of concatenation is the name of a
10578 2011-08-03 Emmanuel Briot <briot@adacore.com>
10580 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
10581 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
10582 (Process_Declarative_Items): new parameter Child_Env.
10584 2011-08-03 Yannick Moy <moy@adacore.com>
10586 * alfa.ads: Update format of ALFA section in ALI file in order to
10587 add a mapping from bodies to specs when both are present.
10588 (ALFA_Scope_Record): Add components for spec file/scope.
10589 * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
10591 * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
10592 collected, fill in the spec information when relevant.
10593 * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
10596 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
10598 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
10599 code unit to decide whether to add internally generated subprograms.
10601 2011-08-03 Javier Miranda <miranda@adacore.com>
10603 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
10604 * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
10605 be handled by copy in VM targets.
10607 2011-08-03 Emmanuel Briot <briot@adacore.com>
10609 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
10610 code with Makeutl.Get_Switches.
10611 * prj-tree.adb: Update comment.
10613 2011-08-03 Thomas Quinot <quinot@adacore.com>
10615 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
10616 subprogram with a limited formal that does not support external
10619 2011-08-03 Yannick Moy <moy@adacore.com>
10621 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
10623 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
10624 not from current unit in two phases, because it is not possible to
10625 change the table while iterating over its content.
10626 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
10628 2011-08-03 Sergey Rybin <rybin@adacore.com>
10630 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
10631 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
10633 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10635 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
10636 and the component type is composite, this is ambiguous for predefined
10637 concatenation, but if the node is not overloaded and the entity is a use
10638 -defined function its profile can be used to resolve that aggregate.
10640 2011-08-03 Robert Dewar <dewar@adacore.com>
10642 * exp_ch4.adb: Minor code cleanup.
10644 2011-08-03 Thomas Quinot <quinot@adacore.com>
10646 * exp_dist.adb: Do not generate distribution stubs if serious errors
10647 have been diagnosed.
10649 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10651 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
10652 the first formal of a primitive operation, go to the base type to
10653 handle properly an access to a derived type with constrained
10655 * sem_type.adb (Disambiguate): an immediately visible operator hides a
10656 user-defined function that is only use-visible.
10658 2011-08-03 Robert Dewar <dewar@adacore.com>
10660 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
10661 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
10662 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
10663 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
10664 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
10665 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
10666 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
10667 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
10669 2011-08-03 Robert Dewar <dewar@adacore.com>
10671 * repinfo.adb (List_Mechanism): Add handling of
10672 Convention_Ada_Pass_By_XXX.
10673 * sem_mech.adb (Set_Mechanism): Ditto.
10674 * sem_prag.adb (Process_Convention): Add entries for
10675 Convention_Ada_Pass_By_XXX.
10676 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
10678 2011-08-03 Pascal Obry <obry@adacore.com>
10680 * makeutl.adb: Minor reformatting.
10682 2011-08-03 Vincent Celier <celier@adacore.com>
10685 (Get_File_Name) If the file cannot be found when there are no config
10686 pragmas file and May_Fail is True, return No_File instead of the file
10687 name, to be consistent.
10689 2011-08-03 Pascal Obry <obry@adacore.com>
10691 * adaint.c (__gnat_is_executable_file_attr): Avoid access
10694 2011-08-03 Javier Miranda <miranda@adacore.com>
10697 (Same_Representation): In VM targets the representation of arrays with
10698 aliased components differs from arrays with non-aliased components.
10700 2011-08-03 Emmanuel Briot <briot@adacore.com>
10702 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
10703 not systematically lower case attribute indexes that contain no "."
10704 Fix definition of several Naming attributes, which take
10705 a unit name as index and therefore should be case insensitive.
10706 Minor refactoring (reduce length of variable names).
10708 2011-08-03 Emmanuel Briot <briot@adacore.com>
10710 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
10712 2011-08-03 Emmanuel Briot <briot@adacore.com>
10714 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
10715 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
10716 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
10717 prj-tree.ads (Prj.Tree.Environment): new type.
10719 2011-08-03 Emmanuel Briot <briot@adacore.com>
10721 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
10722 prj-tree.adb, prj-tree.ads (Environment): new type.
10724 2011-08-03 Emmanuel Briot <briot@adacore.com>
10726 * prj-tree.ads: Remove unused variable.
10728 2011-08-03 Yannick Moy <moy@adacore.com>
10730 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
10731 issuing messages related to SPARK restriction violation.
10733 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10735 * sem_ch6.adb: guard against error nodes in return statements.
10737 2011-08-03 Arnaud Charlet <charlet@adacore.com>
10739 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
10740 a warning can only appear on a configuration file, so emit warning
10741 without further checks.
10743 2011-08-03 Arnaud Charlet <charlet@adacore.com>
10745 * s-interr.ads: add overriding keyword.
10747 2011-08-03 Geert Bosch <bosch@adacore.com>
10749 * exp_attr.adb: Fix minor typo.
10751 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10753 * par-ch4.adb: improve error recovery.
10755 2011-08-03 Emmanuel Briot <briot@adacore.com>
10757 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
10758 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
10759 to Errout_Handling.
10761 2011-08-03 Emmanuel Briot <briot@adacore.com>
10763 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
10764 "external" as an attribute name in aggregate projects.
10766 2011-08-03 Jose Ruiz <ruiz@adacore.com>
10768 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
10769 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
10770 from 0, so we need to adjust.
10772 2011-08-03 Emmanuel Briot <briot@adacore.com>
10774 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
10775 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
10777 2011-08-03 Yannick Moy <moy@adacore.com>
10779 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
10780 restriction on overloaded entity if the entity is not an operator.
10782 2011-08-03 Yannick Moy <moy@adacore.com>
10784 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
10785 restrict.ads: Rename remaining Check_Formal_Restriction* into
10786 Check_SPARK_Restriction*.
10788 2011-08-03 Emmanuel Briot <briot@adacore.com>
10790 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
10791 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
10793 (Project_Empty): removed
10794 (Empty_Project): new parameter Qualifier
10795 This is used to have fields specific to aggregate projects, cleaner
10796 New field to store the list of aggregated projects.
10797 (Check_Aggregate_Project): removed
10798 (Process_Aggregated_Projects, Free): new subprograms.
10800 2011-08-03 Olivier Hainque <hainque@adacore.com>
10802 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
10804 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10806 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
10807 explicit dereference of an unconstrained type, create a constrained
10808 subtype for it, as is done for function calls that return an
10809 unconstrained type.
10811 2011-08-03 Thomas Quinot <quinot@adacore.com>
10813 * g-pehage.adb (Finalize): Avoid possible double-free.
10815 2011-08-03 Steve Baird <baird@adacore.com>
10817 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
10818 Elab_Spec/Body attrs in CodePeer_Mode.
10820 2011-08-03 Javier Miranda <miranda@adacore.com>
10822 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
10823 low bound is not known at compile time but they have no others choice.
10824 Done because in this case the bounds can be obtained directly from the
10827 2011-08-03 Ed Falis <falis@adacore.com>
10829 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
10830 on VxWorks SMP. Remove unusable constant ANY_CPU.
10832 2011-08-03 Emmanuel Briot <briot@adacore.com>
10834 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
10835 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
10836 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
10837 Prj.Env.Initialize_Empty): new subprograms
10838 (Get_Env, Find_Project): remove parameter Target_Name.
10840 2011-08-03 Gary Dismukes <dismukes@adacore.com>
10842 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
10843 as a condition for the delayed call to Derived_Subprograms done for the
10844 case of the rewriting of a derived type that constrains the
10845 discriminants of its parent type.
10846 Avoids redundant subprogram derivations for private subtype derivations.
10848 2011-08-03 Javier Miranda <miranda@adacore.com>
10850 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
10851 Build_Record_Aggr_Code.
10852 (Build_Record_Aggr_Code): Add missing support to initialize hidden
10853 discriminants in extension aggregates.
10855 2011-08-03 Emmanuel Briot <briot@adacore.com>
10857 * prj-pp.adb (Print): also output project qualifiers, since in
10858 particular "aggregate" is mandatory in an aggregate project.
10860 2011-08-03 Emmanuel Briot <briot@adacore.com>
10862 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
10863 (Debug_Output): new function.
10865 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
10867 * gnat_ugn.texi: Document -Wstack-usage.
10868 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
10870 2011-08-03 Thomas Quinot <quinot@adacore.com>
10872 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
10873 have keyword LIMITED.
10875 2011-08-03 Yannick Moy <moy@adacore.com>
10877 * alfa.adb, alfa.ads, alfa_test.adb: New files.
10878 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
10879 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
10880 section (does not happen in compiler, only if code directly calls
10882 * get_alfa.adb, get_alfa.ads: New files.
10883 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
10885 * lib-xref-alfa.adb: New file.
10886 * lib-xref.adb, lib-xref.ads
10887 (Xref_Entry): redefine information needed in cross-references for ALFA.
10888 Push ALFA treatments in separated local package.
10889 (Enclosing_Subpragram_Or_Package): treat specially subprogram
10890 identifiers. Return entity of package body instead of spec. Return
10891 Empty for a scope with no location.
10892 (Generate_Reference): adapt to new components for ALFA information.
10893 Remove the need for D references on definitions.
10894 (Is_Local_Reference): moved to ALFA local package
10895 (Output_References): extract subfunction as Extract_Source_Name
10896 (Output_Local_References): remove procedure, replaced by filtering of
10897 cross-references in package ALFA and printing in Put_ALFA.
10898 (Write_Entity_Name): remove procedure
10899 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
10900 print exact name of entity as it appears in source file
10901 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
10902 * put_alfa.adb, put_alfa.ads: New files.
10903 * xref_lib.adb (Search_Xref): protect read of cross-references against
10904 reading other sections of the ALI file, in gnatxref
10905 (Search): protect read of cross-references against reading other
10906 sections of the ALI file, in gnatfind.
10907 * gcc-interface/Make-lang.in: Update dependencies.
10909 2011-08-03 Thomas Quinot <quinot@adacore.com>
10911 * sem_ch3.adb: Minor reformatting.
10913 2011-08-03 Jose Ruiz <ruiz@adacore.com>
10915 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
10916 raising an exception.
10918 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10920 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
10921 type, always use 1 as the lower bound or string, even if lower bound of
10922 context is not static, to handle properly null strings in a non-static
10925 2011-08-03 Bob Duff <duff@adacore.com>
10927 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
10928 always legal on the right-hand side of an assignment statement; there
10929 is always an applicable index constraint in this case. Therefore, the
10930 check for Pkind = N_Assignment_Statement is now unconditional -- it
10931 doesn't depend on whether Is_Constrained (Typ).
10933 2011-08-03 Robert Dewar <dewar@adacore.com>
10935 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
10937 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10939 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
10940 for an itype created within a generic unit.
10942 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
10944 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
10945 suppresses all inlining.
10947 2011-08-03 Robert Dewar <dewar@adacore.com>
10949 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
10950 exp_aggr.adb: Minor reformatting.
10952 2011-08-03 Thomas Quinot <quinot@adacore.com>
10954 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
10955 tagged assignment when discriminant checks are suppressed. This is
10956 useless and extremely costly in terms of static stack usage.
10958 2011-08-03 Bob Duff <duff@adacore.com>
10960 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
10961 of generics, because this leads to the wrong entity in the wrong scope,
10962 causing (e.g.) pragma Export_Procedure to get an error if the entity is
10964 (Process_Interface_Name): Follow Alias for instances of generics, to
10965 correct for the above change.
10967 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10969 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
10970 is an integer literal it is always safe to replace the reference. In
10971 addition, if the reference appears in the generated code for an object
10972 declaration it is necessary to copy because otherwise the reference
10973 might be to the uninitilized value of the discriminant of the object
10976 2011-08-03 Pascal Obry <obry@adacore.com>
10978 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
10979 ACL used, in this case we want to check for ending .exe, not .exe
10980 anywhere in the path.
10982 2011-08-03 Sergey Rybin <rybin@adacore.com>
10984 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
10985 the tree structure (semantic decoration of references to record
10988 2011-08-03 Gary Dismukes <dismukes@adacore.com>
10990 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
10991 choices of a named array aggregate, bail out when any choices are
10992 marked as Errors_Posted.
10994 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10996 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
10997 in which entity is frozen, to handle properly loop variables in
11000 2011-08-03 Ed Schonberg <schonberg@adacore.com>
11002 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
11003 subtype is not static, compute the upper bound using attributes, to
11004 handle properly index types that are not integer types.
11006 2011-08-03 Bob Duff <duff@adacore.com>
11008 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
11009 Update copyright notice.
11011 2011-08-03 Ed Schonberg <schonberg@adacore.com>
11013 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
11014 Original_Discriminant if within an instance.
11015 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
11017 2011-08-03 Thomas Quinot <quinot@adacore.com>
11019 * einfo.ads: Minor reformatting.
11021 2011-08-03 Ed Schonberg <schonberg@adacore.com>
11023 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
11024 composite type with an unfrozen subcomponent, in the profile of a
11025 primitive operation.
11027 2011-08-03 Robert Dewar <dewar@adacore.com>
11029 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
11031 2011-08-03 Ed Schonberg <schonberg@adacore.com>
11033 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
11034 unconstrained type with discriminants is initialized with an aggregate,
11035 use the constrained subtype of the aggregate as the type of the object,
11036 because it is immutable, and this allows the back-end to generate no
11037 code for the object declaration.
11039 2011-08-03 Robert Dewar <dewar@adacore.com>
11041 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
11042 comparison operand is variable, and turns out to be zero or negative.
11044 2011-08-03 Javier Miranda <miranda@adacore.com>
11047 (Expand_Dispatching_Constructor_Call): Disable expansion of
11048 code required for native targets. Done to avoid generating
11049 references to unavailable runtime entities in VM targets.
11051 (Expand_N_Object_Declaration): Add missing support to handle
11052 the explicit initialization of class-wide interface objects.
11055 2011-08-03 Matthew Heaney <heaney@adacore.com>
11057 * a-cobove.adb (Merge): Move source onto target, instead of using
11060 2011-08-03 Matthew Heaney <heaney@adacore.com>
11062 * a-cbdlli.adb (Splice): Move source items from first to last.
11064 2011-08-03 Yannick Moy <moy@adacore.com>
11066 * sem_util.ads: Add comment.
11068 2011-08-03 Javier Miranda <miranda@adacore.com>
11071 (Expand_Record_Aggregate): In VM targets disable the expansion into
11072 assignments of aggregates whose type is not known at compile time.
11074 2011-08-03 Ed Schonberg <schonberg@adacore.com>
11076 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
11077 protected entries and task entries, to build the proper renaming
11078 declaration for entry formals, used in debugging.
11079 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
11080 parameters in the same way.
11082 2011-08-02 Robert Dewar <dewar@adacore.com>
11084 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
11085 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
11086 code reorganization.
11088 2011-08-02 Robert Dewar <dewar@adacore.com>
11090 * debug.adb: Debug flag d.P to suppress length comparison optimization
11091 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
11092 comparison of Length by comparing First/Last instead.
11094 2011-08-02 Matthew Heaney <heaney@adacore.com>
11096 * a-cobove.ads: Code clean up.
11098 2011-08-02 Vincent Celier <celier@adacore.com>
11100 * adaint.c (file_names_case_sensitive_cache): New static int.
11101 (__gnat_get_file_names_case_sensitive): Cache the return value in
11102 file_names_case_sensitive_cache at the first invocation, to avoid
11103 multiple calls to getenv.
11105 2011-08-02 Bob Duff <duff@adacore.com>
11107 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
11109 2011-08-02 Yannick Moy <moy@adacore.com>
11111 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
11112 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
11113 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
11114 indicate that we are in a precondition or postcondition. This is used in
11115 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
11116 decide whether to flag the spec or body of the current subprogram as
11119 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
11121 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
11123 * a-extiin.ads: New file.
11125 2011-08-02 Bob Duff <duff@adacore.com>
11127 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
11128 now raises Name_Error instead of Use_Error in certain cases. The other
11129 parts of this AI were already implemented properly.
11131 2011-08-02 Vincent Celier <celier@adacore.com>
11133 * link.c: Only import "auto-host.h" when building the gnattools.
11135 2011-08-02 Yannick Moy <moy@adacore.com>
11137 * sem_util.adb: Inter-unit inlining does not work for a subprogram
11138 which calls a local subprogram, so extract subprogram
11139 from Mark_Non_ALFA_Subprogram_Body.
11141 2011-08-02 Javier Miranda <miranda@adacore.com>
11144 (Extract_Dispatching_Call): If the type of the dispatching object is an
11145 access type then return an explicit dereference in the Object out-mode
11148 2011-08-02 Gary Dismukes <dismukes@adacore.com>
11150 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
11151 compatibility checks for all indexes of an array subtype, not just the
11152 first. Reset Has_Dynamic_Range_Check on the subtype before each
11153 potential check to ensure that Insert_Range_Checks will not elide any
11154 of the dynamic checks.
11156 2011-08-02 Yannick Moy <moy@adacore.com>
11158 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
11159 SPARK restriction at parsing time.
11160 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
11161 directive only if the SPARK restriction is set for this unit.
11163 2011-08-02 Yannick Moy <moy@adacore.com>
11165 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
11166 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
11167 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
11168 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
11169 Mark_Non_ALFA_Subprogram_Body.
11170 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
11173 2011-08-02 Yannick Moy <moy@adacore.com>
11175 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
11178 2011-08-02 Robert Dewar <dewar@adacore.com>
11180 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
11181 exp_ch3.adb: Minor reformatting.
11183 2011-08-02 Emmanuel Briot <briot@adacore.com>
11185 * adaint.c (__gnat_locate_exec_on_path): only returns executable
11186 files, not any regular file.
11187 (__gnat_locate_file_with_predicate): new subprogram.
11189 2011-08-02 Yannick Moy <moy@adacore.com>
11191 * sinfo.adb, sinfo.ads: Restrict the use of flags
11192 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
11193 nodes, plus N_Subtype_Declaration for the 2nd one.
11195 2011-08-02 Sergey Rybin <rybin@adacore.com>
11197 * gnat_rm.texi: Ramification of pragma Eliminate documentation
11198 - fix bugs in the description of Source_Trace;
11199 - get rid of UNIT_NAME;
11201 2011-08-02 Javier Miranda <miranda@adacore.com>
11204 (Build_Dispatching_Requeue): Adding support for VM targets
11205 since we cannot directly reference the Tag entity.
11206 * exp_sel.adb (Build_K): Adding support for VM targets.
11207 (Build_S_Assignment): Adding support for VM targets.
11209 (Default_Prim_Op_Position): In VM targets do not restrict availability
11210 of predefined interface primitives to compiling in Ada 2005 mode.
11211 (Is_Predefined_Interface_Primitive): In VM targets this service is not
11212 restricted to compiling in Ada 2005 mode.
11213 (Make_VM_TSD): Generate code that declares and initializes the OSD
11214 record. Needed to support dispatching calls through synchronized
11217 (Make_Predefined_Primitive_Specs): Enable generation of predefined
11218 primitives associated with synchronized interfaces.
11219 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
11220 primitives associated with synchronized interfaces.
11222 2011-08-02 Yannick Moy <moy@adacore.com>
11224 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
11225 statements hidden in SPARK if preceded by the HIDE directive
11226 (Parse_Exception_Handlers): mark each exception handler in a sequence of
11227 exception handlers as hidden in SPARK if preceded by the HIDE directive
11228 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
11229 if starting with the HIDE directive
11230 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
11231 starting with the HIDE directive; mark the declarations in a private
11232 part as hidden in SPARK if the private part starts with the HIDE
11234 * restrict.adb, restrict.ads
11235 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
11236 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
11237 argument node belongs to a part which is hidden in SPARK
11238 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
11239 parts in SPARK; protect the possibly costly call to
11240 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
11241 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
11242 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
11243 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
11245 (Scan): recognize special comment starting with '#' and followed by
11246 SPARK keyword "hide" as a HIDE directive.
11248 2011-08-02 Yannick Moy <moy@adacore.com>
11250 * types.ads, erroutc.ads: Minor reformatting.
11252 2011-08-02 Vincent Celier <celier@adacore.com>
11254 * link.c: Add response file support for cross platforms.
11256 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11258 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
11259 in an association, set parent field of copy before partial analysis.
11260 * sem_res.adb (Resolve_Slice): create reference to itype only when
11261 expansion is enabled.
11263 2011-08-02 Yannick Moy <moy@adacore.com>
11265 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
11266 for new flag denoting which subprogram bodies are in ALFA
11267 * restrict.adb, sem_ch7.adb: Update comment
11268 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
11269 sem_ch9.adb, sem_res.adb: Add calls to
11270 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
11271 * sem_ch6.adb (Analyze_Function_Return): add calls to
11272 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
11273 middle of the body, and extended return.
11274 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
11275 False when missing return.
11276 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
11277 to True for subprograms whose spec is in ALFA. Remove later on the flag
11278 on the entity used for a subprogram body when there exists a separate
11280 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
11281 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
11282 False, otherwise do nothing.
11284 2011-08-02 Robert Dewar <dewar@adacore.com>
11286 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
11288 2011-08-02 Yannick Moy <moy@adacore.com>
11290 * sem_ch4.ads: minor formatting.
11292 2011-08-02 Yannick Moy <moy@adacore.com>
11294 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
11295 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
11296 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
11297 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
11298 opt.ads: cleanup of SPARK mode
11300 2011-08-02 Yannick Moy <moy@adacore.com>
11302 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
11304 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
11305 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
11307 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
11308 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
11309 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
11310 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
11312 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
11314 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
11315 functions whose return type is not in ALFA.
11316 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
11318 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
11319 parameter's type is not in ALFA.
11320 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
11323 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11325 * sem_ch6 (Analyze_Expression_Function): treat the function as
11326 Inline_Always, and introduce a subprogram declaration for it when it is
11328 * inline.adb (Add_Inlined_Body): recognize bodies that come from
11329 expression functions, so that the back-end can determine whether they
11330 can in fact be inlined.
11331 * sem_util.adb (Is_Expression_Function): predicate to determine whether
11332 a function body comes from an expression function.
11334 2011-08-02 Gary Dismukes <dismukes@adacore.com>
11336 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
11337 null exclusions to test Can_Never_Be_Null on the anonymous access types
11338 of the formals rather than testing the formals themselves. Exclude this
11339 check in cases where the Old_Formal is marked as a controlling formal,
11340 to avoid issuing spurious errors for bodies completing dispatching
11341 operations (due to the flag not getting set on controlling access
11342 formals in body specs).
11343 (Find_Corresponding_Spec): When checking full and subtype conformance of
11344 subprogram bodies in instances, pass Designated and E in that order, for
11345 consistency with the expected order of the formals (New_Id followed by
11348 2011-08-02 Robert Dewar <dewar@adacore.com>
11350 * sem_ch8.adb: Minor reformatting.
11352 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11354 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
11355 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
11356 primitive operations of class-wide actuals.
11358 2011-08-02 Javier Miranda <miranda@adacore.com>
11360 * exp_atag.ads, exp_atag.adb
11361 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
11362 since its value is implicitly passed in argument Typ.
11363 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
11364 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
11365 Build_Common_Dispatching_Select_Statements.
11367 2011-08-02 Robert Dewar <dewar@adacore.com>
11369 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
11370 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
11371 Minor reformatting.
11373 2011-08-02 Robert Dewar <dewar@adacore.com>
11375 * sem_res.adb: Minor reformatting.
11376 * sem_prag.adb: Minor reformatting.
11378 2011-08-02 Javier Miranda <miranda@adacore.com>
11380 * exp_atag.adb, exp_atags.ads
11381 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
11382 by the tagged type Entity. Required to use this routine in the VM
11383 targets since we do not have available the Tag entity in the VM
11386 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
11387 Ada.Tags has not been previously loaded.
11389 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
11390 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
11392 (Enclosing_Dynamic_Scope): Add missing support to handle the full
11393 view of enclosing scopes. Required to handle enclosing scopes that
11394 are synchronized types whose full view is a task type.
11396 (Build_VM_TSDs): Minor code improvement to avoid generating and
11397 analyzing lists with empty nodes.
11398 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
11399 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
11400 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
11401 (Make_Disp_Timed_Select_Body): Add support for VM targets.
11402 (Make_Select_Specific_Data_Table): Add support for VM targets.
11403 (Make_VM_TSD): Generate code to initialize the SSD structure of
11406 2011-08-02 Yannick Moy <moy@adacore.com>
11408 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
11409 cross-references section in ALI.
11410 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
11411 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
11413 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
11414 subprogram or package entity of a node
11415 (Is_Local_Reference_Type): new function returns True for references
11416 selected in local cross-references.
11417 (Lt): function extracted from Lt in Output_References
11418 (Write_Entity_Name): function extracted from Output_References
11419 (Generate_Definition): generate reference with type 'D' for definition
11420 of objects (object declaration and parameter specification), with
11421 appropriate locations and units, for use in local cross-references.
11422 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
11423 references of type 'I' for initialization in object definition.
11424 (Output_References): move part of function Lt and procedure
11425 Write_Entity_Name outside of the body. Ignore references of types 'D'
11426 and 'I' introduced for local cross-references.
11427 (Output_Local_References): new procedure to output the local
11428 cross-references sections.
11429 (Lref_Entity_Status): new array defining whether an entity is a local
11430 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
11431 with 'I' type when initialization expression is present.
11432 * get_scos.adb, get_scos.ads: Correct comments and typos
11434 2011-08-02 Javier Miranda <miranda@adacore.com>
11436 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
11438 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
11440 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
11443 2011-08-02 Vincent Celier <celier@adacore.com>
11445 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
11446 (No_Space_Img): New function
11447 (Find_Excluded_Sources): When reading from a file, record the file name
11448 and the line number for each excluded source.
11449 (Mark_Excluded_Sources): When reporting an error, if the excluded
11450 sources were read from a file, include file name and line number in
11453 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11455 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
11457 2011-08-02 Robert Dewar <dewar@adacore.com>
11459 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
11461 2011-08-02 Javier Miranda <miranda@adacore.com>
11463 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
11464 generation of TSDs to the DOTNET compiler.
11465 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
11466 generation of TSDs to the DOTNET compiler.
11468 2011-08-02 Javier Miranda <miranda@adacore.com>
11470 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
11471 record of all the tagged types declared inside library level package
11472 declarations, library level package bodies or library level subprograms.
11473 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
11474 associated with a given tagged type.
11475 (Build_VM_TSDs): New subprogram.
11476 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
11477 compilation units that are subprograms.
11478 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
11479 compilation units that are package bodies.
11480 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
11481 units that are a package declaration or a package instantiation.
11482 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
11483 reorganization to improve the error generated by the frontend when the
11484 function Ada.Tags.Secondary_Tag is not available.
11485 * rtsfind.ads (RE_Register_TSD): New runtime entity.
11486 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
11488 2011-08-02 Javier Miranda <miranda@adacore.com>
11490 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
11492 2011-08-02 Robert Dewar <dewar@adacore.com>
11494 * s-imenne.ads: Minor reformatting.
11496 2011-08-02 Robert Dewar <dewar@adacore.com>
11498 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
11499 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
11500 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
11502 2011-08-02 Robert Dewar <dewar@adacore.com>
11504 * einfo.ads (Materialize_Entity): Document this is only for renamings
11505 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
11506 required debug information in the case where we transform the object
11507 declaration into a renaming declaration.
11508 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
11510 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
11511 Materialize_Entity.
11513 2011-08-02 Robert Dewar <dewar@adacore.com>
11515 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
11516 Suppress_Init_Procs.
11517 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
11518 Suppress_Initialization/Initialization_Suppressed.
11519 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
11520 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
11521 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
11522 * sem_prag.adb: New processing for pragma Suppress_Initialization.
11524 2011-08-02 Robert Dewar <dewar@adacore.com>
11526 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
11527 Minor reformatting.
11529 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11531 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
11532 only have inheritable classwide pre/postconditions.
11534 2011-08-02 Javier Miranda <miranda@adacore.com>
11536 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
11537 * rtsfind.ads (RE_Check_TSD): New runtime entity.
11538 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
11539 checks if the external tag of a type is the same as the external tag
11540 of some other declaration.
11542 2011-08-02 Thomas Quinot <quinot@adacore.com>
11544 * s-taskin.ads: Minor reformatting.
11546 2011-08-02 Emmanuel Briot <briot@adacore.com>
11548 * g-comlin.adb (Display_Help): swap the order in which it prints the
11549 short help and the general usage.
11551 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11553 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
11554 the aspect declarations and attach them to the generic copy for
11555 subsequent analysis.
11556 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
11557 declarations of the generic tree to the new subprogram declarations.
11558 * sem_attr.adb (Check_Precondition_Postcondition): recognize
11559 conditions that apply to a subprogram instance.
11561 2011-08-02 Robert Dewar <dewar@adacore.com>
11563 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
11565 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11567 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
11568 private type with a tagged full view is not derived in the immediate
11569 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
11571 2011-08-02 Robert Dewar <dewar@adacore.com>
11573 * exp_ch4.adb: Minor reformatting.
11575 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11577 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
11578 Ada2012 iterator, the loop will be rewritten during expansion into a
11579 while loop with a cursor and an element declaration. Do not analyze the
11580 body in this case, because if the container is for indefinite types the
11581 actual subtype of the elements will only be determined when the cursor
11582 declaration is analyzed.
11584 2011-08-02 Arnaud Charlet <charlet@adacore.com>
11586 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
11587 size/alignment related attributes in CodePeer_Mode.
11589 2011-08-02 Gary Dismukes <dismukes@adacore.com>
11591 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
11592 Prepend_Element, since this can result in the operation getting the
11593 wrong slot in the full type's dispatch table if the full type has
11594 inherited operations. The incomplete type's operation will get added
11595 to the proper position in the full type's primitives
11596 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
11597 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
11598 dispatching operations, since there are cases where nonprimitive
11599 subprograms can get added to the list of incomplete dependents (such
11600 as subprograms in nested packages).
11601 * sem_ch6.adb (Process_Formals): First, remove test for being in a
11602 private part when determining whether to add a primitive with a
11603 parameter of a tagged incomplete type to the Private_Dependents list.
11604 Such primitives can also occur in the visible part, and should not have
11605 been excluded from being private dependents.
11606 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
11607 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
11608 list of a Taft-amendment incomplete type is a primitive before issuing
11609 an error that the full type must appear in the same unit. There are
11610 cases where nonprimitives can be in the list (such as subprograms in
11612 * sem_disp.adb (Derives_From): Use correct condition for checking that
11613 a formal's type is derived from the type of the corresponding formal in
11614 the parent subprogram (the condition was completely wrong). Add
11615 checking that was missing for controlling result types being derived
11616 from the result type of the parent operation.
11618 2011-08-02 Yannick Moy <moy@adacore.com>
11620 * errout.adb (First_Node): minor renaming
11621 * restrict.adb (Check_Formal_Restriction): put restriction warning on
11624 2011-08-02 Yannick Moy <moy@adacore.com>
11626 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
11627 before accessing operands.
11628 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
11629 decide whether an initialization expression respects SPARK rules, as
11630 the plain node is the expanded one. This allows for more valid warnings
11632 * gnat_rm.texi: Minor update.
11634 2011-08-02 Arnaud Charlet <charlet@adacore.com>
11636 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
11639 2011-08-02 Robert Dewar <dewar@adacore.com>
11641 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
11643 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
11645 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
11646 loop statements and the element renaming declaration with a block when
11647 the element type is controlled.
11649 2011-08-02 Yannick Moy <moy@adacore.com>
11651 * sinfo.ads: Minor formatting.
11653 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11655 * sem_aggr.adb (Add_Association): if the association has a box and no
11656 expression, use the Sloc of the aggregate itself for the new
11658 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
11661 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
11663 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
11664 When a container is provided via a function call, generate a renaming
11665 of the function result. This avoids the creation of a transient scope
11666 and the premature finalization of the container.
11667 * exp_ch7.adb (Is_Container_Cursor): Removed.
11668 (Wrap_Transient_Declaration): Remove the supression of the finalization
11669 of the list controller when the declaration denotes a container cursor,
11672 2011-08-02 Yannick Moy <moy@adacore.com>
11674 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
11675 node is from source, instead of the original node being from source.
11677 (Resolve_Array_Aggregate): refine the check for a static expression, to
11678 recognize also static ranges
11679 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
11680 Array_Type_Declaration): postpone the test for the type being a subtype
11681 mark after the type has been resolved, so that component-selection and
11682 expanded-name are discriminated.
11683 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
11684 to distinguish the case of an iteration scheme, so that an error is
11685 issed on a non-static range in SPARK except in an iteration scheme.
11686 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
11687 In_Iter_Schm = True.
11688 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
11689 user-defined operators so that they are allowed in renaming
11691 (Find_Selected_Component): refine the check for prefixing of operators
11692 so that they are allowed in renaming. Move the checks for restrictions
11693 on selector name after analysis discriminated between
11694 component-selection and expanded-name.
11695 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
11696 concatenation argument of string type if it is static.
11697 * sem_util.adb, sem_util.ads
11698 (Check_Later_Vs_Basic_Declarations): add a new function
11699 Is_Later_Declarative_Item to decice which declarations are allowed as
11700 later items, in the two different modes Ada 83 and SPARK. In the SPARK
11701 mode, add that renamings are considered as later items.
11702 (Enclosing_Package): new function to return the enclosing package
11703 (Enter_Name): correct the rule for homonyms in SPARK
11704 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
11705 from source (result of expansion) to avoid issuing wrong warnings.
11707 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11709 * errout.adb: On anything but an expression First_Node returns its
11712 2011-08-02 Pascal Obry <obry@adacore.com>
11714 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
11716 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
11718 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
11719 Set the associated loop as the related expression of internally
11721 * exp_ch7.adb (Is_Container_Cursor): New routine.
11722 (Wrap_Transient_Declaration): Supress the finalization of the list
11723 controller when the declaration denotes a container cursor.
11725 2011-08-02 Yannick Moy <moy@adacore.com>
11727 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
11729 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
11730 expression is a simple expression. This check cannot be performed in
11731 the semantics, so just drop it.
11732 (P_Index_Or_Discriminant_Constraint): move check that the index or
11733 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
11734 semantics. Other cases were previously checked in the semantics.
11735 * par-ch4.adb (P_Name): move checks that a selector name is not
11736 character literal or an operator symbol to Find_Selected_Component in
11738 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
11739 declarations are not placed after later declarations in a separate
11740 procedure in Sem_Util (possibly not the best choice?), to be used both
11741 during parsing, for Ada 83 mode, and during semantic analysis, for
11743 * par-endh.adb (Check_End): move check that end label is not missing
11744 to Process_End_Label in the semantics
11745 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
11746 the special case for SPARK restriction
11747 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
11748 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
11749 parameter Force to issue the error message even on internal node (used
11750 for generated end label). Call Check_Restriction to check when an error
11751 must be issued. In SPARK mode, issue an error message even if the
11752 restriction is not set.
11753 (Check_Restriction): new procedure with an additional out parameter to
11754 inform the caller that a message has been issued
11755 * sem_aggr.adb: Minor modification of message
11756 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
11757 instead of issuing an error message directly
11758 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
11759 declarations are not placed after later declarations, by calling
11760 Check_Later_Vs_Basic_Declarations
11761 (Analyze_Subtype_Declaration): move here the check that an index or
11762 discriminant constraint must be a subtype mark. Change the check that
11763 a subtype of String must start at one so that it works on subtype marks.
11764 * sem_ch4.adb (Analyze_Call): move here the check that a named
11765 association cannot follow a positional one in a call
11766 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
11767 instead of issuing an error message directly
11768 * sem_ch8.adb (Find_Selected_Component): move here the check that a
11769 selector name is not a character literal or an operator symbol. Move
11770 here the check that the prefix of an expanded name cannot be a
11771 subprogram or a loop statement.
11772 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
11773 procedure called from parsing and semantics to check that basic
11774 declarations are not placed after later declarations
11775 (Process_End_Label): move here the check that end label is not missing
11777 2011-08-02 Arnaud Charlet <charlet@adacore.com>
11779 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
11780 representation clause in codepeer mode, since it confuses CodePeer and
11781 does not bring useful info.
11783 2011-08-02 Ed Falis <falis@adacore.com>
11785 * init.c: initialize fp hw on MILS.
11787 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11789 * errout.adb (First_Node): for bodies, return the node itself (small
11790 optimization). For other nodes, do not check source_unit if the node
11791 comes from Standard.
11793 2011-08-02 Robert Dewar <dewar@adacore.com>
11795 * exp_ch3.adb: Minor comment additions.
11796 * sem_ch13.adb: Minor reformatting.
11798 2011-08-02 Pascal Obry <obry@adacore.com>
11800 * make.adb, makeutl.adb: Removes some superfluous directory separator.
11802 2011-08-02 Robert Dewar <dewar@adacore.com>
11804 * sem_attr.adb: Minor reformatting.
11806 2011-08-02 Robert Dewar <dewar@adacore.com>
11808 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
11809 (Has_Default_Component_Value): Removed
11810 * einfo.ads Comment updates
11811 (Has_Default_Aspect): Replaces Has_Default_Value
11812 (Has_Default_Component_Value): Removed
11814 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
11816 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
11817 (Get_Simple_Init_Val): Handle Default_Value aspect
11818 (Needs_Simple_Initialization): Handle Default_Value aspect
11819 * exp_ch3.ads: Needs_Simple_Initialization
11820 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
11821 * par-prag.adb (Pragma_Default[_Component]Value) Removed
11823 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
11824 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
11825 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
11827 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11829 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
11830 package containing iteration primitives.
11831 exp_ch5.adb (Expand_Iterator_Loop): ditto.
11833 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11835 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
11836 "of", pre-analyze expression in case it is a function call with
11837 finalization actions that must be placed ahead of the loop.
11838 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
11839 on an Ada2012 iterator, insert them ahead of the rewritten loop.
11841 2011-08-02 Geert Bosch <bosch@adacore.com>
11843 * cstand.adb (Create_Float_Types): Only consider C's long double for
11844 Long_Long_Float, in addition to double.
11846 2011-08-02 Robert Dewar <dewar@adacore.com>
11848 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
11849 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
11850 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
11851 Minor reformatting.
11853 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11855 * sem_attr.adb: handle properly 'Result when it is a prefix of an
11858 2011-08-02 Javier Miranda <miranda@adacore.com>
11860 * einfo.ads, einfo.adb
11861 (Original_Access_Type): Move this attribute to Node26 since there was
11862 an undocumented use of Node21 in E_Access_Subprogram_Type entities
11863 which causes conflicts and breaks the generation of the .NET compiler.
11864 (Interface_Name): Add missing documentation on JGNAT only uses of
11867 2011-08-02 Geert Bosch <bosch@adacore.com>
11869 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
11870 (Find_Back_End_Float_Type): Likewise
11871 (Create_Back_End_Float_Types): Likewise
11872 (Create_Float_Types): Likewise
11873 (Register_Float_Type): Likewise
11874 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
11875 Nlist and split out type selection in new local Find_Base_Type function.
11876 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
11878 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
11880 2011-08-02 Robert Dewar <dewar@adacore.com>
11882 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
11884 * opt.ads: Minor comment change.
11885 * sem_ch12.adb: Minor code reorganization.
11887 2011-08-02 Gary Dismukes <dismukes@adacore.com>
11889 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
11890 subtype's list of rep items to the list on the full subtype in the case
11891 where the lists are the same.
11893 2011-08-02 Geert Bosch <bosch@adacore.com>
11895 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
11896 using the one from System.Strings, which also deallocates all strings.
11898 2011-08-02 Geert Bosch <bosch@adacore.com>
11900 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
11902 * gcc-interface/Make-lang.in: Update dependencies.
11904 2011-08-02 Olivier Hainque <hainque@adacore.com>
11906 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
11909 2011-08-02 Javier Miranda <miranda@adacore.com>
11911 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
11912 associated with anonymous access to subprograms.
11914 2011-08-02 Geert Bosch <bosch@adacore.com>
11917 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
11918 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
11919 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
11920 (Add_Symbol_Definition): Move to switch-c.adb
11921 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
11922 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
11923 (Add_Symbol_Definition): Move to switch-c.adb.
11924 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
11926 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
11927 Move to warnsw.adb.
11928 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
11929 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
11930 Move to warnsw.adb.
11931 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
11932 (Add_Symbol_Definition): Moved from Prepcomp.
11933 * switch-c.ads: Update copyright notice. Use String_List instead of
11934 Argument_List, removing dependency on System.OS_Lib.
11936 2011-08-02 Yannick Moy <moy@adacore.com>
11938 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
11939 mode on initialization expression which does not respect SPARK
11941 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
11942 if the tree referenced by its argument represents an initialization
11943 expression in SPARK, suitable for initializing an object in an object
11946 2011-08-02 Javier Miranda <miranda@adacore.com>
11948 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
11949 internally generated access to subprogram with its associated protected
11951 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
11953 2011-08-02 Geert Bosch <bosch@adacore.com>
11955 * cstand.adb (Register_Float_Type): Print information about type to
11956 register, if the Debug_Flag_Dot_B is set.
11957 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
11958 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
11959 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
11960 with a requested precision of more than Max_Digits digits and no more
11961 than Max_Base_Digits digits, if a range specification is present and the
11962 Predefined_Float_Types list has a suitable type to derive from.
11963 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
11964 case of type completion with pragma Import
11966 (Process_Import_Predefined_Type): Processing to complete a type
11967 with pragma Import. Currently supports floating point types only.
11968 (Set_Convention_From_Pragma): Do nothing without underlying type.
11969 (Process_Convention): Guard against absence of underlying type,
11970 which may happen when importing incomplete types.
11971 (Process_Import_Or_Interface): Handle case of importing predefined
11972 types. Tweak error message.
11974 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11976 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
11977 functions to previous change. Reorganize code slightly.
11979 2011-08-02 Geert Bosch <bosch@adacore.com>
11981 * back_end.ads (Register_Type_Proc): New call back procedure type for
11982 allowing the back end to provide information about available types.
11983 (Register_Back_End_Types): New procedure to register back end types.
11984 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
11986 * cstand.adb (Back_End_Float_Types): New list for floating point types
11987 supported by the back end.
11988 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
11989 (Copy_Float_Type): New procedure to make new copies of predefined types.
11990 (Register_Float_Type): New call back procedure to populate the BEFT list
11991 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
11992 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
11993 (Create_Float_Types): New procedure to create entities for floating
11994 point types predefined in Standard, and put these and any remaining
11995 BEFTs on the Predefined_Float_Types list.
11996 * stand.ads (Predefined_Float_Types): New list for predefined floating
11997 point types that do not have declarations in package Standard.
11999 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12001 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
12002 entity node for the unit containing the parameter.
12003 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
12004 (Add_Inlined_Subprogram): Likewise.
12005 * gcc-interface/Make-lang.in: Update dependencies.
12007 2011-08-02 Thomas Quinot <quinot@adacore.com>
12009 * s-stusta.adb (Print): Make sure Pos is always initialized to a
12012 2011-08-02 Geert Bosch <bosch@adacore.com>
12014 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
12016 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12018 * sem_type.adb (Covers): Move trivial case to the top and reuse the
12019 computed value of Base_Type.
12021 2011-08-02 Yannick Moy <moy@adacore.com>
12023 * restrict.adb (Check_Restriction): issue an error for any use of
12024 class-wide, even if the No_Dispatch restriction is not set.
12025 * sem_aggr.adb: Correct typos in comments and messages in formal mode
12026 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
12027 when completing a private extension, the type named in the private part
12028 is not the same as that named in the visible part.
12029 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
12030 of an inherited primitive operations of a tagged type or type extension
12031 that returns the tagged type.
12032 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
12033 function which returns True for an implicit operation inherited by the
12034 derived type declaration for the argument type.
12035 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
12038 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12040 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
12041 Process_Bounds, to perform analysis with expansion of a range or an
12042 expression that is the iteration scheme for a loop.
12043 (Analyze_Iterator_Specification): If domain of iteration is given by a
12044 function call with a controlled result, as is the case if call returns
12045 a predefined container, ensure that finalization actions are properly
12047 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
12049 2011-08-02 Javier Miranda <miranda@adacore.com>
12051 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
12052 * gcc-interface/Make-lang.in: Update dependencies.
12054 2011-08-02 Javier Miranda <miranda@adacore.com>
12056 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
12057 determine if the analysis is performed using N or Original_Node (N).
12058 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
12059 functionality of routine Is_Variable avoids code duplication.
12060 * checks.adb (Determine_Range): Handle temporaries generated by
12061 Remove_Side_Effects.
12063 2011-08-02 Javier Miranda <miranda@adacore.com>
12065 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
12066 expansion of the condition. Required since the previous analysis was
12067 done with expansion disabled (see Resolve_Quantified_Expression) and
12068 hence checks were not inserted and record comparisons have not been
12071 2011-08-02 Ed Falis <falis@adacore.com>
12073 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
12076 2011-08-02 Bob Duff <duff@adacore.com>
12078 * opt.ads: Minor comment fix.
12080 2011-08-02 Bob Duff <duff@adacore.com>
12082 * sem_ch12.adb (Analyze_Package_Instantiation,
12083 Analyze_Subprogram_Instantiation): Turn off style checking while
12084 analyzing an instance. Whatever style checks that apply to the generic
12085 unit should apply, so it makes no sense to apply them in an instance.
12086 This was causing trouble when compiling an instance of a runtime
12087 unit that violates the -gnatyO switch.
12088 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
12089 one of the two case statements, causing spurious errors.
12091 2011-08-02 Robert Dewar <dewar@adacore.com>
12093 * uname.adb: Minor reformatting.
12094 * gnatcmd.adb: Minor reformatting.
12095 * exp_attr.adb: Minor reformatting.
12097 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12099 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
12100 No_Dispatching_Calls, do not look for the Assign primitive, because
12101 predefined primitives are not created in this case.
12103 2011-08-02 Bob Duff <duff@adacore.com>
12105 * stylesw.ads: Minor comment fixes.
12107 2011-08-02 Robert Dewar <dewar@adacore.com>
12109 * freeze.adb (Add_To_Result): New procedure.
12111 2011-08-02 Jose Ruiz <ruiz@adacore.com>
12113 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
12114 time, if the specific run-time routines for handling streams of strings
12115 are not available, use the default mechanism.
12117 2011-08-02 Arnaud Charlet <charlet@adacore.com>
12119 * s-regpat.ads: Fix typo.
12121 2011-08-02 Vincent Celier <celier@adacore.com>
12123 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
12124 not null, call it to create the in memory config project file without
12125 parsing an existing default config project file.
12127 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12129 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
12131 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12133 * sem_elim.adb: an abstract subprogram does not need an eliminate
12134 pragma for its descendant to be eliminable.
12136 2011-08-02 Ed Falis <falis@adacore.com>
12138 * init.c: revert to handling before previous checkin for VxWorks
12139 * s-intman-vxworks.adb: delete unnecessary declarations related to
12140 using Ada interrupt facilities for handling signals.
12141 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
12142 * s-intman-vxworks.ads: Import __gnat_install_handler as
12143 Initialize_Interrupts.
12144 * s-taprop-vxworks.adb: Delete Signal_Mask.
12145 (Abort_Handler): change construction of mask to unblock exception
12148 2011-08-02 Jerome Guitton <guitton@adacore.com>
12150 * a-except-2005.adb (Raise_From_Signal_Handler): Call
12151 Debug_Raise_Exception before propagation starts.
12153 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12155 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
12156 to Restriction_Check_Required.
12157 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
12158 * sem_res.adb (Resolve_Call): Likewise.
12159 * sem_attr.adb (Check_Stream_Attribute): Likewise.
12161 2011-08-02 Bob Duff <duff@adacore.com>
12163 * stylesw.ads: Update comment.
12164 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
12165 * errout.ads: Remove obsolete comment.
12167 2011-08-02 Javier Miranda <miranda@adacore.com>
12169 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
12170 (Set_Is_Safe_To_Reevaluate): new procedure.
12171 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
12172 assignment is allowed on safe-to-reevaluate variables.
12173 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
12174 temporary created to remove side effects in expressions that use
12175 the secondary stack as safe-to-reevaluate.
12176 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
12177 variables that are not true constants.
12179 2011-08-02 Robert Dewar <dewar@adacore.com>
12181 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
12182 sem_res.adb, sem_ch6.adb: Minor reformatting.
12184 2011-08-02 Jerome Guitton <guitton@adacore.com>
12186 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
12188 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12190 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
12191 not set Overridden_Operation if subprogram is an initialization
12194 2011-08-02 Yannick Moy <moy@adacore.com>
12196 * par-ch6.adb: Correct obsolete name in comments
12197 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
12198 which takes two message arguments (existing function takes one), with
12199 second message used for continuation.
12200 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
12201 block statements that originate from a source block statement, not
12202 generated block statements
12203 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
12204 symmetry with procedure case
12205 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
12206 function to issue an error in formal mode if a package specification
12207 contains more than one tagged type or type extension.
12208 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
12209 parameters matching formals of tagged types are objects (or ancestor
12210 type conversions of objects), not general expressions. Issue an error
12211 on view conversions that are not involving ancestor conversion of an
12213 (Resolve_Type_Conversion): in formal mode, issue an error on the
12214 operand of an ancestor type conversion which is not an object
12215 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
12216 procedure so that it works also for actuals of function calls
12217 (Is_Actual_Tagged_Parameter): new function which determines if its
12218 argument is an actual parameter of a formal of tagged type in a
12220 (Is_SPARK_Object_Reference): new function which determines if the tree
12221 referenced by its argument represents an object in SPARK
12223 2011-08-02 Robert Dewar <dewar@adacore.com>
12225 * sem_ch3.adb: Minor reformatting
12226 Minor comment addition
12227 Minor error msg text change
12229 2011-08-02 Javier Miranda <miranda@adacore.com>
12231 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
12232 function. Used to be more precise when we generate a variable plus one
12233 assignment to remove side effects in the evaluation of the Bound
12235 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
12236 of the bound expression to force its re-analysis and thus expand the
12237 associated transient scope (if required). Code cleanup replacing the
12238 previous code that declared the constant entity by an invocation to
12239 routine Force_Evaluation which centralizes this work in the frontend.
12241 2011-08-02 Robert Dewar <dewar@adacore.com>
12243 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
12244 (Base_Type): Now uses improved Is_Base_Type function
12245 * einfo.ads (Base_Type): Inline this function
12247 2011-08-02 Robert Dewar <dewar@adacore.com>
12249 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
12250 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
12252 2011-08-02 Arnaud Charlet <charlet@adacore.com>
12254 * gcc-interface/Make-lang.in: Update dependencies.
12255 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
12258 2011-08-02 Yannick Moy <moy@adacore.com>
12260 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
12261 non-simple expression used in delta constraint
12262 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
12263 index constraint which is not a subtype mark
12264 * par.adb: With and use Restrict
12265 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
12266 mode on component type which is not a subtype mark and default
12267 expression on component
12268 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
12269 of string which does not have a lower index bound equal to 1
12270 (Array_Type_Declaration): issue an error in formal mode on index or
12271 component type which is not a subtype mark, and on aliased keyword on
12273 (Derived_Type_Declaration): issue an error in formal mode on interface,
12274 limited or abstract type
12275 (Record_Type_Declaration): issue an error in formal mode on interface
12276 (Record_Type_Definition): issue an error in formal mode on tagged types
12277 and type extensions not declared in the specification of a library unit
12278 package; on null non-tagged record; on variant part
12280 2011-08-02 Vincent Celier <celier@adacore.com>
12282 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
12283 not declared for qualified library project when Library_Name is not
12284 declared, but Library_Dir is.
12286 2011-08-02 Robert Dewar <dewar@adacore.com>
12288 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
12289 pragmas (affects aspects [Component_]Default_Value
12290 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
12291 component type for the resolution
12293 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12295 * einfo.adb (Base_Type): Tune implementation for speed.
12297 2011-08-02 Robert Dewar <dewar@adacore.com>
12299 * freeze.adb: Minor reformatting.
12301 2011-08-02 Thomas Quinot <quinot@adacore.com>
12303 * scos.ads: Update comments.
12305 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12307 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
12308 base type, because the parent may be a subtype of a private type whose
12309 convention is established in a private part.
12311 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
12313 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
12314 statement in a block when the expansion of the return expression has
12315 created a finalization chain.
12316 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
12317 with the parent node.
12318 Add N_Extended_Return_Statement to handle the case where a transient
12319 object declaration appears in the Return_Object_Declarations list of
12320 an extended return statement.
12322 2011-08-02 Matthew Gingell <gingell@adacore.com>
12324 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
12325 unused parameter 'name'.
12327 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12329 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
12330 inherited operation, check whether its alias, which is the source
12331 operastion that it renames, has been marked eliminated.
12333 2011-08-02 Javier Miranda <miranda@adacore.com>
12335 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
12336 in-mode parameter whose type is an access type since it can be used to
12337 modify its designated object. Enforce code that handles as safe an
12338 access type that is not access-to-constant but it is the result of a
12339 previous removal of side-effects.
12340 (Remove_Side_Effects): Minor code reorganization of cases which require
12341 no action. Done to incorporate documentation on new cases uncovered
12342 working in this ticket: no action needed if this routine was invoked
12343 too early and the nodes are not yet decorated.
12344 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
12345 to routine Remove_Side_Effects by calls to Force_Evaluation since they
12346 were issued with actuals that are implicitly provided by
12349 2011-08-02 Robert Dewar <dewar@adacore.com>
12351 * sem_ch3.adb, sem_res.adb: Minor reformatting.
12353 2011-08-02 Yannick Moy <moy@adacore.com>
12355 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
12356 to issue an error in formal mode on attribute not supported in this mode
12357 (Analyze_Attribute): issue errors on standard attributes not supported
12359 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
12360 comment, and issue error in formal mode on modulus which is not a power
12362 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
12364 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
12366 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
12367 operator on modular type (except 'not').
12369 2011-08-02 Robert Dewar <dewar@adacore.com>
12371 * gnat_rm.texi: Minor reformatting.
12373 2011-08-02 Arnaud Charlet <charlet@adacore.com>
12375 * s-osinte-linux.ads: Minor comment update and reformatting.
12376 * i-cexten.ads: Make this unit pure, as for its parent.
12377 Will allow its usage in more contexts if needed.
12379 2011-08-02 Robert Dewar <dewar@adacore.com>
12381 * s-utf_32.ads: Minor comment fix.
12383 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12385 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
12386 operation of a tagged synchronized type, handle the case where the
12387 controlling argument is overloaded.
12389 2011-08-02 Yannick Moy <moy@adacore.com>
12391 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
12392 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
12393 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
12394 SPARK mode and formal verification mode on processing SPARK restriction
12395 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
12396 requiring consistency checking.
12398 2011-08-02 Robert Dewar <dewar@adacore.com>
12400 * sem_res.adb: Minor reformatting.
12402 2011-08-02 Robert Dewar <dewar@adacore.com>
12404 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
12405 a-cforse.ads: Remove unneeded with of Ada.Containers
12406 Remove commented out pragma Inline's
12407 Move specifications of new subprograms to the actual specs
12409 2011-08-02 Yannick Moy <moy@adacore.com>
12411 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
12412 a-cforse.ads: Update comments.
12414 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12416 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
12418 2011-08-02 Robert Dewar <dewar@adacore.com>
12420 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
12421 a-cforse.ads, a-cofove.ads: Minor reformatting.
12423 2011-08-02 Claire Dross <dross@adacore.com>
12425 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
12426 a-cofove.ads: Add comments.
12428 2011-08-02 Yannick Moy <moy@adacore.com>
12430 * gnat_rm.texi: Document formal containers.
12432 2011-08-02 Emmanuel Briot <briot@adacore.com>
12434 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
12435 are empty sections.
12437 2011-08-02 Robert Dewar <dewar@adacore.com>
12439 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
12442 2011-08-02 Robert Dewar <dewar@adacore.com>
12444 * aspects.adb: New aspects Default_Value and Default_Component_Value
12445 New format of Aspect_Names table checks for omitted entries
12446 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
12447 handling of boolean aspects for derived types.
12448 New aspects Default_Value and Default_Component_Value
12449 New format of Aspect_Names table checks for omitted entries
12450 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
12451 (Has_Default_Value): New flag
12452 (Has_Default_Component_Value): New flag
12453 (Has_Default_Value): New flag
12454 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
12456 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
12457 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
12458 Default_Value and Default_Component_Value
12459 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
12460 New aspects Default_Value and Default_Component_Value
12461 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
12462 * sprint.adb: Print N_Aspect_Specification node when called from gdb
12464 2011-08-02 Vincent Celier <celier@adacore.com>
12466 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
12467 inherit library kind.
12469 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12471 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
12472 Minor reformatting.
12474 2011-08-02 Robert Dewar <dewar@adacore.com>
12476 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
12478 2011-08-02 Yannick Moy <moy@adacore.com>
12480 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
12482 2011-08-02 Robert Dewar <dewar@adacore.com>
12484 * impunit.adb: Add comment.
12486 2011-08-02 Yannick Moy <moy@adacore.com>
12488 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
12489 qualification of aggregates in formal mode
12490 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
12492 (Resolve_Aggregate): complete the test that an aggregate is adequately
12493 qualified in formal mode
12495 2011-08-02 Pascal Obry <obry@adacore.com>
12497 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
12498 * mlib-prj.adb: Supress warning when compiling binder generated file.
12499 (Build_Library): Supress all warnings when compiling the binder
12502 2011-08-02 Yannick Moy <moy@adacore.com>
12504 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
12506 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
12507 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
12508 Add with/use clauses to make Check_Formal_Restriction visible
12510 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12512 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
12513 in-parameters when type of the generic formal is private in the generic
12514 spec and non-private in the body.
12516 2011-08-02 Claire Dross <dross@adacore.com>
12518 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
12519 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
12520 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
12521 * impunit.adb, Makefile.rtl: Take new files into account.
12523 2011-08-02 Robert Dewar <dewar@adacore.com>
12525 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
12526 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
12528 2011-08-02 Yannick Moy <moy@adacore.com>
12530 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
12532 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
12533 matching static array bounds, taking into account the special case of
12535 * sem_ch3.adb: Typo in comment.
12537 2011-08-02 Yannick Moy <moy@adacore.com>
12539 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
12540 which issues an error in formal mode if its argument node is originally
12542 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
12543 has a discriminant specification so that it does not include the case
12545 (Derived_Type_Declaration): move here the test that a derived type has a
12546 discriminant specification
12547 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
12548 first element of a component association before accessing its choices
12549 (presence of component association is not enough)
12550 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
12551 declaration is a library item before accessing the next element in a
12552 list, as library items are not member of lists
12553 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
12554 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
12555 Check_Formal_Restriction whenever possible.
12557 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12559 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
12560 reference when needed.
12562 2011-08-02 Bob Duff <duff@adacore.com>
12564 * gnat_ugn.texi: Fix typo.
12566 2011-08-02 Vincent Celier <celier@adacore.com>
12568 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
12569 archive file name. Do not use the full path name of archives for Open
12572 2011-08-02 Robert Dewar <dewar@adacore.com>
12574 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
12575 Analyze_Aspect_Specifications
12577 (Analyze_Aspect_Specifications): New handling for boolean aspects
12578 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
12579 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
12580 sequence for Analyze_Aspect_Specifications
12581 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
12582 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
12584 2011-08-02 Robert Dewar <dewar@adacore.com>
12586 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
12587 aspects, since these no longer exist.
12589 2011-08-02 Robert Dewar <dewar@adacore.com>
12591 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
12592 semicolon, do not try to see if there are aspects following it.
12593 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
12596 2011-08-02 Robert Dewar <dewar@adacore.com>
12598 * sem_ch8.adb, aspects.ads: Minor reformatting.
12600 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12602 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
12603 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
12605 (Analyze_Aspect_Specifications): ...here. Call above procedure.
12607 2011-08-02 Yannick Moy <moy@adacore.com>
12609 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
12610 mode on subprogram declaration outside of package specification, unless
12611 it is followed by a pragma Import
12612 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
12613 Access_Type_Declaration): issue error in formal mode on access type
12614 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
12616 (Analyze_Object_Declaration): issue error in formal mode on object
12617 declaration which does not respect SPARK restrictions
12618 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
12619 declaration which does not respect SPARK restrictions
12620 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
12621 error in formal mode on digits or delta constraint
12622 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
12623 decimal fixed point type
12624 (Derived_Type_Declaration): issue error in formal mode on derived type
12625 other than type extensions of tagged record types
12626 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
12627 with check on access definition
12628 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
12629 mode on protected definition.
12630 (Analyze_Task_Definition): issue error in formal mode on task definition
12632 2011-08-02 Robert Dewar <dewar@adacore.com>
12634 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
12636 2011-08-02 Javier Miranda <miranda@adacore.com>
12638 * sem_ch6.adb (Can_Override_Operator): New function.
12639 (Verify_Overriding_Indicator): Add missing code to check overriding
12640 indicator in operators. Fixes regression.
12641 (Check_Overriding_Indicator): Minor reformating after replacing the
12642 code that evaluates if the subprogram can override an operator by
12643 invocations to the above new function.
12645 (Write_Field26_Name): Add missing code to ensure that, following
12646 the documentation in einfo.ads, this field is not shown as attribute
12647 "Static_Initialization" on non-dispatching functions.
12649 2011-08-02 Jose Ruiz <ruiz@adacore.com>
12651 * sem_res.adb (Resolve_Call): A call to
12652 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
12653 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
12654 i.e., when the second parameter is of type Time_Span.
12656 2011-08-02 Vincent Celier <celier@adacore.com>
12658 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
12659 with an archive instead of -L<library dir> -l<library name>.
12661 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12663 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
12664 mark the base types In_Use in addition to making the operations
12667 2011-08-02 Ed Falis <falis@adacore.com>
12669 * init.c: add and setup __gnat_signal_mask for the exception signals
12670 * s-inmaop-vxworks.adb: new file.
12671 * s-intman-vxworks.adb: remove unnecessary initializations and
12673 * s-intman-vxworks.ads: remove unnecessary variable
12674 * s-taprop-vxworks.adb: simplify signal initialization
12676 2011-08-02 Robert Dewar <dewar@adacore.com>
12678 * sem_ch8.adb: Minor code reorganization, comment updates.
12680 2011-08-02 Robert Dewar <dewar@adacore.com>
12682 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
12683 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
12685 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
12686 (Matching_Static_Array_Bounds): Moved here from Sem_Res
12688 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12690 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
12691 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
12692 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
12693 use_type_clauses, to handle more efficiently use_type and use_all_type
12695 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
12696 Ada2012 Use_All_Type clause.
12697 (Use_Class_Wide_Operations): new procedure.
12699 2011-08-02 Robert Dewar <dewar@adacore.com>
12701 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
12702 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
12703 expression to expression function.
12705 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12707 * sem_ch4.adb: transform simple Ada2012 membership into equality only
12708 if types are compatible.
12710 2011-08-02 Yannick Moy <moy@adacore.com>
12712 * sem_res.adb (Matching_Static_Array_Bounds): new function which
12713 returns True if its argument array types have same dimension and same
12714 static bounds at each index.
12715 (Resolve_Actuals): issue an error in formal mode on actuals passed as
12716 OUT or IN OUT paramaters which are not view conversions in SPARK.
12717 (Resolve_Arithmetic_Op): issue an error in formal mode on
12718 multiplication or division with operands of fixed point types which are
12719 not qualified or explicitly converted.
12720 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
12721 Boolean or array type (except String) operands.
12722 (Resolve_Equality_Op): issue an error in formal mode on equality
12723 operators for array types other than String with non-matching static
12725 (Resolve_Logical_Op): issue an error in formal mode on logical operators
12726 for array types with non-matching static bounds. Factorize the code in
12727 Matching_Static_Array_Bounds.
12728 (Resolve_Qualified_Expression): issue an error in formal mode on
12729 qualified expressions for array types with non-matching static bounds.
12730 (Resolve_Type_Conversion): issue an error in formal mode on type
12731 conversion for array types with non-matching static bounds
12733 2011-08-02 Robert Dewar <dewar@adacore.com>
12735 * par-ch10.adb: Minor code reorganization (use Nkind_In).
12737 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12739 * par-ch9.adb: save location of entry for proper error message.
12741 2011-08-02 Javier Miranda <miranda@adacore.com>
12743 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
12744 (Use_Full_View) which permits this routine to climb through the
12745 ancestors using the full-view of private parents.
12746 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
12747 Use_Full_View to true in calls to Is_Ancestor.
12748 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
12749 true in call to Is_Ancestor.
12750 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
12751 Use_Full_View to true in call to Is_Ancestor.
12752 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
12753 call to Is_Ancestor.
12754 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
12755 Use_Full_View to true in calls to Is_Ancestor.
12756 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
12757 Make_Select_Specific_Data_Table, Register_Primitive,
12758 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
12759 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
12760 to true in call to Is_Ancestor.
12761 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
12762 Use_Full_View to true in calls to Is_Ancestor.
12764 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
12765 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
12767 2011-08-02 Robert Dewar <dewar@adacore.com>
12769 * gnat_rm.texi: Minor reformatting.
12770 * sem_prag.adb: Minor reformatting.
12772 2011-08-02 Tristan Gingold <gingold@adacore.com>
12774 * vms_data.ads: Add VMS qualifier for -gnateP.
12776 2011-08-02 Robert Dewar <dewar@adacore.com>
12778 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
12779 * par-ch7.adb (P_Package): Proper placement of aspects for package
12780 decl/instantiation.
12781 * par-endh.adb (Check_End): Ad Is_Sloc parameter
12782 (End_Statements): Add Is_Sloc parameterr
12783 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
12784 (Check_End): Ad Is_Sloc parameter
12785 (End_Statements): Add Is_Sloc parameterr
12787 2011-08-02 Vincent Celier <celier@adacore.com>
12789 * ug_words: Add VMS qualifier equivalent to -gnateP:
12790 /SYMBOL_PREPROCESSING.
12792 2011-08-02 Jose Ruiz <ruiz@adacore.com>
12794 * gnat-style.texi: For hexadecimal numeric literals the typical
12795 grouping of digits is 4 to represent 2 bytes.
12796 A procedure spec which is split into several lines is indented two
12799 2011-08-02 Yannick Moy <moy@adacore.com>
12801 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
12802 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
12803 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
12805 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
12806 choice in array aggregate
12807 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
12809 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
12810 positional and named aggregate for record, or others in record
12811 aggregate, or multiple choice in record aggregate
12812 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
12813 array operands to logical operations AND, OR and XOR do not have the
12814 same static lower and higher bounds
12815 * sem_ch5.adb, sinfo.ads: Correct typos in comments
12817 2011-08-01 Robert Dewar <dewar@adacore.com>
12819 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
12820 Replaces Last_Source_Node_In_Sequence.
12821 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
12822 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
12823 parens and blank in string (this was inconsistently implemented).
12825 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
12826 blank in string (this was inconsistently implemented).
12828 (Set_Global_Switches): Set formal mode switches appropriately
12829 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
12831 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
12832 call Set_Error_Msg_Lang to set "spark" as language name.
12833 * par.adb: Remove unnecessary call to set formal language for errout
12834 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
12835 appropriately and call Set_Error_Msg_Lang to set "spark" as language
12837 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
12838 calls to it, moved after resolution so that types are known
12839 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
12840 result of concatenation is not of type String
12841 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
12842 concatenation is not properly restricted
12843 * gnat_rm.texi: Add doc on pragma Spark_95.
12844 * gcc-interface/Makefile.in: Remove obsolete target pairs for
12845 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
12846 * gcc-interface/Make-lang.in: Update dependencies.
12848 2011-08-01 Javier Miranda <miranda@adacore.com>
12850 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
12851 condition that detects if the overridden operation must replace an
12854 2011-08-01 Javier Miranda <miranda@adacore.com>
12856 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
12857 code declarations inserted by Insert_Actions in each alternative of the
12858 N_Case_Expression node.
12860 2011-08-01 Robert Dewar <dewar@adacore.com>
12862 * sem_ch6.adb: Minor code reorganization.
12863 * sem_util.adb: Minor reformatting.
12865 2011-08-01 Pascal Obry <obry@adacore.com>
12867 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
12868 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
12870 2011-08-01 Yannick Moy <moy@adacore.com>
12872 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
12873 literal or operator symbol which is prefixed
12874 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
12875 mode on access attributes.
12876 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
12877 that concatenation operands are properly restricted in formal mode
12878 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
12879 Analyze_Concatenation_Operand. Issue an error in formal mode if the
12880 result of the concatenation has a type different from String.
12881 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
12882 Analyze_Quantified_Expression, Analyze_Slice,
12883 Analyze_Null): issue an error in formal mode on unsupported constructs
12885 (Analyze_Block_Statement): only issue error on source block statement
12886 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
12887 function which returns the last node in a list of nodes for which
12888 Comes_From_Source returns True, if any
12889 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
12890 Last_Source_Node_In_Sequence
12891 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
12892 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
12893 mode on unsupported constructs
12894 * sem_ch9.adb Do not return after issuing error in formal mode, as the
12895 rest of the actions may be needed later on since the error is marked as
12897 * sinfo.ads: Typos in comments.
12899 2011-08-01 Pascal Obry <obry@adacore.com>
12901 * projects.texi: Minor editing.
12903 2011-08-01 Yannick Moy <moy@adacore.com>
12905 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
12906 insertion character ~~
12907 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
12908 (Set_Error_Msg_Lang): new procedure which fixes the language for use
12909 with insertion character ~~
12910 (Set_Msg_Text): treat insertion character ~~
12911 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
12912 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
12913 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
12914 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
12915 errors related to the formal language restriction not serious
12916 (insertion character |).
12917 * par.adb (Par): set formal language for error messages if needed
12918 * sem_ch6.adb (Check_Missing_Return): take into account possible
12919 generated statements at the end of the function
12920 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
12921 enumeration value to define a new pragma SPARK_95
12922 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
12923 SPARK_Version): new type and variables to store the SPARK version
12925 (SPARK_Mode): return True when SPARK_Version is set
12926 * par-prag.adb: Correct indentation
12927 (Prag): take Pragma_SPARK_95 into account
12928 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
12931 2011-08-01 Robert Dewar <dewar@adacore.com>
12933 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
12934 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
12935 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
12937 2011-08-01 Pascal Obry <obry@adacore.com>
12939 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
12940 Target_Name to Get_Path call.
12941 (Parse_Single_Project): Likewise.
12942 (Post_Parse_Context_Clause): Likewise.
12943 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
12944 Call Initialise_Project_Path with the proper Target_Name.
12945 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
12947 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
12948 with the proper Target_Name.
12949 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
12950 Part.Parse routine.
12951 (Parse_Project_And_Apply_Config): Likewise.
12952 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
12953 This is fine as this part of the code is supporting only native
12955 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
12956 is fine as this part of the code is supporting only native compilation.
12958 2011-08-01 Yannick Moy <moy@adacore.com>
12960 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
12961 of homonym, unless the homonym is one of the cases allowed in SPARK
12962 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
12963 package declaration occurring after a body.
12965 2011-08-01 Robert Dewar <dewar@adacore.com>
12967 * checks.adb, exp_ch4.adb: Minor reformatting.
12969 2011-08-01 Javier Miranda <miranda@adacore.com>
12971 * einfo.ads (Access_Disp_Table): Fix documentation.
12972 (Dispatch_Table_Wrappers): Fix documentation.
12974 2011-08-01 Pascal Obry <obry@adacore.com>
12976 * prj-env.adb, prj-env.ads: Minor reformatting.
12978 2011-08-01 Yannick Moy <moy@adacore.com>
12980 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
12981 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
12982 procedures out of these packages.
12983 * errout.ads, errout.adb
12984 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
12985 procedures in of this package
12986 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
12987 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
12988 on misplaced later vs initial declarations, like in Ada 83
12989 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
12990 formal mode on attribute of private type whose full type declaration
12992 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
12993 package declaration inside a package specification
12994 (Analyze_Full_Type_Declaration): issue error in formal mode on
12995 controlled type or discriminant type
12996 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
12997 user-defined operator means that it should come from the source
12998 (New_Overloaded_Entity): issue error in formal mode on overloaded
13000 * sem_ch6.ads, sem_ch13.ads: typos in comments.
13002 2011-08-01 Thomas Quinot <quinot@adacore.com>
13004 * atree.adb: Minor reformatting.
13005 * checks.adb: Minor reformatting.
13007 2011-08-01 Vincent Celier <celier@adacore.com>
13009 * s-parame-vms-ia64.ads: Fix typo in comment
13011 * s-parame-vms-restrict.ads: Removed, unused.
13013 2011-08-01 Javier Miranda <miranda@adacore.com>
13016 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
13018 (Constrain_Index): Remove side effects in the evaluation of the bounds.
13019 * sem_ch3.ads, sem_ch3.adb
13020 (Is_Constant_Bound): New extended version of the subprogram that was
13021 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
13022 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
13023 * sem_aux.ads (Constant_Value): Fix typo in comment.
13024 * checks.adb (Generate_Index_Checks): New implementation which, for
13025 array objects with constant bounds, generates the runtime check
13026 referencing the bounds of the array type. For other cases this routine
13027 provides its previous behavior obtaining such values from the array
13029 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
13031 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
13032 we cannot have semantic interpretations of the new node.
13034 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13036 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
13039 2011-08-01 Arnaud Charlet <charlet@adacore.com>
13041 * sem_ch8.adb: Minor code editing.
13042 * s-vxwext.adb: Remove trailing space.
13043 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
13044 consistency with other files.
13046 2011-08-01 Thomas Quinot <quinot@adacore.com>
13048 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
13050 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13052 * par-ch10.adb: reject parameterized expressions as compilation unit.
13053 * sem_ch4.adb: handle properly conditional expression with overloaded
13054 then_clause and no else_clause.
13056 2011-08-01 Tristan Gingold <gingold@adacore.com>
13058 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
13059 like done by System.Aux_DEC.
13060 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
13062 2011-08-01 Yannick Moy <moy@adacore.com>
13064 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
13065 missing label at end of declaration (subprogram or package)
13066 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
13067 of positional and named parameter association
13068 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
13069 Error_Msg_SP which adds a prefix to the error message giving the name
13070 of the formal language analyzed
13071 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
13072 access result type in subprogram, unconstrained array as result type,.
13073 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
13075 * sem_ch8.adb: Code clean up.
13077 2011-08-01 Javier Miranda <miranda@adacore.com>
13079 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
13080 * einfo.ads (Access_Disp_Table): Fix documentation.
13081 (Dispatch_Table_Wrappers): Fix documentation.
13082 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
13083 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
13084 to enforce the documentation of this attribute.
13085 (Set_Is_Interface): Cleanup the assertion.
13086 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
13087 the Underlying_Type entity before reading attribute Access_Disp_Table.
13088 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
13089 Locate the Underlying_Type before reading attribute Access_Disp_Table.
13090 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
13091 the Underlying_Type entity before reading attribute Access_Disp_Table.
13092 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
13093 Locate the Underlying_Type entity before reading attribute
13096 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13098 * s-poosiz.ads: Additional overriding indicators.
13100 2011-08-01 Yannick Moy <moy@adacore.com>
13102 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
13104 (Analyze_Iteration_Scheme): issue error in formal mode when loop
13105 parameter specification does not include a subtype mark.
13106 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
13107 formal mode on abstract subprogram.
13108 (Analyze_Subprogram_Specification): issue error in formal mode on
13109 user-defined operator.
13110 (Process_Formals): issue error in formal mode on access parameter and
13111 default expression.
13112 * sem_ch9.adb (Analyze_Abort_Statement,
13113 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
13114 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
13115 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
13116 Analyze_Requeue, Analyze_Selective_Accept,
13117 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
13118 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
13119 issue error in formal mode on user-defined raise statement.
13121 2011-08-01 Thomas Quinot <quinot@adacore.com>
13123 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
13124 declaration being hidden when overriding an implicit inherited
13126 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
13127 (-gnats), do not complain about a source file that contains only a
13130 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13132 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
13133 variable if already set.
13135 2011-08-01 Arnaud Charlet <charlet@adacore.com>
13137 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
13138 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
13139 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
13140 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
13141 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
13142 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
13143 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
13144 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
13145 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
13146 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
13147 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
13148 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
13149 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
13150 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
13151 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
13152 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
13153 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
13154 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
13155 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
13156 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
13157 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
13158 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
13159 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
13160 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
13161 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
13162 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
13163 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
13164 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
13165 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
13166 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
13167 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
13168 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
13169 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
13170 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
13171 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
13172 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
13173 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
13174 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
13175 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
13176 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
13177 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
13178 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
13179 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
13180 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
13181 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
13182 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
13183 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
13184 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
13185 s-osinte-mingw.ads: Update to GPLv3 run-time license.
13186 Use GNAT instead of GNARL.
13188 2011-08-01 Bob Duff <duff@adacore.com>
13190 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
13191 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
13192 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
13195 2011-08-01 Yannick Moy <moy@adacore.com>
13197 * debug.adb (d.D) reverve flag for the SPARK mode
13198 (d.E) reverve flag for SPARK generation mode
13199 (d.F) reverve flag for Why generation mode
13200 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
13201 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
13202 functions which return True when the corresponding modes are set
13203 (Formal_Language): return "spark" or "alfa" when in formal verification
13205 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
13206 Error_Msg to prefix the error message with a tag giving the formal
13208 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
13209 message with a tag giving the formal language
13210 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
13212 (Analyze_Case_Statement): issue error in formal mode on case statement
13213 with a single "others" case alternative
13214 (Analyze_Exit_Statement): issue errors in formal mode on exit
13215 statements which do not respect SPARK restrictions
13216 (Analyze_Goto_Statement): issue error in formal mode on goto statement
13217 (Check_Unreachable_Code): always issue an error (not a warning) in
13218 formal mode on unreachable code (concerns both code after an infinite
13219 loop and after an unconditional jump, both not allowed in SPARK)
13220 * sem_ch6.adb (Analyze_Return_Statement): add call to
13221 Set_Return_Present for a procedure containing a return statement
13222 (already done for functions in Analyze_Function_Return)
13223 (Analyze_Function_Return): issue error in formal mode on extended
13224 return or if return is not last statement in function
13225 (Check_Missing_Return): issue error in formal mode if function does
13226 not end with return or if procedure contains a return
13227 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
13228 function to detect if there is an inner scope of its parameter S which
13231 2011-08-01 Thomas Quinot <quinot@adacore.com>
13233 * sem_ch6.ads: Minor reformatting.
13235 2011-08-01 Javier Miranda <miranda@adacore.com>
13237 * sem_util.adb (Abstract_Interface_List): Complete condition when
13238 processing private type declarations to avoid reading unavailable
13240 (Is_Synchronized_Tagged_Type): Complete condition when processing
13241 private extension declaration nodes to avoid reading unavailable
13244 2011-08-01 Thomas Quinot <quinot@adacore.com>
13246 * sem_ch3.adb: Minor reformatting.
13248 2011-08-01 Thomas Quinot <quinot@adacore.com>
13250 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
13251 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
13252 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
13253 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
13254 for VMS, instead parametrize the common implementation with
13255 System.Parameters declarations.
13257 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
13259 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
13261 2011-08-01 Tristan Gingold <gingold@adacore.com>
13263 * seh_init.c: Fix SEH handler installation on win64.
13265 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13267 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
13268 double analysis of an anonymous access to subprogram, because it can
13269 lead to improper sharing of profiles and a back-end crash.
13271 2011-08-01 Robert Dewar <dewar@adacore.com>
13273 * make.adb, sem_ch4.adb: Minor reformatting.
13274 * gcc-interface/Make-lang.in: Update dependencies.
13275 * sem_util.adb, exp_ch5.adb: Minor reformatting.
13277 2011-08-01 Arnaud Charlet <charlet@adacore.com>
13279 * gnat_rm.texi: Fix definition of Long_Integer.
13281 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13283 * exp_aggr.adb: check limit size of static aggregate unconditionally,
13284 to prevent storage exhaustion.
13285 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
13286 finalized is a function body, insert the cleanup code before the final
13287 return statement, to prevent spurious warnings.
13288 * s-pooglo.ads: add overriding indicator.
13290 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13292 * sem_ch4.adb (Operator_Check): improve error message when both a
13293 with_clause and a use_clause are needed to make operator usage legal.
13294 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
13295 determine whether a compilation unit is visible within an other,
13296 either through a with_clause in the current unit, or a with_clause in
13297 its library unit or one one of its parents.
13299 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13301 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
13302 over an arbitrary expression of an array or container type.
13303 * lib-xref.adb: clarify comment.
13305 2011-08-01 Bob Duff <duff@adacore.com>
13307 * einfo.ads: Minor reformatting.
13308 * debug.adb: Minor comment improvement.
13310 2011-08-01 Javier Miranda <miranda@adacore.com>
13312 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
13313 consider hidden subprograms as valid candidates.
13315 2011-08-01 Arnaud Charlet <charlet@adacore.com>
13317 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
13319 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
13321 * gnat_ugn.texi: Fix typo.
13323 2011-08-01 Robert Dewar <dewar@adacore.com>
13325 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
13326 lib-xref.adb: Minor reformatting
13328 2011-08-01 Gary Dismukes <dismukes@adacore.com>
13330 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
13331 when to generate a call to Move_Final_List.
13332 (Has_Controlled_Parts): Remove this function.
13334 2011-08-01 Geert Bosch <bosch@adacore.com>
13336 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
13337 "," in choice list.
13339 2011-08-01 Thomas Quinot <quinot@adacore.com>
13341 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
13342 explicit raise of a predefined exception as Comes_From_Source if the
13343 original N_Raise_Statement comes from source.
13345 2011-08-01 Robert Dewar <dewar@adacore.com>
13347 * sinfo.ads: Add comment.
13348 * sem_ch6.adb: Minor reformatting.
13350 2011-08-01 Robert Dewar <dewar@adacore.com>
13352 * freeze.adb (Freeze_Entity): Refine check for bad component size
13353 clause to avoid rejecting confirming clause when atomic/aliased present.
13355 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13357 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
13358 better determine whether an entity reference is a write.
13359 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
13361 * lib-xref.adb (Output_References): Do no suppress a read reference at
13362 the same location as an immediately preceeding modify-reference, to
13363 handle properly in-out actuals.
13365 2011-08-01 Tristan Gingold <gingold@adacore.com>
13367 * env.c (__gnat_setenv) [VMS]: Refine previous change.
13369 2011-08-01 Quentin Ochem <ochem@adacore.com>
13371 * i-cstrin.adb (New_String): Changed implementation, now uses only the
13372 heap to compute the result.
13374 2011-08-01 Robert Dewar <dewar@adacore.com>
13376 * atree.ads: Minor reformatting.
13378 2011-08-01 Emmanuel Briot <briot@adacore.com>
13380 * g-expect.adb (Get_Command_Output): Fix memory leak.
13382 2011-08-01 Geert Bosch <bosch@adacore.com>
13384 * cstand.adb (P_Float_Type): New procedure to print the definition of
13385 predefined fpt types.
13386 (P_Mixed_Name): New procedure to print a name using mixed case
13387 (Print_Standard): Use P_Float_Type for printing floating point types
13388 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
13389 precision IEEE float.
13391 2011-08-01 Thomas Quinot <quinot@adacore.com>
13393 * sem_ch3.adb: Minor reformatting.
13395 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13397 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
13398 the completion of a generic function, insert the new body rather than
13399 rewriting the original.
13401 2011-08-01 Yannick Moy <moy@adacore.com>
13403 * sinfo.ads, errout.ads: Typos in comments.
13405 2011-08-01 Robert Dewar <dewar@adacore.com>
13407 * par-endh.adb: Minor reformatting.
13409 2011-08-01 Robert Dewar <dewar@adacore.com>
13411 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
13412 (Pre_Post_Aspects): New subtype.
13413 * par-ch12.adb (P_Generic): New syntax for aspects in packages
13414 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
13415 * par-ch7.adb (P_Package): Remove Decl parameter
13416 (P_Package): Handle new syntax for aspects (before IS)
13417 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
13419 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
13420 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
13421 (P_Package): Remove Decl parameter
13422 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
13424 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
13426 * sem_util.ads, sem_util.adb (Static_Boolean): New function
13427 * sinfo.ads: Document new syntax for aspects in packages etc.
13428 * sprint.adb: Handle new syntax of aspects before IS in package
13430 2011-08-01 Thomas Quinot <quinot@adacore.com>
13432 * atree.ads: Minor reformatting.
13433 * sem_prag.adb: Minor reformatting.
13435 2011-08-01 Robert Dewar <dewar@adacore.com>
13437 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
13438 case expr alternative.
13440 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13442 * sem_ch12.adb: Fix typo.
13444 2011-08-01 Geert Bosch <bosch@adacore.com>
13446 * sem_prag.adb (Check_No_Link_Name): New procedure.
13447 (Process_Import_Or_Interface): Use Check_No_Link_Name.
13448 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
13449 instead of Standard_Long_Long_Float_Size global. Preparation for
13450 eventual removal of per type constants.
13451 * exp_util.ads (Get_Stream_Size): New function returning the stream
13452 size value of subtype E.
13453 * exp_util.adb (Get_Stream_Size): Implement new function.
13454 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
13456 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
13458 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
13460 2011-08-01 Geert Bosch <bosch@adacore.com>
13462 * cstand.adb: Fix comments.
13463 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
13464 count of arguments.
13466 2011-08-01 Robert Dewar <dewar@adacore.com>
13468 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
13470 2011-08-01 Geert Bosch <bosch@adacore.com>
13472 * atree.ads: Fix comment.
13474 2011-08-01 Robert Dewar <dewar@adacore.com>
13476 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
13477 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
13478 * par.adb: Add with for Namet.Sp.
13479 * par-tchk.adb: Minor reformatting.
13481 2011-08-01 Vincent Celier <celier@adacore.com>
13483 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
13484 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
13485 of the init procedure of a SAL.
13486 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
13489 2011-08-01 Thomas Quinot <quinot@adacore.com>
13491 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
13494 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13496 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
13498 2011-08-01 Thomas Quinot <quinot@adacore.com>
13500 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
13501 conformant with its spec (return True only for types that have
13502 an overriding Initialize primitive operation that prevents them from
13503 having preelaborable initialization).
13504 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
13505 initialization for controlled types in Ada 2005 or later mode.
13507 2011-08-01 Robert Dewar <dewar@adacore.com>
13509 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
13511 (Same_Aspect): New function.
13512 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
13513 Type_Invariant, Precondition, Postcondition.
13514 * snames.ads-tmpl: Add Name_Type_Invariant.
13516 2011-08-01 Robert Dewar <dewar@adacore.com>
13518 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
13520 (Freeze_All_Ent): Fix error in handling inherited aspects.
13521 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
13522 already analyzed, but don't skip entire processing of a declaration,
13523 that's wrong in some cases of declarations being rewritten.
13524 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
13525 Don't delay for integer, string literals
13526 Treat predicates in usual manner for delay, remove special case code,
13528 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
13529 (Build_Predicate_Function): Update saved expression in aspect
13530 (Build_Invariant_Procedure): Update saved expression in aspect
13531 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
13532 of replacement of discriminant references if the reference is simple.
13534 2011-08-01 Robert Dewar <dewar@adacore.com>
13536 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
13537 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
13538 Static_Predicate and Dynamic_Predicate.
13539 (Build_Predicate_Function): Add processing for Static_Predicate
13540 and Dynamic_Predicate.
13541 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
13542 (From_Static_Predicate): New flag
13543 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
13545 2011-08-01 Robert Dewar <dewar@adacore.com>
13547 * usage.adb: Documentation cleanup for Ada version modes in usage.
13548 * expander.adb: Minor reformatting.
13550 2011-08-01 Robert Dewar <dewar@adacore.com>
13552 * atree.ads: Minor comment fix.
13553 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
13554 a-witeio.ads, sem_prag.adb: Minor reformatting.
13556 2011-08-01 Doug Rupp <rupp@adacore.com>
13558 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
13559 pointers. Use descrip.h header file for convenience. Add some
13562 2011-08-01 Robert Dewar <dewar@adacore.com>
13564 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
13565 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
13566 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
13568 (Check_Aspect_At_End_Of_Declarations): New procedure
13569 (Analye_Aspect_Specification): Minor changes for above procedures
13570 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
13571 specification node as well.
13573 2011-08-01 Pascal Obry <obry@adacore.com>
13575 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
13576 Windows files. Use GetFilesAttributes() in this case to check for file
13577 existence instead of returning with an error code.
13579 2011-08-01 Vincent Celier <celier@adacore.com>
13581 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
13582 High is above Source length.
13584 2011-08-01 Robert Dewar <dewar@adacore.com>
13586 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
13588 2011-08-01 Robert Dewar <dewar@adacore.com>
13590 * aspects.ads (Boolean_Aspects): New subtype.
13591 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
13592 for derived types in cases where the parent type and derived type have
13594 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
13595 with aspects when parent type also has aspects.
13596 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
13597 boolean expression at this point).
13598 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
13599 accordance with final decision on the Ada 2012 feature.
13600 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
13602 2011-08-01 Matthew Heaney <heaney@adacore.com>
13604 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
13606 2011-08-01 Pascal Obry <obry@adacore.com>
13608 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
13609 Fix Replace_Slice when High is above current string size.
13610 (Replace_Slice): Fix DL computation when High is above current
13613 2011-08-01 Gary Dismukes <dismukes@adacore.com>
13615 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
13617 2011-08-01 Matthew Heaney <heaney@adacore.com>
13619 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
13622 2011-08-01 Pascal Obry <obry@adacore.com>
13624 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
13627 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13629 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
13630 access to protected subprograms in generic bodies.
13631 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
13632 protected type, indicate that the convention of the subprogram is
13633 Convention_Protected, because it may be used in subsequent declarations
13634 within the protected declaration.
13636 2011-08-01 Vincent Celier <celier@adacore.com>
13638 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
13639 and "final" procedures when the name of the library is "ada", to avoid
13640 duplicate symbols "adainit" and "adafinal" in executables.
13642 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13644 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
13645 quantified expression that appears within a postcondition and uses the
13646 Ada2012 'Result attribute.
13648 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13650 * init.c (__gnat_error_handler): Cast reason to int.
13651 (__gnat_install_handler): Explain sa_sigaction use.
13653 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
13655 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
13656 subprogram has copy-in copy-out parameters, try to promote the mode of
13657 the return type if it is passed in registers.
13659 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
13661 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
13662 left operand as addressable.
13664 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
13666 * gcc-interface/gigi.h (build_function_stub): Remove.
13667 (build_return_expr): Likewise.
13668 (convert_vms_descriptor): Declare.
13669 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
13670 (build_function_stub): Move to...
13671 * gcc-interface/utils2.c (build_return_expr): Move to...
13672 * gcc-interface/trans.c (build_function_stub): ...here.
13673 (build_return_expr): ...here.
13674 (Subprogram_Body_to_gnu): Add local variable for language_function.
13675 Disconnect the parameter attributes cache, if any, once done with it.
13676 Call end_subprog_body only after setting the end_locus.
13677 Build the stub associated with the function, if any, at the very end.
13678 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
13679 variables and streamline control flow.
13681 2011-07-23 Arnaud Charlet <charlet@adacore.com>
13684 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
13685 g-trasym-dwarf.adb.
13687 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13690 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
13691 Assign to act.sa_sigaction.
13692 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
13693 current->return_address to char * before arithmetic.
13695 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13697 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
13698 Correct argument types.
13699 Extract code from reason.
13700 (__gnat_install_handler): Assign to act.sa_sigaction.
13702 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
13704 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
13705 (GNAT1_OBJS): ...here.
13707 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
13710 * g-socthi-mingw.adb (Fill): Fix formatting.
13712 * gcc-interface/gigi.h: Move around comment.
13714 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
13717 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
13719 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
13722 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
13724 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
13726 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
13727 range comparison if Pmode is SImode.
13729 2011-07-12 Laurent GUERBY <laurent@guerby.net>
13730 Eric Botcazou <ebotcazou@adacore.com>
13732 * adadecode.c: Wrap up in extern "C" block.
13733 * adadecode.h: Likewise.
13734 * adaint.c: Likewise. Remove 'const' keyword.
13735 * adaint.h: Likewise.
13736 * argv.c: Likewise.
13737 * atree.h: Likewise.
13739 * cstreams.c: Likewise.
13741 * exit.c: Likewise.
13743 * final.c: Likewise.
13744 * init.c: Likewise.
13745 * initialize.c: Likewise.
13746 * link.c: Likewise.
13747 * namet.h: Likewise.
13748 * nlists.h: Likewise.
13749 * raise.c: Likewise.
13750 * raise.h: Likewise.
13751 * repinfo.h: Likewise.
13752 * seh_init.c: Likewise.
13753 * targext.c: Likewise.
13754 * tracebak.c: Likewise.
13755 * uintp.h: Likewise.
13756 * urealp.h: Likewise.
13757 * xeinfo.adb: Wrap up generated C code in extern "C" block.
13758 * xsinfo.adb: Likewise.
13759 * xsnamest.adb: Likewise.
13760 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
13761 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
13762 * gcc-interface/misc.c: Likewise.
13763 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
13764 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
13765 ada/targext.o here...
13766 (GNAT_ADA_OBJS): ...and not here.
13767 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
13768 (GNATBIND_OBJS): Reorder.
13770 2011-07-07 Richard Henderson <rth@redhat.com>
13772 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
13773 dwarf2out_frame_init.
13775 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
13777 * gcc-interface/misc.c (gnat_init): Tweak previous change.
13779 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13782 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
13784 2011-07-06 Richard Guenther <rguenther@suse.de>
13786 * gcc-interface/misc.c (gnat_init): Merge calls to
13787 build_common_tree_nodes and build_common_tree_nodes_2.
13788 Re-initialize boolean_false_node.
13790 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
13791 Olivier Hainque <hainque@adacore.com>
13792 Nicolas Setton <setton@adacore.com>
13794 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
13795 the type according to the ARTIFICIAL_P parameter.
13796 (create_type_decl): Likewise.
13797 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
13799 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
13801 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
13802 (gnatbind): Likewise.
13804 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13806 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
13808 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
13810 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
13811 local variable throughout. Remove useless call to Base_Type.
13812 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
13813 Take it also into account for the volatileness of the field. Set the
13814 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
13816 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
13818 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
13819 on a dereference built for a by-ref object if it has an address clause.
13821 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
13823 * einfo.ads (Address_Taken): Document use for the second argument of
13824 Asm_Input and Asm_Output attributes.
13825 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
13826 argument is an entity name, then set Address_Taken on it.
13827 <Attribute_Asm_Output>: Likewise.
13828 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
13829 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
13830 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
13831 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
13833 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
13835 PR middle-end/46500
13836 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
13838 2011-06-14 Joseph Myers <joseph@codesourcery.com>
13840 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
13841 (ada/utils.o): Update dependencies.
13842 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
13843 ../../../libcpp/libcpp.a.
13844 * gcc-interface/utils.c: Include common/common-target.h.
13845 (process_attributes): Use targetm_common.have_named_sections.
13847 2011-06-07 Richard Guenther <rguenther@suse.de>
13849 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
13852 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
13854 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
13855 TREE_THIS_NOTRAP flag.
13857 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
13859 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
13862 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
13864 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
13865 constants whose full view has discriminants specially.
13867 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
13869 * gcc-interface/utils.c: Include diagnostic.h.
13870 (gnat_write_global_declarations): Output debug information for all
13871 global type declarations before finalizing the compilation unit.
13872 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
13874 2011-05-25 Jakub Jelinek <jakub@redhat.com>
13876 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
13878 2011-05-25 Kai Tietz <ktietz@redhat.com>
13880 * adaint.c (__gnat_to_canonical_file_list_next): Use array
13881 initialization instead of const/none-const pointer assignment.
13883 2011-05-24 Joseph Myers <joseph@codesourcery.com>
13885 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
13886 $(EXTRA_GNAT1_OBJS).
13887 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
13888 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
13889 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
13890 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
13891 libcommon-target.a instead of prefix.o.
13893 2011-05-21 Joseph Myers <joseph@codesourcery.com>
13896 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
13898 2011-05-20 Joseph Myers <joseph@codesourcery.com>
13900 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
13901 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
13902 instead of version.o.
13904 2011-05-18 Kai Tietz <ktietz@redhat.com>
13906 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
13907 boolean_false_node instead of integer_zero_node.
13908 (convert_with_check): Likewise.
13909 * gcc-interface/decl.c (choices_to_gnu): Likewise.
13911 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
13913 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
13914 type of the parameter is an unconstrained array, convert the actual to
13915 the type of the formal in the In Out and Out cases as well.
13917 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
13919 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
13920 call build_function_type_array or build_varargs_function_type_array
13922 (create_subprog_type): Don't call build_function_type; call
13923 build_function_type_vec instead.
13925 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
13927 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
13928 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
13929 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
13931 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
13933 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
13935 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
13936 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
13938 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
13940 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
13942 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
13944 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
13945 instead of accessing TYPE_ARG_TYPES directly.
13946 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
13948 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
13951 * gcc-interface/gigi.h (get_variant_part): Declare.
13952 * gcc-interface/decl.c (get_variant_part): Make global.
13953 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
13954 types have the same constant size, are record types and T1 has a
13955 variant part while T2 doesn't.
13957 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
13959 * gcc-interface/utils.c (begin_subprog_body): Do not call
13961 (end_subprog_body): Likewise.
13963 2011-05-04 Richard Guenther <rguenther@suse.de>
13965 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
13967 (pos_to_constructor): Likewise.
13969 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
13970 Eric Botcazou <ebotcazou@adacore.com>
13972 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
13973 of build_function_type. Adjust calls to...
13974 (build_raise_check): ...this. Do not take a void_tree parameter.
13975 Call build_function_type_list instead of build_function_type.
13976 Fix head comment and swap couple of conditional blocks.
13978 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
13980 * gnatvsn.ads (Library_Version): Bump to 4.7.
13981 (Current_Year): Bump to 2011.
13983 2011-04-29 Michael Matz <matz@suse.de>
13985 * gcc-interface/misc.c (gnat_handle_option): Set
13986 warn_maybe_uninitialized.
13988 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
13990 * gnat_ugn.texi (Complexity Metrics Control): Update link to
13991 the Watson/McCabe paper.
13993 2011-04-23 Jim Meyering <meyering@redhat.com>
13995 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
13997 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
13999 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
14002 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
14004 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
14006 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
14007 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
14008 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
14009 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
14010 <all>: Do not set flags on the reused DECL node coming from an alias.
14011 Set DECL_IGNORED_P on the DECL node built for subprograms if they
14012 don't need debug info here...
14013 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
14014 (gigi): Adjust calls to create_subprog_decl.
14015 (build_raise_check): Likewise.
14016 (establish_gnat_vms_condition_handler): Likewise.
14017 (Compilation_Unit_to_gnu): Likewise.
14018 (gnat_to_gnu): Likewise.
14020 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
14022 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
14023 (NO_REORDER_ADAFLAGS): New variable.
14024 (EXTRA_GNATTOOLS): Always define.
14025 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
14026 Clean up and adjust list of files compiled with special options.
14027 * gcc-interface/Make-lang.in: Likewise.
14028 (ada/decl.o): Cosmetical change.
14029 (ada/misc.o): Remove dependency on $(PLUGIN_H).
14031 2011-04-20 Jim Meyering <meyering@redhat.com>
14033 * initialize.c (__gnat_initialize): Remove useless if-before-free.
14035 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
14037 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
14038 $(CFLAGS) on the link line.
14040 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
14042 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
14043 padded type built for the return type if it is unconstrained.
14045 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
14047 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
14049 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
14051 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
14052 before calling TREE_CHAIN.
14053 * gcc-interface/misc.c (gnat_init_ts): New function.
14054 (LANG_HOOKS_INIT_TS): Define.
14056 2011-04-12 Martin Jambor <mjambor@suse.cz>
14058 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
14059 instead of cgraph_node.
14061 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
14063 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
14064 alignment on fields of the RETURN type built for the Copy-In Copy-Out
14067 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
14069 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
14070 of aggregate types that contain a placeholder.
14072 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
14074 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
14076 (handle_type_generic_attribute): Likewise.
14078 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
14081 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
14083 2011-04-04 Kai Tietz <ktietz@redhat.com>
14086 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
14089 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14091 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
14092 type case, do not strip a padding type around the array type.
14094 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14096 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
14099 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14101 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
14102 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
14103 code for -feliminate-unused-debug-types.
14104 (gnat_post_options): Likewise.
14106 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14108 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
14109 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
14112 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14114 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
14115 DECL_ARTIFICIAL flag on enumeration types.
14117 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14119 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
14120 fat pointer types artificial unconditionally.
14121 <E_Array_Subtype>: Attach the base array type as a parallel type if it
14124 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14126 * gcc-interface/gigi.h (get_dummy_type): Declare.
14127 (build_dummy_unc_pointer_types): Likewise.
14128 (finish_fat_pointer_type): Likewise.
14129 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
14130 fat pointer type has been built, complete it in place.
14131 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
14132 and thin pointers. Remove useless variable.
14133 (finish_fat_pointer_type): Make global and move to...
14134 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
14135 (get_dummy_type): New function.
14136 (build_dummy_unc_pointer_types): Likewise.
14137 (gnat_pushdecl): Propage the name to the anonymous variants only.
14138 (update_pointer_to): Only adjust the pointer types in the unconstrained
14141 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14143 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
14144 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
14145 if this is a Taft amendment type and the full declaration is available.
14146 * gcc-interface/trans.c (process_type): Likewise.
14147 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
14148 (process_freeze_entity): Likewise.
14149 * gcc-interface/utils.c (dummy_global): New static variable.
14150 (gnat_write_global_declarations): If there are types declared as used
14151 at the global level, insert them in the global hash table.
14153 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14155 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
14156 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
14157 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
14159 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
14160 flag of the type accordingly.
14161 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
14163 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14165 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
14166 finalizing types when updating the pointers to the designated type.
14167 <all>: Finalize the deferred types even if we didn't defer processing
14168 of incomplete types in this invocation.
14170 2011-04-01 Olivier Hainque <hainque@adacore.com>
14171 Nicolas Setton <setton@adacore.com>
14172 Eric Botcazou <ebotcazou@adacore.com>
14174 * gcc-interface/misc.c (gnat_descriptive_type): New function.
14175 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
14177 2011-03-28 Kai Tietz <ktietz@redhat.com>
14179 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
14181 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
14182 * system-mingw.ads (System): Change ZCX_By_Default default to True.
14184 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
14186 2011-03-28 Tristan Gingold <gingold@adacore.com>
14189 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
14190 Use ada output of gnatbind.
14191 (ada/b_gnatb.adb): Ditto.
14192 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
14193 (ada.mostlyclean, ada.stage1)
14194 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
14195 (ada.stagefeedback): Adjust.
14196 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
14197 Use ada output of gnatbind.
14198 (b_gnatm.adb): Ditto.
14199 (b_gnatl.o, b_gnatm.o): New rules.
14201 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
14203 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
14204 for the padded type built to support a specified size or alignment.
14206 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
14208 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
14209 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
14210 unconditionally to the end of the unit when the designated type is
14212 <all>: Rename local variable. Attempt to un-defer types only and do it
14213 for limited_with'ed types as well.
14214 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
14215 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
14216 consistently and remove redundant call to finalize_from_with_types.
14218 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
14220 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
14221 subprograms without a previous spec declared in the same unit.
14222 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
14223 subprograms at the end of the unit instead of at the beginning.
14224 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
14225 isn't public for the special handling of non-inline functions nested
14226 inside inline external functions.
14228 2011-03-25 Jeff Law <law@redhat.com>
14230 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
14232 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
14234 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
14235 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
14236 to compute Set_Size_Depends_On_Discriminant.
14237 (Layout_Type): Call it on array types in back-end layout mode.
14238 * sem_util.adb (Requires_Transient_Scope): Return true for array
14239 types only if the size depends on the value of discriminants.
14240 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
14241 type if the RHS is a call to a function that returns an unconstrained
14242 type with default discriminant.
14244 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
14246 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
14247 non-conversion to the nominal result type at the end.
14249 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
14251 * gcc-interface/trans.c (create_temporary): New function taken from...
14252 (create_init_temporary): ...here. Call it.
14253 (call_to_gnu): Create the temporary for the return value early, if any.
14254 Create it for a function with copy-in/copy-out parameters if there is
14255 no target; in other cases of copy-in/copy-out, use another temporary.
14256 Push the new binding level lazily. Add and rename local variables.
14258 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
14260 * gcc-interface/decl.c (validate_size): Improve comments and tweak
14262 (set_rm_size): Likewise.
14264 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
14266 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
14267 for the padded type built in order to support a specified alignment.
14268 Fix incorrect formatting.
14270 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
14273 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
14275 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
14277 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
14278 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
14279 to the end of the list. Adjust recursive call. Rename local variable.
14280 If REORDER is true, reorder components of the record type.
14281 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
14282 components_to_record and adjust the parameter list.
14284 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
14286 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
14287 disabled, use the variable for bounds of loop iteration scheme.
14289 2011-03-21 Kai Tietz <ktietz@redhat.com>
14292 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
14294 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
14296 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
14297 out whether the expression is read-only. Short-circuit placeholder
14298 case and rename a couple of local variables.
14300 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
14302 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
14303 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
14304 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
14305 (convert): Deal with conversions from a smaller form type specially.
14307 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
14309 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
14310 its argument, except for the special -I- switch.
14312 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
14314 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
14317 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
14319 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
14321 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
14323 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
14325 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
14326 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
14327 instead of GNAT_FORMAL. Protect the expression against multiple uses.
14328 Do not generate the check directly, instead instantiate the template
14329 check present in the descriptor.
14330 (make_descriptor_field): Move around.
14331 (build_vms_descriptor32): Build a template check in the POINTER field.
14332 (build_vms_descriptor): Remove useless suffixes.
14333 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
14335 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
14338 * targext.c: Include target files if IN_RTS is defined.
14340 2011-01-26 Richard Guenther <rguenther@suse.de>
14343 * targext.c: Include config.h.
14344 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
14347 2011-01-04 Pascal Obry <obry@adacore.com>
14348 Eric Botcazou <ebotcazou@adacore.com>
14350 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
14352 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
14354 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
14355 end-of-case on the end label and its associated gotos, if any.
14357 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
14359 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
14360 expressions of the parameter cache within the statement group of
14361 the CICO mechanism.
14363 2011-01-04 Olivier Hainque <hainque@adacore.com>
14364 Eric Botcazou <ebotcazou@adacore.com>
14366 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
14367 (set_end_locus_from_node): New function.
14368 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
14369 make and the function end_locus.
14370 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
14371 for the elaboration subprogram.
14372 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
14373 set the end_locus of the expression as well.
14375 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
14378 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
14379 variables that are referenced in exception handlers volatile.
14383 Copyright (C) 2011 Free Software Foundation, Inc.
14385 Copying and distribution of this file, with or without modification,
14386 are permitted in any medium without royalty provided the copyright
14387 notice and this notice are preserved.
14389 * gnat_rm.texi: Ramification of pragma Eliminate documentation
14390 - fix bugs in the description of Source_Trace;
14391 - get rid of UNIT_NAME;
14393 2011-08-02 Javier Miranda <miranda@adacore.com>
14396 (Build_Dispatching_Requeue): Adding support for VM targets
14397 since we cannot directly reference the Tag entity.
14398 * exp_sel.adb (Build_K): Adding support for VM targets.
14399 (Build_S_Assignment): Adding support for VM targets.
14401 (Default_Prim_Op_Position): In VM targets do not restrict availability
14402 of predefined interface primitives to compiling in Ada 2005 mode.
14403 (Is_Predefined_Interface_Primitive): In VM targets this service is not
14404 restricted to compiling in Ada 2005 mode.
14405 (Make_VM_TSD): Generate code that declares and initializes the OSD
14406 record. Needed to support dispatching calls through synchronized
14409 (Make_Predefined_Primitive_Specs): Enable generation of predefined
14410 primitives associated with synchronized interfaces.
14411 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
14412 primitives associated with synchronized interfaces.
14414 2011-08-02 Yannick Moy <moy@adacore.com>
14416 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
14417 statements hidden in SPARK if preceded by the HIDE directive
14418 (Parse_Exception_Handlers): mark each exception handler in a sequence of
14419 exception handlers as hidden in SPARK if preceded by the HIDE directive
14420 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
14421 if starting with the HIDE directive
14422 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
14423 starting with the HIDE directive; mark the declarations in a private
14424 part as hidden in SPARK if the private part starts with the HIDE
14426 * restrict.adb, restrict.ads
14427 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
14428 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
14429 argument node belongs to a part which is hidden in SPARK
14430 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
14431 parts in SPARK; protect the possibly costly call to
14432 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
14433 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
14434 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
14435 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
14437 (Scan): recognize special comment starting with '#' and followed by
14438 SPARK keyword "hide" as a HIDE directive.
14440 2011-08-02 Yannick Moy <moy@adacore.com>
14442 * types.ads, erroutc.ads: Minor reformatting.
14444 2011-08-02 Vincent Celier <celier@adacore.com>
14446 * link.c: Add response file support for cross platforms.
14448 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14450 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
14451 in an association, set parent field of copy before partial analysis.
14452 * sem_res.adb (Resolve_Slice): create reference to itype only when
14453 expansion is enabled.
14455 2011-08-02 Yannick Moy <moy@adacore.com>
14457 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
14458 for new flag denoting which subprogram bodies are in ALFA
14459 * restrict.adb, sem_ch7.adb: Update comment
14460 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
14461 sem_ch9.adb, sem_res.adb: Add calls to
14462 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
14463 * sem_ch6.adb (Analyze_Function_Return): add calls to
14464 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
14465 middle of the body, and extended return.
14466 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
14467 False when missing return.
14468 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
14469 to True for subprograms whose spec is in ALFA. Remove later on the flag
14470 on the entity used for a subprogram body when there exists a separate
14472 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
14473 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
14474 False, otherwise do nothing.
14476 2011-08-02 Robert Dewar <dewar@adacore.com>
14478 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
14480 2011-08-02 Yannick Moy <moy@adacore.com>
14482 * sem_ch4.ads: minor formatting.
14484 2011-08-02 Yannick Moy <moy@adacore.com>
14486 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
14487 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
14488 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
14489 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
14490 opt.ads: cleanup of SPARK mode
14492 2011-08-02 Yannick Moy <moy@adacore.com>
14494 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
14496 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
14497 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
14499 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
14500 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
14501 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
14502 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
14504 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
14506 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
14507 functions whose return type is not in ALFA.
14508 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
14510 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
14511 parameter's type is not in ALFA.
14512 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
14515 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14517 * sem_ch6 (Analyze_Expression_Function): treat the function as
14518 Inline_Always, and introduce a subprogram declaration for it when it is
14520 * inline.adb (Add_Inlined_Body): recognize bodies that come from
14521 expression functions, so that the back-end can determine whether they
14522 can in fact be inlined.
14523 * sem_util.adb (Is_Expression_Function): predicate to determine whether
14524 a function body comes from an expression function.
14526 2011-08-02 Gary Dismukes <dismukes@adacore.com>
14528 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
14529 null exclusions to test Can_Never_Be_Null on the anonymous access types
14530 of the formals rather than testing the formals themselves. Exclude this
14531 check in cases where the Old_Formal is marked as a controlling formal,
14532 to avoid issuing spurious errors for bodies completing dispatching
14533 operations (due to the flag not getting set on controlling access
14534 formals in body specs).
14535 (Find_Corresponding_Spec): When checking full and subtype conformance of
14536 subprogram bodies in instances, pass Designated and E in that order, for
14537 consistency with the expected order of the formals (New_Id followed by
14540 2011-08-02 Robert Dewar <dewar@adacore.com>
14542 * sem_ch8.adb: Minor reformatting.
14544 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14546 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
14547 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
14548 primitive operations of class-wide actuals.
14550 2011-08-02 Javier Miranda <miranda@adacore.com>
14552 * exp_atag.ads, exp_atag.adb
14553 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
14554 since its value is implicitly passed in argument Typ.
14555 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
14556 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
14557 Build_Common_Dispatching_Select_Statements.
14559 2011-08-02 Robert Dewar <dewar@adacore.com>
14561 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
14562 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
14563 Minor reformatting.
14565 2011-08-02 Robert Dewar <dewar@adacore.com>
14567 * sem_res.adb: Minor reformatting.
14568 * sem_prag.adb: Minor reformatting.
14570 2011-08-02 Javier Miranda <miranda@adacore.com>
14572 * exp_atag.adb, exp_atags.ads
14573 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
14574 by the tagged type Entity. Required to use this routine in the VM
14575 targets since we do not have available the Tag entity in the VM
14578 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
14579 Ada.Tags has not been previously loaded.
14581 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
14582 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
14584 (Enclosing_Dynamic_Scope): Add missing support to handle the full
14585 view of enclosing scopes. Required to handle enclosing scopes that
14586 are synchronized types whose full view is a task type.
14588 (Build_VM_TSDs): Minor code improvement to avoid generating and
14589 analyzing lists with empty nodes.
14590 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
14591 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
14592 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
14593 (Make_Disp_Timed_Select_Body): Add support for VM targets.
14594 (Make_Select_Specific_Data_Table): Add support for VM targets.
14595 (Make_VM_TSD): Generate code to initialize the SSD structure of
14598 2011-08-02 Yannick Moy <moy@adacore.com>
14600 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
14601 cross-references section in ALI.
14602 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
14603 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
14605 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
14606 subprogram or package entity of a node
14607 (Is_Local_Reference_Type): new function returns True for references
14608 selected in local cross-references.
14609 (Lt): function extracted from Lt in Output_References
14610 (Write_Entity_Name): function extracted from Output_References
14611 (Generate_Definition): generate reference with type 'D' for definition
14612 of objects (object declaration and parameter specification), with
14613 appropriate locations and units, for use in local cross-references.
14614 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
14615 references of type 'I' for initialization in object definition.
14616 (Output_References): move part of function Lt and procedure
14617 Write_Entity_Name outside of the body. Ignore references of types 'D'
14618 and 'I' introduced for local cross-references.
14619 (Output_Local_References): new procedure to output the local
14620 cross-references sections.
14621 (Lref_Entity_Status): new array defining whether an entity is a local
14622 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
14623 with 'I' type when initialization expression is present.
14624 * get_scos.adb, get_scos.ads: Correct comments and typos
14626 2011-08-02 Javier Miranda <miranda@adacore.com>
14628 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
14630 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
14632 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
14635 2011-08-02 Vincent Celier <celier@adacore.com>
14637 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
14638 (No_Space_Img): New function
14639 (Find_Excluded_Sources): When reading from a file, record the file name
14640 and the line number for each excluded source.
14641 (Mark_Excluded_Sources): When reporting an error, if the excluded
14642 sources were read from a file, include file name and line number in
14645 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14647 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
14649 2011-08-02 Robert Dewar <dewar@adacore.com>
14651 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
14653 2011-08-02 Javier Miranda <miranda@adacore.com>
14655 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
14656 generation of TSDs to the DOTNET compiler.
14657 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
14658 generation of TSDs to the DOTNET compiler.
14660 2011-08-02 Javier Miranda <miranda@adacore.com>
14662 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
14663 record of all the tagged types declared inside library level package
14664 declarations, library level package bodies or library level subprograms.
14665 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
14666 associated with a given tagged type.
14667 (Build_VM_TSDs): New subprogram.
14668 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
14669 compilation units that are subprograms.
14670 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
14671 compilation units that are package bodies.
14672 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
14673 units that are a package declaration or a package instantiation.
14674 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
14675 reorganization to improve the error generated by the frontend when the
14676 function Ada.Tags.Secondary_Tag is not available.
14677 * rtsfind.ads (RE_Register_TSD): New runtime entity.
14678 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
14680 2011-08-02 Javier Miranda <miranda@adacore.com>
14682 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
14684 2011-08-02 Robert Dewar <dewar@adacore.com>
14686 * s-imenne.ads: Minor reformatting.
14688 2011-08-02 Robert Dewar <dewar@adacore.com>
14690 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
14691 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
14692 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
14694 2011-08-02 Robert Dewar <dewar@adacore.com>
14696 * einfo.ads (Materialize_Entity): Document this is only for renamings
14697 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
14698 required debug information in the case where we transform the object
14699 declaration into a renaming declaration.
14700 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
14702 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
14703 Materialize_Entity.
14705 2011-08-02 Robert Dewar <dewar@adacore.com>
14707 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
14708 Suppress_Init_Procs.
14709 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
14710 Suppress_Initialization/Initialization_Suppressed.
14711 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
14712 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
14713 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
14714 * sem_prag.adb: New processing for pragma Suppress_Initialization.
14716 2011-08-02 Robert Dewar <dewar@adacore.com>
14718 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
14719 Minor reformatting.
14721 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14723 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
14724 only have inheritable classwide pre/postconditions.
14726 2011-08-02 Javier Miranda <miranda@adacore.com>
14728 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
14729 * rtsfind.ads (RE_Check_TSD): New runtime entity.
14730 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
14731 checks if the external tag of a type is the same as the external tag
14732 of some other declaration.
14734 2011-08-02 Thomas Quinot <quinot@adacore.com>
14736 * s-taskin.ads: Minor reformatting.
14738 2011-08-02 Emmanuel Briot <briot@adacore.com>
14740 * g-comlin.adb (Display_Help): swap the order in which it prints the
14741 short help and the general usage.
14743 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14745 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
14746 the aspect declarations and attach them to the generic copy for
14747 subsequent analysis.
14748 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
14749 declarations of the generic tree to the new subprogram declarations.
14750 * sem_attr.adb (Check_Precondition_Postcondition): recognize
14751 conditions that apply to a subprogram instance.
14753 2011-08-02 Robert Dewar <dewar@adacore.com>
14755 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
14757 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14759 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
14760 private type with a tagged full view is not derived in the immediate
14761 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
14763 2011-08-02 Robert Dewar <dewar@adacore.com>
14765 * exp_ch4.adb: Minor reformatting.
14767 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14769 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
14770 Ada2012 iterator, the loop will be rewritten during expansion into a
14771 while loop with a cursor and an element declaration. Do not analyze the
14772 body in this case, because if the container is for indefinite types the
14773 actual subtype of the elements will only be determined when the cursor
14774 declaration is analyzed.
14776 2011-08-02 Arnaud Charlet <charlet@adacore.com>
14778 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
14779 size/alignment related attributes in CodePeer_Mode.
14781 2011-08-02 Gary Dismukes <dismukes@adacore.com>
14783 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
14784 Prepend_Element, since this can result in the operation getting the
14785 wrong slot in the full type's dispatch table if the full type has
14786 inherited operations. The incomplete type's operation will get added
14787 to the proper position in the full type's primitives
14788 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
14789 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
14790 dispatching operations, since there are cases where nonprimitive
14791 subprograms can get added to the list of incomplete dependents (such
14792 as subprograms in nested packages).
14793 * sem_ch6.adb (Process_Formals): First, remove test for being in a
14794 private part when determining whether to add a primitive with a
14795 parameter of a tagged incomplete type to the Private_Dependents list.
14796 Such primitives can also occur in the visible part, and should not have
14797 been excluded from being private dependents.
14798 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
14799 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
14800 list of a Taft-amendment incomplete type is a primitive before issuing
14801 an error that the full type must appear in the same unit. There are
14802 cases where nonprimitives can be in the list (such as subprograms in
14804 * sem_disp.adb (Derives_From): Use correct condition for checking that
14805 a formal's type is derived from the type of the corresponding formal in
14806 the parent subprogram (the condition was completely wrong). Add
14807 checking that was missing for controlling result types being derived
14808 from the result type of the parent operation.
14810 2011-08-02 Yannick Moy <moy@adacore.com>
14812 * errout.adb (First_Node): minor renaming
14813 * restrict.adb (Check_Formal_Restriction): put restriction warning on
14816 2011-08-02 Yannick Moy <moy@adacore.com>
14818 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
14819 before accessing operands.
14820 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
14821 decide whether an initialization expression respects SPARK rules, as
14822 the plain node is the expanded one. This allows for more valid warnings
14824 * gnat_rm.texi: Minor update.
14826 2011-08-02 Arnaud Charlet <charlet@adacore.com>
14828 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
14831 2011-08-02 Robert Dewar <dewar@adacore.com>
14833 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
14835 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
14837 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
14838 loop statements and the element renaming declaration with a block when
14839 the element type is controlled.
14841 2011-08-02 Yannick Moy <moy@adacore.com>
14843 * sinfo.ads: Minor formatting.
14845 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14847 * sem_aggr.adb (Add_Association): if the association has a box and no
14848 expression, use the Sloc of the aggregate itself for the new
14850 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
14853 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
14855 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
14856 When a container is provided via a function call, generate a renaming
14857 of the function result. This avoids the creation of a transient scope
14858 and the premature finalization of the container.
14859 * exp_ch7.adb (Is_Container_Cursor): Removed.
14860 (Wrap_Transient_Declaration): Remove the supression of the finalization
14861 of the list controller when the declaration denotes a container cursor,
14864 2011-08-02 Yannick Moy <moy@adacore.com>
14866 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
14867 node is from source, instead of the original node being from source.
14869 (Resolve_Array_Aggregate): refine the check for a static expression, to
14870 recognize also static ranges
14871 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
14872 Array_Type_Declaration): postpone the test for the type being a subtype
14873 mark after the type has been resolved, so that component-selection and
14874 expanded-name are discriminated.
14875 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
14876 to distinguish the case of an iteration scheme, so that an error is
14877 issed on a non-static range in SPARK except in an iteration scheme.
14878 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
14879 In_Iter_Schm = True.
14880 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
14881 user-defined operators so that they are allowed in renaming
14883 (Find_Selected_Component): refine the check for prefixing of operators
14884 so that they are allowed in renaming. Move the checks for restrictions
14885 on selector name after analysis discriminated between
14886 component-selection and expanded-name.
14887 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
14888 concatenation argument of string type if it is static.
14889 * sem_util.adb, sem_util.ads
14890 (Check_Later_Vs_Basic_Declarations): add a new function
14891 Is_Later_Declarative_Item to decice which declarations are allowed as
14892 later items, in the two different modes Ada 83 and SPARK. In the SPARK
14893 mode, add that renamings are considered as later items.
14894 (Enclosing_Package): new function to return the enclosing package
14895 (Enter_Name): correct the rule for homonyms in SPARK
14896 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
14897 from source (result of expansion) to avoid issuing wrong warnings.
14899 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14901 * errout.adb: On anything but an expression First_Node returns its
14904 2011-08-02 Pascal Obry <obry@adacore.com>
14906 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
14908 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
14910 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
14911 Set the associated loop as the related expression of internally
14913 * exp_ch7.adb (Is_Container_Cursor): New routine.
14914 (Wrap_Transient_Declaration): Supress the finalization of the list
14915 controller when the declaration denotes a container cursor.
14917 2011-08-02 Yannick Moy <moy@adacore.com>
14919 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
14921 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
14922 expression is a simple expression. This check cannot be performed in
14923 the semantics, so just drop it.
14924 (P_Index_Or_Discriminant_Constraint): move check that the index or
14925 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
14926 semantics. Other cases were previously checked in the semantics.
14927 * par-ch4.adb (P_Name): move checks that a selector name is not
14928 character literal or an operator symbol to Find_Selected_Component in
14930 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
14931 declarations are not placed after later declarations in a separate
14932 procedure in Sem_Util (possibly not the best choice?), to be used both
14933 during parsing, for Ada 83 mode, and during semantic analysis, for
14935 * par-endh.adb (Check_End): move check that end label is not missing
14936 to Process_End_Label in the semantics
14937 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
14938 the special case for SPARK restriction
14939 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
14940 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
14941 parameter Force to issue the error message even on internal node (used
14942 for generated end label). Call Check_Restriction to check when an error
14943 must be issued. In SPARK mode, issue an error message even if the
14944 restriction is not set.
14945 (Check_Restriction): new procedure with an additional out parameter to
14946 inform the caller that a message has been issued
14947 * sem_aggr.adb: Minor modification of message
14948 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
14949 instead of issuing an error message directly
14950 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
14951 declarations are not placed after later declarations, by calling
14952 Check_Later_Vs_Basic_Declarations
14953 (Analyze_Subtype_Declaration): move here the check that an index or
14954 discriminant constraint must be a subtype mark. Change the check that
14955 a subtype of String must start at one so that it works on subtype marks.
14956 * sem_ch4.adb (Analyze_Call): move here the check that a named
14957 association cannot follow a positional one in a call
14958 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
14959 instead of issuing an error message directly
14960 * sem_ch8.adb (Find_Selected_Component): move here the check that a
14961 selector name is not a character literal or an operator symbol. Move
14962 here the check that the prefix of an expanded name cannot be a
14963 subprogram or a loop statement.
14964 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
14965 procedure called from parsing and semantics to check that basic
14966 declarations are not placed after later declarations
14967 (Process_End_Label): move here the check that end label is not missing
14969 2011-08-02 Arnaud Charlet <charlet@adacore.com>
14971 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
14972 representation clause in codepeer mode, since it confuses CodePeer and
14973 does not bring useful info.
14975 2011-08-02 Ed Falis <falis@adacore.com>
14977 * init.c: initialize fp hw on MILS.
14979 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14981 * errout.adb (First_Node): for bodies, return the node itself (small
14982 optimization). For other nodes, do not check source_unit if the node
14983 comes from Standard.
14985 2011-08-02 Robert Dewar <dewar@adacore.com>
14987 * exp_ch3.adb: Minor comment additions.
14988 * sem_ch13.adb: Minor reformatting.
14990 2011-08-02 Pascal Obry <obry@adacore.com>
14992 * make.adb, makeutl.adb: Removes some superfluous directory separator.
14994 2011-08-02 Robert Dewar <dewar@adacore.com>
14996 * sem_attr.adb: Minor reformatting.
14998 2011-08-02 Robert Dewar <dewar@adacore.com>
15000 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
15001 (Has_Default_Component_Value): Removed
15002 * einfo.ads Comment updates
15003 (Has_Default_Aspect): Replaces Has_Default_Value
15004 (Has_Default_Component_Value): Removed
15006 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
15008 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
15009 (Get_Simple_Init_Val): Handle Default_Value aspect
15010 (Needs_Simple_Initialization): Handle Default_Value aspect
15011 * exp_ch3.ads: Needs_Simple_Initialization
15012 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
15013 * par-prag.adb (Pragma_Default[_Component]Value) Removed
15015 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
15016 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
15017 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
15019 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15021 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
15022 package containing iteration primitives.
15023 exp_ch5.adb (Expand_Iterator_Loop): ditto.
15025 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15027 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
15028 "of", pre-analyze expression in case it is a function call with
15029 finalization actions that must be placed ahead of the loop.
15030 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
15031 on an Ada2012 iterator, insert them ahead of the rewritten loop.
15033 2011-08-02 Geert Bosch <bosch@adacore.com>
15035 * cstand.adb (Create_Float_Types): Only consider C's long double for
15036 Long_Long_Float, in addition to double.
15038 2011-08-02 Robert Dewar <dewar@adacore.com>
15040 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
15041 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
15042 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
15043 Minor reformatting.
15045 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15047 * sem_attr.adb: handle properly 'Result when it is a prefix of an
15050 2011-08-02 Javier Miranda <miranda@adacore.com>
15052 * einfo.ads, einfo.adb
15053 (Original_Access_Type): Move this attribute to Node26 since there was
15054 an undocumented use of Node21 in E_Access_Subprogram_Type entities
15055 which causes conflicts and breaks the generation of the .NET compiler.
15056 (Interface_Name): Add missing documentation on JGNAT only uses of
15059 2011-08-02 Geert Bosch <bosch@adacore.com>
15061 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
15062 (Find_Back_End_Float_Type): Likewise
15063 (Create_Back_End_Float_Types): Likewise
15064 (Create_Float_Types): Likewise
15065 (Register_Float_Type): Likewise
15066 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
15067 Nlist and split out type selection in new local Find_Base_Type function.
15068 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
15070 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
15072 2011-08-02 Robert Dewar <dewar@adacore.com>
15074 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
15076 * opt.ads: Minor comment change.
15077 * sem_ch12.adb: Minor code reorganization.
15079 2011-08-02 Gary Dismukes <dismukes@adacore.com>
15081 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
15082 subtype's list of rep items to the list on the full subtype in the case
15083 where the lists are the same.
15085 2011-08-02 Geert Bosch <bosch@adacore.com>
15087 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
15088 using the one from System.Strings, which also deallocates all strings.
15090 2011-08-02 Geert Bosch <bosch@adacore.com>
15092 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
15094 * gcc-interface/Make-lang.in: Update dependencies.
15096 2011-08-02 Olivier Hainque <hainque@adacore.com>
15098 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
15101 2011-08-02 Javier Miranda <miranda@adacore.com>
15103 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
15104 associated with anonymous access to subprograms.
15106 2011-08-02 Geert Bosch <bosch@adacore.com>
15109 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
15110 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
15111 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
15112 (Add_Symbol_Definition): Move to switch-c.adb
15113 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
15114 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
15115 (Add_Symbol_Definition): Move to switch-c.adb.
15116 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
15118 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
15119 Move to warnsw.adb.
15120 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
15121 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
15122 Move to warnsw.adb.
15123 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
15124 (Add_Symbol_Definition): Moved from Prepcomp.
15125 * switch-c.ads: Update copyright notice. Use String_List instead of
15126 Argument_List, removing dependency on System.OS_Lib.
15128 2011-08-02 Yannick Moy <moy@adacore.com>
15130 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
15131 mode on initialization expression which does not respect SPARK
15133 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
15134 if the tree referenced by its argument represents an initialization
15135 expression in SPARK, suitable for initializing an object in an object
15138 2011-08-02 Javier Miranda <miranda@adacore.com>
15140 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
15141 internally generated access to subprogram with its associated protected
15143 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
15145 2011-08-02 Geert Bosch <bosch@adacore.com>
15147 * cstand.adb (Register_Float_Type): Print information about type to
15148 register, if the Debug_Flag_Dot_B is set.
15149 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
15150 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
15151 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
15152 with a requested precision of more than Max_Digits digits and no more
15153 than Max_Base_Digits digits, if a range specification is present and the
15154 Predefined_Float_Types list has a suitable type to derive from.
15155 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
15156 case of type completion with pragma Import
15158 (Process_Import_Predefined_Type): Processing to complete a type
15159 with pragma Import. Currently supports floating point types only.
15160 (Set_Convention_From_Pragma): Do nothing without underlying type.
15161 (Process_Convention): Guard against absence of underlying type,
15162 which may happen when importing incomplete types.
15163 (Process_Import_Or_Interface): Handle case of importing predefined
15164 types. Tweak error message.
15166 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
15168 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
15169 functions to previous change. Reorganize code slightly.
15171 2011-08-02 Geert Bosch <bosch@adacore.com>
15173 * back_end.ads (Register_Type_Proc): New call back procedure type for
15174 allowing the back end to provide information about available types.
15175 (Register_Back_End_Types): New procedure to register back end types.
15176 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
15178 * cstand.adb (Back_End_Float_Types): New list for floating point types
15179 supported by the back end.
15180 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
15181 (Copy_Float_Type): New procedure to make new copies of predefined types.
15182 (Register_Float_Type): New call back procedure to populate the BEFT list
15183 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
15184 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
15185 (Create_Float_Types): New procedure to create entities for floating
15186 point types predefined in Standard, and put these and any remaining
15187 BEFTs on the Predefined_Float_Types list.
15188 * stand.ads (Predefined_Float_Types): New list for predefined floating
15189 point types that do not have declarations in package Standard.
15191 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
15193 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
15194 entity node for the unit containing the parameter.
15195 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
15196 (Add_Inlined_Subprogram): Likewise.
15197 * gcc-interface/Make-lang.in: Update dependencies.
15199 2011-08-02 Thomas Quinot <quinot@adacore.com>
15201 * s-stusta.adb (Print): Make sure Pos is always initialized to a
15204 2011-08-02 Geert Bosch <bosch@adacore.com>
15206 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
15208 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
15210 * sem_type.adb (Covers): Move trivial case to the top and reuse the
15211 computed value of Base_Type.
15213 2011-08-02 Yannick Moy <moy@adacore.com>
15215 * restrict.adb (Check_Restriction): issue an error for any use of
15216 class-wide, even if the No_Dispatch restriction is not set.
15217 * sem_aggr.adb: Correct typos in comments and messages in formal mode
15218 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
15219 when completing a private extension, the type named in the private part
15220 is not the same as that named in the visible part.
15221 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
15222 of an inherited primitive operations of a tagged type or type extension
15223 that returns the tagged type.
15224 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
15225 function which returns True for an implicit operation inherited by the
15226 derived type declaration for the argument type.
15227 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
15230 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15232 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
15233 Process_Bounds, to perform analysis with expansion of a range or an
15234 expression that is the iteration scheme for a loop.
15235 (Analyze_Iterator_Specification): If domain of iteration is given by a
15236 function call with a controlled result, as is the case if call returns
15237 a predefined container, ensure that finalization actions are properly
15239 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
15241 2011-08-02 Javier Miranda <miranda@adacore.com>
15243 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
15244 * gcc-interface/Make-lang.in: Update dependencies.
15246 2011-08-02 Javier Miranda <miranda@adacore.com>
15248 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
15249 determine if the analysis is performed using N or Original_Node (N).
15250 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
15251 functionality of routine Is_Variable avoids code duplication.
15252 * checks.adb (Determine_Range): Handle temporaries generated by
15253 Remove_Side_Effects.
15255 2011-08-02 Javier Miranda <miranda@adacore.com>
15257 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
15258 expansion of the condition. Required since the previous analysis was
15259 done with expansion disabled (see Resolve_Quantified_Expression) and
15260 hence checks were not inserted and record comparisons have not been
15263 2011-08-02 Ed Falis <falis@adacore.com>
15265 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
15268 2011-08-02 Bob Duff <duff@adacore.com>
15270 * opt.ads: Minor comment fix.
15272 2011-08-02 Bob Duff <duff@adacore.com>
15274 * sem_ch12.adb (Analyze_Package_Instantiation,
15275 Analyze_Subprogram_Instantiation): Turn off style checking while
15276 analyzing an instance. Whatever style checks that apply to the generic
15277 unit should apply, so it makes no sense to apply them in an instance.
15278 This was causing trouble when compiling an instance of a runtime
15279 unit that violates the -gnatyO switch.
15280 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
15281 one of the two case statements, causing spurious errors.
15283 2011-08-02 Robert Dewar <dewar@adacore.com>
15285 * uname.adb: Minor reformatting.
15286 * gnatcmd.adb: Minor reformatting.
15287 * exp_attr.adb: Minor reformatting.
15289 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15291 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
15292 No_Dispatching_Calls, do not look for the Assign primitive, because
15293 predefined primitives are not created in this case.
15295 2011-08-02 Bob Duff <duff@adacore.com>
15297 * stylesw.ads: Minor comment fixes.
15299 2011-08-02 Robert Dewar <dewar@adacore.com>
15301 * freeze.adb (Add_To_Result): New procedure.
15303 2011-08-02 Jose Ruiz <ruiz@adacore.com>
15305 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
15306 time, if the specific run-time routines for handling streams of strings
15307 are not available, use the default mechanism.
15309 2011-08-02 Arnaud Charlet <charlet@adacore.com>
15311 * s-regpat.ads: Fix typo.
15313 2011-08-02 Vincent Celier <celier@adacore.com>
15315 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
15316 not null, call it to create the in memory config project file without
15317 parsing an existing default config project file.
15319 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
15321 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
15323 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15325 * sem_elim.adb: an abstract subprogram does not need an eliminate
15326 pragma for its descendant to be eliminable.
15328 2011-08-02 Ed Falis <falis@adacore.com>
15330 * init.c: revert to handling before previous checkin for VxWorks
15331 * s-intman-vxworks.adb: delete unnecessary declarations related to
15332 using Ada interrupt facilities for handling signals.
15333 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
15334 * s-intman-vxworks.ads: Import __gnat_install_handler as
15335 Initialize_Interrupts.
15336 * s-taprop-vxworks.adb: Delete Signal_Mask.
15337 (Abort_Handler): change construction of mask to unblock exception
15340 2011-08-02 Jerome Guitton <guitton@adacore.com>
15342 * a-except-2005.adb (Raise_From_Signal_Handler): Call
15343 Debug_Raise_Exception before propagation starts.
15345 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
15347 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
15348 to Restriction_Check_Required.
15349 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
15350 * sem_res.adb (Resolve_Call): Likewise.
15351 * sem_attr.adb (Check_Stream_Attribute): Likewise.
15353 2011-08-02 Bob Duff <duff@adacore.com>
15355 * stylesw.ads: Update comment.
15356 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
15357 * errout.ads: Remove obsolete comment.
15359 2011-08-02 Javier Miranda <miranda@adacore.com>
15361 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
15362 (Set_Is_Safe_To_Reevaluate): new procedure.
15363 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
15364 assignment is allowed on safe-to-reevaluate variables.
15365 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
15366 temporary created to remove side effects in expressions that use
15367 the secondary stack as safe-to-reevaluate.
15368 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
15369 variables that are not true constants.
15371 2011-08-02 Robert Dewar <dewar@adacore.com>
15373 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
15374 sem_res.adb, sem_ch6.adb: Minor reformatting.
15376 2011-08-02 Jerome Guitton <guitton@adacore.com>
15378 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
15380 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15382 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
15383 not set Overridden_Operation if subprogram is an initialization
15386 2011-08-02 Yannick Moy <moy@adacore.com>
15388 * par-ch6.adb: Correct obsolete name in comments
15389 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
15390 which takes two message arguments (existing function takes one), with
15391 second message used for continuation.
15392 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
15393 block statements that originate from a source block statement, not
15394 generated block statements
15395 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
15396 symmetry with procedure case
15397 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
15398 function to issue an error in formal mode if a package specification
15399 contains more than one tagged type or type extension.
15400 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
15401 parameters matching formals of tagged types are objects (or ancestor
15402 type conversions of objects), not general expressions. Issue an error
15403 on view conversions that are not involving ancestor conversion of an
15405 (Resolve_Type_Conversion): in formal mode, issue an error on the
15406 operand of an ancestor type conversion which is not an object
15407 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
15408 procedure so that it works also for actuals of function calls
15409 (Is_Actual_Tagged_Parameter): new function which determines if its
15410 argument is an actual parameter of a formal of tagged type in a
15412 (Is_SPARK_Object_Reference): new function which determines if the tree
15413 referenced by its argument represents an object in SPARK
15415 2011-08-02 Robert Dewar <dewar@adacore.com>
15417 * sem_ch3.adb: Minor reformatting
15418 Minor comment addition
15419 Minor error msg text change
15421 2011-08-02 Javier Miranda <miranda@adacore.com>
15423 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
15424 function. Used to be more precise when we generate a variable plus one
15425 assignment to remove side effects in the evaluation of the Bound
15427 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
15428 of the bound expression to force its re-analysis and thus expand the
15429 associated transient scope (if required). Code cleanup replacing the
15430 previous code that declared the constant entity by an invocation to
15431 routine Force_Evaluation which centralizes this work in the frontend.
15433 2011-08-02 Robert Dewar <dewar@adacore.com>
15435 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
15436 (Base_Type): Now uses improved Is_Base_Type function
15437 * einfo.ads (Base_Type): Inline this function
15439 2011-08-02 Robert Dewar <dewar@adacore.com>
15441 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
15442 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
15444 2011-08-02 Arnaud Charlet <charlet@adacore.com>
15446 * gcc-interface/Make-lang.in: Update dependencies.
15447 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
15450 2011-08-02 Yannick Moy <moy@adacore.com>
15452 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
15453 non-simple expression used in delta constraint
15454 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
15455 index constraint which is not a subtype mark
15456 * par.adb: With and use Restrict
15457 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
15458 mode on component type which is not a subtype mark and default
15459 expression on component
15460 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
15461 of string which does not have a lower index bound equal to 1
15462 (Array_Type_Declaration): issue an error in formal mode on index or
15463 component type which is not a subtype mark, and on aliased keyword on
15465 (Derived_Type_Declaration): issue an error in formal mode on interface,
15466 limited or abstract type
15467 (Record_Type_Declaration): issue an error in formal mode on interface
15468 (Record_Type_Definition): issue an error in formal mode on tagged types
15469 and type extensions not declared in the specification of a library unit
15470 package; on null non-tagged record; on variant part
15472 2011-08-02 Vincent Celier <celier@adacore.com>
15474 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
15475 not declared for qualified library project when Library_Name is not
15476 declared, but Library_Dir is.
15478 2011-08-02 Robert Dewar <dewar@adacore.com>
15480 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
15481 pragmas (affects aspects [Component_]Default_Value
15482 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
15483 component type for the resolution
15485 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
15487 * einfo.adb (Base_Type): Tune implementation for speed.
15489 2011-08-02 Robert Dewar <dewar@adacore.com>
15491 * freeze.adb: Minor reformatting.
15493 2011-08-02 Thomas Quinot <quinot@adacore.com>
15495 * scos.ads: Update comments.
15497 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15499 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
15500 base type, because the parent may be a subtype of a private type whose
15501 convention is established in a private part.
15503 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
15505 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
15506 statement in a block when the expansion of the return expression has
15507 created a finalization chain.
15508 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
15509 with the parent node.
15510 Add N_Extended_Return_Statement to handle the case where a transient
15511 object declaration appears in the Return_Object_Declarations list of
15512 an extended return statement.
15514 2011-08-02 Matthew Gingell <gingell@adacore.com>
15516 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
15517 unused parameter 'name'.
15519 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15521 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
15522 inherited operation, check whether its alias, which is the source
15523 operastion that it renames, has been marked eliminated.
15525 2011-08-02 Javier Miranda <miranda@adacore.com>
15527 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
15528 in-mode parameter whose type is an access type since it can be used to
15529 modify its designated object. Enforce code that handles as safe an
15530 access type that is not access-to-constant but it is the result of a
15531 previous removal of side-effects.
15532 (Remove_Side_Effects): Minor code reorganization of cases which require
15533 no action. Done to incorporate documentation on new cases uncovered
15534 working in this ticket: no action needed if this routine was invoked
15535 too early and the nodes are not yet decorated.
15536 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
15537 to routine Remove_Side_Effects by calls to Force_Evaluation since they
15538 were issued with actuals that are implicitly provided by
15541 2011-08-02 Robert Dewar <dewar@adacore.com>
15543 * sem_ch3.adb, sem_res.adb: Minor reformatting.
15545 2011-08-02 Yannick Moy <moy@adacore.com>
15547 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
15548 to issue an error in formal mode on attribute not supported in this mode
15549 (Analyze_Attribute): issue errors on standard attributes not supported
15551 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
15552 comment, and issue error in formal mode on modulus which is not a power
15554 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
15556 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
15558 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
15559 operator on modular type (except 'not').
15561 2011-08-02 Robert Dewar <dewar@adacore.com>
15563 * gnat_rm.texi: Minor reformatting.
15565 2011-08-02 Arnaud Charlet <charlet@adacore.com>
15567 * s-osinte-linux.ads: Minor comment update and reformatting.
15568 * i-cexten.ads: Make this unit pure, as for its parent.
15569 Will allow its usage in more contexts if needed.
15571 2011-08-02 Robert Dewar <dewar@adacore.com>
15573 * s-utf_32.ads: Minor comment fix.
15575 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15577 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
15578 operation of a tagged synchronized type, handle the case where the
15579 controlling argument is overloaded.
15581 2011-08-02 Yannick Moy <moy@adacore.com>
15583 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
15584 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
15585 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
15586 SPARK mode and formal verification mode on processing SPARK restriction
15587 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
15588 requiring consistency checking.
15590 2011-08-02 Robert Dewar <dewar@adacore.com>
15592 * sem_res.adb: Minor reformatting.
15594 2011-08-02 Robert Dewar <dewar@adacore.com>
15596 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
15597 a-cforse.ads: Remove unneeded with of Ada.Containers
15598 Remove commented out pragma Inline's
15599 Move specifications of new subprograms to the actual specs
15601 2011-08-02 Yannick Moy <moy@adacore.com>
15603 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
15604 a-cforse.ads: Update comments.
15606 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15608 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
15610 2011-08-02 Robert Dewar <dewar@adacore.com>
15612 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
15613 a-cforse.ads, a-cofove.ads: Minor reformatting.
15615 2011-08-02 Claire Dross <dross@adacore.com>
15617 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
15618 a-cofove.ads: Add comments.
15620 2011-08-02 Yannick Moy <moy@adacore.com>
15622 * gnat_rm.texi: Document formal containers.
15624 2011-08-02 Emmanuel Briot <briot@adacore.com>
15626 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
15627 are empty sections.
15629 2011-08-02 Robert Dewar <dewar@adacore.com>
15631 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
15634 2011-08-02 Robert Dewar <dewar@adacore.com>
15636 * aspects.adb: New aspects Default_Value and Default_Component_Value
15637 New format of Aspect_Names table checks for omitted entries
15638 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
15639 handling of boolean aspects for derived types.
15640 New aspects Default_Value and Default_Component_Value
15641 New format of Aspect_Names table checks for omitted entries
15642 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
15643 (Has_Default_Value): New flag
15644 (Has_Default_Component_Value): New flag
15645 (Has_Default_Value): New flag
15646 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
15648 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
15649 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
15650 Default_Value and Default_Component_Value
15651 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
15652 New aspects Default_Value and Default_Component_Value
15653 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
15654 * sprint.adb: Print N_Aspect_Specification node when called from gdb
15656 2011-08-02 Vincent Celier <celier@adacore.com>
15658 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
15659 inherit library kind.
15661 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15663 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
15664 Minor reformatting.
15666 2011-08-02 Robert Dewar <dewar@adacore.com>
15668 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
15670 2011-08-02 Yannick Moy <moy@adacore.com>
15672 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
15674 2011-08-02 Robert Dewar <dewar@adacore.com>
15676 * impunit.adb: Add comment.
15678 2011-08-02 Yannick Moy <moy@adacore.com>
15680 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
15681 qualification of aggregates in formal mode
15682 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
15684 (Resolve_Aggregate): complete the test that an aggregate is adequately
15685 qualified in formal mode
15687 2011-08-02 Pascal Obry <obry@adacore.com>
15689 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
15690 * mlib-prj.adb: Supress warning when compiling binder generated file.
15691 (Build_Library): Supress all warnings when compiling the binder
15694 2011-08-02 Yannick Moy <moy@adacore.com>
15696 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
15698 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
15699 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
15700 Add with/use clauses to make Check_Formal_Restriction visible
15702 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15704 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
15705 in-parameters when type of the generic formal is private in the generic
15706 spec and non-private in the body.
15708 2011-08-02 Claire Dross <dross@adacore.com>
15710 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
15711 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
15712 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
15713 * impunit.adb, Makefile.rtl: Take new files into account.
15715 2011-08-02 Robert Dewar <dewar@adacore.com>
15717 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
15718 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
15720 2011-08-02 Yannick Moy <moy@adacore.com>
15722 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
15724 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
15725 matching static array bounds, taking into account the special case of
15727 * sem_ch3.adb: Typo in comment.
15729 2011-08-02 Yannick Moy <moy@adacore.com>
15731 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
15732 which issues an error in formal mode if its argument node is originally
15734 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
15735 has a discriminant specification so that it does not include the case
15737 (Derived_Type_Declaration): move here the test that a derived type has a
15738 discriminant specification
15739 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
15740 first element of a component association before accessing its choices
15741 (presence of component association is not enough)
15742 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
15743 declaration is a library item before accessing the next element in a
15744 list, as library items are not member of lists
15745 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
15746 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
15747 Check_Formal_Restriction whenever possible.
15749 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15751 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
15752 reference when needed.
15754 2011-08-02 Bob Duff <duff@adacore.com>
15756 * gnat_ugn.texi: Fix typo.
15758 2011-08-02 Vincent Celier <celier@adacore.com>
15760 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
15761 archive file name. Do not use the full path name of archives for Open
15764 2011-08-02 Robert Dewar <dewar@adacore.com>
15766 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
15767 Analyze_Aspect_Specifications
15769 (Analyze_Aspect_Specifications): New handling for boolean aspects
15770 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
15771 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
15772 sequence for Analyze_Aspect_Specifications
15773 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
15774 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
15776 2011-08-02 Robert Dewar <dewar@adacore.com>
15778 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
15779 aspects, since these no longer exist.
15781 2011-08-02 Robert Dewar <dewar@adacore.com>
15783 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
15784 semicolon, do not try to see if there are aspects following it.
15785 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
15788 2011-08-02 Robert Dewar <dewar@adacore.com>
15790 * sem_ch8.adb, aspects.ads: Minor reformatting.
15792 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
15794 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
15795 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
15797 (Analyze_Aspect_Specifications): ...here. Call above procedure.
15799 2011-08-02 Yannick Moy <moy@adacore.com>
15801 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
15802 mode on subprogram declaration outside of package specification, unless
15803 it is followed by a pragma Import
15804 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
15805 Access_Type_Declaration): issue error in formal mode on access type
15806 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
15808 (Analyze_Object_Declaration): issue error in formal mode on object
15809 declaration which does not respect SPARK restrictions
15810 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
15811 declaration which does not respect SPARK restrictions
15812 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
15813 error in formal mode on digits or delta constraint
15814 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
15815 decimal fixed point type
15816 (Derived_Type_Declaration): issue error in formal mode on derived type
15817 other than type extensions of tagged record types
15818 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
15819 with check on access definition
15820 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
15821 mode on protected definition.
15822 (Analyze_Task_Definition): issue error in formal mode on task definition
15824 2011-08-02 Robert Dewar <dewar@adacore.com>
15826 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
15828 2011-08-02 Javier Miranda <miranda@adacore.com>
15830 * sem_ch6.adb (Can_Override_Operator): New function.
15831 (Verify_Overriding_Indicator): Add missing code to check overriding
15832 indicator in operators. Fixes regression.
15833 (Check_Overriding_Indicator): Minor reformating after replacing the
15834 code that evaluates if the subprogram can override an operator by
15835 invocations to the above new function.
15837 (Write_Field26_Name): Add missing code to ensure that, following
15838 the documentation in einfo.ads, this field is not shown as attribute
15839 "Static_Initialization" on non-dispatching functions.
15841 2011-08-02 Jose Ruiz <ruiz@adacore.com>
15843 * sem_res.adb (Resolve_Call): A call to
15844 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
15845 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
15846 i.e., when the second parameter is of type Time_Span.
15848 2011-08-02 Vincent Celier <celier@adacore.com>
15850 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
15851 with an archive instead of -L<library dir> -l<library name>.
15853 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15855 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
15856 mark the base types In_Use in addition to making the operations
15859 2011-08-02 Ed Falis <falis@adacore.com>
15861 * init.c: add and setup __gnat_signal_mask for the exception signals
15862 * s-inmaop-vxworks.adb: new file.
15863 * s-intman-vxworks.adb: remove unnecessary initializations and
15865 * s-intman-vxworks.ads: remove unnecessary variable
15866 * s-taprop-vxworks.adb: simplify signal initialization
15868 2011-08-02 Robert Dewar <dewar@adacore.com>
15870 * sem_ch8.adb: Minor code reorganization, comment updates.
15872 2011-08-02 Robert Dewar <dewar@adacore.com>
15874 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
15875 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
15877 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
15878 (Matching_Static_Array_Bounds): Moved here from Sem_Res
15880 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15882 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
15883 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
15884 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
15885 use_type_clauses, to handle more efficiently use_type and use_all_type
15887 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
15888 Ada2012 Use_All_Type clause.
15889 (Use_Class_Wide_Operations): new procedure.
15891 2011-08-02 Robert Dewar <dewar@adacore.com>
15893 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
15894 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
15895 expression to expression function.
15897 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15899 * sem_ch4.adb: transform simple Ada2012 membership into equality only
15900 if types are compatible.
15902 2011-08-02 Yannick Moy <moy@adacore.com>
15904 * sem_res.adb (Matching_Static_Array_Bounds): new function which
15905 returns True if its argument array types have same dimension and same
15906 static bounds at each index.
15907 (Resolve_Actuals): issue an error in formal mode on actuals passed as
15908 OUT or IN OUT paramaters which are not view conversions in SPARK.
15909 (Resolve_Arithmetic_Op): issue an error in formal mode on
15910 multiplication or division with operands of fixed point types which are
15911 not qualified or explicitly converted.
15912 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
15913 Boolean or array type (except String) operands.
15914 (Resolve_Equality_Op): issue an error in formal mode on equality
15915 operators for array types other than String with non-matching static
15917 (Resolve_Logical_Op): issue an error in formal mode on logical operators
15918 for array types with non-matching static bounds. Factorize the code in
15919 Matching_Static_Array_Bounds.
15920 (Resolve_Qualified_Expression): issue an error in formal mode on
15921 qualified expressions for array types with non-matching static bounds.
15922 (Resolve_Type_Conversion): issue an error in formal mode on type
15923 conversion for array types with non-matching static bounds
15925 2011-08-02 Robert Dewar <dewar@adacore.com>
15927 * par-ch10.adb: Minor code reorganization (use Nkind_In).
15929 2011-08-02 Ed Schonberg <schonberg@adacore.com>
15931 * par-ch9.adb: save location of entry for proper error message.
15933 2011-08-02 Javier Miranda <miranda@adacore.com>
15935 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
15936 (Use_Full_View) which permits this routine to climb through the
15937 ancestors using the full-view of private parents.
15938 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
15939 Use_Full_View to true in calls to Is_Ancestor.
15940 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
15941 true in call to Is_Ancestor.
15942 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
15943 Use_Full_View to true in call to Is_Ancestor.
15944 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
15945 call to Is_Ancestor.
15946 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
15947 Use_Full_View to true in calls to Is_Ancestor.
15948 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
15949 Make_Select_Specific_Data_Table, Register_Primitive,
15950 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
15951 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
15952 to true in call to Is_Ancestor.
15953 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
15954 Use_Full_View to true in calls to Is_Ancestor.
15956 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
15957 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
15959 2011-08-02 Robert Dewar <dewar@adacore.com>
15961 * gnat_rm.texi: Minor reformatting.
15962 * sem_prag.adb: Minor reformatting.
15964 2011-08-02 Tristan Gingold <gingold@adacore.com>
15966 * vms_data.ads: Add VMS qualifier for -gnateP.
15968 2011-08-02 Robert Dewar <dewar@adacore.com>
15970 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
15971 * par-ch7.adb (P_Package): Proper placement of aspects for package
15972 decl/instantiation.
15973 * par-endh.adb (Check_End): Ad Is_Sloc parameter
15974 (End_Statements): Add Is_Sloc parameterr
15975 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
15976 (Check_End): Ad Is_Sloc parameter
15977 (End_Statements): Add Is_Sloc parameterr
15979 2011-08-02 Vincent Celier <celier@adacore.com>
15981 * ug_words: Add VMS qualifier equivalent to -gnateP:
15982 /SYMBOL_PREPROCESSING.
15984 2011-08-02 Jose Ruiz <ruiz@adacore.com>
15986 * gnat-style.texi: For hexadecimal numeric literals the typical
15987 grouping of digits is 4 to represent 2 bytes.
15988 A procedure spec which is split into several lines is indented two
15991 2011-08-02 Yannick Moy <moy@adacore.com>
15993 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
15994 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
15995 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
15997 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
15998 choice in array aggregate
15999 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
16001 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
16002 positional and named aggregate for record, or others in record
16003 aggregate, or multiple choice in record aggregate
16004 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
16005 array operands to logical operations AND, OR and XOR do not have the
16006 same static lower and higher bounds
16007 * sem_ch5.adb, sinfo.ads: Correct typos in comments
16009 2011-08-01 Robert Dewar <dewar@adacore.com>
16011 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
16012 Replaces Last_Source_Node_In_Sequence.
16013 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
16014 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
16015 parens and blank in string (this was inconsistently implemented).
16017 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
16018 blank in string (this was inconsistently implemented).
16020 (Set_Global_Switches): Set formal mode switches appropriately
16021 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
16023 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
16024 call Set_Error_Msg_Lang to set "spark" as language name.
16025 * par.adb: Remove unnecessary call to set formal language for errout
16026 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
16027 appropriately and call Set_Error_Msg_Lang to set "spark" as language
16029 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
16030 calls to it, moved after resolution so that types are known
16031 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
16032 result of concatenation is not of type String
16033 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
16034 concatenation is not properly restricted
16035 * gnat_rm.texi: Add doc on pragma Spark_95.
16036 * gcc-interface/Makefile.in: Remove obsolete target pairs for
16037 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
16038 * gcc-interface/Make-lang.in: Update dependencies.
16040 2011-08-01 Javier Miranda <miranda@adacore.com>
16042 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
16043 condition that detects if the overridden operation must replace an
16046 2011-08-01 Javier Miranda <miranda@adacore.com>
16048 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
16049 code declarations inserted by Insert_Actions in each alternative of the
16050 N_Case_Expression node.
16052 2011-08-01 Robert Dewar <dewar@adacore.com>
16054 * sem_ch6.adb: Minor code reorganization.
16055 * sem_util.adb: Minor reformatting.
16057 2011-08-01 Pascal Obry <obry@adacore.com>
16059 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
16060 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
16062 2011-08-01 Yannick Moy <moy@adacore.com>
16064 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
16065 literal or operator symbol which is prefixed
16066 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
16067 mode on access attributes.
16068 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
16069 that concatenation operands are properly restricted in formal mode
16070 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
16071 Analyze_Concatenation_Operand. Issue an error in formal mode if the
16072 result of the concatenation has a type different from String.
16073 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
16074 Analyze_Quantified_Expression, Analyze_Slice,
16075 Analyze_Null): issue an error in formal mode on unsupported constructs
16077 (Analyze_Block_Statement): only issue error on source block statement
16078 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
16079 function which returns the last node in a list of nodes for which
16080 Comes_From_Source returns True, if any
16081 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
16082 Last_Source_Node_In_Sequence
16083 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
16084 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
16085 mode on unsupported constructs
16086 * sem_ch9.adb Do not return after issuing error in formal mode, as the
16087 rest of the actions may be needed later on since the error is marked as
16089 * sinfo.ads: Typos in comments.
16091 2011-08-01 Pascal Obry <obry@adacore.com>
16093 * projects.texi: Minor editing.
16095 2011-08-01 Yannick Moy <moy@adacore.com>
16097 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
16098 insertion character ~~
16099 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
16100 (Set_Error_Msg_Lang): new procedure which fixes the language for use
16101 with insertion character ~~
16102 (Set_Msg_Text): treat insertion character ~~
16103 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
16104 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
16105 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
16106 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
16107 errors related to the formal language restriction not serious
16108 (insertion character |).
16109 * par.adb (Par): set formal language for error messages if needed
16110 * sem_ch6.adb (Check_Missing_Return): take into account possible
16111 generated statements at the end of the function
16112 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
16113 enumeration value to define a new pragma SPARK_95
16114 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
16115 SPARK_Version): new type and variables to store the SPARK version
16117 (SPARK_Mode): return True when SPARK_Version is set
16118 * par-prag.adb: Correct indentation
16119 (Prag): take Pragma_SPARK_95 into account
16120 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
16123 2011-08-01 Robert Dewar <dewar@adacore.com>
16125 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
16126 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
16127 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
16129 2011-08-01 Pascal Obry <obry@adacore.com>
16131 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
16132 Target_Name to Get_Path call.
16133 (Parse_Single_Project): Likewise.
16134 (Post_Parse_Context_Clause): Likewise.
16135 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
16136 Call Initialise_Project_Path with the proper Target_Name.
16137 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
16139 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
16140 with the proper Target_Name.
16141 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
16142 Part.Parse routine.
16143 (Parse_Project_And_Apply_Config): Likewise.
16144 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
16145 This is fine as this part of the code is supporting only native
16147 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
16148 is fine as this part of the code is supporting only native compilation.
16150 2011-08-01 Yannick Moy <moy@adacore.com>
16152 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
16153 of homonym, unless the homonym is one of the cases allowed in SPARK
16154 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
16155 package declaration occurring after a body.
16157 2011-08-01 Robert Dewar <dewar@adacore.com>
16159 * checks.adb, exp_ch4.adb: Minor reformatting.
16161 2011-08-01 Javier Miranda <miranda@adacore.com>
16163 * einfo.ads (Access_Disp_Table): Fix documentation.
16164 (Dispatch_Table_Wrappers): Fix documentation.
16166 2011-08-01 Pascal Obry <obry@adacore.com>
16168 * prj-env.adb, prj-env.ads: Minor reformatting.
16170 2011-08-01 Yannick Moy <moy@adacore.com>
16172 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
16173 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
16174 procedures out of these packages.
16175 * errout.ads, errout.adb
16176 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
16177 procedures in of this package
16178 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
16179 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
16180 on misplaced later vs initial declarations, like in Ada 83
16181 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
16182 formal mode on attribute of private type whose full type declaration
16184 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
16185 package declaration inside a package specification
16186 (Analyze_Full_Type_Declaration): issue error in formal mode on
16187 controlled type or discriminant type
16188 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
16189 user-defined operator means that it should come from the source
16190 (New_Overloaded_Entity): issue error in formal mode on overloaded
16192 * sem_ch6.ads, sem_ch13.ads: typos in comments.
16194 2011-08-01 Thomas Quinot <quinot@adacore.com>
16196 * atree.adb: Minor reformatting.
16197 * checks.adb: Minor reformatting.
16199 2011-08-01 Vincent Celier <celier@adacore.com>
16201 * s-parame-vms-ia64.ads: Fix typo in comment
16203 * s-parame-vms-restrict.ads: Removed, unused.
16205 2011-08-01 Javier Miranda <miranda@adacore.com>
16208 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
16210 (Constrain_Index): Remove side effects in the evaluation of the bounds.
16211 * sem_ch3.ads, sem_ch3.adb
16212 (Is_Constant_Bound): New extended version of the subprogram that was
16213 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
16214 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
16215 * sem_aux.ads (Constant_Value): Fix typo in comment.
16216 * checks.adb (Generate_Index_Checks): New implementation which, for
16217 array objects with constant bounds, generates the runtime check
16218 referencing the bounds of the array type. For other cases this routine
16219 provides its previous behavior obtaining such values from the array
16221 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
16223 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
16224 we cannot have semantic interpretations of the new node.
16226 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16228 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
16231 2011-08-01 Arnaud Charlet <charlet@adacore.com>
16233 * sem_ch8.adb: Minor code editing.
16234 * s-vxwext.adb: Remove trailing space.
16235 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
16236 consistency with other files.
16238 2011-08-01 Thomas Quinot <quinot@adacore.com>
16240 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
16242 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16244 * par-ch10.adb: reject parameterized expressions as compilation unit.
16245 * sem_ch4.adb: handle properly conditional expression with overloaded
16246 then_clause and no else_clause.
16248 2011-08-01 Tristan Gingold <gingold@adacore.com>
16250 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
16251 like done by System.Aux_DEC.
16252 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
16254 2011-08-01 Yannick Moy <moy@adacore.com>
16256 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
16257 missing label at end of declaration (subprogram or package)
16258 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
16259 of positional and named parameter association
16260 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
16261 Error_Msg_SP which adds a prefix to the error message giving the name
16262 of the formal language analyzed
16263 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
16264 access result type in subprogram, unconstrained array as result type,.
16265 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
16267 * sem_ch8.adb: Code clean up.
16269 2011-08-01 Javier Miranda <miranda@adacore.com>
16271 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
16272 * einfo.ads (Access_Disp_Table): Fix documentation.
16273 (Dispatch_Table_Wrappers): Fix documentation.
16274 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
16275 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
16276 to enforce the documentation of this attribute.
16277 (Set_Is_Interface): Cleanup the assertion.
16278 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
16279 the Underlying_Type entity before reading attribute Access_Disp_Table.
16280 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
16281 Locate the Underlying_Type before reading attribute Access_Disp_Table.
16282 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
16283 the Underlying_Type entity before reading attribute Access_Disp_Table.
16284 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
16285 Locate the Underlying_Type entity before reading attribute
16288 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16290 * s-poosiz.ads: Additional overriding indicators.
16292 2011-08-01 Yannick Moy <moy@adacore.com>
16294 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
16296 (Analyze_Iteration_Scheme): issue error in formal mode when loop
16297 parameter specification does not include a subtype mark.
16298 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
16299 formal mode on abstract subprogram.
16300 (Analyze_Subprogram_Specification): issue error in formal mode on
16301 user-defined operator.
16302 (Process_Formals): issue error in formal mode on access parameter and
16303 default expression.
16304 * sem_ch9.adb (Analyze_Abort_Statement,
16305 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
16306 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
16307 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
16308 Analyze_Requeue, Analyze_Selective_Accept,
16309 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
16310 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
16311 issue error in formal mode on user-defined raise statement.
16313 2011-08-01 Thomas Quinot <quinot@adacore.com>
16315 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
16316 declaration being hidden when overriding an implicit inherited
16318 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
16319 (-gnats), do not complain about a source file that contains only a
16322 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16324 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
16325 variable if already set.
16327 2011-08-01 Arnaud Charlet <charlet@adacore.com>
16329 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
16330 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
16331 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
16332 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
16333 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
16334 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
16335 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
16336 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
16337 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
16338 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
16339 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
16340 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
16341 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
16342 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
16343 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
16344 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
16345 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
16346 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
16347 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
16348 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
16349 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
16350 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
16351 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
16352 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
16353 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
16354 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
16355 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
16356 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
16357 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
16358 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
16359 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
16360 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
16361 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
16362 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
16363 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
16364 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
16365 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
16366 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
16367 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
16368 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
16369 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
16370 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
16371 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
16372 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
16373 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
16374 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
16375 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
16376 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
16377 s-osinte-mingw.ads: Update to GPLv3 run-time license.
16378 Use GNAT instead of GNARL.
16380 2011-08-01 Bob Duff <duff@adacore.com>
16382 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
16383 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
16384 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
16387 2011-08-01 Yannick Moy <moy@adacore.com>
16389 * debug.adb (d.D) reverve flag for the SPARK mode
16390 (d.E) reverve flag for SPARK generation mode
16391 (d.F) reverve flag for Why generation mode
16392 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
16393 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
16394 functions which return True when the corresponding modes are set
16395 (Formal_Language): return "spark" or "alfa" when in formal verification
16397 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
16398 Error_Msg to prefix the error message with a tag giving the formal
16400 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
16401 message with a tag giving the formal language
16402 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
16404 (Analyze_Case_Statement): issue error in formal mode on case statement
16405 with a single "others" case alternative
16406 (Analyze_Exit_Statement): issue errors in formal mode on exit
16407 statements which do not respect SPARK restrictions
16408 (Analyze_Goto_Statement): issue error in formal mode on goto statement
16409 (Check_Unreachable_Code): always issue an error (not a warning) in
16410 formal mode on unreachable code (concerns both code after an infinite
16411 loop and after an unconditional jump, both not allowed in SPARK)
16412 * sem_ch6.adb (Analyze_Return_Statement): add call to
16413 Set_Return_Present for a procedure containing a return statement
16414 (already done for functions in Analyze_Function_Return)
16415 (Analyze_Function_Return): issue error in formal mode on extended
16416 return or if return is not last statement in function
16417 (Check_Missing_Return): issue error in formal mode if function does
16418 not end with return or if procedure contains a return
16419 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
16420 function to detect if there is an inner scope of its parameter S which
16423 2011-08-01 Thomas Quinot <quinot@adacore.com>
16425 * sem_ch6.ads: Minor reformatting.
16427 2011-08-01 Javier Miranda <miranda@adacore.com>
16429 * sem_util.adb (Abstract_Interface_List): Complete condition when
16430 processing private type declarations to avoid reading unavailable
16432 (Is_Synchronized_Tagged_Type): Complete condition when processing
16433 private extension declaration nodes to avoid reading unavailable
16436 2011-08-01 Thomas Quinot <quinot@adacore.com>
16438 * sem_ch3.adb: Minor reformatting.
16440 2011-08-01 Thomas Quinot <quinot@adacore.com>
16442 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
16443 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
16444 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
16445 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
16446 for VMS, instead parametrize the common implementation with
16447 System.Parameters declarations.
16449 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
16451 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
16453 2011-08-01 Tristan Gingold <gingold@adacore.com>
16455 * seh_init.c: Fix SEH handler installation on win64.
16457 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16459 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
16460 double analysis of an anonymous access to subprogram, because it can
16461 lead to improper sharing of profiles and a back-end crash.
16463 2011-08-01 Robert Dewar <dewar@adacore.com>
16465 * make.adb, sem_ch4.adb: Minor reformatting.
16466 * gcc-interface/Make-lang.in: Update dependencies.
16467 * sem_util.adb, exp_ch5.adb: Minor reformatting.
16469 2011-08-01 Arnaud Charlet <charlet@adacore.com>
16471 * gnat_rm.texi: Fix definition of Long_Integer.
16473 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16475 * exp_aggr.adb: check limit size of static aggregate unconditionally,
16476 to prevent storage exhaustion.
16477 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
16478 finalized is a function body, insert the cleanup code before the final
16479 return statement, to prevent spurious warnings.
16480 * s-pooglo.ads: add overriding indicator.
16482 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16484 * sem_ch4.adb (Operator_Check): improve error message when both a
16485 with_clause and a use_clause are needed to make operator usage legal.
16486 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
16487 determine whether a compilation unit is visible within an other,
16488 either through a with_clause in the current unit, or a with_clause in
16489 its library unit or one one of its parents.
16491 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16493 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
16494 over an arbitrary expression of an array or container type.
16495 * lib-xref.adb: clarify comment.
16497 2011-08-01 Bob Duff <duff@adacore.com>
16499 * einfo.ads: Minor reformatting.
16500 * debug.adb: Minor comment improvement.
16502 2011-08-01 Javier Miranda <miranda@adacore.com>
16504 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
16505 consider hidden subprograms as valid candidates.
16507 2011-08-01 Arnaud Charlet <charlet@adacore.com>
16509 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
16511 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
16513 * gnat_ugn.texi: Fix typo.
16515 2011-08-01 Robert Dewar <dewar@adacore.com>
16517 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
16518 lib-xref.adb: Minor reformatting
16520 2011-08-01 Gary Dismukes <dismukes@adacore.com>
16522 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
16523 when to generate a call to Move_Final_List.
16524 (Has_Controlled_Parts): Remove this function.
16526 2011-08-01 Geert Bosch <bosch@adacore.com>
16528 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
16529 "," in choice list.
16531 2011-08-01 Thomas Quinot <quinot@adacore.com>
16533 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
16534 explicit raise of a predefined exception as Comes_From_Source if the
16535 original N_Raise_Statement comes from source.
16537 2011-08-01 Robert Dewar <dewar@adacore.com>
16539 * sinfo.ads: Add comment.
16540 * sem_ch6.adb: Minor reformatting.
16542 2011-08-01 Robert Dewar <dewar@adacore.com>
16544 * freeze.adb (Freeze_Entity): Refine check for bad component size
16545 clause to avoid rejecting confirming clause when atomic/aliased present.
16547 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16549 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
16550 better determine whether an entity reference is a write.
16551 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
16553 * lib-xref.adb (Output_References): Do no suppress a read reference at
16554 the same location as an immediately preceeding modify-reference, to
16555 handle properly in-out actuals.
16557 2011-08-01 Tristan Gingold <gingold@adacore.com>
16559 * env.c (__gnat_setenv) [VMS]: Refine previous change.
16561 2011-08-01 Quentin Ochem <ochem@adacore.com>
16563 * i-cstrin.adb (New_String): Changed implementation, now uses only the
16564 heap to compute the result.
16566 2011-08-01 Robert Dewar <dewar@adacore.com>
16568 * atree.ads: Minor reformatting.
16570 2011-08-01 Emmanuel Briot <briot@adacore.com>
16572 * g-expect.adb (Get_Command_Output): Fix memory leak.
16574 2011-08-01 Geert Bosch <bosch@adacore.com>
16576 * cstand.adb (P_Float_Type): New procedure to print the definition of
16577 predefined fpt types.
16578 (P_Mixed_Name): New procedure to print a name using mixed case
16579 (Print_Standard): Use P_Float_Type for printing floating point types
16580 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
16581 precision IEEE float.
16583 2011-08-01 Thomas Quinot <quinot@adacore.com>
16585 * sem_ch3.adb: Minor reformatting.
16587 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16589 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
16590 the completion of a generic function, insert the new body rather than
16591 rewriting the original.
16593 2011-08-01 Yannick Moy <moy@adacore.com>
16595 * sinfo.ads, errout.ads: Typos in comments.
16597 2011-08-01 Robert Dewar <dewar@adacore.com>
16599 * par-endh.adb: Minor reformatting.
16601 2011-08-01 Robert Dewar <dewar@adacore.com>
16603 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
16604 (Pre_Post_Aspects): New subtype.
16605 * par-ch12.adb (P_Generic): New syntax for aspects in packages
16606 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
16607 * par-ch7.adb (P_Package): Remove Decl parameter
16608 (P_Package): Handle new syntax for aspects (before IS)
16609 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
16611 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
16612 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
16613 (P_Package): Remove Decl parameter
16614 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
16616 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
16618 * sem_util.ads, sem_util.adb (Static_Boolean): New function
16619 * sinfo.ads: Document new syntax for aspects in packages etc.
16620 * sprint.adb: Handle new syntax of aspects before IS in package
16622 2011-08-01 Thomas Quinot <quinot@adacore.com>
16624 * atree.ads: Minor reformatting.
16625 * sem_prag.adb: Minor reformatting.
16627 2011-08-01 Robert Dewar <dewar@adacore.com>
16629 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
16630 case expr alternative.
16632 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16634 * sem_ch12.adb: Fix typo.
16636 2011-08-01 Geert Bosch <bosch@adacore.com>
16638 * sem_prag.adb (Check_No_Link_Name): New procedure.
16639 (Process_Import_Or_Interface): Use Check_No_Link_Name.
16640 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
16641 instead of Standard_Long_Long_Float_Size global. Preparation for
16642 eventual removal of per type constants.
16643 * exp_util.ads (Get_Stream_Size): New function returning the stream
16644 size value of subtype E.
16645 * exp_util.adb (Get_Stream_Size): Implement new function.
16646 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
16648 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
16650 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
16652 2011-08-01 Geert Bosch <bosch@adacore.com>
16654 * cstand.adb: Fix comments.
16655 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
16656 count of arguments.
16658 2011-08-01 Robert Dewar <dewar@adacore.com>
16660 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
16662 2011-08-01 Geert Bosch <bosch@adacore.com>
16664 * atree.ads: Fix comment.
16666 2011-08-01 Robert Dewar <dewar@adacore.com>
16668 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
16669 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
16670 * par.adb: Add with for Namet.Sp.
16671 * par-tchk.adb: Minor reformatting.
16673 2011-08-01 Vincent Celier <celier@adacore.com>
16675 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
16676 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
16677 of the init procedure of a SAL.
16678 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
16681 2011-08-01 Thomas Quinot <quinot@adacore.com>
16683 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
16686 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
16688 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
16690 2011-08-01 Thomas Quinot <quinot@adacore.com>
16692 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
16693 conformant with its spec (return True only for types that have
16694 an overriding Initialize primitive operation that prevents them from
16695 having preelaborable initialization).
16696 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
16697 initialization for controlled types in Ada 2005 or later mode.
16699 2011-08-01 Robert Dewar <dewar@adacore.com>
16701 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
16703 (Same_Aspect): New function.
16704 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
16705 Type_Invariant, Precondition, Postcondition.
16706 * snames.ads-tmpl: Add Name_Type_Invariant.
16708 2011-08-01 Robert Dewar <dewar@adacore.com>
16710 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
16712 (Freeze_All_Ent): Fix error in handling inherited aspects.
16713 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
16714 already analyzed, but don't skip entire processing of a declaration,
16715 that's wrong in some cases of declarations being rewritten.
16716 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
16717 Don't delay for integer, string literals
16718 Treat predicates in usual manner for delay, remove special case code,
16720 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
16721 (Build_Predicate_Function): Update saved expression in aspect
16722 (Build_Invariant_Procedure): Update saved expression in aspect
16723 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
16724 of replacement of discriminant references if the reference is simple.
16726 2011-08-01 Robert Dewar <dewar@adacore.com>
16728 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
16729 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
16730 Static_Predicate and Dynamic_Predicate.
16731 (Build_Predicate_Function): Add processing for Static_Predicate
16732 and Dynamic_Predicate.
16733 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
16734 (From_Static_Predicate): New flag
16735 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
16737 2011-08-01 Robert Dewar <dewar@adacore.com>
16739 * usage.adb: Documentation cleanup for Ada version modes in usage.
16740 * expander.adb: Minor reformatting.
16742 2011-08-01 Robert Dewar <dewar@adacore.com>
16744 * atree.ads: Minor comment fix.
16745 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
16746 a-witeio.ads, sem_prag.adb: Minor reformatting.
16748 2011-08-01 Doug Rupp <rupp@adacore.com>
16750 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
16751 pointers. Use descrip.h header file for convenience. Add some
16754 2011-08-01 Robert Dewar <dewar@adacore.com>
16756 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
16757 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
16758 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
16760 (Check_Aspect_At_End_Of_Declarations): New procedure
16761 (Analye_Aspect_Specification): Minor changes for above procedures
16762 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
16763 specification node as well.
16765 2011-08-01 Pascal Obry <obry@adacore.com>
16767 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
16768 Windows files. Use GetFilesAttributes() in this case to check for file
16769 existence instead of returning with an error code.
16771 2011-08-01 Vincent Celier <celier@adacore.com>
16773 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
16774 High is above Source length.
16776 2011-08-01 Robert Dewar <dewar@adacore.com>
16778 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
16780 2011-08-01 Robert Dewar <dewar@adacore.com>
16782 * aspects.ads (Boolean_Aspects): New subtype.
16783 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
16784 for derived types in cases where the parent type and derived type have
16786 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
16787 with aspects when parent type also has aspects.
16788 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
16789 boolean expression at this point).
16790 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
16791 accordance with final decision on the Ada 2012 feature.
16792 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
16794 2011-08-01 Matthew Heaney <heaney@adacore.com>
16796 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
16798 2011-08-01 Pascal Obry <obry@adacore.com>
16800 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
16801 Fix Replace_Slice when High is above current string size.
16802 (Replace_Slice): Fix DL computation when High is above current
16805 2011-08-01 Gary Dismukes <dismukes@adacore.com>
16807 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
16809 2011-08-01 Matthew Heaney <heaney@adacore.com>
16811 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
16814 2011-08-01 Pascal Obry <obry@adacore.com>
16816 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
16819 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16821 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
16822 access to protected subprograms in generic bodies.
16823 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
16824 protected type, indicate that the convention of the subprogram is
16825 Convention_Protected, because it may be used in subsequent declarations
16826 within the protected declaration.
16828 2011-08-01 Vincent Celier <celier@adacore.com>
16830 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
16831 and "final" procedures when the name of the library is "ada", to avoid
16832 duplicate symbols "adainit" and "adafinal" in executables.
16834 2011-08-01 Ed Schonberg <schonberg@adacore.com>
16836 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
16837 quantified expression that appears within a postcondition and uses the
16838 Ada2012 'Result attribute.
16840 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16842 * init.c (__gnat_error_handler): Cast reason to int.
16843 (__gnat_install_handler): Explain sa_sigaction use.
16845 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
16847 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
16848 subprogram has copy-in copy-out parameters, try to promote the mode of
16849 the return type if it is passed in registers.
16851 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
16853 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
16854 left operand as addressable.
16856 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
16858 * gcc-interface/gigi.h (build_function_stub): Remove.
16859 (build_return_expr): Likewise.
16860 (convert_vms_descriptor): Declare.
16861 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
16862 (build_function_stub): Move to...
16863 * gcc-interface/utils2.c (build_return_expr): Move to...
16864 * gcc-interface/trans.c (build_function_stub): ...here.
16865 (build_return_expr): ...here.
16866 (Subprogram_Body_to_gnu): Add local variable for language_function.
16867 Disconnect the parameter attributes cache, if any, once done with it.
16868 Call end_subprog_body only after setting the end_locus.
16869 Build the stub associated with the function, if any, at the very end.
16870 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
16871 variables and streamline control flow.
16873 2011-07-23 Arnaud Charlet <charlet@adacore.com>
16876 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
16877 g-trasym-dwarf.adb.
16879 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16882 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
16883 Assign to act.sa_sigaction.
16884 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
16885 current->return_address to char * before arithmetic.
16887 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16889 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
16890 Correct argument types.
16891 Extract code from reason.
16892 (__gnat_install_handler): Assign to act.sa_sigaction.
16894 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
16896 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
16897 (GNAT1_OBJS): ...here.
16899 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
16902 * g-socthi-mingw.adb (Fill): Fix formatting.
16904 * gcc-interface/gigi.h: Move around comment.
16906 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
16909 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
16911 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
16914 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
16916 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
16918 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
16919 range comparison if Pmode is SImode.
16921 2011-07-12 Laurent GUERBY <laurent@guerby.net>
16922 Eric Botcazou <ebotcazou@adacore.com>
16924 * adadecode.c: Wrap up in extern "C" block.
16925 * adadecode.h: Likewise.
16926 * adaint.c: Likewise. Remove 'const' keyword.
16927 * adaint.h: Likewise.
16928 * argv.c: Likewise.
16929 * atree.h: Likewise.
16931 * cstreams.c: Likewise.
16933 * exit.c: Likewise.
16935 * final.c: Likewise.
16936 * init.c: Likewise.
16937 * initialize.c: Likewise.
16938 * link.c: Likewise.
16939 * namet.h: Likewise.
16940 * nlists.h: Likewise.
16941 * raise.c: Likewise.
16942 * raise.h: Likewise.
16943 * repinfo.h: Likewise.
16944 * seh_init.c: Likewise.
16945 * targext.c: Likewise.
16946 * tracebak.c: Likewise.
16947 * uintp.h: Likewise.
16948 * urealp.h: Likewise.
16949 * xeinfo.adb: Wrap up generated C code in extern "C" block.
16950 * xsinfo.adb: Likewise.
16951 * xsnamest.adb: Likewise.
16952 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
16953 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
16954 * gcc-interface/misc.c: Likewise.
16955 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
16956 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
16957 ada/targext.o here...
16958 (GNAT_ADA_OBJS): ...and not here.
16959 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
16960 (GNATBIND_OBJS): Reorder.
16962 2011-07-07 Richard Henderson <rth@redhat.com>
16964 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
16965 dwarf2out_frame_init.
16967 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
16969 * gcc-interface/misc.c (gnat_init): Tweak previous change.
16971 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16974 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
16976 2011-07-06 Richard Guenther <rguenther@suse.de>
16978 * gcc-interface/misc.c (gnat_init): Merge calls to
16979 build_common_tree_nodes and build_common_tree_nodes_2.
16980 Re-initialize boolean_false_node.
16982 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
16983 Olivier Hainque <hainque@adacore.com>
16984 Nicolas Setton <setton@adacore.com>
16986 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
16987 the type according to the ARTIFICIAL_P parameter.
16988 (create_type_decl): Likewise.
16989 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
16991 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
16993 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
16994 (gnatbind): Likewise.
16996 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16998 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
17000 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
17002 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
17003 local variable throughout. Remove useless call to Base_Type.
17004 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
17005 Take it also into account for the volatileness of the field. Set the
17006 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
17008 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
17010 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
17011 on a dereference built for a by-ref object if it has an address clause.
17013 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
17015 * einfo.ads (Address_Taken): Document use for the second argument of
17016 Asm_Input and Asm_Output attributes.
17017 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
17018 argument is an entity name, then set Address_Taken on it.
17019 <Attribute_Asm_Output>: Likewise.
17020 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
17021 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
17022 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
17023 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
17025 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
17027 PR middle-end/46500
17028 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
17030 2011-06-14 Joseph Myers <joseph@codesourcery.com>
17032 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
17033 (ada/utils.o): Update dependencies.
17034 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
17035 ../../../libcpp/libcpp.a.
17036 * gcc-interface/utils.c: Include common/common-target.h.
17037 (process_attributes): Use targetm_common.have_named_sections.
17039 2011-06-07 Richard Guenther <rguenther@suse.de>
17041 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
17044 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
17046 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
17047 TREE_THIS_NOTRAP flag.
17049 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
17051 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
17054 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
17056 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
17057 constants whose full view has discriminants specially.
17059 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
17061 * gcc-interface/utils.c: Include diagnostic.h.
17062 (gnat_write_global_declarations): Output debug information for all
17063 global type declarations before finalizing the compilation unit.
17064 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
17066 2011-05-25 Jakub Jelinek <jakub@redhat.com>
17068 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
17070 2011-05-25 Kai Tietz <ktietz@redhat.com>
17072 * adaint.c (__gnat_to_canonical_file_list_next): Use array
17073 initialization instead of const/none-const pointer assignment.
17075 2011-05-24 Joseph Myers <joseph@codesourcery.com>
17077 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
17078 $(EXTRA_GNAT1_OBJS).
17079 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
17080 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
17081 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
17082 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
17083 libcommon-target.a instead of prefix.o.
17085 2011-05-21 Joseph Myers <joseph@codesourcery.com>
17088 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
17090 2011-05-20 Joseph Myers <joseph@codesourcery.com>
17092 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
17093 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
17094 instead of version.o.
17096 2011-05-18 Kai Tietz <ktietz@redhat.com>
17098 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
17099 boolean_false_node instead of integer_zero_node.
17100 (convert_with_check): Likewise.
17101 * gcc-interface/decl.c (choices_to_gnu): Likewise.
17103 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
17105 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
17106 type of the parameter is an unconstrained array, convert the actual to
17107 the type of the formal in the In Out and Out cases as well.
17109 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
17111 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
17112 call build_function_type_array or build_varargs_function_type_array
17114 (create_subprog_type): Don't call build_function_type; call
17115 build_function_type_vec instead.
17117 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
17119 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
17120 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
17121 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
17123 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
17125 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
17127 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
17128 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
17130 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
17132 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
17134 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
17136 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
17137 instead of accessing TYPE_ARG_TYPES directly.
17138 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
17140 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
17143 * gcc-interface/gigi.h (get_variant_part): Declare.
17144 * gcc-interface/decl.c (get_variant_part): Make global.
17145 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
17146 types have the same constant size, are record types and T1 has a
17147 variant part while T2 doesn't.
17149 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
17151 * gcc-interface/utils.c (begin_subprog_body): Do not call
17153 (end_subprog_body): Likewise.
17155 2011-05-04 Richard Guenther <rguenther@suse.de>
17157 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
17159 (pos_to_constructor): Likewise.
17161 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
17162 Eric Botcazou <ebotcazou@adacore.com>
17164 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
17165 of build_function_type. Adjust calls to...
17166 (build_raise_check): ...this. Do not take a void_tree parameter.
17167 Call build_function_type_list instead of build_function_type.
17168 Fix head comment and swap couple of conditional blocks.
17170 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
17172 * gnatvsn.ads (Library_Version): Bump to 4.7.
17173 (Current_Year): Bump to 2011.
17175 2011-04-29 Michael Matz <matz@suse.de>
17177 * gcc-interface/misc.c (gnat_handle_option): Set
17178 warn_maybe_uninitialized.
17180 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
17182 * gnat_ugn.texi (Complexity Metrics Control): Update link to
17183 the Watson/McCabe paper.
17185 2011-04-23 Jim Meyering <meyering@redhat.com>
17187 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
17189 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
17191 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
17194 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
17196 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
17198 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
17199 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
17200 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
17201 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
17202 <all>: Do not set flags on the reused DECL node coming from an alias.
17203 Set DECL_IGNORED_P on the DECL node built for subprograms if they
17204 don't need debug info here...
17205 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
17206 (gigi): Adjust calls to create_subprog_decl.
17207 (build_raise_check): Likewise.
17208 (establish_gnat_vms_condition_handler): Likewise.
17209 (Compilation_Unit_to_gnu): Likewise.
17210 (gnat_to_gnu): Likewise.
17212 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
17214 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
17215 (NO_REORDER_ADAFLAGS): New variable.
17216 (EXTRA_GNATTOOLS): Always define.
17217 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
17218 Clean up and adjust list of files compiled with special options.
17219 * gcc-interface/Make-lang.in: Likewise.
17220 (ada/decl.o): Cosmetical change.
17221 (ada/misc.o): Remove dependency on $(PLUGIN_H).
17223 2011-04-20 Jim Meyering <meyering@redhat.com>
17225 * initialize.c (__gnat_initialize): Remove useless if-before-free.
17227 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
17229 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
17230 $(CFLAGS) on the link line.
17232 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
17234 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
17235 padded type built for the return type if it is unconstrained.
17237 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
17239 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
17241 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
17243 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
17244 before calling TREE_CHAIN.
17245 * gcc-interface/misc.c (gnat_init_ts): New function.
17246 (LANG_HOOKS_INIT_TS): Define.
17248 2011-04-12 Martin Jambor <mjambor@suse.cz>
17250 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
17251 instead of cgraph_node.
17253 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
17255 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
17256 alignment on fields of the RETURN type built for the Copy-In Copy-Out
17259 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
17261 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
17262 of aggregate types that contain a placeholder.
17264 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
17266 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
17268 (handle_type_generic_attribute): Likewise.
17270 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
17273 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
17275 2011-04-04 Kai Tietz <ktietz@redhat.com>
17278 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
17281 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17283 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
17284 type case, do not strip a padding type around the array type.
17286 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17288 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
17291 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17293 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
17294 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
17295 code for -feliminate-unused-debug-types.
17296 (gnat_post_options): Likewise.
17298 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17300 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
17301 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
17304 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17306 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
17307 DECL_ARTIFICIAL flag on enumeration types.
17309 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17311 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
17312 fat pointer types artificial unconditionally.
17313 <E_Array_Subtype>: Attach the base array type as a parallel type if it
17316 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17318 * gcc-interface/gigi.h (get_dummy_type): Declare.
17319 (build_dummy_unc_pointer_types): Likewise.
17320 (finish_fat_pointer_type): Likewise.
17321 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
17322 fat pointer type has been built, complete it in place.
17323 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
17324 and thin pointers. Remove useless variable.
17325 (finish_fat_pointer_type): Make global and move to...
17326 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
17327 (get_dummy_type): New function.
17328 (build_dummy_unc_pointer_types): Likewise.
17329 (gnat_pushdecl): Propage the name to the anonymous variants only.
17330 (update_pointer_to): Only adjust the pointer types in the unconstrained
17333 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17335 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
17336 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
17337 if this is a Taft amendment type and the full declaration is available.
17338 * gcc-interface/trans.c (process_type): Likewise.
17339 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
17340 (process_freeze_entity): Likewise.
17341 * gcc-interface/utils.c (dummy_global): New static variable.
17342 (gnat_write_global_declarations): If there are types declared as used
17343 at the global level, insert them in the global hash table.
17345 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17347 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
17348 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
17349 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
17351 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
17352 flag of the type accordingly.
17353 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
17355 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
17357 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
17358 finalizing types when updating the pointers to the designated type.
17359 <all>: Finalize the deferred types even if we didn't defer processing
17360 of incomplete types in this invocation.
17362 2011-04-01 Olivier Hainque <hainque@adacore.com>
17363 Nicolas Setton <setton@adacore.com>
17364 Eric Botcazou <ebotcazou@adacore.com>
17366 * gcc-interface/misc.c (gnat_descriptive_type): New function.
17367 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
17369 2011-03-28 Kai Tietz <ktietz@redhat.com>
17371 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
17373 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
17374 * system-mingw.ads (System): Change ZCX_By_Default default to True.
17376 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
17378 2011-03-28 Tristan Gingold <gingold@adacore.com>
17381 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
17382 Use ada output of gnatbind.
17383 (ada/b_gnatb.adb): Ditto.
17384 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
17385 (ada.mostlyclean, ada.stage1)
17386 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
17387 (ada.stagefeedback): Adjust.
17388 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
17389 Use ada output of gnatbind.
17390 (b_gnatm.adb): Ditto.
17391 (b_gnatl.o, b_gnatm.o): New rules.
17393 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
17395 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
17396 for the padded type built to support a specified size or alignment.
17398 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
17400 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
17401 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
17402 unconditionally to the end of the unit when the designated type is
17404 <all>: Rename local variable. Attempt to un-defer types only and do it
17405 for limited_with'ed types as well.
17406 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
17407 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
17408 consistently and remove redundant call to finalize_from_with_types.
17410 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
17412 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
17413 subprograms without a previous spec declared in the same unit.
17414 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
17415 subprograms at the end of the unit instead of at the beginning.
17416 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
17417 isn't public for the special handling of non-inline functions nested
17418 inside inline external functions.
17420 2011-03-25 Jeff Law <law@redhat.com>
17422 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
17424 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
17426 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
17427 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
17428 to compute Set_Size_Depends_On_Discriminant.
17429 (Layout_Type): Call it on array types in back-end layout mode.
17430 * sem_util.adb (Requires_Transient_Scope): Return true for array
17431 types only if the size depends on the value of discriminants.
17432 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
17433 type if the RHS is a call to a function that returns an unconstrained
17434 type with default discriminant.
17436 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
17438 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
17439 non-conversion to the nominal result type at the end.
17441 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
17443 * gcc-interface/trans.c (create_temporary): New function taken from...
17444 (create_init_temporary): ...here. Call it.
17445 (call_to_gnu): Create the temporary for the return value early, if any.
17446 Create it for a function with copy-in/copy-out parameters if there is
17447 no target; in other cases of copy-in/copy-out, use another temporary.
17448 Push the new binding level lazily. Add and rename local variables.
17450 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
17452 * gcc-interface/decl.c (validate_size): Improve comments and tweak
17454 (set_rm_size): Likewise.
17456 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
17458 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
17459 for the padded type built in order to support a specified alignment.
17460 Fix incorrect formatting.
17462 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
17465 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
17467 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
17469 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
17470 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
17471 to the end of the list. Adjust recursive call. Rename local variable.
17472 If REORDER is true, reorder components of the record type.
17473 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
17474 components_to_record and adjust the parameter list.
17476 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
17478 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
17479 disabled, use the variable for bounds of loop iteration scheme.
17481 2011-03-21 Kai Tietz <ktietz@redhat.com>
17484 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
17486 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
17488 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
17489 out whether the expression is read-only. Short-circuit placeholder
17490 case and rename a couple of local variables.
17492 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
17494 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
17495 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
17496 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
17497 (convert): Deal with conversions from a smaller form type specially.
17499 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
17501 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
17502 its argument, except for the special -I- switch.
17504 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
17506 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
17509 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
17511 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
17513 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
17515 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
17517 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
17518 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
17519 instead of GNAT_FORMAL. Protect the expression against multiple uses.
17520 Do not generate the check directly, instead instantiate the template
17521 check present in the descriptor.
17522 (make_descriptor_field): Move around.
17523 (build_vms_descriptor32): Build a template check in the POINTER field.
17524 (build_vms_descriptor): Remove useless suffixes.
17525 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
17527 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
17530 * targext.c: Include target files if IN_RTS is defined.
17532 2011-01-26 Richard Guenther <rguenther@suse.de>
17535 * targext.c: Include config.h.
17536 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
17539 2011-01-04 Pascal Obry <obry@adacore.com>
17540 Eric Botcazou <ebotcazou@adacore.com>
17542 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
17544 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
17546 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
17547 end-of-case on the end label and its associated gotos, if any.
17549 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
17551 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
17552 expressions of the parameter cache within the statement group of
17553 the CICO mechanism.
17555 2011-01-04 Olivier Hainque <hainque@adacore.com>
17556 Eric Botcazou <ebotcazou@adacore.com>
17558 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
17559 (set_end_locus_from_node): New function.
17560 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
17561 make and the function end_locus.
17562 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
17563 for the elaboration subprogram.
17564 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
17565 set the end_locus of the expression as well.
17567 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
17570 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
17571 variables that are referenced in exception handlers volatile.
17575 Copyright (C) 2011 Free Software Foundation, Inc.
17577 Copying and distribution of this file, with or without modification,
17578 are permitted in any medium without royalty provided the copyright
17579 notice and this notice are preserved.