1 2012-06-14 Jose Ruiz <ruiz@adacore.com>
3 * gcc-interface/Make-lang.in (ada.install-common, ada.uninstall):
4 Use the prefix specified with the --program-prefix configure option
5 to determine the install name of the Ada tools.
6 (ada.all.cross): Use a for loop to iterate over the set of Ada tools
7 instead of duplicate the same processing.
10 2012-06-14 Vincent Pucci <pucci@adacore.com>
12 * exp_ch6.adb (Expand_Call): Expand_Put_Call_With_Dimension_Symbol
13 call replaced by Expand_Put_Call_With_Symbol call.
14 * sem_dim.adb: New fields Unit_Names, Unit_Symbols
15 and Dim_Symbols for record type System_Type.
16 (From_Dimension_To_String_Of_Symbols): Removed.
17 (From_Dim_To_Str_Of_Dim_Symbols): Renames previous
18 routine From_Dimension_To_String_Of_Symbols.
19 (From_Dim_To_Str_Of_Unit_Symbols): New routine.
20 (Analyze_Aspect_Dimension): argument Symbol in aspect
21 Dimension aggregate is optional. Named association implemented.
22 (Has_Compile_Time_Known_Expressions): Removed.
23 (Analyze_Aspect_Dimension_System): New
24 component Dim_Symbol in each Dimension aggregate in
25 aspect Dimension_System. Named associations implemented.
26 (Add_Dimension_Vector_To_Buffer): Removed.
27 (Add_Whole_To_Buffer): Removed.
28 (Expand_Put_Call_With_Dimension_Symbol.): Removed.
29 (Expand_Put_Call_With_Symbol): Renames previous routine
30 Expand_Put_Call_With_Dimension_Symbol.
31 (Has_Dimension_Symbols): Removed.
32 (Has_Symbols): Renames previous routine
33 Has_Dimension_Symbols. (Store_String_Oexpon): New routine.
34 * sem_dim.ads (Expand_Put_Call_With_Dimension_Symbol.): Removed.
35 (Expand_Put_Call_With_Symbol): Renames previous routine
36 Expand_Put_Call_With_Dimension_Symbol.
37 * s-diflio.adb, s-diinio.adb (Put): Symbol renames Symbols.
38 (Put_Dim_Of): New routines.
39 * s-diflio.ads, s-diinio.ads: documentation updated.
40 (Put): Symbol renames Symbols.
41 (Put_Dim_Of): New routines.
42 * s-dim.ads: documentation updated.
43 * s-dimmks.ads: dimensioned type and subtypes updated.
44 * snames.ads-tmpl: Name_Dim_Symbol, Name_Put_Dim_Of, Name_Symbol,
45 and Name_Unit_Symbol added. Name_Symbols removed.
47 2012-06-14 Vincent Pucci <pucci@adacore.com>
49 * freeze.adb (In_Exp_Body): Expression function case added.
50 (Freeze_Expression): Insert the Freeze_Nodes
51 list before the correct current scope in case of a quantified
54 2012-06-14 Pascal Obry <obry@adacore.com>
56 * projects.texi: Document the Install package for gprinstall.
57 2012-06-14 Ed Schonberg <schonberg@adacore.com>
59 * sem_elim.adb (Check_For_Eliminated_Subprogram): Do not check within
61 * sem_res.adb (Resolve_Call): simplify code.
63 2012-06-14 Ed Schonberg <schonberg@adacore.com>
65 * sem_case.adb (Check, Issue_Msg): within an instance, non-other
66 values in a variant part or a case expression do not have to
67 belong to the actual subtype.
69 2012-06-14 Ed Schonberg <schonberg@adacore.com>
71 * sem_ch12.adb (Validate_Derived_Type_Instance): If parent is
72 an interface type, check whether it is itself a previous formal
73 already instantiated in the current list of actuals.
75 2012-06-14 Ed Schonberg <schonberg@adacore.com>
77 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): The
78 expression for a stream attribute is a name that may be overloaded
79 with other declarations. To determine whether it matches the
80 aspect at the freeze point, it is necessary to verify that one
81 of its interpretations matches.
83 2012-06-14 Robert Dewar <dewar@adacore.com>
85 * exp_ch7.adb, exp_util.adb, sem_aux.ads, exp_ch9.adb,
86 sem_ch10.adb, freeze.adb, sem_util.adb, exp_ch4.adb,
87 s-taprop-dummy.adb: Minor reformatting.
89 2012-06-14 Vincent Pucci <pucci@adacore.com>
91 * exp_attr.adb (Expand_N_Attribute_Reference): Lock_Free
93 * par-prag.adb (Prag): Lock_Free pragma case added.
94 * sem_attr.adb (Analyze_Attribute_Reference): Lock_Free attribute
96 * sem_ch13.adb (Analyze_Aspect_Specifications): Record_Rep_Item
97 call added for Aspect_Lock_Free.
98 * sem_ch9.adb (Allows_Lock_Free_Implementation): New Lock_Free
99 error messages for subprogram bodies.
100 (Lock_Free_Disabled): New routine.
101 (Analyze_Protected_Body): Call to Lock_Free_Disabled added.
102 * sem_prag.adb (Analyze_Pragma): Lock_Free pragma case added.
103 * snames.adb-tmpl (Get_Pragma_Id): Name_Lock_Free case added.
104 (Is_Pragma_Name): Name_Lock_Free case added.
105 * snames.ads-tmpl: Attribute_Lock_Free and Pragma_Lock_Free added.
107 2012-06-14 Ed Schonberg <schonberg@adacore.com>
109 * a-coorma.adb, a-cborma.adb, a-cbhama.adb, a-ciorma.adb: Add missing
112 2012-06-14 Bob Duff <duff@adacore.com>
114 * lib.ads, lib.adb, sem.adb (Write_Unit_Info): Move this
115 procedure from Sem body to Lib spec, so it can be used for
118 2012-06-14 Ed Schonberg <schonberg@adacore.com>
120 * sem_ch6.adb (Check_Conformance): Add Ada 2012 check on mode
121 conformance: "aliased" must apply to both or neither formal
124 2012-06-14 Gary Dismukes <dismukes@adacore.com>
126 * exp_ch9.adb: Minor reformatting.
128 2012-06-14 Thomas Quinot <quinot@adacore.com>
130 * freeze.adb (Freeze_Record_Type): Warn about useless bit order
131 specification [when there's no component clause] regardless
132 of whether the specified bit order is reversed or not.
134 2012-06-14 Tristan Gingold <gingold@adacore.com>
136 * raise-gcc.c (__gnat_personality_seh0): New function.
138 2012-06-14 Tristan Gingold <gingold@adacore.com>
140 * gnatname.adb (Gnatname): Make sure that dynamic table
141 argument_data is initialized.
143 2012-06-14 Robert Dewar <dewar@adacore.com>
145 * sem_aux.adb: Minor code reorganization.
147 2012-06-14 Vincent Pucci <pucci@adacore.com>
149 * einfo.adb einfo.ads (Get_Rep_Item): Removed.
150 (Get_Rep_Item_For_Entity): Removed.
151 (Get_Rep_Pragma): Removed.
152 (Get_Rep_Pragma_For_Entity): Removed.
153 (Has_Rep_Item): Removed.
154 (Has_Rep_Pragma): Removed.
155 (Has_Rep_Pragma_For_Entity): Removed.
156 * exp_ch9.adb (Expand_N_Task_Type_Declaration):
157 Has_Rep_Pragma_For_Entity replaced by Has_Rep_Pragma
158 and Get_Rep_Pragma_For_Entity replaced by Get_Rep_Pragma.
159 (Make_Task_Create_Call): Has_Rep_Pragma_For_Entity replaced
160 by Has_Rep_Pragma and Get_Rep_Pragma_For_Entity replaced by
162 * exp_intr.adb: Dependency to Sem_Aux added for call to Get_Rep_Pragma.
163 * sem_aux.adb (Get_Rep_Item): New routine.
164 (Get_Rep_Pragma): New routine.
165 (Has_Rep_Item): New routine.
166 (Has_Rep_Pragma): New routine.
167 (Nearest_Ancestor): Minor reformatting.
168 * sem_aux.ads (Get_Rep_Item): New routine.
169 (Get_Rep_Pragma): New routine.
170 (Has_Rep_Item): New routine.
171 (Has_Rep_Pragma): New routine.
172 * sem_ch13.adb (Duplicate_Clause): Restore original error messages.
173 * sem_eval.adb (Subtypes_Statically_Match): Get_Rep_Item_For_Entity
174 replaced by Get_Rep_Item.
175 * sem_prag.adb (Analyze_Pragma): Restore original error messages.
176 (Check_Duplicate_Pragma): Restore original error messages.
178 2012-06-14 Ed Schonberg <schonberg@adacore.com>
180 * sem_util.adb (Is_Object_Reference): in Ada 2012, qualified
181 expressions are valid names.
183 2012-06-14 Ed Schonberg <schonberg@adacore.com>
185 * sem_ch10.adb (Analyze_Compilation_Unit): If the unit is an
186 instantiation do not emit warnings for obsolescent units. The
187 warnings belong on the corresponding generic.
189 2012-06-14 Hristian Kirtchev <kirtchev@adacore.com>
191 * einfo.adb: Update the usage of Node15.
192 (Return_Flag_Or_Transient_Decl): Removed.
193 (Set_Return_Flag_Or_Transient_Decl): Removed.
194 (Set_Status_Flag_Or_Transient_Decl): New routine.
195 (Status_Flag_Or_Transient_Decl): New routine.
196 (Write_Field15_Name): Update the output for variables and constants.
197 * einfo.ads: Remove attribute
198 Return_Flag_Or_Transient_Decl along with occurrences in nodes.
199 (Return_Flag_Or_Transient_Decl): Removed along with pragma Inline.
200 (Set_Return_Flag_Or_Transient_Decl): Removed along with pragma Inline.
201 (Set_Status_Flag_Or_Transient_Decl): New routine along with pragma
203 (Status_Flag_Or_Transient_Decl): New routine along with pragma Inline.
204 * exp_ch4.adb (Create_Alternative): New routine.
205 (Expand_N_Conditional_Expression): Handle the case
206 where at least one of the conditional expression
207 alternatives prodices a controlled temporary by means of a function
209 (Is_Controlled_Function_Call): New routine.
210 (Process_Transient_Object): Update the call to
211 Set_Return_Flag_Or_Transient_Decl.
212 * exp_ch6.adb (Enclosing_Context): New routine.
213 (Expand_N_Extended_Return_Statement): Update all calls to
214 Set_Return_Flag_Or_Transient_Decl.
215 (Expand_Ctrl_Function_Call): Prohibit the finalization of a controlled
216 function result when the context is a conditional expression.
217 * exp_ch7.adb (Process_Declarations): Update all calls to
218 Return_Flag_Or_Transient_Decl. Add processing for intermediate
219 results of conditional expressions where one of the alternatives
220 uses a controlled function call.
221 (Process_Object_Declaration): Update all calls to
222 Return_Flag_Or_Transient_Decl and rearrange the logic to process
223 "hook" objects first.
224 (Process_Transient_Objects): Update the call to
225 Set_Return_Flag_Or_Transient_Decl.
226 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean,
227 Boolean)): Update all calls to Return_Flag_Or_Transient_Decl. Add
228 detection for intermediate results of conditional expressions
229 where one of the alternatives uses a controlled function call.
231 2012-06-13 Eric Botcazou <ebotcazou@adacore.com>
234 2012-05-19 Eric Botcazou <ebotcazou@adacore.com>
236 * gcc-interface/decl.c (Has_Thiscall_Convention): New macro.
237 (gnat_to_gnu_entity) <E_Subprogram_Type>: Test it to set the thiscall
239 (get_minimal_subprog_decl): Likewise.
240 (gnat_first_param_is_class): New predicate.
242 2012-06-12 Robert Dewar <dewar@adacore.com>
244 * gcc-interface/Make-lang.in: Update dependencies.
245 * sem_ch9.ads, einfo.adb, einfo.ads, sem_prag.adb, freeze.adb,
246 sem_util.adb, sem_ch13.adb, sem_ch13.ads, exp_ch3.adb: Add comments.
249 2012-06-12 Ed Schonberg <schonberg@adacore.com>
251 * sem_ch12.adb (Instantiate_Formal_Subprogram): Remove code that
252 implements AI05-0296, because the actual may be overloaded.
253 * sem_ch8.adb (Analyze_Subprogram_Renaming): and move it here,
254 to be applied once the actual subprogram is properly resolved.
256 2012-06-12 Robert Dewar <dewar@adacore.com>
258 * switch-c.adb, a-exexpr-gcc.adb: Minor reformatting.
260 2012-06-12 Vincent Pucci <pucci@adacore.com>
262 * checks.adb (Tag_Checks_Suppressed): Remove Kill_Tag_Checks check.
263 * einfo.adb (Universal_Aliasing): Apply to the implementation
264 base type instead of the base type.
265 (Get_Rep_Item_For_Entity):
266 Return a pragma if the pragma node is not present in the Rep
267 Item chain of the parent.
268 (Kill_Tag_Checks): Removed (unused flag).
269 (Set_Kill_Tag_Checks): Removed.
270 (Get_First_Rep_Item): New routine.
271 (Get_Rep_Pragma_For_Entity): New routine.
272 (Has_Rep_Item): New routine.
273 (Has_Rep_Pragma_For_Entity): New routine.
274 (Present_In_Rep_Item): New routine.
275 * einfo.ads (Kill_Tag_Checks): Removed.
276 (Set_Kill_Tag_Checks): Removed.
277 (Get_First_Rep_Item): New routine.
278 (Get_Rep_Pragma_For_Entity): New routine.
279 (Has_Rep_Item): New routine.
280 (Has_Rep_Pragma_For_Entity): New routine.
281 (Present_In_Rep_Item): New routine.
282 * exp_attr.adb, sem_attr.adb: Attribute_CPU,
283 Attribute_Dispatching_Domain and Attribute_Interrupt_Priority
285 * exp_ch13.adb (Expand_N_Attribute_Definition_Clause): For
286 attribute Storage_Size, insert the new assignement statement
287 after the Size variable declaration.
288 * exp_ch3.adb (Build_Init_Statements): Fill the CPU,
289 Dispatching_Domain, Priority and Size components with the Rep
290 Item expression (if any).
291 * exp_ch9.adb (Expand_N_Task_Type_Declaration): _CPU,
292 _Priority, _Domain fields are always present in the
293 corresponding record type.
294 (Find_Task_Or_Protected_Pragma): Removed.
295 (Get_Relative_Deadline_Pragma): New routine.
296 (Make_Initialize_Protection): Find_Task_Or_Protected_Pragma removed.
297 (Make_Task_Create_Call): Check CPU, Size or
298 Dispatching_Domain Rep Item is present using new routine Has_Rep_Item.
299 * freeze.adb (Freeze_All): Push_Scope_And_Install_Discriminants
300 and Uninstall_Discriminants_And_Pop_Scope calls added.
301 (Freeze_Entity): Evaluate_Aspects_At_Freeze_Point call added.
302 * sem_aux.adb (Nearest_Ancestor): Retrieve the nearest ancestor
303 for private derived types.
304 * sem_ch13.adb (Analyze_Aspect_Specifications): Clean-up
305 and reordering. Delay analysis for all aspects (except some
307 (Analyze_Attribute_Definition_Clause):
308 Attribute_CPU, Attribute_Dispatching_Domain,
309 Interrupt_Priority and Attribute_Priority cases added.
310 (Analyze_Freeze_Entity): Push_Scope_And_Install_Discriminants
311 and Uninstall_Discriminants_And_Pop_Scope calls added.
312 (Check_Aspect_At_Freeze_Point): Reordering and clean-up.
313 (Duplicate_Clause): Issue an explicit error msg when the current
314 clause duplicates an aspect specification, an attribute definition
316 (Evaluate_Aspects_At_Freeze_Point): New routine.
317 * sem_ch13.ads (Evaluate_Aspects_At_Freeze_Point): New routine.
318 * sem_ch9.adb, sem_ch9.ads (Install_Discriminants): New routine.
319 (Push_Scope_And_Install_Discriminants): New routine.
320 (Uninstall_Discriminants): New routine.
321 (Uninstall_Discriminants_And_Pop_Scope): New routine.
322 * sem_prag.adb (Check_Duplicate_Pragma): Issue an explicit error
323 msg when the current pragma duplicates an aspect specification,
324 an attribute definition clause or a pragma.
325 (Analyze_Pragma): Remove use of flags Has_Pragma_CPU,
326 Has_Pragma_Priority and Has_Pragma_Dispatching_Domain.
327 * sem_util.adb (Compile_Time_Constraint_Error): Don't complain
328 about the type if the corresponding concurrent type doesn't come
330 * sinfo.adb, sinfo.ads (Has_Pragma_CPU): Removed.
331 (Has_Pragma_Dispatching_Domain): Removed.
332 (Has_Pragma_Priority): Removed.
333 (Has_Task_Info_Pragma): Removed.
334 (Has_Task_Name_Pragma): Removed.
335 (Set_Has_Pragma_CPU): Removed.
336 (Set_Has_Pragma_Dispatching_Domain): Removed.
337 (Set_Has_Pragma_Priority): Removed.
338 (Set_Has_Task_Info_Pragma): Removed.
339 (Set_Has_Task_Name_Pragma): Removed.
340 * snames.adb-tmpl (Get_Pragma_Id): Pragma_CPU,
341 Pragma_Dispatching_Domain and Pragma_Interrupt_Priority added.
342 (Is_Pragma_Name): Name_CPU, Name_Dispatching_Domain and
343 Name_Interrupt_Priority added.
344 * snames.ads-tmpl: Name_Dispatching_Domain, Name_CPU
345 and Name_Interrupt_Priority moved to the list of
346 Attribute_Name. Attribute_CPU, Attribute_Dispatching_Domain and
347 Attribute_Interrupt_Priority added. Pragma_Dispatching_Domain,
348 Pragma_CPU and Pragma_Interrupt_Priority moved to the end of
349 the Pragma_Name list.
351 2012-06-12 Arnaud Charlet <charlet@adacore.com>
353 * xref_lib.adb (Get_Full_Type): Add support for 'G'.
355 2012-06-12 Tristan Gingold <gingold@adacore.com>
357 * a-exexpr-gcc.adb (Unwind_Exception): Add 4 more private fields.
359 2012-06-12 Fedor Rybin <frybin@adacore.com>
361 * gnat_ugn.texi: Update doc on gnattest.
363 2012-06-12 Robert Dewar <dewar@adacore.com>
365 * sem_ch12.adb: Add comments.
367 2012-06-12 Robert Dewar <dewar@adacore.com>
369 * switch-c.adb, inline.adb, usage.adb, opt.ads: Minor reformatting.
371 2012-06-12 Robert Dewar <dewar@adacore.com>
373 * sem_ch12.adb: Minor reformatting.
375 2012-06-12 Eric Botcazou <ebotcazou@adacore.com>
377 * opt.ads (Inline_Level): New variable.
378 * gnat1drv.adb (Adjust_Global_Switches): Set it based on optimization
379 level if it has not been set by the user.
380 * switch-c.adb (Scan_Front_End_Switches): Accept -gnatn1 and -gnatn2
381 and set Inline_Level accordingly.
382 * inline.adb (Add_Inlined_Body): Declate new Inline_Level_Type type.
383 (Must_Inline): Return Inline_Level_T instead of Boolean to indicate
384 whether the package of the inlined subprogram must be compiled.
385 If Inline_Level is set to 1, only compile packages of subprograms
386 directly called from the main unit.
387 * usage.adb (Usage): Adjust line for -gnatn switch.
388 * gnat_ugn.texi (Switches for gcc): Document -gnatn1 and -gnatn2.
390 2012-06-12 Ed Schonberg <schonberg@adacore.com>
392 * sem_ch12.adb (Instantiate_Formal_Subprogram): Do not apply
393 AI05-296 if the actual is overloaded. In this case The rule must
394 be applied after resolution, in Analyze_Subprogram_Renaming.
396 2012-06-12 Robert Dewar <dewar@adacore.com>
398 * stringt.adb: Minor reformatting.
400 2012-06-12 Robert Dewar <dewar@adacore.com>
402 * ali-util.adb, stringt.ads: Minor reformatting.
404 2012-06-12 Hristian Kirtchev <kirtchev@adacore.com>
406 * exp_ch7.adb (Process_Declarations): Handle the case where
407 the original context has been wrapped in a block to avoid
408 interference between exception handlers and At_End handlers.
409 (Wrap_HSS_In_Block): Mark the block which contains the original
410 statements of the context as being a finalization wrapper.
411 * sinfo.adb (Is_Finalization_Wrapper): New routine.
412 (Set_Is_Finalization_Wrapper): New routine.
414 * sinfo.ads: Add new attribute Is_Finalization_Wrapper applicable
416 (Is_Finalization_Wrapper): New routine with corresponding pragma Inline.
417 (Set_Is_Finalization_Wrapper): New routine with corresponding pragma
420 2012-06-12 Steve Baird <baird@adacore.com>
422 * gnat1drv.adb (Adjust_Global_Switches): No longer need to set
423 Exception_Extra_Info in CodePeer_Mode.
425 2012-06-12 Robert Dewar <dewar@adacore.com>
427 * sem_dist.adb, exp_ch7.adb, sem_type.adb, exp_attr.adb,
428 sinfo.ads, sem_ch7.adb, exp_alfa.adb, sem_scil.adb, sem_ch12.adb,
429 sem_util.adb, sem_res.adb, sem_attr.adb, sem_elab.adb, exp_ch6.adb,
430 sem_ch4.adb, sem_warn.adb, scil_ll.adb, exp_cg.adb: Minor code
433 2012-06-12 Eric Botcazou <ebotcazou@adacore.com>
435 * s-tasini.ads: Minor fix in comment.
437 2012-06-12 Thomas Quinot <quinot@adacore.com>
439 * freeze.adb (Freeze_Record_Type): Warn on record with
440 Scalar_Storage_Order if there is no placed component.
442 2012-06-12 Thomas Quinot <quinot@adacore.com>
444 * sem_ch3.adb: Minor comment fix.
446 2012-06-12 Vincent Celier <celier@adacore.com>
448 * ali-util.adb (Time_Stamp_Mismatch): In minimal recompilation
449 mode, use Stringt Mark and Release to avoid growing the Stringt
450 internal tables uselessly.
451 * stringt.adb (Strings_Last): New global variable
452 (String_Chars_Last): New global variable.
453 (Mark, Release): New procedures.
454 * stringt.ads (Mark, Release) New procedures.
456 2012-06-12 Hristian Kirtchev <kirtchev@adacore.com>
458 * exp_ch7.adb (Process_Transient_Objects): Renamed constant
459 Requires_Hooking to Must_Hook and replace all occurrences of the name.
460 (Requires_Hooking): New routine. Detect all contexts that require
461 transient variable export to the outer finalizer due to a potential
464 2012-06-12 Ed Schonberg <schonberg@adacore.com>
466 * sem_ch12.adb: Small adjustment.
468 2012-06-12 Vincent Celier <celier@adacore.com>
470 * vms_cmds.ads (Command_Type): New enumeration value Test
471 * vms_conv.adb (Initialize): Add component at index Test in
473 * vms_data.ads (Test_Switches): New global variable for the
474 switches of gnattest, currently empty.
476 2012-06-12 Ed Schonberg <schonberg@adacore.com>
478 * sem_ch3.adb (Analyze_Subtype_Declaration): if an incomplete
479 type is tagged, so is a subtype of it.
480 * sem_ch12.adb (Validate_Actual_Subprogram): implement AI05-0296,
481 concerning freeze rules in the presence of formal incomplete
482 types: a formal abstract subprogram cannot have an incomplete
483 controlling type, and the profile of the actual subprogram does
484 not freeze if it includes an incomplete untagged type.
486 2012-06-12 Robert Dewar <dewar@adacore.com>
488 * a-direct.adb: Minor reformatting.
490 2012-06-12 Robert Dewar <dewar@adacore.com>
492 * gnat_ugn.texi: Add missing documentation for -gnatw.v and
495 2012-06-12 Thomas Quinot <quinot@adacore.com>
497 * sem_ch7.adb, sem_prag.adb, sem_ch12.adb, sem_ch4.adb,
498 sem_ch13.adb: Minor rewording of error messages for unchecked unions.
500 2012-06-12 Robert Dewar <dewar@adacore.com>
502 * lib-xref.ads: Minor reformatting.
504 2012-06-12 Pascal Obry <obry@adacore.com>
506 * a-direct.adb (Delete_File): Delete symbolic links silently
507 instead of raising the Name_Error exception when the symbolic
508 link is pointing to a non existent file.
510 2012-06-12 Robert Dewar <dewar@adacore.com>
512 * xref_lib.adb, sem_ch13.adb, lib-xref.adb: Minor reformatting.
514 2012-06-12 Javier Miranda <miranda@adacore.com>
516 * lib-xref.ads Adding missing documentation.
518 2012-06-12 Hristian Kirtchev <kirtchev@adacore.com>
520 * exp_ch7.adb (Create_Finalizer): Add the
521 exception reraise mechanism at the very end of the finalizer
522 statements. This placement ensures that all objects are finalized,
523 the secondary stack mark released and aborts undeferred before
524 propagating an exception.
526 2012-06-12 Ed Schonberg <schonberg@adacore.com>
528 * sem_ch10.adb (Remove_Unit_From_Visibility): if the unit is a
529 wrapper package. remove from visibility the original subprogram
532 2012-06-12 Javier Miranda <miranda@adacore.com>
534 * sem_prag.adb (Process_Convention): Generate reference to entity
535 exported to foreign language. Needed for GPS navigation.
536 * xref_lib.adb (Parse_Identifier_Info): Parse exported entities.
537 * lib-xref (Output_References): Output exported entities.
539 2012-06-12 Pascal Obry <obry@adacore.com>
541 * prj-attr.adb: Add install package and corresponding attributes.
542 * snames.ads-tmpl (Name_Active): New constant.
543 (Name_Exec_Subdir): Likewise.
544 (Name_Install): Likewise.
545 (Name_Lib_Subdir): Likewise.
546 (Name_Project_Subdir): Likewise.
547 (Name_Sources_Subdir): Likewise.
549 2012-06-12 Bob Duff <duff@adacore.com>
551 * sem_res.adb (Check_Infinite_Recursion):
552 Suppress spurious warning on recursion after "raise with ...".
554 2012-06-12 Thomas Quinot <quinot@adacore.com>
556 * sem_prag.adb (Analyze_Pragma, case Unchecked_Union): Do
557 not crash on illegal unchecked union that is a null record.
559 2012-06-12 Thomas Quinot <quinot@adacore.com>
561 * exp_ch4.adb (Has_Inferable_Discriminants): Reorganize code to
562 treat implicit dereferences with a constrained unchecked union
563 nominal subtype as having inferable discriminants.
565 2012-06-12 Robert Dewar <dewar@adacore.com>
567 * sem_ch6.adb: Minor reformatting.
569 2012-06-12 Eric Botcazou <ebotcazou@adacore.com>
571 * gnat_ugn.texi: Couple of minor corrections.
573 2012-06-12 Thomas Quinot <quinot@adacore.com>
575 * sem_prag.adb (Check_Variant): An empty component list is not
576 illegal in an unchecked union variant.
578 2012-06-12 Gary Dismukes <dismukes@adacore.com>
580 * projects.texi: Remove comments.
582 2012-06-12 Thomas Quinot <quinot@adacore.com>
584 * back_end.adb (Scan_Back_End_Switches): Treat -fdump-scos as
586 (gnat_post_options): Disable gimple-based SCO generator.
587 * gnat_ugn.texi: Document that -gnateS is an obsolete synonym
590 2012-06-12 Ed Schonberg <schonberg@adacore.com>
592 * sem_ch6.adb (Different_Generic_Profile): new predicate for
593 Find_Corresponding_Spec, to handle a rare case of accidental
594 overloading in an instance, when the profile of a subprogram body
595 that depends on a formal type becomes compatible with that of
596 a homonym whose profile in the generic mentions the actual type.
598 2012-06-12 Thomas Quinot <quinot@adacore.com>
600 * gnat1drv.adb: Minor reformatting.
602 2012-06-12 Ed Schonberg <schonberg@adacore.com>
604 * sem_util.adb (Build_Explicit_Dereference): If the expression
605 is an entity, ensure that the type of the expression is the same
606 as that of the entity.
608 2012-06-12 Pat Rogers <rogers@adacore.com>
610 * projects.texi: Corrected instances of the word "build" that
611 should be "built" instead. Other similar changes and minor
614 2012-06-12 Eric Botcazou <ebotcazou@adacore.com>
616 * sem_util.adb (Is_Atomic_Object): Return true for an atomic
617 component as well as a prefix which is an atomic component.
619 2012-06-12 Ed Schonberg <schonberg@adacore.com>
621 * exp_prag.adb (Expand_Pragma_Import_Or_Interface): revert previous
622 patch. The processing of interfacing aspects now generates a
623 proper Ada 2005 pragma.
624 * sem_prag.adb (Analyze_Pragma, cases Pragma_Export and
625 Pragma_Import): revert previous patch. The processing of
626 interfacing aspects now generates a proper Ada 2005 pragma.
627 * sem_ch13.adb (Analyze_Aspect_Specifications): generate proper
628 pragam for aspects Convention, Import and Export. Scan list
629 of aspects to collect link name and external name if present,
630 and verify that a complete pragma can be generated.
632 2012-06-11 Olivier Hainque <hainque@adacore.com>
634 * gcc-interface/Makefile.in (GNATLIBCFLAGS_FOR_C): Remove
635 $(PIC_FLAG_FOR_TARGET).
636 (gnatlib-shared-default): Add $(PIC_FLAG_FOR_TARGET) to
637 GNATLIBCFLAGS_FOR_C passed to gnatlib.
638 (gnatlib-shared-win32): Likewise.
639 (gnatlib-shared-darwin): Likewise.
640 (gnatlib-shared-dual-win32): Pass PIC_FLAG_FOR_TARGET to
641 gnatlib-shared-win32.
643 2012-06-11 Eric Botcazou <ebotcazou@adacore.com>
645 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Convert GNU_SIZE
646 to units before invoking allocatable_size_p on it.
647 Remove orphaned comment. Do not use ssize_int.
648 <E_Record_Subtype>: Traverse list in original order. Minor tweak.
649 (allocatable_size_p): Adjust and simplify.
650 (build_subst_list): Use consistent terminology throughout.
651 (build_variant_list): Likewise. Traverse list in original order.
652 (create_field_decl_from): Likewise.
653 (copy_and_substitute_in_size): Likewise.
654 (create_variant_part_from): Add comment about field list order.
655 * gcc-interface/utils.c (build_vms_descriptor): Do not use ssize_int.
656 * gcc-interface/utils2.c (build_allocator): Likewise.
658 2012-06-11 Eric Botcazou <ebotcazou@adacore.com>
660 * gcc-interface/trans.c (Identifier_to_gnu): Test Is_Elementary_Type
661 instead of Is_Scalar_Type for a constant with an address clause.
662 Do not return the underlying constant for a constant used by reference
663 if it holds the address of a constant and an lvalue is required.
665 2012-06-11 Eric Botcazou <ebotcazou@adacore.com>
667 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not specifically deal
668 with external constants wrt force_global here...
669 <E_Constant>: ...but here instead.
670 * gcc-interface/utils.c (gnat_pushdecl): Do not put external DECLs onto
671 the list of global DECLs.
673 2012-06-11 Eric Botcazou <ebotcazou@adacore.com>
675 * gcc-interface/decl.c (gnat_to_gnu_entity): Translate the Esize on
676 entry only for elementary types and abort if it is too large.
677 <E_Record_Type>: Make sure the Esize is known before using it.
679 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
681 * gcc-interface/utils2.c: Do not include output.h.
682 * gcc-interface/Make-lang.in: Fix dependencies.
684 2012-05-29 Michael Matz <matz@suse.de>
686 * gcc-interface/utils.c (create_var_decl_1): Don't call expand_decl.
688 2012-05-26 Eric Botcazou <ebotcazou@adacore.com>
690 * gcc-interface/decl.c (variant_desc): Rename 'record' to 'new_type'.
691 (build_variant_list): Adjust to above renaming.
692 (gnat_to_gnu_entity) <E_Record_Subtype>: Likewise. Give a unique name
693 to the type of the variant containers.
694 (create_variant_part_from): Likewise. Give a unique name to the type
697 2012-05-25 Eric Botcazou <ebotcazou@adacore.com>
700 * link.c (__gnat_object_file_option): Set to "-Wl,@" for GNU linker.
701 (__gnat_using_gnu_linker): Delete.
702 * gnatlink.adb (Gnatlink): Declare Object_File_Option_Ptr here...
703 Declare Object_File_Option string constant and Using_GNU_response_file
705 (Process_Binder_File): ...instead of here. Delete Using_GNU_Linker,
706 Opening and Closing local variables. Do not handle the GNU linker
708 (Write_RF): New procedure to write into the response file. Escape some
709 characters if a GNU response file is used. Keep track of error status.
710 Invoke Write_RF to write into the response file. Delete the file only
711 if the link was successful.
712 * mlib-utl.adb: Do not `with' package System.
713 (Gcc): Likewise. Declare Object_File_Option string constant and
714 Using_GNU_response_file boolean constant.
715 (Write_RF): Take a string instead of address and length. Escape some
716 characters if a GNU response file is used.
717 Invoke Write_RF to write into the response file. Delete the file only
718 if the link was successful. Do not warn if it cannot be deleted.
720 2012-05-20 Eric Botcazou <ebotcazou@adacore.com>
722 * gcc-interface/utils.c (gnat_write_global_declarations): Put a name
723 on the dummy global variable.
725 2012-05-19 Eric Botcazou <ebotcazou@adacore.com>
727 * gcc-interface/decl.c (Has_Thiscall_Convention): New macro.
728 (gnat_to_gnu_entity) <E_Subprogram_Type>: Test it to set the thiscall
730 (get_minimal_subprog_decl): Likewise.
731 (gnat_first_param_is_class): New predicate.
733 * gcc-interface/misc.c (gnat_handle_option): Fix formatting.
734 * gcc-interface/Makefile.in: Likewise.
736 2012-05-18 Eric Botcazou <ebotcazou@adacore.com>
738 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: For an object at
739 global level with unconstrained nominal subtype and a non-fixed size,
740 make a variable for the size.
742 2012-05-15 Andris Pavenis <andris.pavenis@iki.fi>
745 * s-taprop-dummy.adb (Specific): New package.
747 2012-05-15 Olivier Hainque <hainque@adacore.com>
749 * gcc-interface/Make-lang.in (COMMON_FLAGS_TO_PASS): Use WARN_CFLAGS
750 instead of trying to mimic it.
752 2012-05-15 Robert Dewar <dewar@adacore.com>
754 * sem_ch5.adb, sem_util.adb, s-stposu.adb, exp_ch4.adb: Minor
757 2012-05-15 Geert Bosch <bosch@adacore.com>
759 * uintp.adb (UI_Rem): Remove optimizations, as they are complex and are
761 (Sum_Digits): Remove, no longer used.
762 (Sum_Double_Digits): Likewise.
764 2012-05-15 Yannick Moy <moy@adacore.com>
766 * aspects.ads: Minor typo.
768 2012-05-15 Thomas Quinot <quinot@adacore.com>
770 * gnat_rm.texi (Scalar_Storage_Order): Fix RM reference.
771 * sem_ch13.adb: Minor comment fix: incorrect RM reference.
773 2012-05-15 Eric Botcazou <ebotcazou@adacore.com>
775 * sem_prag.adb (Process_Atomic_Shared_Volatile): Propagate
776 atomicity from an object to its underlying type only if it
779 2012-05-15 Ed Schonberg <schonberg@adacore.com>
781 * sem_ch5.adb (Analyze_Iterator_Specification): Set kind of
782 loop variable after pre-analysis of iterator name, to prevent
783 premature usage of loop variable.
785 2012-05-15 Ed Schonberg <schonberg@adacore.com>
787 * sem_util.adb (Is_Variable): In Ada 2012, an explicit
788 dereference that is a rewriting of an expression whose type has
789 a declared Implicit_Derenference aspect is a variable.
791 2012-05-15 Hristian Kirtchev <kirtchev@adacore.com>
793 * exp_ch4.adb (Insert_Dereference_Action): Reimplemented. The
794 routine performs address and size adjustments for dereferences
795 of heap-allocated controlled objects. This manipulation is needed
796 in order to restore the original state of the memory at the time
797 it was allocated by the finalization machinery.
798 * rtsfind.ads: Add RE_Adjust_Controlled_Dereference to tables
799 RE_Id and RE_Unit_Table.
800 * sinfo.adb (Has_Dereference_Action): New routine.
801 (Set_Has_Dereference_Action): New routine.
802 * sinfo.ads: Add new semantic flag Has_Dereference_Action along
803 its association in nodes.
804 (Has_Dereference_Action): New routine and pragma Inline.
805 (Set_Has_Dereference_Action): New routine and pragma Inline.
806 * s-stposu.ads, s-stposu.adb (Adjust_Controlled_Dereference): New
809 2012-05-15 Thomas Quinot <quinot@adacore.com>
811 * uintp.adb (Image_Uint): Use UI_Div_Rem to get quotient and
812 remainder of U / Base in a single operation.
814 2012-05-15 Robert Dewar <dewar@adacore.com>
816 * exp_ch5.adb, inline.adb, sem_ch10.adb, prj.ads, sem_util.adb,
817 a-ngelfu.ads, exp_ch4.adb, exp_ch6.adb, aspects.ads, sem_ch6.adb,
818 vms_data.ads, exp_ch3.adb, prj-env.adb: Minor reformatting.
820 2012-05-15 Thomas Quinot <quinot@adacore.com>
822 * exp_ch4.adb (Has_Inferable_Discriminants): For a qualified
823 expression, use correct node for test on the subtype denoted by
826 2012-05-15 Eric Botcazou <ebotcazou@adacore.com>
828 * inline.adb (Scope_In_Main_Unit): Rename into...
829 (In_Main_Unit_Or_Subunit): ...this. Also return
830 true if the subprogram is within a subunit of the
832 (Add_Inlined_Body): Adjust for above renaming.
833 (Add_Inlined_Subprogram): Likewise. Pass the subprogram directly.
834 (Analyze_Inlined_Bodies): Really set aside inlined subprograms
835 not handled by Add_Inlined_Body.
837 2012-05-15 Ed Schonberg <schonberg@adacore.com>
839 * sem_ch10.adb (Expand_With_Clause): In the context of a generic
840 package declaration, a private with-clause on a child unit implies
841 that the implicit with clauses on its parents are private as well.
843 2012-05-15 Javier Miranda <miranda@adacore.com>
845 * sem_ch6.adb (Is_Interface_Conformant): Add missing call to
846 Base_Type to handle subtypes.
847 * exp_ch6.adb (Expand_Call): For calls located in thunks handle
848 unchecked conversions of access types found in actuals.
849 * exp_disp.adb (Expand_Interface_Thunk): Add missing unchecked
850 conversion to actuals whose type is an access type. Done to
851 avoid reporting spurious errors.
853 2012-05-15 Vincent Celier <celier@adacore.com>
855 * prj-env.adb (Create_Mapping): Ignore sources that are
856 suppressed (Create_Mapping_File.Process): Ditto
857 * prj-nmsc.adb (Add_Source): Update to take into
858 account suppressed files that may hide inherited sources.
859 (Mark_Excluded_Sources): Mark excluded sources of the current
860 project as suppressed.
861 * prj.ads (Source_Data): New Boolean component Suppressed,
864 2012-05-15 Thomas Quinot <quinot@adacore.com>
866 * exp_intr.adb: Minor reformatting.
868 2012-05-15 Thomas Quinot <quinot@adacore.com>
870 * gnat_rm.texi: Document attribute Scalar_Storage_Order.
872 2012-05-15 Javier Miranda <miranda@adacore.com>
874 * exp_ch3.adb (Build_Offset_To_Top): Modify the
875 expansion of the offset_to_top functions to ensure that their
876 profile is conformant with the profile specified in Ada.Tags. No
877 change in functionality.
879 2012-05-15 Eric Botcazou <ebotcazou@adacore.com>
881 * inline.adb (Subp_Info): Remove Count and Next_Nopred
882 components, add Processed component and move around Next component.
883 (Add_Call): Reverse meaning of Successors table to the natural one.
884 (Add_Inlined_Body): Do not inline a package if it is in the main unit.
885 (Add_Inlined_Subprogram): Do not add the subprogram to the list if the
886 package is in the main unit. Do not recurse on the successors.
887 (Add_Subp): Adjust to new contents of Subp_Info.
888 (Analyze_Inlined_Bodies): Do not attempt
889 to compute a topological order on the list of inlined subprograms,
890 but compute the transitive closure from the main unit instead.
891 (Get_Code_Unit_Entity): Always return the spec for a package.
893 2012-05-15 Yannick Moy <moy@adacore.com>
895 * aspects.ads: Minor addition of comments to provide info on
896 how to add new aspects.
898 2012-05-15 Thomas Quinot <quinot@adacore.com>
900 * osint.ads: Minor reformatting.
902 2012-05-15 Thomas Quinot <quinot@adacore.com>
904 * exp_ch5.adb, exp_pakd.adb, sem_util.adb, sem_util.ads
905 (Expand_Assign_Array): Handle the case of a packed bit array within a
906 record with reverse storage order (assign element by element in that
908 (In_Reverse_Storage_Order_Record): New subprogram,
909 code extracted from Exp_Pakd.
911 2012-05-15 Yannick Moy <moy@adacore.com>
913 * a-ngelfu.ads: Add postconditions using Ada 2012
914 aspect syntax, reflecting some of the RM requirements for these
915 functions, from Annex A.5.1 or G.2.4.
917 2012-05-15 Thomas Quinot <quinot@adacore.com>
919 * adaint.c: Minor fix: move misplaced comment.
921 2012-05-15 Doug Rupp <rupp@adacore.com>
923 * vms_data.ads: Enhance help for /IMMEDIATE_ERRORS to discourage
926 2012-05-15 Tristan Gingold <gingold@adacore.com>
928 * a-exextr.adb: Add comment.
930 2012-05-15 Ed Schonberg <schonberg@adacore.com>
932 * sem_ch3.adb: Minor reformatting (remove long dead code).
934 2012-05-15 Ed Schonberg <schonberg@adacore.com>
936 * aspects.adb, aspects.ads: Add aspects for Convention, Export,
937 External_Name, Import, and Link_Name.
938 * exp_prag.adb (Expand_Pragma_Import_Or_Interface): if the
939 pragma comes from an aspect specification, the entity is the
941 * sem_prag.adb (Analyze_Pragma, cases Pragma_Export and
942 Pragma_Import): if the pragma comes from an aspect specification,
943 the entity is the first argument, and the second has the value
945 * sem_ch13.adb (Analyze_Aspect_Specifications): generate pragam
946 for aspect Convention. Add placeholders for Link_Name and
949 2012-05-15 Hristian Kirtchev <kirtchev@adacore.com>
951 * exp_ch9.adb (Expand_N_Asynchronous_Select): Extract the statements
952 of the abortable part and triggering alternative after being processed
953 for controlled objects.
954 (Expand_N_Timed_Entry_Call): Code and comment reformatting.
956 2012-05-15 Robert Dewar <dewar@adacore.com>
958 * sem_util.adb: Minor code reorganization.
960 2012-05-15 Robert Dewar <dewar@adacore.com>
962 * exp_ch7.adb, exp_ch11.adb, exp_ch11.ads: Minor reformatting.
964 2012-05-15 Thomas Quinot <quinot@adacore.com>
966 * sem_res.adb (Resolve): Enforce E.2.2(11/2) and E.2.2(12) for
967 'Unrestricted_Access and 'Unchecked_Access (not just 'Access):
968 even in those cases, a remote access type may only designate a
971 2012-05-15 Thomas Quinot <quinot@adacore.com>
973 * sem_util.adb, sem_util.ads, sem_cat.adb: Minor refactoring.
974 (Enclosing_Lib_Unit_Node): Rename to Enclosing_Comp_Unit_Node.
976 2012-05-15 Ed Schonberg <schonberg@adacore.com>
978 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Remove obsolete
979 checks on nested inlined subprograms.
981 2012-05-15 Tristan Gingold <gingold@adacore.com>
983 * fe.h (Get_RT_Exception_Name): Declare.
985 2012-05-15 Tristan Gingold <gingold@adacore.com>
987 * raise-gcc.c (db_region_for): Use %p + cast to avoid warnings.
988 (get_region_description_for): Likewise.
989 (db_action_for): Likewise.
990 (get_call_site_action_for): Likewise.
991 (get_ttype_entry_for): Remove useless 'const'.
992 (PERSONALITY_FUNCTION): Add ATTRIBUTE_UNUSED on uw_exception_class.
994 2012-05-15 Tristan Gingold <gingold@adacore.com>
996 * a-exextr.adb (Unhandled_Exception_Terminate): Save occurrence
997 on the stack to avoid a dynamic memory allocation.
999 2012-05-15 Bob Duff <duff@adacore.com>
1001 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Move initialization of
1002 E_Stats and D_Stats after Process_Statements_For_Controlled_Objects,
1003 because those calls can destroy the Statements list.
1005 2012-05-15 Tristan Gingold <gingold@adacore.com>
1007 * fe.h (Get_RT_Exception_Name): Define.
1008 * types.ads (RT_Exception_Code): Update comment.
1009 * exp_ch11.adb, exp_ch11.ads (Get_RT_Exception_Name): New
1010 procedure to get the name of the rcheck subprograms.
1011 * a-except-2005.adb (Rcheck_xx): Rename.
1012 * a-except.adb Likewise, but also keep the old Rcheck_nn routines
1014 * arith64.c (__gnat_mulv64): Use __gnat_rcheck_CE_Overflow_Check
1015 instead of __gnat_rcheck_10.
1016 * gcc-interface/trans.c (build_raise_check): Use Get_RT_Exception_Name
1017 to create the __gnat_rcheck routines name.
1018 * gcc-interface/Make-lang.in: Update dependencies.
1020 2012-05-15 Tristan Gingold <gingold@adacore.com>
1022 * exp_ch7.adb (Build_Exception_Handler): Save current
1023 occurrence only if -gnateE.
1024 (Build_Object_Declaration): Declare E_Id only if -gnateE.
1025 (Build_Raise_Statement): Call Raise_From_Controlled_Operation only if
1026 -gnateE (else raise PE).
1027 * s-soflin.adb (Save_Library_Occurrence): Handle null occurrence
1029 * a-except-2005.adb (Reraise_Library_Exception_If_Any): Call
1030 Raise_From_Controlled_Operation only if the saved occurrence is
1031 not null, otherwise raise PE.
1033 2012-05-15 Yannick Moy <moy@adacore.com>
1035 * exp_alfa.ads: Add comments describing the Alfa mode.
1037 2012-05-15 Tristan Gingold <gingold@adacore.com>
1039 * s-soflin.ads, s-soflin.adb (Save_Library_Occurrence): Parameter
1040 E is now of type Exception_Occurrence_Access.
1041 * exp_ch7.ads, exp_ch7.adb (Build_Exception_Handler): Adjust generated
1042 call to Save_Library_Occurrence.
1044 2012-05-15 Thomas Quinot <quinot@adacore.com>
1046 * exp_ch4.adb (Rewrite_Coextension): Use Insert_Action to
1047 insert temporary variable decl at the proper place in the tree.
1049 2012-05-15 Hristian Kirtchev <kirtchev@adacore.com>
1051 * g-calend.adb (Split_At_Locale): New routine.
1052 (Time_Of_At_Locale): New routine.
1053 * g-calend.ads (Split_At_Locale): New routine.
1054 (Time_Of_At_Locale): New routine.
1056 2012-05-15 Gary Dismukes <dismukes@adacore.com>
1058 * a-except.ads: Minor reformatting.
1060 2012-05-15 Ed Schonberg <schonberg@adacore.com>
1062 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): If the loop
1063 parameter specification is part of a quantified expression, and it
1064 already carries a type, do not repeat the analysis to preserve
1065 type information: a range attribute reference may have been
1066 rewritten as a range with static bounds, and its re-analysis may
1067 type it as Integer by default, instead of the original index type.
1069 2012-05-15 Robert Dewar <dewar@adacore.com>
1071 * s-osprim-mingw.adb: Minor reformatting.
1073 2012-05-15 Arnaud Charlet <charlet@adacore.com>
1075 * a-except.adb, a-except.ads (Reraise_Library_Exception_If_Any): New.
1076 Mark this unit preelaborate.
1077 * s-soflin.ads: Make package Preelaborate.
1079 2012-05-15 Robert Dewar <dewar@adacore.com>
1081 * s-osprim-mingw.adb, sem_eval.adb, a-calend-vms.ads: Minor reformatting
1083 2012-05-15 Ed Schonberg <schonberg@adacore.com>
1085 * sem_eval.adb (Subtypes_Statically_Match): In Ada 2012, static
1086 matching requires matching of static subtype predicates as well.
1088 2012-05-15 Ed Schonberg <schonberg@adacore.com>
1090 * sem_case.adb (Analyze_Choices): If the subtype of the
1091 expression has a non-static predicate, the case alternatives
1092 must cover the base type.
1094 2012-05-15 Tristan Gingold <gingold@adacore.com>
1096 * a-calend-vms.ads: Add pragma export to Split and Time_Of.
1097 Merge comments from a-calend.ads to minimize differences.
1099 2012-05-15 Sergey Rybin <rybin@adacore.com frybin>
1101 * gnat_ugn.texi: gnatmetric: add a small example that demonstrates
1102 the difference between control coupling and unit coupling.
1104 2012-05-15 Tristan Gingold <gingold@adacore.com>
1106 * bindgen.adb (Gen_Header): Remove code to emit LE_Set.
1107 (Gen_Finalize_Library): Replace test with
1108 a call to __gnat_reraise_library_exception_if_any.
1109 * s-soflin.ads (Library_Exception): Do not export.
1110 (Library_Exception_Set): Likewise.
1111 * a-except-2005.ads, a-except-2005.adb
1112 (Reraise_Library_Exception_If_Any): New procedure.
1114 2012-05-15 Geert Bosch <bosch@adacore.com>
1116 * sem_ch9.adb (Allows_Lock_Free_Implementation): out or in out
1117 parameters can be access types as well, not just scalar types,
1118 so relax the test to Is_Elementary_Type.
1120 2012-05-15 Bob Duff <duff@adacore.com>
1122 * s-atacco.ads s-atacco.adb: Replace pragma Elaborate_Body
1123 with pragma No_Body.
1124 (Xyz): Remove Xyz, which is apparently unnecessary.
1126 2012-05-15 Tristan Gingold <gingold@adacore.com>
1128 * a-calend-vms.adb: Complete previous change.
1130 2012-05-15 Bob Duff <duff@adacore.com>
1132 * s-win32.ads: Minor comment fix.
1133 * s-osprim-mingw.adb: Minor editing.
1135 2012-05-15 Robert Dewar <dewar@adacore.com>
1137 * exp_ch9.adb, sem_ch9.adb, sem_ch13.adb: Minor reformatting.
1139 2012-05-15 Robert Dewar <dewar@adacore.com>
1141 * g-comlin.adb, g-comlin.ads: Minor reformatting.
1143 2012-05-15 Vincent Pucci <pucci@adacore.com>
1145 * aspects.adb, aspects.adb: Reordering of the Aspect_Idi list. New
1146 aspect Aspect_Lock_Free.
1147 * einfo.adb, einfo.ads: New flag Uses_Lock_Free (flag 188).
1148 (Set_Uses_Lock_Free): New routine.
1149 (Uses_Lock_Free): New routine.
1150 * exp_ch7.adb (Is_Simple_Protected_Type): Return False for
1151 lock-free implementation.
1152 * exp_ch9.adb (Allows_Lock_Free_Implementation): Moved to Sem_Ch9.
1153 (Build_Lock_Free_Unprotected_Subprogram_Body): Protected
1154 procedure uses __sync_synchronise. Check both Object_Size
1156 (Expand_N_Protected_Body): Lock_Free_Active
1157 renames Lock_Free_On.
1158 (Expand_N_Protected_Type_Declaration):
1159 _Object field removed for lock-free implementation.
1160 (Install_Private_Data_Declarations): Protection object removed
1161 for lock-free implementation.
1162 (Make_Initialize_Protection):
1163 Protection object initialization removed for lock-free implementation.
1164 * rtsfind.ads: RE_Atomic_Synchronize and RE_Relaxed added.
1165 * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect_Lock_Free
1167 * sem_ch9.adb (Allows_Lock_Free_Implementation): New routine.
1168 (Analyze_Protected_Body): Allows_Lock_Free_Implementation call added.
1169 (Analyze_Protected_Type_Declaration):
1170 Allows_Lock_Free_Implementation call added.
1171 (Analyze_Single_Protected_Declaration): Second analysis of
1173 * s-atopri.ads: Header added.
1174 (Atomic_Synchronize): New routine.
1176 2012-05-15 Robert Dewar <dewar@adacore.com>
1178 * exp_ch7.ads: Add comment.
1180 2012-05-15 Hristian Kirtchev <kirtchev@adacore.com>
1182 * a-calend.adb (Day_Of_Week): The routine once again treats
1183 all dates as historic. (Formatting_Operations.Split): All
1184 calls to UTC_Time_Offset are now controlled through formal
1185 parameter Is_Historic. (Formatting_Operations.Time_Of):
1186 All calls to UTC_Time_Offset are now handled through
1187 formal parameter Is_Historic.
1188 (Split): Update the call to Formatting_Operations.Split.
1189 (Time_Of): Update the call to Formatting_Operations.Time_Of.
1190 (To_Ada_Time): Update the call to Formatting_Operations.Time_Of.
1191 (To_Strict_Tm): Update the call to Formatting_Operations.Split.
1192 * a-calend.ads (Split): Add new formal Is_Historic along with
1193 comment on usage. This routine is now exported for the purposes
1194 of GNAT.Calendar.Locale.
1195 (Time_Of): Remove defaults. Add new
1196 formal Is_Historic along with comment on usage. This routine is
1197 now exported for the purposes of GNAT.Calendar.Locale.
1198 * a-calend-vms.adb (Split): Update the call to
1199 Formatting_Operations.Split.
1200 (Time_Of): Update the call to Formatting_Operations.Time_Of.
1201 * a-calend-vms.ads (Split): Add new formal Is_Historic along
1202 with comment on usage. (Time_Of): Remove defaults. Add new
1203 formal Is_Historic along with comment on usage.
1204 * a-calfor.adb (Split): Update the call to
1205 Formatting_Operations.Split.
1206 (Time_Of): Update the call to Formatting_Operations.Time_Of.
1208 2012-05-15 Vincent Celier <celier@adacore.com>
1210 * prj-nmsc.adb (Add_Source): Always add the source if it is
1211 excluded, to avoid incorrect duplicate checks.
1213 2012-05-15 Yannick Moy <moy@adacore.com>
1215 * sem_aux.ads: Correct typo.
1216 * sem_eval.adb (Compile_Time_Known_Value): Return False in Alfa
1217 mode for a deferred constant when outside of the scope of its
1220 2012-05-15 Emmanuel Briot <briot@adacore.com>
1222 * g-comlin.adb, g-comlin.ads (Define_Switch): Allow specifying the name
1223 of the argument, for the automatic help message.
1224 (Getopt): do not systematically initialize switches with string values
1225 to the empty string, when the user has already specified a default.
1227 2012-05-14 Bernd Schmidt <bernds@codesourcery.com>
1229 * gcc-interface/utils.c (DEF_ATTR_STRING): New.
1231 2012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
1234 * gcc-interface/misc.c: Include opts.h and options.h before tm.h.
1235 (gnat_handle_option): Call lang-specific generated function.
1237 2012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
1239 * gcc-interface/lang.opt (I): Comment out help text with no effect.
1240 (nostdinc): Comment out help text with no effect.
1242 2012-05-12 Eric Botcazou <ebotcazou@adacore.com>
1244 * gcc-interface/Makefile.in (TOOLS_LIBS): Add ../../ggc-none.o.
1246 2012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
1249 * gcc-interface/misc.c (gnat_parse_file): Move before ...
1250 (gnat_handle_option): ... this. Use handle_generated_option.
1252 2012-05-10 Richard Guenther <rguenther@suse.de>
1254 * gcc-interface/cuintp.c (UI_From_gnu): Remove TYPE_IS_SIZETYPE use.
1256 2012-05-06 Tristan Gingold <gingold@adacore.com>
1258 * gcc-interface/trans.c (gigi): Decorate reraise_zcx_decl.
1260 2012-05-06 Eric Botcazou <ebotcazou@adacore.com>
1262 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: In the renaming
1263 case, use the padded type if the renamed object has an unconstrained
1264 type with default discriminant.
1266 2012-05-06 Eric Botcazou <ebotcazou@adacore.com>
1268 * gcc-interface/trans.c (Loop_Statement_to_gnu): Also handle invariant
1269 conditions with only one bound.
1270 (Raise_Error_to_gnu): Likewise. New function extracted from...
1271 (gnat_to_gnu) <N_Raise_Constraint_Error>: ...here. Call above function
1272 in regular mode only.
1274 2012-05-06 Eric Botcazou <ebotcazou@adacore.com>
1276 * gcc-interface/misc.c (gnat_post_options): Disable caret by default.
1278 2012-05-06 Eric Botcazou <ebotcazou@adacore.com>
1280 * gcc-interface/gigi.h (make_packable_type): Declare.
1281 (make_type_from_size): Likewise.
1282 (relate_alias_sets): Likewise.
1283 (maybe_pad_type): Adjust.
1284 (init_gnat_to_gnu): Delete.
1285 (destroy_gnat_to_gnu): Likewise.
1286 (init_dummy_type): Likewise.
1287 (destroy_dummy_type): Likewise.
1288 (init_gnat_utils): Declare.
1289 (destroy_gnat_utils): Likewise.
1290 (ceil_pow2): New inline function.
1291 * gcc-interface/decl.c (gnat_to_gnu_entity): Use ceil_pow2.
1292 <object>: Pass True for the final processing of alignment and size.
1293 <E_Subprogram_Type>: Only create the TYPE_DECL for a padded return
1295 (round_up_to_align): Delete.
1296 (ceil_alignment): Likewise.
1297 (relate_alias_sets): Move to...
1298 (make_aligning_type): Likewise.
1299 (make_packable_type): Likewise.
1300 (maybe_pad_type): Likewise.
1301 (make_type_from_size): Likewise.
1302 * gcc-interface/utils.c (MAX_BITS_PER_WORD): Delete.
1303 (struct pad_type_hash): New type.
1304 (pad_type_hash_table): New static variable.
1305 (init_gnat_to_gnu): Merge into...
1306 (init_dummy_type): Likewise.
1307 (init_gnat_utils): ...this. New function.
1308 (destroy_gnat_to_gnu): Merge into...
1309 (destroy_dummy_type): Likewise.
1310 (destroy_gnat_utils): ...this. New function.
1311 (pad_type_hash_marked_p): New function.
1312 (pad_type_hash_hash): Likewise.
1313 (pad_type_hash_eq): Likewise.
1314 (relate_alias_sets): ...here.
1315 (make_aligning_type): Likewise.
1316 (make_packable_type): Likewise.
1317 (maybe_pad_type): Likewise. Change same_rm_size parameter into
1318 set_rm_size; do not set TYPE_ADA_SIZE if it is false. Do not set
1319 null as Ada size. Do not set TYPE_VOLATILE on the padded type. If it
1320 is complete and has constant size, canonicalize it. Bail out earlier
1321 if a warning need not be issued.
1322 (make_type_from_size): Likewise.
1323 <INTEGER_TYPE>: Bail out if size is too large
1324 (gnat_types_compatible_p): Do not deal with padded types.
1325 (convert): Compare main variants for padded types.
1326 * gcc-interface/trans.c (gigi): Call {init|destroy}_gnat_utils.
1327 (gnat_to_gnu): Do not convert at the end for a call to a function that
1328 returns an unconstrained type with default discriminant.
1329 (Attribute_to_gnu) <Attr_Size>: Simplify handling of padded objects.
1330 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Likewise.
1331 Do not use the padded type if it is BLKmode and the inner type is
1334 2012-05-02 Pascal Obry <obry@adacore.com>
1337 2012-02-24 Dave Korn <dave.korn.cygwin@gmail.com>
1339 * gcc-interface/Makefile.in (WIN_SO_PREFIX [windows targets]): New
1340 Windows-specific make variable.
1341 (WIN_SO_INSTALL_DIR [windows targets]): Likewise.
1342 (install-gnatlib): Respect the above during installation when set,
1343 and also install any windows import library that has been built.
1344 (gnatlib-shared-win32): Use WIN_SO_PREFIX to name output DLL and also
1345 build a corresponding import library.
1347 2012-04-30 Jan Hubicka <jh@suse.cz>
1349 * gcc-interface/utils.c (rest_of_subprog_body_compilation): Update
1351 (gnat_write_global_declarations): Use finalize_compilation_unit.
1353 2012-04-30 Eric Botcazou <ebotcazou@adacore.com>
1355 * gcc-interface/decl.c (gnat_to_gnu_entity): In type annotation mode,
1356 do not adjust the size of a tagged type if there is a representation
1357 clause on it. Otherwise, round the adjustment up to the alignment
1358 of the first field and use the appropriate helper routine.
1359 (maybe_pad_type): Do not warn in type annotation mode on a tagged type.
1360 (gnat_to_gnu_field): Do not error out under the same circumstances.
1361 (annotate_rep): In type annotation mode, do not adjust the offset of
1362 components of a tagged type with representation clause. Otherwise,
1363 round the adjustment up to the alignment of the first field.
1365 2012-04-30 Eric Botcazou <ebotcazou@adacore.com>
1367 * gcc-interface/utils.c (finish_record_type): Force the traditional GCC
1368 layout for bitfields on the type if it is packed or has a representation
1369 clause and an alternate layout is available.
1371 2012-04-30 Eric Botcazou <ebotcazou@adacore.com>
1373 * gcc-interface/gigi.h (mark_out_of_scope): Delete.
1374 (destroy_gnat_to_gnu): Declare.
1375 (destroy_dummy_type): Likewise.
1376 * gcc-interface/decl.c (mark_out_of_scope): Delete.
1377 * gcc-interface/utils.c (destroy_gnat_to_gnu): New function.
1378 (destroy_dummy_type): Likewise.
1379 * gcc-interface/trans.c (gnat_validate_uc_list): New variable.
1380 (gigi): Call validate_unchecked_conversion on gnat_validate_uc_list
1381 after the translation is completed. Call destroy_gnat_to_gnu and
1382 destroy_dummy_type at the end.
1383 (Subprogram_Body_to_gnu): Do not call mark_out_of_scope.
1384 (gnat_to_gnu) <N_Block_Statement>: Likewise.
1385 <N_Validate_Unchecked_Conversion>: Do not process the node, only push
1386 it onto gnat_validate_uc_list.
1387 (validate_unchecked_conversion): New function.
1389 2012-04-26 Tristan Gingold <gingold@adacore.com>
1391 * gcc-interface/Make-lang.in: Update dependencies.
1392 Remove s-traceb and tracebak objects from gnat1 and gnatbind (not used).
1393 Remove s-tasdeb and s-vaflop rules (not used).
1395 2012-04-26 Olivier Hainque <hainque@adacore.com>
1397 * gcc-interface/targtyps.c (WIDEST_HARDWARE_FP_SIZE): Default to
1398 DOUBLE_TYPE_SIZE instead of LONG_DOUBLE_TYPE_SIZE.
1400 2012-04-26 Hristian Kirtchev <kirtchev@adacore.com>
1402 * a-calend.adb (Day_Of_Week): Keep the internal
1403 usage of UTC_Time_Offset consistent with Time_Of and Split.
1405 2012-04-26 Hristian Kirtchev <kirtchev@adacore.com>
1407 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Do not freeze
1408 the loop variable while preanalyzing a quantified expression.
1410 2012-04-26 Hristian Kirtchev <kirtchev@adacore.com>
1412 * a-calend.adb (Split, Time_Of): Rename parameter Is_Ada_05
1413 to Use_TZ to better illustrate its function. Update all
1414 references to the parameter.
1415 (To_Ada_Time): Update the call to Formatting_Operations.Time_Of.
1416 * a-calend.ads (Split, Time_Of): Rename parameter Is_Ada_05
1417 to Use_TZ to better illustrate its function. Update the related
1419 * a-calend-vms.adb (Split, Time_Of): Rename parameter
1420 Is_Ada_05 to Use_TZ to better illustrate its function. Update
1421 all references to the parameter.
1422 (To_Ada_Time): Update the call to Formatting_Operations.Time_Of.
1423 * a-calend-vms.ads (Split, Time_Of): Rename parameter Is_Ada_05
1424 to Use_TZ to better illustrate its function. Update the related
1426 * a-calfor.adb (Split, Time_Of): Update the call to
1427 Formatting_Operations.Time_Of.
1428 * sysdep.c (__gnat_localtime_tzoff): Dereference pointer
1429 "is_historic" and rewrite the check as a comparison. Add a
1430 comment on flag values.
1432 2012-04-26 Robert Dewar <dewar@adacore.com>
1434 * exp_ch2.adb, sem_ch8.adb: Minor reformatting.
1436 2012-04-26 Vasiliy Fofanov <fofanov@adacore.com>
1438 * a-stzunb-shared.adb, gnat_ugn.texi, a-strunb-shared.adb,
1439 a-strunb-shared.ads, uintp.adb, a-stwiun-shared.adb,
1440 a-stwiun-shared.ads, a-cbhama.ads, vms_data.ads, a-cobove.adb,
1441 a-convec.adb, sem_ch13.adb, a-cbhase.ads: Fix common misuses of the
1442 word "then" where "than" should be used in English.
1444 2012-04-26 Robert Dewar <dewar@adacore.com>
1446 * sem_ch5.adb (Check_Unreachable_Code): Skip past pragmas.
1448 2012-04-26 Hristian Kirtchev <kirtchev@adacore.com>
1450 * s-finroo.ads: Remove with clause for
1451 Ada.Streams. Type Root_Controlled is now abstract tagged null
1452 record. Remove internal package Stream_Attributes. Root_Controlled
1453 doesn't need stream attribute redeclaration and avoids the
1454 dependency on streams.
1456 2012-04-26 Tristan Gingold <gingold@adacore.com>
1458 * adaint.c (to_host_path_spec): Removed (unused).
1461 2012-04-26 Steve Baird <baird@adacore.com>
1463 * gnat_rm.texi Improve description of Valid_Scalars attribute.
1465 2012-04-26 Ed Schonberg <schonberg@adacore.com>
1467 * sem_ch6.adb (Can_Override_Operator): If the formal is a
1468 generic type the operator cannot be overriding.
1470 2012-04-26 Ed Schonberg <schonberg@adacore.com>
1472 * sem_ch8.adb (Spec_Reloaded_For_Body): Check whether the type
1473 is declared in a package specification, and current unit is the
1474 corresponding package body. The use clauses themselves may be
1475 within a nested package.
1477 2012-04-26 Bob Duff <duff@adacore.com>
1479 * exp_ch2.adb (Param_Entity): Take into account the case where
1480 the type of the entry parameter has a representation clause.
1482 2012-04-26 Ed Schonberg <schonberg@adacore.com>
1484 * gnat_ugn.texi: Tweak dimensionality doc.
1486 2012-04-26 Robert Dewar <dewar@adacore.com>
1488 * sem_eval.adb: Minor reformatting.
1490 2012-04-26 Robert Dewar <dewar@adacore.com>
1492 * einfo.adb, einfo.ads, sem_res.adb, sem_ch4.adb,
1493 sem_eval.adb: Minor reformatting.
1495 2012-04-26 Thomas Quinot <quinot@adacore.com>
1497 * freeze.adb: Minor change in error wording.
1499 2012-04-26 Ed Schonberg <schonberg@adacore.com>
1501 * gnat_ugn.texi: Documentation on dimensional analysis.
1503 2012-04-26 Hristian Kirtchev <kirtchev@adacore.com>
1505 * einfo.adb, einfo.ads: Remove synthesized attribute
1506 Proper_First_Index along with its associations in various nodes.
1507 (Proper_First_Index): Removed.
1508 * sem_ch4.adb (Analyze_Slice): Alphabetize constants. Add new
1509 local variable Index_Type. The index type of a string literal
1510 subtype is that of the stored low bound.
1511 * sem_eval (Get_Static_Length): Remove the use of Proper_First_Index.
1512 * sem_res.adb (Resolve_Slice): Alphabetize constants. Add
1513 new local variable Index_Type. The index type of a
1514 string literal subtype is that of the stored low bound.
1515 (Set_String_Literal_Subtype): Code reformatting.
1517 2012-04-26 Robert Dewar <dewar@adacore.com>
1519 * exp_aggr.adb: Minor reformatting.
1521 2012-04-26 Hristian Kirtchev <kirtchev@adacore.com>
1523 * exp_ch7.adb (Expand_Cleanup_Actions): Update the call to
1524 Requires_Cleanup_Actions.
1525 * exp_util.adb (Requires_Cleanup_Actions (List_Id; Boolean;
1526 Boolean)): Rename formal parameter For_Package to Lib_Level to
1527 better reflect its purpose. Update the related comment and all
1528 occurrences of For_Package in the body.
1529 (Requires_Cleanup_Actions
1530 (Node_Id; Boolean)): Add new formal parameter Lib_Level. Add
1531 local constant At_Lib_Level to keep monitor whether the path
1532 taken from the top-most context to the current construct involves
1533 package constructs. Update all calls to Requires_Cleanup_Actions.
1534 * exp_util.ads (Requires_Cleanup_Actions): Add new formal
1535 parameter Lib_Level and associated comment.
1537 2012-04-26 Ed Schonberg <schonberg@adacore.com>
1539 * sem_ch6.adb (Process_Formals): If the type of the formal is
1540 a non null access type, mark the generated subtype as having a
1541 delayed freeze only if the designated type is not frozen yet.
1543 2012-04-26 Vincent Celier <celier@adacore.com>
1545 * prj-attr.adb: New package Clean with attributes
1546 Object_Artifact_Extensions and Source_Artifact_Extensions.
1547 * prj-nmsc.adb (Process_Clean): Process new package Clean
1548 * prj.ads (Language_Config): New components
1549 Clean_Object_Artifacts and Clean_Source_Artifacts.
1550 * snames.ads-tmpl: New standard names Clean,
1551 Object_Artifact_Extensions and Source_Artifact_Extensions.
1553 2012-04-26 Hristian Kirtchev <kirtchev@adacore.com>
1555 * einfo.adb (Proper_First_Index): Moved from Sem_Util.
1556 * einfo.ads: Add new synthesized attribute Proper_First_Index
1557 along with usage in nodes.
1558 (Proper_First_Index): Moved from Sem_Util.
1559 * sem_util.ads, sem_util.adb (Proper_First_Index): Moved to Einfo.
1561 2012-04-26 Gary Dismukes <dismukes@adacore.com>
1563 * layout.adb (Layout_Component_List): Test for the case of a
1564 single variant and the size of its component list was computed
1565 as an integer literal, and use that size (which is in bits)
1566 as is rather than converting to storage units.
1568 2012-04-26 Robert Dewar <dewar@adacore.com>
1570 * exp_aggr.adb: Minor reformatting.
1572 2012-04-26 Robert Dewar <dewar@adacore.com>
1574 * sem_util.adb: Minor reformatting.
1576 2012-04-26 Thomas Quinot <quinot@adacore.com>
1578 * exp_aggr.adb, exp_pakd.adb (Setup_Inline_Packed_Array_Reference,
1579 Packed_Array_Aggregate_Handled.Get_Component_Val):
1580 Reverse bit numbering within PAT when Reverse_Storage_Order
1581 applies to the enclosing record.
1583 2012-04-26 Thomas Quinot <quinot@adacore.com>
1585 * freeze.adb (Freeze_Record_Type): Improve error message for
1586 Scalar_Storage_Order inconsistent with Bit_Order.
1588 2012-04-25 Gary Dismukes <dismukes@adacore.com>
1590 * exp_ch9.adb: Add comments on the usage of the
1591 lock-free data structures.
1593 2012-04-25 Vincent Pucci <pucci@adacore.com>
1595 * exp_intr.adb (Expand_Shift): Convert the left
1596 operand and the operator when the type of the call differs from
1597 the type of the operator.
1599 2012-04-25 Geert Bosch <bosch@adacore.com>
1601 * stand.ads: Minor comment fix.
1603 2012-04-25 Hristian Kirtchev <kirtchev@adacore.com>
1605 * sem_ch4.adb (Analyze_Slice): Handle the case where the prefix
1606 is a string literal. Retrieve the first index from the base type
1607 when slicing a string literal.
1608 * sem_ch12.adb (Check_Private_View): Move the initialization
1609 of the type inside the loop to reflect the changing index.
1610 * sem_eval.adb (Eval_Relational_Op): Retrieve the first index
1611 from the base type when dealing with a string literal.
1612 * sem_res.adb (Resolve_Slice): Retrieve the first index from
1613 the base type when slicing a string literal.
1614 * sem_util.adb (Is_Internally_Generated_Renaming): New routine.
1615 (Is_Object_Reference): String literals may act
1616 as object references only when they are renamed internally.
1617 (Proper_First_Index): New routine.
1618 * sem_util.ads (Proper_First_Index): New routine.
1620 2012-04-25 Robert Dewar <dewar@adacore.com>
1622 * sem_ch3.adb, csinfo.adb, lib-writ.adb, sem_ch12.adb,
1623 lib-xref.adb: Minor reformatting.
1625 2012-04-25 Hristian Kirtchev <kirtchev@adacore.com>
1627 * exp_ch9.adb: Rename Lock_Free_Sub_Type
1628 to Lock_Free_Subprogram. Remove type Subprogram_Id.
1629 Rename LF_Sub_Table to Lock_Free_Subprogram_Table.
1630 (Allow_Lock_Free_Implementation): Renamed to
1631 Allows_Lock_Free_Implementation. Update the comment on
1632 lock-free restrictions. Code clean up and restructuring.
1633 (Build_Lock_Free_Protected_Subprogram_Body): Update the
1634 profile and related comments. Code clean up and restructuring.
1635 (Build_Lock_Free_Unprotected_Subprogram_Body): Update the
1636 profile and related comments. Code clean up and restructuring.
1639 2012-04-25 Vincent Celier <celier@adacore.com>
1641 * sem_ch12.adb (Inherit_Context): Compare library units, not
1642 names of units, when checking if a unit is already in the context.
1644 2012-04-25 Thomas Quinot <quinot@adacore.com>
1646 * sem_ch3.adb: Reverse_Storage_Order must be propagated to
1647 untagged derived record types.
1649 2012-04-25 Ed Schonberg <schonberg@adacore.com>
1651 * lib-xref.adb: Adjust position of end label.
1653 2012-04-22 Jan Hubicka <jh@suse.cz>
1655 * gcc-interface/utils.c (gnat_write_global_declarations): Do not mark
1658 2012-04-20 Jan Hubicka <jh@suse.cz>
1660 * gcc-interface/utils.c (gnat_write_global_declarations): Update for new
1661 force_output placement.
1663 2012-04-14 Jan Hubicka <jh@suse.cz>
1665 * gcc-interface/trans.c (finalize_nrv): Update field referenced for new
1666 cgraph/varpool layout.
1668 2012-04-09 Mike Stump <mikestump@comcast.net>
1670 * a-assert.ads: Remove execute permission.
1671 * a-chacon.ads: Likewise.
1672 * a-coteio.ads: Likewise.
1673 * a-envvar.ads: Likewise.
1674 * a-exetim-mingw.ads: Likewise.
1675 * a-fzteio.ads: Likewise.
1676 * a-izteio.ads: Likewise.
1677 * a-lcteio.ads: Likewise.
1678 * a-llctio.ads: Likewise.
1679 * a-scteio.ads: Likewise.
1680 * a-suenco.ads: Likewise.
1681 * a-suenst.ads: Likewise.
1682 * a-suewst.ads: Likewise.
1683 * a-suezst.ads: Likewise.
1684 * a-tirsfi.ads: Likewise.
1685 * a-wichha.ads: Likewise.
1686 * a-zchara.ads: Likewise.
1687 * a-zchhan.ads: Likewise.
1688 * a-zchuni.ads: Likewise.
1689 * a-zrstfi.ads: Likewise.
1690 * aspects.ads: Likewise.
1691 * g-byorma.ads: Likewise.
1692 * g-decstr.ads: Likewise.
1693 * g-encstr.ads: Likewise.
1694 * g-spchge.ads: Likewise.
1695 * g-u3spch.ads: Likewise.
1696 * g-wispch.ads: Likewise.
1697 * g-zspche.ads: Likewise.
1698 * namet-sp.ads: Likewise.
1699 * s-os_lib.ads: Likewise.
1700 * s-regexp.ads: Likewise.
1701 * s-regpat.ads: Likewise.
1702 * s-string.ads: Likewise.
1703 * s-tasloc.ads: Likewise.
1704 * s-utf_32.ads: Likewise.
1705 * sem_aux.ads: Likewise.
1706 * a-assert.adb: Likewise.
1707 * a-chacon.adb: Likewise.
1708 * a-envvar.adb: Likewise.
1709 * a-exetim-mingw.adb: Likewise.
1710 * a-suenco.adb: Likewise.
1711 * a-suenst.adb: Likewise.
1712 * a-suewst.adb: Likewise.
1713 * a-suezst.adb: Likewise.
1714 * a-tirsfi.adb: Likewise.
1715 * a-wichha.adb: Likewise.
1716 * a-zchhan.adb: Likewise.
1717 * a-zchuni.adb: Likewise.
1718 * a-zrstfi.adb: Likewise.
1719 * aspects.adb: Likewise.
1720 * g-byorma.adb: Likewise.
1721 * g-decstr.adb: Likewise.
1722 * g-encstr.adb: Likewise.
1723 * g-spchge.adb: Likewise.
1724 * g-u3spch.adb: Likewise.
1725 * g-wispch.adb: Likewise.
1726 * g-zspche.adb: Likewise.
1727 * namet-sp.adb: Likewise.
1728 * s-except.adb: Likewise.
1729 * s-inmaop-vxworks.adb: Likewise.
1730 * s-os_lib.adb: Likewise.
1731 * s-regexp.adb: Likewise.
1732 * s-regpat.adb: Likewise.
1733 * s-string.adb: Likewise.
1734 * s-tasloc.adb: Likewise.
1735 * s-utf_32.adb: Likewise.
1736 * s-wchcon.adb: Likewise.
1737 * sem_aux.adb: Likewise.
1739 2012-04-02 Robert Dewar <dewar@adacore.com>
1741 * s-atopri.ads: Minor reformatting.
1743 2012-04-02 Thomas Quinot <quinot@adacore.com>
1745 * sem_util.adb: Minor reformatting, minor code cleanup.
1747 2012-04-02 Ed Schonberg <schonberg@adacore.com>
1749 * lib-xref.adb (Generate_Reference): For a reference to an
1750 operator symbol, set the sloc to point to the first character
1751 of the operator name, and not to the initial quaote.
1752 (Output_References): Ditto for the definition of an operator
1755 2012-04-02 Vincent Celier <celier@adacore.com>
1757 * ali.adb (Scan_Ali): Recognize Z lines. Set
1758 Implicit_With_From_Instantiation to True in the With_Record for
1760 * ali.ads (With_Record): New Boolean component
1761 Implicit_With_From_Instantiation, defaulted to False.
1762 * csinfo.adb: Indicate that Implicit_With_From_Instantiation
1764 * lib-writ.adb (Write_ALI): New array Implicit_With.
1765 (Collect_Withs): Set Implicit_With for the unit is it is not Yes.
1766 (Write_With_Lines): Write a Z line instead of a W line if
1767 Implicit_With is Yes for the unit.
1768 * sem_ch12.adb (Inherit_Context): Only add a unit in the context
1769 if it is not there yet.
1770 * sinfo.ads: New flag Implicit_With_From_Instantiation (Flag12)
1773 2012-04-02 Yannick Moy <moy@adacore.com>
1775 * osint.adb, osint.ads (Add_Default_Search_Dirs): Add library
1776 search dirs in file specified with option -gnateO.
1778 2012-04-02 Robert Dewar <dewar@adacore.com>
1780 * sem_ch5.adb, exp_util.adb, sem_util.adb, exp_ch4.adb: Minor
1783 2012-04-02 Olivier Hainque <hainque@adacore.com>
1785 * g-sse.ads: Add x86-solaris and x86_64-darwin to the set of
1786 platforms where the use of this spec is supported. Add current
1787 year to the copyright notice.
1788 * gcc-interfaces/Makefile.in: Add g-sse.o and g-ssvety.o to
1789 EXTRA_GNATRTL_NONTASKING_OBJS on x86 32/64 targets that support
1790 it and where they were missing (x86-solaris, x86-freebsd,
1791 x86_64-freebsd, and x86-darwin).
1793 2012-04-02 Gary Dismukes <dismukes@adacore.com>
1795 * bindgen.adb (Gen_Ada_Init): When compiling for the AAMP small
1796 library, where we no longer suppress the Standard_Library,
1797 generate an empty body rather than the usual generation of
1798 assignments to imported globals, since those aren't present in
1801 2012-04-02 Ed Schonberg <schonberg@adacore.com>
1803 * sinfo.ads: Minor documentation fix.
1805 2012-04-02 Hristian Kirtchev <kirtchev@adacore.com>
1807 * sem_res.adb (Resolve_Conditional_Expression): Add local variables
1808 Else_Typ and Then_Typ. Add missing type conversions to the "then" and
1809 "else" expressions when their respective types are scalar.
1811 2012-04-02 Vincent Pucci <pucci@adacore.com>
1813 * exp_ch9.adb: Reordering of the local subprograms. New Table
1814 for the lock free implementation that maps each protected
1815 subprograms with the protected component it references.
1816 (Allow_Lock_Free_Implementation): New routine. Check if
1817 the protected body enables the lock free implementation.
1818 (Build_Lock_Free_Protected_Subprogram_Body): New routine.
1819 (Build_Lock_Free_Unprotected_Subprogram_Body): New routine.
1820 (Comp_Of): New routine.
1821 * Makefile.rtl: Add s-atopri.o
1822 * debug.adb: New compiler debug flag -gnatd9 for lock free
1824 * rtsfind.ads: RE_Atomic_Compare_Exchange_8,
1825 RE_Atomic_Compare_Exchange_16, RE_Atomic_Compare_Exchange_32,
1826 RE_Atomic_Compare_Exchange_64, RE_Atomic_Load_8,
1827 RE_Atomic_Load_16, RE_Atomic_Load_32, RE_Atomic_Load_64, RE_Uint8,
1828 RE_Uint16, RE_Uint32, RE_Uint64 added.
1829 * s-atropi.ads: New file. Defines atomic primitives used
1830 by the lock free implementation.
1832 2012-04-02 Emmanuel Briot <briot@adacore.com>
1834 * g-expect.adb (Expect_Internal): Fix leak of the input file descriptor.
1836 2012-04-02 Hristian Kirtchev <kirtchev@adacore.com>
1838 * exp_ch4.adb (Expand_N_Quantified_Expression): Reimplemented.
1839 The expansion no longer uses the copy of the original QE created
1841 * sem.adb (Analyze): Add processing for loop parameter specifications.
1842 * sem_ch4.adb (Analyze_Quantified_Expression): Reimplemented. The
1843 routine no longer creates a copy of the original QE. All
1844 constituents of a QE are now preanalyzed and resolved.
1845 * sem_ch5.adb (Analyze_Iteration_Scheme): Remove the guard which
1846 bypasses all processing when the iteration scheme is related to a
1847 QE. Relovate the code which analyzes loop parameter specifications
1848 to a separate routine. (Analyze_Iterator_Specification):
1849 Preanalyze the iterator name. This action was originally
1850 done in Analyze_Iteration_Scheme. Update the check which
1851 detects an iterator specification in the context of a QE.
1852 (Analyze_Loop_Parameter_Specification): New routine. This
1853 procedure allows for a stand-alone analysis of a loop parameter
1854 specification without the need of a parent iteration scheme. Add
1855 code to update the type of the loop variable when the range
1856 generates an itype and the context is a QE.
1857 (Pre_Analyze_Range): Renamed to Preanalyze_Range. Update all references
1859 * sem_ch5.ads: Code reformatting.
1860 (Analyze_Loop_Parameter_Specification): New routine.
1861 * sem_ch6.adb (Fully_Conformant_Expressions): Detect a case
1862 when establishing conformance between two QEs utilizing different
1864 * sem_res.adb (Proper_Current_Scope): New routine.
1865 (Resolve): Do not resolve a QE as there is nothing to be done now.
1866 Ignore any loop scopes generated for QEs when detecting an expression
1867 function as the scopes are cosmetic and do not appear in the tree.
1868 (Resolve_Quantified_Expression): Removed. All resolution of
1869 QE constituents is now performed during analysis. This ensures
1870 that loop variables appearing in array aggregates are properly
1873 2012-04-02 Ed Schonberg <schonberg@adacore.com>
1875 * sem_util.adb (Build_Default_Subtype): If the base type is
1876 private and its full view is available, use the full view in
1877 the subtype declaration.
1879 2012-04-02 Jose Ruiz <ruiz@adacore.com>
1881 * gnat_ugn.texi: Add some minimal documentation about how to
1882 use GNATtest for cross platforms.
1884 2012-04-02 Vincent Celier <celier@adacore.com>
1886 * opt.ads (Object_Path_File_Name): New variable.
1887 * prj-attr.adb: New Compiler attribute Object_Path_Switches.
1888 * prj-nmsc.adb (Process_Compiler): Recognize new attribute
1889 Object_Path_Switches.
1890 * snames.ads-tmpl: New standard name Object_Path_Switches.
1891 * switch-c.adb (Scan_Front_End_Switches): Recognize new switch
1892 -gnateO= and put its value in Opt.Object_Path_File_Name.
1894 2012-04-02 Hristian Kirtchev <kirtchev@adacore.com>
1896 * exp_ch7.adb (Process_Declarations): Detect a case where
1897 a source object was initialized by another source object,
1898 but the expression was rewritten as a class-wide conversion
1899 of Ada.Tags.Displace.
1900 * exp_util.adb (Initialized_By_Ctrl_Function): Removed.
1901 (Is_Controlled_Function_Call): New routine.
1902 (Is_Displacement_Of_Ctrl_Function_Result): Removed.
1903 (Is_Displacement_Of_Object_Or_Function_Result): New routine.
1904 (Is_Source_Object): New routine.
1905 (Requires_Cleanup_Actions): Detect a case where a source object was
1906 initialized by another source object, but the expression was rewritten
1907 as a class-wide conversion of Ada.Tags.Displace.
1908 * exp_util.ads (Is_Displacement_Of_Ctrl_Function_Result): Removed.
1909 (Is_Displacement_Of_Object_Or_Function_Result): New routine.
1911 2012-04-02 Ed Schonberg <schonberg@adacore.com>
1913 * sem_res.adb (Resolve_Call): A call to an expression function
1914 does not freeze if it appears in a different scope from the
1915 expression function itself. Such calls appear in the generated
1916 bodies of other expression functions, or in pre/postconditions
1917 of subsequent subprograms.
1919 2012-04-02 Yannick Moy <moy@adacore.com>
1921 * lib-xref-alfa.adb: Code clean up.
1923 2012-04-02 Ed Schonberg <schonberg@adacore.com>
1925 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Do not suppress
1926 style checks, because the subprogram instance itself may contain
1927 violations of syle rules.
1928 * style.adb (Missing_Overriding): Check for missing overriding
1929 indicator on a subprogram instance.
1931 2012-04-02 Hristian Kirtchev <kirtchev@adacore.com>
1933 * sem_ch6.adb (Last_Implicit_Declaration): New routine.
1934 (Process_PPCs): Insert the body of _postconditions after the
1935 last internally generated declaration. This ensures that actual
1936 subtypes created for formal parameters are visible and properly
1937 frozen as _postconditions may reference them.
1939 2012-04-02 Robert Dewar <dewar@adacore.com>
1941 * einfo.adb (First_Component_Or_Discriminant) Now applies to
1942 all types with discriminants, not just records.
1943 * exp_attr.adb (Expand_N_Attribute): Add Scalar_Values handling
1944 for arrays, scalars and non-variant records.
1945 * sem_attr.adb (Analyze_Attribute): Handle Valid_Scalars
1946 * sem_attr.ads (Valid_Scalars): Update description
1947 * sem_util.ads, sem_util.adb (No_Scalar_Parts): New function.
1949 2012-03-31 Eric Botcazou <ebotcazou@adacore.com>
1952 2012-03-25 Eric Botcazou <ebotcazou@adacore.com>
1954 * gcc-interface/decl.c (SS_MARK_NAME): New define.
1955 (gnat_to_gnu_entity) <E_Function>: Prepend leaf attribute on entities
1956 whose name is SS_MARK_NAME.
1958 2012-03-30 Robert Dewar <dewar@adacore.com>
1960 * exp_ch5.adb, sem_util.adb, exp_ch4.adb: Minor comment updates.
1962 2012-03-30 Yannick Moy <moy@adacore.com>
1964 * lib-xref-alfa.adb (Add_Alfa_File): Treat possibly 2 units at the same
1965 time, putting all scopes in the same Alfa file.
1966 (Add_Alfa_Xrefs): Correct errors in comparison function. Correct value
1968 (Collect_Alfa): Possibly pass 2 units to Add_Alfa_File.
1970 2012-03-30 Hristian Kirtchev <kirtchev@adacore.com>
1972 * exp_util.adb (Is_Secondary_Stack_BIP_Func_Call): Handle a case where
1973 a build-in-place call appears as Prefix'Reference'Reference.
1975 2012-03-30 Yannick Moy <moy@adacore.com>
1977 * lib-xref-alfa.adb: Minor refactoring to remove internal package.
1979 2012-03-30 Hristian Kirtchev <kirtchev@adacore.com>
1981 * sem_ch5.adb (Analyze_Iteration_Scheme): Preanalyze the subtype
1982 definition of a loop when the context is a quantified expression.
1984 2012-03-30 Vincent Celier <celier@adacore.com>
1986 * prj.ads: Minor comment update.
1988 2012-03-30 Yannick Moy <moy@adacore.com>
1990 * lib-xref-alfa.adb, alloc.ads, lib-xref.ads: Minor addition of
1991 comments and refactoring.
1993 2012-03-30 Robert Dewar <dewar@adacore.com>
1995 * lib-xref.adb, lib-xref-alfa.adb: Minor reformatting & code
1998 2012-03-30 Yannick Moy <moy@adacore.com>
2000 * lib-xref-alfa.adb (Generate_Dereference): Use Get_Code_Unit
2001 instead of Get_Source_Unit to get file for reference.
2002 (Traverse_Compilation_Unit): Do not add scopes for generic units.
2003 * lib-xref.adb (Generate_Reference): Use Get_Code_Unit instead
2004 of Get_Source_Unit to get file for reference.
2005 * sem_ch12.adb (Analyze_Package_Instantiation): Enable
2006 instantiation in Alfa mode.
2008 2012-03-30 Hristian Kirtchev <kirtchev@adacore.com>
2010 * exp_ch7.adb (Process_Declarations): Replace
2011 the call to Is_Null_Access_BIP_Func_Call with
2012 Is_Secondary_Stack_BIP_Func_Call. Update the related comment.
2013 * exp_util.adb (Is_Null_Access_BIP_Func_Call): Removed.
2014 (Is_Secondary_Stack_BIP_Func_Call): New routine.
2015 (Requires_Cleanup_Actions): Replace
2016 the call to Is_Null_Access_BIP_Func_Call with
2017 Is_Secondary_Stack_BIP_Func_Call. Update the related comment.
2018 * exp_util.ads (Is_Null_Access_BIP_Func_Call): Removed.
2019 (Is_Secondary_Stack_BIP_Func_Call): New routine.
2021 2012-03-30 Yannick Moy <moy@adacore.com>
2023 * lib-xref-alfa.adb, lib-xref.adb: Code clean ups.
2025 2012-03-30 Gary Dismukes <dismukes@adacore.com>
2027 * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): For the case of a
2028 loop entity which is rewritten as a renaming
2029 of the indexed array, explicitly mark the entity as needing
2030 debug info so that Materialize entity will be set later by
2031 Debug_Renaming_Declaration when the renaming is expanded.
2033 2012-03-30 Robert Dewar <dewar@adacore.com>
2035 * sem_attr.ads: Update comment.
2037 2012-03-30 Vincent Celier <celier@adacore.com>
2039 * prj.ads: New Dependency_Kind: ALI_Closure.
2041 2012-03-30 Thomas Quinot <quinot@adacore.com>
2043 * exp_pakd.adb: Minor reformatting.
2045 2012-03-30 Yannick Moy <moy@adacore.com>
2047 * lib-xref-alfa.adb (Add_Alfa_File): Take into account possible absence
2048 of compilation unit for unit in Sdep_Table.
2050 2012-03-30 Thomas Quinot <quinot@adacore.com>
2052 * freeze.adb (Freeze_Record_Type): For a type with reversed bit
2053 order and reversed storage order, disable front-end relayout.
2055 2012-03-25 Eric Botcazou <ebotcazou@adacore.com>
2057 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Copy
2058 the TYPE_PACKED flag from the base type.
2060 2012-03-25 Eric Botcazou <ebotcazou@adacore.com>
2062 * gcc-interface/decl.c (SS_MARK_NAME): New define.
2063 (gnat_to_gnu_entity) <E_Function>: Prepend leaf attribute on entities
2064 whose name is SS_MARK_NAME.
2066 2012-03-25 Eric Botcazou <ebotcazou@adacore.com>
2068 * gcc-interface/utils.c (add_parallel_type): Take a TYPE instead of a
2069 DECL and adjust. Move around.
2070 (has_parallel_type): New predicate.
2071 (rest_of_record_type_compilation): Return early if the type already
2072 has a parallel type.
2073 * gcc-interface/gigi.h (add_parallel_type): Adjust.
2074 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust for above changes.
2076 2012-03-25 Eric Botcazou <ebotcazou@adacore.com>
2078 * gcc-interface/utils.c (finish_record_type): Return early for padded
2081 2012-03-20 Arnaud Charlet <charlet@adacore.com>
2083 * hlo.ads, hlo.adb: Removed, no longer used.
2084 * gcc-interface/Make-lang.in: Remove hlo.o. Update dependencies.
2085 * gcc-interface/Makefile.in: Remove EXTRA_LIBGNAT_SRCS (temporarly)
2086 and compute it from EXTRA_LIBGNAT_OBJS.
2087 Clean up comments, reorder LIBGNAT_SRCS and LIBGNAT_OBJS.
2089 2012-03-20 Yannick Moy <moy@adacore.com>
2091 * gnat_rm.texi, sem_attr.ads: Update documentation.
2093 2012-03-19 Yannick Moy <moy@adacore.com>
2095 * sem_ch6.adb: Minor code clean up.
2097 2012-03-19 Vincent Celier <celier@adacore.com>
2099 * make.adb (Scan_Make_Arg): Make sure all significant -m switches
2100 on the command line are counted.
2102 2012-03-19 Robert Dewar <dewar@adacore.com>
2104 * sem_elab.adb (Generate_Elab_Warnings): Fix spec, fix attribute
2107 2012-03-19 Robert Dewar <dewar@adacore.com>
2109 * par-ch4.adb (Check_Bad_Exp): New procedure
2111 2012-03-19 Robert Dewar <dewar@adacore.com>
2113 * exp_attr.adb, sem_attr.adb, sem_attr.ads, snames.ads-tmpl: Add
2114 initial framework for Valid_Scalars attribute.
2116 2012-03-19 Robert Dewar <dewar@adacore.com>
2118 * scng.adb (Scan): Recognize incorrect preprocessor directive
2120 2012-03-19 Robert Dewar <dewar@adacore.com>
2122 * atree.adb (Allocate_Initialize_Node): Use Num_Extension_Nodes
2123 * atree.ads (Num_Extension_Nodes): New variable
2124 * debug.adb: New debug flag -gnatd.N
2125 * gnat1drv.adb (Adjust_Global_Switches): Adjust
2126 Num_Extension_Nodes if -gnatd.N set
2128 2012-03-19 Eric Botcazou <ebotcazou@adacore.com>
2130 * einfo.ads: Minor update to First_Rep_Item and Has_Gigi_Rep_Item
2133 2012-03-19 Robert Dewar <dewar@adacore.com>
2135 * opt.ads: Remove HLO_Active flag.
2136 * sem.adb: Remove call of high level optimizer.
2137 * sem.ads (New_Nodes_OK): Removed.
2138 * sem_ch10.adb: Remove references to New_Nodes_OK.
2139 * switch-c.adb: Remove handling of -gnatH switch.
2141 2012-03-19 Yannick Moy <moy@adacore.com>
2143 * sem_ch6.adb (Check_Subprogram_Contract): Do not emit warnings
2144 on trivially True or False postconditions and Ensures components
2147 2012-03-19 Robert Dewar <dewar@adacore.com>
2149 * gnat_ugn.texi: Fix index entry for -gnatei (now we have
2152 2012-03-19 Hristian Kirtchev <kirtchev@adacore.com>
2154 * sem_ch3.adb (Get_Discriminant_Value): Instead of looking
2155 at the immediate correcponsing discriminant, traverse a
2156 potential chain of discriminants produced by type derivations.
2157 (Root_Corresponding_Discriminant): Traverse a chain of inherited
2158 discriminants and return the topmost discriminant.
2160 2012-03-19 Bob Duff <duff@adacore.com>
2162 * debug.adb: Minor comment change.
2163 * gnat_ugn.texi: Update documentation for elaboration regarding
2166 2012-03-19 Gary Dismukes <dismukes@adacore.com>
2168 * exp_ch3.adb (Expand_N_Object_Declaration): In
2169 the case of an object of a class-wide interface type, where the
2170 declaration is rewritten as a renaming, call Set_Debug_Info_Needed
2171 on the renaming entity so that Materialize_Entity will be
2172 set. Also, change existing call (for other than interface cases)
2173 to call Set_Debug_Info_Needed rather than Set_Needs_Debug_Info
2174 (as specified for that flag).
2176 2012-03-19 Hristian Kirtchev <kirtchev@adacore.com>
2178 * sem_ch4.adb (Analyze_Allocator): Detect an allocator generated
2179 by the build-in-place machinery where the designated type is
2180 indefinite, but the underlying type is not. Do not emit errors
2181 related to missing initialization in this case.
2183 2012-03-19 Robert Dewar <dewar@adacore.com>
2185 * gnat_ugn.texi: Add documentation for -gnateinnn switch.
2186 * sem_elab.adb, put_alfa.adb, lib-xref-alfa.adb: Minor reformatting.
2187 * sem_prag.adb: Minor comment update.
2189 2012-03-15 Robert Dewar <dewar@adacore.com>
2191 * errout.ads: Add entry for translating -gnateinn to
2192 /MAX_INSTANTIATIONS for VMS.
2193 * hostparm.ads (Max_Instantiations): Moved to Opt.
2194 * opt.ads (Maximum_Instantiations): Moved from Hostparm, and renamed.
2195 * sem_ch12.adb (Maximum_Instantiations): New name of
2196 Max_Instantiations (Analyze_Package_Instantiation): Change error
2197 msg for too many instantiations (mention -gnateinn switch).
2198 * switch-c.adb (Scan_Front_End_Switches): Implement -gnateinn switch.
2199 * switch.ads: Minor comment update.
2200 * usage.adb (Usage): Output line for -maxeinn switch.
2201 * vms_data.ads: Add entry for MAX_INSTANTIATIONS (-gnateinn).
2203 2012-03-15 Yannick Moy <moy@adacore.com>
2205 * alfa.ads Update the decription of ALI sections.
2206 (Alfa_File_Record): Add a component Unit_File_Name to store the
2207 unit file name for subunits.
2208 * get_alfa.adb, put_alfa.adb Adapt to the possible presence of
2210 * lib-xref-alfa.adb (Add_Alfa_File): For subunits, retrieve the
2211 file name of the unit.
2213 2012-03-15 Yannick Moy <moy@adacore.com>
2215 * sem_ch6.adb (Check_Subprogram_Contract): Do
2216 not issue warning on missing 'Result in postcondition if all
2217 postconditions and contract-cases already get a warning for only
2218 referring to pre-state.
2220 2012-03-15 Bob Duff <duff@adacore.com>
2222 * debug.adb: Add new debug switch -gnatd.U, which disables the
2223 support added below, in case someone trips over a cycle, and needs
2225 * sem_attr.adb (Analyze_Access_Attribute):
2226 Treat Subp'Access as a call for elaboration purposes.
2227 * sem_elab.ads, sem_elab.adb (Check_Elab_Call): Add support
2230 2012-03-15 Vincent Pucci <pucci@adacore.com>
2232 * sem.ads, sem.adb (Preanalyze): New routine.
2233 * sem_ch4.adb (Analyze_Quantified_Expression): Call to the
2234 Preanalyze routine in Sem added. Renaming of Needs_Expansion
2235 into Need_Preanalysis.
2236 * sem_ch6.adb (Preanalyze): Removed.
2238 2012-03-15 Robert Dewar <dewar@adacore.com>
2240 * sem_ch4.adb (Analyze_Quantified_Expression): Add comment.
2241 * sem_prag.adb: Minor comment additions.
2242 * sem_attr.adb (Check_First_Last_Valid): Make sure prefix type
2245 2012-03-15 Vincent Pucci <pucci@adacore.com>
2247 * sem_ch4.adb (Analyze_Quantified_Expression):
2248 Preanalyze the condition when the quantified expression will be
2251 2012-03-15 Yannick Moy <moy@adacore.com>
2253 * sem_prag.adb, sem_util.adb, sem_util.ads, sem_attr.adb, sem_ch6.adb,
2254 sem_warn.adb: Minor refactoring, renaming Case_Pragma in CTC_Pragma,
2255 to refer to both Test_Case pragma and Contract_Case pragma (same
2256 acronym as in Spec_CTC_List).
2258 2012-03-15 Robert Dewar <dewar@adacore.com>
2260 * sem_prag.adb, sem_prag.ads, sem_util.ads, sem_attr.adb, sem_ch6.adb,
2261 sem_warn.adb: Minor reformatting.
2263 2012-03-15 Hristian Kirtchev <kirtchev@adacore.com>
2265 * exp_util.adb (Initialized_By_Ctrl_Function): Do not loop over
2266 selector names as the function call always appears at the top selected
2269 2012-03-15 Ed Schonberg <schonberg@adacore.com>
2271 * sem_ch12.adb (Validate_Access_Subprogram_Instance): keep
2272 Mode_Conformance check for older versions of the language.
2274 2012-03-15 Yannick Moy <moy@adacore.com>
2276 * gnat_ugn.texi Document the extension of option -gnatw.t.
2277 * sem_ch3.adb (Analyze_Declaration): Check for suspicious
2278 contracts only after contract cases have been semantically
2280 * sem_ch6.adb (Check_Subprogram_Contract): Consider also Ensures
2281 components of contract cases for detecting suspicious contracts.
2283 2012-03-15 Yannick Moy <moy@adacore.com>
2285 * aspects.adb, aspects.ads (Aspect_Id): New GNAT aspect
2286 Aspect_Contract_Case.
2287 * gnat_rm.texi Document the new pragma/aspect
2288 Contract_Case. Correct the documentation of the existing
2289 pragma/aspect Test_Case with the new semantics.
2290 * sem_attr.adb (Analyze_Attribute): Allow use of 'Result in the
2291 Ensures component of a Contract_Case pragma.
2292 * sem_ch13.adb (Analyze_Aspect_Specifications): Check new aspect
2293 and translate it into a pragma.
2294 (Check_Aspect_At_Freeze_Point): Take into account the new aspect.
2295 * sem_ch3.adb, sinfo.adb, sinfo.ads Renaming of TC (for test case)
2296 into CTC (for contract and test case).
2297 * sem_ch6.adb (Process_PPCs): Generate Check pragmas from
2298 Contract_Case pragmas, similarly to what is done already for
2300 * sem_prag.adb, sem_prag.ads (Check_Contract_Or_Test_Case):
2301 Renaming of Check_Test_Case.
2302 (Analyze_Pragma, Sig_Flags): Take into account the new pragma.
2303 * sem_util.adb, sem_util.ads Renaming to take into account the
2304 new pragma, so that functions which applied only to Test_Case
2305 now apply to both Test_Case and Contract_Case.
2306 * par-prag.adb, sem_warn.adb, snames.ads-tmpl Take into account
2309 2012-03-15 Robert Dewar <dewar@adacore.com>
2311 * sem_ch6.ads: Minor comment updates.
2312 * sem_ch12.adb: Minor comment clarification.
2314 2012-03-15 Robert Dewar <dewar@adacore.com>
2316 * sem_ch5.adb: Minor reformatting.
2318 2012-03-15 Ed Schonberg <schonberg@adacore.com>
2320 * exp_ch3.adb (Expand_N_Object_Declaration): When rewriting the
2321 declaration of a class-wide object, retain the Ekind to prevent
2322 subsequent misuse of constants.
2324 2012-03-15 Yannick Moy <moy@adacore.com>
2326 * gnat_rm.texi, gnat_ugn.texi: Minor correction of invariant
2329 2012-03-15 Hristian Kirtchev <kirtchev@adacore.com>
2331 * exp_util.adb (Initialized_By_Ctrl_Function): Add code to
2332 process the case when a function call appears in object.operation
2335 2012-03-15 Ed Schonberg <schonberg@adacore.com>
2337 * sem_ch6.ads, sem_ch6.adb (Check_Subtype_Conformant): add
2338 Get_Inst formal, so that conformance within an instantiation
2339 follows renamings of formals. This is similar to what is already
2340 done in Check_Mode_conformant.
2341 * sem_ch12.adb (Vailidate_Access_Subprogram_Instance): check that
2342 formal and actual are subtype conformant. Previously only mode
2343 conformance was required.
2345 2012-03-15 Robert Dewar <dewar@adacore.com>
2347 * par-ch6.adb, einfo.ads, sem_eval.adb, sem_eval.ads,
2348 sem_case.adb: Minor reformatting.
2350 2012-03-15 Robert Dewar <dewar@adacore.com>
2352 * exp_attr.adb (Expand_N_Attribute_Reference): Add handling
2353 of First_Valid/Last_Valid.
2354 * sem_attr.adb (Check_First_Last_Valid): New procedure
2355 (Analyze_Attribute): Add handling of First_Valid and Last_Valid
2356 (Eval_Attribute): ditto.
2357 * snames.ads-tmpl: Add entries for First_Valid and Last_Valid.
2359 2012-03-15 Ed Schonberg <schonberg@adacore.com>
2361 * exp_ch5.adb (Expand_Predicated_Loop): Suppress warnings on
2362 loop variable, for the unusual case where the range has a single
2363 element and the loop variable has no visible assignment to it.
2365 2012-03-15 Vincent Pucci <pucci@adacore.com>
2367 * exp_ch4.adb (Expand_N_Quantified_Expression): Expand the
2368 original quantified expression node.
2369 * sem_ch4.adb (Analyze_Quantified_Expression): Properly analyze
2370 the quantified expression and preserve the original non-analyzed
2371 quantified expression when an expansion is needed.
2372 * sem_ch5.adb (Analyze_Iteration_Scheme): Special treatment
2373 for quantified expressions.
2374 (Analyze_Iterator_Specification): Special treatment for quantified
2377 2012-03-15 Ed Falis <falis@adacore.com>
2379 * s-vxwork-ppc.ads: Update FP_CONTEXT so name of former pad
2380 field matches VxWorks headers.
2382 2012-03-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2384 * gcc-interface/Makefile.in (mips-sgi-irix6*): Remove.
2386 * a-intnam-irix.ads, mlib-tgt-specific-irix.adb,
2387 s-intman-irix.adb, s-mastop-irix.adb, s-osinte-irix.adb,
2388 s-osinte-irix.ads, s-proinf-irix-athread.adb,
2389 s-proinf-irix-athread.ads, s-taprop-irix.adb, s-tasinf-irix.ads,
2390 system-irix-n32.ads, system-irix-n64.ads, system-irix-o32.ads:
2393 * adaint.c [__mips && __sgi]: Remove.
2394 (__gnat_number_of_cpus) [__mips && __sgi]: Remove.
2395 [IS_CROSS && !(__mips && __sgi)]: Remove.
2396 * adaint.h [sgi && _LFAPI]: Remove.
2397 * cstreams.c (__gnat_full_name) [sgi]: Remove.
2398 * env.c (__gnat_unsetenv) [__mips && __sgi]: Remove.
2399 (__gnat_clearenv) [__mips && __sgi]: Remove.
2400 * errno.c (_SGI_MP_SOURCE): Remove.
2401 * gsocket.h [sgi]: Remove.
2402 * init.c: Remove IRIX reference.
2404 * link.c [sgi]: Remove.
2405 * s-oscons-tmplt.c [__mips && __sgi] (IOV_MAX): Don't define.
2406 (main) [__mips && __sgi] (MAX_tv_sec): Don't define.
2407 (CLOCK_SGI_FAST, CLOCK_SGI_CYCLE): Remove.
2408 * sysdep.c [sgi]: Remove.
2409 (getc_immediate_common) [sgi]: Remove.
2410 (__gnat_localtime_tzoff) [sgi]: Remove.
2411 * terminals.c [__mips && __sgi] (IRIX): Don't define.
2412 [IRIX] (USE_GETPTY): Don't define.
2413 (allocate_pty_desc) [USE_GETPTY]: Remove.
2415 * g-traceb.ads: Remove IRIX reference.
2416 * g-trasym.ads: Likewise.
2417 * memtrack.adb: Likewise.
2418 * s-interr-sigaction.adb: Likewise.
2420 * gnat_rm.texi (Implementation Advice): Remove SGI info.
2421 (Implementation Defined Characteristics): Likewise.
2422 * gnat_ugn.texi (Summary of Run-Time Configurations, mips-irix):
2424 (Irix-Specific Considerations): Remove.
2426 2012-03-13 Tristan Gingold <gingold@adacore.com>
2428 * gcc-interface/gigi.h (flag_vms_malloc64): Refine condition.
2430 2012-03-13 Tristan Gingold <gingold@adacore.com>
2432 * sysdep.c: Adjust condition after removal of __osf__.
2434 2012-03-12 Eric Botcazou <ebotcazou@adacore.com>
2436 * gcc-interface/gigi.h (shift_unc_components_for_thin_pointers): Kill.
2437 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Remove call
2439 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Pool_Address>: Adjust
2440 handling of thin pointers.
2441 <Attr_Descriptor_Size>: Likewise.
2442 (gnat_to_gnu) <N_Free_Statement>: Likewise.
2443 * gcc-interface/utils.c (shift_unc_components_for_thin_pointers): Kill.
2444 (convert_to_fat_pointer): Adjust handling of thin pointers.
2445 (convert) <POINTER_TYPE>: Likewise.
2446 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: Likewise.
2448 2012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2450 * gcc-interface/Makefile.in (alpha*-dec-osf*): Remove.
2451 * a-intnam-tru64.ads, mlib-tgt-specific-tru64.adb,
2452 s-mastop-tru64.adb, s-osinte-tru64.adb, s-osinte-tru64.ads,
2453 s-taprop-tru64.adb, s-tasinf-tru64.ads, s-taspri-tru64.ads,
2454 system-tru64.ads: Remove.
2456 * adaint.c (__gnat_number_of_cpus) [__alpha__ && __osf__]:
2458 [IS_CROSS] [!(__alpha__ && __osf__)]: Remove.
2459 * env.c [__alpha__ && __osf__]: Remove.
2460 * gsocket.h (_OSF_SOURCE): Remove.
2461 (HAVE_THREAD_SAFE_GETxxxBYyyy) [__osf__]: Remove.
2462 * init.c [__alpha__ && __osf__]: Remove.
2463 * link.c [__osf__]: Remove.
2464 * s-oscons-tmplt.c [__alpha__ && __osf__]: Remove.
2465 [__osf__ && !_SS_MAXSIZE]: Remove.
2466 * sysdep.c [__osf__]: Remove.
2467 * terminals.c [__alpha__ && __osf__]: Remove.
2470 * g-traceb.ads: Remove Tru64 reference.
2471 * g-trasym.ads: Likewise.
2472 * gnat_ugn.texi (Linking a Mixed C++ & Ada Program): Likewise.
2473 (Summary of Run-Time Configurations): Likewise.
2474 * memtrack.adb: Likewise.
2476 2012-03-12 Tristan Gingold <gingold@adacore.com>
2478 * gcc-interface/decl.c (gnat_to_gnu_param): Use flag_vms_malloc64
2479 instead of TARGET_MALLOC64.
2480 * gcc-interface/gigi.h (flag_vms_malloc64): Define instead
2483 2012-03-09 Robert Dewar <dewar@adacore.com>
2485 * a-direct.adb, comperr.adb, freeze.adb: Minor reformatting.
2487 2012-03-09 Arnaud Charlet <charlet@adacore.com>
2489 * s-taskin.adb (Initialize_ATCB): Set Task_Image_Len to
2490 0 so that we never access this field uninitialized (e.g. in
2491 Task_Primitives.Operations.Enter_Task for the environment task).
2493 2012-03-09 Vincent Pucci <pucci@adacore.com>
2495 * exp_ch5.adb (Expand_Iterator_Loop):
2496 Call to Expand_Iterator_Loop_Over_Array added.
2497 (Expand_Iterator_Loop_Over_Array): New routine. Expansion of
2498 "of" iterator loop over arrays. Multidimensional array case added.
2500 2012-03-09 Eric Botcazou <ebotcazou@adacore.com>
2502 * uintp.ads: Fix minor pasto in comment.
2504 2012-03-09 Vasiliy Fofanov <fofanov@adacore.com>
2506 * a-direct.adb: Do not strip the trailing directory separator
2507 from path, as this is already done inside Normalize_Pathname;
2508 doing it again produces the wrong result on Windows for the
2509 drive's root dir (i.e. "X:\" becomes "X:").
2511 2012-03-09 Thomas Quinot <quinot@adacore.com>
2513 * exp_attr.adb, freeze.adb, sem_attr.adb, aspects.adb, aspects.ads,
2514 sem_ch13.adb, snames.ads-tmpl (Exp_Attr.Expand_N_Attribute_Reference):
2515 Add Attribute_Scalar_Storage_Order.
2516 (Sem_Attr.Analyze_Attribute, Eval_Attribute): Ditto.
2517 (Aspects): Add Aspect_Scalar_Storage_Order (Snames): Add
2518 Name_Scalar_Storage_Order and Attribute_Scalar_Storage_Order.
2519 (Sem_Ch13.Analyze_Attribute_Definition_Clause): Add processing
2520 for Scalar_Storage_Order.
2521 (Freeze): If Scalar_Storage_Order is specified, check that it
2522 is compatible with Bit_Order.
2524 2012-03-09 Robert Dewar <dewar@adacore.com>
2526 * s-osinte-linux.ads, sem_util.adb, s-taprop-linux.adb, exp_ch4.adb,
2527 a-strsup.ads, sem_ch6.adb, a-stwisu.ads, exp_ch3.adb,
2528 a-stzsup.ads: Minor reformatting.
2530 2012-03-09 Thomas Quinot <quinot@adacore.com>
2532 * s-ransee-vms.adb: Minor reformatting.
2534 2012-03-09 Arnaud Charlet <charlet@adacore.com>
2536 * comperr.adb (Delete_SCIL_Files): Fix handling of
2537 N_Package_Renaming_Declaration and N_Generic_Package_Declaration.
2539 2012-03-09 Javier Miranda <miranda@adacore.com>
2541 * sem_ch6.adb (Check_Body_To_Inline): In AAMP and VM targets
2542 use frontend inlining at all optimization levels.
2543 * sem_util.adb (Must_Inline): In AAMP and VM targets, given that
2544 there is no inlining support in the backend, use also frontend
2545 inlining when compiling with optimizations enabled.
2546 * exp_ch6.adb (Expand_Call): Minor code reorganization.
2548 2012-03-09 Eric Botcazou <ebotcazou@adacore.com>
2550 * gcc-interface/ada-tree.h (TYPE_VAX_FLOATING_POINT_P): Move around.
2551 (TYPE_UNCONSTRAINED_ARRAY): Adjust comment.
2552 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Pool_Address>: Tidy
2553 up. Add comment and use canonical predicate for thin pointers.
2554 (gnat_to_gnu) <N_Free_Statement>: Tidy up and reorder. Add comment
2555 and use canonical predicate for thin pointers.
2556 * gcc-interface/utils.c (convert_to_fat_pointer): Remove superfluous
2557 'else' and use standard name.
2558 (convert_to_thin_pointer): Delete.
2559 (convert) <POINTER_TYPE>: Do the difference in sizetype directly and
2560 change obsolete idioms. Do not call above function.
2561 (unchecked_convert): Fix formatting.
2562 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: In the thin
2563 pointer case, use byte_position to get the field position.
2565 2012-03-07 Eric Botcazou <ebotcazou@adacore.com>
2567 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set flags on the
2568 DECL node built for a type which has a non-trivial equivalent type.
2570 2012-03-07 Eric Botcazou <ebotcazou@adacore.com>
2572 * gcc-interface/gigi.h (rest_of_type_decl_compilation): Delete.
2573 * gcc-interface/decl.c (defer_finalize_level): Likewise.
2574 (defer_finalize_list): Likewise.
2575 (gnat_to_gnu_entity): Delete references to above variables and do not
2576 call rest_of_type_decl_compilation.
2577 (rest_of_type_decl_compilation): Delete.
2578 (rest_of_type_decl_compilation_no_defer): Likewise.
2579 * gcc-interface/utils.c (rest_of_record_type_compilation): Do not call
2580 rest_of_type_decl_compilation.
2581 (create_type_decl): Likewise.
2582 (update_pointer_to): Likewise.
2584 2012-03-07 Eric Botcazou <ebotcazou@adacore.com>
2586 * gcc-interface/trans.c (Identifier_to_gnu): Don't unshare initializer.
2587 (add_decl_expr): Mark external DECLs as used.
2588 * gcc-interface/utils.c (convert) <CONSTRUCTOR>: Copy the vector.
2590 2012-03-07 Tristan Gingold <gingold@adacore.com>
2592 * s-ransee-vms.adb: New file.
2593 * gcc-interface/Makefile.in: Use s-ransee-vms.adb on VMS.
2594 * gcc-interface/Make-lang.in: Update dependencies.
2596 2012-03-07 Bob Duff <duff@adacore.com>
2598 * rtsfind.ads: Add support for finding Super_String types.
2599 * sem_util.ads, sem_util.adb (Is_Bounded_String): New function
2600 to determine whether a given type is a bounded string type.
2601 (Is_Fully_Initialized_Type): Return True for bounded
2602 string types, to suppress bogus warnings.
2603 * exp_ch4.adb (Expand_Composite_Equality): Special case for bounded
2604 strings: equality composes. This allows us to remove default values in
2606 * a-strsup.ads, a-stwisu.ads, a-stzsup.ads: Update comments.
2607 * exp_ch3.adb (Expand_Freeze_Record_Type): Comment.
2609 2012-03-07 Robert Dewar <dewar@adacore.com>
2611 * sem_util.adb, exp_ch4.adb, exp_ch6.adb, sem_ch6.adb: Minor
2614 2012-03-07 Sergey Rybin <rybin@adacore.com frybin>
2616 * gnat_ugn.texi: gnatpp: fix paragraph about sources with
2617 preprocessor directives.
2619 2012-03-07 Arnaud Charlet <charlet@adacore.com>
2621 * s-osinte-linux.ads, s-taprop-linux.adb (prctl): New function.
2622 (Enter_Task): Call prctl when relevant.
2624 2012-03-07 Tristan Gingold <gingold@adacore.com>
2626 * s-osinte-vms.ads: pthread_mutex_setname_np: new function.
2628 2012-03-07 Ed Schonberg <schonberg@adacore.com>
2630 * sem_ch6.adb (Process_Formals): a generic subprogram with
2631 a formal incomplete type does not require a freeze node.
2633 2012-03-07 Bob Duff <duff@adacore.com>
2635 * sem_util.ads: Minor reformatting.
2637 2012-03-07 Geert Bosch <bosch@adacore.com>
2639 * targparm.ads: New target parameter Atomic_Sync_Default,
2641 * targparm.adb (Get_Target_Parameters): Add processing for
2642 Atomic_Sync_Default.
2643 * gnat1drv.adb (Adjust_Global_Switches): Adjust Supress_Options
2646 2012-03-07 Javier Miranda <miranda@adacore.com>
2648 * sem_ch3.adb (Analyze_Object_Declaration): If the object
2649 declaration has an init expression then stop the analysis of the
2650 object declaration if the expression which initializes the object
2651 is a call to an inlined function which returns an unconstrained
2652 and has been expanded into a procedure call.
2653 * sem_ch5.adb (Has_Call_Using_Secondary_Stack): Add missing
2654 support to handle selected components.
2655 * sem_ch6.ads (Cannot_Inline): Adding parameter Is_Serious plus
2657 * sem_ch6.adb (Check_And_Build_Body_To_Inline): New
2658 subprogram which implements the checks required by the
2659 new rules for frontend inlining and builds the body to inline.
2660 (Analyze_Subprogram_Body_Helper): Move code that
2661 checks inlining of subprogram that has nested subprogram
2662 to Check_And_Build_Body_To_Inline. Replace call to
2663 Build_Body_To_Inline by call to the new subprogram
2664 Check_And_Build_Body_To_Inline.
2665 (Cannot_Inline): New implementation.
2666 * sem_ch12.adb (Analyze_Package_Instantiation.Must_Inline_Subp):
2668 * sem_util.ad[sb] (Must_Inline): New subprogram.
2669 (Returns_Unconstrained_Type): New subprogram.
2670 * sem_res.adb (Resolve_Call): Do not create a transient scope
2672 * inline.ads (Analyzing_Inlined_Bodies): Remove unreferenced variable.
2673 * inline.adb (Analyze_Inlined_Bodies, Initialize): Remove setting
2674 to false the variable Analyzing_Inlined_Bodies. Fix comments.
2675 * exp_ch4.adb (Expand_N_Allocator): Fix handling of finalization master.
2676 * exp_ch6.ads (List_Inlining_Info): New subprogram.
2677 * exp_ch6.adb (Expand_Call.Do_Inline): New subprogram.
2678 (Expand_Call.Do_Inline_Always): New subprogram.
2679 (In_Unfrozen_Instance): Move the declaration of this subprogram.
2680 (Expand_Inlined_Call.Reset_Dispatching_Calls): New subprogram.
2681 (Expand_Inlined_Call): Adding new support for inlining functions
2682 that return unconstrained types.
2683 (List_Inlining_Info): New subprogram.
2684 * debug.adb Document flags -gnatd.j and -gnatd.k
2685 * gnat1drv.adb Add call to generate the new listing of inlined
2686 calls and calls passed to the backend.
2688 2012-03-07 Robert Dewar <dewar@adacore.com>
2690 * sem_ch5.adb, s-vaflop.adb, s-taprop-vms.adb, exp_ch6.adb,
2691 s-gearop.adb, sem_ch6.adb, g-trasym.adb: Minor reformatting.
2693 2012-03-07 Javier Miranda <miranda@adacore.com>
2695 * a-ngrear.ads: Add documentation.
2697 2012-03-07 Tristan Gingold <gingold@adacore.com>
2699 * s-taprop-vms.adb (Create_Task): set thread name.
2700 * s-osinte-vms.ads (pthread_attr_setname_np): Declare.
2702 2012-03-07 Arnaud Charlet <charlet@adacore.com>
2704 * g-trasym.adb: Minor reformatting.
2706 2012-03-07 Robert Dewar <dewar@adacore.com>
2708 * a-ngrear.ads: Minor addition of ??? comment.
2710 2012-03-07 Gary Dismukes <dismukes@adacore.com>
2712 * exp_ch4.adb (Apply_Accessibility_Check): Call
2713 Remove_Side_Effects in the build-in-place case, to ensure that
2714 we capture the call and don't end up with two calls.
2716 2012-03-07 Javier Miranda <miranda@adacore.com>
2718 * exp_ch6.adb (Expand_Inlined_Call): Skip inlining of functions
2719 that return unconstrained types using an extended return statement
2720 since the support for inlining these functions has not been yet
2721 added to the frontend.
2722 * s-vaflop.adb, s-vaflop-vms-alpha.adb: Code reorganization.
2723 * a-ngrear.ads: Replace all the Inline_Always pragmas by pragma
2725 * a-ngrear.adb (Eigenvalues, Transpose): Restructured to use
2726 extended return statement.
2727 * a-strsup.adb, a-stzsup.adb, a-stwisu.adb (Concat, Super_Slice,
2728 Super_To_String): Restructured to use extended return statement.
2729 * a-chahan.adb (To_Basic, To_Lower, To_Upper): Restructured to
2730 use extended return statement.
2731 * s-gearop.adb (Diagonal, Matrix_Elementwise_Operation,
2732 Vector_Elementwise_Operation, Matrix_Elementwise_Operation,
2733 Matrix_Matrix_Scalar_Elementwise_Operation,
2734 Vector_Vector_Elementwise_Operation,
2735 Vector_Vector_Scalar_Elementwise_Operation,
2736 Matrix_Scalar_Elementwise_Operation,
2737 Vector_Scalar_Elementwise_Operation,
2738 Scalar_Matrix_Elementwise_Operation,
2739 Scalar_Vector_Elementwise_Operation, Matrix_Matrix_Product,
2740 Matrix_Vector_Product, Outer_Product, Unit_Matrix, Unit_Vector,
2741 Vector_Matrix_Product): Restructured to use extended return
2744 2012-03-07 Vincent Pucci <pucci@adacore.com>
2746 * sem_ch5.adb (One_Bound): Minor reformatting.
2748 2012-03-07 Tristan Gingold <gingold@adacore.com>
2750 * s-osinte-vms-ia64.adb, s-osinte-vms-ia64.ads, s-osinte-vms.adb,
2751 s-osinte-vms.ads, gcc-interface/Makefile.in: Merge s-osinte-vms and
2754 2012-03-07 Ed Schonberg <schonberg@adacore.com>
2756 * checks.adb (Apply_Predicate_Check): Do not generate a predicate
2757 check is the context is an internally generated type-specific
2759 * sem_ch6.adb (Process_PPCs); the formals of internally generated
2760 type-specific functions do not get assertion checks.
2762 2012-03-07 Yannick Moy <moy@adacore.com>
2764 * gnat_rm.texi: Minor renaming of title.
2765 * gnat_ugn.texi: Minor correction.
2767 2012-03-07 Vincent Pucci <pucci@adacore.com>
2769 * exp_ch4.adb (Expand_N_Quantified_Expression): Minor
2771 * sem_ch4.adb (Analyze_Quantified_Expression): Creation and
2772 analysis of the iteration scheme added in all cases.
2773 * sem_ch5.adb (Analyze_Iteration_Scheme): Minor reformating.
2774 (Analyze_Iterator_Specification): Minor reformating.
2775 * sem_res.adb (Resolve_Quantified_Expression): Resolution of
2776 the condition added in all cases.
2778 2012-03-07 Thomas Quinot <quinot@adacore.com>
2780 * einfo.adb, einfo.ads: Add flag Reverse_Storage_Order.
2782 2012-03-07 Yannick Moy <moy@adacore.com>
2784 * gnat_rm.texi, gnat_ugn.texi: Rewording of GNAT UG and GNAT RM to
2785 account for Ada 2012 assertions, and their pragma counterparts in GNAT.
2787 2012-03-07 Thomas Quinot <quinot@adacore.com>
2789 * exp_attr.adb, sem_attr.adb: Minor reformatting.
2791 2012-03-07 Bob Duff <duff@adacore.com>
2793 * hostparm.ads (Max_Instantiations): Increase parameter.
2795 2012-03-07 Bob Duff <duff@adacore.com>
2797 * par-prag.adb: Minor code rearrangement.
2799 2012-03-07 Bob Duff <duff@adacore.com>
2801 * a-strsup.ads, a-stwisu.ads, a-stzsup.ads (Super_String):
2802 Remove default initial value for Data. It is no longer needed
2803 because "=" now composes properly for untagged records. This
2804 default has caused efficiency problems.
2806 2012-03-07 Ed Schonberg <schonberg@adacore.com>
2808 * sem_res.adb (Resolve_Actuals): If the actual is a selected
2809 component of an anonymous access type, whose prefix is a variable,
2810 treat the variable as if it may be modified by the call, to
2811 suppress spurious warnings that a variable might be declared as
2814 2012-03-07 Thomas Quinot <quinot@adacore.com>
2816 * einfo.adb, einfo.ads: Remove unused entity flags.
2818 2012-03-07 Eric Botcazou <ebotcazou@adacore.com>
2820 * gnat_ugn.texi (Inline Assembler): Fix swapping of Input and
2821 Output operands throughout.
2823 2012-03-07 Hristian Kirtchev <kirtchev@adacore.com>
2825 * sem_ch12.adb (Earlier): When two nodes come from the same
2826 generic instantiation, compare their locations. Otherwise always
2827 use the top level locations of the nodes.
2829 2012-03-07 Thomas Quinot <quinot@adacore.com>
2831 * einfo.ads, sem_prag.adb: Minor reformatting.
2833 2012-03-05 Jason Merrill <jason@redhat.com>
2835 * gcc-interface/Make-lang.in (doc/gnat_ugn.texi): Build xgnatugn
2838 2012-03-04 Eric Botcazou <ebotcazou@adacore.com>
2840 * gnatvsn.ads (Library_Version): Bump to 4.8.
2842 2012-03-03 H.J. Lu <hongjiu.lu@intel.com>
2844 * init.c (__gnat_adjust_context_for_raise): Also check
2845 "orq $0x0,(%esp)" for x32.
2847 * link.c (__gnat_default_libgcc_subdir): Set to libx32 for x32.
2849 * gcc-interface/Makefile.in (arch): Set to x32 if MULTISUBDIR
2850 is /x32 and add support for x32.
2852 2012-02-29 Eric Botcazou <ebotcazou@adacore.com>
2854 * gcc-interface/decl.c (components_to_record): Add ARTIFICIAL parameter
2855 and set TYPE_ARTIFICIAL according to it. Adjust recursive call.
2856 (gnat_to_gnu_entity) <E_Record_Type>: Adjust call to above function.
2857 * gcc-interface/utils.c (rest_of_record_type_compilation): Do not
2858 invoke rest_of_type_decl_compilation on the parallel type, if any.
2860 2012-02-29 Eric Botcazou <ebotcazou@adacore.com>
2862 * gcc-interface/utils.c (gnat_write_global_declarations): Make sure the
2863 dummy global built for global types is preserved.
2865 2012-02-27 Tristan Gingold <gingold@adacore.com>
2867 * gcc-interface/decl.c (gnat_to_gnu_entity) [E_String_Type,
2868 E_Array_Type]: Reuse dummy fat type for gnu_ptr_template and
2871 2012-02-27 Eric Botcazou <ebotcazou@adacore.com>
2873 * gcc-interface/ada-tree.h (TYPE_PACKED_ARRAY_TYPE_P): Add checking.
2874 (TYPE_BY_REFERENCE_P): New flag.
2875 (TYPE_IS_BY_REFERENCE_P): New macro.
2876 (TYPE_DUMMY_P): Add checking and remove VOID_TYPE.
2877 (TYPE_IS_DUMMY_P): Adjust for above change.
2878 * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_BY_REFERENCE_P
2879 and TYPE_IS_BY_REFERENCE_P instead of TREE_ADDRESSABLE.
2880 (gnat_to_gnu_param): Likewise.
2881 (maybe_pad_type): Likewise.
2882 (make_type_from_size): Use TYPE_IS_PACKED_ARRAY_TYPE_P.
2883 * gcc-interface/misc.c (must_pass_by_ref): Use TYPE_IS_BY_REFERENCE_P
2884 instead of TREE_ADDRESSABLE.
2885 * gcc-interface/trans.c (finalize_nrv): Likewise.
2886 (call_to_gnu): Likewise. Do not create a temporary for return values
2887 with by-reference type here.
2888 (gnat_to_gnu): Test TYPE_IS_DUMMY_P instead of TYPE_DUMMY_P.
2889 (gnat_gimplify_expr) <ADDR_EXPR>: Don't do anything for non-constant
2890 CONSTRUCTORs and calls.
2891 * gcc-interface/utils.c (make_dummy_type): Get the equivalent type of
2892 the underlying type and use it throughout. Use TYPE_IS_BY_REFERENCE_P
2893 instead of TREE_ADDRESSABLE.
2894 * gcc-interface/utils2.c (build_cond_expr): Deal with by-reference
2897 2012-02-27 Eric Botcazou <ebotcazou@adacore.com>
2899 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Revert previous
2900 change that creates a special VAR_DECL for debugging purposes. For an
2901 aliased object with an unconstrained nominal subtype, make its type a
2902 thin reference to the underlying object.
2903 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: Deal with
2904 expressions built for the initialization of above objects.
2906 2012-02-24 Dave Korn <dave.korn.cygwin@gmail.com>
2908 * gcc-interface/Makefile.in (WIN_SO_PREFIX [windows targets]): New
2909 Windows-specific make variable.
2910 (WIN_SO_INSTALL_DIR [windows targets]): Likewise.
2911 (install-gnatlib): Respect the above during installation when set,
2912 and also install any windows import library that has been built.
2913 (gnatlib-shared-win32): Use WIN_SO_PREFIX to name output DLL and also
2914 build a corresponding import library.
2916 2012-02-22 Robert Dewar <dewar@adacore.com>
2918 * exp_util.adb, make.adb, sem_dim.adb, sem_ch4.adb, exp_disp.adb: Minor
2921 2012-02-22 Geert Bosch <bosch@adacore.com>
2923 * g-bytswa-x86.adb, g-bytswa.adb, gcc-interface/Makefile.in: Remove
2924 x86-specific version of byteswap and use GCC builtins instead.
2926 2012-02-22 Tristan Gingold <gingold@adacore.com>
2928 * gcc-interface/decl.c (gnat_to_gnu_entity) [E_String_Type,
2929 E_Array_Type]: Translate component ealier.
2931 2012-02-22 Robert Dewar <dewar@adacore.com>
2933 * par-ch3.adb (P_Signed_Integer_Type_Definition): Specialize
2934 error message for 'Range.
2936 2012-02-22 Pascal Obry <obry@adacore.com>
2938 * s-taprop-mingw.adb (Finalize_TCB): Do not wait on thread handle as
2939 this is our own thread.
2941 2012-02-22 Sergey Rybin <rybin@adacore.com frybin>
2943 * tree_io.ads: Update ASIS_Version_Number because of the changes
2946 2012-02-22 Hristian Kirtchev <kirtchev@adacore.com>
2948 * exp_ch7.adb (Create_Finalizer): Suppress elaboration checks on
2949 stack-related finalizers.
2951 2012-02-22 Ed Schonberg <schonberg@adacore.com>
2953 * sem_ch6.adb (Analyze_Expression_Function): If the construct
2954 is a completion, indicate that its formals are the formals of
2955 a completion, and as such do not get a cross- reference entry.
2956 (Analyze_Subprogram_Specification): Do not generate a definition
2957 for the entity of an expression function, because it may be a
2958 completion. Definition will be generated if needed when analyzing
2959 the generated subprogram declaration.
2961 2012-02-22 Vincent Celier <celier@adacore.com>
2963 * make.adb (Check): When checking if an object file is in the
2964 correct object directory, get the unit name from a previous call
2965 to Check_Source_Info_In_ALI.
2966 * makeutl.adb (Check_Source_Info_In_ALI): Return the name of
2967 the unit when everything is OK, otherwise return No_Name.
2968 * makeutl.ads (Check_Source_Info_In_ALI): Return Name_Id instead
2971 2012-02-22 Ed Schonberg <schonberg@adacore.com>
2973 * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): In an
2974 instance, the operator is visible if an operand is of some
2975 numeric type which is not in use or directly visible, and the
2976 other operand is a numeric literal.
2978 2012-02-22 Tristan Gingold <gingold@adacore.com>
2980 * init.c: Minor code clean up.
2981 * gcc-interface/Make-lang.in: Update dependencies.
2983 2012-02-22 Arnaud Charlet <charlet@adacore.com>
2985 * gnatlink.adb (Gnatlink): Use -gnatcC in CodePeer_Node,
2986 otherwise GCC will generate an object file.
2988 2012-02-22 Vincent Celier <celier@adacore.com>
2990 * projects.texi: Correct typo related to "**" in Source_Dirs.
2992 2012-02-22 Steve Baird <baird@adacore.com>
2994 * sem_prag.adb (Analyze_PPC_In_Decl_Part): Clean up generation of
2997 2012-02-22 Vincent Pucci <pucci@adacore.com>
2999 * rtsfind.adb (Get_Unit_Name): Ada_Numerics_Child and
3000 System_Dim_Child cases added.
3001 * rtsfind.ads: Ada_Numerics,
3002 Ada_Numerics_Generic_Elementary_Functions, System_Dim,
3003 System_Dim_Float_IO and System_Dim_Integer_IO added to the list
3004 of RTU_Id. Ada_Numerics_Child and System_Dim_Child added as
3005 new RTU_Id subtypes.
3006 * sem_dim.adb (Is_Dim_IO_Package_Entity): Use of
3007 Rtsfind to verify the package entity is located either
3008 in System.Dim.Integer_IO or in System.Dim.Float_IO.
3009 (Is_Dim_IO_Package_Instantiation): Minor
3010 changes. (Is_Elementary_Function_Call): Removed.
3011 (Is_Elementary_Function_Entity): New routine.
3012 (Is_Procedure_Put_Call): Is_Dim_IO_Package_Entity call added.
3013 * snames.ads-tmpl: Name_Dim and Name_Generic_Elementary_Functions
3016 2012-02-22 Vincent Pucci <pucci@adacore.com>
3018 * sem_prag.adb: Minor reformatting.
3020 2012-02-22 Ed Schonberg <schonberg@adacore.com>
3022 * sem_ch3.adb (Find_Type_Name): When analyzing a private type
3023 declaration that is the completion of a tagged incomplete type, do
3024 not associate the class-wide type already created with the private
3025 type to prevent order-of-elaboration issues in the back-end.
3026 * exp_disp.adb (Find_Specific_Type): Find specific type of
3027 a class-wide type, and handle the case of an incomplete type
3028 coming either from a limited_with clause or from an incomplete
3029 type declaration. Used when expanding a dispatchin call and
3030 generating tag checks (minor refactoring).
3032 2012-02-22 Robert Dewar <dewar@adacore.com>
3034 * exp_ch5.adb: Add comment.
3035 * sem_ch12.adb, exp_ch6.adb: minor reformatting
3037 2012-02-22 Ed Schonberg <schonberg@adacore.com>
3039 * freeze.adb (Freeze_Entity): Do not perform type layout within
3042 2012-02-22 Eric Botcazou <ebotcazou@adacore.com>
3044 * init.c (__gnat_error_handler) [Linux]: Map SIGBUS to
3047 2012-02-22 Ed Schonberg <schonberg@adacore.com>
3049 * exp_ch5.adb (Expand_N_Assignment_Statement): Reject an
3050 assignment to a classwide type whose type is limited, as
3051 can happen in an instantiation in programs that run afoul or
3054 2012-02-17 Ed Schonberg <schonberg@adacore.com>
3056 * exp_ch6.adb (Legal_Copy): If layout is not
3057 determined in the front-end, do not emit error message when
3058 by-reference actual is potentially unaligned.
3059 * gcc-interface/decl.c (gnat_to_gnu_field): Better error message for
3060 illegal representation clause on tagged or aliased component, or on
3061 by-reference type with forced alignment.
3063 2012-02-17 Nicolas Roche <roche@adacore.com>
3065 * gcc-interface/Makefile.in: Ensure FORCE_DEBUG_ADAFLAGS variables is
3066 propagated by gnatlib-sjlj and gnatlib-zcx targets.
3067 * gcc-interface/Make-lang.in: Update dependencies.
3069 2012-02-17 Thomas Quinot <quinot@adacore.com>
3071 * sem_ch12.adb (Analyze_Package_Instantiation): For an
3072 instantiation in an RCI library unit, omit the instance body
3073 if the RCI library unit is the instance itself (E.2.3(18)),
3074 but include the body if the instantiation is within the RCI
3075 declaration (12.3(12)).
3077 2012-02-17 Steve Baird <baird@adacore.com>
3079 * sem_prag.adb (Analyze_PPC_In_Decl_Part): Pre'Class and
3080 Post'Class aspects can only be specified for a primitive operation
3083 2012-02-17 Yannick Moy <moy@adacore.com>
3085 * gnat_rm.texi: Minor shuffling.
3087 2012-02-17 Ed Schonberg <schonberg@adacore.com>
3089 * aspects.adb: Expression functions can carry pre/postconditions.
3090 * par-ch6.adb (P_Subprogram): look for optional pre/postconditions
3091 in an expression function.
3092 * sem_prag (Check_Precondition_Postcondition): legal on expression
3095 2012-02-17 Vincent Pucci <pucci@adacore.com>
3097 * a-cdlili.adb, a-cidlli.adb, a-cihama.adb, a-cimutr.adb,
3098 * a-ciorma.adb, a-cohama.adb, a-coinve.adb, a-comutr.adb,
3099 * a-convec.adb, a-coorma.adb (Adjust): New routine.
3100 (Constant_Reference): Increment Busy and Lock counters.
3101 (Reference): Increase Busy and Lock counters.
3102 (Finalize): New routine.
3103 * a-cihase.adb, a-ciorse.adb, a-cohase.adb, a-coorse.adb:
3104 (Adjust): New routine. (Constant_Reference): Increment Busy
3106 (Finalize): New routine.
3107 * a-cdlili.ads, a-cidlli.ads, a-cihama.ads, a-cihase.ads,
3108 * a-cimutr.ads, a-ciorma.ads, a-ciorse.ads, a-cohama.ads,
3109 * a-cohase.ads, a-coinve.ads, a-comutr.ads, a-convec.ads,
3110 * a-coorma.ads, a-coorse: Controlled component added to the
3113 2012-02-17 Robert Dewar <dewar@adacore.com>
3115 * restrict.adb (Check_Restriction): Add special handling for
3116 No_Obsolescent_Features.
3118 2012-02-17 Hristian Kirtchev <kirtchev@adacore.com>
3120 * exp_util.adb (Find_Finalize_Address): When dealing with an
3121 internally built full view for a type with unknown discriminants,
3122 use the original record type.
3124 2012-02-17 Robert Dewar <dewar@adacore.com>
3126 * sem_dim.adb: Minor reformatting.
3128 2012-02-17 Yannick Moy <moy@adacore.com>
3130 * gnat_rm.texi: Minor rewording.
3132 2012-02-17 Thomas Quinot <quinot@adacore.com>
3134 * sem_aggr.adb: Minor reformatting.
3136 2012-02-17 Robert Dewar <dewar@adacore.com>
3138 * gnat_ugn.texi: Update doc for -gnatw.m to include 2*x case.
3140 2012-02-17 Vincent Pucci <pucci@adacore.com>
3142 * sem_dim.adb (Is_Dim_IO_Package_Entity): New routine.
3143 (Is_Dim_IO_Package_Instantiation): Is_Dim_IO_Package_Entity
3145 (Is_Procedure_Put_Call): Is_Dim_IO_Package_Entity
3147 * s-dim.ads: Make package Pure.
3149 2012-02-17 Gary Dismukes <dismukes@adacore.com>
3151 * prj-nmsc.adb: Minor reformatting.
3153 2012-02-17 Yannick Moy <moy@adacore.com>
3155 * gnat_rm.texi: Update GNAT RM with a separate chapter on restrictions.
3157 2012-02-17 Yannick Moy <moy@adacore.com>
3159 * gnat_ugn.texi: Fix typos.
3161 2012-02-17 Pascal Obry <obry@adacore.com>
3163 * prj-nmsc.adb: prj-nmsc.adb (Check_Aggregated): Check that an
3164 aggregate is not Externally_Built.
3166 2012-02-17 Ed Schonberg <schonberg@adacore.com>
3168 * sem_aggr.adb (Resolve_Record_Aggregate): If a composite
3169 component has a box association, copy the default value using
3170 the current scope as the scope of internal types, to prevent
3171 scoping anomalies in gigi.
3173 2012-02-17 Robert Dewar <dewar@adacore.com>
3175 * sem_dim.adb, sem_dim.ads, s-tasren.adb, prj.adb, prj.ads, freeze.adb,
3176 sem_res.adb, exp_ch4.adb, sinput.adb, sinput.ads, exp_aggr.adb,
3177 exp_intr.adb, s-os_lib.adb: Minor reformatting.
3179 2012-02-17 Ed Schonberg <schonberg@adacore.com>
3181 * sem_ch6.adb (Is_Non_Overriding_Operation): Add warning if the
3182 old operation is abstract, the relevant type is not abstract,
3183 and the new subprogram fails to override.
3185 2012-02-15 Eric Botcazou <ebotcazou@adacore.com>
3187 * gcc-interface/trans.c (Identifier_to_gnu): Move block retrieving the
3188 type of the result to the end and execute it for a deferred constant of
3189 a discriminated type whose full view can be elaborated statically.
3191 2012-02-15 Eric Botcazou <ebotcazou@adacore.com>
3193 * gcc-interface/trans.c (gnat_to_gnu) <N_Qualified_Expression>: If the
3194 type is tagged, mark it as used for debugging purposes.
3195 <N_Allocator>: Likewise for a qualified expression.
3197 2012-02-15 Eric Botcazou <ebotcazou@adacore.com>
3199 * gcc-interface/trans.c (call_to_gnu): Create the temporary for the
3200 return value in the by-reference return type case if this isn't the
3201 expression of an object declaration. Tidy up.
3203 2012-02-09 Tristan Gingold <gingold@adacore.com>
3205 * gcc-interface/Makefile.in: Remove .sym rule (not used).
3206 Remove adamsg.o object (requires native message compiler).
3207 * init.c (CMA$_EXIT_THREAD, MTH$_FLOOVEMAT, SS$_INTDIV): Define as a
3208 macro instead of as extern int.
3209 (ADA$_ALREADY_OPEN, ADA$_CONSTRAINT_ERRO, ADA$_DATA_ERROR)
3210 (ADA$_DEVICE_ERROR, ADA$_END_ERROR, ADA$_FAC_MODE_MISMAT)
3211 (ADA$_IOSYSFAILED, ADA$_KEYSIZERR, ADA$_KEY_MISMATCH)
3212 (ADA$_LAYOUT_ERROR, ADA$_LINEXCMRS, ADA$_MAXLINEXC)
3213 (ADA$_MODE_ERROR, ADA$_MRN_MISMATCH, ADA$_MRS_MISMATCH)
3214 (ADA$_NAME_ERROR, ADA$_NOT_OPEN, ADA$_ORG_MISMATCH)
3215 (ADA$_PROGRAM_ERROR, ADA$_RAT_MISMATCH, ADA$_RFM_MISMATCH)
3216 (ADA$_STAOVF, ADA$_STATUS_ERROR, ADA$_STORAGE_ERROR)
3217 (ADA$_UNSUPPORTED, ADA$_USE_ERROR): Likewise.
3218 (struct cond_except): Field cond is now an unsigned int.
3219 (dec_ada_cond_except_table): Adjust.
3220 (cond_except_table): Likewise.
3221 (cond_resignal_table): Likewise.
3222 (__gnat_default_resignal_p): Fix style.
3224 2012-02-08 Vincent Celier <celier@adacore.com>
3226 * gcc-interface/Make-lang.in: Add g-byorma.o to gnatbind objects
3227 (g-buorma is now imported by sinput).
3228 Update dependencies.
3229 * scn.adb (Initialize_Scanner): Call Check_For_BOM
3230 * sinput-p.adb (Source_File_Is_Subunit): Call Check_For_BOM
3231 * sinput.adb: New procedure Check_For_BOM
3232 * sinput.ads: New procedure Check_For_BOM
3234 2012-02-08 Vincent Pucci <pucci@adacore.com>
3236 * impunit.adb: Dimension package names updated
3237 * Makefile.rtl: s-dim added
3238 * sem_dim.adb (Is_Procedure_Put_Call): minor changes
3239 (Is_Dim_IO_Package_Instantiation): minor changes
3240 * sem_dim.ads: minor changes in comments
3241 * snames.ads-tmpl: Name_Dim added Name_Dim_Float_IO and
3242 Name_Dim_Integer_IO removed
3243 * s-dim.ads: New package. Define the dimension terminology.
3244 * s-diflio.adb, s-diinio.adb, s-dimkio.ads, s-dimmks.ads,
3245 * s-dmotpr.ads: Package names updated.
3246 * s-diflio.ads, s-diinio.ads: Documentation added and package
3249 2012-02-08 Gary Dismukes <dismukes@adacore.com>
3251 * gcc-interface/utils2.c (build_call_alloc_dealloc_proc): Revise test
3252 for storage pools to test for an underlying record type rather than
3253 testing Is_Tagged_Type, so that simple storage pools will be handled
3254 the same as normal Ada storage pools.
3256 2012-02-08 Yannick Moy <moy@adacore.com>
3258 * gnat_rm.texi: Minor reshuffling to place restriction at
3261 2012-02-08 Bob Duff <duff@adacore.com>
3263 * warnsw.adb (Set_Warning_Switch): Set Warn_On_Suspicious_Modulus_Value
3264 False for '-gnatwA', to suppress these warnings.
3266 2012-02-08 Vincent Celier <celier@adacore.com>
3268 * sinput-p.adb (Source_File_Is_Subunit): Check for BOM before
3269 starting to scan, so that UTF8 encoding is taken into account.
3271 2012-02-08 Arnaud Charlet <charlet@adacore.com>
3273 * s-tasren.adb, s-tasren.ads (Internal_Complete_Rendezvous): New
3275 (Complete_Rendezvous): Now call Internal_Complete_Rendezvous.
3276 (Exceptional_Complete_Rendezvous): Mark No_Return.
3278 2012-02-08 Eric Botcazou <ebotcazou@adacore.com>
3280 * exp_aggr.adb (Compile_Time_Known_Composite_Value):
3281 New predicate to compute whether a composite value can be
3282 evaluated at compile time.
3283 (Component_Not_OK_For_Backend): Use Compile_Time_Known_Value for all
3284 expressions of elementary type and Compile_Time_Known_Composite_Value
3285 for all other expressions.
3286 (Expand_Record_Aggregate): Convert to assignments in the case
3287 of a type with mutable components if the aggregate cannot be
3290 2012-02-08 Gary Dismukes <dismukes@adacore.com>
3292 * aspects.ads (type Aspect_Id): Add Simple_Storage_Pool_Type.
3293 (Impl_Defined_Aspects): Add association for
3294 Aspect_Simple_Storage_Pool_Type.
3296 association for Aspect_Simple_Storage_Pool_Type.
3298 (Canonical_Aspect): Add association for Simple_Storage_Pool_Type.
3299 * exp_attr.adb (Expand_N_Attribute_Reference):
3300 Change name to Name_Simple_Storage_Pool_Type.
3301 * exp_ch4.adb (Expand_N_Allocator): Change
3302 name to Name_Simple_Storage_Pool_Type.
3303 * exp_intr.adb (Expand_Unc_Deallocation): Change name to
3304 Name_Simple_Storage_Pool_Type. * freeze.adb (Freeze_Entity):
3305 Change names to Name_Simple_Storage_Pool_Type. * par-prag.adb:
3306 Change names to Name_Simple_Storage_Pool_Type. * sem_attr.adb:
3307 (Analyze_Attribute): Change name to Name_Simple_Storage_Pool_Type.
3308 * sem_ch13.adb (Analyze_Attribute_Definition_Clause):
3309 Change name to Name_Simple_Storage_Pool_Type.
3311 (Analyze_Pragma): Change name to Name_Simple_Storage_Pool_Type.
3312 (Sig_Flags): Change name to Name_Simple_Storage_Pool_Type.
3313 * sem_res.adb (Resolve_Allocator): Change name to
3314 Name_Simple_Storage_Pool_Type. * snames.ads-tmpl:
3315 (Name_Simple_Storage_Pool_Type): New name constant.
3316 (type Pragma_Id): Change name to Name_Simple_Storage_Pool_Type and
3317 move to main pragma section because it no longer matches the
3319 * snames.adb-tmpl (Get_Pragma_Id): Remove test for
3320 Name_Simple_Storage_Pool.
3321 (Is_Pragma_Name): Remove test for Name_Simple_Storage_Pool.
3323 2012-02-08 Robert Dewar <dewar@adacore.com>
3325 * gnat_ugn.texi: Add some clarification to -gnatwA and -gnatws.
3327 2012-02-08 Pascal Obry <obry@adacore.com>
3329 * prj.adb (Compute_All_Imported_Projects): Use new
3330 For_Project_And_Aggregated_Context to ensure proper context is
3331 used for encapsulated aggregate libraries.
3332 * prj-proc.adb (Recursive_Process): Call
3333 Process_Aggregated_Projects earlier to ensure that all dependent
3334 projects are set with the proper encapsulated status.
3336 2012-02-08 Pascal Obry <obry@adacore.com>
3338 * s-os_lib.adb (Normalize_Arguments): Properly escape last \ in null
3341 2012-02-08 Pascal Obry <obry@adacore.com>
3343 * prj.ads, prj.adb (For_Project_And_Aggregated_Context): New
3344 generic routine with a context parameter.
3346 2012-02-08 Robert Dewar <dewar@adacore.com>
3348 * a-coinve.adb, sem_util.adb, sem_ch8.adb, a-cobove.adb,
3349 a-convec.adb: Minor reformatting and code reorganization.
3351 2012-02-08 Steve Baird <baird@adacore.com>
3353 * sem_cat.adb (In_Preelaborated_Unit): A child
3354 unit instantiation does not inherit preelaboration requirements
3357 2012-02-08 Gary Dismukes <dismukes@adacore.com>
3359 * aspects.ads (type Aspect_Id): Add Aspect_Simple_Storage_Pool.
3360 (Impl_Defined_Aspects): Add entry for Aspect_Simple_Storage_Pool.
3361 (Aspect_Argument): Add Name entry for Aspect_Simple_Storage_Pool.
3362 (Aspect_Names): Add entry for Aspect_Simple_Storage_Pool.
3363 * aspects.adb (Canonical_Aspect): Add entry for
3364 Aspect_Simple_Storage_Pool.
3365 * exp_attr.adb (Expand_N_Attribute_Reference): Handle case of
3366 Attribute_Simple_Storage_Pool in the same way as Storage_Pool
3367 (add conversion, analyze/resolve). For the Storage_Size attribute,
3368 for the simple pool case, locate and use the simple pool type's
3369 Storage_Size function (if any), otherwise evaluate to zero.
3370 * exp_ch4.adb (Expand_N_Allocator): In the case of an allocator
3371 for an access type with an associated simple storage pool,
3372 locate and use the pool type's Allocate.
3373 * exp_intr.adb (Expand_Unc_Deallocation): In the case where the
3374 access type has a simple storage pool, locate the pool type's
3375 Deallocate procedure (if present) and use it as the procedure
3376 to call on the Free operation.
3377 * freeze.adb (Freeze_Entity): In the case of a full type for
3378 a private type defined with pragma Simple_Storage_Pool, check
3379 that the full type is also appropriate for the pragma. For
3380 a simple storage pool type, validate that the operations
3381 Allocate, Deallocate (if present), and Storage_Size
3382 (if present) are defined with appropriate expected profiles.
3383 (Validate_Simple_Pool_Op_Formal): New procedure
3384 (Validate_Simple_Pool_Operation): New procedure Add with and
3386 * par-prag.adb: Add Pragma_Simple_Storage_Pool to case statement
3387 (no action required).
3388 * sem_attr.adb (Analyze_Attribute): For the case of the
3389 Storage_Pool attribute, give a warning if the prefix type has an
3390 associated simple storage pool, and rewrite the attribute as a
3391 raise of Program_Error. In the case of the Simple_Storage_Pool
3392 attribute, check that the prefix type has an associated simple
3393 storage pool, and set the attribute type to the pool's type.
3394 * sem_ch13.adb (Analyze_Aspect_Specifications): Add
3395 Aspect_Simple_Storage_Pool case choice.
3396 (Analyze_Attribute_Definition_Clause): Add
3397 Aspect_Simple_Storage_Pool to case for Ignore_Rep_Clauses
3398 (no action). Add handling for Simple_Storage_Pool attribute
3399 definition, requiring the name to denote a simple storage pool
3401 (Check_Aspect_At_Freeze_Point): For a simple storage pool
3402 aspect, set the type to that of the name specified for the aspect.
3403 * sem_prag.adb (Analyze_Pragma): Add handling for pragma
3404 Simple_Storage_Pool, requiring that it applies to a library-level
3405 type declared in a package declaration that is a limited private
3406 or limited record type.
3407 * sem_res.adb (Resolve_Allocator): Flag an attempt to call a
3408 build-in-place function in an allocator for an access type with
3409 a simple storage pool as unsupported.
3410 * snames.ads-tmpl: Add Name_Simple_Storage_Pool.
3411 (type Attribute_Id): Add Attribute_Simple_Storage_Pool.
3412 (type Pragma_Id): Add Pragma_Simple_Storage_Pool.
3413 * snames.adb-tmpl (Get_Pragma_Id): Handle case of
3414 Name_Simple_Storage_Pool.
3415 (Is_Pragma_Name): Return True for Name_Simple_Storage_Pool.
3417 2012-02-08 Cyrille Comar <comar@adacore.com>
3419 * projects.texi: Clarify doc for interfaces.
3421 2012-02-07 Eric Botcazou <ebotcazou@adacore.com>
3423 * gcc-interface/Make-lang.in (GCC_LINKERFLAGS): New variable.
3426 2012-02-01 Tristan Gingold <gingold@adacore.com>
3428 * gcc-interface/trans.c (Loop_Statement_to_gnu): Use sizetype
3429 instead of size_type_node.
3431 2012-01-30 Nicolas Roche <roche@adacore.com>
3433 * gcc-interface/Make-lang.in: Update dependencies.
3434 * gcc-interface/Makefile.in: Use system-vxworks-system-ppc-mils.ads
3436 Remove Linker_Options -crtbe when building sjlj run-time.
3438 2012-01-30 Robert Dewar <dewar@adacore.com>
3440 * sem.adb (Analyze): Call Analyze_Mod for N_Op_Mod mode.
3441 * sem_ch3.adb (Modular_Type_Declaration): Warn on mod value of
3442 form 2 * small-literal.
3443 * sem_ch4.adb (Analyze_Mod): New procedure (warn on suspicious
3445 * sem_ch4.ads (Analyze_Mod): New procedure.
3447 2012-01-30 Ed Schonberg <schonberg@adacore.com>
3449 * sem_ch6.adb: sem_ch6.adb (Analyze_Expression_Function): Copy
3450 types and return expression when building spec for implicit
3451 body, to preserve global references that may be present in an
3454 2012-01-30 Matthew Heaney <heaney@adacore.com>
3456 * a-convec.adb, a-coinve.adb, a-cobove.adb (Sort,
3457 Reverse_Elements): Check for cursor tampering.
3459 2012-01-30 Ed Schonberg <schonberg@adacore.com>
3461 * sem_util.adb (Is_Fully_Initialized_Type): In Ada 2012, a
3462 type with aspect Default_Value or Default_Component_Value is
3463 fully initialized, and use of variables of such types do not
3466 2012-01-30 Javier Miranda <miranda@adacore.com>
3469 * sem_ch8.adb (Analyze_Subprogram_Renaming):
3470 Handle self-renaming when the renamed entity is referenced using
3473 2012-01-30 Vincent Celier <celier@adacore.com>
3475 * projects.texi: Add documentation for attribute Interfaces.
3477 2012-01-30 Hristian Kirtchev <kirtchev@adacore.com>
3479 * exp_ch7.adb (Build_Finalizer_Call): Set loc again.
3480 * exp_ch11.adb (Expand_At_End_Handler): Do not provide a source
3481 location for the wrapped call to the original AT_END routine
3482 and the subsequent return statement.
3484 2012-01-30 Pascal Obry <obry@adacore.com>
3486 * s-rannum.adb: Minor reformatting.
3488 2012-01-30 Hristian Kirtchev <kirtchev@adacore.com>
3490 * a-calend-vms.adb, a-calend.adb: Increment the number of leap seconds
3491 to 25 and add the hard time value for 2012-06-30.
3493 2012-01-30 Robert Dewar <dewar@adacore.com>
3495 * a-strhas.ads, einfo.adb, einfo.ads, exp_ch7.adb, exp_ch9.adb,
3496 freeze.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-proc.adb, s-llflex.ads,
3497 s-ransee.adb, s-ransee.ads, sem_ch13.adb, sem_dim.adb, sem_prag.adb:
3498 Minor reformatting/code reorganization.
3500 2012-01-30 Thomas Quinot <quinot@adacore.com>
3502 * s-rannum.adb, s-ransee.adb, s-ransee.ads (Get_Seed): Return
3503 Unsigned_64 rather than Duration.
3504 (System.Random_Numbers.Reset): Use full value of seed
3505 (do not truncate sub-second bits).
3507 2012-01-30 Thomas Quinot <quinot@adacore.com>
3509 * sem_cat.adb, sem_ch12.adb: Minor reformatting.
3511 2012-01-30 Yannick Moy <moy@adacore.com>
3513 * gnat_ugn.texi: Minor correction of GNAT UG, to take into
3514 account changes to -gnatwa and more recent warnings.
3516 2012-01-30 Hristian Kirtchev <kirtchev@adacore.com>
3518 * exp_ch7.adb (Build_Finalizer_Call): Do not provide a source
3519 location when creating a call to a finalizer.
3520 * exp_ch11.adb (Expand_Exception_Handlers): Do not provide
3521 a source location for the first actual of Save_Occurrence for
3524 2012-01-30 Ed Schonberg <schonberg@adacore.com>
3526 * einfo.ads, einfo,adb: New attribute on scalar types:
3527 Default_Aspect_Value New attribute on array types:
3528 Default_Aspect_Component_Value Move attribute Related_Array_Object
3529 to a different position to accomodate new aspect attributes.
3530 * freeze.adb (Freeze_Entity): Use new attributes to retrieve value
3531 of defaults set with an aspect specification, rather than using
3532 the list of aspects attached to the type, to prevent issues with
3534 * sem_ch13.adb (Analyze_Aspect_Specifications): For aspects
3535 Default_Value and Default_Component _Value, store corresponding
3536 expression in type entity.
3537 (Check_Aspect_At_End_Of_Declaration): If the default aspects
3538 are declared on the full view, use the full view to resolve the
3539 correseponding expression.
3540 * exp_ch3.adb (Init_Component): Use attribute
3541 Default_Aspect_Component_Value to perform default initialization,
3542 rather than relying on the rep item list for the type.
3543 (Get_Simple_Init_Val): Ditto.
3545 2012-01-30 Thomas Quinot <quinot@adacore.com>
3547 * a-strhas.ads: Document risk of collision attack.
3549 2012-01-30 Yannick Moy <moy@adacore.com>
3551 * gnat_ugn.texi: Minor update wrt warning switches.
3553 2012-01-30 Vincent Celier <celier@adacore.com>
3555 * prj-nmsc.adb (Check_Interfaces): Report an error when a
3556 unit from Library_Interface is not a unit of the project.
3558 2012-01-30 Vincent Pucci <pucci@adacore.com>
3560 * sem_prag.adb (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Parent
3561 links fixed inside PPC pragmas.
3562 * sem_ch12.adb: Move call to Make_Aspect_For_PPC_In_Gen_Sub_Decl.
3564 2012-01-30 Thomas Quinot <quinot@adacore.com>
3566 * s-ransee.ads: Minor reformatting.
3568 2012-01-30 Pascal Obry <obry@adacore.com>
3570 * prj.ads, prj.adb (For_Each_Source): Add support for skipping
3571 sources coming from an encapsulated library.
3573 2012-01-30 Ed Schonberg <schonberg@adacore.com>
3575 * sem_ch3.adb (Process-Full_View): fix typo.
3576 * sem_ch13.adb (Aalyze_Aspect_Specifications): if predicates
3577 appear on a private type and the full view is available, ensure
3578 existence of freeze node for full view.
3579 (Build_Predicate_Function): Attach predicate function to both
3580 views of a private type.
3582 2012-01-30 Vincent Celier <celier@adacore.com>
3584 * prj-nmsc.adb (Check_Interfaces): Compute the Lib_Interface_ALIs
3585 for the project if either attribute Library_Interface or
3586 Interfaces is declared.
3587 (Check_Stand_Alone_Library): Use Lib_Interface_ALIs computed in
3590 2012-01-30 Pascal Obry <obry@adacore.com>
3592 * prj-proc.adb (Recursive_Process): Set From_Encapsulated_Lib
3593 boolean value to true in the process list created by this routine.
3594 * prj.ads (Project_List_Element): New field From_Encapsulated_Lib.
3595 Continued work for KA06-021.
3596 * prj.adb (Compute_All_Imported_Projects): Set
3597 From_Encapsulated_Lib boolean flag.
3599 2012-01-30 Vincent Pucci <pucci@adacore.com>
3601 * sem_dim.adb (Expand_Put_Call_With_Dimension_Symbol): Minor
3603 * s-diflio.ads: Minor change.
3605 2012-01-30 Javier Miranda <miranda@adacore.com>
3607 * exp_ch9.adb (Build_Dispatching_Requeue): Add missing call
3608 to Get_Entry_Index. Required to generate code which provides
3609 the correct value of Entry_Index in the target entry.
3611 2012-01-30 Nicolas Roche <roche@adacore.com>
3613 * system-vxworks-ppc.ads: Add pragma Linker_Options -crtbe to
3614 fix issue with zcx on VxWorks5.
3616 2012-01-30 Pascal Obry <obry@adacore.com>
3618 * prj.ads, prj.adb (For_Every_Project_Imported): Remove
3620 (For_Every_Project_Imported_Context): New generic routine with
3621 a context parameter.
3622 * prj-nmsc.adb: Revert to use For_Every_Project_Imported Avoid
3623 distributed complexity.
3624 * prj-env.adb, prj-conf.adb, makeutl.adb, gnatcmd.adb: Ditto.
3626 2012-01-30 Thomas Quinot <quinot@adacore.com>
3628 * exp_aggr.adb (Expand_Record_Aggregate): After creating the
3629 _parent aggregate for an extension aggregate, check whether it
3630 requires delayed (top-down) expansion.
3632 2012-01-30 Vincent Pucci <pucci@adacore.com>
3634 * sem_dim.adb (Expand_Put_Call_With_Dimension_Symbol): Rewritten.
3635 * snames.ads-tmpl: Name_Item and Name_Symbols added.
3636 * s-diflio.adb, s-diflio.ads, s-diinio.adb, s-diinio.ads: Rename
3637 and change the position of parameter Symbols in every Put routine.
3638 * s-dimmks.ads: Convert long float type Mks_Type into long
3640 * s-llflex.ads: Modifications in comments.
3642 2012-01-30 Hristian Kirtchev <kirtchev@adacore.com>
3644 * sem_ch12.adb (Earlier): Do not use the
3645 top level source locations of the two input nodes.
3647 2012-01-30 Robert Dewar <dewar@adacore.com>
3649 * einfo.ads, sem_prag.adb, sem_attr.adb, aspects.ads,
3650 sem_cat.adb, sem_aggr.adb, exp_aggr.adb: Minor reformatting.
3652 2012-01-30 Robert Dewar <dewar@adacore.com>
3654 * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb: Minor reformatting.
3656 2012-01-30 Olivier Hainque <hainque@adacore.com>
3658 * sigtramp-ppcvxw.c (CFI_COMMON_REGS): Add rule for r1 back +
3661 2012-01-30 Thomas Quinot <quinot@adacore.com>
3663 * gnat_rm.texi, sem_dist.adb, sem_dist.ads, einfo.ads, sem_prag.adb,
3664 sem_ch12.adb, sem_attr.adb, aspects.adb, aspects.ads, par-prag.adb,
3665 sem_cat.adb, snames.ads-tmpl (Sem_Dist.Is_Valid_Remote_Object_Type):
3666 New subprogram (extracted from
3667 Sem_Cat.Validate_Remote_Access_Object_Type_Declaration).
3668 (Einfo.Is_Remote_Types): Now applies to generic types. Update
3669 documentation accordingly.
3670 (Sem_Ch12.Analyze_Associations): A RACW type is acceptable as
3671 actual for a formal type to which a pragma Remote_Access_Type
3673 (Aspects, Par.Prag, Sem_Prag): Support for new pramga/aspect
3675 (Sem_Attr.Analyze_Attribute, case Stub_Type): Attribute can
3676 be applied to a generic type if pragma Remote_Access_Type
3677 applies, in which case the type of the attribute is
3678 System.Partition_Interface.RACW_Stub_Type.
3680 2012-01-27 Eric Botcazou <ebotcazou@adacore.com>
3682 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Do not set
3683 an alignment on fields of the RETURN type built for the CICO mechanism.
3685 2012-01-27 Eric Botcazou <ebotcazou@adacore.com>
3687 * gcc-interface/trans.c (gnat_to_gnu): Avoid making a SAVE_EXPR for
3688 a call to a function that returns an unconstrained type with default
3689 discriminant. Similarly, avoid doing the conversion to the nominal
3690 result type in this case.
3692 2012-01-27 Eric Botcazou <ebotcazou@adacore.com>
3694 * gcc-interface/ada-tree.h (DECL_ALIASED_P): New flag.
3695 * gcc-interface/decl.c (is_variable_size): Rename to...
3696 (type_has_variable_size): ...this.
3697 (adjust_packed): Adjust to above renaming.
3698 (gnat_to_gnu_field): Set DECL_ALIASED_P on the field.
3699 (field_is_artificial): New predicate.
3700 (field_is_aliased): Likewise.
3701 (field_has_self_size): Likewise.
3702 (field_has_variable_size): Likewise.
3703 (components_to_record): Record information for the final layout during
3704 the first pass on fields.
3705 If there is an aliased field placed after a field whose length depends
3706 on discriminants, put all the fields of the latter sort, last.
3708 2012-01-27 Eric Botcazou <ebotcazou@adacore.com>
3710 * gcc-interface/gigi.h (get_minimal_subprog_decl): Declare.
3711 * gcc-interface/decl.c (get_minimal_subprog_decl): New function.
3712 * gcc-interface/trans.c (Attribute_to_gnu): Use it for the prefix of an
3713 Access-like attribute in a dispatch table if the subprogram is public.
3715 2012-01-27 Eric Botcazou <ebotcazou@adacore.com>
3717 * gcc-interface/gigi.h (create_label_decl): Adjust.
3718 * gcc-interface/utils.c (create_label_decl): Add GNAT_NODE parameter
3719 and invoke gnat_pushdecl on it. Remove obsolete settings.
3720 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Label>: Adjust call to
3722 * gcc-interface/trans.c (gnat_to_gnu) <N_Null): Likewise. Ignore the
3723 label for debugging purposes.
3725 2012-01-27 Eric Botcazou <ebotcazou@adacore.com>
3727 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: For an aliased
3728 object with an unconstrained nominal subtype and if optimization isn't
3729 enabled, create a special VAR_DECL for debugging purposes.
3731 2012-01-23 Robert Dewar <dewar@adacore.com>
3733 * sem_prag.ads, sem_prag.adb: Minor reformatting.
3735 2012-01-23 Robert Dewar <dewar@adacore.com>
3737 * sem_ch13.adb (Analyze_Aspect_Specifications): Check for
3738 language defined aspect applied to renaming or formal type
3739 declaration (not permitted)
3741 2012-01-23 Matthew Heaney <heaney@adacore.com>
3743 * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb (Vet): Replaced
3744 comment with pragma Assert.
3746 2012-01-23 Vincent Pucci <pucci@adacore.com>
3748 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Call
3749 to Make_Aspect_For_PPC_In_Gen_Sub_Decl added in ASIS mode.
3750 * sem_prag.adb, sem_prag.ads (Make_Aspect_For_PPC_In_Gen_Sub_Decl): New
3751 routine. In ASIS mode, convert any PPC pragmas into aspects in generic
3752 subprogram declaration in order to enable the analysis of PPC boolean
3755 2012-01-23 Robert Dewar <dewar@adacore.com>
3757 * sem_ch3.adb (Analyze_Object_Declaration): Properly
3758 handle Current_Value for volatile variables (also propagate
3759 Treat_As_Volatile from type to object).
3761 2012-01-23 Hristian Kirtchev <kirtchev@adacore.com>
3763 * sem_ch12.adb (Install_Body): Detect the case
3764 where the enclosing context is a package with a stub body that
3765 has already been replaced by the actual body. In such cases,
3766 the freeze node for the enclosing context must be inserted after
3769 2012-01-23 Ed Schonberg <schonberg@adacore.com>
3771 * sem_prag.adb (Analyze_Pragma, case Debug): Freeze the called
3772 subprogram before expanding the pragma into an if-statement with
3773 a block, to ensure that when the subprogram is null its body is
3774 properly generated before expansion.
3776 2012-01-23 Hristian Kirtchev <kirtchev@adacore.com>
3778 * sem_ch12.adb (Analyze_Associations): Alphabetize local variables and
3779 constants. Rename Actual_Types to Actuals_To_Freeze. Rename Next_Formal
3781 Freeze all eligible subprograms which appear as actuals in
3783 (Has_Fully_Defined_Profile): New routine.
3784 (Renames_Standard_Subprogram): New routine.
3785 (Earlier): Add local variable N. Comment update. Do not use source
3786 locations when trying to determine whether one node precedes another.
3788 2012-01-23 Gary Dismukes <dismukes@adacore.com>
3790 * exp_ch4.adb (Expand_Concatenate): In the case
3791 where the result of a concatentation can be null, set the to
3792 result have both the low and high bounds of the right operand (not
3793 just the high bound, as was the case prior to this fix). Also,
3794 fix the saved high bound setting (Last_Opnd_High_Bound) in the
3795 empty string literal case (should have been low bound minus one,
3796 rather than plus one).
3798 2012-01-23 Thomas Quinot <quinot@adacore.com>
3800 * scos.ads, put_scos.adb, get_scos.adb (Get_SCOs, Put_SCOs): Do not
3801 omit statement SCOs for disabled pragmas.
3803 2012-01-23 Matthew Heaney <heaney@adacore.com>
3805 * a-cohase.ads, a-cihase.ads, a-cbhase.ads, a-coorse.ads,
3806 a-ciorse.ads, a-cborse.ads, a-cohama.ads, a-cihama.ads, a-cbhama.ads,
3807 a-coorma.ads, a-ciorma.ads, a-cborma.ads, a-cdlili.ads, a-cidlli.ads,
3808 a-cbdlli.ads, a-convec.ads, a-coinve.ads, a-cobove.ads (Cursor'Read,
3809 Cursor'Write): Declare in private part.
3810 (Reference_Type'Read, Reference_Type'Write): Ditto.
3811 (Constant_Reference_Type'Read, Constant_Reference_Type'Write): Ditto.
3813 2012-01-23 Robert Dewar <dewar@adacore.com>
3815 * a-catizo.ads, a-calend.adb, a-calend.ads, par-ch13.adb: Minor
3818 2012-01-23 Ed Schonberg <schonberg@adacore.com>
3820 * sem_ch6.adb (Analyze_Subprogram_Declaration): Do not set the
3821 Corresponding_Body on a defaulted null formal subprogram.
3822 * sem_ch12.adb (Check_Formal_Package_Instance): No check needed
3823 on a defaulted formal subprogram that is a null procedure.
3825 2012-01-23 Hristian Kirtchev <kirtchev@adacore.com>
3827 * exp_ch9.adb: Update the comments involving pragma Implemented.
3828 * sem_ch3.adb (Check_Pragma_Implemented (Entity_Id)): Add local
3829 constant Subp_Alias and local variable Impl_Subp. Properly
3830 handle aliases of synchronized wrappers. Code cleanup.
3831 (Check_Pragma_Implemented (Entity_Id; Entity_Id)): Add
3832 Name_Optional as part of the condition.
3833 * sem_prag.adb (Analyze_Pragma): Add "Optional" as one of the
3834 valid choices of implementation kind.
3835 (Check_Arg_Is_One_Of): New routine.
3836 * snames.ads-tmlp: Add Name_Optional.
3838 2012-01-23 Ed Schonberg <schonberg@adacore.com>
3840 * par-ch13.adb: Better error recovery in illegal aspect
3843 2012-01-23 Hristian Kirtchev <kirtchev@adacore.com>
3845 * a-calend.adb: Add with clause for Interfaces.C. Add constant
3847 (Day_Of_Week): Call the internal UTC_Time_Offset.
3848 (Split): Call the internal UTC_Time_Offset.
3849 (Time_Of): Call the internal UTC_Time_Offset.
3850 (Time_Zone_Operations.UTC_Time_Offset): Call internal UTC_Time_Offset.
3851 (UTC_Time_Offset): New library-level routine.
3852 * a-calend.ads (UTC_Time_Offset): Remove parameter
3853 Is_Historic. Update related comment on usage.
3854 * a-catizo.adb (UTC_Time_Offset): Removed.
3855 (UTC_Time_Offset (Time)): Call Time_Zone_Operations.UTC_Time_Offset.
3856 * a-caltizo.ads (UTC_Time_Offset): Removed.
3857 (UTC_Time_Offset (Time)): Add back the default expression of parameter
3860 2012-01-23 Robert Dewar <dewar@adacore.com>
3862 * sprint.ads, sprint.adb (Sprint_Node_List): Add New_Lines parameter
3863 (pg,po,ps): Make sure each entry starts on new line.
3865 2012-01-23 Hristian Kirtchev <kirtchev@adacore.com>
3867 * a-calend.ads, a-calend.adb: Define types int and int_Pointer. Update
3868 the parameter profile of procedure localtime_tzoff and its associated
3870 (Day_Of_Week): Do not treat the input date as historical
3871 with respect to time zones.
3872 (Split): Do not treat the input
3873 date as historical with respect to time zones. (Time_Of): Do
3874 not treat the input constituents as forming a historical date
3875 with respect to time zones.
3876 (UTC_Time_Offset): Add new formal
3877 parameter Is_Historic. Add local variable Flag. Update the call
3879 * a-catizo.ads, a-catizo.adb (UTC_Time_Offset): New routine.
3880 (UTC_Time_Offset (Time)): Update the call to
3881 Time_Zone_Operations.UTC_Time_Offset.
3882 * sysdep.c (__gnat_localtime_tzoff): Update parameter
3883 profile. Split the processing of offsets on Windows into two - one
3884 part of historic time stamps and the other for the current time.
3886 2012-01-23 Robert Dewar <dewar@adacore.com>
3888 * a-calend.adb: Minor reformatting.
3890 2012-01-23 Ed Schonberg <schonberg@adacore.com>
3892 * exp_ch9.adb, sem_ch9.adb: Handle array of access to synchronized
3893 interface in requeue statement.
3895 2012-01-23 Cyrille Comar <comar@adacore.com>
3897 * projects.texi: Remove references to main units and replace
3898 with references to main programs to be coherent with the
3901 2012-01-23 Robert Dewar <dewar@adacore.com>
3903 * s-utf_32.adb: Minor reformatting.
3905 2012-01-23 Vincent Celier <celier@adacore.com>
3907 * snames.ads-tmpl: Minor comment addition Indicate that
3908 Name_Library_Encapsulated_Options is only used in gprbuild.
3910 2012-01-23 Robert Dewar <dewar@adacore.com>
3912 * sem_ch10.adb (Analyze_Subunit): Properly save/restore cunit
3915 2012-01-23 Ed Schonberg <schonberg@adacore.com>
3917 * snames.ads-tmpl: Add Name_Synchronization.
3918 * aspects.ads, aspects.adb: Add Aspect_Synchronization to
3919 enumeration type and related maps.
3920 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle Aspect
3921 Synchronization, build corresponding pragma Implemented.
3922 * sem_util.adb (Implementation_Kind): Handle both explicit and
3923 implicit pragma_argument association to retrieve the given
3924 synchronization mode.
3926 2012-01-23 Robert Dewar <dewar@adacore.com>
3928 * sem_ch10.adb, errout.adb: Minor reformatting.
3930 2012-01-23 Ed Schonberg <schonberg@adacore.com>
3932 * sem_res.adb (Resolve_Actuals): An actual in a call to an
3933 Ada 2012 Reference function does not lead to a dangerous order
3936 2012-01-23 Gary Dismukes <dismukes@adacore.com>
3938 * exp_util.adb (Is_Iterated_Container): Test
3939 Is_Entity_Name when searching for calls to the default iterator,
3940 to avoid blowing up on indirect calls which have an explicit
3941 dereference as the call name.
3943 2012-01-23 Thomas Quinot <quinot@adacore.com>
3945 * errout.adb (Set_Msg_Node): For an N_Expanded_Name, output
3946 the complete expanded name, rather than just its Selector_Name.
3948 2012-01-23 Thomas Quinot <quinot@adacore.com>
3950 * a-textio.adb (Put): Rewrite one-parameter Character version to
3951 just call the two-parameter one with Current_Out.
3953 2012-01-23 Hristian Kirtchev <kirtchev@adacore.com>
3955 * freeze.adb (Check_Current_Instance): Issue an
3956 error when the prefix of 'Unchecked_Access or 'Access does not
3957 denote a legal aliased view of a type.
3958 (Freeze_Record_Type): Do not halt the processing of record components
3959 once the Has_Controlled_Component is set as this bypasses the remaining
3961 (Is_Aliased_View_Of_Type): New routine.
3963 2012-01-23 Thomas Quinot <quinot@adacore.com>
3965 * errout.ads, freeze.adb: Minor reformatting.
3967 2012-01-23 Thomas Quinot <quinot@adacore.com>
3969 * sem_ch10.adb, sem_prag.adb: Remove redundant apostrophes in error
3972 2012-01-23 Olivier Hainque <hainque@adacore.com>
3974 * adadecode.c (__gnat_decode): Deal with empty input early,
3975 preventing potential erroneous memory access later on.
3977 2012-01-21 Eric Botcazou <ebotcazou@adacore.com>
3980 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: In the case of a
3981 renaming, preserve the volatileness through the indirection, if any.
3983 2012-01-14 Andreas Schwab <schwab@linux-m68k.org>
3985 * gcc-interface/Makefile.in (OSCONS_EXTRACT): Add
3988 2012-01-10 Pascal Obry <obry@adacore.com>
3990 * prj-nmsc.adb (Check_Library_Attributes):
3991 Kill check for object/source directories for aggregate libraries.
3993 2012-01-10 Matthew Heaney <heaney@adacore.com>
3995 * a-cdlili.adb, a-cdlili.ads, a-cihama.adb, a-cihama.ads, a-coinve.adb,
3996 a-coinve.ads, a-ciorse.adb, a-ciorse.ads, a-coorma.adb, a-coorma.ads,
3997 a-cborma.adb, a-cborma.ads, a-cidlli.adb, a-cidlli.ads, a-cimutr.adb,
3998 a-cimutr.ads, a-cihase.adb, a-cihase.ads, a-cohama.adb, a-cohama.ads,
3999 a-coorse.adb, a-coorse.ads, a-cbhama.adb, a-cbhama.ads, a-cborse.adb,
4000 a-cborse.ads, a-comutr.adb, a-comutr.ads, a-ciorma.adb, a-cobove.adb,
4001 a-ciorma.ads, a-cobove.ads, a-convec.adb, a-convec.ads, a-cohase.adb,
4002 a-cohase.ads, a-cbdlli.adb, a-cbdlli.ads, a-cbmutr.adb, a-cbmutr.ads,
4003 a-cbhase.adb, a-cbhase.ads (Reference, Constant_Reference): Declare
4004 container parameter as aliased in/in out.
4007 2012-01-10 Bob Duff <duff@adacore.com>
4009 * s-os_lib.ads: Improve comment.
4011 2012-01-10 Geert Bosch <bosch@adacore.com>
4013 * s-gearop.adb (Forward_Eliminate): Avoid improper aliasing
4016 2012-01-10 Bob Duff <duff@adacore.com>
4018 * sem_intr.adb (Check_Shift): Use RM_Size instead of Esize, when
4019 checking that the 'Size is correct. If the type is "mod 2**12",
4020 for example, it's illegal, but Esize is the 'Object_Size, which
4021 will be something like 16 or 32, so the error ('Size = 12) was
4023 * gnat_rm.texi: Improve documentation of shift
4024 and rotate intrinsics.
4026 2012-01-10 Pascal Obry <obry@adacore.com>
4028 * prj.adb (For_Every_Project_Imported): Fix
4029 implementation to make sure we return each project only once
4030 for aggragte libraries. It is fine to return a project twice for
4031 aggregate projects, this was the case as a Project_Id is different
4032 in each project tree. The new implementation use a table based on
4033 the project name to ensure proper detection of duplicate project
4034 in aggregate library. A new context is then created to continue
4035 retrurning duplicate project for aggregate libraries.
4037 2012-01-09 Eric Botcazou <ebotcazou@adacore.com>
4039 * gcc-interface/trans.c (call_to_gnu): Create the temporary for the
4040 return value in the variable-sized return type case if the target is
4041 an array with fixed size. However, do not create it if this is the
4042 expression of an object declaration.
4044 2012-01-09 Eric Botcazou <ebotcazou@adacore.com>
4046 * gcc-interface/trans.c (addressable_p) <COMPONENT_REF>: Fix thinko.
4048 2012-01-06 Robert Dewar <dewar@adacore.com>
4050 * a-wichha.ads, a-wichun.ads, a-zchhan.ads, a-zchuni.ads,
4051 s-utf_32.ads: Add pragma Pure
4052 * s-utf_32.adb: Suppress warnings on non-static constants (now
4055 2012-01-06 Bob Duff <duff@adacore.com>
4057 * s-rpc.ads (Read, Write): Add overriding indicators.
4059 2012-01-06 Robert Dewar <dewar@adacore.com>
4061 * gnat_rm.texi: Add documentation for conventions
4062 Ada_Pass_By_Copy and Ada_Pass_By_Reference.
4064 2012-01-06 Gary Dismukes <dismukes@adacore.com>
4066 * a-tienio.adb (Put): Add exception message on
4067 raise statements. Remove unneeded blocks and object declarations.
4069 2012-01-06 Robert Dewar <dewar@adacore.com>
4071 * sem_prag.adb: Minor reformatting.
4073 2012-01-06 Ed Schonberg <schonberg@adacore.com>
4075 * sinfo.ads, sinfo.adb (Has_Prefixed_Call): New flag to indicate
4076 that a selected component within a generic unit has been resolved
4077 as a prefixed call with local references.
4078 * sem_ch3.adb (Is_Visible_Component): In an instance body a selected
4079 component is always visible.
4080 * sem_ch4.adb (Analyze_Selected_Component): If the node is a
4081 prefixed call in an instance, do not look for visible components
4083 * sem_ch12.adb (Reset_Entity): If a selected component has resolved
4084 to a prefixed call, mark the node accordingly when prefix and
4085 selector are local references.
4087 2012-01-02 Eric Botcazou <ebotcazou@adacore.com>
4089 * gnatvsn.ads (Current_Year): Bump to 2012.
4091 Copyright (C) 2012 Free Software Foundation, Inc.
4093 Copying and distribution of this file, with or without modification,
4094 are permitted in any medium without royalty provided the copyright
4095 notice and this notice are preserved.