1 2012-06-26 Vincent Pucci <pucci@adacore.com>
3 * exp_ch3.adb (Build_Init_Statements): Don't check the parents
4 in the Rep Item Chain of the task for aspects Interrupt_Priority,
5 Priority, CPU and Dispatching_Domain.
6 * exp_ch9.adb (Expand_N_Task_Type_Declaration): fields _Priority,
7 _CPU and _Domain are present in the corresponding record type
8 only if the task entity has a pragma, attribute definition
9 clause or aspect specification.
10 (Make_Initialize_Protection): Don't check the parents in the Rep Item
11 Chain of the task for aspects Interrupt_Priority, Priority, CPU and
13 * freeze.adb (Freeze_Entity): Use of Evaluate_Aspects_At_Freeze_Point
14 call replaced by Analyze_Aspects_At_Freeze_Point.
15 * sem_ch13.adb, sem_ch13.ads (Analyze_Aspects_At_Freeze_Point):
16 Renaming of Evaluate_Aspects_At_Freeze_Point.
18 2012-06-26 Yannick Moy <moy@adacore.com>
20 * sem_attr.adb (Analyze_Attribute): Detect if 'Old is used outside a
21 postcondition, and issue an error in such a case.
23 2012-06-26 Yannick Moy <moy@adacore.com>
25 * gnat_rm.texi: Minor editing.
27 2012-06-26 Tristan Gingold <gingold@adacore.com>
29 * raise-gcc.c: Minor cleanup: remove unused prototype.
30 * seh_init.c: Do not create an image wide unwind info to catch
31 SEH when SEH unwind info are emitted by the compiler.
33 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
35 * gcc-interface/trans.c: Include target.h.
36 (gigi): Try to put out .ident with targetm.asm_out.output_ident.
37 Remove uses of ASM_OUTPUT_IDENT.
38 * gcc-interface/Make-lang.in: Fix dependencies.
40 2012-06-15 Eric Botcazou <ebotcazou@adacore.com>
43 * gcc-interface/gigi.h (maybe_vector_array): Make static inline.
44 * gcc-interface/utils.c (maybe_vector_array): Delete.
45 * gcc-interface/trans.c (gnat_to_gnu) <N_Indexed_Component>: Mark the
46 array object as addressable if it has vector type and is on the LHS.
48 2012-06-15 Eric Botcazou <ebotcazou@adacore.com>
51 * gcc-interface/misc.c (gnat_init_options_struct): Set
52 opts->x_flag_delete_dead_exceptions to 1.
54 2012-06-14 Jose Ruiz <ruiz@adacore.com>
56 * gcc-interface/Make-lang.in (ada.install-common, ada.uninstall):
57 Use the prefix specified with the --program-prefix configure option
58 to determine the install name of the Ada tools.
59 (ada.all.cross): Use a for loop to iterate over the set of Ada tools
60 instead of duplicate the same processing.
63 2012-06-14 Vincent Pucci <pucci@adacore.com>
65 * exp_ch6.adb (Expand_Call): Expand_Put_Call_With_Dimension_Symbol
66 call replaced by Expand_Put_Call_With_Symbol call.
67 * sem_dim.adb: New fields Unit_Names, Unit_Symbols
68 and Dim_Symbols for record type System_Type.
69 (From_Dimension_To_String_Of_Symbols): Removed.
70 (From_Dim_To_Str_Of_Dim_Symbols): Renames previous
71 routine From_Dimension_To_String_Of_Symbols.
72 (From_Dim_To_Str_Of_Unit_Symbols): New routine.
73 (Analyze_Aspect_Dimension): argument Symbol in aspect
74 Dimension aggregate is optional. Named association implemented.
75 (Has_Compile_Time_Known_Expressions): Removed.
76 (Analyze_Aspect_Dimension_System): New
77 component Dim_Symbol in each Dimension aggregate in
78 aspect Dimension_System. Named associations implemented.
79 (Add_Dimension_Vector_To_Buffer): Removed.
80 (Add_Whole_To_Buffer): Removed.
81 (Expand_Put_Call_With_Dimension_Symbol.): Removed.
82 (Expand_Put_Call_With_Symbol): Renames previous routine
83 Expand_Put_Call_With_Dimension_Symbol.
84 (Has_Dimension_Symbols): Removed.
85 (Has_Symbols): Renames previous routine
86 Has_Dimension_Symbols. (Store_String_Oexpon): New routine.
87 * sem_dim.ads (Expand_Put_Call_With_Dimension_Symbol.): Removed.
88 (Expand_Put_Call_With_Symbol): Renames previous routine
89 Expand_Put_Call_With_Dimension_Symbol.
90 * s-diflio.adb, s-diinio.adb (Put): Symbol renames Symbols.
91 (Put_Dim_Of): New routines.
92 * s-diflio.ads, s-diinio.ads: documentation updated.
93 (Put): Symbol renames Symbols.
94 (Put_Dim_Of): New routines.
95 * s-dim.ads: documentation updated.
96 * s-dimmks.ads: dimensioned type and subtypes updated.
97 * snames.ads-tmpl: Name_Dim_Symbol, Name_Put_Dim_Of, Name_Symbol,
98 and Name_Unit_Symbol added. Name_Symbols removed.
100 2012-06-14 Vincent Pucci <pucci@adacore.com>
102 * freeze.adb (In_Exp_Body): Expression function case added.
103 (Freeze_Expression): Insert the Freeze_Nodes
104 list before the correct current scope in case of a quantified
107 2012-06-14 Pascal Obry <obry@adacore.com>
109 * projects.texi: Document the Install package for gprinstall.
110 2012-06-14 Ed Schonberg <schonberg@adacore.com>
112 * sem_elim.adb (Check_For_Eliminated_Subprogram): Do not check within
113 a default expression.
114 * sem_res.adb (Resolve_Call): simplify code.
116 2012-06-14 Ed Schonberg <schonberg@adacore.com>
118 * sem_case.adb (Check, Issue_Msg): within an instance, non-other
119 values in a variant part or a case expression do not have to
120 belong to the actual subtype.
122 2012-06-14 Ed Schonberg <schonberg@adacore.com>
124 * sem_ch12.adb (Validate_Derived_Type_Instance): If parent is
125 an interface type, check whether it is itself a previous formal
126 already instantiated in the current list of actuals.
128 2012-06-14 Ed Schonberg <schonberg@adacore.com>
130 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): The
131 expression for a stream attribute is a name that may be overloaded
132 with other declarations. To determine whether it matches the
133 aspect at the freeze point, it is necessary to verify that one
134 of its interpretations matches.
136 2012-06-14 Robert Dewar <dewar@adacore.com>
138 * exp_ch7.adb, exp_util.adb, sem_aux.ads, exp_ch9.adb,
139 sem_ch10.adb, freeze.adb, sem_util.adb, exp_ch4.adb,
140 s-taprop-dummy.adb: Minor reformatting.
142 2012-06-14 Vincent Pucci <pucci@adacore.com>
144 * exp_attr.adb (Expand_N_Attribute_Reference): Lock_Free
145 attribute case added.
146 * par-prag.adb (Prag): Lock_Free pragma case added.
147 * sem_attr.adb (Analyze_Attribute_Reference): Lock_Free attribute
149 * sem_ch13.adb (Analyze_Aspect_Specifications): Record_Rep_Item
150 call added for Aspect_Lock_Free.
151 * sem_ch9.adb (Allows_Lock_Free_Implementation): New Lock_Free
152 error messages for subprogram bodies.
153 (Lock_Free_Disabled): New routine.
154 (Analyze_Protected_Body): Call to Lock_Free_Disabled added.
155 * sem_prag.adb (Analyze_Pragma): Lock_Free pragma case added.
156 * snames.adb-tmpl (Get_Pragma_Id): Name_Lock_Free case added.
157 (Is_Pragma_Name): Name_Lock_Free case added.
158 * snames.ads-tmpl: Attribute_Lock_Free and Pragma_Lock_Free added.
160 2012-06-14 Ed Schonberg <schonberg@adacore.com>
162 * a-coorma.adb, a-cborma.adb, a-cbhama.adb, a-ciorma.adb: Add missing
165 2012-06-14 Bob Duff <duff@adacore.com>
167 * lib.ads, lib.adb, sem.adb (Write_Unit_Info): Move this
168 procedure from Sem body to Lib spec, so it can be used for
171 2012-06-14 Ed Schonberg <schonberg@adacore.com>
173 * sem_ch6.adb (Check_Conformance): Add Ada 2012 check on mode
174 conformance: "aliased" must apply to both or neither formal
177 2012-06-14 Gary Dismukes <dismukes@adacore.com>
179 * exp_ch9.adb: Minor reformatting.
181 2012-06-14 Thomas Quinot <quinot@adacore.com>
183 * freeze.adb (Freeze_Record_Type): Warn about useless bit order
184 specification [when there's no component clause] regardless
185 of whether the specified bit order is reversed or not.
187 2012-06-14 Tristan Gingold <gingold@adacore.com>
189 * raise-gcc.c (__gnat_personality_seh0): New function.
191 2012-06-14 Tristan Gingold <gingold@adacore.com>
193 * gnatname.adb (Gnatname): Make sure that dynamic table
194 argument_data is initialized.
196 2012-06-14 Robert Dewar <dewar@adacore.com>
198 * sem_aux.adb: Minor code reorganization.
200 2012-06-14 Vincent Pucci <pucci@adacore.com>
202 * einfo.adb einfo.ads (Get_Rep_Item): Removed.
203 (Get_Rep_Item_For_Entity): Removed.
204 (Get_Rep_Pragma): Removed.
205 (Get_Rep_Pragma_For_Entity): Removed.
206 (Has_Rep_Item): Removed.
207 (Has_Rep_Pragma): Removed.
208 (Has_Rep_Pragma_For_Entity): Removed.
209 * exp_ch9.adb (Expand_N_Task_Type_Declaration):
210 Has_Rep_Pragma_For_Entity replaced by Has_Rep_Pragma
211 and Get_Rep_Pragma_For_Entity replaced by Get_Rep_Pragma.
212 (Make_Task_Create_Call): Has_Rep_Pragma_For_Entity replaced
213 by Has_Rep_Pragma and Get_Rep_Pragma_For_Entity replaced by
215 * exp_intr.adb: Dependency to Sem_Aux added for call to Get_Rep_Pragma.
216 * sem_aux.adb (Get_Rep_Item): New routine.
217 (Get_Rep_Pragma): New routine.
218 (Has_Rep_Item): New routine.
219 (Has_Rep_Pragma): New routine.
220 (Nearest_Ancestor): Minor reformatting.
221 * sem_aux.ads (Get_Rep_Item): New routine.
222 (Get_Rep_Pragma): New routine.
223 (Has_Rep_Item): New routine.
224 (Has_Rep_Pragma): New routine.
225 * sem_ch13.adb (Duplicate_Clause): Restore original error messages.
226 * sem_eval.adb (Subtypes_Statically_Match): Get_Rep_Item_For_Entity
227 replaced by Get_Rep_Item.
228 * sem_prag.adb (Analyze_Pragma): Restore original error messages.
229 (Check_Duplicate_Pragma): Restore original error messages.
231 2012-06-14 Ed Schonberg <schonberg@adacore.com>
233 * sem_util.adb (Is_Object_Reference): in Ada 2012, qualified
234 expressions are valid names.
236 2012-06-14 Ed Schonberg <schonberg@adacore.com>
238 * sem_ch10.adb (Analyze_Compilation_Unit): If the unit is an
239 instantiation do not emit warnings for obsolescent units. The
240 warnings belong on the corresponding generic.
242 2012-06-14 Hristian Kirtchev <kirtchev@adacore.com>
244 * einfo.adb: Update the usage of Node15.
245 (Return_Flag_Or_Transient_Decl): Removed.
246 (Set_Return_Flag_Or_Transient_Decl): Removed.
247 (Set_Status_Flag_Or_Transient_Decl): New routine.
248 (Status_Flag_Or_Transient_Decl): New routine.
249 (Write_Field15_Name): Update the output for variables and constants.
250 * einfo.ads: Remove attribute
251 Return_Flag_Or_Transient_Decl along with occurrences in nodes.
252 (Return_Flag_Or_Transient_Decl): Removed along with pragma Inline.
253 (Set_Return_Flag_Or_Transient_Decl): Removed along with pragma Inline.
254 (Set_Status_Flag_Or_Transient_Decl): New routine along with pragma
256 (Status_Flag_Or_Transient_Decl): New routine along with pragma Inline.
257 * exp_ch4.adb (Create_Alternative): New routine.
258 (Expand_N_Conditional_Expression): Handle the case
259 where at least one of the conditional expression
260 alternatives prodices a controlled temporary by means of a function
262 (Is_Controlled_Function_Call): New routine.
263 (Process_Transient_Object): Update the call to
264 Set_Return_Flag_Or_Transient_Decl.
265 * exp_ch6.adb (Enclosing_Context): New routine.
266 (Expand_N_Extended_Return_Statement): Update all calls to
267 Set_Return_Flag_Or_Transient_Decl.
268 (Expand_Ctrl_Function_Call): Prohibit the finalization of a controlled
269 function result when the context is a conditional expression.
270 * exp_ch7.adb (Process_Declarations): Update all calls to
271 Return_Flag_Or_Transient_Decl. Add processing for intermediate
272 results of conditional expressions where one of the alternatives
273 uses a controlled function call.
274 (Process_Object_Declaration): Update all calls to
275 Return_Flag_Or_Transient_Decl and rearrange the logic to process
276 "hook" objects first.
277 (Process_Transient_Objects): Update the call to
278 Set_Return_Flag_Or_Transient_Decl.
279 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean,
280 Boolean)): Update all calls to Return_Flag_Or_Transient_Decl. Add
281 detection for intermediate results of conditional expressions
282 where one of the alternatives uses a controlled function call.
284 2012-06-13 Eric Botcazou <ebotcazou@adacore.com>
287 2012-05-19 Eric Botcazou <ebotcazou@adacore.com>
289 * gcc-interface/decl.c (Has_Thiscall_Convention): New macro.
290 (gnat_to_gnu_entity) <E_Subprogram_Type>: Test it to set the thiscall
292 (get_minimal_subprog_decl): Likewise.
293 (gnat_first_param_is_class): New predicate.
295 2012-06-12 Robert Dewar <dewar@adacore.com>
297 * gcc-interface/Make-lang.in: Update dependencies.
298 * sem_ch9.ads, einfo.adb, einfo.ads, sem_prag.adb, freeze.adb,
299 sem_util.adb, sem_ch13.adb, sem_ch13.ads, exp_ch3.adb: Add comments.
302 2012-06-12 Ed Schonberg <schonberg@adacore.com>
304 * sem_ch12.adb (Instantiate_Formal_Subprogram): Remove code that
305 implements AI05-0296, because the actual may be overloaded.
306 * sem_ch8.adb (Analyze_Subprogram_Renaming): and move it here,
307 to be applied once the actual subprogram is properly resolved.
309 2012-06-12 Robert Dewar <dewar@adacore.com>
311 * switch-c.adb, a-exexpr-gcc.adb: Minor reformatting.
313 2012-06-12 Vincent Pucci <pucci@adacore.com>
315 * checks.adb (Tag_Checks_Suppressed): Remove Kill_Tag_Checks check.
316 * einfo.adb (Universal_Aliasing): Apply to the implementation
317 base type instead of the base type.
318 (Get_Rep_Item_For_Entity):
319 Return a pragma if the pragma node is not present in the Rep
320 Item chain of the parent.
321 (Kill_Tag_Checks): Removed (unused flag).
322 (Set_Kill_Tag_Checks): Removed.
323 (Get_First_Rep_Item): New routine.
324 (Get_Rep_Pragma_For_Entity): New routine.
325 (Has_Rep_Item): New routine.
326 (Has_Rep_Pragma_For_Entity): New routine.
327 (Present_In_Rep_Item): New routine.
328 * einfo.ads (Kill_Tag_Checks): Removed.
329 (Set_Kill_Tag_Checks): Removed.
330 (Get_First_Rep_Item): New routine.
331 (Get_Rep_Pragma_For_Entity): New routine.
332 (Has_Rep_Item): New routine.
333 (Has_Rep_Pragma_For_Entity): New routine.
334 (Present_In_Rep_Item): New routine.
335 * exp_attr.adb, sem_attr.adb: Attribute_CPU,
336 Attribute_Dispatching_Domain and Attribute_Interrupt_Priority
338 * exp_ch13.adb (Expand_N_Attribute_Definition_Clause): For
339 attribute Storage_Size, insert the new assignement statement
340 after the Size variable declaration.
341 * exp_ch3.adb (Build_Init_Statements): Fill the CPU,
342 Dispatching_Domain, Priority and Size components with the Rep
343 Item expression (if any).
344 * exp_ch9.adb (Expand_N_Task_Type_Declaration): _CPU,
345 _Priority, _Domain fields are always present in the
346 corresponding record type.
347 (Find_Task_Or_Protected_Pragma): Removed.
348 (Get_Relative_Deadline_Pragma): New routine.
349 (Make_Initialize_Protection): Find_Task_Or_Protected_Pragma removed.
350 (Make_Task_Create_Call): Check CPU, Size or
351 Dispatching_Domain Rep Item is present using new routine Has_Rep_Item.
352 * freeze.adb (Freeze_All): Push_Scope_And_Install_Discriminants
353 and Uninstall_Discriminants_And_Pop_Scope calls added.
354 (Freeze_Entity): Evaluate_Aspects_At_Freeze_Point call added.
355 * sem_aux.adb (Nearest_Ancestor): Retrieve the nearest ancestor
356 for private derived types.
357 * sem_ch13.adb (Analyze_Aspect_Specifications): Clean-up
358 and reordering. Delay analysis for all aspects (except some
360 (Analyze_Attribute_Definition_Clause):
361 Attribute_CPU, Attribute_Dispatching_Domain,
362 Interrupt_Priority and Attribute_Priority cases added.
363 (Analyze_Freeze_Entity): Push_Scope_And_Install_Discriminants
364 and Uninstall_Discriminants_And_Pop_Scope calls added.
365 (Check_Aspect_At_Freeze_Point): Reordering and clean-up.
366 (Duplicate_Clause): Issue an explicit error msg when the current
367 clause duplicates an aspect specification, an attribute definition
369 (Evaluate_Aspects_At_Freeze_Point): New routine.
370 * sem_ch13.ads (Evaluate_Aspects_At_Freeze_Point): New routine.
371 * sem_ch9.adb, sem_ch9.ads (Install_Discriminants): New routine.
372 (Push_Scope_And_Install_Discriminants): New routine.
373 (Uninstall_Discriminants): New routine.
374 (Uninstall_Discriminants_And_Pop_Scope): New routine.
375 * sem_prag.adb (Check_Duplicate_Pragma): Issue an explicit error
376 msg when the current pragma duplicates an aspect specification,
377 an attribute definition clause or a pragma.
378 (Analyze_Pragma): Remove use of flags Has_Pragma_CPU,
379 Has_Pragma_Priority and Has_Pragma_Dispatching_Domain.
380 * sem_util.adb (Compile_Time_Constraint_Error): Don't complain
381 about the type if the corresponding concurrent type doesn't come
383 * sinfo.adb, sinfo.ads (Has_Pragma_CPU): Removed.
384 (Has_Pragma_Dispatching_Domain): Removed.
385 (Has_Pragma_Priority): Removed.
386 (Has_Task_Info_Pragma): Removed.
387 (Has_Task_Name_Pragma): Removed.
388 (Set_Has_Pragma_CPU): Removed.
389 (Set_Has_Pragma_Dispatching_Domain): Removed.
390 (Set_Has_Pragma_Priority): Removed.
391 (Set_Has_Task_Info_Pragma): Removed.
392 (Set_Has_Task_Name_Pragma): Removed.
393 * snames.adb-tmpl (Get_Pragma_Id): Pragma_CPU,
394 Pragma_Dispatching_Domain and Pragma_Interrupt_Priority added.
395 (Is_Pragma_Name): Name_CPU, Name_Dispatching_Domain and
396 Name_Interrupt_Priority added.
397 * snames.ads-tmpl: Name_Dispatching_Domain, Name_CPU
398 and Name_Interrupt_Priority moved to the list of
399 Attribute_Name. Attribute_CPU, Attribute_Dispatching_Domain and
400 Attribute_Interrupt_Priority added. Pragma_Dispatching_Domain,
401 Pragma_CPU and Pragma_Interrupt_Priority moved to the end of
402 the Pragma_Name list.
404 2012-06-12 Arnaud Charlet <charlet@adacore.com>
406 * xref_lib.adb (Get_Full_Type): Add support for 'G'.
408 2012-06-12 Tristan Gingold <gingold@adacore.com>
410 * a-exexpr-gcc.adb (Unwind_Exception): Add 4 more private fields.
412 2012-06-12 Fedor Rybin <frybin@adacore.com>
414 * gnat_ugn.texi: Update doc on gnattest.
416 2012-06-12 Robert Dewar <dewar@adacore.com>
418 * sem_ch12.adb: Add comments.
420 2012-06-12 Robert Dewar <dewar@adacore.com>
422 * switch-c.adb, inline.adb, usage.adb, opt.ads: Minor reformatting.
424 2012-06-12 Robert Dewar <dewar@adacore.com>
426 * sem_ch12.adb: Minor reformatting.
428 2012-06-12 Eric Botcazou <ebotcazou@adacore.com>
430 * opt.ads (Inline_Level): New variable.
431 * gnat1drv.adb (Adjust_Global_Switches): Set it based on optimization
432 level if it has not been set by the user.
433 * switch-c.adb (Scan_Front_End_Switches): Accept -gnatn1 and -gnatn2
434 and set Inline_Level accordingly.
435 * inline.adb (Add_Inlined_Body): Declate new Inline_Level_Type type.
436 (Must_Inline): Return Inline_Level_T instead of Boolean to indicate
437 whether the package of the inlined subprogram must be compiled.
438 If Inline_Level is set to 1, only compile packages of subprograms
439 directly called from the main unit.
440 * usage.adb (Usage): Adjust line for -gnatn switch.
441 * gnat_ugn.texi (Switches for gcc): Document -gnatn1 and -gnatn2.
443 2012-06-12 Ed Schonberg <schonberg@adacore.com>
445 * sem_ch12.adb (Instantiate_Formal_Subprogram): Do not apply
446 AI05-296 if the actual is overloaded. In this case The rule must
447 be applied after resolution, in Analyze_Subprogram_Renaming.
449 2012-06-12 Robert Dewar <dewar@adacore.com>
451 * stringt.adb: Minor reformatting.
453 2012-06-12 Robert Dewar <dewar@adacore.com>
455 * ali-util.adb, stringt.ads: Minor reformatting.
457 2012-06-12 Hristian Kirtchev <kirtchev@adacore.com>
459 * exp_ch7.adb (Process_Declarations): Handle the case where
460 the original context has been wrapped in a block to avoid
461 interference between exception handlers and At_End handlers.
462 (Wrap_HSS_In_Block): Mark the block which contains the original
463 statements of the context as being a finalization wrapper.
464 * sinfo.adb (Is_Finalization_Wrapper): New routine.
465 (Set_Is_Finalization_Wrapper): New routine.
467 * sinfo.ads: Add new attribute Is_Finalization_Wrapper applicable
469 (Is_Finalization_Wrapper): New routine with corresponding pragma Inline.
470 (Set_Is_Finalization_Wrapper): New routine with corresponding pragma
473 2012-06-12 Steve Baird <baird@adacore.com>
475 * gnat1drv.adb (Adjust_Global_Switches): No longer need to set
476 Exception_Extra_Info in CodePeer_Mode.
478 2012-06-12 Robert Dewar <dewar@adacore.com>
480 * sem_dist.adb, exp_ch7.adb, sem_type.adb, exp_attr.adb,
481 sinfo.ads, sem_ch7.adb, exp_alfa.adb, sem_scil.adb, sem_ch12.adb,
482 sem_util.adb, sem_res.adb, sem_attr.adb, sem_elab.adb, exp_ch6.adb,
483 sem_ch4.adb, sem_warn.adb, scil_ll.adb, exp_cg.adb: Minor code
486 2012-06-12 Eric Botcazou <ebotcazou@adacore.com>
488 * s-tasini.ads: Minor fix in comment.
490 2012-06-12 Thomas Quinot <quinot@adacore.com>
492 * freeze.adb (Freeze_Record_Type): Warn on record with
493 Scalar_Storage_Order if there is no placed component.
495 2012-06-12 Thomas Quinot <quinot@adacore.com>
497 * sem_ch3.adb: Minor comment fix.
499 2012-06-12 Vincent Celier <celier@adacore.com>
501 * ali-util.adb (Time_Stamp_Mismatch): In minimal recompilation
502 mode, use Stringt Mark and Release to avoid growing the Stringt
503 internal tables uselessly.
504 * stringt.adb (Strings_Last): New global variable
505 (String_Chars_Last): New global variable.
506 (Mark, Release): New procedures.
507 * stringt.ads (Mark, Release) New procedures.
509 2012-06-12 Hristian Kirtchev <kirtchev@adacore.com>
511 * exp_ch7.adb (Process_Transient_Objects): Renamed constant
512 Requires_Hooking to Must_Hook and replace all occurrences of the name.
513 (Requires_Hooking): New routine. Detect all contexts that require
514 transient variable export to the outer finalizer due to a potential
517 2012-06-12 Ed Schonberg <schonberg@adacore.com>
519 * sem_ch12.adb: Small adjustment.
521 2012-06-12 Vincent Celier <celier@adacore.com>
523 * vms_cmds.ads (Command_Type): New enumeration value Test
524 * vms_conv.adb (Initialize): Add component at index Test in
526 * vms_data.ads (Test_Switches): New global variable for the
527 switches of gnattest, currently empty.
529 2012-06-12 Ed Schonberg <schonberg@adacore.com>
531 * sem_ch3.adb (Analyze_Subtype_Declaration): if an incomplete
532 type is tagged, so is a subtype of it.
533 * sem_ch12.adb (Validate_Actual_Subprogram): implement AI05-0296,
534 concerning freeze rules in the presence of formal incomplete
535 types: a formal abstract subprogram cannot have an incomplete
536 controlling type, and the profile of the actual subprogram does
537 not freeze if it includes an incomplete untagged type.
539 2012-06-12 Robert Dewar <dewar@adacore.com>
541 * a-direct.adb: Minor reformatting.
543 2012-06-12 Robert Dewar <dewar@adacore.com>
545 * gnat_ugn.texi: Add missing documentation for -gnatw.v and
548 2012-06-12 Thomas Quinot <quinot@adacore.com>
550 * sem_ch7.adb, sem_prag.adb, sem_ch12.adb, sem_ch4.adb,
551 sem_ch13.adb: Minor rewording of error messages for unchecked unions.
553 2012-06-12 Robert Dewar <dewar@adacore.com>
555 * lib-xref.ads: Minor reformatting.
557 2012-06-12 Pascal Obry <obry@adacore.com>
559 * a-direct.adb (Delete_File): Delete symbolic links silently
560 instead of raising the Name_Error exception when the symbolic
561 link is pointing to a non existent file.
563 2012-06-12 Robert Dewar <dewar@adacore.com>
565 * xref_lib.adb, sem_ch13.adb, lib-xref.adb: Minor reformatting.
567 2012-06-12 Javier Miranda <miranda@adacore.com>
569 * lib-xref.ads Adding missing documentation.
571 2012-06-12 Hristian Kirtchev <kirtchev@adacore.com>
573 * exp_ch7.adb (Create_Finalizer): Add the
574 exception reraise mechanism at the very end of the finalizer
575 statements. This placement ensures that all objects are finalized,
576 the secondary stack mark released and aborts undeferred before
577 propagating an exception.
579 2012-06-12 Ed Schonberg <schonberg@adacore.com>
581 * sem_ch10.adb (Remove_Unit_From_Visibility): if the unit is a
582 wrapper package. remove from visibility the original subprogram
585 2012-06-12 Javier Miranda <miranda@adacore.com>
587 * sem_prag.adb (Process_Convention): Generate reference to entity
588 exported to foreign language. Needed for GPS navigation.
589 * xref_lib.adb (Parse_Identifier_Info): Parse exported entities.
590 * lib-xref (Output_References): Output exported entities.
592 2012-06-12 Pascal Obry <obry@adacore.com>
594 * prj-attr.adb: Add install package and corresponding attributes.
595 * snames.ads-tmpl (Name_Active): New constant.
596 (Name_Exec_Subdir): Likewise.
597 (Name_Install): Likewise.
598 (Name_Lib_Subdir): Likewise.
599 (Name_Project_Subdir): Likewise.
600 (Name_Sources_Subdir): Likewise.
602 2012-06-12 Bob Duff <duff@adacore.com>
604 * sem_res.adb (Check_Infinite_Recursion):
605 Suppress spurious warning on recursion after "raise with ...".
607 2012-06-12 Thomas Quinot <quinot@adacore.com>
609 * sem_prag.adb (Analyze_Pragma, case Unchecked_Union): Do
610 not crash on illegal unchecked union that is a null record.
612 2012-06-12 Thomas Quinot <quinot@adacore.com>
614 * exp_ch4.adb (Has_Inferable_Discriminants): Reorganize code to
615 treat implicit dereferences with a constrained unchecked union
616 nominal subtype as having inferable discriminants.
618 2012-06-12 Robert Dewar <dewar@adacore.com>
620 * sem_ch6.adb: Minor reformatting.
622 2012-06-12 Eric Botcazou <ebotcazou@adacore.com>
624 * gnat_ugn.texi: Couple of minor corrections.
626 2012-06-12 Thomas Quinot <quinot@adacore.com>
628 * sem_prag.adb (Check_Variant): An empty component list is not
629 illegal in an unchecked union variant.
631 2012-06-12 Gary Dismukes <dismukes@adacore.com>
633 * projects.texi: Remove comments.
635 2012-06-12 Thomas Quinot <quinot@adacore.com>
637 * back_end.adb (Scan_Back_End_Switches): Treat -fdump-scos as
639 (gnat_post_options): Disable gimple-based SCO generator.
640 * gnat_ugn.texi: Document that -gnateS is an obsolete synonym
643 2012-06-12 Ed Schonberg <schonberg@adacore.com>
645 * sem_ch6.adb (Different_Generic_Profile): new predicate for
646 Find_Corresponding_Spec, to handle a rare case of accidental
647 overloading in an instance, when the profile of a subprogram body
648 that depends on a formal type becomes compatible with that of
649 a homonym whose profile in the generic mentions the actual type.
651 2012-06-12 Thomas Quinot <quinot@adacore.com>
653 * gnat1drv.adb: Minor reformatting.
655 2012-06-12 Ed Schonberg <schonberg@adacore.com>
657 * sem_util.adb (Build_Explicit_Dereference): If the expression
658 is an entity, ensure that the type of the expression is the same
659 as that of the entity.
661 2012-06-12 Pat Rogers <rogers@adacore.com>
663 * projects.texi: Corrected instances of the word "build" that
664 should be "built" instead. Other similar changes and minor
667 2012-06-12 Eric Botcazou <ebotcazou@adacore.com>
669 * sem_util.adb (Is_Atomic_Object): Return true for an atomic
670 component as well as a prefix which is an atomic component.
672 2012-06-12 Ed Schonberg <schonberg@adacore.com>
674 * exp_prag.adb (Expand_Pragma_Import_Or_Interface): revert previous
675 patch. The processing of interfacing aspects now generates a
676 proper Ada 2005 pragma.
677 * sem_prag.adb (Analyze_Pragma, cases Pragma_Export and
678 Pragma_Import): revert previous patch. The processing of
679 interfacing aspects now generates a proper Ada 2005 pragma.
680 * sem_ch13.adb (Analyze_Aspect_Specifications): generate proper
681 pragam for aspects Convention, Import and Export. Scan list
682 of aspects to collect link name and external name if present,
683 and verify that a complete pragma can be generated.
685 2012-06-11 Olivier Hainque <hainque@adacore.com>
687 * gcc-interface/Makefile.in (GNATLIBCFLAGS_FOR_C): Remove
688 $(PIC_FLAG_FOR_TARGET).
689 (gnatlib-shared-default): Add $(PIC_FLAG_FOR_TARGET) to
690 GNATLIBCFLAGS_FOR_C passed to gnatlib.
691 (gnatlib-shared-win32): Likewise.
692 (gnatlib-shared-darwin): Likewise.
693 (gnatlib-shared-dual-win32): Pass PIC_FLAG_FOR_TARGET to
694 gnatlib-shared-win32.
696 2012-06-11 Eric Botcazou <ebotcazou@adacore.com>
698 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Convert GNU_SIZE
699 to units before invoking allocatable_size_p on it.
700 Remove orphaned comment. Do not use ssize_int.
701 <E_Record_Subtype>: Traverse list in original order. Minor tweak.
702 (allocatable_size_p): Adjust and simplify.
703 (build_subst_list): Use consistent terminology throughout.
704 (build_variant_list): Likewise. Traverse list in original order.
705 (create_field_decl_from): Likewise.
706 (copy_and_substitute_in_size): Likewise.
707 (create_variant_part_from): Add comment about field list order.
708 * gcc-interface/utils.c (build_vms_descriptor): Do not use ssize_int.
709 * gcc-interface/utils2.c (build_allocator): Likewise.
711 2012-06-11 Eric Botcazou <ebotcazou@adacore.com>
713 * gcc-interface/trans.c (Identifier_to_gnu): Test Is_Elementary_Type
714 instead of Is_Scalar_Type for a constant with an address clause.
715 Do not return the underlying constant for a constant used by reference
716 if it holds the address of a constant and an lvalue is required.
718 2012-06-11 Eric Botcazou <ebotcazou@adacore.com>
720 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not specifically deal
721 with external constants wrt force_global here...
722 <E_Constant>: ...but here instead.
723 * gcc-interface/utils.c (gnat_pushdecl): Do not put external DECLs onto
724 the list of global DECLs.
726 2012-06-11 Eric Botcazou <ebotcazou@adacore.com>
728 * gcc-interface/decl.c (gnat_to_gnu_entity): Translate the Esize on
729 entry only for elementary types and abort if it is too large.
730 <E_Record_Type>: Make sure the Esize is known before using it.
732 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
734 * gcc-interface/utils2.c: Do not include output.h.
735 * gcc-interface/Make-lang.in: Fix dependencies.
737 2012-05-29 Michael Matz <matz@suse.de>
739 * gcc-interface/utils.c (create_var_decl_1): Don't call expand_decl.
741 2012-05-26 Eric Botcazou <ebotcazou@adacore.com>
743 * gcc-interface/decl.c (variant_desc): Rename 'record' to 'new_type'.
744 (build_variant_list): Adjust to above renaming.
745 (gnat_to_gnu_entity) <E_Record_Subtype>: Likewise. Give a unique name
746 to the type of the variant containers.
747 (create_variant_part_from): Likewise. Give a unique name to the type
750 2012-05-25 Eric Botcazou <ebotcazou@adacore.com>
753 * link.c (__gnat_object_file_option): Set to "-Wl,@" for GNU linker.
754 (__gnat_using_gnu_linker): Delete.
755 * gnatlink.adb (Gnatlink): Declare Object_File_Option_Ptr here...
756 Declare Object_File_Option string constant and Using_GNU_response_file
758 (Process_Binder_File): ...instead of here. Delete Using_GNU_Linker,
759 Opening and Closing local variables. Do not handle the GNU linker
761 (Write_RF): New procedure to write into the response file. Escape some
762 characters if a GNU response file is used. Keep track of error status.
763 Invoke Write_RF to write into the response file. Delete the file only
764 if the link was successful.
765 * mlib-utl.adb: Do not `with' package System.
766 (Gcc): Likewise. Declare Object_File_Option string constant and
767 Using_GNU_response_file boolean constant.
768 (Write_RF): Take a string instead of address and length. Escape some
769 characters if a GNU response file is used.
770 Invoke Write_RF to write into the response file. Delete the file only
771 if the link was successful. Do not warn if it cannot be deleted.
773 2012-05-20 Eric Botcazou <ebotcazou@adacore.com>
775 * gcc-interface/utils.c (gnat_write_global_declarations): Put a name
776 on the dummy global variable.
778 2012-05-19 Eric Botcazou <ebotcazou@adacore.com>
780 * gcc-interface/decl.c (Has_Thiscall_Convention): New macro.
781 (gnat_to_gnu_entity) <E_Subprogram_Type>: Test it to set the thiscall
783 (get_minimal_subprog_decl): Likewise.
784 (gnat_first_param_is_class): New predicate.
786 * gcc-interface/misc.c (gnat_handle_option): Fix formatting.
787 * gcc-interface/Makefile.in: Likewise.
789 2012-05-18 Eric Botcazou <ebotcazou@adacore.com>
791 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: For an object at
792 global level with unconstrained nominal subtype and a non-fixed size,
793 make a variable for the size.
795 2012-05-15 Andris Pavenis <andris.pavenis@iki.fi>
798 * s-taprop-dummy.adb (Specific): New package.
800 2012-05-15 Olivier Hainque <hainque@adacore.com>
802 * gcc-interface/Make-lang.in (COMMON_FLAGS_TO_PASS): Use WARN_CFLAGS
803 instead of trying to mimic it.
805 2012-05-15 Robert Dewar <dewar@adacore.com>
807 * sem_ch5.adb, sem_util.adb, s-stposu.adb, exp_ch4.adb: Minor
810 2012-05-15 Geert Bosch <bosch@adacore.com>
812 * uintp.adb (UI_Rem): Remove optimizations, as they are complex and are
814 (Sum_Digits): Remove, no longer used.
815 (Sum_Double_Digits): Likewise.
817 2012-05-15 Yannick Moy <moy@adacore.com>
819 * aspects.ads: Minor typo.
821 2012-05-15 Thomas Quinot <quinot@adacore.com>
823 * gnat_rm.texi (Scalar_Storage_Order): Fix RM reference.
824 * sem_ch13.adb: Minor comment fix: incorrect RM reference.
826 2012-05-15 Eric Botcazou <ebotcazou@adacore.com>
828 * sem_prag.adb (Process_Atomic_Shared_Volatile): Propagate
829 atomicity from an object to its underlying type only if it
832 2012-05-15 Ed Schonberg <schonberg@adacore.com>
834 * sem_ch5.adb (Analyze_Iterator_Specification): Set kind of
835 loop variable after pre-analysis of iterator name, to prevent
836 premature usage of loop variable.
838 2012-05-15 Ed Schonberg <schonberg@adacore.com>
840 * sem_util.adb (Is_Variable): In Ada 2012, an explicit
841 dereference that is a rewriting of an expression whose type has
842 a declared Implicit_Derenference aspect is a variable.
844 2012-05-15 Hristian Kirtchev <kirtchev@adacore.com>
846 * exp_ch4.adb (Insert_Dereference_Action): Reimplemented. The
847 routine performs address and size adjustments for dereferences
848 of heap-allocated controlled objects. This manipulation is needed
849 in order to restore the original state of the memory at the time
850 it was allocated by the finalization machinery.
851 * rtsfind.ads: Add RE_Adjust_Controlled_Dereference to tables
852 RE_Id and RE_Unit_Table.
853 * sinfo.adb (Has_Dereference_Action): New routine.
854 (Set_Has_Dereference_Action): New routine.
855 * sinfo.ads: Add new semantic flag Has_Dereference_Action along
856 its association in nodes.
857 (Has_Dereference_Action): New routine and pragma Inline.
858 (Set_Has_Dereference_Action): New routine and pragma Inline.
859 * s-stposu.ads, s-stposu.adb (Adjust_Controlled_Dereference): New
862 2012-05-15 Thomas Quinot <quinot@adacore.com>
864 * uintp.adb (Image_Uint): Use UI_Div_Rem to get quotient and
865 remainder of U / Base in a single operation.
867 2012-05-15 Robert Dewar <dewar@adacore.com>
869 * exp_ch5.adb, inline.adb, sem_ch10.adb, prj.ads, sem_util.adb,
870 a-ngelfu.ads, exp_ch4.adb, exp_ch6.adb, aspects.ads, sem_ch6.adb,
871 vms_data.ads, exp_ch3.adb, prj-env.adb: Minor reformatting.
873 2012-05-15 Thomas Quinot <quinot@adacore.com>
875 * exp_ch4.adb (Has_Inferable_Discriminants): For a qualified
876 expression, use correct node for test on the subtype denoted by
879 2012-05-15 Eric Botcazou <ebotcazou@adacore.com>
881 * inline.adb (Scope_In_Main_Unit): Rename into...
882 (In_Main_Unit_Or_Subunit): ...this. Also return
883 true if the subprogram is within a subunit of the
885 (Add_Inlined_Body): Adjust for above renaming.
886 (Add_Inlined_Subprogram): Likewise. Pass the subprogram directly.
887 (Analyze_Inlined_Bodies): Really set aside inlined subprograms
888 not handled by Add_Inlined_Body.
890 2012-05-15 Ed Schonberg <schonberg@adacore.com>
892 * sem_ch10.adb (Expand_With_Clause): In the context of a generic
893 package declaration, a private with-clause on a child unit implies
894 that the implicit with clauses on its parents are private as well.
896 2012-05-15 Javier Miranda <miranda@adacore.com>
898 * sem_ch6.adb (Is_Interface_Conformant): Add missing call to
899 Base_Type to handle subtypes.
900 * exp_ch6.adb (Expand_Call): For calls located in thunks handle
901 unchecked conversions of access types found in actuals.
902 * exp_disp.adb (Expand_Interface_Thunk): Add missing unchecked
903 conversion to actuals whose type is an access type. Done to
904 avoid reporting spurious errors.
906 2012-05-15 Vincent Celier <celier@adacore.com>
908 * prj-env.adb (Create_Mapping): Ignore sources that are
909 suppressed (Create_Mapping_File.Process): Ditto
910 * prj-nmsc.adb (Add_Source): Update to take into
911 account suppressed files that may hide inherited sources.
912 (Mark_Excluded_Sources): Mark excluded sources of the current
913 project as suppressed.
914 * prj.ads (Source_Data): New Boolean component Suppressed,
917 2012-05-15 Thomas Quinot <quinot@adacore.com>
919 * exp_intr.adb: Minor reformatting.
921 2012-05-15 Thomas Quinot <quinot@adacore.com>
923 * gnat_rm.texi: Document attribute Scalar_Storage_Order.
925 2012-05-15 Javier Miranda <miranda@adacore.com>
927 * exp_ch3.adb (Build_Offset_To_Top): Modify the
928 expansion of the offset_to_top functions to ensure that their
929 profile is conformant with the profile specified in Ada.Tags. No
930 change in functionality.
932 2012-05-15 Eric Botcazou <ebotcazou@adacore.com>
934 * inline.adb (Subp_Info): Remove Count and Next_Nopred
935 components, add Processed component and move around Next component.
936 (Add_Call): Reverse meaning of Successors table to the natural one.
937 (Add_Inlined_Body): Do not inline a package if it is in the main unit.
938 (Add_Inlined_Subprogram): Do not add the subprogram to the list if the
939 package is in the main unit. Do not recurse on the successors.
940 (Add_Subp): Adjust to new contents of Subp_Info.
941 (Analyze_Inlined_Bodies): Do not attempt
942 to compute a topological order on the list of inlined subprograms,
943 but compute the transitive closure from the main unit instead.
944 (Get_Code_Unit_Entity): Always return the spec for a package.
946 2012-05-15 Yannick Moy <moy@adacore.com>
948 * aspects.ads: Minor addition of comments to provide info on
949 how to add new aspects.
951 2012-05-15 Thomas Quinot <quinot@adacore.com>
953 * osint.ads: Minor reformatting.
955 2012-05-15 Thomas Quinot <quinot@adacore.com>
957 * exp_ch5.adb, exp_pakd.adb, sem_util.adb, sem_util.ads
958 (Expand_Assign_Array): Handle the case of a packed bit array within a
959 record with reverse storage order (assign element by element in that
961 (In_Reverse_Storage_Order_Record): New subprogram,
962 code extracted from Exp_Pakd.
964 2012-05-15 Yannick Moy <moy@adacore.com>
966 * a-ngelfu.ads: Add postconditions using Ada 2012
967 aspect syntax, reflecting some of the RM requirements for these
968 functions, from Annex A.5.1 or G.2.4.
970 2012-05-15 Thomas Quinot <quinot@adacore.com>
972 * adaint.c: Minor fix: move misplaced comment.
974 2012-05-15 Doug Rupp <rupp@adacore.com>
976 * vms_data.ads: Enhance help for /IMMEDIATE_ERRORS to discourage
979 2012-05-15 Tristan Gingold <gingold@adacore.com>
981 * a-exextr.adb: Add comment.
983 2012-05-15 Ed Schonberg <schonberg@adacore.com>
985 * sem_ch3.adb: Minor reformatting (remove long dead code).
987 2012-05-15 Ed Schonberg <schonberg@adacore.com>
989 * aspects.adb, aspects.ads: Add aspects for Convention, Export,
990 External_Name, Import, and Link_Name.
991 * exp_prag.adb (Expand_Pragma_Import_Or_Interface): if the
992 pragma comes from an aspect specification, the entity is the
994 * sem_prag.adb (Analyze_Pragma, cases Pragma_Export and
995 Pragma_Import): if the pragma comes from an aspect specification,
996 the entity is the first argument, and the second has the value
998 * sem_ch13.adb (Analyze_Aspect_Specifications): generate pragam
999 for aspect Convention. Add placeholders for Link_Name and
1002 2012-05-15 Hristian Kirtchev <kirtchev@adacore.com>
1004 * exp_ch9.adb (Expand_N_Asynchronous_Select): Extract the statements
1005 of the abortable part and triggering alternative after being processed
1006 for controlled objects.
1007 (Expand_N_Timed_Entry_Call): Code and comment reformatting.
1009 2012-05-15 Robert Dewar <dewar@adacore.com>
1011 * sem_util.adb: Minor code reorganization.
1013 2012-05-15 Robert Dewar <dewar@adacore.com>
1015 * exp_ch7.adb, exp_ch11.adb, exp_ch11.ads: Minor reformatting.
1017 2012-05-15 Thomas Quinot <quinot@adacore.com>
1019 * sem_res.adb (Resolve): Enforce E.2.2(11/2) and E.2.2(12) for
1020 'Unrestricted_Access and 'Unchecked_Access (not just 'Access):
1021 even in those cases, a remote access type may only designate a
1024 2012-05-15 Thomas Quinot <quinot@adacore.com>
1026 * sem_util.adb, sem_util.ads, sem_cat.adb: Minor refactoring.
1027 (Enclosing_Lib_Unit_Node): Rename to Enclosing_Comp_Unit_Node.
1029 2012-05-15 Ed Schonberg <schonberg@adacore.com>
1031 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Remove obsolete
1032 checks on nested inlined subprograms.
1034 2012-05-15 Tristan Gingold <gingold@adacore.com>
1036 * fe.h (Get_RT_Exception_Name): Declare.
1038 2012-05-15 Tristan Gingold <gingold@adacore.com>
1040 * raise-gcc.c (db_region_for): Use %p + cast to avoid warnings.
1041 (get_region_description_for): Likewise.
1042 (db_action_for): Likewise.
1043 (get_call_site_action_for): Likewise.
1044 (get_ttype_entry_for): Remove useless 'const'.
1045 (PERSONALITY_FUNCTION): Add ATTRIBUTE_UNUSED on uw_exception_class.
1047 2012-05-15 Tristan Gingold <gingold@adacore.com>
1049 * a-exextr.adb (Unhandled_Exception_Terminate): Save occurrence
1050 on the stack to avoid a dynamic memory allocation.
1052 2012-05-15 Bob Duff <duff@adacore.com>
1054 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Move initialization of
1055 E_Stats and D_Stats after Process_Statements_For_Controlled_Objects,
1056 because those calls can destroy the Statements list.
1058 2012-05-15 Tristan Gingold <gingold@adacore.com>
1060 * fe.h (Get_RT_Exception_Name): Define.
1061 * types.ads (RT_Exception_Code): Update comment.
1062 * exp_ch11.adb, exp_ch11.ads (Get_RT_Exception_Name): New
1063 procedure to get the name of the rcheck subprograms.
1064 * a-except-2005.adb (Rcheck_xx): Rename.
1065 * a-except.adb Likewise, but also keep the old Rcheck_nn routines
1067 * arith64.c (__gnat_mulv64): Use __gnat_rcheck_CE_Overflow_Check
1068 instead of __gnat_rcheck_10.
1069 * gcc-interface/trans.c (build_raise_check): Use Get_RT_Exception_Name
1070 to create the __gnat_rcheck routines name.
1071 * gcc-interface/Make-lang.in: Update dependencies.
1073 2012-05-15 Tristan Gingold <gingold@adacore.com>
1075 * exp_ch7.adb (Build_Exception_Handler): Save current
1076 occurrence only if -gnateE.
1077 (Build_Object_Declaration): Declare E_Id only if -gnateE.
1078 (Build_Raise_Statement): Call Raise_From_Controlled_Operation only if
1079 -gnateE (else raise PE).
1080 * s-soflin.adb (Save_Library_Occurrence): Handle null occurrence
1082 * a-except-2005.adb (Reraise_Library_Exception_If_Any): Call
1083 Raise_From_Controlled_Operation only if the saved occurrence is
1084 not null, otherwise raise PE.
1086 2012-05-15 Yannick Moy <moy@adacore.com>
1088 * exp_alfa.ads: Add comments describing the Alfa mode.
1090 2012-05-15 Tristan Gingold <gingold@adacore.com>
1092 * s-soflin.ads, s-soflin.adb (Save_Library_Occurrence): Parameter
1093 E is now of type Exception_Occurrence_Access.
1094 * exp_ch7.ads, exp_ch7.adb (Build_Exception_Handler): Adjust generated
1095 call to Save_Library_Occurrence.
1097 2012-05-15 Thomas Quinot <quinot@adacore.com>
1099 * exp_ch4.adb (Rewrite_Coextension): Use Insert_Action to
1100 insert temporary variable decl at the proper place in the tree.
1102 2012-05-15 Hristian Kirtchev <kirtchev@adacore.com>
1104 * g-calend.adb (Split_At_Locale): New routine.
1105 (Time_Of_At_Locale): New routine.
1106 * g-calend.ads (Split_At_Locale): New routine.
1107 (Time_Of_At_Locale): New routine.
1109 2012-05-15 Gary Dismukes <dismukes@adacore.com>
1111 * a-except.ads: Minor reformatting.
1113 2012-05-15 Ed Schonberg <schonberg@adacore.com>
1115 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): If the loop
1116 parameter specification is part of a quantified expression, and it
1117 already carries a type, do not repeat the analysis to preserve
1118 type information: a range attribute reference may have been
1119 rewritten as a range with static bounds, and its re-analysis may
1120 type it as Integer by default, instead of the original index type.
1122 2012-05-15 Robert Dewar <dewar@adacore.com>
1124 * s-osprim-mingw.adb: Minor reformatting.
1126 2012-05-15 Arnaud Charlet <charlet@adacore.com>
1128 * a-except.adb, a-except.ads (Reraise_Library_Exception_If_Any): New.
1129 Mark this unit preelaborate.
1130 * s-soflin.ads: Make package Preelaborate.
1132 2012-05-15 Robert Dewar <dewar@adacore.com>
1134 * s-osprim-mingw.adb, sem_eval.adb, a-calend-vms.ads: Minor reformatting
1136 2012-05-15 Ed Schonberg <schonberg@adacore.com>
1138 * sem_eval.adb (Subtypes_Statically_Match): In Ada 2012, static
1139 matching requires matching of static subtype predicates as well.
1141 2012-05-15 Ed Schonberg <schonberg@adacore.com>
1143 * sem_case.adb (Analyze_Choices): If the subtype of the
1144 expression has a non-static predicate, the case alternatives
1145 must cover the base type.
1147 2012-05-15 Tristan Gingold <gingold@adacore.com>
1149 * a-calend-vms.ads: Add pragma export to Split and Time_Of.
1150 Merge comments from a-calend.ads to minimize differences.
1152 2012-05-15 Sergey Rybin <rybin@adacore.com frybin>
1154 * gnat_ugn.texi: gnatmetric: add a small example that demonstrates
1155 the difference between control coupling and unit coupling.
1157 2012-05-15 Tristan Gingold <gingold@adacore.com>
1159 * bindgen.adb (Gen_Header): Remove code to emit LE_Set.
1160 (Gen_Finalize_Library): Replace test with
1161 a call to __gnat_reraise_library_exception_if_any.
1162 * s-soflin.ads (Library_Exception): Do not export.
1163 (Library_Exception_Set): Likewise.
1164 * a-except-2005.ads, a-except-2005.adb
1165 (Reraise_Library_Exception_If_Any): New procedure.
1167 2012-05-15 Geert Bosch <bosch@adacore.com>
1169 * sem_ch9.adb (Allows_Lock_Free_Implementation): out or in out
1170 parameters can be access types as well, not just scalar types,
1171 so relax the test to Is_Elementary_Type.
1173 2012-05-15 Bob Duff <duff@adacore.com>
1175 * s-atacco.ads s-atacco.adb: Replace pragma Elaborate_Body
1176 with pragma No_Body.
1177 (Xyz): Remove Xyz, which is apparently unnecessary.
1179 2012-05-15 Tristan Gingold <gingold@adacore.com>
1181 * a-calend-vms.adb: Complete previous change.
1183 2012-05-15 Bob Duff <duff@adacore.com>
1185 * s-win32.ads: Minor comment fix.
1186 * s-osprim-mingw.adb: Minor editing.
1188 2012-05-15 Robert Dewar <dewar@adacore.com>
1190 * exp_ch9.adb, sem_ch9.adb, sem_ch13.adb: Minor reformatting.
1192 2012-05-15 Robert Dewar <dewar@adacore.com>
1194 * g-comlin.adb, g-comlin.ads: Minor reformatting.
1196 2012-05-15 Vincent Pucci <pucci@adacore.com>
1198 * aspects.adb, aspects.adb: Reordering of the Aspect_Idi list. New
1199 aspect Aspect_Lock_Free.
1200 * einfo.adb, einfo.ads: New flag Uses_Lock_Free (flag 188).
1201 (Set_Uses_Lock_Free): New routine.
1202 (Uses_Lock_Free): New routine.
1203 * exp_ch7.adb (Is_Simple_Protected_Type): Return False for
1204 lock-free implementation.
1205 * exp_ch9.adb (Allows_Lock_Free_Implementation): Moved to Sem_Ch9.
1206 (Build_Lock_Free_Unprotected_Subprogram_Body): Protected
1207 procedure uses __sync_synchronise. Check both Object_Size
1209 (Expand_N_Protected_Body): Lock_Free_Active
1210 renames Lock_Free_On.
1211 (Expand_N_Protected_Type_Declaration):
1212 _Object field removed for lock-free implementation.
1213 (Install_Private_Data_Declarations): Protection object removed
1214 for lock-free implementation.
1215 (Make_Initialize_Protection):
1216 Protection object initialization removed for lock-free implementation.
1217 * rtsfind.ads: RE_Atomic_Synchronize and RE_Relaxed added.
1218 * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect_Lock_Free
1220 * sem_ch9.adb (Allows_Lock_Free_Implementation): New routine.
1221 (Analyze_Protected_Body): Allows_Lock_Free_Implementation call added.
1222 (Analyze_Protected_Type_Declaration):
1223 Allows_Lock_Free_Implementation call added.
1224 (Analyze_Single_Protected_Declaration): Second analysis of
1226 * s-atopri.ads: Header added.
1227 (Atomic_Synchronize): New routine.
1229 2012-05-15 Robert Dewar <dewar@adacore.com>
1231 * exp_ch7.ads: Add comment.
1233 2012-05-15 Hristian Kirtchev <kirtchev@adacore.com>
1235 * a-calend.adb (Day_Of_Week): The routine once again treats
1236 all dates as historic. (Formatting_Operations.Split): All
1237 calls to UTC_Time_Offset are now controlled through formal
1238 parameter Is_Historic. (Formatting_Operations.Time_Of):
1239 All calls to UTC_Time_Offset are now handled through
1240 formal parameter Is_Historic.
1241 (Split): Update the call to Formatting_Operations.Split.
1242 (Time_Of): Update the call to Formatting_Operations.Time_Of.
1243 (To_Ada_Time): Update the call to Formatting_Operations.Time_Of.
1244 (To_Strict_Tm): Update the call to Formatting_Operations.Split.
1245 * a-calend.ads (Split): Add new formal Is_Historic along with
1246 comment on usage. This routine is now exported for the purposes
1247 of GNAT.Calendar.Locale.
1248 (Time_Of): Remove defaults. Add new
1249 formal Is_Historic along with comment on usage. This routine is
1250 now exported for the purposes of GNAT.Calendar.Locale.
1251 * a-calend-vms.adb (Split): Update the call to
1252 Formatting_Operations.Split.
1253 (Time_Of): Update the call to Formatting_Operations.Time_Of.
1254 * a-calend-vms.ads (Split): Add new formal Is_Historic along
1255 with comment on usage. (Time_Of): Remove defaults. Add new
1256 formal Is_Historic along with comment on usage.
1257 * a-calfor.adb (Split): Update the call to
1258 Formatting_Operations.Split.
1259 (Time_Of): Update the call to Formatting_Operations.Time_Of.
1261 2012-05-15 Vincent Celier <celier@adacore.com>
1263 * prj-nmsc.adb (Add_Source): Always add the source if it is
1264 excluded, to avoid incorrect duplicate checks.
1266 2012-05-15 Yannick Moy <moy@adacore.com>
1268 * sem_aux.ads: Correct typo.
1269 * sem_eval.adb (Compile_Time_Known_Value): Return False in Alfa
1270 mode for a deferred constant when outside of the scope of its
1273 2012-05-15 Emmanuel Briot <briot@adacore.com>
1275 * g-comlin.adb, g-comlin.ads (Define_Switch): Allow specifying the name
1276 of the argument, for the automatic help message.
1277 (Getopt): do not systematically initialize switches with string values
1278 to the empty string, when the user has already specified a default.
1280 2012-05-14 Bernd Schmidt <bernds@codesourcery.com>
1282 * gcc-interface/utils.c (DEF_ATTR_STRING): New.
1284 2012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
1287 * gcc-interface/misc.c: Include opts.h and options.h before tm.h.
1288 (gnat_handle_option): Call lang-specific generated function.
1290 2012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
1292 * gcc-interface/lang.opt (I): Comment out help text with no effect.
1293 (nostdinc): Comment out help text with no effect.
1295 2012-05-12 Eric Botcazou <ebotcazou@adacore.com>
1297 * gcc-interface/Makefile.in (TOOLS_LIBS): Add ../../ggc-none.o.
1299 2012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
1302 * gcc-interface/misc.c (gnat_parse_file): Move before ...
1303 (gnat_handle_option): ... this. Use handle_generated_option.
1305 2012-05-10 Richard Guenther <rguenther@suse.de>
1307 * gcc-interface/cuintp.c (UI_From_gnu): Remove TYPE_IS_SIZETYPE use.
1309 2012-05-06 Tristan Gingold <gingold@adacore.com>
1311 * gcc-interface/trans.c (gigi): Decorate reraise_zcx_decl.
1313 2012-05-06 Eric Botcazou <ebotcazou@adacore.com>
1315 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: In the renaming
1316 case, use the padded type if the renamed object has an unconstrained
1317 type with default discriminant.
1319 2012-05-06 Eric Botcazou <ebotcazou@adacore.com>
1321 * gcc-interface/trans.c (Loop_Statement_to_gnu): Also handle invariant
1322 conditions with only one bound.
1323 (Raise_Error_to_gnu): Likewise. New function extracted from...
1324 (gnat_to_gnu) <N_Raise_Constraint_Error>: ...here. Call above function
1325 in regular mode only.
1327 2012-05-06 Eric Botcazou <ebotcazou@adacore.com>
1329 * gcc-interface/misc.c (gnat_post_options): Disable caret by default.
1331 2012-05-06 Eric Botcazou <ebotcazou@adacore.com>
1333 * gcc-interface/gigi.h (make_packable_type): Declare.
1334 (make_type_from_size): Likewise.
1335 (relate_alias_sets): Likewise.
1336 (maybe_pad_type): Adjust.
1337 (init_gnat_to_gnu): Delete.
1338 (destroy_gnat_to_gnu): Likewise.
1339 (init_dummy_type): Likewise.
1340 (destroy_dummy_type): Likewise.
1341 (init_gnat_utils): Declare.
1342 (destroy_gnat_utils): Likewise.
1343 (ceil_pow2): New inline function.
1344 * gcc-interface/decl.c (gnat_to_gnu_entity): Use ceil_pow2.
1345 <object>: Pass True for the final processing of alignment and size.
1346 <E_Subprogram_Type>: Only create the TYPE_DECL for a padded return
1348 (round_up_to_align): Delete.
1349 (ceil_alignment): Likewise.
1350 (relate_alias_sets): Move to...
1351 (make_aligning_type): Likewise.
1352 (make_packable_type): Likewise.
1353 (maybe_pad_type): Likewise.
1354 (make_type_from_size): Likewise.
1355 * gcc-interface/utils.c (MAX_BITS_PER_WORD): Delete.
1356 (struct pad_type_hash): New type.
1357 (pad_type_hash_table): New static variable.
1358 (init_gnat_to_gnu): Merge into...
1359 (init_dummy_type): Likewise.
1360 (init_gnat_utils): ...this. New function.
1361 (destroy_gnat_to_gnu): Merge into...
1362 (destroy_dummy_type): Likewise.
1363 (destroy_gnat_utils): ...this. New function.
1364 (pad_type_hash_marked_p): New function.
1365 (pad_type_hash_hash): Likewise.
1366 (pad_type_hash_eq): Likewise.
1367 (relate_alias_sets): ...here.
1368 (make_aligning_type): Likewise.
1369 (make_packable_type): Likewise.
1370 (maybe_pad_type): Likewise. Change same_rm_size parameter into
1371 set_rm_size; do not set TYPE_ADA_SIZE if it is false. Do not set
1372 null as Ada size. Do not set TYPE_VOLATILE on the padded type. If it
1373 is complete and has constant size, canonicalize it. Bail out earlier
1374 if a warning need not be issued.
1375 (make_type_from_size): Likewise.
1376 <INTEGER_TYPE>: Bail out if size is too large
1377 (gnat_types_compatible_p): Do not deal with padded types.
1378 (convert): Compare main variants for padded types.
1379 * gcc-interface/trans.c (gigi): Call {init|destroy}_gnat_utils.
1380 (gnat_to_gnu): Do not convert at the end for a call to a function that
1381 returns an unconstrained type with default discriminant.
1382 (Attribute_to_gnu) <Attr_Size>: Simplify handling of padded objects.
1383 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Likewise.
1384 Do not use the padded type if it is BLKmode and the inner type is
1387 2012-05-02 Pascal Obry <obry@adacore.com>
1390 2012-02-24 Dave Korn <dave.korn.cygwin@gmail.com>
1392 * gcc-interface/Makefile.in (WIN_SO_PREFIX [windows targets]): New
1393 Windows-specific make variable.
1394 (WIN_SO_INSTALL_DIR [windows targets]): Likewise.
1395 (install-gnatlib): Respect the above during installation when set,
1396 and also install any windows import library that has been built.
1397 (gnatlib-shared-win32): Use WIN_SO_PREFIX to name output DLL and also
1398 build a corresponding import library.
1400 2012-04-30 Jan Hubicka <jh@suse.cz>
1402 * gcc-interface/utils.c (rest_of_subprog_body_compilation): Update
1404 (gnat_write_global_declarations): Use finalize_compilation_unit.
1406 2012-04-30 Eric Botcazou <ebotcazou@adacore.com>
1408 * gcc-interface/decl.c (gnat_to_gnu_entity): In type annotation mode,
1409 do not adjust the size of a tagged type if there is a representation
1410 clause on it. Otherwise, round the adjustment up to the alignment
1411 of the first field and use the appropriate helper routine.
1412 (maybe_pad_type): Do not warn in type annotation mode on a tagged type.
1413 (gnat_to_gnu_field): Do not error out under the same circumstances.
1414 (annotate_rep): In type annotation mode, do not adjust the offset of
1415 components of a tagged type with representation clause. Otherwise,
1416 round the adjustment up to the alignment of the first field.
1418 2012-04-30 Eric Botcazou <ebotcazou@adacore.com>
1420 * gcc-interface/utils.c (finish_record_type): Force the traditional GCC
1421 layout for bitfields on the type if it is packed or has a representation
1422 clause and an alternate layout is available.
1424 2012-04-30 Eric Botcazou <ebotcazou@adacore.com>
1426 * gcc-interface/gigi.h (mark_out_of_scope): Delete.
1427 (destroy_gnat_to_gnu): Declare.
1428 (destroy_dummy_type): Likewise.
1429 * gcc-interface/decl.c (mark_out_of_scope): Delete.
1430 * gcc-interface/utils.c (destroy_gnat_to_gnu): New function.
1431 (destroy_dummy_type): Likewise.
1432 * gcc-interface/trans.c (gnat_validate_uc_list): New variable.
1433 (gigi): Call validate_unchecked_conversion on gnat_validate_uc_list
1434 after the translation is completed. Call destroy_gnat_to_gnu and
1435 destroy_dummy_type at the end.
1436 (Subprogram_Body_to_gnu): Do not call mark_out_of_scope.
1437 (gnat_to_gnu) <N_Block_Statement>: Likewise.
1438 <N_Validate_Unchecked_Conversion>: Do not process the node, only push
1439 it onto gnat_validate_uc_list.
1440 (validate_unchecked_conversion): New function.
1442 2012-04-26 Tristan Gingold <gingold@adacore.com>
1444 * gcc-interface/Make-lang.in: Update dependencies.
1445 Remove s-traceb and tracebak objects from gnat1 and gnatbind (not used).
1446 Remove s-tasdeb and s-vaflop rules (not used).
1448 2012-04-26 Olivier Hainque <hainque@adacore.com>
1450 * gcc-interface/targtyps.c (WIDEST_HARDWARE_FP_SIZE): Default to
1451 DOUBLE_TYPE_SIZE instead of LONG_DOUBLE_TYPE_SIZE.
1453 2012-04-26 Hristian Kirtchev <kirtchev@adacore.com>
1455 * a-calend.adb (Day_Of_Week): Keep the internal
1456 usage of UTC_Time_Offset consistent with Time_Of and Split.
1458 2012-04-26 Hristian Kirtchev <kirtchev@adacore.com>
1460 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Do not freeze
1461 the loop variable while preanalyzing a quantified expression.
1463 2012-04-26 Hristian Kirtchev <kirtchev@adacore.com>
1465 * a-calend.adb (Split, Time_Of): Rename parameter Is_Ada_05
1466 to Use_TZ to better illustrate its function. Update all
1467 references to the parameter.
1468 (To_Ada_Time): Update the call to Formatting_Operations.Time_Of.
1469 * a-calend.ads (Split, Time_Of): Rename parameter Is_Ada_05
1470 to Use_TZ to better illustrate its function. Update the related
1472 * a-calend-vms.adb (Split, Time_Of): Rename parameter
1473 Is_Ada_05 to Use_TZ to better illustrate its function. Update
1474 all references to the parameter.
1475 (To_Ada_Time): Update the call to Formatting_Operations.Time_Of.
1476 * a-calend-vms.ads (Split, Time_Of): Rename parameter Is_Ada_05
1477 to Use_TZ to better illustrate its function. Update the related
1479 * a-calfor.adb (Split, Time_Of): Update the call to
1480 Formatting_Operations.Time_Of.
1481 * sysdep.c (__gnat_localtime_tzoff): Dereference pointer
1482 "is_historic" and rewrite the check as a comparison. Add a
1483 comment on flag values.
1485 2012-04-26 Robert Dewar <dewar@adacore.com>
1487 * exp_ch2.adb, sem_ch8.adb: Minor reformatting.
1489 2012-04-26 Vasiliy Fofanov <fofanov@adacore.com>
1491 * a-stzunb-shared.adb, gnat_ugn.texi, a-strunb-shared.adb,
1492 a-strunb-shared.ads, uintp.adb, a-stwiun-shared.adb,
1493 a-stwiun-shared.ads, a-cbhama.ads, vms_data.ads, a-cobove.adb,
1494 a-convec.adb, sem_ch13.adb, a-cbhase.ads: Fix common misuses of the
1495 word "then" where "than" should be used in English.
1497 2012-04-26 Robert Dewar <dewar@adacore.com>
1499 * sem_ch5.adb (Check_Unreachable_Code): Skip past pragmas.
1501 2012-04-26 Hristian Kirtchev <kirtchev@adacore.com>
1503 * s-finroo.ads: Remove with clause for
1504 Ada.Streams. Type Root_Controlled is now abstract tagged null
1505 record. Remove internal package Stream_Attributes. Root_Controlled
1506 doesn't need stream attribute redeclaration and avoids the
1507 dependency on streams.
1509 2012-04-26 Tristan Gingold <gingold@adacore.com>
1511 * adaint.c (to_host_path_spec): Removed (unused).
1514 2012-04-26 Steve Baird <baird@adacore.com>
1516 * gnat_rm.texi Improve description of Valid_Scalars attribute.
1518 2012-04-26 Ed Schonberg <schonberg@adacore.com>
1520 * sem_ch6.adb (Can_Override_Operator): If the formal is a
1521 generic type the operator cannot be overriding.
1523 2012-04-26 Ed Schonberg <schonberg@adacore.com>
1525 * sem_ch8.adb (Spec_Reloaded_For_Body): Check whether the type
1526 is declared in a package specification, and current unit is the
1527 corresponding package body. The use clauses themselves may be
1528 within a nested package.
1530 2012-04-26 Bob Duff <duff@adacore.com>
1532 * exp_ch2.adb (Param_Entity): Take into account the case where
1533 the type of the entry parameter has a representation clause.
1535 2012-04-26 Ed Schonberg <schonberg@adacore.com>
1537 * gnat_ugn.texi: Tweak dimensionality doc.
1539 2012-04-26 Robert Dewar <dewar@adacore.com>
1541 * sem_eval.adb: Minor reformatting.
1543 2012-04-26 Robert Dewar <dewar@adacore.com>
1545 * einfo.adb, einfo.ads, sem_res.adb, sem_ch4.adb,
1546 sem_eval.adb: Minor reformatting.
1548 2012-04-26 Thomas Quinot <quinot@adacore.com>
1550 * freeze.adb: Minor change in error wording.
1552 2012-04-26 Ed Schonberg <schonberg@adacore.com>
1554 * gnat_ugn.texi: Documentation on dimensional analysis.
1556 2012-04-26 Hristian Kirtchev <kirtchev@adacore.com>
1558 * einfo.adb, einfo.ads: Remove synthesized attribute
1559 Proper_First_Index along with its associations in various nodes.
1560 (Proper_First_Index): Removed.
1561 * sem_ch4.adb (Analyze_Slice): Alphabetize constants. Add new
1562 local variable Index_Type. The index type of a string literal
1563 subtype is that of the stored low bound.
1564 * sem_eval (Get_Static_Length): Remove the use of Proper_First_Index.
1565 * sem_res.adb (Resolve_Slice): Alphabetize constants. Add
1566 new local variable Index_Type. The index type of a
1567 string literal subtype is that of the stored low bound.
1568 (Set_String_Literal_Subtype): Code reformatting.
1570 2012-04-26 Robert Dewar <dewar@adacore.com>
1572 * exp_aggr.adb: Minor reformatting.
1574 2012-04-26 Hristian Kirtchev <kirtchev@adacore.com>
1576 * exp_ch7.adb (Expand_Cleanup_Actions): Update the call to
1577 Requires_Cleanup_Actions.
1578 * exp_util.adb (Requires_Cleanup_Actions (List_Id; Boolean;
1579 Boolean)): Rename formal parameter For_Package to Lib_Level to
1580 better reflect its purpose. Update the related comment and all
1581 occurrences of For_Package in the body.
1582 (Requires_Cleanup_Actions
1583 (Node_Id; Boolean)): Add new formal parameter Lib_Level. Add
1584 local constant At_Lib_Level to keep monitor whether the path
1585 taken from the top-most context to the current construct involves
1586 package constructs. Update all calls to Requires_Cleanup_Actions.
1587 * exp_util.ads (Requires_Cleanup_Actions): Add new formal
1588 parameter Lib_Level and associated comment.
1590 2012-04-26 Ed Schonberg <schonberg@adacore.com>
1592 * sem_ch6.adb (Process_Formals): If the type of the formal is
1593 a non null access type, mark the generated subtype as having a
1594 delayed freeze only if the designated type is not frozen yet.
1596 2012-04-26 Vincent Celier <celier@adacore.com>
1598 * prj-attr.adb: New package Clean with attributes
1599 Object_Artifact_Extensions and Source_Artifact_Extensions.
1600 * prj-nmsc.adb (Process_Clean): Process new package Clean
1601 * prj.ads (Language_Config): New components
1602 Clean_Object_Artifacts and Clean_Source_Artifacts.
1603 * snames.ads-tmpl: New standard names Clean,
1604 Object_Artifact_Extensions and Source_Artifact_Extensions.
1606 2012-04-26 Hristian Kirtchev <kirtchev@adacore.com>
1608 * einfo.adb (Proper_First_Index): Moved from Sem_Util.
1609 * einfo.ads: Add new synthesized attribute Proper_First_Index
1610 along with usage in nodes.
1611 (Proper_First_Index): Moved from Sem_Util.
1612 * sem_util.ads, sem_util.adb (Proper_First_Index): Moved to Einfo.
1614 2012-04-26 Gary Dismukes <dismukes@adacore.com>
1616 * layout.adb (Layout_Component_List): Test for the case of a
1617 single variant and the size of its component list was computed
1618 as an integer literal, and use that size (which is in bits)
1619 as is rather than converting to storage units.
1621 2012-04-26 Robert Dewar <dewar@adacore.com>
1623 * exp_aggr.adb: Minor reformatting.
1625 2012-04-26 Robert Dewar <dewar@adacore.com>
1627 * sem_util.adb: Minor reformatting.
1629 2012-04-26 Thomas Quinot <quinot@adacore.com>
1631 * exp_aggr.adb, exp_pakd.adb (Setup_Inline_Packed_Array_Reference,
1632 Packed_Array_Aggregate_Handled.Get_Component_Val):
1633 Reverse bit numbering within PAT when Reverse_Storage_Order
1634 applies to the enclosing record.
1636 2012-04-26 Thomas Quinot <quinot@adacore.com>
1638 * freeze.adb (Freeze_Record_Type): Improve error message for
1639 Scalar_Storage_Order inconsistent with Bit_Order.
1641 2012-04-25 Gary Dismukes <dismukes@adacore.com>
1643 * exp_ch9.adb: Add comments on the usage of the
1644 lock-free data structures.
1646 2012-04-25 Vincent Pucci <pucci@adacore.com>
1648 * exp_intr.adb (Expand_Shift): Convert the left
1649 operand and the operator when the type of the call differs from
1650 the type of the operator.
1652 2012-04-25 Geert Bosch <bosch@adacore.com>
1654 * stand.ads: Minor comment fix.
1656 2012-04-25 Hristian Kirtchev <kirtchev@adacore.com>
1658 * sem_ch4.adb (Analyze_Slice): Handle the case where the prefix
1659 is a string literal. Retrieve the first index from the base type
1660 when slicing a string literal.
1661 * sem_ch12.adb (Check_Private_View): Move the initialization
1662 of the type inside the loop to reflect the changing index.
1663 * sem_eval.adb (Eval_Relational_Op): Retrieve the first index
1664 from the base type when dealing with a string literal.
1665 * sem_res.adb (Resolve_Slice): Retrieve the first index from
1666 the base type when slicing a string literal.
1667 * sem_util.adb (Is_Internally_Generated_Renaming): New routine.
1668 (Is_Object_Reference): String literals may act
1669 as object references only when they are renamed internally.
1670 (Proper_First_Index): New routine.
1671 * sem_util.ads (Proper_First_Index): New routine.
1673 2012-04-25 Robert Dewar <dewar@adacore.com>
1675 * sem_ch3.adb, csinfo.adb, lib-writ.adb, sem_ch12.adb,
1676 lib-xref.adb: Minor reformatting.
1678 2012-04-25 Hristian Kirtchev <kirtchev@adacore.com>
1680 * exp_ch9.adb: Rename Lock_Free_Sub_Type
1681 to Lock_Free_Subprogram. Remove type Subprogram_Id.
1682 Rename LF_Sub_Table to Lock_Free_Subprogram_Table.
1683 (Allow_Lock_Free_Implementation): Renamed to
1684 Allows_Lock_Free_Implementation. Update the comment on
1685 lock-free restrictions. Code clean up and restructuring.
1686 (Build_Lock_Free_Protected_Subprogram_Body): Update the
1687 profile and related comments. Code clean up and restructuring.
1688 (Build_Lock_Free_Unprotected_Subprogram_Body): Update the
1689 profile and related comments. Code clean up and restructuring.
1692 2012-04-25 Vincent Celier <celier@adacore.com>
1694 * sem_ch12.adb (Inherit_Context): Compare library units, not
1695 names of units, when checking if a unit is already in the context.
1697 2012-04-25 Thomas Quinot <quinot@adacore.com>
1699 * sem_ch3.adb: Reverse_Storage_Order must be propagated to
1700 untagged derived record types.
1702 2012-04-25 Ed Schonberg <schonberg@adacore.com>
1704 * lib-xref.adb: Adjust position of end label.
1706 2012-04-22 Jan Hubicka <jh@suse.cz>
1708 * gcc-interface/utils.c (gnat_write_global_declarations): Do not mark
1711 2012-04-20 Jan Hubicka <jh@suse.cz>
1713 * gcc-interface/utils.c (gnat_write_global_declarations): Update for new
1714 force_output placement.
1716 2012-04-14 Jan Hubicka <jh@suse.cz>
1718 * gcc-interface/trans.c (finalize_nrv): Update field referenced for new
1719 cgraph/varpool layout.
1721 2012-04-09 Mike Stump <mikestump@comcast.net>
1723 * a-assert.ads: Remove execute permission.
1724 * a-chacon.ads: Likewise.
1725 * a-coteio.ads: Likewise.
1726 * a-envvar.ads: Likewise.
1727 * a-exetim-mingw.ads: Likewise.
1728 * a-fzteio.ads: Likewise.
1729 * a-izteio.ads: Likewise.
1730 * a-lcteio.ads: Likewise.
1731 * a-llctio.ads: Likewise.
1732 * a-scteio.ads: Likewise.
1733 * a-suenco.ads: Likewise.
1734 * a-suenst.ads: Likewise.
1735 * a-suewst.ads: Likewise.
1736 * a-suezst.ads: Likewise.
1737 * a-tirsfi.ads: Likewise.
1738 * a-wichha.ads: Likewise.
1739 * a-zchara.ads: Likewise.
1740 * a-zchhan.ads: Likewise.
1741 * a-zchuni.ads: Likewise.
1742 * a-zrstfi.ads: Likewise.
1743 * aspects.ads: Likewise.
1744 * g-byorma.ads: Likewise.
1745 * g-decstr.ads: Likewise.
1746 * g-encstr.ads: Likewise.
1747 * g-spchge.ads: Likewise.
1748 * g-u3spch.ads: Likewise.
1749 * g-wispch.ads: Likewise.
1750 * g-zspche.ads: Likewise.
1751 * namet-sp.ads: Likewise.
1752 * s-os_lib.ads: Likewise.
1753 * s-regexp.ads: Likewise.
1754 * s-regpat.ads: Likewise.
1755 * s-string.ads: Likewise.
1756 * s-tasloc.ads: Likewise.
1757 * s-utf_32.ads: Likewise.
1758 * sem_aux.ads: Likewise.
1759 * a-assert.adb: Likewise.
1760 * a-chacon.adb: Likewise.
1761 * a-envvar.adb: Likewise.
1762 * a-exetim-mingw.adb: Likewise.
1763 * a-suenco.adb: Likewise.
1764 * a-suenst.adb: Likewise.
1765 * a-suewst.adb: Likewise.
1766 * a-suezst.adb: Likewise.
1767 * a-tirsfi.adb: Likewise.
1768 * a-wichha.adb: Likewise.
1769 * a-zchhan.adb: Likewise.
1770 * a-zchuni.adb: Likewise.
1771 * a-zrstfi.adb: Likewise.
1772 * aspects.adb: Likewise.
1773 * g-byorma.adb: Likewise.
1774 * g-decstr.adb: Likewise.
1775 * g-encstr.adb: Likewise.
1776 * g-spchge.adb: Likewise.
1777 * g-u3spch.adb: Likewise.
1778 * g-wispch.adb: Likewise.
1779 * g-zspche.adb: Likewise.
1780 * namet-sp.adb: Likewise.
1781 * s-except.adb: Likewise.
1782 * s-inmaop-vxworks.adb: Likewise.
1783 * s-os_lib.adb: Likewise.
1784 * s-regexp.adb: Likewise.
1785 * s-regpat.adb: Likewise.
1786 * s-string.adb: Likewise.
1787 * s-tasloc.adb: Likewise.
1788 * s-utf_32.adb: Likewise.
1789 * s-wchcon.adb: Likewise.
1790 * sem_aux.adb: Likewise.
1792 2012-04-02 Robert Dewar <dewar@adacore.com>
1794 * s-atopri.ads: Minor reformatting.
1796 2012-04-02 Thomas Quinot <quinot@adacore.com>
1798 * sem_util.adb: Minor reformatting, minor code cleanup.
1800 2012-04-02 Ed Schonberg <schonberg@adacore.com>
1802 * lib-xref.adb (Generate_Reference): For a reference to an
1803 operator symbol, set the sloc to point to the first character
1804 of the operator name, and not to the initial quaote.
1805 (Output_References): Ditto for the definition of an operator
1808 2012-04-02 Vincent Celier <celier@adacore.com>
1810 * ali.adb (Scan_Ali): Recognize Z lines. Set
1811 Implicit_With_From_Instantiation to True in the With_Record for
1813 * ali.ads (With_Record): New Boolean component
1814 Implicit_With_From_Instantiation, defaulted to False.
1815 * csinfo.adb: Indicate that Implicit_With_From_Instantiation
1817 * lib-writ.adb (Write_ALI): New array Implicit_With.
1818 (Collect_Withs): Set Implicit_With for the unit is it is not Yes.
1819 (Write_With_Lines): Write a Z line instead of a W line if
1820 Implicit_With is Yes for the unit.
1821 * sem_ch12.adb (Inherit_Context): Only add a unit in the context
1822 if it is not there yet.
1823 * sinfo.ads: New flag Implicit_With_From_Instantiation (Flag12)
1826 2012-04-02 Yannick Moy <moy@adacore.com>
1828 * osint.adb, osint.ads (Add_Default_Search_Dirs): Add library
1829 search dirs in file specified with option -gnateO.
1831 2012-04-02 Robert Dewar <dewar@adacore.com>
1833 * sem_ch5.adb, exp_util.adb, sem_util.adb, exp_ch4.adb: Minor
1836 2012-04-02 Olivier Hainque <hainque@adacore.com>
1838 * g-sse.ads: Add x86-solaris and x86_64-darwin to the set of
1839 platforms where the use of this spec is supported. Add current
1840 year to the copyright notice.
1841 * gcc-interfaces/Makefile.in: Add g-sse.o and g-ssvety.o to
1842 EXTRA_GNATRTL_NONTASKING_OBJS on x86 32/64 targets that support
1843 it and where they were missing (x86-solaris, x86-freebsd,
1844 x86_64-freebsd, and x86-darwin).
1846 2012-04-02 Gary Dismukes <dismukes@adacore.com>
1848 * bindgen.adb (Gen_Ada_Init): When compiling for the AAMP small
1849 library, where we no longer suppress the Standard_Library,
1850 generate an empty body rather than the usual generation of
1851 assignments to imported globals, since those aren't present in
1854 2012-04-02 Ed Schonberg <schonberg@adacore.com>
1856 * sinfo.ads: Minor documentation fix.
1858 2012-04-02 Hristian Kirtchev <kirtchev@adacore.com>
1860 * sem_res.adb (Resolve_Conditional_Expression): Add local variables
1861 Else_Typ and Then_Typ. Add missing type conversions to the "then" and
1862 "else" expressions when their respective types are scalar.
1864 2012-04-02 Vincent Pucci <pucci@adacore.com>
1866 * exp_ch9.adb: Reordering of the local subprograms. New Table
1867 for the lock free implementation that maps each protected
1868 subprograms with the protected component it references.
1869 (Allow_Lock_Free_Implementation): New routine. Check if
1870 the protected body enables the lock free implementation.
1871 (Build_Lock_Free_Protected_Subprogram_Body): New routine.
1872 (Build_Lock_Free_Unprotected_Subprogram_Body): New routine.
1873 (Comp_Of): New routine.
1874 * Makefile.rtl: Add s-atopri.o
1875 * debug.adb: New compiler debug flag -gnatd9 for lock free
1877 * rtsfind.ads: RE_Atomic_Compare_Exchange_8,
1878 RE_Atomic_Compare_Exchange_16, RE_Atomic_Compare_Exchange_32,
1879 RE_Atomic_Compare_Exchange_64, RE_Atomic_Load_8,
1880 RE_Atomic_Load_16, RE_Atomic_Load_32, RE_Atomic_Load_64, RE_Uint8,
1881 RE_Uint16, RE_Uint32, RE_Uint64 added.
1882 * s-atropi.ads: New file. Defines atomic primitives used
1883 by the lock free implementation.
1885 2012-04-02 Emmanuel Briot <briot@adacore.com>
1887 * g-expect.adb (Expect_Internal): Fix leak of the input file descriptor.
1889 2012-04-02 Hristian Kirtchev <kirtchev@adacore.com>
1891 * exp_ch4.adb (Expand_N_Quantified_Expression): Reimplemented.
1892 The expansion no longer uses the copy of the original QE created
1894 * sem.adb (Analyze): Add processing for loop parameter specifications.
1895 * sem_ch4.adb (Analyze_Quantified_Expression): Reimplemented. The
1896 routine no longer creates a copy of the original QE. All
1897 constituents of a QE are now preanalyzed and resolved.
1898 * sem_ch5.adb (Analyze_Iteration_Scheme): Remove the guard which
1899 bypasses all processing when the iteration scheme is related to a
1900 QE. Relovate the code which analyzes loop parameter specifications
1901 to a separate routine. (Analyze_Iterator_Specification):
1902 Preanalyze the iterator name. This action was originally
1903 done in Analyze_Iteration_Scheme. Update the check which
1904 detects an iterator specification in the context of a QE.
1905 (Analyze_Loop_Parameter_Specification): New routine. This
1906 procedure allows for a stand-alone analysis of a loop parameter
1907 specification without the need of a parent iteration scheme. Add
1908 code to update the type of the loop variable when the range
1909 generates an itype and the context is a QE.
1910 (Pre_Analyze_Range): Renamed to Preanalyze_Range. Update all references
1912 * sem_ch5.ads: Code reformatting.
1913 (Analyze_Loop_Parameter_Specification): New routine.
1914 * sem_ch6.adb (Fully_Conformant_Expressions): Detect a case
1915 when establishing conformance between two QEs utilizing different
1917 * sem_res.adb (Proper_Current_Scope): New routine.
1918 (Resolve): Do not resolve a QE as there is nothing to be done now.
1919 Ignore any loop scopes generated for QEs when detecting an expression
1920 function as the scopes are cosmetic and do not appear in the tree.
1921 (Resolve_Quantified_Expression): Removed. All resolution of
1922 QE constituents is now performed during analysis. This ensures
1923 that loop variables appearing in array aggregates are properly
1926 2012-04-02 Ed Schonberg <schonberg@adacore.com>
1928 * sem_util.adb (Build_Default_Subtype): If the base type is
1929 private and its full view is available, use the full view in
1930 the subtype declaration.
1932 2012-04-02 Jose Ruiz <ruiz@adacore.com>
1934 * gnat_ugn.texi: Add some minimal documentation about how to
1935 use GNATtest for cross platforms.
1937 2012-04-02 Vincent Celier <celier@adacore.com>
1939 * opt.ads (Object_Path_File_Name): New variable.
1940 * prj-attr.adb: New Compiler attribute Object_Path_Switches.
1941 * prj-nmsc.adb (Process_Compiler): Recognize new attribute
1942 Object_Path_Switches.
1943 * snames.ads-tmpl: New standard name Object_Path_Switches.
1944 * switch-c.adb (Scan_Front_End_Switches): Recognize new switch
1945 -gnateO= and put its value in Opt.Object_Path_File_Name.
1947 2012-04-02 Hristian Kirtchev <kirtchev@adacore.com>
1949 * exp_ch7.adb (Process_Declarations): Detect a case where
1950 a source object was initialized by another source object,
1951 but the expression was rewritten as a class-wide conversion
1952 of Ada.Tags.Displace.
1953 * exp_util.adb (Initialized_By_Ctrl_Function): Removed.
1954 (Is_Controlled_Function_Call): New routine.
1955 (Is_Displacement_Of_Ctrl_Function_Result): Removed.
1956 (Is_Displacement_Of_Object_Or_Function_Result): New routine.
1957 (Is_Source_Object): New routine.
1958 (Requires_Cleanup_Actions): Detect a case where a source object was
1959 initialized by another source object, but the expression was rewritten
1960 as a class-wide conversion of Ada.Tags.Displace.
1961 * exp_util.ads (Is_Displacement_Of_Ctrl_Function_Result): Removed.
1962 (Is_Displacement_Of_Object_Or_Function_Result): New routine.
1964 2012-04-02 Ed Schonberg <schonberg@adacore.com>
1966 * sem_res.adb (Resolve_Call): A call to an expression function
1967 does not freeze if it appears in a different scope from the
1968 expression function itself. Such calls appear in the generated
1969 bodies of other expression functions, or in pre/postconditions
1970 of subsequent subprograms.
1972 2012-04-02 Yannick Moy <moy@adacore.com>
1974 * lib-xref-alfa.adb: Code clean up.
1976 2012-04-02 Ed Schonberg <schonberg@adacore.com>
1978 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Do not suppress
1979 style checks, because the subprogram instance itself may contain
1980 violations of syle rules.
1981 * style.adb (Missing_Overriding): Check for missing overriding
1982 indicator on a subprogram instance.
1984 2012-04-02 Hristian Kirtchev <kirtchev@adacore.com>
1986 * sem_ch6.adb (Last_Implicit_Declaration): New routine.
1987 (Process_PPCs): Insert the body of _postconditions after the
1988 last internally generated declaration. This ensures that actual
1989 subtypes created for formal parameters are visible and properly
1990 frozen as _postconditions may reference them.
1992 2012-04-02 Robert Dewar <dewar@adacore.com>
1994 * einfo.adb (First_Component_Or_Discriminant) Now applies to
1995 all types with discriminants, not just records.
1996 * exp_attr.adb (Expand_N_Attribute): Add Scalar_Values handling
1997 for arrays, scalars and non-variant records.
1998 * sem_attr.adb (Analyze_Attribute): Handle Valid_Scalars
1999 * sem_attr.ads (Valid_Scalars): Update description
2000 * sem_util.ads, sem_util.adb (No_Scalar_Parts): New function.
2002 2012-03-31 Eric Botcazou <ebotcazou@adacore.com>
2005 2012-03-25 Eric Botcazou <ebotcazou@adacore.com>
2007 * gcc-interface/decl.c (SS_MARK_NAME): New define.
2008 (gnat_to_gnu_entity) <E_Function>: Prepend leaf attribute on entities
2009 whose name is SS_MARK_NAME.
2011 2012-03-30 Robert Dewar <dewar@adacore.com>
2013 * exp_ch5.adb, sem_util.adb, exp_ch4.adb: Minor comment updates.
2015 2012-03-30 Yannick Moy <moy@adacore.com>
2017 * lib-xref-alfa.adb (Add_Alfa_File): Treat possibly 2 units at the same
2018 time, putting all scopes in the same Alfa file.
2019 (Add_Alfa_Xrefs): Correct errors in comparison function. Correct value
2021 (Collect_Alfa): Possibly pass 2 units to Add_Alfa_File.
2023 2012-03-30 Hristian Kirtchev <kirtchev@adacore.com>
2025 * exp_util.adb (Is_Secondary_Stack_BIP_Func_Call): Handle a case where
2026 a build-in-place call appears as Prefix'Reference'Reference.
2028 2012-03-30 Yannick Moy <moy@adacore.com>
2030 * lib-xref-alfa.adb: Minor refactoring to remove internal package.
2032 2012-03-30 Hristian Kirtchev <kirtchev@adacore.com>
2034 * sem_ch5.adb (Analyze_Iteration_Scheme): Preanalyze the subtype
2035 definition of a loop when the context is a quantified expression.
2037 2012-03-30 Vincent Celier <celier@adacore.com>
2039 * prj.ads: Minor comment update.
2041 2012-03-30 Yannick Moy <moy@adacore.com>
2043 * lib-xref-alfa.adb, alloc.ads, lib-xref.ads: Minor addition of
2044 comments and refactoring.
2046 2012-03-30 Robert Dewar <dewar@adacore.com>
2048 * lib-xref.adb, lib-xref-alfa.adb: Minor reformatting & code
2051 2012-03-30 Yannick Moy <moy@adacore.com>
2053 * lib-xref-alfa.adb (Generate_Dereference): Use Get_Code_Unit
2054 instead of Get_Source_Unit to get file for reference.
2055 (Traverse_Compilation_Unit): Do not add scopes for generic units.
2056 * lib-xref.adb (Generate_Reference): Use Get_Code_Unit instead
2057 of Get_Source_Unit to get file for reference.
2058 * sem_ch12.adb (Analyze_Package_Instantiation): Enable
2059 instantiation in Alfa mode.
2061 2012-03-30 Hristian Kirtchev <kirtchev@adacore.com>
2063 * exp_ch7.adb (Process_Declarations): Replace
2064 the call to Is_Null_Access_BIP_Func_Call with
2065 Is_Secondary_Stack_BIP_Func_Call. Update the related comment.
2066 * exp_util.adb (Is_Null_Access_BIP_Func_Call): Removed.
2067 (Is_Secondary_Stack_BIP_Func_Call): New routine.
2068 (Requires_Cleanup_Actions): Replace
2069 the call to Is_Null_Access_BIP_Func_Call with
2070 Is_Secondary_Stack_BIP_Func_Call. Update the related comment.
2071 * exp_util.ads (Is_Null_Access_BIP_Func_Call): Removed.
2072 (Is_Secondary_Stack_BIP_Func_Call): New routine.
2074 2012-03-30 Yannick Moy <moy@adacore.com>
2076 * lib-xref-alfa.adb, lib-xref.adb: Code clean ups.
2078 2012-03-30 Gary Dismukes <dismukes@adacore.com>
2080 * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): For the case of a
2081 loop entity which is rewritten as a renaming
2082 of the indexed array, explicitly mark the entity as needing
2083 debug info so that Materialize entity will be set later by
2084 Debug_Renaming_Declaration when the renaming is expanded.
2086 2012-03-30 Robert Dewar <dewar@adacore.com>
2088 * sem_attr.ads: Update comment.
2090 2012-03-30 Vincent Celier <celier@adacore.com>
2092 * prj.ads: New Dependency_Kind: ALI_Closure.
2094 2012-03-30 Thomas Quinot <quinot@adacore.com>
2096 * exp_pakd.adb: Minor reformatting.
2098 2012-03-30 Yannick Moy <moy@adacore.com>
2100 * lib-xref-alfa.adb (Add_Alfa_File): Take into account possible absence
2101 of compilation unit for unit in Sdep_Table.
2103 2012-03-30 Thomas Quinot <quinot@adacore.com>
2105 * freeze.adb (Freeze_Record_Type): For a type with reversed bit
2106 order and reversed storage order, disable front-end relayout.
2108 2012-03-25 Eric Botcazou <ebotcazou@adacore.com>
2110 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Copy
2111 the TYPE_PACKED flag from the base type.
2113 2012-03-25 Eric Botcazou <ebotcazou@adacore.com>
2115 * gcc-interface/decl.c (SS_MARK_NAME): New define.
2116 (gnat_to_gnu_entity) <E_Function>: Prepend leaf attribute on entities
2117 whose name is SS_MARK_NAME.
2119 2012-03-25 Eric Botcazou <ebotcazou@adacore.com>
2121 * gcc-interface/utils.c (add_parallel_type): Take a TYPE instead of a
2122 DECL and adjust. Move around.
2123 (has_parallel_type): New predicate.
2124 (rest_of_record_type_compilation): Return early if the type already
2125 has a parallel type.
2126 * gcc-interface/gigi.h (add_parallel_type): Adjust.
2127 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust for above changes.
2129 2012-03-25 Eric Botcazou <ebotcazou@adacore.com>
2131 * gcc-interface/utils.c (finish_record_type): Return early for padded
2134 2012-03-20 Arnaud Charlet <charlet@adacore.com>
2136 * hlo.ads, hlo.adb: Removed, no longer used.
2137 * gcc-interface/Make-lang.in: Remove hlo.o. Update dependencies.
2138 * gcc-interface/Makefile.in: Remove EXTRA_LIBGNAT_SRCS (temporarly)
2139 and compute it from EXTRA_LIBGNAT_OBJS.
2140 Clean up comments, reorder LIBGNAT_SRCS and LIBGNAT_OBJS.
2142 2012-03-20 Yannick Moy <moy@adacore.com>
2144 * gnat_rm.texi, sem_attr.ads: Update documentation.
2146 2012-03-19 Yannick Moy <moy@adacore.com>
2148 * sem_ch6.adb: Minor code clean up.
2150 2012-03-19 Vincent Celier <celier@adacore.com>
2152 * make.adb (Scan_Make_Arg): Make sure all significant -m switches
2153 on the command line are counted.
2155 2012-03-19 Robert Dewar <dewar@adacore.com>
2157 * sem_elab.adb (Generate_Elab_Warnings): Fix spec, fix attribute
2160 2012-03-19 Robert Dewar <dewar@adacore.com>
2162 * par-ch4.adb (Check_Bad_Exp): New procedure
2164 2012-03-19 Robert Dewar <dewar@adacore.com>
2166 * exp_attr.adb, sem_attr.adb, sem_attr.ads, snames.ads-tmpl: Add
2167 initial framework for Valid_Scalars attribute.
2169 2012-03-19 Robert Dewar <dewar@adacore.com>
2171 * scng.adb (Scan): Recognize incorrect preprocessor directive
2173 2012-03-19 Robert Dewar <dewar@adacore.com>
2175 * atree.adb (Allocate_Initialize_Node): Use Num_Extension_Nodes
2176 * atree.ads (Num_Extension_Nodes): New variable
2177 * debug.adb: New debug flag -gnatd.N
2178 * gnat1drv.adb (Adjust_Global_Switches): Adjust
2179 Num_Extension_Nodes if -gnatd.N set
2181 2012-03-19 Eric Botcazou <ebotcazou@adacore.com>
2183 * einfo.ads: Minor update to First_Rep_Item and Has_Gigi_Rep_Item
2186 2012-03-19 Robert Dewar <dewar@adacore.com>
2188 * opt.ads: Remove HLO_Active flag.
2189 * sem.adb: Remove call of high level optimizer.
2190 * sem.ads (New_Nodes_OK): Removed.
2191 * sem_ch10.adb: Remove references to New_Nodes_OK.
2192 * switch-c.adb: Remove handling of -gnatH switch.
2194 2012-03-19 Yannick Moy <moy@adacore.com>
2196 * sem_ch6.adb (Check_Subprogram_Contract): Do not emit warnings
2197 on trivially True or False postconditions and Ensures components
2200 2012-03-19 Robert Dewar <dewar@adacore.com>
2202 * gnat_ugn.texi: Fix index entry for -gnatei (now we have
2205 2012-03-19 Hristian Kirtchev <kirtchev@adacore.com>
2207 * sem_ch3.adb (Get_Discriminant_Value): Instead of looking
2208 at the immediate correcponsing discriminant, traverse a
2209 potential chain of discriminants produced by type derivations.
2210 (Root_Corresponding_Discriminant): Traverse a chain of inherited
2211 discriminants and return the topmost discriminant.
2213 2012-03-19 Bob Duff <duff@adacore.com>
2215 * debug.adb: Minor comment change.
2216 * gnat_ugn.texi: Update documentation for elaboration regarding
2219 2012-03-19 Gary Dismukes <dismukes@adacore.com>
2221 * exp_ch3.adb (Expand_N_Object_Declaration): In
2222 the case of an object of a class-wide interface type, where the
2223 declaration is rewritten as a renaming, call Set_Debug_Info_Needed
2224 on the renaming entity so that Materialize_Entity will be
2225 set. Also, change existing call (for other than interface cases)
2226 to call Set_Debug_Info_Needed rather than Set_Needs_Debug_Info
2227 (as specified for that flag).
2229 2012-03-19 Hristian Kirtchev <kirtchev@adacore.com>
2231 * sem_ch4.adb (Analyze_Allocator): Detect an allocator generated
2232 by the build-in-place machinery where the designated type is
2233 indefinite, but the underlying type is not. Do not emit errors
2234 related to missing initialization in this case.
2236 2012-03-19 Robert Dewar <dewar@adacore.com>
2238 * gnat_ugn.texi: Add documentation for -gnateinnn switch.
2239 * sem_elab.adb, put_alfa.adb, lib-xref-alfa.adb: Minor reformatting.
2240 * sem_prag.adb: Minor comment update.
2242 2012-03-15 Robert Dewar <dewar@adacore.com>
2244 * errout.ads: Add entry for translating -gnateinn to
2245 /MAX_INSTANTIATIONS for VMS.
2246 * hostparm.ads (Max_Instantiations): Moved to Opt.
2247 * opt.ads (Maximum_Instantiations): Moved from Hostparm, and renamed.
2248 * sem_ch12.adb (Maximum_Instantiations): New name of
2249 Max_Instantiations (Analyze_Package_Instantiation): Change error
2250 msg for too many instantiations (mention -gnateinn switch).
2251 * switch-c.adb (Scan_Front_End_Switches): Implement -gnateinn switch.
2252 * switch.ads: Minor comment update.
2253 * usage.adb (Usage): Output line for -maxeinn switch.
2254 * vms_data.ads: Add entry for MAX_INSTANTIATIONS (-gnateinn).
2256 2012-03-15 Yannick Moy <moy@adacore.com>
2258 * alfa.ads Update the decription of ALI sections.
2259 (Alfa_File_Record): Add a component Unit_File_Name to store the
2260 unit file name for subunits.
2261 * get_alfa.adb, put_alfa.adb Adapt to the possible presence of
2263 * lib-xref-alfa.adb (Add_Alfa_File): For subunits, retrieve the
2264 file name of the unit.
2266 2012-03-15 Yannick Moy <moy@adacore.com>
2268 * sem_ch6.adb (Check_Subprogram_Contract): Do
2269 not issue warning on missing 'Result in postcondition if all
2270 postconditions and contract-cases already get a warning for only
2271 referring to pre-state.
2273 2012-03-15 Bob Duff <duff@adacore.com>
2275 * debug.adb: Add new debug switch -gnatd.U, which disables the
2276 support added below, in case someone trips over a cycle, and needs
2278 * sem_attr.adb (Analyze_Access_Attribute):
2279 Treat Subp'Access as a call for elaboration purposes.
2280 * sem_elab.ads, sem_elab.adb (Check_Elab_Call): Add support
2283 2012-03-15 Vincent Pucci <pucci@adacore.com>
2285 * sem.ads, sem.adb (Preanalyze): New routine.
2286 * sem_ch4.adb (Analyze_Quantified_Expression): Call to the
2287 Preanalyze routine in Sem added. Renaming of Needs_Expansion
2288 into Need_Preanalysis.
2289 * sem_ch6.adb (Preanalyze): Removed.
2291 2012-03-15 Robert Dewar <dewar@adacore.com>
2293 * sem_ch4.adb (Analyze_Quantified_Expression): Add comment.
2294 * sem_prag.adb: Minor comment additions.
2295 * sem_attr.adb (Check_First_Last_Valid): Make sure prefix type
2298 2012-03-15 Vincent Pucci <pucci@adacore.com>
2300 * sem_ch4.adb (Analyze_Quantified_Expression):
2301 Preanalyze the condition when the quantified expression will be
2304 2012-03-15 Yannick Moy <moy@adacore.com>
2306 * sem_prag.adb, sem_util.adb, sem_util.ads, sem_attr.adb, sem_ch6.adb,
2307 sem_warn.adb: Minor refactoring, renaming Case_Pragma in CTC_Pragma,
2308 to refer to both Test_Case pragma and Contract_Case pragma (same
2309 acronym as in Spec_CTC_List).
2311 2012-03-15 Robert Dewar <dewar@adacore.com>
2313 * sem_prag.adb, sem_prag.ads, sem_util.ads, sem_attr.adb, sem_ch6.adb,
2314 sem_warn.adb: Minor reformatting.
2316 2012-03-15 Hristian Kirtchev <kirtchev@adacore.com>
2318 * exp_util.adb (Initialized_By_Ctrl_Function): Do not loop over
2319 selector names as the function call always appears at the top selected
2322 2012-03-15 Ed Schonberg <schonberg@adacore.com>
2324 * sem_ch12.adb (Validate_Access_Subprogram_Instance): keep
2325 Mode_Conformance check for older versions of the language.
2327 2012-03-15 Yannick Moy <moy@adacore.com>
2329 * gnat_ugn.texi Document the extension of option -gnatw.t.
2330 * sem_ch3.adb (Analyze_Declaration): Check for suspicious
2331 contracts only after contract cases have been semantically
2333 * sem_ch6.adb (Check_Subprogram_Contract): Consider also Ensures
2334 components of contract cases for detecting suspicious contracts.
2336 2012-03-15 Yannick Moy <moy@adacore.com>
2338 * aspects.adb, aspects.ads (Aspect_Id): New GNAT aspect
2339 Aspect_Contract_Case.
2340 * gnat_rm.texi Document the new pragma/aspect
2341 Contract_Case. Correct the documentation of the existing
2342 pragma/aspect Test_Case with the new semantics.
2343 * sem_attr.adb (Analyze_Attribute): Allow use of 'Result in the
2344 Ensures component of a Contract_Case pragma.
2345 * sem_ch13.adb (Analyze_Aspect_Specifications): Check new aspect
2346 and translate it into a pragma.
2347 (Check_Aspect_At_Freeze_Point): Take into account the new aspect.
2348 * sem_ch3.adb, sinfo.adb, sinfo.ads Renaming of TC (for test case)
2349 into CTC (for contract and test case).
2350 * sem_ch6.adb (Process_PPCs): Generate Check pragmas from
2351 Contract_Case pragmas, similarly to what is done already for
2353 * sem_prag.adb, sem_prag.ads (Check_Contract_Or_Test_Case):
2354 Renaming of Check_Test_Case.
2355 (Analyze_Pragma, Sig_Flags): Take into account the new pragma.
2356 * sem_util.adb, sem_util.ads Renaming to take into account the
2357 new pragma, so that functions which applied only to Test_Case
2358 now apply to both Test_Case and Contract_Case.
2359 * par-prag.adb, sem_warn.adb, snames.ads-tmpl Take into account
2362 2012-03-15 Robert Dewar <dewar@adacore.com>
2364 * sem_ch6.ads: Minor comment updates.
2365 * sem_ch12.adb: Minor comment clarification.
2367 2012-03-15 Robert Dewar <dewar@adacore.com>
2369 * sem_ch5.adb: Minor reformatting.
2371 2012-03-15 Ed Schonberg <schonberg@adacore.com>
2373 * exp_ch3.adb (Expand_N_Object_Declaration): When rewriting the
2374 declaration of a class-wide object, retain the Ekind to prevent
2375 subsequent misuse of constants.
2377 2012-03-15 Yannick Moy <moy@adacore.com>
2379 * gnat_rm.texi, gnat_ugn.texi: Minor correction of invariant
2382 2012-03-15 Hristian Kirtchev <kirtchev@adacore.com>
2384 * exp_util.adb (Initialized_By_Ctrl_Function): Add code to
2385 process the case when a function call appears in object.operation
2388 2012-03-15 Ed Schonberg <schonberg@adacore.com>
2390 * sem_ch6.ads, sem_ch6.adb (Check_Subtype_Conformant): add
2391 Get_Inst formal, so that conformance within an instantiation
2392 follows renamings of formals. This is similar to what is already
2393 done in Check_Mode_conformant.
2394 * sem_ch12.adb (Vailidate_Access_Subprogram_Instance): check that
2395 formal and actual are subtype conformant. Previously only mode
2396 conformance was required.
2398 2012-03-15 Robert Dewar <dewar@adacore.com>
2400 * par-ch6.adb, einfo.ads, sem_eval.adb, sem_eval.ads,
2401 sem_case.adb: Minor reformatting.
2403 2012-03-15 Robert Dewar <dewar@adacore.com>
2405 * exp_attr.adb (Expand_N_Attribute_Reference): Add handling
2406 of First_Valid/Last_Valid.
2407 * sem_attr.adb (Check_First_Last_Valid): New procedure
2408 (Analyze_Attribute): Add handling of First_Valid and Last_Valid
2409 (Eval_Attribute): ditto.
2410 * snames.ads-tmpl: Add entries for First_Valid and Last_Valid.
2412 2012-03-15 Ed Schonberg <schonberg@adacore.com>
2414 * exp_ch5.adb (Expand_Predicated_Loop): Suppress warnings on
2415 loop variable, for the unusual case where the range has a single
2416 element and the loop variable has no visible assignment to it.
2418 2012-03-15 Vincent Pucci <pucci@adacore.com>
2420 * exp_ch4.adb (Expand_N_Quantified_Expression): Expand the
2421 original quantified expression node.
2422 * sem_ch4.adb (Analyze_Quantified_Expression): Properly analyze
2423 the quantified expression and preserve the original non-analyzed
2424 quantified expression when an expansion is needed.
2425 * sem_ch5.adb (Analyze_Iteration_Scheme): Special treatment
2426 for quantified expressions.
2427 (Analyze_Iterator_Specification): Special treatment for quantified
2430 2012-03-15 Ed Falis <falis@adacore.com>
2432 * s-vxwork-ppc.ads: Update FP_CONTEXT so name of former pad
2433 field matches VxWorks headers.
2435 2012-03-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2437 * gcc-interface/Makefile.in (mips-sgi-irix6*): Remove.
2439 * a-intnam-irix.ads, mlib-tgt-specific-irix.adb,
2440 s-intman-irix.adb, s-mastop-irix.adb, s-osinte-irix.adb,
2441 s-osinte-irix.ads, s-proinf-irix-athread.adb,
2442 s-proinf-irix-athread.ads, s-taprop-irix.adb, s-tasinf-irix.ads,
2443 system-irix-n32.ads, system-irix-n64.ads, system-irix-o32.ads:
2446 * adaint.c [__mips && __sgi]: Remove.
2447 (__gnat_number_of_cpus) [__mips && __sgi]: Remove.
2448 [IS_CROSS && !(__mips && __sgi)]: Remove.
2449 * adaint.h [sgi && _LFAPI]: Remove.
2450 * cstreams.c (__gnat_full_name) [sgi]: Remove.
2451 * env.c (__gnat_unsetenv) [__mips && __sgi]: Remove.
2452 (__gnat_clearenv) [__mips && __sgi]: Remove.
2453 * errno.c (_SGI_MP_SOURCE): Remove.
2454 * gsocket.h [sgi]: Remove.
2455 * init.c: Remove IRIX reference.
2457 * link.c [sgi]: Remove.
2458 * s-oscons-tmplt.c [__mips && __sgi] (IOV_MAX): Don't define.
2459 (main) [__mips && __sgi] (MAX_tv_sec): Don't define.
2460 (CLOCK_SGI_FAST, CLOCK_SGI_CYCLE): Remove.
2461 * sysdep.c [sgi]: Remove.
2462 (getc_immediate_common) [sgi]: Remove.
2463 (__gnat_localtime_tzoff) [sgi]: Remove.
2464 * terminals.c [__mips && __sgi] (IRIX): Don't define.
2465 [IRIX] (USE_GETPTY): Don't define.
2466 (allocate_pty_desc) [USE_GETPTY]: Remove.
2468 * g-traceb.ads: Remove IRIX reference.
2469 * g-trasym.ads: Likewise.
2470 * memtrack.adb: Likewise.
2471 * s-interr-sigaction.adb: Likewise.
2473 * gnat_rm.texi (Implementation Advice): Remove SGI info.
2474 (Implementation Defined Characteristics): Likewise.
2475 * gnat_ugn.texi (Summary of Run-Time Configurations, mips-irix):
2477 (Irix-Specific Considerations): Remove.
2479 2012-03-13 Tristan Gingold <gingold@adacore.com>
2481 * gcc-interface/gigi.h (flag_vms_malloc64): Refine condition.
2483 2012-03-13 Tristan Gingold <gingold@adacore.com>
2485 * sysdep.c: Adjust condition after removal of __osf__.
2487 2012-03-12 Eric Botcazou <ebotcazou@adacore.com>
2489 * gcc-interface/gigi.h (shift_unc_components_for_thin_pointers): Kill.
2490 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Remove call
2492 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Pool_Address>: Adjust
2493 handling of thin pointers.
2494 <Attr_Descriptor_Size>: Likewise.
2495 (gnat_to_gnu) <N_Free_Statement>: Likewise.
2496 * gcc-interface/utils.c (shift_unc_components_for_thin_pointers): Kill.
2497 (convert_to_fat_pointer): Adjust handling of thin pointers.
2498 (convert) <POINTER_TYPE>: Likewise.
2499 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: Likewise.
2501 2012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2503 * gcc-interface/Makefile.in (alpha*-dec-osf*): Remove.
2504 * a-intnam-tru64.ads, mlib-tgt-specific-tru64.adb,
2505 s-mastop-tru64.adb, s-osinte-tru64.adb, s-osinte-tru64.ads,
2506 s-taprop-tru64.adb, s-tasinf-tru64.ads, s-taspri-tru64.ads,
2507 system-tru64.ads: Remove.
2509 * adaint.c (__gnat_number_of_cpus) [__alpha__ && __osf__]:
2511 [IS_CROSS] [!(__alpha__ && __osf__)]: Remove.
2512 * env.c [__alpha__ && __osf__]: Remove.
2513 * gsocket.h (_OSF_SOURCE): Remove.
2514 (HAVE_THREAD_SAFE_GETxxxBYyyy) [__osf__]: Remove.
2515 * init.c [__alpha__ && __osf__]: Remove.
2516 * link.c [__osf__]: Remove.
2517 * s-oscons-tmplt.c [__alpha__ && __osf__]: Remove.
2518 [__osf__ && !_SS_MAXSIZE]: Remove.
2519 * sysdep.c [__osf__]: Remove.
2520 * terminals.c [__alpha__ && __osf__]: Remove.
2523 * g-traceb.ads: Remove Tru64 reference.
2524 * g-trasym.ads: Likewise.
2525 * gnat_ugn.texi (Linking a Mixed C++ & Ada Program): Likewise.
2526 (Summary of Run-Time Configurations): Likewise.
2527 * memtrack.adb: Likewise.
2529 2012-03-12 Tristan Gingold <gingold@adacore.com>
2531 * gcc-interface/decl.c (gnat_to_gnu_param): Use flag_vms_malloc64
2532 instead of TARGET_MALLOC64.
2533 * gcc-interface/gigi.h (flag_vms_malloc64): Define instead
2536 2012-03-09 Robert Dewar <dewar@adacore.com>
2538 * a-direct.adb, comperr.adb, freeze.adb: Minor reformatting.
2540 2012-03-09 Arnaud Charlet <charlet@adacore.com>
2542 * s-taskin.adb (Initialize_ATCB): Set Task_Image_Len to
2543 0 so that we never access this field uninitialized (e.g. in
2544 Task_Primitives.Operations.Enter_Task for the environment task).
2546 2012-03-09 Vincent Pucci <pucci@adacore.com>
2548 * exp_ch5.adb (Expand_Iterator_Loop):
2549 Call to Expand_Iterator_Loop_Over_Array added.
2550 (Expand_Iterator_Loop_Over_Array): New routine. Expansion of
2551 "of" iterator loop over arrays. Multidimensional array case added.
2553 2012-03-09 Eric Botcazou <ebotcazou@adacore.com>
2555 * uintp.ads: Fix minor pasto in comment.
2557 2012-03-09 Vasiliy Fofanov <fofanov@adacore.com>
2559 * a-direct.adb: Do not strip the trailing directory separator
2560 from path, as this is already done inside Normalize_Pathname;
2561 doing it again produces the wrong result on Windows for the
2562 drive's root dir (i.e. "X:\" becomes "X:").
2564 2012-03-09 Thomas Quinot <quinot@adacore.com>
2566 * exp_attr.adb, freeze.adb, sem_attr.adb, aspects.adb, aspects.ads,
2567 sem_ch13.adb, snames.ads-tmpl (Exp_Attr.Expand_N_Attribute_Reference):
2568 Add Attribute_Scalar_Storage_Order.
2569 (Sem_Attr.Analyze_Attribute, Eval_Attribute): Ditto.
2570 (Aspects): Add Aspect_Scalar_Storage_Order (Snames): Add
2571 Name_Scalar_Storage_Order and Attribute_Scalar_Storage_Order.
2572 (Sem_Ch13.Analyze_Attribute_Definition_Clause): Add processing
2573 for Scalar_Storage_Order.
2574 (Freeze): If Scalar_Storage_Order is specified, check that it
2575 is compatible with Bit_Order.
2577 2012-03-09 Robert Dewar <dewar@adacore.com>
2579 * s-osinte-linux.ads, sem_util.adb, s-taprop-linux.adb, exp_ch4.adb,
2580 a-strsup.ads, sem_ch6.adb, a-stwisu.ads, exp_ch3.adb,
2581 a-stzsup.ads: Minor reformatting.
2583 2012-03-09 Thomas Quinot <quinot@adacore.com>
2585 * s-ransee-vms.adb: Minor reformatting.
2587 2012-03-09 Arnaud Charlet <charlet@adacore.com>
2589 * comperr.adb (Delete_SCIL_Files): Fix handling of
2590 N_Package_Renaming_Declaration and N_Generic_Package_Declaration.
2592 2012-03-09 Javier Miranda <miranda@adacore.com>
2594 * sem_ch6.adb (Check_Body_To_Inline): In AAMP and VM targets
2595 use frontend inlining at all optimization levels.
2596 * sem_util.adb (Must_Inline): In AAMP and VM targets, given that
2597 there is no inlining support in the backend, use also frontend
2598 inlining when compiling with optimizations enabled.
2599 * exp_ch6.adb (Expand_Call): Minor code reorganization.
2601 2012-03-09 Eric Botcazou <ebotcazou@adacore.com>
2603 * gcc-interface/ada-tree.h (TYPE_VAX_FLOATING_POINT_P): Move around.
2604 (TYPE_UNCONSTRAINED_ARRAY): Adjust comment.
2605 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Pool_Address>: Tidy
2606 up. Add comment and use canonical predicate for thin pointers.
2607 (gnat_to_gnu) <N_Free_Statement>: Tidy up and reorder. Add comment
2608 and use canonical predicate for thin pointers.
2609 * gcc-interface/utils.c (convert_to_fat_pointer): Remove superfluous
2610 'else' and use standard name.
2611 (convert_to_thin_pointer): Delete.
2612 (convert) <POINTER_TYPE>: Do the difference in sizetype directly and
2613 change obsolete idioms. Do not call above function.
2614 (unchecked_convert): Fix formatting.
2615 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: In the thin
2616 pointer case, use byte_position to get the field position.
2618 2012-03-07 Eric Botcazou <ebotcazou@adacore.com>
2620 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set flags on the
2621 DECL node built for a type which has a non-trivial equivalent type.
2623 2012-03-07 Eric Botcazou <ebotcazou@adacore.com>
2625 * gcc-interface/gigi.h (rest_of_type_decl_compilation): Delete.
2626 * gcc-interface/decl.c (defer_finalize_level): Likewise.
2627 (defer_finalize_list): Likewise.
2628 (gnat_to_gnu_entity): Delete references to above variables and do not
2629 call rest_of_type_decl_compilation.
2630 (rest_of_type_decl_compilation): Delete.
2631 (rest_of_type_decl_compilation_no_defer): Likewise.
2632 * gcc-interface/utils.c (rest_of_record_type_compilation): Do not call
2633 rest_of_type_decl_compilation.
2634 (create_type_decl): Likewise.
2635 (update_pointer_to): Likewise.
2637 2012-03-07 Eric Botcazou <ebotcazou@adacore.com>
2639 * gcc-interface/trans.c (Identifier_to_gnu): Don't unshare initializer.
2640 (add_decl_expr): Mark external DECLs as used.
2641 * gcc-interface/utils.c (convert) <CONSTRUCTOR>: Copy the vector.
2643 2012-03-07 Tristan Gingold <gingold@adacore.com>
2645 * s-ransee-vms.adb: New file.
2646 * gcc-interface/Makefile.in: Use s-ransee-vms.adb on VMS.
2647 * gcc-interface/Make-lang.in: Update dependencies.
2649 2012-03-07 Bob Duff <duff@adacore.com>
2651 * rtsfind.ads: Add support for finding Super_String types.
2652 * sem_util.ads, sem_util.adb (Is_Bounded_String): New function
2653 to determine whether a given type is a bounded string type.
2654 (Is_Fully_Initialized_Type): Return True for bounded
2655 string types, to suppress bogus warnings.
2656 * exp_ch4.adb (Expand_Composite_Equality): Special case for bounded
2657 strings: equality composes. This allows us to remove default values in
2659 * a-strsup.ads, a-stwisu.ads, a-stzsup.ads: Update comments.
2660 * exp_ch3.adb (Expand_Freeze_Record_Type): Comment.
2662 2012-03-07 Robert Dewar <dewar@adacore.com>
2664 * sem_util.adb, exp_ch4.adb, exp_ch6.adb, sem_ch6.adb: Minor
2667 2012-03-07 Sergey Rybin <rybin@adacore.com frybin>
2669 * gnat_ugn.texi: gnatpp: fix paragraph about sources with
2670 preprocessor directives.
2672 2012-03-07 Arnaud Charlet <charlet@adacore.com>
2674 * s-osinte-linux.ads, s-taprop-linux.adb (prctl): New function.
2675 (Enter_Task): Call prctl when relevant.
2677 2012-03-07 Tristan Gingold <gingold@adacore.com>
2679 * s-osinte-vms.ads: pthread_mutex_setname_np: new function.
2681 2012-03-07 Ed Schonberg <schonberg@adacore.com>
2683 * sem_ch6.adb (Process_Formals): a generic subprogram with
2684 a formal incomplete type does not require a freeze node.
2686 2012-03-07 Bob Duff <duff@adacore.com>
2688 * sem_util.ads: Minor reformatting.
2690 2012-03-07 Geert Bosch <bosch@adacore.com>
2692 * targparm.ads: New target parameter Atomic_Sync_Default,
2694 * targparm.adb (Get_Target_Parameters): Add processing for
2695 Atomic_Sync_Default.
2696 * gnat1drv.adb (Adjust_Global_Switches): Adjust Supress_Options
2699 2012-03-07 Javier Miranda <miranda@adacore.com>
2701 * sem_ch3.adb (Analyze_Object_Declaration): If the object
2702 declaration has an init expression then stop the analysis of the
2703 object declaration if the expression which initializes the object
2704 is a call to an inlined function which returns an unconstrained
2705 and has been expanded into a procedure call.
2706 * sem_ch5.adb (Has_Call_Using_Secondary_Stack): Add missing
2707 support to handle selected components.
2708 * sem_ch6.ads (Cannot_Inline): Adding parameter Is_Serious plus
2710 * sem_ch6.adb (Check_And_Build_Body_To_Inline): New
2711 subprogram which implements the checks required by the
2712 new rules for frontend inlining and builds the body to inline.
2713 (Analyze_Subprogram_Body_Helper): Move code that
2714 checks inlining of subprogram that has nested subprogram
2715 to Check_And_Build_Body_To_Inline. Replace call to
2716 Build_Body_To_Inline by call to the new subprogram
2717 Check_And_Build_Body_To_Inline.
2718 (Cannot_Inline): New implementation.
2719 * sem_ch12.adb (Analyze_Package_Instantiation.Must_Inline_Subp):
2721 * sem_util.ad[sb] (Must_Inline): New subprogram.
2722 (Returns_Unconstrained_Type): New subprogram.
2723 * sem_res.adb (Resolve_Call): Do not create a transient scope
2725 * inline.ads (Analyzing_Inlined_Bodies): Remove unreferenced variable.
2726 * inline.adb (Analyze_Inlined_Bodies, Initialize): Remove setting
2727 to false the variable Analyzing_Inlined_Bodies. Fix comments.
2728 * exp_ch4.adb (Expand_N_Allocator): Fix handling of finalization master.
2729 * exp_ch6.ads (List_Inlining_Info): New subprogram.
2730 * exp_ch6.adb (Expand_Call.Do_Inline): New subprogram.
2731 (Expand_Call.Do_Inline_Always): New subprogram.
2732 (In_Unfrozen_Instance): Move the declaration of this subprogram.
2733 (Expand_Inlined_Call.Reset_Dispatching_Calls): New subprogram.
2734 (Expand_Inlined_Call): Adding new support for inlining functions
2735 that return unconstrained types.
2736 (List_Inlining_Info): New subprogram.
2737 * debug.adb Document flags -gnatd.j and -gnatd.k
2738 * gnat1drv.adb Add call to generate the new listing of inlined
2739 calls and calls passed to the backend.
2741 2012-03-07 Robert Dewar <dewar@adacore.com>
2743 * sem_ch5.adb, s-vaflop.adb, s-taprop-vms.adb, exp_ch6.adb,
2744 s-gearop.adb, sem_ch6.adb, g-trasym.adb: Minor reformatting.
2746 2012-03-07 Javier Miranda <miranda@adacore.com>
2748 * a-ngrear.ads: Add documentation.
2750 2012-03-07 Tristan Gingold <gingold@adacore.com>
2752 * s-taprop-vms.adb (Create_Task): set thread name.
2753 * s-osinte-vms.ads (pthread_attr_setname_np): Declare.
2755 2012-03-07 Arnaud Charlet <charlet@adacore.com>
2757 * g-trasym.adb: Minor reformatting.
2759 2012-03-07 Robert Dewar <dewar@adacore.com>
2761 * a-ngrear.ads: Minor addition of ??? comment.
2763 2012-03-07 Gary Dismukes <dismukes@adacore.com>
2765 * exp_ch4.adb (Apply_Accessibility_Check): Call
2766 Remove_Side_Effects in the build-in-place case, to ensure that
2767 we capture the call and don't end up with two calls.
2769 2012-03-07 Javier Miranda <miranda@adacore.com>
2771 * exp_ch6.adb (Expand_Inlined_Call): Skip inlining of functions
2772 that return unconstrained types using an extended return statement
2773 since the support for inlining these functions has not been yet
2774 added to the frontend.
2775 * s-vaflop.adb, s-vaflop-vms-alpha.adb: Code reorganization.
2776 * a-ngrear.ads: Replace all the Inline_Always pragmas by pragma
2778 * a-ngrear.adb (Eigenvalues, Transpose): Restructured to use
2779 extended return statement.
2780 * a-strsup.adb, a-stzsup.adb, a-stwisu.adb (Concat, Super_Slice,
2781 Super_To_String): Restructured to use extended return statement.
2782 * a-chahan.adb (To_Basic, To_Lower, To_Upper): Restructured to
2783 use extended return statement.
2784 * s-gearop.adb (Diagonal, Matrix_Elementwise_Operation,
2785 Vector_Elementwise_Operation, Matrix_Elementwise_Operation,
2786 Matrix_Matrix_Scalar_Elementwise_Operation,
2787 Vector_Vector_Elementwise_Operation,
2788 Vector_Vector_Scalar_Elementwise_Operation,
2789 Matrix_Scalar_Elementwise_Operation,
2790 Vector_Scalar_Elementwise_Operation,
2791 Scalar_Matrix_Elementwise_Operation,
2792 Scalar_Vector_Elementwise_Operation, Matrix_Matrix_Product,
2793 Matrix_Vector_Product, Outer_Product, Unit_Matrix, Unit_Vector,
2794 Vector_Matrix_Product): Restructured to use extended return
2797 2012-03-07 Vincent Pucci <pucci@adacore.com>
2799 * sem_ch5.adb (One_Bound): Minor reformatting.
2801 2012-03-07 Tristan Gingold <gingold@adacore.com>
2803 * s-osinte-vms-ia64.adb, s-osinte-vms-ia64.ads, s-osinte-vms.adb,
2804 s-osinte-vms.ads, gcc-interface/Makefile.in: Merge s-osinte-vms and
2807 2012-03-07 Ed Schonberg <schonberg@adacore.com>
2809 * checks.adb (Apply_Predicate_Check): Do not generate a predicate
2810 check is the context is an internally generated type-specific
2812 * sem_ch6.adb (Process_PPCs); the formals of internally generated
2813 type-specific functions do not get assertion checks.
2815 2012-03-07 Yannick Moy <moy@adacore.com>
2817 * gnat_rm.texi: Minor renaming of title.
2818 * gnat_ugn.texi: Minor correction.
2820 2012-03-07 Vincent Pucci <pucci@adacore.com>
2822 * exp_ch4.adb (Expand_N_Quantified_Expression): Minor
2824 * sem_ch4.adb (Analyze_Quantified_Expression): Creation and
2825 analysis of the iteration scheme added in all cases.
2826 * sem_ch5.adb (Analyze_Iteration_Scheme): Minor reformating.
2827 (Analyze_Iterator_Specification): Minor reformating.
2828 * sem_res.adb (Resolve_Quantified_Expression): Resolution of
2829 the condition added in all cases.
2831 2012-03-07 Thomas Quinot <quinot@adacore.com>
2833 * einfo.adb, einfo.ads: Add flag Reverse_Storage_Order.
2835 2012-03-07 Yannick Moy <moy@adacore.com>
2837 * gnat_rm.texi, gnat_ugn.texi: Rewording of GNAT UG and GNAT RM to
2838 account for Ada 2012 assertions, and their pragma counterparts in GNAT.
2840 2012-03-07 Thomas Quinot <quinot@adacore.com>
2842 * exp_attr.adb, sem_attr.adb: Minor reformatting.
2844 2012-03-07 Bob Duff <duff@adacore.com>
2846 * hostparm.ads (Max_Instantiations): Increase parameter.
2848 2012-03-07 Bob Duff <duff@adacore.com>
2850 * par-prag.adb: Minor code rearrangement.
2852 2012-03-07 Bob Duff <duff@adacore.com>
2854 * a-strsup.ads, a-stwisu.ads, a-stzsup.ads (Super_String):
2855 Remove default initial value for Data. It is no longer needed
2856 because "=" now composes properly for untagged records. This
2857 default has caused efficiency problems.
2859 2012-03-07 Ed Schonberg <schonberg@adacore.com>
2861 * sem_res.adb (Resolve_Actuals): If the actual is a selected
2862 component of an anonymous access type, whose prefix is a variable,
2863 treat the variable as if it may be modified by the call, to
2864 suppress spurious warnings that a variable might be declared as
2867 2012-03-07 Thomas Quinot <quinot@adacore.com>
2869 * einfo.adb, einfo.ads: Remove unused entity flags.
2871 2012-03-07 Eric Botcazou <ebotcazou@adacore.com>
2873 * gnat_ugn.texi (Inline Assembler): Fix swapping of Input and
2874 Output operands throughout.
2876 2012-03-07 Hristian Kirtchev <kirtchev@adacore.com>
2878 * sem_ch12.adb (Earlier): When two nodes come from the same
2879 generic instantiation, compare their locations. Otherwise always
2880 use the top level locations of the nodes.
2882 2012-03-07 Thomas Quinot <quinot@adacore.com>
2884 * einfo.ads, sem_prag.adb: Minor reformatting.
2886 2012-03-05 Jason Merrill <jason@redhat.com>
2888 * gcc-interface/Make-lang.in (doc/gnat_ugn.texi): Build xgnatugn
2891 2012-03-04 Eric Botcazou <ebotcazou@adacore.com>
2893 * gnatvsn.ads (Library_Version): Bump to 4.8.
2895 2012-03-03 H.J. Lu <hongjiu.lu@intel.com>
2897 * init.c (__gnat_adjust_context_for_raise): Also check
2898 "orq $0x0,(%esp)" for x32.
2900 * link.c (__gnat_default_libgcc_subdir): Set to libx32 for x32.
2902 * gcc-interface/Makefile.in (arch): Set to x32 if MULTISUBDIR
2903 is /x32 and add support for x32.
2905 2012-02-29 Eric Botcazou <ebotcazou@adacore.com>
2907 * gcc-interface/decl.c (components_to_record): Add ARTIFICIAL parameter
2908 and set TYPE_ARTIFICIAL according to it. Adjust recursive call.
2909 (gnat_to_gnu_entity) <E_Record_Type>: Adjust call to above function.
2910 * gcc-interface/utils.c (rest_of_record_type_compilation): Do not
2911 invoke rest_of_type_decl_compilation on the parallel type, if any.
2913 2012-02-29 Eric Botcazou <ebotcazou@adacore.com>
2915 * gcc-interface/utils.c (gnat_write_global_declarations): Make sure the
2916 dummy global built for global types is preserved.
2918 2012-02-27 Tristan Gingold <gingold@adacore.com>
2920 * gcc-interface/decl.c (gnat_to_gnu_entity) [E_String_Type,
2921 E_Array_Type]: Reuse dummy fat type for gnu_ptr_template and
2924 2012-02-27 Eric Botcazou <ebotcazou@adacore.com>
2926 * gcc-interface/ada-tree.h (TYPE_PACKED_ARRAY_TYPE_P): Add checking.
2927 (TYPE_BY_REFERENCE_P): New flag.
2928 (TYPE_IS_BY_REFERENCE_P): New macro.
2929 (TYPE_DUMMY_P): Add checking and remove VOID_TYPE.
2930 (TYPE_IS_DUMMY_P): Adjust for above change.
2931 * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_BY_REFERENCE_P
2932 and TYPE_IS_BY_REFERENCE_P instead of TREE_ADDRESSABLE.
2933 (gnat_to_gnu_param): Likewise.
2934 (maybe_pad_type): Likewise.
2935 (make_type_from_size): Use TYPE_IS_PACKED_ARRAY_TYPE_P.
2936 * gcc-interface/misc.c (must_pass_by_ref): Use TYPE_IS_BY_REFERENCE_P
2937 instead of TREE_ADDRESSABLE.
2938 * gcc-interface/trans.c (finalize_nrv): Likewise.
2939 (call_to_gnu): Likewise. Do not create a temporary for return values
2940 with by-reference type here.
2941 (gnat_to_gnu): Test TYPE_IS_DUMMY_P instead of TYPE_DUMMY_P.
2942 (gnat_gimplify_expr) <ADDR_EXPR>: Don't do anything for non-constant
2943 CONSTRUCTORs and calls.
2944 * gcc-interface/utils.c (make_dummy_type): Get the equivalent type of
2945 the underlying type and use it throughout. Use TYPE_IS_BY_REFERENCE_P
2946 instead of TREE_ADDRESSABLE.
2947 * gcc-interface/utils2.c (build_cond_expr): Deal with by-reference
2950 2012-02-27 Eric Botcazou <ebotcazou@adacore.com>
2952 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Revert previous
2953 change that creates a special VAR_DECL for debugging purposes. For an
2954 aliased object with an unconstrained nominal subtype, make its type a
2955 thin reference to the underlying object.
2956 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: Deal with
2957 expressions built for the initialization of above objects.
2959 2012-02-24 Dave Korn <dave.korn.cygwin@gmail.com>
2961 * gcc-interface/Makefile.in (WIN_SO_PREFIX [windows targets]): New
2962 Windows-specific make variable.
2963 (WIN_SO_INSTALL_DIR [windows targets]): Likewise.
2964 (install-gnatlib): Respect the above during installation when set,
2965 and also install any windows import library that has been built.
2966 (gnatlib-shared-win32): Use WIN_SO_PREFIX to name output DLL and also
2967 build a corresponding import library.
2969 2012-02-22 Robert Dewar <dewar@adacore.com>
2971 * exp_util.adb, make.adb, sem_dim.adb, sem_ch4.adb, exp_disp.adb: Minor
2974 2012-02-22 Geert Bosch <bosch@adacore.com>
2976 * g-bytswa-x86.adb, g-bytswa.adb, gcc-interface/Makefile.in: Remove
2977 x86-specific version of byteswap and use GCC builtins instead.
2979 2012-02-22 Tristan Gingold <gingold@adacore.com>
2981 * gcc-interface/decl.c (gnat_to_gnu_entity) [E_String_Type,
2982 E_Array_Type]: Translate component ealier.
2984 2012-02-22 Robert Dewar <dewar@adacore.com>
2986 * par-ch3.adb (P_Signed_Integer_Type_Definition): Specialize
2987 error message for 'Range.
2989 2012-02-22 Pascal Obry <obry@adacore.com>
2991 * s-taprop-mingw.adb (Finalize_TCB): Do not wait on thread handle as
2992 this is our own thread.
2994 2012-02-22 Sergey Rybin <rybin@adacore.com frybin>
2996 * tree_io.ads: Update ASIS_Version_Number because of the changes
2999 2012-02-22 Hristian Kirtchev <kirtchev@adacore.com>
3001 * exp_ch7.adb (Create_Finalizer): Suppress elaboration checks on
3002 stack-related finalizers.
3004 2012-02-22 Ed Schonberg <schonberg@adacore.com>
3006 * sem_ch6.adb (Analyze_Expression_Function): If the construct
3007 is a completion, indicate that its formals are the formals of
3008 a completion, and as such do not get a cross- reference entry.
3009 (Analyze_Subprogram_Specification): Do not generate a definition
3010 for the entity of an expression function, because it may be a
3011 completion. Definition will be generated if needed when analyzing
3012 the generated subprogram declaration.
3014 2012-02-22 Vincent Celier <celier@adacore.com>
3016 * make.adb (Check): When checking if an object file is in the
3017 correct object directory, get the unit name from a previous call
3018 to Check_Source_Info_In_ALI.
3019 * makeutl.adb (Check_Source_Info_In_ALI): Return the name of
3020 the unit when everything is OK, otherwise return No_Name.
3021 * makeutl.ads (Check_Source_Info_In_ALI): Return Name_Id instead
3024 2012-02-22 Ed Schonberg <schonberg@adacore.com>
3026 * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): In an
3027 instance, the operator is visible if an operand is of some
3028 numeric type which is not in use or directly visible, and the
3029 other operand is a numeric literal.
3031 2012-02-22 Tristan Gingold <gingold@adacore.com>
3033 * init.c: Minor code clean up.
3034 * gcc-interface/Make-lang.in: Update dependencies.
3036 2012-02-22 Arnaud Charlet <charlet@adacore.com>
3038 * gnatlink.adb (Gnatlink): Use -gnatcC in CodePeer_Node,
3039 otherwise GCC will generate an object file.
3041 2012-02-22 Vincent Celier <celier@adacore.com>
3043 * projects.texi: Correct typo related to "**" in Source_Dirs.
3045 2012-02-22 Steve Baird <baird@adacore.com>
3047 * sem_prag.adb (Analyze_PPC_In_Decl_Part): Clean up generation of
3050 2012-02-22 Vincent Pucci <pucci@adacore.com>
3052 * rtsfind.adb (Get_Unit_Name): Ada_Numerics_Child and
3053 System_Dim_Child cases added.
3054 * rtsfind.ads: Ada_Numerics,
3055 Ada_Numerics_Generic_Elementary_Functions, System_Dim,
3056 System_Dim_Float_IO and System_Dim_Integer_IO added to the list
3057 of RTU_Id. Ada_Numerics_Child and System_Dim_Child added as
3058 new RTU_Id subtypes.
3059 * sem_dim.adb (Is_Dim_IO_Package_Entity): Use of
3060 Rtsfind to verify the package entity is located either
3061 in System.Dim.Integer_IO or in System.Dim.Float_IO.
3062 (Is_Dim_IO_Package_Instantiation): Minor
3063 changes. (Is_Elementary_Function_Call): Removed.
3064 (Is_Elementary_Function_Entity): New routine.
3065 (Is_Procedure_Put_Call): Is_Dim_IO_Package_Entity call added.
3066 * snames.ads-tmpl: Name_Dim and Name_Generic_Elementary_Functions
3069 2012-02-22 Vincent Pucci <pucci@adacore.com>
3071 * sem_prag.adb: Minor reformatting.
3073 2012-02-22 Ed Schonberg <schonberg@adacore.com>
3075 * sem_ch3.adb (Find_Type_Name): When analyzing a private type
3076 declaration that is the completion of a tagged incomplete type, do
3077 not associate the class-wide type already created with the private
3078 type to prevent order-of-elaboration issues in the back-end.
3079 * exp_disp.adb (Find_Specific_Type): Find specific type of
3080 a class-wide type, and handle the case of an incomplete type
3081 coming either from a limited_with clause or from an incomplete
3082 type declaration. Used when expanding a dispatchin call and
3083 generating tag checks (minor refactoring).
3085 2012-02-22 Robert Dewar <dewar@adacore.com>
3087 * exp_ch5.adb: Add comment.
3088 * sem_ch12.adb, exp_ch6.adb: minor reformatting
3090 2012-02-22 Ed Schonberg <schonberg@adacore.com>
3092 * freeze.adb (Freeze_Entity): Do not perform type layout within
3095 2012-02-22 Eric Botcazou <ebotcazou@adacore.com>
3097 * init.c (__gnat_error_handler) [Linux]: Map SIGBUS to
3100 2012-02-22 Ed Schonberg <schonberg@adacore.com>
3102 * exp_ch5.adb (Expand_N_Assignment_Statement): Reject an
3103 assignment to a classwide type whose type is limited, as
3104 can happen in an instantiation in programs that run afoul or
3107 2012-02-17 Ed Schonberg <schonberg@adacore.com>
3109 * exp_ch6.adb (Legal_Copy): If layout is not
3110 determined in the front-end, do not emit error message when
3111 by-reference actual is potentially unaligned.
3112 * gcc-interface/decl.c (gnat_to_gnu_field): Better error message for
3113 illegal representation clause on tagged or aliased component, or on
3114 by-reference type with forced alignment.
3116 2012-02-17 Nicolas Roche <roche@adacore.com>
3118 * gcc-interface/Makefile.in: Ensure FORCE_DEBUG_ADAFLAGS variables is
3119 propagated by gnatlib-sjlj and gnatlib-zcx targets.
3120 * gcc-interface/Make-lang.in: Update dependencies.
3122 2012-02-17 Thomas Quinot <quinot@adacore.com>
3124 * sem_ch12.adb (Analyze_Package_Instantiation): For an
3125 instantiation in an RCI library unit, omit the instance body
3126 if the RCI library unit is the instance itself (E.2.3(18)),
3127 but include the body if the instantiation is within the RCI
3128 declaration (12.3(12)).
3130 2012-02-17 Steve Baird <baird@adacore.com>
3132 * sem_prag.adb (Analyze_PPC_In_Decl_Part): Pre'Class and
3133 Post'Class aspects can only be specified for a primitive operation
3136 2012-02-17 Yannick Moy <moy@adacore.com>
3138 * gnat_rm.texi: Minor shuffling.
3140 2012-02-17 Ed Schonberg <schonberg@adacore.com>
3142 * aspects.adb: Expression functions can carry pre/postconditions.
3143 * par-ch6.adb (P_Subprogram): look for optional pre/postconditions
3144 in an expression function.
3145 * sem_prag (Check_Precondition_Postcondition): legal on expression
3148 2012-02-17 Vincent Pucci <pucci@adacore.com>
3150 * a-cdlili.adb, a-cidlli.adb, a-cihama.adb, a-cimutr.adb,
3151 * a-ciorma.adb, a-cohama.adb, a-coinve.adb, a-comutr.adb,
3152 * a-convec.adb, a-coorma.adb (Adjust): New routine.
3153 (Constant_Reference): Increment Busy and Lock counters.
3154 (Reference): Increase Busy and Lock counters.
3155 (Finalize): New routine.
3156 * a-cihase.adb, a-ciorse.adb, a-cohase.adb, a-coorse.adb:
3157 (Adjust): New routine. (Constant_Reference): Increment Busy
3159 (Finalize): New routine.
3160 * a-cdlili.ads, a-cidlli.ads, a-cihama.ads, a-cihase.ads,
3161 * a-cimutr.ads, a-ciorma.ads, a-ciorse.ads, a-cohama.ads,
3162 * a-cohase.ads, a-coinve.ads, a-comutr.ads, a-convec.ads,
3163 * a-coorma.ads, a-coorse: Controlled component added to the
3166 2012-02-17 Robert Dewar <dewar@adacore.com>
3168 * restrict.adb (Check_Restriction): Add special handling for
3169 No_Obsolescent_Features.
3171 2012-02-17 Hristian Kirtchev <kirtchev@adacore.com>
3173 * exp_util.adb (Find_Finalize_Address): When dealing with an
3174 internally built full view for a type with unknown discriminants,
3175 use the original record type.
3177 2012-02-17 Robert Dewar <dewar@adacore.com>
3179 * sem_dim.adb: Minor reformatting.
3181 2012-02-17 Yannick Moy <moy@adacore.com>
3183 * gnat_rm.texi: Minor rewording.
3185 2012-02-17 Thomas Quinot <quinot@adacore.com>
3187 * sem_aggr.adb: Minor reformatting.
3189 2012-02-17 Robert Dewar <dewar@adacore.com>
3191 * gnat_ugn.texi: Update doc for -gnatw.m to include 2*x case.
3193 2012-02-17 Vincent Pucci <pucci@adacore.com>
3195 * sem_dim.adb (Is_Dim_IO_Package_Entity): New routine.
3196 (Is_Dim_IO_Package_Instantiation): Is_Dim_IO_Package_Entity
3198 (Is_Procedure_Put_Call): Is_Dim_IO_Package_Entity
3200 * s-dim.ads: Make package Pure.
3202 2012-02-17 Gary Dismukes <dismukes@adacore.com>
3204 * prj-nmsc.adb: Minor reformatting.
3206 2012-02-17 Yannick Moy <moy@adacore.com>
3208 * gnat_rm.texi: Update GNAT RM with a separate chapter on restrictions.
3210 2012-02-17 Yannick Moy <moy@adacore.com>
3212 * gnat_ugn.texi: Fix typos.
3214 2012-02-17 Pascal Obry <obry@adacore.com>
3216 * prj-nmsc.adb: prj-nmsc.adb (Check_Aggregated): Check that an
3217 aggregate is not Externally_Built.
3219 2012-02-17 Ed Schonberg <schonberg@adacore.com>
3221 * sem_aggr.adb (Resolve_Record_Aggregate): If a composite
3222 component has a box association, copy the default value using
3223 the current scope as the scope of internal types, to prevent
3224 scoping anomalies in gigi.
3226 2012-02-17 Robert Dewar <dewar@adacore.com>
3228 * sem_dim.adb, sem_dim.ads, s-tasren.adb, prj.adb, prj.ads, freeze.adb,
3229 sem_res.adb, exp_ch4.adb, sinput.adb, sinput.ads, exp_aggr.adb,
3230 exp_intr.adb, s-os_lib.adb: Minor reformatting.
3232 2012-02-17 Ed Schonberg <schonberg@adacore.com>
3234 * sem_ch6.adb (Is_Non_Overriding_Operation): Add warning if the
3235 old operation is abstract, the relevant type is not abstract,
3236 and the new subprogram fails to override.
3238 2012-02-15 Eric Botcazou <ebotcazou@adacore.com>
3240 * gcc-interface/trans.c (Identifier_to_gnu): Move block retrieving the
3241 type of the result to the end and execute it for a deferred constant of
3242 a discriminated type whose full view can be elaborated statically.
3244 2012-02-15 Eric Botcazou <ebotcazou@adacore.com>
3246 * gcc-interface/trans.c (gnat_to_gnu) <N_Qualified_Expression>: If the
3247 type is tagged, mark it as used for debugging purposes.
3248 <N_Allocator>: Likewise for a qualified expression.
3250 2012-02-15 Eric Botcazou <ebotcazou@adacore.com>
3252 * gcc-interface/trans.c (call_to_gnu): Create the temporary for the
3253 return value in the by-reference return type case if this isn't the
3254 expression of an object declaration. Tidy up.
3256 2012-02-09 Tristan Gingold <gingold@adacore.com>
3258 * gcc-interface/Makefile.in: Remove .sym rule (not used).
3259 Remove adamsg.o object (requires native message compiler).
3260 * init.c (CMA$_EXIT_THREAD, MTH$_FLOOVEMAT, SS$_INTDIV): Define as a
3261 macro instead of as extern int.
3262 (ADA$_ALREADY_OPEN, ADA$_CONSTRAINT_ERRO, ADA$_DATA_ERROR)
3263 (ADA$_DEVICE_ERROR, ADA$_END_ERROR, ADA$_FAC_MODE_MISMAT)
3264 (ADA$_IOSYSFAILED, ADA$_KEYSIZERR, ADA$_KEY_MISMATCH)
3265 (ADA$_LAYOUT_ERROR, ADA$_LINEXCMRS, ADA$_MAXLINEXC)
3266 (ADA$_MODE_ERROR, ADA$_MRN_MISMATCH, ADA$_MRS_MISMATCH)
3267 (ADA$_NAME_ERROR, ADA$_NOT_OPEN, ADA$_ORG_MISMATCH)
3268 (ADA$_PROGRAM_ERROR, ADA$_RAT_MISMATCH, ADA$_RFM_MISMATCH)
3269 (ADA$_STAOVF, ADA$_STATUS_ERROR, ADA$_STORAGE_ERROR)
3270 (ADA$_UNSUPPORTED, ADA$_USE_ERROR): Likewise.
3271 (struct cond_except): Field cond is now an unsigned int.
3272 (dec_ada_cond_except_table): Adjust.
3273 (cond_except_table): Likewise.
3274 (cond_resignal_table): Likewise.
3275 (__gnat_default_resignal_p): Fix style.
3277 2012-02-08 Vincent Celier <celier@adacore.com>
3279 * gcc-interface/Make-lang.in: Add g-byorma.o to gnatbind objects
3280 (g-buorma is now imported by sinput).
3281 Update dependencies.
3282 * scn.adb (Initialize_Scanner): Call Check_For_BOM
3283 * sinput-p.adb (Source_File_Is_Subunit): Call Check_For_BOM
3284 * sinput.adb: New procedure Check_For_BOM
3285 * sinput.ads: New procedure Check_For_BOM
3287 2012-02-08 Vincent Pucci <pucci@adacore.com>
3289 * impunit.adb: Dimension package names updated
3290 * Makefile.rtl: s-dim added
3291 * sem_dim.adb (Is_Procedure_Put_Call): minor changes
3292 (Is_Dim_IO_Package_Instantiation): minor changes
3293 * sem_dim.ads: minor changes in comments
3294 * snames.ads-tmpl: Name_Dim added Name_Dim_Float_IO and
3295 Name_Dim_Integer_IO removed
3296 * s-dim.ads: New package. Define the dimension terminology.
3297 * s-diflio.adb, s-diinio.adb, s-dimkio.ads, s-dimmks.ads,
3298 * s-dmotpr.ads: Package names updated.
3299 * s-diflio.ads, s-diinio.ads: Documentation added and package
3302 2012-02-08 Gary Dismukes <dismukes@adacore.com>
3304 * gcc-interface/utils2.c (build_call_alloc_dealloc_proc): Revise test
3305 for storage pools to test for an underlying record type rather than
3306 testing Is_Tagged_Type, so that simple storage pools will be handled
3307 the same as normal Ada storage pools.
3309 2012-02-08 Yannick Moy <moy@adacore.com>
3311 * gnat_rm.texi: Minor reshuffling to place restriction at
3314 2012-02-08 Bob Duff <duff@adacore.com>
3316 * warnsw.adb (Set_Warning_Switch): Set Warn_On_Suspicious_Modulus_Value
3317 False for '-gnatwA', to suppress these warnings.
3319 2012-02-08 Vincent Celier <celier@adacore.com>
3321 * sinput-p.adb (Source_File_Is_Subunit): Check for BOM before
3322 starting to scan, so that UTF8 encoding is taken into account.
3324 2012-02-08 Arnaud Charlet <charlet@adacore.com>
3326 * s-tasren.adb, s-tasren.ads (Internal_Complete_Rendezvous): New
3328 (Complete_Rendezvous): Now call Internal_Complete_Rendezvous.
3329 (Exceptional_Complete_Rendezvous): Mark No_Return.
3331 2012-02-08 Eric Botcazou <ebotcazou@adacore.com>
3333 * exp_aggr.adb (Compile_Time_Known_Composite_Value):
3334 New predicate to compute whether a composite value can be
3335 evaluated at compile time.
3336 (Component_Not_OK_For_Backend): Use Compile_Time_Known_Value for all
3337 expressions of elementary type and Compile_Time_Known_Composite_Value
3338 for all other expressions.
3339 (Expand_Record_Aggregate): Convert to assignments in the case
3340 of a type with mutable components if the aggregate cannot be
3343 2012-02-08 Gary Dismukes <dismukes@adacore.com>
3345 * aspects.ads (type Aspect_Id): Add Simple_Storage_Pool_Type.
3346 (Impl_Defined_Aspects): Add association for
3347 Aspect_Simple_Storage_Pool_Type.
3349 association for Aspect_Simple_Storage_Pool_Type.
3351 (Canonical_Aspect): Add association for Simple_Storage_Pool_Type.
3352 * exp_attr.adb (Expand_N_Attribute_Reference):
3353 Change name to Name_Simple_Storage_Pool_Type.
3354 * exp_ch4.adb (Expand_N_Allocator): Change
3355 name to Name_Simple_Storage_Pool_Type.
3356 * exp_intr.adb (Expand_Unc_Deallocation): Change name to
3357 Name_Simple_Storage_Pool_Type. * freeze.adb (Freeze_Entity):
3358 Change names to Name_Simple_Storage_Pool_Type. * par-prag.adb:
3359 Change names to Name_Simple_Storage_Pool_Type. * sem_attr.adb:
3360 (Analyze_Attribute): Change name to Name_Simple_Storage_Pool_Type.
3361 * sem_ch13.adb (Analyze_Attribute_Definition_Clause):
3362 Change name to Name_Simple_Storage_Pool_Type.
3364 (Analyze_Pragma): Change name to Name_Simple_Storage_Pool_Type.
3365 (Sig_Flags): Change name to Name_Simple_Storage_Pool_Type.
3366 * sem_res.adb (Resolve_Allocator): Change name to
3367 Name_Simple_Storage_Pool_Type. * snames.ads-tmpl:
3368 (Name_Simple_Storage_Pool_Type): New name constant.
3369 (type Pragma_Id): Change name to Name_Simple_Storage_Pool_Type and
3370 move to main pragma section because it no longer matches the
3372 * snames.adb-tmpl (Get_Pragma_Id): Remove test for
3373 Name_Simple_Storage_Pool.
3374 (Is_Pragma_Name): Remove test for Name_Simple_Storage_Pool.
3376 2012-02-08 Robert Dewar <dewar@adacore.com>
3378 * gnat_ugn.texi: Add some clarification to -gnatwA and -gnatws.
3380 2012-02-08 Pascal Obry <obry@adacore.com>
3382 * prj.adb (Compute_All_Imported_Projects): Use new
3383 For_Project_And_Aggregated_Context to ensure proper context is
3384 used for encapsulated aggregate libraries.
3385 * prj-proc.adb (Recursive_Process): Call
3386 Process_Aggregated_Projects earlier to ensure that all dependent
3387 projects are set with the proper encapsulated status.
3389 2012-02-08 Pascal Obry <obry@adacore.com>
3391 * s-os_lib.adb (Normalize_Arguments): Properly escape last \ in null
3394 2012-02-08 Pascal Obry <obry@adacore.com>
3396 * prj.ads, prj.adb (For_Project_And_Aggregated_Context): New
3397 generic routine with a context parameter.
3399 2012-02-08 Robert Dewar <dewar@adacore.com>
3401 * a-coinve.adb, sem_util.adb, sem_ch8.adb, a-cobove.adb,
3402 a-convec.adb: Minor reformatting and code reorganization.
3404 2012-02-08 Steve Baird <baird@adacore.com>
3406 * sem_cat.adb (In_Preelaborated_Unit): A child
3407 unit instantiation does not inherit preelaboration requirements
3410 2012-02-08 Gary Dismukes <dismukes@adacore.com>
3412 * aspects.ads (type Aspect_Id): Add Aspect_Simple_Storage_Pool.
3413 (Impl_Defined_Aspects): Add entry for Aspect_Simple_Storage_Pool.
3414 (Aspect_Argument): Add Name entry for Aspect_Simple_Storage_Pool.
3415 (Aspect_Names): Add entry for Aspect_Simple_Storage_Pool.
3416 * aspects.adb (Canonical_Aspect): Add entry for
3417 Aspect_Simple_Storage_Pool.
3418 * exp_attr.adb (Expand_N_Attribute_Reference): Handle case of
3419 Attribute_Simple_Storage_Pool in the same way as Storage_Pool
3420 (add conversion, analyze/resolve). For the Storage_Size attribute,
3421 for the simple pool case, locate and use the simple pool type's
3422 Storage_Size function (if any), otherwise evaluate to zero.
3423 * exp_ch4.adb (Expand_N_Allocator): In the case of an allocator
3424 for an access type with an associated simple storage pool,
3425 locate and use the pool type's Allocate.
3426 * exp_intr.adb (Expand_Unc_Deallocation): In the case where the
3427 access type has a simple storage pool, locate the pool type's
3428 Deallocate procedure (if present) and use it as the procedure
3429 to call on the Free operation.
3430 * freeze.adb (Freeze_Entity): In the case of a full type for
3431 a private type defined with pragma Simple_Storage_Pool, check
3432 that the full type is also appropriate for the pragma. For
3433 a simple storage pool type, validate that the operations
3434 Allocate, Deallocate (if present), and Storage_Size
3435 (if present) are defined with appropriate expected profiles.
3436 (Validate_Simple_Pool_Op_Formal): New procedure
3437 (Validate_Simple_Pool_Operation): New procedure Add with and
3439 * par-prag.adb: Add Pragma_Simple_Storage_Pool to case statement
3440 (no action required).
3441 * sem_attr.adb (Analyze_Attribute): For the case of the
3442 Storage_Pool attribute, give a warning if the prefix type has an
3443 associated simple storage pool, and rewrite the attribute as a
3444 raise of Program_Error. In the case of the Simple_Storage_Pool
3445 attribute, check that the prefix type has an associated simple
3446 storage pool, and set the attribute type to the pool's type.
3447 * sem_ch13.adb (Analyze_Aspect_Specifications): Add
3448 Aspect_Simple_Storage_Pool case choice.
3449 (Analyze_Attribute_Definition_Clause): Add
3450 Aspect_Simple_Storage_Pool to case for Ignore_Rep_Clauses
3451 (no action). Add handling for Simple_Storage_Pool attribute
3452 definition, requiring the name to denote a simple storage pool
3454 (Check_Aspect_At_Freeze_Point): For a simple storage pool
3455 aspect, set the type to that of the name specified for the aspect.
3456 * sem_prag.adb (Analyze_Pragma): Add handling for pragma
3457 Simple_Storage_Pool, requiring that it applies to a library-level
3458 type declared in a package declaration that is a limited private
3459 or limited record type.
3460 * sem_res.adb (Resolve_Allocator): Flag an attempt to call a
3461 build-in-place function in an allocator for an access type with
3462 a simple storage pool as unsupported.
3463 * snames.ads-tmpl: Add Name_Simple_Storage_Pool.
3464 (type Attribute_Id): Add Attribute_Simple_Storage_Pool.
3465 (type Pragma_Id): Add Pragma_Simple_Storage_Pool.
3466 * snames.adb-tmpl (Get_Pragma_Id): Handle case of
3467 Name_Simple_Storage_Pool.
3468 (Is_Pragma_Name): Return True for Name_Simple_Storage_Pool.
3470 2012-02-08 Cyrille Comar <comar@adacore.com>
3472 * projects.texi: Clarify doc for interfaces.
3474 2012-02-07 Eric Botcazou <ebotcazou@adacore.com>
3476 * gcc-interface/Make-lang.in (GCC_LINKERFLAGS): New variable.
3479 2012-02-01 Tristan Gingold <gingold@adacore.com>
3481 * gcc-interface/trans.c (Loop_Statement_to_gnu): Use sizetype
3482 instead of size_type_node.
3484 2012-01-30 Nicolas Roche <roche@adacore.com>
3486 * gcc-interface/Make-lang.in: Update dependencies.
3487 * gcc-interface/Makefile.in: Use system-vxworks-system-ppc-mils.ads
3489 Remove Linker_Options -crtbe when building sjlj run-time.
3491 2012-01-30 Robert Dewar <dewar@adacore.com>
3493 * sem.adb (Analyze): Call Analyze_Mod for N_Op_Mod mode.
3494 * sem_ch3.adb (Modular_Type_Declaration): Warn on mod value of
3495 form 2 * small-literal.
3496 * sem_ch4.adb (Analyze_Mod): New procedure (warn on suspicious
3498 * sem_ch4.ads (Analyze_Mod): New procedure.
3500 2012-01-30 Ed Schonberg <schonberg@adacore.com>
3502 * sem_ch6.adb: sem_ch6.adb (Analyze_Expression_Function): Copy
3503 types and return expression when building spec for implicit
3504 body, to preserve global references that may be present in an
3507 2012-01-30 Matthew Heaney <heaney@adacore.com>
3509 * a-convec.adb, a-coinve.adb, a-cobove.adb (Sort,
3510 Reverse_Elements): Check for cursor tampering.
3512 2012-01-30 Ed Schonberg <schonberg@adacore.com>
3514 * sem_util.adb (Is_Fully_Initialized_Type): In Ada 2012, a
3515 type with aspect Default_Value or Default_Component_Value is
3516 fully initialized, and use of variables of such types do not
3519 2012-01-30 Javier Miranda <miranda@adacore.com>
3522 * sem_ch8.adb (Analyze_Subprogram_Renaming):
3523 Handle self-renaming when the renamed entity is referenced using
3526 2012-01-30 Vincent Celier <celier@adacore.com>
3528 * projects.texi: Add documentation for attribute Interfaces.
3530 2012-01-30 Hristian Kirtchev <kirtchev@adacore.com>
3532 * exp_ch7.adb (Build_Finalizer_Call): Set loc again.
3533 * exp_ch11.adb (Expand_At_End_Handler): Do not provide a source
3534 location for the wrapped call to the original AT_END routine
3535 and the subsequent return statement.
3537 2012-01-30 Pascal Obry <obry@adacore.com>
3539 * s-rannum.adb: Minor reformatting.
3541 2012-01-30 Hristian Kirtchev <kirtchev@adacore.com>
3543 * a-calend-vms.adb, a-calend.adb: Increment the number of leap seconds
3544 to 25 and add the hard time value for 2012-06-30.
3546 2012-01-30 Robert Dewar <dewar@adacore.com>
3548 * a-strhas.ads, einfo.adb, einfo.ads, exp_ch7.adb, exp_ch9.adb,
3549 freeze.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-proc.adb, s-llflex.ads,
3550 s-ransee.adb, s-ransee.ads, sem_ch13.adb, sem_dim.adb, sem_prag.adb:
3551 Minor reformatting/code reorganization.
3553 2012-01-30 Thomas Quinot <quinot@adacore.com>
3555 * s-rannum.adb, s-ransee.adb, s-ransee.ads (Get_Seed): Return
3556 Unsigned_64 rather than Duration.
3557 (System.Random_Numbers.Reset): Use full value of seed
3558 (do not truncate sub-second bits).
3560 2012-01-30 Thomas Quinot <quinot@adacore.com>
3562 * sem_cat.adb, sem_ch12.adb: Minor reformatting.
3564 2012-01-30 Yannick Moy <moy@adacore.com>
3566 * gnat_ugn.texi: Minor correction of GNAT UG, to take into
3567 account changes to -gnatwa and more recent warnings.
3569 2012-01-30 Hristian Kirtchev <kirtchev@adacore.com>
3571 * exp_ch7.adb (Build_Finalizer_Call): Do not provide a source
3572 location when creating a call to a finalizer.
3573 * exp_ch11.adb (Expand_Exception_Handlers): Do not provide
3574 a source location for the first actual of Save_Occurrence for
3577 2012-01-30 Ed Schonberg <schonberg@adacore.com>
3579 * einfo.ads, einfo,adb: New attribute on scalar types:
3580 Default_Aspect_Value New attribute on array types:
3581 Default_Aspect_Component_Value Move attribute Related_Array_Object
3582 to a different position to accomodate new aspect attributes.
3583 * freeze.adb (Freeze_Entity): Use new attributes to retrieve value
3584 of defaults set with an aspect specification, rather than using
3585 the list of aspects attached to the type, to prevent issues with
3587 * sem_ch13.adb (Analyze_Aspect_Specifications): For aspects
3588 Default_Value and Default_Component _Value, store corresponding
3589 expression in type entity.
3590 (Check_Aspect_At_End_Of_Declaration): If the default aspects
3591 are declared on the full view, use the full view to resolve the
3592 correseponding expression.
3593 * exp_ch3.adb (Init_Component): Use attribute
3594 Default_Aspect_Component_Value to perform default initialization,
3595 rather than relying on the rep item list for the type.
3596 (Get_Simple_Init_Val): Ditto.
3598 2012-01-30 Thomas Quinot <quinot@adacore.com>
3600 * a-strhas.ads: Document risk of collision attack.
3602 2012-01-30 Yannick Moy <moy@adacore.com>
3604 * gnat_ugn.texi: Minor update wrt warning switches.
3606 2012-01-30 Vincent Celier <celier@adacore.com>
3608 * prj-nmsc.adb (Check_Interfaces): Report an error when a
3609 unit from Library_Interface is not a unit of the project.
3611 2012-01-30 Vincent Pucci <pucci@adacore.com>
3613 * sem_prag.adb (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Parent
3614 links fixed inside PPC pragmas.
3615 * sem_ch12.adb: Move call to Make_Aspect_For_PPC_In_Gen_Sub_Decl.
3617 2012-01-30 Thomas Quinot <quinot@adacore.com>
3619 * s-ransee.ads: Minor reformatting.
3621 2012-01-30 Pascal Obry <obry@adacore.com>
3623 * prj.ads, prj.adb (For_Each_Source): Add support for skipping
3624 sources coming from an encapsulated library.
3626 2012-01-30 Ed Schonberg <schonberg@adacore.com>
3628 * sem_ch3.adb (Process-Full_View): fix typo.
3629 * sem_ch13.adb (Aalyze_Aspect_Specifications): if predicates
3630 appear on a private type and the full view is available, ensure
3631 existence of freeze node for full view.
3632 (Build_Predicate_Function): Attach predicate function to both
3633 views of a private type.
3635 2012-01-30 Vincent Celier <celier@adacore.com>
3637 * prj-nmsc.adb (Check_Interfaces): Compute the Lib_Interface_ALIs
3638 for the project if either attribute Library_Interface or
3639 Interfaces is declared.
3640 (Check_Stand_Alone_Library): Use Lib_Interface_ALIs computed in
3643 2012-01-30 Pascal Obry <obry@adacore.com>
3645 * prj-proc.adb (Recursive_Process): Set From_Encapsulated_Lib
3646 boolean value to true in the process list created by this routine.
3647 * prj.ads (Project_List_Element): New field From_Encapsulated_Lib.
3648 Continued work for KA06-021.
3649 * prj.adb (Compute_All_Imported_Projects): Set
3650 From_Encapsulated_Lib boolean flag.
3652 2012-01-30 Vincent Pucci <pucci@adacore.com>
3654 * sem_dim.adb (Expand_Put_Call_With_Dimension_Symbol): Minor
3656 * s-diflio.ads: Minor change.
3658 2012-01-30 Javier Miranda <miranda@adacore.com>
3660 * exp_ch9.adb (Build_Dispatching_Requeue): Add missing call
3661 to Get_Entry_Index. Required to generate code which provides
3662 the correct value of Entry_Index in the target entry.
3664 2012-01-30 Nicolas Roche <roche@adacore.com>
3666 * system-vxworks-ppc.ads: Add pragma Linker_Options -crtbe to
3667 fix issue with zcx on VxWorks5.
3669 2012-01-30 Pascal Obry <obry@adacore.com>
3671 * prj.ads, prj.adb (For_Every_Project_Imported): Remove
3673 (For_Every_Project_Imported_Context): New generic routine with
3674 a context parameter.
3675 * prj-nmsc.adb: Revert to use For_Every_Project_Imported Avoid
3676 distributed complexity.
3677 * prj-env.adb, prj-conf.adb, makeutl.adb, gnatcmd.adb: Ditto.
3679 2012-01-30 Thomas Quinot <quinot@adacore.com>
3681 * exp_aggr.adb (Expand_Record_Aggregate): After creating the
3682 _parent aggregate for an extension aggregate, check whether it
3683 requires delayed (top-down) expansion.
3685 2012-01-30 Vincent Pucci <pucci@adacore.com>
3687 * sem_dim.adb (Expand_Put_Call_With_Dimension_Symbol): Rewritten.
3688 * snames.ads-tmpl: Name_Item and Name_Symbols added.
3689 * s-diflio.adb, s-diflio.ads, s-diinio.adb, s-diinio.ads: Rename
3690 and change the position of parameter Symbols in every Put routine.
3691 * s-dimmks.ads: Convert long float type Mks_Type into long
3693 * s-llflex.ads: Modifications in comments.
3695 2012-01-30 Hristian Kirtchev <kirtchev@adacore.com>
3697 * sem_ch12.adb (Earlier): Do not use the
3698 top level source locations of the two input nodes.
3700 2012-01-30 Robert Dewar <dewar@adacore.com>
3702 * einfo.ads, sem_prag.adb, sem_attr.adb, aspects.ads,
3703 sem_cat.adb, sem_aggr.adb, exp_aggr.adb: Minor reformatting.
3705 2012-01-30 Robert Dewar <dewar@adacore.com>
3707 * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb: Minor reformatting.
3709 2012-01-30 Olivier Hainque <hainque@adacore.com>
3711 * sigtramp-ppcvxw.c (CFI_COMMON_REGS): Add rule for r1 back +
3714 2012-01-30 Thomas Quinot <quinot@adacore.com>
3716 * gnat_rm.texi, sem_dist.adb, sem_dist.ads, einfo.ads, sem_prag.adb,
3717 sem_ch12.adb, sem_attr.adb, aspects.adb, aspects.ads, par-prag.adb,
3718 sem_cat.adb, snames.ads-tmpl (Sem_Dist.Is_Valid_Remote_Object_Type):
3719 New subprogram (extracted from
3720 Sem_Cat.Validate_Remote_Access_Object_Type_Declaration).
3721 (Einfo.Is_Remote_Types): Now applies to generic types. Update
3722 documentation accordingly.
3723 (Sem_Ch12.Analyze_Associations): A RACW type is acceptable as
3724 actual for a formal type to which a pragma Remote_Access_Type
3726 (Aspects, Par.Prag, Sem_Prag): Support for new pramga/aspect
3728 (Sem_Attr.Analyze_Attribute, case Stub_Type): Attribute can
3729 be applied to a generic type if pragma Remote_Access_Type
3730 applies, in which case the type of the attribute is
3731 System.Partition_Interface.RACW_Stub_Type.
3733 2012-01-27 Eric Botcazou <ebotcazou@adacore.com>
3735 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Do not set
3736 an alignment on fields of the RETURN type built for the CICO mechanism.
3738 2012-01-27 Eric Botcazou <ebotcazou@adacore.com>
3740 * gcc-interface/trans.c (gnat_to_gnu): Avoid making a SAVE_EXPR for
3741 a call to a function that returns an unconstrained type with default
3742 discriminant. Similarly, avoid doing the conversion to the nominal
3743 result type in this case.
3745 2012-01-27 Eric Botcazou <ebotcazou@adacore.com>
3747 * gcc-interface/ada-tree.h (DECL_ALIASED_P): New flag.
3748 * gcc-interface/decl.c (is_variable_size): Rename to...
3749 (type_has_variable_size): ...this.
3750 (adjust_packed): Adjust to above renaming.
3751 (gnat_to_gnu_field): Set DECL_ALIASED_P on the field.
3752 (field_is_artificial): New predicate.
3753 (field_is_aliased): Likewise.
3754 (field_has_self_size): Likewise.
3755 (field_has_variable_size): Likewise.
3756 (components_to_record): Record information for the final layout during
3757 the first pass on fields.
3758 If there is an aliased field placed after a field whose length depends
3759 on discriminants, put all the fields of the latter sort, last.
3761 2012-01-27 Eric Botcazou <ebotcazou@adacore.com>
3763 * gcc-interface/gigi.h (get_minimal_subprog_decl): Declare.
3764 * gcc-interface/decl.c (get_minimal_subprog_decl): New function.
3765 * gcc-interface/trans.c (Attribute_to_gnu): Use it for the prefix of an
3766 Access-like attribute in a dispatch table if the subprogram is public.
3768 2012-01-27 Eric Botcazou <ebotcazou@adacore.com>
3770 * gcc-interface/gigi.h (create_label_decl): Adjust.
3771 * gcc-interface/utils.c (create_label_decl): Add GNAT_NODE parameter
3772 and invoke gnat_pushdecl on it. Remove obsolete settings.
3773 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Label>: Adjust call to
3775 * gcc-interface/trans.c (gnat_to_gnu) <N_Null): Likewise. Ignore the
3776 label for debugging purposes.
3778 2012-01-27 Eric Botcazou <ebotcazou@adacore.com>
3780 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: For an aliased
3781 object with an unconstrained nominal subtype and if optimization isn't
3782 enabled, create a special VAR_DECL for debugging purposes.
3784 2012-01-23 Robert Dewar <dewar@adacore.com>
3786 * sem_prag.ads, sem_prag.adb: Minor reformatting.
3788 2012-01-23 Robert Dewar <dewar@adacore.com>
3790 * sem_ch13.adb (Analyze_Aspect_Specifications): Check for
3791 language defined aspect applied to renaming or formal type
3792 declaration (not permitted)
3794 2012-01-23 Matthew Heaney <heaney@adacore.com>
3796 * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb (Vet): Replaced
3797 comment with pragma Assert.
3799 2012-01-23 Vincent Pucci <pucci@adacore.com>
3801 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Call
3802 to Make_Aspect_For_PPC_In_Gen_Sub_Decl added in ASIS mode.
3803 * sem_prag.adb, sem_prag.ads (Make_Aspect_For_PPC_In_Gen_Sub_Decl): New
3804 routine. In ASIS mode, convert any PPC pragmas into aspects in generic
3805 subprogram declaration in order to enable the analysis of PPC boolean
3808 2012-01-23 Robert Dewar <dewar@adacore.com>
3810 * sem_ch3.adb (Analyze_Object_Declaration): Properly
3811 handle Current_Value for volatile variables (also propagate
3812 Treat_As_Volatile from type to object).
3814 2012-01-23 Hristian Kirtchev <kirtchev@adacore.com>
3816 * sem_ch12.adb (Install_Body): Detect the case
3817 where the enclosing context is a package with a stub body that
3818 has already been replaced by the actual body. In such cases,
3819 the freeze node for the enclosing context must be inserted after
3822 2012-01-23 Ed Schonberg <schonberg@adacore.com>
3824 * sem_prag.adb (Analyze_Pragma, case Debug): Freeze the called
3825 subprogram before expanding the pragma into an if-statement with
3826 a block, to ensure that when the subprogram is null its body is
3827 properly generated before expansion.
3829 2012-01-23 Hristian Kirtchev <kirtchev@adacore.com>
3831 * sem_ch12.adb (Analyze_Associations): Alphabetize local variables and
3832 constants. Rename Actual_Types to Actuals_To_Freeze. Rename Next_Formal
3834 Freeze all eligible subprograms which appear as actuals in
3836 (Has_Fully_Defined_Profile): New routine.
3837 (Renames_Standard_Subprogram): New routine.
3838 (Earlier): Add local variable N. Comment update. Do not use source
3839 locations when trying to determine whether one node precedes another.
3841 2012-01-23 Gary Dismukes <dismukes@adacore.com>
3843 * exp_ch4.adb (Expand_Concatenate): In the case
3844 where the result of a concatentation can be null, set the to
3845 result have both the low and high bounds of the right operand (not
3846 just the high bound, as was the case prior to this fix). Also,
3847 fix the saved high bound setting (Last_Opnd_High_Bound) in the
3848 empty string literal case (should have been low bound minus one,
3849 rather than plus one).
3851 2012-01-23 Thomas Quinot <quinot@adacore.com>
3853 * scos.ads, put_scos.adb, get_scos.adb (Get_SCOs, Put_SCOs): Do not
3854 omit statement SCOs for disabled pragmas.
3856 2012-01-23 Matthew Heaney <heaney@adacore.com>
3858 * a-cohase.ads, a-cihase.ads, a-cbhase.ads, a-coorse.ads,
3859 a-ciorse.ads, a-cborse.ads, a-cohama.ads, a-cihama.ads, a-cbhama.ads,
3860 a-coorma.ads, a-ciorma.ads, a-cborma.ads, a-cdlili.ads, a-cidlli.ads,
3861 a-cbdlli.ads, a-convec.ads, a-coinve.ads, a-cobove.ads (Cursor'Read,
3862 Cursor'Write): Declare in private part.
3863 (Reference_Type'Read, Reference_Type'Write): Ditto.
3864 (Constant_Reference_Type'Read, Constant_Reference_Type'Write): Ditto.
3866 2012-01-23 Robert Dewar <dewar@adacore.com>
3868 * a-catizo.ads, a-calend.adb, a-calend.ads, par-ch13.adb: Minor
3871 2012-01-23 Ed Schonberg <schonberg@adacore.com>
3873 * sem_ch6.adb (Analyze_Subprogram_Declaration): Do not set the
3874 Corresponding_Body on a defaulted null formal subprogram.
3875 * sem_ch12.adb (Check_Formal_Package_Instance): No check needed
3876 on a defaulted formal subprogram that is a null procedure.
3878 2012-01-23 Hristian Kirtchev <kirtchev@adacore.com>
3880 * exp_ch9.adb: Update the comments involving pragma Implemented.
3881 * sem_ch3.adb (Check_Pragma_Implemented (Entity_Id)): Add local
3882 constant Subp_Alias and local variable Impl_Subp. Properly
3883 handle aliases of synchronized wrappers. Code cleanup.
3884 (Check_Pragma_Implemented (Entity_Id; Entity_Id)): Add
3885 Name_Optional as part of the condition.
3886 * sem_prag.adb (Analyze_Pragma): Add "Optional" as one of the
3887 valid choices of implementation kind.
3888 (Check_Arg_Is_One_Of): New routine.
3889 * snames.ads-tmlp: Add Name_Optional.
3891 2012-01-23 Ed Schonberg <schonberg@adacore.com>
3893 * par-ch13.adb: Better error recovery in illegal aspect
3896 2012-01-23 Hristian Kirtchev <kirtchev@adacore.com>
3898 * a-calend.adb: Add with clause for Interfaces.C. Add constant
3900 (Day_Of_Week): Call the internal UTC_Time_Offset.
3901 (Split): Call the internal UTC_Time_Offset.
3902 (Time_Of): Call the internal UTC_Time_Offset.
3903 (Time_Zone_Operations.UTC_Time_Offset): Call internal UTC_Time_Offset.
3904 (UTC_Time_Offset): New library-level routine.
3905 * a-calend.ads (UTC_Time_Offset): Remove parameter
3906 Is_Historic. Update related comment on usage.
3907 * a-catizo.adb (UTC_Time_Offset): Removed.
3908 (UTC_Time_Offset (Time)): Call Time_Zone_Operations.UTC_Time_Offset.
3909 * a-caltizo.ads (UTC_Time_Offset): Removed.
3910 (UTC_Time_Offset (Time)): Add back the default expression of parameter
3913 2012-01-23 Robert Dewar <dewar@adacore.com>
3915 * sprint.ads, sprint.adb (Sprint_Node_List): Add New_Lines parameter
3916 (pg,po,ps): Make sure each entry starts on new line.
3918 2012-01-23 Hristian Kirtchev <kirtchev@adacore.com>
3920 * a-calend.ads, a-calend.adb: Define types int and int_Pointer. Update
3921 the parameter profile of procedure localtime_tzoff and its associated
3923 (Day_Of_Week): Do not treat the input date as historical
3924 with respect to time zones.
3925 (Split): Do not treat the input
3926 date as historical with respect to time zones. (Time_Of): Do
3927 not treat the input constituents as forming a historical date
3928 with respect to time zones.
3929 (UTC_Time_Offset): Add new formal
3930 parameter Is_Historic. Add local variable Flag. Update the call
3932 * a-catizo.ads, a-catizo.adb (UTC_Time_Offset): New routine.
3933 (UTC_Time_Offset (Time)): Update the call to
3934 Time_Zone_Operations.UTC_Time_Offset.
3935 * sysdep.c (__gnat_localtime_tzoff): Update parameter
3936 profile. Split the processing of offsets on Windows into two - one
3937 part of historic time stamps and the other for the current time.
3939 2012-01-23 Robert Dewar <dewar@adacore.com>
3941 * a-calend.adb: Minor reformatting.
3943 2012-01-23 Ed Schonberg <schonberg@adacore.com>
3945 * exp_ch9.adb, sem_ch9.adb: Handle array of access to synchronized
3946 interface in requeue statement.
3948 2012-01-23 Cyrille Comar <comar@adacore.com>
3950 * projects.texi: Remove references to main units and replace
3951 with references to main programs to be coherent with the
3954 2012-01-23 Robert Dewar <dewar@adacore.com>
3956 * s-utf_32.adb: Minor reformatting.
3958 2012-01-23 Vincent Celier <celier@adacore.com>
3960 * snames.ads-tmpl: Minor comment addition Indicate that
3961 Name_Library_Encapsulated_Options is only used in gprbuild.
3963 2012-01-23 Robert Dewar <dewar@adacore.com>
3965 * sem_ch10.adb (Analyze_Subunit): Properly save/restore cunit
3968 2012-01-23 Ed Schonberg <schonberg@adacore.com>
3970 * snames.ads-tmpl: Add Name_Synchronization.
3971 * aspects.ads, aspects.adb: Add Aspect_Synchronization to
3972 enumeration type and related maps.
3973 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle Aspect
3974 Synchronization, build corresponding pragma Implemented.
3975 * sem_util.adb (Implementation_Kind): Handle both explicit and
3976 implicit pragma_argument association to retrieve the given
3977 synchronization mode.
3979 2012-01-23 Robert Dewar <dewar@adacore.com>
3981 * sem_ch10.adb, errout.adb: Minor reformatting.
3983 2012-01-23 Ed Schonberg <schonberg@adacore.com>
3985 * sem_res.adb (Resolve_Actuals): An actual in a call to an
3986 Ada 2012 Reference function does not lead to a dangerous order
3989 2012-01-23 Gary Dismukes <dismukes@adacore.com>
3991 * exp_util.adb (Is_Iterated_Container): Test
3992 Is_Entity_Name when searching for calls to the default iterator,
3993 to avoid blowing up on indirect calls which have an explicit
3994 dereference as the call name.
3996 2012-01-23 Thomas Quinot <quinot@adacore.com>
3998 * errout.adb (Set_Msg_Node): For an N_Expanded_Name, output
3999 the complete expanded name, rather than just its Selector_Name.
4001 2012-01-23 Thomas Quinot <quinot@adacore.com>
4003 * a-textio.adb (Put): Rewrite one-parameter Character version to
4004 just call the two-parameter one with Current_Out.
4006 2012-01-23 Hristian Kirtchev <kirtchev@adacore.com>
4008 * freeze.adb (Check_Current_Instance): Issue an
4009 error when the prefix of 'Unchecked_Access or 'Access does not
4010 denote a legal aliased view of a type.
4011 (Freeze_Record_Type): Do not halt the processing of record components
4012 once the Has_Controlled_Component is set as this bypasses the remaining
4014 (Is_Aliased_View_Of_Type): New routine.
4016 2012-01-23 Thomas Quinot <quinot@adacore.com>
4018 * errout.ads, freeze.adb: Minor reformatting.
4020 2012-01-23 Thomas Quinot <quinot@adacore.com>
4022 * sem_ch10.adb, sem_prag.adb: Remove redundant apostrophes in error
4025 2012-01-23 Olivier Hainque <hainque@adacore.com>
4027 * adadecode.c (__gnat_decode): Deal with empty input early,
4028 preventing potential erroneous memory access later on.
4030 2012-01-21 Eric Botcazou <ebotcazou@adacore.com>
4033 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: In the case of a
4034 renaming, preserve the volatileness through the indirection, if any.
4036 2012-01-14 Andreas Schwab <schwab@linux-m68k.org>
4038 * gcc-interface/Makefile.in (OSCONS_EXTRACT): Add
4041 2012-01-10 Pascal Obry <obry@adacore.com>
4043 * prj-nmsc.adb (Check_Library_Attributes):
4044 Kill check for object/source directories for aggregate libraries.
4046 2012-01-10 Matthew Heaney <heaney@adacore.com>
4048 * a-cdlili.adb, a-cdlili.ads, a-cihama.adb, a-cihama.ads, a-coinve.adb,
4049 a-coinve.ads, a-ciorse.adb, a-ciorse.ads, a-coorma.adb, a-coorma.ads,
4050 a-cborma.adb, a-cborma.ads, a-cidlli.adb, a-cidlli.ads, a-cimutr.adb,
4051 a-cimutr.ads, a-cihase.adb, a-cihase.ads, a-cohama.adb, a-cohama.ads,
4052 a-coorse.adb, a-coorse.ads, a-cbhama.adb, a-cbhama.ads, a-cborse.adb,
4053 a-cborse.ads, a-comutr.adb, a-comutr.ads, a-ciorma.adb, a-cobove.adb,
4054 a-ciorma.ads, a-cobove.ads, a-convec.adb, a-convec.ads, a-cohase.adb,
4055 a-cohase.ads, a-cbdlli.adb, a-cbdlli.ads, a-cbmutr.adb, a-cbmutr.ads,
4056 a-cbhase.adb, a-cbhase.ads (Reference, Constant_Reference): Declare
4057 container parameter as aliased in/in out.
4060 2012-01-10 Bob Duff <duff@adacore.com>
4062 * s-os_lib.ads: Improve comment.
4064 2012-01-10 Geert Bosch <bosch@adacore.com>
4066 * s-gearop.adb (Forward_Eliminate): Avoid improper aliasing
4069 2012-01-10 Bob Duff <duff@adacore.com>
4071 * sem_intr.adb (Check_Shift): Use RM_Size instead of Esize, when
4072 checking that the 'Size is correct. If the type is "mod 2**12",
4073 for example, it's illegal, but Esize is the 'Object_Size, which
4074 will be something like 16 or 32, so the error ('Size = 12) was
4076 * gnat_rm.texi: Improve documentation of shift
4077 and rotate intrinsics.
4079 2012-01-10 Pascal Obry <obry@adacore.com>
4081 * prj.adb (For_Every_Project_Imported): Fix
4082 implementation to make sure we return each project only once
4083 for aggragte libraries. It is fine to return a project twice for
4084 aggregate projects, this was the case as a Project_Id is different
4085 in each project tree. The new implementation use a table based on
4086 the project name to ensure proper detection of duplicate project
4087 in aggregate library. A new context is then created to continue
4088 retrurning duplicate project for aggregate libraries.
4090 2012-01-09 Eric Botcazou <ebotcazou@adacore.com>
4092 * gcc-interface/trans.c (call_to_gnu): Create the temporary for the
4093 return value in the variable-sized return type case if the target is
4094 an array with fixed size. However, do not create it if this is the
4095 expression of an object declaration.
4097 2012-01-09 Eric Botcazou <ebotcazou@adacore.com>
4099 * gcc-interface/trans.c (addressable_p) <COMPONENT_REF>: Fix thinko.
4101 2012-01-06 Robert Dewar <dewar@adacore.com>
4103 * a-wichha.ads, a-wichun.ads, a-zchhan.ads, a-zchuni.ads,
4104 s-utf_32.ads: Add pragma Pure
4105 * s-utf_32.adb: Suppress warnings on non-static constants (now
4108 2012-01-06 Bob Duff <duff@adacore.com>
4110 * s-rpc.ads (Read, Write): Add overriding indicators.
4112 2012-01-06 Robert Dewar <dewar@adacore.com>
4114 * gnat_rm.texi: Add documentation for conventions
4115 Ada_Pass_By_Copy and Ada_Pass_By_Reference.
4117 2012-01-06 Gary Dismukes <dismukes@adacore.com>
4119 * a-tienio.adb (Put): Add exception message on
4120 raise statements. Remove unneeded blocks and object declarations.
4122 2012-01-06 Robert Dewar <dewar@adacore.com>
4124 * sem_prag.adb: Minor reformatting.
4126 2012-01-06 Ed Schonberg <schonberg@adacore.com>
4128 * sinfo.ads, sinfo.adb (Has_Prefixed_Call): New flag to indicate
4129 that a selected component within a generic unit has been resolved
4130 as a prefixed call with local references.
4131 * sem_ch3.adb (Is_Visible_Component): In an instance body a selected
4132 component is always visible.
4133 * sem_ch4.adb (Analyze_Selected_Component): If the node is a
4134 prefixed call in an instance, do not look for visible components
4136 * sem_ch12.adb (Reset_Entity): If a selected component has resolved
4137 to a prefixed call, mark the node accordingly when prefix and
4138 selector are local references.
4140 2012-01-02 Eric Botcazou <ebotcazou@adacore.com>
4142 * gnatvsn.ads (Current_Year): Bump to 2012.
4144 Copyright (C) 2012 Free Software Foundation, Inc.
4146 Copying and distribution of this file, with or without modification,
4147 are permitted in any medium without royalty provided the copyright
4148 notice and this notice are preserved.