1 2012-11-06 Pascal Obry <obry@adacore.com>
3 * xoscons.adb, xutil.adb, xutil.ads: Add support for post-processing.
5 2012-11-06 Yannick Moy <moy@adacore.com>
7 * s-bignum.adb (Div_Rem): Fix another bug in step D3.
9 2012-11-06 Tristan Gingold <gingold@adacore.com>
11 * s-tarest.adb (Create_Restricted_Task): Call
12 Create_Restricted_Task_Sequential in sequential case.
14 2012-11-06 Hristian Kirtchev <kirtchev@adacore.com>
16 * exp_prag.adb (Expand_Pragma_Loop_Assertion): Do not rewrite the
17 pragma into a null statement as its presence is desirable in -gnatG
20 2012-11-06 Ed Schonberg <schonberg@adacore.com>
22 * sem_ch8.adb (Check_Constrained_Object): Do nothing if the
23 renamed object is a limited record.
25 2012-11-06 Bernard Banner <banner@adacore.com>
27 * sysdep.c (_getpagesize): New. Minor reformatting.
29 2012-11-06 Robert Dewar <dewar@adacore.com>
31 * sem_prag.adb: Minor reformatting.
33 2012-11-06 Robert Dewar <dewar@adacore.com>
35 * s-bignum.adb (Div_Rem): Fix bug in step D3.
36 * uintp.adb (UI_Div_Rem): Add comment on bug in step D3.
38 2012-11-06 Hristian Kirtchev <kirtchev@adacore.com>
40 * exp_prag.adb (Expand_Pragma_Loop_Assertion): Update the comment
41 on intended expansion. Reimplement the logic which expands the
43 (Process_Increase_Decrease): Update the parameter profile and the
44 comment related to it. Accommodate the new aggregate-like appearance of
45 the termination variants.
46 * sem_prag.adb (Analyze_Pragma): Update the syntax of pragma
47 Loop_Assertion. Reimplement the semantic analysis of the pragma
48 to accommodate the new aggregate-like variant.
49 (Check_Variant): New routine.
50 * snames.ads-tmpl: Change names Name_Decreases and Name_Increases
51 to Name_Decreasing and Name_Increasing respectively. Add name
54 2012-11-06 Ed Schonberg <schonberg@adacore.com>
56 * sem_eval.adb: Static evaluation of case expressions.
58 2012-11-06 Robert Dewar <dewar@adacore.com>
60 * exp_prag.adb, impunit.adb, exp_ch9.adb, par-ch4.adb,
61 s-tarest.adb: Minor reformatting.
63 2012-11-06 Tristan Gingold <gingold@adacore.com>
65 * s-tposen.ads: Minor comment update.
67 2012-11-06 Arnaud Charlet <charlet@adacore.com>
69 * sysdep.c: Rename sig* wrappers to use unique names.
71 2012-11-06 Yannick Moy <moy@adacore.com>
73 * exp_dbug.adb (Qualify_Entity_Name): Mark entity as having a qualified
74 name after being treated, in formal verification mode.
76 2012-11-06 Fedor Rybin <frybin@adacore.com>
78 * gnat_ugn.texi: Updating gnattest section to reflect changes
79 in default behaviour of the tool.
81 2012-11-06 Thomas Quinot <quinot@adacore.com>
83 * s-oscons-tmplt.c: Interfaces.C now needs to be WITH'd even
84 on platforms that do not support sockets (for the benefit of
87 2012-11-06 Ed Schonberg <schonberg@adacore.com>
89 * par-ch4.adb (P_Primary): if-expressions, case-expressions,
90 and quantified expressions are legal if surrounded by parentheses
91 from an enclosing context, such as a call or an instantiation.
93 2012-11-06 Yannick Moy <moy@adacore.com>
95 * impunit.adb (Get_Kind_Of_Unit): Return appropriate kind for
96 predefined implementation files, instead of returning
97 Not_Predefined_Unit on all .adb files.
99 2012-11-06 Tristan Gingold <gingold@adacore.com>
101 * exp_ch9.adb (Build_Activation_Chain_Entity): Return immediately if
102 partition elaboration policy is sequential.
103 (Build_Task_Activation_Call): Likewise. Use
104 Activate_Restricted_Tasks on restricted profile.
105 (Make_Task_Create_Call): Do not use the _Chain
106 parameter if elaboration policy is sequential. Call
107 Create_Restricted_Task_Sequential in that case.
108 * exp_ch3.adb (Build_Initialization_Call): Change condition to
109 support concurrent elaboration policy.
110 (Build_Record_Init_Proc): Likewise.
111 (Init_Formals): Likewise.
112 * bindgen.adb (Gen_Adainit): Declare Partition_Elaboration_Policy
113 and set it in generated code if the elaboration policy is
114 sequential. The procedure called to activate all tasks is now
115 named __gnat_activate_all_tasks.
116 * rtsfind.adb (RE_Activate_Restricted_Task,
117 RE_Create_Restricted_Task_Sequential): New RE_Id literals.
118 * s-tarest.adb (Create_Restricted_Task): Added to create a task without
119 adding it on an activation chain.
120 (Activate_Tasks): Has now a Chain parameter.
121 (Activate_All_Tasks_Sequential): Added. Called by the binder to
123 (Activate_Restricted_Tasks): Added. Called during elaboration to
124 activate tasks of the units.
125 * s-tarest.ads: Remove pragma Partition_Elaboration_Policy.
126 (Partition_Elaboration_Policy): New variable (set by the binder).
127 (Create_Restricted_Task): Revert removal of the chain parameter.
128 (Create_Restricted_Task_Sequential): New procedure.
129 (Activate_Restricted_Tasks): Revert removal.
130 (Activate_All_Tasks_Sequential): New procedure.
132 2012-11-06 Bernard Banner <banner@adacore.com>
134 * adaint.c Add file macro definitions missing on Android.
135 * adaint.h Avoid definitions related to task affinity and CPU
136 sets since this functionality is missing on the Android
137 * errno.c (__set_errno): Android already contains such a named
138 procedure so do include again.
139 * gsocket.h: Sockets not supported on Android.
140 * init.c: Avoid linux related code not supported on Android.
141 * sysdep.c (sigismember, sigaddset, sigdelset, sigemptyset,
142 sigfillset): wrapper functions since sig routines are defined
143 as inline macros on Android.
144 * terminals.c: Add stubs for terminal related functions not
145 supported on Android.
147 2012-11-06 Hristian Kirtchev <kirtchev@adacore.com>
149 * sem_prag.adb (Analyze_Pragma): Do not
150 output the characters of an illegal argument as it may not have
151 characters to begin with.
153 2012-11-06 Hristian Kirtchev <kirtchev@adacore.com>
155 * exp_prag.adb (Expand_Pragma_Loop_Assertion):
156 Change the order of argument processing to avoid disappearing
157 increase / decrease expressions.
159 2012-11-06 Hristian Kirtchev <kirtchev@adacore.com>
161 * exp_prag.adb: Add with and use clause for Sem_Ch8.
162 (Expand_N_Pragma): Add a new variant to expand pragma Loop_Assertion.
163 (Expand_Pragma_Loop_Assertion): New routine.
164 * par-prag.adb (Prag): The semantic analysis of pragma
165 Loop_Assertion is carried out by Analyze_Pragma. No need for
166 checks in the parser.
167 * sem_prag.adb: Add a reference position value for pragma
168 Loop_Assertion in Sig_Flags.
169 (Analyze_Pragma): Add semantic analysis for pragma Loop_Assertion.
170 * snames.ads-tmpl: Add the following new names:
171 Name_Decreases Name_Increases Name_Loop_Assertion.
172 Add new pragma id Pragma_Loop_Assertion.
174 2012-11-06 Ed Schonberg <schonberg@adacore.com>
176 * exp_ch5.adb: Identifier in iterator must have debug
179 2012-11-06 Arnaud Charlet <charlet@adacore.com>
181 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Remove
182 duplicate rules handled by Make-generated.in.
184 2012-10-31 Lawrence Crowl <crowl@google.com>
186 * gcc-interface/utils.c (gnat_write_global_declarations):
187 Rename varpool_node to varpool_node_for_decl.
189 2012-10-30 Eric Botcazou <ebotcazou@adacore.com>
191 * gcc-interface/Make-lang.in: Fix and clean up rules for C files.
193 2012-10-29 Arnaud Charlet <charlet@adacore.com>
195 * gcc-interface/Makefile.in (s-oscons.ads): Adjust call to xoscons.
197 2012-10-29 Pascal Obry <obry@adacore.com>
199 * xoscons.adb, Make-generated.in; The template used by xoscons is now
201 * gcc-interface/Make-lang.in: Update dependencies.
203 2012-10-29 Yannick Moy <moy@adacore.com>
205 * exp_dbug.adb (Qualify_Entity_Name): Only do renaming in formal
206 verification mode when there is a homonym.
208 2012-10-29 Thomas Quinot <quinot@adacore.com>
210 * xoscons.adb: Minor reformatting.
212 2012-10-29 Yannick Moy <moy@adacore.com>
214 * exp_alfa.adb (Expand_Alfa): Backtrack change that removed
215 qualification of names in formal verification mode. Instead,
216 the qualification should be modified.
217 * exp_dbug.adb (Qualify_Entity_Name): Modify qualification in formal
218 verification mode, so that only a suffix is added to distinguish
219 homonyms from the same scope.
221 2012-10-29 Robert Dewar <dewar@adacore.com>
223 * gnat_rm.texi: Document that pragma Optimize_Alignment (Space) is
224 ignored with a warning for packed variable length records.
226 2012-10-29 Thomas Quinot <quinot@adacore.com>
228 * socket.c, g-socthi-dummy.adb, g-socthi-dummy.ads, g-socthi-vms.adb,
229 g-socthi-vms.ads, g-socthi-vxworks.adb, g-socthi-vxworks.ads,
230 s-oscons-tmplt.c, g-socthi-mingw.adb, g-socthi-mingw.ads, g-socthi.adb,
231 g-socthi.ads, xoscons.adb, g-socket.adb, g-sothco.ads: Introduce an
232 appropriate subtype for IOCTL requests, since these may be signed or
235 2012-10-29 Gary Dismukes <dismukes@adacore.com>
237 * exp_alfa.adb: Minor reformatting.
239 2012-10-29 Robert Dewar <dewar@adacore.com>
241 * gnat_rm.texi, gnat_ugn.texi: Clarify documentation on maximum
242 line length style switch.
244 2012-10-29 Robert Dewar <dewar@adacore.com>
246 * layout.adb (Set_Composite_Alignment): Ignore pragma
247 Optimize_Alignment (Space) for packed variable length records.
249 2012-10-29 Robert Dewar <dewar@adacore.com>
251 * s-bignum.adb: Minor comment change.
253 2012-10-29 Thomas Quinot <quinot@adacore.com>
255 * s-oscons-tmplt.c: Fix signedness of ioctl request identifiers
258 2012-10-29 Yannick Moy <moy@adacore.com>
260 * exp_alfa.adb (Expand_Alfa): Remove qualification of names.
262 2012-10-29 Robert Dewar <dewar@adacore.com>
264 * sem_prag.adb: Minor reformatting.
266 2012-10-29 Robert Dewar <dewar@adacore.com>
268 * gnat_rm.texi: Minor rewording.
270 2012-10-29 Javier Miranda <miranda@adacore.com>
272 * exp_disp.ads (Is_Expanded_Dispatching_Call): New subprogram.
273 * exp_disp.adb (Expand_Dispatching_Call): No action needed if the
274 call has been already expanded.
275 (Is_Expanded_Dispatching_Call): New subprogram.
276 * sem_disp.adb (Propagate_Tag): No action needed if the call
277 has been already expanded.
279 2012-10-29 Hristian Kirtchev <kirtchev@adacore.com>
281 * exp_ch9.adb (Create_Index_And_Data): Remove local
282 variable Index_Typ and its uses. The type of the index is now
283 System.Tasking.Entry_Index. Update all related comments.
284 * rtsfind.ads: Add RE_Entry_Index in tables RE_Id and RE_Unit_Table.
285 * s-taskin.adb (Number_Of_Entries): The return type is now Entry_Index.
286 * s-taskin.ads: The index type of Task_Entry_Names_Array is now
288 (Number_Of_Entries): The return type is now Entry_Index.
289 * s-tpoben.adb (Number_Of_Entries): The return type is now Entry_Index.
290 * s-tpoben.ads: The index type of Protected_Entry_Names_Array
292 (Number_Of_Entries): The return type is now Entry_Index.
294 2012-10-29 Pascal Obry <obry@adacore.com>
296 * gnat_ugn.texi: Add note about SEH setup on x86-windows.
298 2012-10-29 Eric Botcazou <ebotcazou@adacore.com>
300 * s-bignum.adb (Allocate_Bignum): Use the exact layout of
301 Bignum_Data for the overlay.
303 2012-10-29 Thomas Quinot <quinot@adacore.com>
305 * gnat_rm.texi, sem_prag.adb, sem_util.adb, sem_util.ads,
306 par-prag.adb, par-util.adb, snames.ads-tmpl (Sem_Prag.Analyze_Pragma):
307 Handle new pragma Attribute_Definition.
308 (Sem_Util.Bad_Attribute): New routine, moved here
309 from par-util, so that it can be used by the above.
310 (Par_Util.Signal_Bad_Attribute): Processing moved to
311 Sem_Util.Bad_Attribute.
313 2012-10-29 Robert Dewar <dewar@adacore.com>
315 * s-tpoben.ads, s-taskin.ads, exp_ch3.adb: Minor reformatting.
317 2012-10-29 Yannick Moy <moy@adacore.com>
319 * sem_prag.adb, gnat1drv.adb, opt.ads: Rename S14_Extensions
320 into Formal_Extensions.
322 2012-10-29 Thomas Quinot <quinot@adacore.com>
324 * sem_attr.adb: Minor reformatting.
326 2012-10-29 Tristan Gingold <gingold@adacore.com>
328 * gnat_rm.texi: Document implementation advice for Pragma
329 Partition_Elaboration_Policy.
331 2012-10-29 Yannick Moy <moy@adacore.com>
333 * s-bignum.adb (Div_Rem): Reference that Algorithm_D is from
334 the second edition of TAOCP from Knuth, since the algo changed
335 in the third edition. Also correct the definition of 'd' which
338 2012-10-29 Hristian Kirtchev <kirtchev@adacore.com>
340 * exp_ch3.adb (Build_Initialization_Call): Create static strings
341 which denote entry [family] names and associate them with the
342 object's Protection_Entries or ATCB.
343 (Build_Init_Statements):
344 Remove local variable Names. Do not generate the entry [family]
345 names inside the init proc because they are now static.
346 * exp_ch9.adb (Build_Entry_Names): Reimplemented. The strings
347 which denote entry [family] names are now generated statically
348 and associated with the concurrent object's Protection_Entries
349 or ATCB during initialization.
350 * exp_ch9.ads (Build_Entry_Names): Change subprogram profile
351 and associated comment on usage.
352 * rtsfind.ads: Add the following entries to tables RE_Id and
355 RE_Protected_Entry_Names_Array RE_Task_Entry_Names_Array
356 RO_PE_Number_Of_Entries RO_PE_Set_Entry_Names
357 RO_ST_Number_Of_Entries RO_ST_Set_Entry_Names
359 Remove the following entries from tables RE_Id and RE_Unit_Table:
361 RO_PE_Set_Entry_Name RO_TS_Set_Entry_Name
363 * s-taskin.adb: Remove with clause for Ada.Unchecked_Deallocation.
364 (Free_Entry_Names_Array): Removed.
365 (Number_Of_Entries): New routine.
366 (Set_Entry_Names): New routine.
367 * s-taskin.ads: Rename type Entry_Names_Array to
368 Task_Entry_Names_Array. Rename type Entry_Names_Array_Access
369 to Task_Entry_Names_Access. Update the type of ACTB field
370 Entry_Names and add a comment on its protection status.
371 (Free_Entry_Names_Array): Removed.
372 (Number_Of_Entries): New routine.
373 (Set_Entry_Names): New routine.
374 * s-tassta.adb (Create_Task): Remove formal parameter
375 Build_Entry_Names. Do not allocate an array to hold the
376 string names of entries and families.
377 (Free_Entry_Names): Removed.
378 (Free_Task): Remove the call to Free_Entry_Names.
379 (Set_Entry_Name): Removed.
380 (Vulnerable_Free_Task): Remove the call to Free_Entry_Names.
381 * s-tassta.ads (Create_Task): Remove formal parameter
382 Build_Entry_Names along with associated comment.
383 (Set_Entry_Name): Removed.
384 * s-tpoben.adb: Remove with clause for Ada.Unchecked_Deallocation.
385 (Finalize): Remove the call to Free_Entry_Names.
386 (Free_Entry_Names): Removed.
387 (Initialize_Protection_Entries):
388 Remove formal parameter Build_Entry_Names. Do not allocate
389 an array to hold the string names of entries and families.
390 (Number_Of_Entries): New routine.
391 (Set_Entry_Name): Removed.
392 (Set_Entry_Names): New routine.
393 * s-tpoben.ads: Add types Protected_Entry_Names_Array and
394 Protected_Entry_Names_Access. Update the type of Protection_Enties
396 (Initialize_Protection_Entries): Remove
397 formal parameter Build_Entry_Names along with associated comment.
398 (Number_Of_Entries): New routine.
399 (Set_Entry_Name): Removed.
400 (Set_Entry_Names): New routine.
402 2012-10-29 Arnaud Charlet <charlet@adacore.com>
404 * gnat_ugn.texi: Minor typo fix.
405 2012-10-29 Yannick Moy <moy@adacore.com>
407 * debug.adb Associate debug switch -gnatd.V to extensions for
409 * gnat1drv.adb (Adjust_Global_Switches): Set flag S14_Extensions
410 when -gnatd.V is set.
411 * gnat_rm.texi: Remove doc for Assert_And_Cut.
412 * opt.ads Declare new flag S14_Extensions, to be set when new
413 aspects/pragmas/attributes for formal verification should be
415 * sem_prag.adb (Analyze_Pragma): Check that S14_Extensions is
416 set when treating pragma Assert_And_Cut.
418 2012-10-29 Tristan Gingold <gingold@adacore.com>
420 * s-tarest.ads, s-tassta.adb: Add a pragma Partition_Elaboration_Policy.
422 2012-10-29 Robert Dewar <dewar@adacore.com>
424 * freeze.adb: Minor reformatting.
426 2012-10-29 Robert Dewar <dewar@adacore.com>
428 * xr_tabls.adb, xr_tabls.ads, exp_ch9.adb, snames.adb-tmpl,
429 snames.ads-tmpl, exp_ch3.adb: Minor reformatting.
431 2012-10-29 Ed Schonberg <schonberg@adacore.com>
433 * sem_ch6.adb: Call Build_Subprogrm_Instance_Renamings only when
436 2012-10-29 Robert Dewar <dewar@adacore.com>
438 * gnat_ugn.texi: Add documentation for -gnatw.k/-gnatw.K.
439 * ug_words: Add entries for -gnatw.k/.K for [NO]STANDARD_REDEFINITION.
440 * vms_data.ads: Add entries for [NO]STANDARD_REDEFINITION.
442 2012-10-29 Tristan Gingold <gingold@adacore.com>
444 * exp_ch9.adb, s-tarest.ads, exp_ch3.adb: Update comments.
446 2012-10-29 Yannick Moy <moy@adacore.com>
448 * gnat_rm.texi: Minor documentation addition.
450 2012-10-29 Emmanuel Briot <briot@adacore.com>
452 * xr_tabls.adb, xr_tabls.ads (Add_Declaration, Add_Reference): No
453 longer assume that a parameter declaration is seen after the subprogram
456 2012-10-29 Tristan Gingold <gingold@adacore.com>
458 * lib-writ.adb (Write_ALI): Emit partition elaboration policy
460 * lib-writ.ads: Document partition elaboration policy indication.
461 * sem_prag.adb (Check_Arg_Is_Partition_Elaboration_Policy): New
463 (Analyze_Pragma): Handle Partition_Elaboration_Policy.
464 (Sig_Flags): Add flag for Pragma_Partition_Elaboration_Policy
465 * ali.adb (Initialize_ALI): Init Partition_Elaboration_Policy_Specified.
466 (Scan_ALI): Read Ex indications.
467 * ali.ads: ALIs_Record: Add Partition_Elaboration_Policy.
468 * par-prag.adb (Prag): Add Partition_Elaboration_Policy.
469 * snames.adb-tmpl (Is_Partition_Elaboration_Policy_Name): New function.
470 * opt.ads (Partition_Elaboration_Policy): Declare.
471 (Partition_Elaboration_Policy_Sloc): Declare.
472 * bcheck.adb (Check_Consistent_Partition_Elaboration_Policy):
473 New procedure. (Check_Configuration_Consistency): Check partition
474 elaboration policy consistency.
475 * snames.ads-tmpl (Name_Partition_Elaboration_Policy): New name.
476 (First_Partition_Elaboration_Policy_Name, Name_Concurrent,
477 Name_Sequential, Last_Partition_Elaboration_Policy_Name): Likewise.
478 (Pragma_Partition_Elaboration_Policy): New literal.
479 (Is_Partition_Elaboration_Policy_Name): New function.
481 2012-10-29 Ed Schonberg <schonberg@adacore.com>
483 * sem_ch6.adb (Is_Public_Subprogram_For): Handle properly
484 expression functions, which are rewritten as subprogram
485 declarations, when generating invariants for its return value
486 and in-out parameters.
488 2012-10-29 Arnaud Charlet <charlet@adacore.com>
490 * warnsw.adb (Set_GNAT_Mode_Warnings): Unset
491 Warn_On_Standard_Redefinition.
493 2012-10-29 Javier Miranda <miranda@adacore.com>
495 * sem_ch3.adb (Derive_Progenitor_Subprograms): Complete documentation.
497 2012-10-29 Robert Dewar <dewar@adacore.com>
499 * par-ch11.adb (Warn_If_Standard_Redefinition): Add calls.
500 * par-ch3.adb (P_Defining_Identifier): Call
501 Warn_If_Standard_Redefinition if not inside record definition.
502 * par-ch6.adb (Warn_If_Standard_Redefinition): Add calls.
503 * par-util.adb (Warn_If_Standard_Redefinition): New procedure.
504 * par.adb (Inside_Record_Definition): New flag.
505 (Warn_If_Standard_Redefinition): New procedure.
506 * sinfo-cn.adb (Change_Identifier_To_Defining_Identifier): Remove
507 handling of warning for redefining standard name (moved to Par*).
509 2012-10-29 Javier Miranda <miranda@adacore.com>
511 * sem_ch3.adb (Derive_Progenitor_Subprograms): Disable small
512 optimization in generic formal types.
514 2012-10-29 Robert Dewar <dewar@adacore.com>
516 * exp_ch9.adb, exp_ch3.adb: Add comments.
517 * sem_prag.adb: Minor reformatting.
519 2012-10-29 Tristan Gingold <gingold@adacore.com>
521 * bindgen.adb (Gen_Output_File_Ada): Do not emit declaration for
522 Is_Elaborated if not referenced.
524 2012-10-29 Tristan Gingold <gingold@adacore.com>
526 * exp_ch9.adb (Build_Activation_Chain_Entity): Punt in restricted
528 * exp_ch3.adb (Build_Initialization_Call): Do no append _Chain
529 parameter in restricted profile.
530 (Build_Init_Call_Thru): Likewise.
531 (Init_Formals): Likewise.
532 * exp_ch3.adb: Minor reformatting.
534 2012-10-29 Arnaud Charlet <charlet@adacore.com>
536 * usage.adb: Update usage line for -gnatw.k.
538 2012-10-29 Yannick Moy <moy@adacore.com>
540 * sem_prag.adb: Code clean up.
542 2012-10-29 Vincent Celier <celier@adacore.com>
544 * projects.texi: Clarify documentation of attribute
545 Ignore_Source_Sub_Dirs.
547 2012-10-29 Robert Dewar <dewar@adacore.com>
549 * g-sechas.adb, g-sechas.ads, exp_ch9.adb, bindgen.adb, exp_dbug.adb,
550 exp_dbug.ads: Minor reformatting.
552 2012-10-29 Pascal Obry <obry@adacore.com>
554 * g-sechas.adb, g-sechas.ads: (Binary_Message_Digest): New subtype.
555 (Digest): New versions returning a Binary_Message_Digest.
556 (Wide_Digest): Likewise.
558 2012-10-29 Robert Dewar <dewar@adacore.com>
560 * warnsw.adb: Complete previous change.
562 2012-10-29 Tristan Gingold <gingold@adacore.com>
564 * bindgen.adb (Check_File_In_Partition, Check_System_Restrictions_Used):
566 (Check_Dispatching_Domains_Used): Removed.
567 (Gen_Adafinal): Remove call to above procedures.
568 (Resolve_Binder_Options): Handle system restrictions and dispatching
571 2012-10-29 Tristan Gingold <gingold@adacore.com>
573 * s-tarest.ads, s-tarest.adb (Create_Restricted_Task): Remove
575 * exp_ch9.adb (Make_Task_Create_Call): Do not add Chain parameter
576 on restricted runtime.
578 2012-10-29 Pascal Obry <obry@adacore.com>
580 * g-sechas.adb, g-sechas.ads: Minor code clean-up.
582 2012-10-29 Ed Schonberg <schonberg@adacore.com>
584 * sem_aux.adb (Get_Rep_Item): Treat Priority and Interrupt_Priority
585 as equivalent, because only one of them can be specified for a
586 task, protected definition, or subprogram body.
587 * aspects.adb ((Same_Aspect): The canonical aspect of
588 Interrupt_Priority is Priority.
590 2012-10-29 Robert Dewar <dewar@adacore.com>
592 * sem_ch13.adb: Minor reformatting.
594 2012-10-29 Robert Dewar <dewar@adacore.com>
596 * i-cstrea.ads: Avoid redefinition of standard symbol string.
597 * prj-makr.adb: Add comment for OK redefinition of Stadard.
598 * prj.ads: Add comment for OK redefinition of Stadard.
599 * s-crtl.ads: Avoid redefinition of standard symbol string.
600 * sinfo-cn.adb (Change_Identifier_To_Defining_Identifier):
601 Generate warning for standard redefinition if
602 Warn_On_Standard_Definition set.
603 * usage.adb: Add lines for -gnatw.k and -gnatw.K
604 * warnsw.adb: Set/reset Warn_On_Standard_Redefinition
606 * warnsw.ads (Warn_On_Standard_Redefinition): New flag.
607 * s-stratt-xdr.adb: Avoid new warning.
609 2012-10-29 Ed Schonberg <schonberg@adacore.com>
611 * exp_dbug.ads, exp_dbug.adb (Build_Subprogram_Instance_Renamings):
612 in the body of a subpogram instance, introduce local renamings
613 for actuals of an elementary type, so that GDB can recover the
614 values of these actuals more directly.
616 2012-10-29 Robert Dewar <dewar@adacore.com>
618 * sem_ch5.adb (Analyze_Loop_Statement): Add warning for identical
621 2012-10-29 Robert Dewar <dewar@adacore.com>
623 * einfo.ads: Change terminology "present" to "defined" in talking
624 about whether a given field is defined for a given entity kind.
626 2012-10-29 Bob Duff <duff@adacore.com>
628 * atree.ads: Minor comment fix.
630 2012-10-29 Bob Duff <duff@adacore.com>
632 * sem_ch13.adb (Replace_Type_Reference): Set_Comes_From_Source.
633 Otherwise, the node is ignored by ASIS.
634 * sem_ch5.adb: Minor reformatting.
636 2012-10-29 Thomas Quinot <quinot@adacore.com>
638 * exp_attr.adb, exp_dist.adb, exp_dist.ads (Build_To_Any_Call): Pass
639 an explicit Loc parameter to set the source location of generated
642 2012-10-29 Tristan Gingold <gingold@adacore.com>
644 * exp_ch9.adb (Build_Task_Activation_Call): Do nothing on
646 * bindgen.adb (System_Tasking_Restricted_Stages_Used): New variable.
647 (Gen_Adainit): Declare and call Activate_Tasks when the above variable
649 (Resolve_Binder_Options): Set the variable.
650 * rtsfind.ads (RE_Activate_Restricted_Tasks): Removed (now unused).
651 * s-tarest.adb (Tasks_Activation_Chain): New variable.
652 (Activate_Restricted_Tasks): Removed, and replaced by ...
653 (Activate_Tasks): New procedure, to activate all tasks at
654 the end of elaboration.
655 (Create_Restricted_Tasks): Chain parameter is now unreferenced. Put
656 the created task on the Tasks_Activation_Chain list.
657 * s-tarest.ads (Activate_Restricted_Tasks): Removed.
658 (Activate_Tasks): Added.
660 2012-10-29 Gary Dismukes <dismukes@adacore.com>
662 * sem_res.adb (Resolve_If_Expression): Compare subtype of the 'then'
663 expression against the subtype of the expression rather than comparing
664 base types, same as is already done for the 'else' expression.
666 2012-10-29 Steve Baird <baird@adacore.com>
668 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): If CodePeer_Mode
669 = True and we detect that an Address specification is used to overlay
670 another object, do not set that object's Treat_As_Volatile flag.
672 2012-10-29 Ed Schonberg <schonberg@adacore.com>
674 * sem_ch3.adb (Constant_Redeclaration): If the type of a
675 deferred constant has invariants, generate invariant call on
678 2012-10-29 Bob Duff <duff@adacore.com>
680 * sem_ch13.adb (Replace_Type_Reference): Use correct sloc for
683 2012-10-29 Thomas Quinot <quinot@adacore.com>
685 * sem_elab.adb: Minor reformatting and code reorganization.
687 2012-10-29 Robert Dewar <dewar@adacore.com>
689 * par-ch4.adb (P_Primary): Warn on bad use of unary minus.
691 2012-10-29 Robert Dewar <dewar@adacore.com>
693 * s-valuti.ads, s-valuti.adb (Bad_Value): New procedure.
694 * s-valllu.adb, s-valwch.adb, s-valcha.adb, s-valint.adb,
695 s-valuns.adb, s-valrea.adb, s-valboo.adb, s-valenu.adb,
696 s-vallli.adb: Use Bad_Value everywhere.
698 2012-10-29 Yannick Moy <moy@adacore.com>
700 * gnat1drv.adb (Adjust_Global_Switches): Do not suppress checks
703 2012-10-29 Yannick Moy <moy@adacore.com>
705 * checks.adb (Apply_Arithmetic_Overflow_Minimized_Eliminated):
706 Add special case for case expression alternative.
707 (Is_Signed_Integer_Arithmetic_Op): Remove special case for case
708 expression alternative.
709 * exp_ch4.adb Minor reformatting.
711 2012-10-29 Thomas Quinot <quinot@adacore.com>
713 * sem_elab.adb: Minor reformatting.
715 2012-10-29 Bob Duff <duff@adacore.com>
717 * sem_res.adb: Minor: Remove redundant test.
719 2012-10-29 Arnaud Charlet <charlet@adacore.com>
721 * pprint.ads, pprint.adb, adabkend.ads, adabkend.adb,
722 aa_util.ads, aa_util.adb: New.
724 2012-10-23 Eric Botcazou <ebotcazou@adacore.com>
726 * system-linux-mipsel.ads (Stack_Check_Probes): Set to True.
727 * system-linux-mips.ads (Stack_Check_Probes): Likewise.
728 * system-linux-mips64el.ads (Stack_Check_Probes): Likewise.
730 2012-10-22 Eric Botcazou <ebotcazou@adacore.com>
732 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Force
733 BLKmode on the type if it is passed by reference.
734 <E_Array_Subtype>: Likewise.
735 <E_Record_Type>: Guard the call to Is_By_Reference_Type predicate.
736 <E_Record_Subtype>: Likewise.
738 * gcc-interface/Makefile.in: Remove outdated comment and reference to
741 2012-10-22 Eric Botcazou <ebotcazou@adacore.com>
743 * gcc-interface/utils.c (rest_of_record_type_compilation): Simplify and
744 robustify pattern machine code for masking operations.
746 2012-10-22 Eric Botcazou <ebotcazou@adacore.com>
748 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: In
749 type annotation mode, break circularities introduced by AI05-0151.
751 2012-10-22 Eric Botcazou <ebotcazou@adacore.com>
753 * gcc-interface/trans.c (Loop_Statement_to_gnu): Use gnat_type_for_size
754 directly to obtain an unsigned version of the base type.
756 2012-10-22 Eric Botcazou <ebotcazou@adacore.com>
758 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Out_Parameter>: Do not
759 generate the special PARM_DECL for an Out parameter in LTO mode.
761 2012-10-22 Eric Botcazou <ebotcazou@adacore.com>
764 * gcc-interface/Make-lang.in (GCC_LINK): Remove hardcoded options.
766 2012-10-15 Matthias Klose <doko@ubuntu.com>
768 * gcc-interface/Makefile.in: Match arm*-*-linux-*eabi* for
771 2012-10-05 Robert Dewar <dewar@adacore.com>
773 * sem_ch7.adb: Minor reformatting.
775 2012-10-05 Ed Schonberg <schonberg@adacore.com>
777 * sem_prag.adb (Analyze_Pragma, case Persistent_BSS): check for
778 a duplicate pragma before Rep_Item_Too_Late to prevent spurious
779 messages about duplicate pragmas.
781 2012-10-05 Ed Schonberg <schonberg@adacore.com>
783 * exp_util.adb (Find_Init_Call): If the successor of the
784 object declaration is a block, check whether it contains the
785 initialization call, because it may have been created by actuals
786 that use the secondary stack.
788 2012-10-05 Thomas Quinot <quinot@adacore.com>
790 * sem_dim.adb, errout.adb, errout.ads (Analyze_Dimension_Call): Add
791 guard against abnormal tree resulting from a previously diagnosed
794 2012-10-05 Hristian Kirtchev <kirtchev@adacore.com>
796 * freeze.adb (Freeze_Expression): Rename local variable Cspc to Spec
797 and update all refs to it. Do not freeze an entity outside a subprogram
798 body when the original context is an expression function.
800 2012-10-05 Robert Dewar <dewar@adacore.com>
802 * gnat1drv.adb (Adjust_Global_Switches): Default for overflow checking
803 is suppressed, even if backend overflow/divide checks are enabled.
805 2012-10-05 Ed Schonberg <schonberg@adacore.com>
807 * einfo.adb (Set_Invariant_Procedure, Set_Predicate_Function):
808 chain properly subprograms on Subprograms_For_Type list.
809 * sem_ch13.ads; (Build_Invariant_Procedure_Declaration): new
810 procedure, to create declaration for invariant procedure
811 independently of the construction of the body, so that it can
812 be called within expression functions.
813 * sem_ch13.adb (Build_Invariant_Procedure): code cleanup. The
814 declaration may already have been generated at the point an
815 explicit invariant aspect is encountered.
816 * sem_prag.adb; (Analyze_Pragma, case Invariant): create declaration
817 for invariant procedure.
818 * sem_ch7.adb (Analyze_Package_Specification): clean up call to
819 build invariant procedure.
820 (Preserve_Full_Attributes): propagate information about invariants
821 if they appear on a completion,
823 2012-10-05 Pascal Obry <obry@adacore.com>
825 * gnat_ugn.texi: Update documentation to lift Microsoft C
828 2012-10-05 Robert Dewar <dewar@adacore.com>
830 * sem_util.adb (Has_One_Matching_Field): Handle case of lone
833 2012-10-05 Yannick Moy <moy@adacore.com>
835 * checks.adb (Minimize_Eliminate_Overflow_Checks): Correct code
836 for the division operation and exponent operation. Adjust bound
837 for the mod and rem operations.
839 2012-10-05 Robert Dewar <dewar@adacore.com>
841 * checks.adb, checks.ads, s-tassta.adb, s-stposu.adb, s-spsufi.adb,
842 s-spsufi.ads, exp_ch4.adb: Minor reformatting.
844 2012-10-05 Yannick Moy <moy@adacore.com>
846 * switch-c.adb, checks.adb, checks.ads, sem_prag.adb, exp_ch4.adb,
847 osint.adb: Minor correction of typos, and special case for Alfa mode.
849 2012-10-05 Hristian Kirtchev <kirtchev@adacore.com>
851 * s-spsufi.adb: Add with clause for Ada.Unchecked_Deallocation.
852 Add with and use clauses for System.Finalization_Masters.
853 (Finalize_And_Deallocate): Add an instance of
854 Ada.Unchecked_Deallocation. Merge the code from the now obsolete
855 Finalize_Subpool into this routine.
856 * s-spsufi.ads: Add pragma Preelaborate.
857 * s-stposu.adb: Remove with clause for
858 Ada.Unchecked_Deallocation; Add with and use clauses for
859 System.Storage_Pools.Subpools.Finalization; (Finalize_Pool):
860 Update the comment on all actions takes with respect to a subpool
861 finalization. Finalize and deallocate each individual subpool.
862 (Finalize_Subpool): Removed.
864 (Detach): Move from package body to spec.
865 * s-stposu.ads (Detach): Move from package body to spec.
866 (Finalize_Subpool): Removed.
868 2012-10-05 Arnaud Charlet <charlet@adacore.com>
870 * s-tassta.adb: Update comments.
871 (Vulnerable_Complete_Master): If Free_On_Termination is set, do
872 nothing, and let the task free itself if not already done.
874 2012-10-04 Robert Dewar <dewar@adacore.com>
876 * sem_res.adb (Resolve_Set_Membership): Warn on duplicates.
878 2012-10-04 Emmanuel Briot <briot@adacore.com>
880 * g-comlin.adb (Getopt): Fix value of Full_Switch returned in case of
883 2012-10-04 Arnaud Charlet <charlet@adacore.com>
885 * gcc-interface/Make-lang.in: Update dependencies.
887 2012-10-04 Robert Dewar <dewar@adacore.com>
889 * sem_eval.adb (Fold_Str, Fold_Uint, Fold_Ureal): Reset static
890 expression state after Resolve call.
892 2012-10-04 Robert Dewar <dewar@adacore.com>
894 * sem_prag.adb (Analyze_Pragma. case Warnngs): Don't make entry
895 in the table for Warnings Off pragmas if within an instance.
897 2012-10-04 Ed Schonberg <schonberg@adacore.com>
899 * sem_ch9.adb (Analyze_Entry_Body): Transfer
900 Has_Pragma_Unreferenced flag from entry formal to corresponding
901 entity in body, to prevent spurious warnings when pragma is
904 2012-10-04 Robert Dewar <dewar@adacore.com>
906 * s-bignum.adb (Big_Exp): Raise Storage_Error for ludicrously
909 2012-10-04 Ed Schonberg <schonberg@adacore.com>
911 * sem_ch3.adb (Check_Duplicate_Aspects): Diagnose properly
912 aspects that appear in the partial and the full view of a type.
914 2012-10-04 Robert Dewar <dewar@adacore.com>
916 * sinfo.ads (N_Return_Statement): Removed.
918 2012-10-04 Tristan Gingold <gingold@adacore.com>
920 * init.c (__gl_zero_cost_exceptions): Comment it as not used
922 * bindgen.adb (Gen_Adainit): Do not emit Zero_Cost_Exceptions
925 2012-10-04 Thomas Quinot <quinot@adacore.com>
927 * prep.adb, prepcomp.adb, gprep.adb, opt.ads: New preprocessor switch
928 -a (all source text preserved).
930 2012-10-04 Vincent Celier <celier@adacore.com>
932 * prj-proc.adb (Recursive_Process): Use project directory
933 display path name as the value of 'Project_Dir.
935 2012-10-04 Robert Dewar <dewar@adacore.com>
937 * exp_ch4.adb (Expand_Compare_Minimize_Eliminate_Overflow):
938 Deal with case where we get a bignum operand and cannot do a
940 * sem_eval.adb (Why_Not_Static): Deal with bignum operands
942 2012-10-04 Ed Schonberg <schonberg@adacore.com>
944 * sem_ch4.adb (Find_Unary_Types): Within an instance, an
945 interpretation that involves a predefied arithmetic operator is
946 not a candidate if the corresponding generic formal type is not
948 * sem_util.ads, sem_util.adb (Corresonding_Generic_Type): If a
949 type is a generic actual type within an instance, return the
950 corresponding formal in the generic unit, otherwise return
953 2012-10-04 Robert Dewar <dewar@adacore.com>
955 * checks.adb (Minimize_Eliminate_Overflow_Checks): Dont reanalyze
956 if/case expression if nothing has changed (just reexpand). Stops
957 case expression from generating incorrect temporary.
958 * exp_ch4.adb (Expand_Compare_Minimize_Eliminate_Overflow):
959 Fix cut and paste typo for range analysis in NE (not equal) case.
960 * sem_eval.adb (Compile_Time_Compare): Small optimization to
961 catch some more cases.
962 * types.ads (Suppressed_Or_Checked): New subtype of
965 2012-10-04 Javier Miranda <miranda@adacore.com>
967 * exp_disp.adb (Set_CPP_Constructors_Old): Removed.
968 (Set_CPP_Constructors): Code cleanup.
970 2012-10-04 Ed Schonberg <schonberg@adacore.com>
972 * sem_ch10.adb (Is_Ancestor_Unit): Make global, for use elsewhere.
973 (Install_Private_with_Clauses): if clause is private and limited,
974 do not install the limited view if the library unit is an ancestor
975 of the unit being compiled. This unusual configuration occurs
976 when compiling a unit DDP, when an ancestor P of DDP has a
977 private limited with clause on a descendant of P that is itself
980 2012-10-04 Vincent Celier <celier@adacore.com>
982 * prj-proc.adb (Process_Package_Declaration): Use project
983 directory display path name as the value of 'Project_Dir.
985 2012-10-04 Gary Dismukes <dismukes@adacore.com>
987 * exp_util.adb (Build_Allocate_Deallocate_Proc): The subpool can be
988 given by an arbitrary name, so copy the tree to make the call's actual.
990 2012-10-04 Robert Dewar <dewar@adacore.com>
992 * s-exnllf.adb, s-exnllf.ads: Minor reformatting.
994 2012-10-04 Thomas Quinot <quinot@adacore.com>
996 * exp_ch6.adb: Minor reformatting.
998 2012-10-04 Pascal Obry <obry@adacore.com>
1000 * projects.texi: Use consistently @command{} when referencing
1001 commands. Fix typos.
1003 2012-10-03 Ed Schonberg <schonberg@adacore.com>
1005 * sem_ch6.adb (New_Overloaded_Entity): call
1006 Append_Inherited_Subprogram when appropriate.
1007 * sem_dim.adb (Analyze_Dimension_Call): Do not perform dimensional
1008 analysis if call has previous semantic error.
1009 * sem_util.ads, sem_util.adb (Append_Inherited_Subprogram):
1010 new subprogram to handle properly the visibility of inherited
1011 operations that are primitives of a type extension, when the
1012 parent type and operations are declared in the same visible part.
1014 2012-10-03 Robert Dewar <dewar@adacore.com>
1016 * checks.adb (Minimize_Eliminate_Overflow_Checks): Properly
1017 handle case of top level expression within type conversion
1018 * gnat1drv.adb (Adjust_Global_Switches): Set SUPPRESSED as
1019 default for overflow checking for -gnatg mode (includes run-time).
1020 * sem_res.adb (Resolve_Type_Conversion): Avoid bogus warnings
1021 about redundant conversions from MINIMIZED/EXTENDED mode checking
1023 2012-10-03 Javier Miranda <miranda@adacore.com>
1025 * exp_ch4.adb (Expand_N_Allocator_Expression): Minor code
1026 reorganization and cleanup. Done to ensure proper management of
1027 the C++ constructor covering tagged and untagged types and also
1028 non-default constructors.
1029 * exp_ch6.ads, exp_ch6.adb (Make_CPP_Constructor_Call_In_Allocator):
1032 2012-10-03 Gary Dismukes <dismukes@adacore.com>
1034 * sem_ch6.adb: Minor typo fix.
1036 2012-10-03 Robert Dewar <dewar@adacore.com>
1038 * checks.adb (Apply_Arithmetic_Overflow_Minimized_Eliminated):
1039 Set Top_Level properly (to False) for operand of range of
1041 * exp_ch4.adb (Expand_Membership_Minimize_Eliminate_Overflow):
1042 Fix crash with -gnato3 and membership operations.
1043 (Expand_Membership_Minimize_Eliminate_Overflow): Fix error message
1044 and wrong results for -gnato3 large expression and predicated
1046 (Expand_Membership_Minimize_Eliminate_Overflow): Use
1047 expression action node to avoid using insert actions (bombs in
1049 (Expand_Compare_Minimize_Eliminate_Overflow): Use expression action
1050 node to avoid using insert actions (bombs in some cases).
1052 2012-10-03 Javier Miranda <miranda@adacore.com>
1054 * exp_disp.adb (Set_CPP_Constructors_Old): Handle constructor of
1055 untagged type that has all its parameters with defaults and hence it
1056 covers the default constructor.
1058 2012-10-03 Yannick Moy <moy@adacore.com>
1060 * checks.adb, sem_prag.adb, s-bignum.ads: Minor typo fixes.
1062 2012-10-03 Thomas Quinot <quinot@adacore.com>
1064 * g-socket.adb (Connect_Socket, version with timeout): When the
1065 newly-connected socket is reported as available for writing, check
1066 whether it has a pending asynchronous error prior to returning.
1068 2012-10-03 Ed Schonberg <schonberg@adacore.com>
1070 * sem_ch6.adb (Check_Conformance): Additional info when subtype
1071 conformance fails, due to a missing null exclusion indicatar in
1072 a formal that must match a controlling access formal.
1074 2012-10-02 Ben Brosgol <brosgol@adacore.com>
1076 * gnat_rm.texi: Minor editing.
1078 2012-10-02 Ed Schonberg <schonberg@adacore.com>
1080 * sem_ch6.adb (Analyze_Function_Return): Reject a return
1081 expression whose type is a local access to subprogram type.
1083 2012-10-02 Robert Dewar <dewar@adacore.com>
1085 * sem_eval.adb: Minor improvement to Compile_Time_Compare.
1087 2012-10-02 Robert Dewar <dewar@adacore.com>
1089 * checks.adb (Apply_Arithmetic_Overflow_Minimized_Eliminated):
1090 Fix base type problem that resulted in improper conversion.
1091 (Minimize_Eliminate_Overflow_Checks): Properly handle top
1092 level case to avoid unnecessary conversion to bignum or LLI.
1093 (Minimize_Eliminate_Overflow_Checks): Implement uniform two phase
1094 approach for arithmetic operators and for if/case expressions.
1095 * checks.ads: Minor comment fix.
1096 * exp_ch4.adb (Minimized_Eliminated_Overflow_Check): New function,
1097 implements a uniform way of treating minimized/eliminated checks in
1099 (Expand_Compare_Minimize_Eliminate_Overflow): Fix cut and
1100 paste error resulting in wrong results for less than in some
1101 cases. (Expand_Membership_Minimize_Eliminate_Overflow):
1102 Fix error caused by incorrect capture of operand types.
1103 (Expand_Membership_Minimize_Eliminate_Overflow): Fix error in
1104 handling of bignum case.
1105 (Expand_N_Case_Expression): Implement
1106 proper two phase handling (Expand_N_If_Expression): Implement
1107 proper two phase handling (Expand_N_Op_Abs): Implement proper
1108 two phase handling ditto for all other arithmetic operators
1109 * sem_res.adb (Resolve_If_Expression): Avoid introducing
1110 unneeded conversions.
1112 2012-10-02 Robert Dewar <dewar@adacore.com>
1114 * s-bignum.adb (Big_Exp): 0**0 should be 1, not 0.
1115 (Big_Exp): Fix possible error for (-1)**0.
1116 (Big_Exp): Fix error in computing 2**K for small K.
1117 (Big_Mod): Fix wrong sign for negative operands.
1118 (Div_Rem): Fix bad results for operands close to 2**63.
1119 * s-bignum.ads: Add documentation and an assertion to require
1120 LLI size to be 64 bits.
1121 * sem_prag.adb (Analyze_Pragma, case Overflow_Checks): Do not
1122 allow ELIMINATED if LLI'Size is other than 64 bits.
1123 * switch-c.adb (Scan_Switches): Do not allow -gnato3 if LLI'Size
1125 * switch.ads (Bad_Switch): Add missing pragma No_Return.
1126 * gnat_ugn.texi: Added appendix on Overflow Check Handling in GNAT.
1128 2012-10-02 Robert Dewar <dewar@adacore.com>
1130 * sem_type.adb: Minor reformatting.
1132 2012-10-02 Robert Dewar <dewar@adacore.com>
1134 * sem_ch8.adb: Minor reformatting.
1136 2012-10-02 Javier Miranda <miranda@adacore.com>
1138 * exp_disp.adb (Set_CPP_Constructors): Handle constructor with default
1139 parameters that covers the default constructor.
1141 2012-10-02 Yannick Moy <moy@adacore.com>
1143 * s-bignum.adb: Minor stylistic and comment corrections.
1145 2012-10-02 Pascal Obry <obry@adacore.com>
1147 * prj-util.adb (For_Interface_Sources): Iterate over all sources in
1148 aggregate library projects.
1150 2012-10-02 Ed Schonberg <schonberg@adacore.com>
1152 * sem_ch8.adb (Find_Direct_Name): The left-hand side of an
1153 assignment may designate a generalized reference.
1155 2012-10-02 Eric Botcazou <ebotcazou@adacore.com>
1157 * types.h (N_Return_Statement): Delete.
1158 * gcc-interface/trans.c (gnat_to_gnu): Replace N_Return_Statement with
1159 N_Simple_Return_Statement.
1161 2012-10-02 Ed Schonberg <schonberg@adacore.com>
1163 * freeze.adb (Freeze_Entity): in a generic context, aspects must
1164 be analyzed because they may be queried subsequently within the
1165 generic unit, even if no other freezing actions are generated
1167 * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): iterator
1168 aspects must be analyzed because they are delayed aspects and
1169 the corresponding attribute definition clause may not have been
1172 2012-10-02 Yannick Moy <moy@adacore.com>
1174 * gnat_rm.texi: Minor editing.
1176 2012-10-02 Robert Dewar <dewar@adacore.com>
1178 * sinfo.adb, sinfo.ads, sem_util.adb, sem_util.ads, types.h,
1179 exp_ch4.adb, exp_ch6.adb: Get rid of internal use of N_Return_Statement.
1181 2012-10-02 Eric Botcazou <ebotcazou@adacore.com>
1183 * types.h: Minor cosmetic fix.
1185 2012-10-02 Eric Botcazou <ebotcazou@adacore.com>
1187 * gcc-interfaces/decl.c (elaborate_expression_1): Use the variable for
1188 bounds of loop iteraration scheme only for locally defined subtypes.
1190 * gcc-interface/trans.c (gigi): Fix formatting.
1191 (build_return_expr): Apply the NRV optimization only for BLKmode.
1193 2012-10-02 Robert Dewar <dewar@adacore.com>
1195 * sinfo.ads: Remove refs of N_Conditional_Expression and
1196 N_Parameterized_Expression.
1198 2012-10-02 Thomas Quinot <quinot@adacore.com>
1200 * exp_aggr.adb (Get_Component_Val): Rewrite code that computes
1201 justification of bits in enclosing word in an attempt to make
1204 2012-10-02 Robert Dewar <dewar@adacore.com>
1206 * par_sco.adb, sem_ch3.adb, layout.adb, exp_ch7.adb, exp_imgv.adb,
1207 exp_util.adb, exp_util.ads, exp_attr.adb, sinfo.adb, sinfo.ads,
1208 exp_ch9.adb, style.ads, scos.ads, debug.adb, einfo.ads, scng.adb,
1209 checks.adb, checks.ads, sem.adb, par-ch4.adb, sem_util.adb, types.h,
1210 sem_res.adb, expander.adb, scans.ads, par.adb, exp_ch2.adb,
1211 gnat1drv.adb, stylesw.ads, sem_elab.adb, exp_ch4.adb, exp_ch4.ads,
1212 exp_ch6.adb, sem_ch4.adb, sem_ch4.ads, sem_ch6.adb,
1213 opt.ads, sem_eval.adb, sem_eval.ads, exp_intr.adb, sprint.adb,
1214 sprint.ads, styleg.ads: Change name Conditional_Expression to
1216 * gcc-interface/trans.c (gnat_to_gnu): Replace
1217 N_Conditional_Expression by N_If_Expression.
1218 * gcc-interface/Make-lang.in: Update dependencies.
1220 2012-10-02 Robert Dewar <dewar@adacore.com>
1222 * exp_ch4.adb (Expand_N_Op_Expon): Use expression with actions
1225 2012-10-02 Ed Schonberg <schonberg@adacore.com>
1227 * sem_ch5.adb: (Analyze_Iterator_Specification): If container
1228 has a variable indexing aspect, the element is a variable and
1229 is modifiable in the loop. This check is also performed when the
1230 loop is expanded, but it must be done in semantic analysis when
1231 expansion is disabled, for example for ASIS usage.
1233 2012-10-02 Ed Schonberg <schonberg@adacore.com>
1235 * lib-xref.adb (Generate_Reference): If a child subprogram
1236 has no previous spec, treat a reference to its formals (such
1237 as a parameter association) as coming from source in order to
1238 generate the proper references and enable gps navigation between
1239 reference and declaration.
1241 2012-10-02 Robert Dewar <dewar@adacore.com>
1243 * checks.adb (Apply_Arithmetic_Overflow_Checked_Suppressed):
1244 New name for Apply_Arithmetic_Overflow_Normal
1245 (Apply_Arithmetic_Overflow_Minimized_Eliminated):
1246 Add handling for conditional expressions
1247 (Is_Signed_Integer_Arithmetic_Op): Now includes conditional
1248 expressions (Minimize_Eliminate_Overflow_Checks): Handle
1249 conditional expressions.
1250 * checks.ads: Minor comment fixes.
1251 * exp_ch4.adb (Expand_N_Case_Expression): Call
1252 Apply_Arithmetic_Overflow_Check (Expand_N_Conditional_Expression):
1253 Call Apply_Arithmetic_Overflow_Check
1254 * s-bignum.adb (Normalize): Remove incorrect precondition.
1255 * sem_res.adb (Resolve_Case_Expression): Set Do_Overflow_Check
1256 flag (Resolve_Conditional_Expression): Set Do_Overflow_Check flag.
1257 * sinfo.adb: Add Do_Overflow_Check for conditional expressions.
1258 * sinfo.ads: Minor documentation updates.
1260 2012-10-02 Ed Schonberg <schonberg@adacore.com>
1262 * exp_ch4.adb (Expand_N_Case_Expression): Do not introduce
1263 indirections when the type of the alternatives is an access type:
1264 more efficient, and removes anomalies when an alternative is
1267 2012-10-02 Robert Dewar <dewar@adacore.com>
1269 * aspects.ads: Minor comment addition (Invariant is a GNAT aspect).
1271 2012-10-02 Robert Dewar <dewar@adacore.com>
1273 * exp_ch7.adb, sem_dim.adb, sem_dim.ads, prj-part.adb, checks.adb,
1274 freeze.adb, sem_ch4.adb, sem_ch13.adb: Minor reformatting.
1276 2012-10-02 Robert Dewar <dewar@adacore.com>
1278 * sem_prag.adb (Analyze_Pragma, case Overflow_Checks): Fix
1279 typo preventing proper processing of Overflow_Checks pragmas
1282 2012-10-02 Robert Dewar <dewar@adacore.com>
1284 * exp_ch4.adb (Expand_N_Op_Mod): Fix crash in ELIMINATED overflow
1285 checks mode when bignum mode is used.
1287 2012-10-02 Robert Dewar <dewar@adacore.com>
1289 * stylesw.ads, gnat_ugn.texi: Document new style rule for NOT IN.
1290 * par-ch4.adb (P_Relational_Operator): Add style check for NOT IN.
1291 * style.ads, styleg.adb, styleg.ads (Check_Not_In): New procedure.
1293 2012-10-02 Vincent Pucci <pucci@adacore.com>
1295 * sem_attr.adb (Analyze_Attribute): Check dimension for attribute
1296 Old before it gets expanded.
1297 * sem_dim.adb (Analyze_Dimension_Has_Etype): Correctly propagate
1298 dimensions for identifier.
1300 2012-10-02 Ed Schonberg <schonberg@adacore.com>
1302 * exp_ch5.adb (Expand_Iterator_Loop): Handle properly the case
1303 where the iterator type is derived locally from an instantiation
1304 of Ada.Iterators_Interface.
1305 * exp_ch7.adb (Establish_Transient_Scope): Do not create a
1306 transient scope if within the expansion of an iterator loop,
1307 because a transient block already exists.
1309 2012-10-02 Vincent Celier <celier@adacore.com>
1311 * gnatcmd.adb: Use absolute path for configuration pragmas files
1312 * make.adb (Configuration_Pragmas_Switch.Absolute_Path): Moved
1314 * makeutl.ads, makeutl.adb (Absolute_Path): New function, moved from
1317 2012-10-02 Vincent Celier <celier@adacore.com>
1319 * prj-part.adb (Post_Parse_Context_Clause): Resurrect Boolean
1320 parameter In_Limited. Check for circularity also if In_Limited
1322 (Parse_Single_Project): Call Post_Parse_Context_Clause with
1323 In_Limited parameter.
1325 2012-10-02 Bob Duff <duff@adacore.com>
1327 * checks.adb (Apply_Predicate_Check): Disable check in -gnatc mode.
1329 2012-10-02 Vincent Pucci <pucci@adacore.com>
1331 * sem_ch6.adb (Analyze_Function_Call): Dimension propagation
1332 for function calls moved to Analyze_Dimension_Call.
1333 * sem_dim.adb (Analyze_Dimension_Call): Properly propagate the
1334 dimensions from the returned type for function calls.
1336 2012-10-02 Vincent Celier <celier@adacore.com>
1338 * gnatcmd.adb: Take into account any configuration pragma file
1339 in the project files for gnat pretty/stub/metric.
1341 2012-10-02 Ed Schonberg <schonberg@adacore.com>
1343 * sem_ch13.adb (Check_Indexing_Functions): Refine several tests
1344 on the legality of indexing aspects: Constant_Indexing functions
1345 do not have to return a reference type, and given an indexing
1346 aspect Func, not all overloadings of Func in the current scope
1347 need to be indexing functions.
1349 2012-10-02 Vasiliy Fofanov <fofanov@adacore.com>
1351 * gnat_ugn.texi: Adjust docs for overflow checks to be VMS-friendly.
1353 2012-10-02 Vincent Celier <celier@adacore.com>
1355 * switch-m.adb (Normalize_Compiler_Switches): Recognize switches
1356 -gnatox and -gnatoxx when x=0/1/2/3.
1358 2012-10-02 Vincent Pucci <pucci@adacore.com>
1360 * sem_ch4.adb (Analyze_Indexed_Component_Form): Dimension
1361 analysis for indexed components added.
1362 * sem_ch6.adb (Analyze_Function_Call): Dimension propagation
1363 for function calls added.
1364 * sem_dim.adb (Analyze_Dimension): Call to
1365 Analyze_Dimension_Has_Etype when N is a function call.
1366 (Analyze_Dimension_Call): Don't propagate anymore the dimensions
1367 for function calls since this is now treated separately in
1368 Analyze_Dimension_Has_Etype.
1369 (Analyze_Dimension_Has_Etype): For
1370 attribute references, propagate the dimensions from the prefix.
1371 * sem_dim.ads (Copy_Dimensions): Fix comment.
1373 2012-10-02 Hristian Kirtchev <kirtchev@adacore.com>
1375 * checks.ads, checks.adb (Apply_Parameter_Aliasing_Checks): New routine.
1376 (Apply_Parameter_Aliasing_And_Validity_Checks): This routine
1377 has been split into two.
1378 (Apply_Parameter_Validity_Checks): New routine.
1379 * exp_ch6.adb (Expand_Call): Add checks to verify that actuals
1380 do not overlap. The checks are made on the caller side to overcome
1381 issues of parameter passing mechanisms.
1382 * freeze.adb (Freeze_Entity): Update call to
1383 Apply_Parameter_Aliasing_And_Validity_Checks.
1385 2012-10-02 Ed Schonberg <schonberg@adacore.com>
1387 * sem_ch4.adb (Is_Empty_Range): Use bounds of index type
1388 to determine whether an array is empty when optimizing
1389 a quantified expression over a null range. Use of RM_Size
1390 was incorrect. Analyze condition before constant-folding the
1391 expression to catch potential errors. Modify the error message
1392 to avoid mathematical terminology.
1394 2012-10-02 Robert Dewar <dewar@adacore.com>
1396 * usage.adb, gnat_rm.texi, vms_data.ads: Add entry for
1397 /OVERFLOW_CHECKS=?? generating -gnato?? for control
1398 of extended overflow checking.
1399 * ug_words: Add entry for -gnato?? for /OVERFLOW_CHECKS=??
1400 * gnat_ugn.texi: Add documentation for -gnato?? for control of overflow
1403 2012-10-02 Ed Schonberg <schonberg@adacore.com>
1405 * sem_ch4.adb (Analyze_Quantified_Expression): If the iterator in
1406 a quantified expression is statically known to be null (e.g. a
1407 array with an empty index type) emit a warning.
1409 2012-10-02 Robert Dewar <dewar@adacore.com>
1411 * sem_dim.adb: Minor code reorganization.
1412 * sem_dim.ads: Add comment.
1414 2012-10-02 Robert Dewar <dewar@adacore.com>
1416 * checks.ads, exp_ch4.adb, checks.adb
1417 (Minimize_Eliminate_Overflow_Checks): Add Top_Level parameter to avoid
1418 unnecessary conversions to Bignum.
1421 2012-10-02 Ed Schonberg <schonberg@adacore.com>
1423 * sem_ch6.adb (Process_PPCs): Generate invariant checks for a
1424 return value whose type is an access type and whose designated
1425 type has invariants. Ditto for in-out parameters and in-parameters
1427 * exp_ch3.adb (Build_Component_Invariant_Call): Add invariant check
1428 for an access component whose designated type has invariants.
1430 2012-10-01 Vincent Pucci <pucci@adacore.com>
1432 * sem_aggr.adb (New_Copy_Tree_And_Copy_Dimensions): New routine.
1433 (Resolve_Record_Aggregate): New_Copy_Tree calls replaced by
1434 New_Copy_Tree_And_Copy_Dimensions calls. Move_Dimensions call
1435 replaced by Copy_Dimensions call.
1436 * sem_dim.adb (Analyze_Dimension_Component_Declaration): Don't
1437 remove the dimensions of expression in component declaration anymore.
1438 (Copy_Dimensions): New routine.
1439 (Move_Dimensions): Add call to Copy_Dimensions.
1440 * sem_dim.ads (Copy_Dimensions): New routine.
1441 (Move_Dimensions): Spec moved to body of Sem_Dim.
1443 2012-10-01 Ed Schonberg <schonberg@adacore.com>
1445 * checks.adb (Apply_Predicate_Check): If the predicate is a
1446 static one and the operand is static, evaluate the predicate at
1448 * sem_eval.ads, sem_eval.adb (Eval_Static_Predicate_Check): new
1449 procedure, to evaluate a static predicate check whenever possible.
1450 * sem_res.adb (Resolve_Type_Conversion): Apply predicate check
1451 on the conversion if the target type has predicates.
1453 2012-10-01 Vincent Pucci <pucci@adacore.com>
1455 * sem_dim.adb (Has_Symbols): Complain if parameter Symbol has been
1456 provided by the user in the dimension output call.
1458 2012-10-01 Robert Dewar <dewar@adacore.com>
1460 * checks.adb (Apply_Divide_Checks): New name for
1461 Apply_Divide_Check (Minimize_Eliminate_Overflow_Checks):
1462 Add code to handle division (and rem and mod) properly.
1463 (Apply_Division_Check): New procedure (Apply_Divide_Checks):
1464 Use Apply_Division_Check (Apply_Divide_Checks): Use
1465 Apply_Arithmetic_Overflow_Minimized_Eliminated.
1466 * checks.ads (Apply_Divide_Checks): New name for
1467 Apply_Divide_Check, also add clearer documentation for this
1468 routine and put in alfa order.
1469 * exp_ch4.adb (Apply_Divide_Checks): New name for
1471 * s-bignum.adb (To_Bignum): Handle largest negative integer
1473 * sem.adb (Analyze): Handle overflow suppression correctly
1474 (Analyze_List): Handle overflow suppression correctly
1475 * sem_res.adb (Analyze_And_Resolve): Handle overflow suppression
1478 2012-10-01 Vasiliy Fofanov <fofanov@adacore.com>
1480 * s-oscons-tmplt.c, g-socket.ads: Revert previous change, breaks VMS.
1482 2012-10-01 Robert Dewar <dewar@adacore.com>
1484 * checks.adb (Minimize_Eliminate_Overflow_Checks): Changes
1486 * exp_ch4.adb (Expand_N_Op_Expon): Changes for Minimize/Eliminate
1488 * s-bignum.adb (Compare): Fix bad precondition.
1490 2012-10-01 Ed Schonberg <schonberg@adacore.com>
1492 * sem_ch3.adb (Build_Derived_Record_Type): If the derived
1493 type has new discriminantss that constrain inherited ones, use
1494 the discriminant type in the original declaration to check for
1495 conformance, because in the presence of array components with a
1496 smaller range that are constrained by the origina discriminant,
1497 the compiler will have created a narrower subtype for that
1500 2012-10-01 Robert Dewar <dewar@adacore.com>
1502 * checks.adb (Apply_Arithmetic_Overflow_Minimized_Eliminated):
1503 Handle case of appearing in range in membership test.
1504 * exp_ch4.adb (Expand_Membership_Minimize_Eliminate_Overflow):
1505 New procedure (Expand_N_In): Use
1506 Expand_Membership_Minimize_Eliminate_Overflow.
1507 * rtsfind.ads: Add RE_Bignum_In_LLI_Range.
1508 * s-bignum.ads, s-bignum.adb (Bignum_In_LLI_Range): New function.
1509 * sinfo.ads, sinfo.adb (No_Minimize_Eliminate): New flag.
1511 2012-10-01 Robert Dewar <dewar@adacore.com>
1513 * uintp.ads: Minor reformatting.
1515 2012-10-01 Ed Schonberg <schonberg@adacore.com>
1517 * checks.adb: Improve warning message.
1519 2012-10-01 Robert Dewar <dewar@adacore.com>
1521 * checks.adb: Minor reformatting.
1523 2012-10-01 Javier Miranda <miranda@adacore.com>
1525 * exp_ch3.adb (Expand_N_Object_Declaration): Suppress tag
1526 assignment for initializations that are aggregates.
1528 2012-10-01 Robert Dewar <dewar@adacore.com>
1530 * exp_ch4.adb (Expand_Compare_Minimize_Eliminate_Overflow):
1533 2012-10-01 Robert Dewar <dewar@adacore.com>
1535 * checks.adb (Minimize_Eliminate_Checks): Changes from testing.
1536 (Apply_Arithmetic_Overflow_Minimized_Eliminated): Changes
1538 * sinfo.ads: Remove note on not setting Entity field in overflow
1539 case since this is no longer true.
1540 * Makefile.rtl: Add s-bignum.o
1542 2012-10-01 Thomas Quinot <quinot@adacore.com>
1544 * Make-generated.in: Correction to previous change for s-oscons
1547 2012-10-01 Thomas Quinot <quinot@adacore.com>
1549 * s-bignum.adb (Allocate_Bignum): Reorganize to kill strict
1552 2012-10-01 Robert Dewar <dewar@adacore.com>
1554 * checks.adb (Overflow_Check_Mode): New function
1555 (Apply_Overflow_Check): New procedure (Is_Check_Suppressed):
1556 Moved here from Sem, Overflow_Check case now specially treated.
1557 * checks.ads (Overflow_Check_Mode): New function
1558 (Is_Check_Suppressed): Moved here from Sem (more logical)
1559 * exp_ch4.adb (Substitute_Valid_Check): Suppress warning about
1560 optimization if we are in MINIMIZED or ELIMINATED overflow
1561 checking mode and within an assertiom expression.
1562 * rtsfind.ads: Add entries for Bignum stuff.
1563 * s-bignum.ads, s-bignum.adb: New files.
1564 * sem.ads, sem.adb (Is_Check_Suppressed): Moved to Checks, more logical.
1565 * sem_prag.adb (Process_Suppress_Unsuppress): New behavior for
1566 Unsuppress of Overflow_Check (sets Checked instead of Minimized)
1567 * sem_res.adb: Update comments.
1568 * sinfo.ads (N_Op): Add documentation on overflow handling.
1569 * tbuild.ads, tbuild.adb (Convert_To_And_Rewrite): New procedure.
1570 * types.ads (Minimized_Or_Eliminated): New subtype.
1572 2012-10-01 Eric Botcazou <ebotcazou@adacore.com>
1574 * layout.adb (Layout_Type): Do not set twice the address size
1575 on an access-to-unconstrained array if Debug_Flag_6 is set.
1577 2012-10-01 Hristian Kirtchev <kirtchev@adacore.com>
1579 * sem_ch3.adb (Analyze_Declarations): Remove the specialized
1580 code which prevents freezing when the declarative list contains
1581 a _postconditions body. This is no longer needed because the
1582 body is now inserted at the end of the declarations.
1583 * sem_ch6.adb (Insert_After_Last_Declaration): New routine.
1584 (Insert_Before_First_Source_Declaration): Removed.
1585 (Process_PPCs): Insert the _postconditions body at the end of
1586 the declarative list to prevent premature freezing of types that
1587 appear in the declarations.
1589 2012-10-01 Robert Dewar <dewar@adacore.com>
1591 * sem_aggr.adb, sem_dim.adb: Minor reformatting.
1593 2012-10-01 Ed Schonberg <schonberg@adacore.com>
1595 * sem_prag.adb (Process_Convention, Process_Import_Or_Interface):
1596 Adjust test so that when the pragma comes from an aspect
1597 specification it only applies to the entity in the original
1600 2012-10-01 Thomas Quinot <quinot@adacore.com>
1602 * gnat_ugn.texi: Document new command line switch -fada-spec-parent.
1604 2012-10-01 Thomas Quinot <quinot@adacore.com>
1606 * s-oscons-tmplt.c, g-socket.ads: Minor code improvement: use gcc
1607 builtin __alignof__ to get the alignment of struct fd_set.
1609 2012-10-01 Vincent Pucci <pucci@adacore.com>
1611 * exp_ch6.adb (Expand_Call): Remove call to
1612 Remove_Dimension_In_Call.
1613 * sem_aggr.adb (Resolve_Array_Aggregate): Analyze dimension of
1614 components in array aggregate.
1615 (Resolve_Aggr_Expr): Propagate dimensions from the original expression
1616 Expr to the new created expression New_Expr when resolving the
1617 expression of a component in record aggregates.
1618 (Resolve_Record_Aggregate): Analyze
1619 dimension of components in record (or extension) aggregate.
1620 * sem_ch6.adb (Analyze_Subprogram_Specification): Analyze
1621 dimension of formals with default expressions in subprogram
1623 * sem_ch8.adb (Analyze_Expanded_Name): Analyze dimension of
1625 (Find_Selected_Component): Analyze dimension of selected component.
1626 * sem_dim.adb: Several dimension error messages reformatting.
1627 (Dimensions_Msg_Of): New flag Description_Needed in order to
1628 differentiate two different sort of dimension error messages.
1629 (Dim_Warning_For_Numeric_Literal): New routine.
1630 (Exists): New routine.
1631 (Move_Dimensions): Routine spec moved to spec file.
1632 * sem_dim.ads (String_From_Numeric_Literal): New routine.
1633 (Analyze_Dimension): Analyze dimension only when the
1634 node comes from source. Dimension analysis for expanded names added.
1635 (Analyze_Dimension_Array_Aggregate): New routine.
1636 (Analyze_Dimension_Call): New routine.
1637 (Analyze_Dimension_Component_Declaration): Warning if default
1638 expression is a numeric literal.
1639 (Analyze_Dimension_Extension_Or_Record_Aggregate): New routine.
1640 (Analyze_Dimension_Formals): New routine.
1641 (Analyze_Dimension_Object_Declaration): Warning if default
1642 expression is a numeric literal.
1643 (Symbol_Of): Return either the dimension subtype symbol or the
1644 dimension symbol built by From_Dim_To_Str_Of_Unit_Symbols.
1645 * sem_dim.ads (Analyze_Dimension_Array_Aggregate): New routine.
1646 (Analyze_Dimension_Call): New routine.
1647 (Analyze_Dimension_Extension_Or_Record_Aggregate): New routine.
1648 (Analyze_Dimension_Formals): New routine.
1649 (Move_Dimensions): Moved from sem_dim.adb.
1650 * s-dimmks.ads: Turn off the warnings for dimensioned object
1651 declaration. Dimensioned subtypes sorted in alphabetical
1652 order. New subtypes Area, Speed, Volume.
1653 * s-dmotpr.ads: Turn off the warnings for dimensioned object
1655 * sem_res.adb (Resolve_Call): Analyze dimension for calls.
1657 2012-10-01 Thomas Quinot <quinot@adacore.com>
1659 * Make-generated.in: Minor cleanup of all targets: use
1660 MOVE_IF_CHANGE to put generated files in place, to avoid useless
1663 2012-10-01 Javier Miranda <miranda@adacore.com>
1665 * exp_disp.adb (Expand_Dispatching_Call): For functions returning
1666 interface types add an implicit conversion to the returned object
1667 to force the displacement of the pointer to the returned object
1668 to reference the corresponding secondary dispatch table. This
1669 is needed to handle well combined calls involving secondary
1670 dispatch tables (for example Obj.Prim1.Prim2).
1671 * exp_ch4.adb (Expand_Allocator_Expression): Declare internal
1672 access type as access to constant or access to variable depending
1673 on the context. Found working in this ticket.
1675 2012-10-01 Ed Schonberg <schonberg@adacore.com>
1677 * checks.adb (Apply_Predicate_Check): Do not apply check to
1678 actual of predicate checking procedure, to prevent infinite
1681 2012-10-01 Arnaud Charlet <charlet@adacore.com>
1683 * gcc-interface/Make-lang.in: Update dependencies.
1684 (GCC_LINK): Add -static-libstdc++.
1686 2012-10-01 Arnaud Charlet <charlet@adacore.com>
1688 * a-catizo.adb, a-stwiun.adb, a-cdlili.adb, a-cihama.adb, a-direct.adb,
1689 a-coinve.adb, a-calend.adb, a-ciorse.adb, a-coorma.adb, a-cfdlli.adb,
1690 a-stzunb-shared.adb, a-cfhase.adb, bindgen.adb, ceinfo.adb, a-tags.adb,
1691 einfo.adb, checks.adb, eval_fat.adb, a-cborma.adb, a-stwifi.adb,
1692 a-tifiio.adb, a-textio.adb, a-cidlli.adb, a-strunb-shared.adb,
1693 a-cimutr.adb, a-calcon.adb, a-exexpr-gcc.adb, a-ciormu.adb,
1694 a-stzunb.adb, a-stzsea.adb, a-ngelfu.adb, a-stzfix.adb,
1695 a-cihase.adb, a-cohama.adb, a-exetim-posix.adb, a-dirval-vms.adb,
1696 a-caldel-vms.adb, a-coorse.adb, errout.adb,
1697 a-except.adb, butil.adb, a-dirval-mingw.adb, a-cforma.adb,
1698 a-except-2005.adb, a-wtedit.adb, cstand.adb, a-stwiun-shared.adb,
1699 a-cbhama.adb, a-direio.adb, clean.adb, a-cborse.adb, back_end.adb,
1700 binde.adb, a-exexda.adb, a-comutr.adb, a-ciorma.adb, a-cobove.adb,
1701 a-coormu.adb, a-teioed.adb, a-convec.adb, a-wtenau.adb, exp_aggr.adb,
1702 a-ztedit.adb, a-cohase.adb, a-exetim-mingw.adb, bcheck.adb,
1703 a-dynpri.adb, a-cfhama.adb, a-calfor.adb, a-cbdlli.adb,
1704 a-crdlli.adb, a-cbmutr.adb, a-sequio.adb, a-ngcoar.adb, a-cforse.adb,
1705 a-strunb.adb, a-calend-vms.adb, a-clrefi.adb, a-cofove.adb,
1706 a-ztenau.adb, a-strfix.adb, a-cbhase.adb, a-stzsup.adb: Minor
1709 2012-10-01 Vincent Pucci <pucci@adacore.com>
1711 * s-gearop.adb (Vector_Matrix_Product): Dimensions check fixed. Index
1712 of Left in S evaluation fixed.
1714 2012-10-01 Javier Miranda <miranda@adacore.com>
1716 * sem_ch3.adb (Analyze_Declarations): Avoid
1717 premature freezing caused by the internally generated subprogram
1719 * checks.adb (Expr_Known_Valid): Float literals are assumed to be valid
1722 2012-10-01 Thomas Quinot <quinot@adacore.com>
1724 * sinput.ads, sinput.adb, sinput-l.adb sinput-c.adb (Sinput): New
1725 Instances table, tracking all generic instantiations. Source file
1726 attribute Instance replaces previous Instantiation attribute with an
1727 index into the Instances table.
1728 (Iterate_On_Instances): New generic procedure.
1729 (Create_Instantiation_Source): Record instantiations in Instances.
1730 (Tree_Read, Tree_Write): Read/write the instance table.
1731 * scils.ads, scos.adb (SCO_Instance_Table): New table, contains
1732 information copied from Sinput.Instance_Table, but self-contained
1733 within the SCO data structures.
1734 * par_sco.ads, par_sco.adb (To_Source_Location): Move to library level.
1735 (Record_Instance): New subprogram, used by...
1736 (Populate_SCO_Instance_Table): New subprogram to fill
1737 the SCO instance table from the Sinput one (called by SCO_Output).
1738 * opt.ads (Generate_SCO_Instance_Table): New option.
1739 * put_scos.adb (Write_Instance_Table): New subprogram, used by...
1740 (Put_SCOs): Dump the instance table at the end of SCO information
1742 * get_scos.adb (Get_SCOs): Read SCO_Instance_Table.
1743 * types.h: Add declaration for Instance_Id.
1744 * back_end.adb (Call_Back_End): Pass instance ids in source file
1746 (Scan_Back_End_Switches): -fdebug-instances sets
1747 Opt.Generate_SCO_Instance_Table.
1748 * gcc-interface/gigi.h: File_Info_Type includes instance id.
1749 * gcc-interface/trans.c: Under -fdebug-instances, set instance
1750 id in line map from same in file info.
1752 2012-10-01 Thomas Quinot <quinot@adacore.com>
1754 * sem_elab.adb: Minor reformatting
1755 (Check_Elab_Call): Minor fix to debugging code
1756 (add special circuit for the valid case where a 'Access attribute
1757 reference is passed to Check_Elab_Call).
1759 2012-10-01 Thomas Quinot <quinot@adacore.com>
1761 * exp_ch3.adb: Minor reformatting.
1763 2012-10-01 Ed Schonberg <schonberg@adacore.com>
1765 * exp_ch3.ads (Build_Array_Invariant_Proc): moved to body.
1766 * exp_ch3.adb (Build_Array_Invariant_Proc,
1767 Build_Record_Invariant_Proc): transform into functions.
1768 (Insert_Component_Invariant_Checks): for composite types that have
1769 components with specified invariants, build a checking procedure,
1770 and make into the invariant procedure of the composite type,
1771 or incorporate it into the user- defined invariant procedure if
1772 one has been created.
1773 * sem_ch3.adb (Array_Type_Declaration): Checking for invariants
1774 on the component type is defered to the expander.
1776 2012-10-01 Thomas Quinot <quinot@adacore.com>
1778 * xsnamest.adb, namet.h, sem_ch10.adb, s-oscons-tmplt.c,
1779 xoscons.adb: Minor reformatting.
1781 2012-10-01 Hristian Kirtchev <kirtchev@adacore.com>
1783 * checks.adb (Apply_Parameter_Aliasing_And_Validity_Checks):
1784 Do not process subprogram renaminds because a) those cannot
1785 have PPC pragmas b) the renamed entity already has the PPCs.
1786 (Build_PPC_Pragma): Prepend a PPC pragma for consistency with
1788 * sem_ch6.adb (Last_Implicit_Declaration): Removed.
1789 (Process_PPCs): Insert a post condition body at the start of the
1790 declarative region of the related subprogram. This way the body
1791 will not freeze anything it shouldn't.
1793 2012-10-01 Robert Dewar <dewar@adacore.com>
1795 * freeze.adb, sem_ch6.adb, opt.ads, sem_ch13.adb,
1796 exp_ch3.adb: Minor reformatting.
1798 2012-10-01 Hristian Kirtchev <kirtchev@adacore.com>
1800 * checks.adb (Build_PPC_Pragma): A PPC pragma can now be properly
1801 associated with a subprogram body.
1803 2012-10-01 Ed Schonberg <schonberg@adacore.com>
1805 * aspects.ads: Type_Invariant'class is a valid aspect.
1806 * sem_ch6.adb (Is_Public_Subprogram_For): with the exception of
1807 initialization procedures, subprograms that do not come from
1808 source are not public for the purpose of invariant checking.
1809 * sem_ch13.adb (Build_Invariant_Procedure): Handle properly the
1810 case of a non-private type in a package without a private part,
1811 when the type inherits invariants from its ancestor.
1813 2012-10-01 Ed Schonberg <schonberg@adacore.com>
1815 * exp_ch3.adb (Build_Record_Invariant_Proc): new procedure to
1816 generate a checking procedure for record types that may have
1817 components whose types have type invariants declared.
1819 2012-10-01 Vincent Pucci <pucci@adacore.com>
1821 * system-solaris-sparcv9.ads, system-mingw.ads, system-vms_64.ads: Flag
1822 Support_Atomic_Primitives set to True.
1824 2012-10-01 Robert Dewar <dewar@adacore.com>
1826 * impunit.adb: Ada.Locales is a language defined unit.
1828 2012-10-01 Hristian Kirtchev <kirtchev@adacore.com>
1830 * checks.adb (Apply_Parameter_Aliasing_Checks): Removed.
1831 (Apply_Parameter_Aliasing_And_Validity_Checks): New routine.
1832 (Apply_Parameter_Validity_Checks): Removed.
1833 * checks.ads (Apply_Parameter_Aliasing_Checks): Removed.
1834 (Apply_Parameter_Aliasing_And_Validity_Checks): New routine.
1835 (Apply_Parameter_Validity_Checks): Removed.
1836 * exp_ch6.adb (Expand_Call): Remove the generation of parameter
1838 * freeze.adb: Remove with and use clauses for Validsw.
1839 (Freeze_Entity): Update the guard and generation of aliasing
1840 and scalar initialization checks for subprogram parameters.
1841 * opt.ads: Add new flags Check_Aliasing_Of_Parameters and
1842 Check_Validity_Of_Parameters along with comments on usage.
1843 * sem_attr.adb (Analyze_Attribute): Pragma Overlaps_Storage is
1844 no longer an Ada 2012 feature.
1845 * sem_ch4.adb: Remove with and use clauses for Checks and Validsw.
1846 (Analyze_Call): Remove the generation of aliasing checks for
1847 subprogram parameters.
1848 * sem_ch13.adb: Remove with and use clauses for Validsw.
1849 (Analyze_Aspect_Specifications): Remove the generation of scalar
1850 initialization checks.
1851 * switch-c.adb (Scan_Front_End_Switches): Add processing for
1852 -gnateA and -gnateV.
1853 * usage.adb (Usage): Add information on switches -gnateA and
1854 -gnateV. Remove information on validity switches 'l', 'L',
1856 * validsw.adb (Reset_Validity_Check_Options): Remove the
1857 reset of flags Validity_Check_Non_Overlapping_Params
1858 and Validity_Check_Valid_Scalars_On_Params.
1859 (Save_Validity_Check_Options): Remove the processing
1860 for flags Validity_Check_Non_Overlapping_Params
1861 and Validity_Check_Valid_Scalars_On_Params.
1862 (Set_Validity_Check_Options): Remove the processing
1863 for flags Validity_Check_Non_Overlapping_Params and
1864 Validity_Check_Valid_Scalars_On_Params.
1865 * validsw.ads: Remove flags Validity_Check_Non_Overlapping_Params
1866 and Validity_Check_Valid_Scalars_On_Params along with their
1869 2012-10-01 Yannick Moy <moy@adacore.com>
1871 * sem_ch13.adb (Add_Invariants): Analyze the invariant expression
1872 as an assertion expression.
1873 * sem_ch3.adb / sem_ch3.ads (Preanalyze_Assert_Expression):
1874 New procedure that wraps a call to Preanalyze_Spec_Expression
1875 for assertion expressions, so that In_Assertion_Expr can be
1877 * sem_prag.adb (Analyze_PPC_In_Decl_Part
1878 Check_Precondition_Postcondition Preanalyze_CTC_Args): Call the
1879 new Preanalyze_Assert_Expression.
1881 2012-10-01 Robert Dewar <dewar@adacore.com>
1883 * checks.ads: Minor reformatting.
1885 2012-10-01 Yannick Moy <moy@adacore.com>
1887 * types.ads, sem_prag.adb, sem.ads: Correct minor typos in comments.
1889 2012-10-01 Vincent Celier <celier@adacore.com>
1891 * make.adb (Scan_Make_Arg): Only test for "vP" of the option
1892 includes at least 3 characters.
1893 * gnatcmd.adb (GNATCmd): Ditto.
1895 2012-10-01 Eric Botcazou <ebotcazou@adacore.com>
1897 * exp_ch7.adb, sinfo.ads: Add comments.
1899 2012-10-01 Robert Dewar <dewar@adacore.com>
1901 * checks.adb: Remove reference to Enable_Overflow_Checks Use
1902 Suppress_Options rather than Scope_Suppress.
1903 * gnat1drv.adb (Adjust_Global_Switches): Handle new overflow
1904 settings (Adjust_Global_Switches): Initialize Scope_Suppress
1905 from Suppress_Options.
1906 * opt.adb: Remove Enable_Overflow_Checks (use Suppress_Options
1908 * opt.ads: Remove Overflow_Checks_Unsuppressed (not used)
1909 Remove Enable_Overflow_Checks (use Suppress_Options instead)
1910 Suppress_Options is now current setting (replaces Scope_Suppress).
1911 * osint.adb (Initialize): Deal with initializing overflow
1913 * par-prag.adb: Add dummy entry for pragma Overflow_Checks.
1914 * sem.adb (Semantics): Save and restore In_Assertion_Expr Use
1915 Suppress_Options instead of Scope_Suppress.
1916 * sem.ads (In_Assertion_Expr): New flag (Scope_Suppress):
1917 Removed, use Suppress_Options instead.
1918 * sem_eval.adb (Compile_Time_Compare): Return Unknown in
1920 * sem_prag.adb (Process_Suppress_Unsuppress): Setting of
1921 Overflow_Checks_Unsuppressed removed (not used anywhere!)
1922 (Analyze_Pragma, case Check): Set In_Assertion_Expression
1923 (Analyze_Pragma, case Overflow_Checks): Implement new pragma
1924 * snames.ads-tmpl: Add names needed for handling pragma
1926 * switch-c.adb (Scan_Front_End_Switches) Handle -gnato? and
1927 -gnato?? where ? is 0-3
1928 * types.ads: Updates and fixes to comment on Suppress_Record.
1930 2012-10-01 Vincent Celier <celier@adacore.com>
1932 * prj-part.adb (Parse): Remove incorrect comment about checking
1933 imported non extending projects from and "extending all"
1934 one. Minor correction.
1936 2012-10-01 Robert Dewar <dewar@adacore.com>
1938 * make.adb, exp_ch3.adb: Minor reformatting.
1940 2012-10-01 Hristian Kirtchev <kirtchev@adacore.com>
1942 * validsw.adb (Save_Validity_Check_Options): Do not set
1943 Validity_Check_Non_Overlapping_Params and
1944 Validity_Check_Valid_Scalars_On_Params when -gnatVa is present
1945 because the related checks are deemed too aggressive.
1947 2012-10-01 Ed Schonberg <schonberg@adacore.com>
1949 * sem_util.ads sem_util.adb (Check_Internal_Protected_Use):
1950 reject use of protected procedure or entry within the body of
1951 a protected function of the same protected type, when usage is
1952 a call, an actual in an instantiation, a or prefix of 'Access.
1953 * sem_ch8.adb (Analyze_Subprogram_Renaming): Verify that target
1954 object in renaming of protected procedure is a variable, and
1955 apply Check_Internal_Protected_Use.
1956 * sem_res.adb (Analyze_Call, Analyze_Entry_Call): apply
1957 Check_Internal_Protected_Use rather than on-line code.
1958 * sem_attr.adb (Analyze_Access_Attribute): Verify that target
1959 object in accsss to protected procedure is a variable, and apply
1960 Check_Internal_Protected_Use.
1962 2012-10-01 Gary Dismukes <dismukes@adacore.com>
1964 * sem_ch4.adb (Find_Equality_Types.Try_One_Interp): Exclude the
1965 predefined interpretation from consideration if it's for a "/="
1966 operator of a tagged type. This will allow Analyze_Equality_Op to
1967 rewrite the "/=" as a logical negation of a call to the appropriate
1968 dispatching equality function. This needs to be done during
1969 analysis rather than expansion for the benefit of ASIS, which
1970 otherwise gets the unresolved N_Op_Ne operator from Standard.
1972 2012-10-01 Thomas Quinot <quinot@adacore.com>
1974 * gnatcmd.adb, make.adb (Scan_Make_Arg, Inspect_Switches): Recognize
1975 and reject an invalid parameter passed to -vP.
1977 2012-10-01 Yannick Moy <moy@adacore.com>
1979 * sem_warn.adb (Check_Infinite_Loop_Warning/Test_Ref): Improve
1980 the detection of modifications to the loop variable by noting
1981 that, if the type of variable is elementary and the condition
1982 does not contain a function call, then the condition cannot be
1983 modified by side-effects from a procedure call.
1985 2012-10-01 Robert Dewar <dewar@adacore.com>
1987 * checks.adb: Add comments.
1989 2012-10-01 Javier Miranda <miranda@adacore.com>
1991 * exp_ch3.adb (Expand_N_Object_Declaration): Improve condition catching
1992 never-ending recursion. The previous condition erroneously disabled
1993 silently the expansion of the class-wide interface object
1994 initialization in cases not involving the recursion.
1996 2012-10-01 Thomas Quinot <quinot@adacore.com>
1998 * make.adb: Minor documentation fix: error messages are sent to
2001 2012-10-01 Hristian Kirtchev <kirtchev@adacore.com>
2003 * checks.ads, checks.adb (Apply_Parameter_Aliasing_Checks): New routine.
2004 (Apply_Parameter_Validity_Checks): New routines.
2005 * exp_ch6.adb (Expand_Call): Add aliasing checks to detect
2006 overlapping objects.
2007 * freeze.adb: Add with and use clauses for Checks and Validsw.
2008 (Freeze_Entity): Add checks to detect proper initialization
2010 * sem_ch4.adb: Add with and use clauses for Checks and Validsw.
2011 (Analyze_Call): Add aliasing checks to detect overlapping objects.
2012 * sem_ch13.adb: Add with and use clauses for Validsw.
2013 (Analyze_Aspect_Specifications): Add checks to detect proper
2014 initialization of scalars.
2015 * sem_prag.adb (Chain_PPC): Correct the extraction of the
2017 * sem_util.adb (Is_Object_Reference): Attribute 'Result now
2019 * usage.adb (Usage): Add usage lines for validity switches 'l',
2021 * validsw.adb (Reset_Validity_Check_Options): Include
2022 processing for flags Validity_Check_Non_Overlapping_Params and
2023 Validity_Check_Valid_Scalars_On_Params. Code reformatting.
2024 (Save_Validity_Check_Options): Include processing
2025 for flags Validity_Check_Non_Overlapping_Params
2026 and Validity_Check_Valid_Scalars_On_Params.
2027 (Set_Validity_Check_Options): Add processing for validity switches
2028 'a', 'l', 'L', 'n', 'v' and 'V'. Code reformatting.
2029 * validsw.ads: Add new flags Validity_Check_Non_Overlapping_Params
2030 and Validity_Check_Valid_Scalars_On_Params along with comments
2033 2012-10-01 Thomas Quinot <quinot@adacore.com>
2035 * namet.ads, xsnamest.adb, prj-env.adb, sem_warn.adb,
2036 errout.ads: Minor reformatting.
2037 * prj-part.adb: Add comment.
2039 2012-10-01 Robert Dewar <dewar@adacore.com>
2041 * sinfo.ads, exp_aggr.adb, sem_ch13.adb: Minor reformatting.
2043 2012-10-01 Ed Schonberg <schonberg@adacore.com>
2045 * sem_aggr.adb (Resolve_Array_Aggregate): Handle properly
2046 component associations given by subtypes that have static
2047 predicates. Improve error message for overlapping ranges in
2050 2012-10-01 Pascal Obry <obry@adacore.com>
2052 * snames.ads-tmpl (Name_Link_Lib_Subdir): New constant.
2054 2012-10-01 Ed Schonberg <schonberg@adacore.com>
2056 * sem_ch9.adb (Analyze_Requeue): The target of a requeue
2057 statement on a protected entry must be a variable. This is part
2060 2012-09-26 Ian Lance Taylor <iant@google.com>
2062 * gcc-interface/Makefile.in (LIBBACKTRACE): New variable.
2063 (LIBS): Add $(LIBBACKTRACE).
2064 (LIBDEPS): Add $(LIBBACKTRACE).
2065 (TOOLS_LIBS): Add ../../../libbacktrace/.libs/libbacktrace.a.
2067 2012-09-10 Diego Novillo <dnovillo@google.com>
2069 * gcc-interface/decl.c (build_subst_list): Adjust call to VEC_safe_push.
2070 (build_variant_list): Likewise.
2071 * gcc-interface/utils.c (convert): Adjust calls to VEC_quick_push.
2073 2012-09-07 Eric Botcazou <ebotcazou@adacore.com>
2075 * gcc-interface/trans.c (Loop_Statement_to_gnu): Revert to using
2076 size_type_node instead of sizetype.
2078 2012-08-19 Eric Botcazou <ebotcazou@adacore.com>
2080 * layout.adb (Set_Elem_Alignment): Cap the alignment of access types
2081 to that of a regular access type for non-strict-alignment platforms.
2082 * gcc-interface/utils.c (finish_fat_pointer_type): Do not set the
2083 alignment for non-strict-alignment platforms.
2085 2012-08-19 Eric Botcazou <ebotcazou@adacore.com>
2087 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Use proper
2088 dummy type for the temporary COMPONENT_REF built for a derived tagged
2089 type with discriminant.
2091 2012-08-14 Diego Novillo <dnovillo@google.com>
2093 Merge from cxx-conversion branch. Re-implement VEC in C++.
2095 * gcc-interface/trans.c (finalize_nrv_unc_r): Adjust VEC_index usage.
2096 * gcc-interface/utils.c (convert): Likewise.
2097 (remove_conversions): Likewise.
2098 * gcc-interface/utils2.c (compare_fat_pointers): Likewise.
2099 (build_unary_op): Likewise.
2100 (gnat_stabilize_reference): Likewise.
2102 2012-08-06 Jose Ruiz <ruiz@adacore.com>
2104 * gcc-interface/Makefile.in: Add support for 32-bit VxWorks for SPARC
2107 2012-08-06 Arnaud Charlet <charlet@adacore.com>
2109 * prj-attr.adb (Register_New_Package): Add missing blank.
2111 2012-08-06 Ed Schonberg <schonberg@adacore.com>
2113 * exp_aggr.adb (Is_Two_Dim_Packed_Array): New predicate,
2114 used when computing maximum size allowable to construct static
2117 2012-08-06 Vincent Pucci <pucci@adacore.com>
2119 * freeze.adb (Freeze_Entity): Inherit_Aspects_At_Freeze_Point
2120 calls added for derived types and subtypes.
2121 * sem_aux.adb, sem_aux.ads (Get_Rep_Item, Get_Rep_Pragma,
2122 Has_Rep_Pragma): New routines.
2123 * sem_ch13.ads (Inherit_Aspects_At_Freeze_Point): New routine.
2124 * sem_ch13.adb (Analyze_Aspect_Specifications): Error message
2125 for aspect Lock_Free fixed.
2126 (Inherits_Aspects_At_Freeze_Point): New routine.
2127 * sem_ch3.adb: Several flag settings removed since inheritance
2128 of aspects must be performed at freeze point.
2130 2012-08-06 Thomas Quinot <quinot@adacore.com>
2132 * s-oscons-tmplt.c: Fix s-oscons.ads formatting on VxWorks.
2134 2012-08-06 Vincent Pucci <pucci@adacore.com>
2136 * sem_dim.adb (Analyze_Dimension_Binary_Op): Issue an error message
2137 for unknown exponent at compile-time.
2139 2012-08-06 Gary Dismukes <dismukes@adacore.com>
2141 * sem_eval.ads (Compile_Time_Known_Value_Or_Aggr): Enhance
2142 comment to make it clear that the aggregate's evaluation might
2143 still involve run-time checks even though the aggregate is
2144 considered known at compile time.
2145 * sinfo.ads (Compile_Time_Known_Aggregate): Correct comment to
2146 refer to Exp_Aggr instead of Sem_Aggr.
2148 2012-08-06 Robert Dewar <dewar@adacore.com>
2150 * xoscons.adb: Minor code reorganization (remove unused variable
2152 * g-sercom.ads, exp_attr.adb: Minor reformatting.
2153 * sinfo.adb, sinfo.ads: Minor cleanup, remove unused flag
2154 Static_Processing_OK.
2156 2012-08-06 Ed Schonberg <schonberg@adacore.com>
2158 * sem_ch3.adb (Build_Derived_Concurrent_Type): Copy discriminant
2159 constraint when building a constrained subtype, to prevent
2160 undesirable tree sharing betweeb geberated subtype and derived
2163 2012-08-06 Thomas Quinot <quinot@adacore.com>
2165 * g-sercom-mingw.adb, s-oscons-tmplt.c: Add missing constants
2168 2012-08-06 Sergey Rybin <rybin@adacore.com frybin>
2170 * tree_io.ads: Update ASIS_Version_Number because of the tree fix
2171 for discriminant constraints for concurrent types.
2173 2012-08-06 Thomas Quinot <quinot@adacore.com>
2175 * sem_ch4.adb: Minor reformatting.
2177 2012-08-06 Thomas Quinot <quinot@adacore.com>
2179 * s-oscons-tmplt.c, xoscons.adb: Per the Single UNIX Specification,
2180 types cc_t, speed_t, and tcflag_t defined in <termios.h> all are
2181 unsigned types. Add required special handling to have their correct
2182 unsigned values in s-oscons.ads.
2184 2012-08-06 Thomas Quinot <quinot@adacore.com>
2186 * par-ch13.adb: Minor reformatting.
2188 2012-08-06 Thomas Quinot <quinot@adacore.com>
2190 * g-sercom.adb, g-sercom.ads, g-sercom-mingw.adb, g-sercom-linux.adb
2191 (Set): Add Local and Flow_Control settings.
2193 2012-08-06 Ed Schonberg <schonberg@adacore.com>
2195 * exp_attr.adb: Suppress saving of 'Old if assertions are not
2198 2012-08-06 Yannick Moy <moy@adacore.com>
2200 * sem_ch4.adb (Analyze_Selected_Component): Issue an error in
2201 Alfa mode for component not present.
2203 2012-08-06 Thomas Quinot <quinot@adacore.com>
2205 * exp_ch7.adb (Insert_Actions_In_Scope_Around): Do not
2206 use a renaming of Scope_Stack.Table (Scope_Stack.Last), as
2207 Process_Transient_Object may introduce new scopes and cause
2208 Scope_Stack.Table to be reallocated.
2210 2012-08-06 Robert Dewar <dewar@adacore.com>
2212 * exp_util.adb, switch-c.adb, inline.ads, sem_ch10.adb, types.ads,
2213 checks.adb, sem_prag.adb, sem.adb, sem.ads, sem_res.adb, sem_attr.adb,
2214 gnat1drv.adb, exp_ch4.adb, exp_ch6.adb, opt.ads, osint.adb: Implement
2215 extended overflow checks (step 1).
2216 (Overflow_Check_Type, Suppress_Record, Suppress_All): New types.
2217 (Suppress_Array): Extended to include switches to control extended
2218 overflow checking (and renamed to Suppress_Record).
2219 Update all uses of Suppress_Array.
2221 2012-08-06 Thomas Quinot <quinot@adacore.com>
2223 * makeutl.ads: Minor documentation fix.
2225 2012-08-06 Thomas Quinot <quinot@adacore.com>
2227 * exp_ch7.adb: Minor reformatting.
2229 2012-08-06 Geert Bosch <bosch@adacore.com>
2231 * a-ngelfu.adb: Change obsolete comment that this is a non-strict
2234 2012-08-06 Steve Baird <baird@adacore.com>
2236 * exp_ch7.adb (Build_Finalizer.Process_Object_Declaration): If
2237 CodePeer_Mode = True then omit exception handlers for finalization calls
2239 2012-08-06 Robert Dewar <dewar@adacore.com>
2241 * exp_aggr.adb: Minor reformatting.
2243 2012-08-06 Robert Dewar <dewar@adacore.com>
2245 * sem_ch6.adb: Remove useless flag Body_Deleted.
2247 2012-08-06 Thomas Quinot <quinot@adacore.com>
2249 * sinfo.ads (End_Span): Change default from No_Uint to Uint_0,
2250 as this is what all usage occurrences of this attribute are
2252 * uintp.adb (UI_To_Int): Add assertion to guard against calling
2255 2012-08-06 Vincent Pucci <pucci@adacore.com>
2258 * exp_attr.adb (Expand_N_Attribute_Reference): Expand new
2259 Atomic_Always_Lock_Free attribute.
2260 * sem_attr.adb (Analyze_Attribute): Analyze new
2261 Atomic_Always_Lock_Free attribute.
2262 (Eval_Attribute): Nothing to do with new Atomic_Always_Lock_Free
2264 * sem_ch9.adb (Allows_Lock_Free_Implementation):
2265 Support_Atomic_Primitives check replaces previous erroneous
2267 * sem_util.adb, sem_util.ads (Support_Atomic_Primitives):
2269 * snames.ads-tmpl: New name Name_Atomic_Always_Lock_Free and
2270 new attribute Attribute_Atomic_Always_Lock_Free defined.
2271 * s-atopri.adb: Support_Atomic_Primitives checks replaced by
2272 Atomic_Always_Lock_Free queries.
2273 * system-aix64.ads, system-aix.ads, system-darwin-ppc.ads,
2274 system-hpux.ads, system-linux-alpha.ads, system-linux-hppa.ads,
2275 system-linux-ppc.ads, system-linux-s390.ads,
2276 system-linux-s390x.ads, system-linux-sh4.ads,
2277 system-linux-sparc.ads, system-lynxos178-ppc.ads,
2278 system-lynxos-ppc.ads, system-mingw.ads,
2279 system-vxworks-arm.ads, system-solaris-sparc.ads,
2280 system-solaris-sparcv9.ads, system-vms_64.ads,
2281 system-vxworks-m68k.ads, system-vxworks-mips.ads,
2282 system-vxworks-ppc.ads, system-vxworks-sparcv9.ads: Flag
2283 Support_Atomic_Primitives removed.
2285 2012-08-06 Hristian Kirtchev <kirtchev@adacore.com>
2287 * sem_mech.adb (Set_Mechanisms): OUT and IN OUT parameters are
2288 now unconditionally passed by reference. IN parameters subject
2289 to convention C_Pass_By_Copy are passed by copy, otherwise they
2290 are passed by reference.
2292 2012-08-06 Ed Schonberg <schonberg@adacore.com>
2294 * sem_ch3.adb (Analyze_Object_Declaration): According to
2295 AI95-0303, protected objects with interrupt handlers can be
2296 declared in nested scopes. This is a binding interpretation,
2297 and thus applies to all versions of the compiler.
2299 2012-08-06 Robert Dewar <dewar@adacore.com>
2301 * frontend.adb, exp_aggr.adb: Minor reformatting.
2303 2012-08-06 Thomas Quinot <quinot@adacore.com>
2305 * par-endh.adb: Minor reformatting.
2307 2012-08-06 Hristian Kirtchev <kirtchev@adacore.com>
2309 * exp_ch7.adb (Process_Transient_Objects): Remove obsolete loop
2310 processing related to array initialization. The expansion of
2311 loops already contains a mechanism to detect controlled objects
2312 generated by expansion and introduce a block around the loop
2313 statements for finalization purposes.
2315 2012-08-06 Vincent Pucci <pucci@adacore.com>
2317 * sem_ch13.adb: Current scope must be within
2318 or same as the scope of the entity while analysing aspect
2319 specifications at freeze point.
2321 2012-08-06 Thomas Quinot <quinot@adacore.com>
2323 * par_sco.adb: Add note about dubious SCO for TERMINATE
2325 * sem_ch8.adb, exp_ch11.adb: Minor reformatting.
2327 2012-08-06 Ed Schonberg <schonberg@adacore.com>
2329 * exp_aggr.adb (Two_Dim_Packed_Array_Handled): New procedure to
2330 transform an aggregate for a packed two-dimensional array into
2331 a one-dimensional array of constant values, in order to avoid
2332 the generation of component-by-component assignments.
2334 2012-08-06 Thomas Quinot <quinot@adacore.com>
2336 * frontend.adb: Do not attempt to process deferred configuration
2337 pragmas if the main unit failed to load, to avoid cascaded
2338 inconsistencies that can lead to a compiler crash.
2340 2012-08-06 Vincent Pucci <pucci@adacore.com>
2342 * s-atopri.adb: Minor reformatting.
2344 2012-08-06 Arnaud Charlet <charlet@adacore.com>
2346 * gnat-style.texi: Clarify that all subprograms should be
2347 documented. Minor rewording.
2349 2012-08-06 Robert Dewar <dewar@adacore.com>
2351 * aspects.ads: Define Aspect_Id_Exclude_No_Aspect.
2352 * par-ch13.adb, restrict.adb: Use Aspect_Id_Exclude_No_Aspect to
2355 2012-08-06 Yannick Moy <moy@adacore.com>
2357 * gnat-style.texi: Update style guide for declarations.
2359 2012-08-06 Yannick Moy <moy@adacore.com>
2361 * sem_attr.adb (Analyze_Attribute): In the case for 'Old,
2362 skip a special expansion which is not needed in Alfa mode.
2364 2012-08-06 Yannick Moy <moy@adacore.com>
2366 * sem_ch5.adb (Analyze_Iterator_Specification): Do not perform
2367 an expansion of the iterator in Alfa mode.
2369 2012-08-06 Robert Dewar <dewar@adacore.com>
2371 * s-oscons-tmplt.c, sem_ch9.adb, osint.adb: Minor reformatting.
2373 2012-08-06 Hristian Kirtchev <kirtchev@adacore.com>
2375 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Remove obsolete
2376 Alfa-specific guard. The code is a leftover from an early
2377 implementation of iterators which is no longer in use.
2379 2012-08-06 Vincent Celier <celier@adacore.com>
2381 * par-ch13.adb (Get_Aspect_Specifications): Do not consider
2382 No_Aspect when checking for a mispelled aspect.
2384 2012-08-06 Robert Dewar <dewar@adacore.com>
2386 * s-htable.adb: Minor reformatting.
2388 2012-08-06 Thomas Quinot <quinot@adacore.com>
2390 * s-oscons-tmplt.c, g-socket.adb (System.OS_Constants.Target_OS):
2391 Suppress warnings so that we don't have to do it at each usage.
2393 2012-08-06 Vincent Pucci <pucci@adacore.com>
2395 * exp_ch9.adb (Build_Lock_Free_Unprotected_Subprogram_Body):
2396 Use of Known_Static_Esize instead of Known_Esize and
2397 Known_Static_RM_Size instead of Known_RM_Size in order to
2398 properly call UI_To_Int. Don't check the size of the component
2399 type in case of generic.
2400 * sem_ch9.adb (Allows_Lock_Free_Implementation):
2401 Use of Known_Static_Esize instead of Known_Esize and
2402 Known_Static_RM_Size instead of Known_RM_Size in order to properly
2403 call UI_To_Int. Don't check the size of the component type in
2406 2012-08-06 Hristian Kirtchev <kirtchev@adacore.com>
2408 * checks.adb (Discrete_Range_Cond): Do not try to optimize on
2409 the assumption that the type of an expression can always fit in
2410 the target type of a conversion.
2412 2012-07-30 Robert Dewar <dewar@adacore.com>
2414 * bindusg.adb: Clarify file in -A lines.
2416 2012-07-30 Robert Dewar <dewar@adacore.com>
2418 * freeze.adb: Minor reformatting.
2420 2012-07-30 Robert Dewar <dewar@adacore.com>
2422 * gnatcmd.adb, makeutl.adb, makeutl.ads: Minor code reorganization.
2424 2012-07-30 Vincent Pucci <pucci@adacore.com>
2426 * exp_ch9.adb (Build_Lock_Free_Unprotected_Subprogram_Body): Minor
2428 * sem_ch9.adb (Allows_Lock_Free_Implementation): Minor reformatting.
2429 Capture the correct error message in case of a quantified expression.
2431 2012-07-30 Thomas Quinot <quinot@adacore.com>
2433 * g-socket.adb (Get_Socket_Option, Set_Socket_Option): On Windows, the
2434 value is a milliseconds count in a DWORD, not a struct timeval.
2436 2012-07-30 Hristian Kirtchev <kirtchev@adacore.com>
2438 * sem_ch12.adb (Earlier): Add local variables T1 and T2. Minor code
2441 2012-07-30 Thomas Quinot <quinot@adacore.com>
2443 * gnatcmd.adb, make.adb, makeutl.adb, makeutl.ads
2444 (Test_If_Relative_Path): Rename to Ensure_Absolute_Path to better
2445 reflect what this subprogram does. Rename argument Including_L_Switch
2446 to For_Gnatbind, and also exempt -A from rewriting.
2447 * bindusg.adb: Document optional =file argument to gnatbind -A.
2449 2012-07-30 Ed Schonberg <schonberg@adacore.com>
2451 * freeze.adb (Freeze_Entity): Do no apply restriction check on
2452 storage pools to access to subprogram types.
2454 2012-07-30 Robert Dewar <dewar@adacore.com>
2456 * par_sco.adb, a-cihama.adb, a-coinve.adb, exp_ch7.adb, a-ciorse.adb,
2457 exp_ch9.adb, sem_dim.adb, par-ch13.adb, sem_ch9.adb, a-cidlli.adb,
2458 a-cimutr.adb, freeze.adb, a-ciormu.adb, sem_res.adb, sem_attr.adb,
2459 a-cihase.adb, exp_ch4.adb, sem_ch4.adb, a-ciorma.adb,
2460 s-tasinf-linux.ads, sem_ch13.adb, a-coinho.adb: Minor reformatting.
2463 2012-07-30 Vincent Pucci <pucci@adacore.com>
2465 * sem_ch9.adb (Allows_Lock_Free_Implementation): Restrict implicit
2466 dereferences of access values.
2468 2012-07-27 Iain Sandoe <iain@codesourcery.com>
2470 * system-darwin-ppc64.ads: Add Support_Atomic_Primitives, set to True.
2472 2012-07-25 Eric Botcazou <ebotcazou@adacore.com>
2474 * gcc-interface/utils2.c (gnat_stabilize_reference) <BIT_FIELD_REF>: Do
2475 not stabilize operand #1 and #2.
2477 2012-07-23 Tristan Gingold <gingold@adacore.com>
2479 * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): Use
2480 End_Label sloc when possible for sloc of the TRY_CATCH_EXPR node.
2482 2012-07-23 Olivier Hainque <hainque@adacore.com>
2484 * gcc-interface/Makefile.in: Adjust processing of Linker_Options for
2486 * gcc-interface/Make-lang.in: Update dependencies.
2488 2012-07-23 Arnaud Charlet <charlet@adacore.com>
2490 * s-tasinf-linux.ads: Fix typo.
2492 2012-07-23 Thomas Quinot <quinot@adacore.com>
2494 * exp_ch7.adb, switch-m.adb, exp_ch3.adb, freeze.adb: Minor reformatting
2496 2012-07-23 Ed Schonberg <schonberg@adacore.com>
2498 * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): If original
2499 loop carries an identifier, preserve it when rewriting it as a
2500 standard loop to validate exit statements that may reference
2501 that name in the body of the loop.
2503 2012-07-23 Thomas Quinot <quinot@adacore.com>
2505 * exp_ch9.adb: Minor code cleanup.
2507 2012-07-23 Ed Schonberg <schonberg@adacore.com>
2509 * sem_ch4.adb (Analyze_Selected_Component): When checking for
2510 potential ambiguities with class-wide operations on synchronized
2511 types, attach the copied node properly to the tree, to prevent
2512 errors during expansion.
2514 2012-07-23 Yannick Moy <moy@adacore.com>
2516 * sem_ch5.adb (Analyze_Loop_Statement): Make sure the loop body
2517 is analyzed in Alfa mode.
2519 2012-07-23 Ed Schonberg <schonberg@adacore.com>
2521 * sem_res.adb: Adjust previous change.
2523 2012-07-23 Vincent Pucci <pucci@adacore.com>
2525 * sem_ch9.adb (Allows_Lock_Free_Implementation): Flag
2526 Lock_Free_Given renames previous flag Complain. Description
2527 updated. Henceforth, catch every error messages issued by this
2528 routine when Lock_Free_Given is True. Declaration restriction
2529 updated: No non-elementary parameter instead (even in parameter)
2530 New subprogram body restrictions implemented: No allocator,
2531 no address, import or export rep items, no delay statement,
2532 no goto statement, no quantified expression and no dereference
2535 2012-07-23 Hristian Kirtchev <kirtchev@adacore.com>
2537 * checks.adb (Determine_Range): Add local variable Btyp. Handle
2538 the case where the base type of an enumeration subtype is
2539 private. Replace all occurrences of Base_Type with Btyp.
2540 * exp_attr.adb (Attribute_Valid): Handle the case where the
2541 base type of an enumeration subtype is private. Replace all
2542 occurrences of Base_Type with Btyp.
2543 * sem_util.adb (Get_Enum_Lit_From_Pos): Add local variable
2544 Btyp. Handle the case where the base type of an enumeration
2545 subtype is private. Replace all occurrences of Base_Type with
2548 2012-07-23 Ed Schonberg <schonberg@adacore.com>
2550 * par-ch6.adb (P_Mode): in Ada 2005, a mode indicator can apply
2551 to a formal object of an anonymous access type.
2553 2012-07-23 Ed Schonberg <schonberg@adacore.com>
2555 * sem_ch4.adb (Try_Container_Indexing): A user-defined indexing
2556 aspect can have more than one index, e.g. to describe indexing
2557 of a multidimensional object.
2559 2012-07-23 Hristian Kirtchev <kirtchev@adacore.com>
2561 * exp_ch4.adb (Apply_Accessibility_Check): Reimplemented. The check is
2562 now more complex and contains optional finalization part and mandatory
2565 2012-07-23 Gary Dismukes <dismukes@adacore.com>
2567 * a-cihama.adb, a-cihase.adb, a-cimutr.adb, a-ciorma.adb, a-ciormu.adb,
2568 a-ciorse.adb, a-coinho.adb, a-coinve.adb, a-cidlli.adb: Unsuppress
2569 Accessibility_Check for Element_Type allocators.
2571 2012-07-23 Vasiliy Fofanov <fofanov@adacore.com>
2573 * projects.texi: Fix typo.
2575 2012-07-23 Ed Schonberg <schonberg@adacore.com>
2577 * sem_res.adb (Resolve_Explicit_Derenference): If prefix is
2578 overloaded, remove those interpretations whose designated type
2579 does not match the context, to avoid spurious ambiguities that
2580 may be caused by the Ada 2012 conversion rule for anonymous
2583 2012-07-23 Vincent Celier <celier@adacore.com>
2585 * g-spitbo.adb (Substr (String)): Return full string and do not
2586 raise exception when Start is 1 and Len is exactly the length
2587 of the string parameter.
2588 * g-spitbo.ads: Fix spelling error in the name of exception
2591 2012-07-23 Ed Schonberg <schonberg@adacore.com>
2593 * par.adb: new subprogram Get_Aspect_Specifications.
2594 * par-ch6.adb (P_Subprogram): handle subprogram bodies with aspect
2596 * par-ch13.adb (Get_Aspect_Specifications): extracted from
2597 P_Aspect_Specifications. Collect aspect specifications in some
2598 legal context, but do not attach them to any declaration. Used
2599 when parsing subprogram declarations or bodies that include
2600 aspect specifications.
2601 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If aspects are
2602 present, analyze them, or reject them if the subprogram as a
2605 2012-07-23 Vasiliy Fofanov <fofanov@adacore.com>
2607 * gnat_ugn.texi: Omit section on other platforms/runtimes support
2608 in gnattest for vms version.
2610 2012-07-23 Ed Schonberg <schonberg@adacore.com>
2612 * sem_ch13.adb (Analyze_Aspect_Specifications):
2613 Handle properly aspects that can be specified on a subprogram
2614 body: CPU, Priority, and Interrupt_Priority.
2616 2012-07-23 Claire Dross <dross@adacore.com>
2618 * a-cfdlli.ads: Switch definition of Constant_Reference_Type
2621 2012-07-23 Thomas Quinot <quinot@adacore.com>
2623 * par_sco.adb (Process_Decisions.Output_Header): For the guard
2624 on an alternative in a SELECT statement, use the First_Sloc
2625 of the guard expression (not its topmost sloc) as the decision
2626 location, because this is what is referenced by dominance markers.
2628 2012-07-23 Hristian Kirtchev <kirtchev@adacore.com>
2630 * exp_ch7.adb (Requires_Hooking): Examine the original expression
2631 of an object declaration node because a function call that
2632 returns on the secondary stack may have been rewritten into
2635 2012-07-23 Vincent Pucci <pucci@adacore.com>
2637 * sem_dim.adb (Analyze_Dimension_Has_Etype): For identifier, propagate
2638 dimension when entity is a non-dimensionless constant.
2639 (Analyze_Dimension_Object_Declaration): Propagate
2640 dimension from the expression to the entity when type is a
2641 dimensioned type and object is a constant.
2643 2012-07-23 Ed Schonberg <schonberg@adacore.com>
2645 * sem_attr.adb (Analyze_Attribute, case 'Old): if the prefix
2646 is not an entity name, expand at once so that code generated by
2647 the expansion of the prefix is not generated before the constant
2648 that captures the old value is properly inserted and analyzed.
2650 2012-07-23 Thomas Quinot <quinot@adacore.com>
2652 * exp_ch9.adb (Ensure_Statement_Present): Mark generated NULL
2653 statement as Comes_From_Source so that GIGI does not eliminate it.
2655 2012-07-23 Hristian Kirtchev <kirtchev@adacore.com>
2657 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): Inst is now
2658 a local variable. Retrieve the related instance when processing
2659 a subprogram instantiation. Such instances appear as wrapper
2662 2012-07-23 Vincent Pucci <pucci@adacore.com>
2664 * system-aix64.ads, system-aix.ads, system-darwin-ppc.ads,
2665 system-hpux.ads, system-linux-alpha.ads,
2666 system-linux-hppa.ads, system-linux-ppc.ads,
2667 system-linux-s390.ads, system-linux-s390x.ads,
2668 system-linux-sh4.ads, system-linux-sparc.ads,
2669 system-lynxos-ppc.ads, system-mingw.ads,
2670 system-solaris-sparc.ads, system-solaris-sparcv9.ads,
2671 system-vms_64.ads, * system-vxworks-arm.ads, system-vxworks-m68k.ads,
2672 system-vxworks-mips.ads, system-vxworks-ppc.ads,
2673 system-vxworks-sparcv9.ads: Support_Atomic_Primitives set to False.
2674 * system-darwin-x86.ads, system-darwin-x86_64.ads,
2675 system-freebsd-x86.ads, system-freebsd-x86_64.ads,
2676 system-hpux-ia64.ads, system-linux-ia64.ads, system-linux-x86.ads,
2677 system-linux-x86_64.ads, system-lynxos-x86.ads,
2678 system-mingw-x86_64.ads, system-solaris-x86.ads,
2679 system-solaris-x86_64.ads, system-vms-ia64.ads,
2680 system-vxworks-x86.ads: Support_Atomic_Primitives set to True.
2681 * s-atopri.adb (Lock_Free_Read_X): New body.
2682 (Lock_Free_Try_Write_X): Support_Atomic_Primitives check added.
2683 (Lock_Free_Try_Write_64): New body.
2684 * s-atopri.ads: New type uint.
2685 (Sync_Compare_And_Swap_64): __sync_val_compare_and_swap_8 intrinsic
2687 (Lock_Free_Read_X): Body moved to s-atopri.adb.
2688 (Lock_Free_Try_Write_64): Similar to other Lock_Free_Try_Write_X
2690 * targparm.adb: New enumeration literal SAP
2691 (Support_Atomic_Primitives) for type Targparm_Tags. New constant
2692 SAP_Str. New component SAP_Str'Access for array Targparm_Str.
2693 (Get_Target_Parameters): Parse Support_Atomic_Primitives_On_Target
2695 * targparm.ads: New back-end code generation flag
2696 Support_Atomic_Primitives_On_Target
2698 2012-07-23 Vincent Pucci <pucci@adacore.com>
2700 * gnat_ugn.texi: Dimensionality checking documentation updated.
2702 2012-07-23 Ed Schonberg <schonberg@adacore.com>
2704 * sem_prag.adb (Make_Inline): If the pragma applies to a
2705 subprogram renaming, set inline flags on both the renamed entity
2706 and on the renaming, so that some ASIS queries can be handled
2707 consistently in the absence of expansion.
2709 2012-07-23 Fedor Rybin <frybin@adacore.com>
2711 * gnat_ugn.texi: Removing obsolete limitation of gnattest
2712 to support only ada05. Updating gnattest support for other
2713 platforms/run-times section to reflect the usage of taget
2714 prefix in gnattest calls. Fixing missed obsolete --stub-default
2717 2012-07-23 Robert Dewar <dewar@adacore.com>
2719 * uintp.adb: Minor reformatting.
2721 2012-07-23 Olivier Hainque <hainque@adacore.com>
2723 * system-vxworks-ppc.ads: Replace the default
2724 Linker_Options requesting crtbe by a commented out request for
2727 2012-07-23 Vincent Celier <celier@adacore.com>
2729 * prj-nmsc.adb (Check_Naming): Do not get the exceptions names
2730 in a virtual project.
2732 2012-07-23 Robert Dewar <dewar@adacore.com>
2734 * layout.adb, sem_prag.adb, sem.ads, freeze.adb,
2735 switch-m.adb, exp_disp.adb, system-vxworks-ppc.ads, exp_ch6.adb: Minor
2738 2012-07-23 Tristan Gingold <gingold@adacore.com>
2740 * gcc-interface/trans.c: (Handled_Sequence_Of_Statements_to_gnu): Set
2741 location on TRY_CATCH_EXPR.
2743 2012-07-19 Eric Botcazou <ebotcazou@adacore.com>
2745 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Try to ensure
2746 that an object of CW type initialized to a value is sufficiently
2747 aligned for this value.
2749 2012-07-19 Eric Botcazou <ebotcazou@adacore.com>
2751 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Do not
2752 look up the REP part of the base type in advance. Deal with that of
2754 (get_rep_part): Be prepared for record types with fields.
2756 2012-07-18 Eric Botcazou <ebotcazou@adacore.com>
2758 * gcc-interface/trans.c (stmt_group_may_fallthru): New function.
2759 (gnat_to_gnu) <N_Block_Statement>: Use it to find out whether the
2760 block needs to be translated.
2762 2012-07-17 Tristan Gingold <gingold@adacore.com>
2764 * gnat_rm.texi: Adjust previous change.
2766 2012-07-17 Ed Schonberg <schonberg@adacore.com>
2768 * sem_prag.adb (Process_Import_Or_Interface): If the pragma
2769 comes from an aspect, it applies to the corresponding entity
2770 without further check.
2772 2012-07-17 Olivier Hainque <hainque@adacore.com>
2774 * initialize.c (__gnat_initialize for VxWorks): Remove section with
2775 call to __gnat_vxw_setup_for_eh.
2776 * system-vxworks-ppc.ads: Add -auto-register to -crtbe, relying
2777 on the VxWorks constructor mechanism for network loaded modules
2780 2012-07-17 Tristan Gingold <gingold@adacore.com>
2782 * adaint.c: Minor reformatting.
2784 2012-07-17 Pascal Obry <obry@adacore.com>
2786 * s-regexp.adb (Adjust): Fix access violation in Adjust.
2788 2012-07-17 Ed Schonberg <schonberg@adacore.com>
2790 * freeze.adb (Freeze_Entity): Warn if an imported subprogram
2791 has pre/post conditions, because these will not be enforced.
2793 2012-07-17 Eric Botcazou <ebotcazou@adacore.com>
2795 * exp_ch7.adb (Process_Transient_Objects): Put all the
2796 finalization blocks and the final raise statement into a wrapper
2799 2012-07-17 Vincent Pucci <pucci@adacore.com>
2801 * s-atopri.adb (Lock_Free_Try_Write_X): Atomic_Compare_Exchange_X
2802 replaced by Sync_Compare_And_Swap_X.
2803 (Lock_Free_Try_Write_64): Removed.
2804 * s-atopri.ads (Sync_Compare_And_Swap_X): Replaces previous
2805 routine Atomic_Compare_Exchange_X.
2806 (Lock_Free_Read_64): Renaming of Atomic_Load_64.
2807 (Lock_Free_Try_Write_64): Renaming of Sync_Compare_And_Swap_64.
2809 2012-07-17 Vincent Celier <celier@adacore.com>
2811 * switch-m.adb (Normalize_Compiler_Switches): Recognize new
2812 switches -gnatn1 and -gnatn2.
2814 2012-07-17 Vincent Pucci <pucci@adacore.com>
2816 * gnat_ugn.texi: GNAT dimensionality checking
2817 documentation updated with System.Dim.Mks modifications.
2819 2012-07-17 Ed Schonberg <schonberg@adacore.com>
2821 * exp_ch3.adb: sloc of array init_proc is sloc of type declaration.
2823 2012-07-17 Tristan Gingold <gingold@adacore.com>
2825 * raise-gcc.c (get_call_site_action_for): Remove useless init
2827 (get_action_description_for): Do not overwrite action->kind.
2829 2012-07-17 Hristian Kirtchev <kirtchev@adacore.com>
2831 * exp_attr.adb (Expand_N_Attribute_Reference): Add local variables Attr
2832 and Conversion_Added. Add local constant Typ.
2833 Retrieve the original attribute after the arithmetic check
2834 machinery has modified the node. Add a conversion to the target
2835 type when the prefix of attribute Max_Size_In_Storage_Elements
2836 is a controlled type.
2838 2012-07-17 Gary Dismukes <dismukes@adacore.com>
2840 * exp_ch6.adb (Expand_Inlined_Call): For each actual parameter
2841 of mode 'out' or 'in out' that denotes an entity, reset
2842 Last_Assignment on the entity so that any assignments to the
2843 corresponding formal in the inlining will not trigger spurious
2844 warnings about overwriting assignments.
2846 2012-07-17 Robert Dewar <dewar@adacore.com>
2848 * s-assert.ads: Fix comments to make it clear that this is used
2849 for all assertions, not just pragma Assert.
2851 2012-07-17 Jerome Guitton <guitton@adacore.com>
2853 * par_sco.ads: Minor typo fix.
2855 2012-07-17 Gary Dismukes <dismukes@adacore.com>
2857 * layout.adb (Layout_Type): In the case where the target is
2858 AAMP, use 32 bits (a single pointer) rather than 64 bits for an
2859 anonymous access-to-subprogram type if the type is library-level
2860 and Is_Local_Anonymous_Access is True.
2862 2012-07-17 Jose Ruiz <ruiz@adacore.com>
2864 * s-tassta.adb, s-tarest.adb (Create_Task, Create_Restricted_Task,
2865 Initialize): Add comments explaining that the CPU affinity value that
2866 is passed to the run-time library can be either Unspecified_CPU, to
2867 indicate that the task inherits the affinity of its activating task,
2868 or a value in the range of CPU_Range but no greater than Number_Of_CPUs.
2870 2012-07-17 Javier Miranda <miranda@adacore.com>
2872 * exp_disp.adb (Make_DT): Remove decoration of Ada.Tags entities.
2873 (Make_Tags): Add decoration of Ada.Tags entities.
2875 2012-07-17 Ed Schonberg <schonberg@adacore.com>
2877 * sem_ch6.adb (Check_Statement_Sequence): When locating the
2878 last significant statement in a sequence, ignore iserted nodes
2879 that typically come from expansion of controlled operations.
2881 2012-07-17 Tristan Gingold <gingold@adacore.com>
2883 * gnat_rm.texi: Document foreign exceptions.
2885 2012-07-17 Robert Dewar <dewar@adacore.com>
2887 * sem_prag.adb, treepr.ads: Minor reformatting.
2889 2012-07-17 Robert Dewar <dewar@adacore.com>
2891 * exp_ch9.adb: Minor code reorganization.
2892 * exp_ch3.adb: Minor code improvement.
2894 2012-07-17 Tristan Gingold <gingold@adacore.com>
2896 * seh_init.c (__gnat_SEH_error_handler): Not compiled anymore
2897 on Windows 64 (+ SEH), as it is unused.
2899 2012-07-17 Javier Miranda <miranda@adacore.com>
2901 * sem_prag.adb (CPP_Class): Transform obsolescent pragma CPP_Class into
2902 CPP convention automatically.
2904 2012-07-16 Tristan Gingold <gingold@adacore.com>
2906 * gcc-interface/decl.c (intrin_return_compatible_p): Map Address to
2909 2012-07-16 Thomas Quinot <quinot@adacore.com>
2911 * exp_ch9.adb (Ensure_Statement_Present): New subprogram.
2912 (Expand_N_Asynchronous_Select,
2913 Expand_N_Selective_Accept.Process_Accept_Alternative,
2914 Expand_N_Selective_Accept.Process_Delay_Alternative,
2915 Expand_N_Timed_Entry_Call): For an alternative with no trailing
2916 statements, introduce a null statement to carry the sloc of
2917 the initial special statement (accept, delay, or entry call)
2918 in the alternative, for coverage analysis purposes.
2920 2012-07-16 Thomas Quinot <quinot@adacore.com>
2922 * sem_eval.adb (In_Subrange_Of): Fix typo in test for scalar
2925 2012-07-16 Robert Dewar <dewar@adacore.com>
2927 * a-exexpr.adb, freeze.adb, a-exexpr-gcc.adb, a-except-2005.adb,
2928 sem_eval.adb, s-fileio.adb: Minor reformatting.
2930 2012-07-16 Javier Miranda <miranda@adacore.com>
2932 * sem_prag.adb (Analyze_Pragma): Remove support for obsolescent
2934 * sem_ch13.adb (Analyze_Freeze_Entity): Add missing error on Ada
2935 derivations of CPP types. Found updating the tests affected by
2936 the removal of pragma CPP_Class.
2938 2012-07-16 Thomas Quinot <quinot@adacore.com>
2940 * back_end.adb: Minor reformatting.
2942 2012-07-16 Thomas Quinot <quinot@adacore.com>
2944 * exp_ch9.adb (Expand_N_Selective_Accept.Process_Accept_Alternative):
2945 Remove junk test that was always true. For the case of no statements
2946 following the ACCEPT, jump directly to End_Lab instead of
2947 introducing an intermediate jump.
2948 (Expand_N_Selective_Accept.Process_Delay_Alternative): Fix
2949 predicate testing for presence of statements following the DELAY.
2950 that was always true. For the case of no statements following
2951 the ACCEPT, jump directly to End_Lab instead of introducing an
2953 (Expand_N_Selective_Accept): Fix incorrect insertion point for
2956 2012-07-16 Thomas Quinot <quinot@adacore.com>
2958 * gnat_rm.texi: Minor documentation improvements.
2960 2012-07-16 Yannick Moy <moy@adacore.com>
2962 * sem_ch13.adb (Analyze_Aspect_Specifications): Allow Pre
2963 and Pre'Class aspects on the same declaration.
2964 * sem_prag.adb (Chain_PPC): Allow Pre and Pre'Class aspects on the
2965 same hierarchy of primitive operations.
2967 2012-07-16 Thomas Quinot <quinot@adacore.com>
2969 * freeze.adb (Check_Component_Storage_Order): Do not reject a
2970 nested composite with different scalar storage order if it is
2973 2012-07-16 Thomas Quinot <quinot@adacore.com>
2975 * gnat_rm.texi: Update documentation for Scalar_Storage_Order.
2977 2012-07-16 Tristan Gingold <gingold@adacore.com>
2979 * a-exexpr.adb (Propagate_Exception): Adjust call to
2980 Exception_Traces procedures.
2981 * a-exexpr-gcc.adb (Setup_Current_Excep): Now a
2982 function that returns an access to the Ada occurrence.
2983 (Propagate_GCC_Exception): Adjust calls.
2984 * raise.h (struct Exception_Occurrence): Declare.
2985 * a-exextr.adb: Remove useless pragma. (Notify_Handled_Exception,
2986 Notify_Unhandled_Exception) (Unhandled_Exception_Terminate):
2987 Add Excep parameter.
2988 * a-except.adb (Notify_Handled_Exception,
2989 Notify_Unhandled_Exception) (Unhandled_Exception_Terminate):
2990 Add Excep parameter.
2991 (Process_Raise_Exception): Adjust calls.
2992 * a-except-2005.adb (Notify_Handled_Exception,
2993 Notify_Unhandled_Exception) (Unhandled_Exception_Terminate): Add
2995 (Raise_Exception): Calls Raise_Exception_Always.
2996 * raise-gcc.c (__gnat_setup_current_excep,
2997 __gnat_notify_handled_exception)
2998 (__gnat_notify_unhandled_exception): Adjust declarations.
2999 (PERSONALITY_FUNCTION): Adjust calls.
3000 (__gnat_personality_seh0): Remove warning.
3002 2012-07-16 Javier Miranda <miranda@adacore.com>
3004 * sem_eval.adb (Test_Expression_Is_Foldable): Adding documentation.
3005 (Eval_Relational_Op): Adding documentation.
3007 2012-07-16 Robert Dewar <dewar@adacore.com>
3009 * freeze.adb, g-debpoo.adb, exp_ch3.adb: Minor reformatting.
3011 2012-07-16 Thomas Quinot <quinot@adacore.com>
3013 * s-oscons-tmplt.c: Add definitions of E2BIG and EILSEQ.
3015 2012-07-16 Tristan Gingold <gingold@adacore.com>
3017 * a-exexpr.adb (Propagate_Continue): New function replacing
3018 Raise_Current_Excep.
3019 (Allocate_Occurrence): New function.
3020 (Propagate_Exception): Add Excep parameter, remove call to Call_Chain.
3021 * a-exexpr-gcc.adb (GNAT_GCC_Exception): Occurrence component
3023 (To_GCC_Exception): Convert from Address.
3024 (Allocate_Occurrence): Allocate an Unwind exception occurrence.
3025 (Setup_Current_Excep): Fill the machine occurrence in case of
3027 (Propagate_Exception): Add Excep parameter, remove call to Call_Chain.
3028 * a-except.adb (Set_Exception_C_Msg, Set_Exception_Msg): add
3030 (Raise_Exception, Raise_Exception_Always,
3031 Raise_Exception_No_Defer): Adjust calls to the above procedures.
3032 (Raise_From_Signal_Handler, Raise_With_Location_And_Msg)
3033 (Rcheck_PE_Finalize_Raised_Exception): Likewise.
3034 * a-except-2005.adb (Set_Exception_C_Msg, Set_Exception_Msg):
3035 add Excep parameter.
3036 (Propagate_Exception): Likewise.
3037 (Allocate_Occurrence): New function.
3038 (Raise_Current_Excep): Removed.
3039 (Complete_Occurrence): New function to save the call chain.
3040 (Complete_And_Propagate_Occurrence): New procedure.
3041 (Create_Occurrence_From_Signal_Handler): New function to build an
3042 occurrence without propagating it.
3043 (Create_Machine_Occurrence_From_Signal_Handler): Likewise, but
3044 return the machine occurrence.
3045 (Raise_From_Signal_Handler): Use Create_Occurrence_From_Signal_Handler.
3046 (Raise_Exception, Raise_Exception_Always, Raise_Exception_No_Defer):
3047 Adjust calls to the above procedures. Allocate the occurrence at
3049 (Raise_With_Location_And_Msg, Raise_With_Msg)
3050 (Rcheck_PE_Finalize_Raised_Exceptionm Reraise): Likewise.
3051 (Reraise_Occurrence): Use Reraise_Occurrence_Always.
3052 (Reraise_Occurrence_Always): Use Reraise_Occurrence_No_Defer.
3053 (Reraise_Occurrence_No_Defer): Preserve machine occurrence.
3054 (Save_Occurrence): Do not save machine occurrence.
3055 * a-except-2005.ads (Exception_Occurrence): Add Machine_Occurrence
3057 (Null_Occurrence): Consider it.
3058 * a-exexda.adb (Set_Exception_C_Msg, Set_Exception_Msg): add
3061 2012-07-16 Tristan Gingold <gingold@adacore.com>
3063 * seh_init.c (__gnat_map_SEH): New function extracted from
3064 __gnat_SEH_error_handler.
3065 * raise-gcc.c: __gnat_personality_seh0: Directly transforms
3066 Windows system exception into GCC one when possible, in order
3067 to save stack room (particularly useful when Storage_Error will
3070 2012-07-16 Robert Dewar <dewar@adacore.com>
3072 * a-direct.adb, g-dirope.adb: Minor reformatting.
3074 2012-07-16 Tristan Gingold <gingold@adacore.com>
3076 * a-except.ads, a-except-2005.ads: Remove outdated comment.
3078 2012-07-16 Robert Dewar <dewar@adacore.com>
3080 * sem_ch6.adb (Subprogram_Name_Greater): Fix algorithm to
3081 conform to documentation.
3083 2012-07-16 Ed Schonberg <schonberg@adacore.com>
3085 * gnat1drv.adb (Check_Library_Items): Removed, no longer used.
3087 2012-07-16 Ed Schonberg <schonberg@adacore.com>
3089 * sem_ch3.adb (Array_Type_Declaration): if component type has
3090 invariants, the array type itself requires an invariant procedure.
3091 * exp_ch3.ads, exp_ch3.adb (Build_Array_Invariant_Proc): new
3092 procedure, to build a checking procedure that applies the
3093 invariant check on some type T to each component of an array
3094 of T's. Code is similar to the construction of the init_proc
3095 for an array, and handles multidimensional arrays by recursing
3096 over successive dimensions.
3098 2012-07-16 Hristian Kirtchev <kirtchev@adacore.com>
3100 * g-debpoo.adb: Revert previous change.
3102 2012-07-16 Hristian Kirtchev <kirtchev@adacore.com>
3104 * freeze.adb (Freeze_Entity): Insert the itype reference to a
3105 library-level class-wide subtype after the freeze node of the
3106 equivalent record type.
3108 2012-07-16 Pascal Obry <obry@adacore.com>
3110 * s-crtl.ads (mkdir): New routine, support encoding.
3111 * adaint.h (__gnat_mkdir): Update spec to pass encoding.
3112 * mkdir.c (__gnat_mkdir): Add encoding parameter.
3113 * a-direct.adb (Create_Directory): Use CRTL.mkdir, parse encoding
3115 * g-dirope.adb (Make_Dir): Update to pass encoding parameter.
3117 2012-07-16 Pascal Obry <obry@adacore.com>
3119 * adaint.c: Minor reformatting.
3121 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
3123 * gcc-interface/utils.c: Include timevar.h.
3124 * Make-lang.in: Fix dependencies.
3126 2012-07-16 Vasiliy Fofanov <fofanov@adacore.com>
3128 * ug_words, vms_data.ads: Document VMS qualifiers for -gnatn1/2
3131 2012-07-16 Bob Duff <duff@adacore.com>
3133 * sinfo.ads: Minor comment fix.
3135 2012-07-16 Bob Duff <duff@adacore.com>
3137 * sem_elab.adb (Within_Elaborate_All): Walk the with clauses to
3138 find pragmas Elaborate_All that may be found in the transitive
3139 closure of the dependences.
3141 2012-07-16 Robert Dewar <dewar@adacore.com>
3143 * exp_pakd.adb, freeze.adb, sem_util.adb, vms_data.ads: Minor
3146 2012-07-12 Vasiliy Fofanov <fofanov@adacore.com>
3148 * vms_data.ads: Add VMS qualifiers for -gnatn1/2 switches.
3150 2012-07-12 Thomas Quinot <quinot@adacore.com>
3152 * exp_ch5.adb, exp_pakd.adb, rtsfind.ads, freeze.adb, sem_util.adb,
3153 sem_util.ads, exp_aggr.adb
3154 (Exp_Aggr.Packed_Array_Aggregate_Handled): Simplify processing
3155 for reverse storage order aggregate.
3156 (Exp_Pakd.Byte_Swap): New utility routine used by...
3157 (Exp_Pakd.Expand_Bit_Packed_Element_Set,
3158 Expand_Packed_Element_Reference): For the case of a free-standing
3159 packed array with reverse storage order, perform byte swapping.
3160 (Rtsfind): Make new entities RE_Bswap_{16,32,64} available.
3161 (Freeze.Check_Component_Storage_Order): New utility routine
3162 to enforce legality rules for nested composite types whose
3163 enclosing composite has an explicitly defined Scalar_Storage_Order
3165 (Sem_Util.In_Reverse_Storage_Order_Object): Renamed from
3166 Sem_Util.In_Reverse_Storage_Order_Record, as SSO now applies to
3167 array types as well.
3168 (Exp_Ch5.Expand_Assign_Array): Remove now unnecessary kludge
3169 for change of scalar storage order in assignments. The Lhs and
3170 Rhs now always have the same scalar storage order.
3172 2012-07-12 Hristian Kirtchev <kirtchev@adacore.com>
3174 * g-debpoo.adb (Allocate): Add local constant
3175 No_Element. Initialize the allocated memory chunk to No_Element.
3177 2012-07-12 Ed Schonberg <schonberg@adacore.com>
3179 * sem_ch12.adb (Validate_Derived_Type_Instance): Handle properly
3180 the case of an instance of a child unit where a formal derived
3181 type DT is an extension of a type T declared in a parent unit,
3182 and the actual in the instance of the child is the type T declared
3183 in the parent instance, and that actual is not a derived type.
3185 2012-07-12 Eric Botcazou <ebotcazou@adacore.com>
3186 Tristan Gingold <gingold@adacore.com>
3188 * system-hpux-ia64.ads: Enable ZCX by default.
3189 * gcc-interface/Makefile.in: Use alternate stack on ia64-hpux.
3190 Change soext to .so.
3192 2012-07-12 Robert Dewar <dewar@adacore.com>
3194 * s-atopri.adb, s-atopri.ads: Minor reformatting.
3196 2012-07-12 Robert Dewar <dewar@adacore.com>
3198 * ali.adb: Add circuitry to read new named form of restrictions lines.
3199 * debug.adb: Add doc for new -gnatd.R switch (used positional
3200 notation for output of restrictions data in ali file).
3201 * lib-writ.adb: Implement new named format for restrictions lines.
3202 * lib-writ.ads: Add documentation for new named format for
3203 restrictions in ali files.
3204 * restrict.adb, restrict.ads, sem_prag.adb: Update comments.
3205 * rident.ads: Go back to withing System.Rident
3206 * s-rident.ads: Add extensive comment on dealing with consistency
3209 2012-07-12 Thomas Quinot <quinot@adacore.com>
3211 * par_sco.adb, scos.ads: Emit detailed SCOs for SELECT statements.
3213 2012-07-12 Robert Dewar <dewar@adacore.com>
3215 * sem_disp.adb: Minor reformatting
3216 * s-bytswa.ads: Minor comment update.
3218 2012-07-12 Vincent Pucci <pucci@adacore.com>
3220 * exp_ch9.adb (Build_Lock_Free_Unprotected_Subprogram_Body):
3221 Atomic_Load_N replaced by Lock_Free_Read_N. Atomic_Compare_Exchange_N
3222 replaced by Lock_Free_Try_Write_N.
3223 Renaming of several local variables. For
3224 procedure, Expected_Comp declaration moved to the declaration
3225 list of the procedure.
3226 * rtsfind.ads: RE_Atomic_Compare_Exchange_8,
3227 RE_Atomic_Compare_Exchange_16, RE_Atomic_Compare_Exchange_32,
3228 RE_Atomic_Compare_Exchange_64, RE_Atomic_Load_8,
3229 RE_Atomic_Load_16, RE_Atomic_Load_32, RE_Atomic_Load_64,
3230 RE_Atomic_Synchronize, RE_Relaxed removed. RE_Lock_Free_Read_8,
3231 RE_Lock_Free_Read_16, RE_Lock_Free_Read_32, RE_Lock_Free_Read_64,
3232 RE_Lock_Free_Try_Write_8, RE_Lock_Free_Try_Write_16,
3233 RE_Lock_Free_Try_Write_32, RE_Lock_Free_Try_Write_64 added.
3234 * s-atopri.adb: New file.
3235 * s-atopri.ads (Atomic_Compare_Exchange_8): Renaming of
3236 parameters. Import primitive __sync_val_compare_and_swap_1.
3237 (Atomic_Compare_Exchange_16): Renaming of parameters.
3238 Import primitive __sync_val_compare_and_swap_2.
3239 (Atomic_Compare_Exchange_32): Renaming of parameters.
3240 Import primitive __sync_val_compare_and_swap_4.
3241 (Atomic_Compare_Exchange_64): Renaming of parameters. Import
3242 primitive __sync_val_compare_and_swap_8.
3243 (Atomic_Load_8): Ptr renames parameter X.
3244 (Atomic_Load_16): Ptr renames parameter X.
3245 (Atomic_Load_32): Ptr renames parameter X.
3246 (Atomic_Load_64): Ptr renames parameter X.
3247 (Lock_Free_Read_8): New routine.
3248 (Lock_Free_Read_16): New routine.
3249 (Lock_Free_Read_32): New routine.
3250 (Lock_Free_Read_64): New routine.
3251 (Lock_Free_Try_Write_8): New routine.
3252 (Lock_Free_Try_Write_16): New routine.
3253 (Lock_Free_Try_Write_32): New routine.
3254 (Lock_Free_Try_Write_64): New routine.
3256 2012-07-12 Robert Dewar <dewar@adacore.com>
3258 * exp_attr.adb, exp_ch9.adb, sem_ch9.adb, exp_aggr.adb: Minor
3261 2012-07-12 Vincent Pucci <pucci@adacore.com>
3263 * sem_dim.adb (Analyze_Dimension_Function_Call): Reformatting of error
3264 msgs for elementary functions.
3266 2012-07-12 Vincent Pucci <pucci@adacore.com>
3268 * sem_attr.adb (Eval_Attribute): Minor reformatting.
3270 2012-07-12 Pascal Obry <obry@adacore.com>
3272 * prj-nmsc.adb (Check_Library_Attributes): Allow the same library
3273 project in different project tree (different aggregated projects).
3275 2012-07-12 Thomas Quinot <quinot@adacore.com>
3277 * s-bytswa.adb, g-bytswa.adb, g-bytswa.ads, s-bytswa.ads: Further
3278 reorganization of byte swapping routines.
3280 2012-07-12 Ed Schonberg <schonberg@adacore.com>
3282 * sem_disp.adb (Check_Dispatching_Context): Refine legality
3283 checks on tagg indeterminate calls to abstract operations,
3284 that appear in the context of other calls.
3286 2012-07-12 Thomas Quinot <quinot@adacore.com>
3288 * s-bytswa.adb (Swapped2.Bswap16): Remove local function,
3291 2012-07-12 Javier Miranda <miranda@adacore.com>
3293 * exp_attr.adb (Expand_N_Attribute_Reference): For
3294 attributes 'access, 'unchecked_access and 'unrestricted_access,
3295 iff the current instance reference is located in a protected
3296 subprogram or entry then rewrite the access attribute to be the
3297 name of the "_object" parameter.
3299 2012-07-12 Tristan Gingold <gingold@adacore.com>
3301 * raise.h: Revert previous patch: structure is used in init.c
3304 2012-07-12 Vincent Celier <celier@adacore.com>
3306 * make.adb (Binding_Phase): If --subdirs was used, but not
3307 -P, change the working directory to the specified subdirectory
3308 before invoking gnatbind.
3309 (Linking_Phase): If --subdirs was used, but not -P, change the working
3310 directory to the specified subdirectory before invoking gnatlink.
3312 2012-07-12 Vincent Pucci <pucci@adacore.com>
3314 * exp_ch9.adb (Build_Lock_Free_Unprotected_Subprogram_Body):
3315 For a procedure, instead of replacing each Comp reference by a
3316 reference to Current_Comp, make a renaming Comp of Current_Comp
3317 that rewrites the original renaming generated by the compiler
3318 during the analysis. Move the declarations of the procedure
3319 inside the generated block.
3320 (Process_Stmts): Moved in the body
3321 of Build_Lock_Free_Unprotected_Subprogram_Body.
3323 Moved in the body of Build_Lock_Free_Unprotected_Subprogram_Body.
3324 * sem_ch9.adb (Allows_Lock_Free_Implementation): Restrict any
3325 non-elementary out parameters in protected procedures.
3327 2012-07-12 Thomas Quinot <quinot@adacore.com>
3329 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
3330 Scalar_Storage_Order): Attribute applies to base type only.
3332 2012-07-12 Ed Schonberg <schonberg@adacore.com>
3334 * exp_aggr.adb (Convert_To_Positional): Increase acceptable size
3335 of static aggregate when Static_Elaboration_Desired is requested.
3336 Add a warning if the request cannot be satisfied either because
3337 some components or some array bounds are non-static.
3339 2012-07-12 Thomas Quinot <quinot@adacore.com>
3341 * exp_pakd.adb: Minor reformatting.
3343 2012-07-12 Tristan Gingold <gingold@adacore.com>
3345 * tracebak.c: Fix warnings.
3346 * raise-gcc.c (__gnat_adjust_context): New function
3347 (__gnat_personality_seh0): Call __gnat_adjust_context to adjust
3348 PC in machine frame for exceptions that occur in the current
3351 2012-07-12 Thomas Quinot <quinot@adacore.com>
3353 * g-bytswa.adb, g-bytswa.ads, s-bytswa.adb, s-bytswa.ads, Makefile.rtl:
3354 Move GNAT.Byte_Swapping to System (with a renaming under GNAT)
3355 so that it is usable in expanded code.
3357 2012-07-12 Tristan Gingold <gingold@adacore.com>
3359 * s-osinte-hpux.ads: Increase alternate stack size on hpux.
3361 2012-07-12 Javier Miranda <miranda@adacore.com>
3363 * exp_ch3.adb (Make_Neq_Body): Fix typo in comment.
3365 2012-07-12 Eric Botcazou <ebotcazou@adacore.com>
3367 * tb-gcc.c (trace_callback): On IA-64/HP-UX, use workaround only
3368 if USE_LIBUNWIND_EXCEPTIONS is defined.
3369 * init.c: Further tweaks for IA-64/HP-UX.
3371 2012-07-12 Tristan Gingold <gingold@adacore.com>
3373 * raise-gcc.c: Do not include unwind-dw2-fde.h. Adjust comments.
3374 (db_region_for): Second argument is ip. Do not recompute ip.
3375 (action_kind): Remove typedef, add unhandler enum const.
3376 (action_descriptor): Adjust type of kind field.
3377 (db_action_for): Second argument is ip, do not recompute it.
3378 (get_call_site_action_for): First argument is call_site, do not
3379 recompute it. Remove useless return.
3380 (is_handled_by): Now return enum action_kind.
3381 Handle GNAT_ALL_OTHERS first.
3382 Return unhandler for GNAT_UNHANDLED_OTHERS.
3383 (get_action_description_for): First argument is now ip, do not
3384 recompute it. Adjust code for call to is_handled_by.
3385 (__gnat_notify_unhandled_exception): Add prototype.
3386 (PERSONALITY_FUNCTION): Call get_ip_from_context. Adjust calls.
3387 Handle unhandler case.
3388 (__gnat_cleanupunwind_handler): Add comments, add
3389 ATTRIBUTE_UNUSED on arguments.
3390 (__gnat_Unwind_RaiseException, __gnat_Unwind_ForcedUnwind): Define
3392 * raise.h: Makes struct Exception_Data opaque.
3394 2012-07-12 Robert Dewar <dewar@adacore.com>
3396 * make.adb, sem_ch9.adb, prj.adb, s-rident.ads, snames.ads-tmpl: Minor
3399 2012-07-12 Javier Miranda <miranda@adacore.com>
3401 * exp_ch3.adb (Is_User_Defined_Equality): New subprogram.
3402 (Make_Neq_Body): New subprogram.
3403 (Make_Predefined_Primitive_Specs): Adding local variable
3404 Has_Predef_Eq_ Renaming to ensure that we enable the machinery
3405 which handles renamings of predefined primitive operators.
3407 2012-07-09 Pascal Obry <obry@adacore.com>
3409 * prj.adb (For_Every_Project_Imported_Context): Make sure we
3410 callback with the project having sources.
3413 2012-07-09 Eric Botcazou <ebotcazou@adacore.com>
3415 * make.adb: Fix typo.
3417 2012-07-09 Vincent Pucci <pucci@adacore.com>
3419 * sem_ch9.adb (Check_Node): Allow attributes
3420 that denote static function for lock-free implementation.
3421 (Is_Static_Function): New routine.
3423 2012-07-09 Tristan Gingold <gingold@adacore.com>
3425 * tracebak.c: Adjust skip_frames on Win64.
3427 2012-07-09 Tristan Gingold <gingold@adacore.com>
3429 * init.c: Add __gnat_adjust_context_for_raise for ia64/hpux.
3430 * raise-gcc.c: __gnat_cleanupunwind_handler: Do not call
3431 _Unwind_GetGR on hpux when using libgcc unwinder. Part of
3433 2012-07-09 Vincent Pucci <pucci@adacore.com>
3435 * exp_attr.adb, sem_attr.adb: Minor reformatting.
3436 * par-ch13.adb, par-ch4.adb, par-util.adb: Reformatting
3437 considering that internal attribute names are not defined anymore
3438 in the main attribute names list.
3439 * snames.adb-tmpl (Get_Attribute_Id): Special processinf
3440 for names CPU, Dispatching_Domain and Interrupt_Priority.
3441 (Is_Internal_Attribute_Name): Minor reformatting.
3442 * snames.ads-tmpl: New list of internal attribute names. Internal
3443 attributes moved at the end of the attribute Id list.
3445 2012-07-09 Robert Dewar <dewar@adacore.com>
3447 * freeze.adb: Minor code reorganization (use Ekind_In).
3448 * exp_attr.adb, sem_ch9.adb par-ch4.adb, s-taprop-mingw.adb,
3449 sem_attr.adb, exp_ch8.adb, snames.adb-tmpl, par-util.adb,
3450 sem_ch13.adb, snames.ads-tmpl: Minor reformatting.
3452 2012-07-09 Tristan Gingold <gingold@adacore.com>
3454 * raise-gcc.c: Adjust previous patch.
3456 2012-07-09 Vincent Celier <celier@adacore.com>
3458 * make.adb (Compilation_Phase): Do not build libraries in
3459 Codepeer mode (do not call Library_Phase).
3461 2012-07-09 Ed Schonberg <schonberg@adacore.com>
3463 * sem_ch13.adb: Extend previous change to elementary types.
3465 2012-07-09 Javier Miranda <miranda@adacore.com>
3467 * exp_ch8.adb (Expand_N_Subprogram_Renaming_Declaration): Reverse
3468 previous patch since unconditionally handling as renaming_as_body
3469 renamings of predefined dispatching equality and unequality operator
3470 cause visibility problems with private overridings of the equality
3471 operator (see ACATS C854001).
3473 2012-07-09 Vincent Pucci <pucci@adacore.com>
3475 * exp_attr.adb (Signal_Bad_Attribute): Raise Program_Error in
3476 case of internal attribute names (already rejected by the parser).
3477 * par-ch13.adb (P_Representation_Clause): Complain if an internal
3478 attribute name that comes from source occurs.
3479 * par-ch4.adb (P_Name): Complain if an internal attribute name
3480 occurs in the context of an attribute reference.
3481 * par-util.adb (Signal_Bad_Attribute): Don't complain about
3482 mispelling attribute with internal attributes.
3483 * sem_attr.adb (Analyze_Attribute): Raise Program_Error in case
3484 of internal attribute names (already rejected by the parser).
3485 * snames.adb-tmpl (Is_Internal_Attribute_Name): New routine.
3486 * snames.ads-tmpl: Attributes CPU, Dispatching_Domain and
3487 Interrupt_Priority are marked as INT attributes since they
3488 don't denote real attribute and are only used internally in
3490 (Is_Internal_Attribute_Name): New routine.
3492 2012-07-09 Thomas Quinot <quinot@adacore.com>
3494 * einfo.adb (Set_Reverse_Storage_Order): Update assertion,
3495 flag is now valid for array types as well.
3497 2012-07-09 Tristan Gingold <gingold@adacore.com>
3499 * tracebak.c: Implement __gnat_backtrace for Win64 SEH.
3501 2012-07-09 Robert Dewar <dewar@adacore.com>
3503 * einfo.ads: Minor reformatting.
3505 2012-07-09 Javier Miranda <miranda@adacore.com>
3507 * exp_ch8.adb (Expand_N_Subprogram_Renaming_Declaration): Handle as
3508 renaming_as_body renamings of predefined dispatching equality
3509 and unequality operators.
3511 2012-07-09 Robert Dewar <dewar@adacore.com>
3513 * rident.ads: Do not instantiate r-ident.ads, this is now an
3516 2012-07-09 Javier Miranda <miranda@adacore.com>
3518 * exp_disp.adb (Write_DT): Avoid runtime crash of this debugging
3520 * sem_disp.adb (Find_Dispatching_Time): Protect this routine
3521 against partially decorated entities.
3523 2012-07-09 Ed Schonberg <schonberg@adacore.com>
3525 * sem_ch13.adb (Check_Size): Reject a size clause that specifies
3526 a value greater than Int'Last for a scalar type.
3528 2012-07-09 Vincent Pucci <pucci@adacore.com>
3530 * sem_ch9.adb (Allows_Lock_Free_Implementation): type must support
3531 atomic operation moved to the protected body case. No non-elementary
3532 out parameter moved to the protected declaration case. Functions have
3533 only one lock-free restriction.
3534 (Analyze_Protected_Type_Declaration): Issue a warning when
3535 Priority given with Lock_Free.
3537 2012-07-09 Vincent Pucci <pucci@adacore.com>
3539 * sem_dim.adb: Grammar of aspect Dimension fixed.
3541 2012-07-09 Vincent Pucci <pucci@adacore.com>
3543 * freeze.adb (Freeze_Record_Type): Code reorg in order to avoid
3544 pushing and popping the scope stack whenever a delayed aspect occurs.
3546 2012-07-09 Gary Dismukes <dismukes@adacore.com>
3548 * s-os_lib.ads: Remove pragma Elaborate_Body, as
3549 this is now unnecessary due to recently added pragma Preelaborate.
3551 2012-07-09 Jose Ruiz <ruiz@adacore.com>
3553 * s-taprop-mingw.adb (Set_Priority): Remove the code that was
3554 previously in place to reorder the ready queue when a task drops
3555 its priority due to the loss of inherited priority.
3557 2012-07-09 Robert Dewar <dewar@adacore.com>
3559 * layout.adb, i-cstrea.ads, a-ststio.ads, prj-util.ads, sem_cat.adb,
3560 s-commun.ads, s-ficobl.ads, s-os_lib.ads, s-fileio.ads: Minor
3563 2012-07-09 Eric Botcazou <ebotcazou@adacore.com>
3565 * raise-gcc.c: Update comments. Fix typo.
3567 2012-07-09 Thomas Quinot <quinot@adacore.com>
3569 * einfo.adb, einfo.ads, sem_attr.adb, sem_ch13.adb: Attribute
3570 Scalar_Storage_Order can be defined or queried for array types as well
3573 2012-07-09 Tristan Gingold <gingold@adacore.com>
3575 * a-exexpr-gcc.adb (CleanupUnwind_Handler): Now imported from
3577 * raise-gcc.c (__gnat_cleanupunwind_handler): Defined.
3578 Strictly follow the ABI convention on ia64.
3580 2012-07-09 Gary Dismukes <dismukes@adacore.com>
3582 * a-ststio.ads: Add pragma Preelaborate, per AI05-0283.
3583 * i-cstrea.ads (max_path_len): Change from variable to deferred
3584 constant to allow it to be used as a bound in string component
3585 in type System.File_IO.Temp_File_Record.
3586 * s-os_lib.ads, s-commun.ads, s-ficobl.ads, s-fileio.ads: Add pragma
3588 * s-fileio.adb (Get_Case_Sensitive): Move function inside
3590 (File_Names_Case_Sensitive): Move variable inside
3591 procedure Open, to avoid violation of Preelaborate restriction
3592 (due to call to Get_Case_Sensitive).
3594 2012-07-09 Ed Schonberg <schonberg@adacore.com>
3596 * layout.adb (Set_Elem_Alignment): Protect against meaningless
3597 size clause, to prevent overflow in internal computation of
3600 2012-07-09 Robert Dewar <dewar@adacore.com>
3602 * freeze.adb, prj-util.adb, prj-util.ads, sem_ch13.adb: Minor
3605 2012-07-09 Gary Dismukes <dismukes@adacore.com>
3607 * sem_cat.adb (Check_Categorization_Dependencies):
3608 Allow dependence of both Remote_Types and Remote_Call_Interface
3609 declarations (not just Remote_Types units) on preelaborated
3610 units, but require that the dependence be made via a private
3611 with_clause. Issue a specialized error message.
3613 2012-07-09 Pascal Obry <obry@adacore.com>
3615 * prj-util.adb, prj-util.ads (For_Interface_Sources): New routine.
3617 2012-07-09 Tristan Gingold <gingold@adacore.com>
3619 * seh_init.c (__gnat_SEH_error_handler): On Win64 and SEH,
3620 return for unknown exceptions.
3621 * raise-gcc.c (__gnat_personality_seh0): Call __gnat_SEH_error_handler.
3623 2012-07-09 Joel Brobecker <brobecker@adacore.com brobecker>
3625 * exp_dbug.ads (No_Dollar_In_Label): Delete.
3627 2012-07-09 Vincent Pucci <pucci@adacore.com>
3629 * sem_ch13.adb (Check_Overloaded_Name): New routine.
3631 2012-07-09 Vincent Pucci <pucci@adacore.com>
3633 * freeze.adb (Freeze_Record_Type): Analyze the delayed aspects of the
3634 components in a record type.
3636 2012-07-09 Pascal Obry <obry@adacore.com>
3638 * prj-util.ads: Minor reformatting.
3640 2012-07-09 Tristan Gingold <gingold@adacore.com>
3642 * raise-gcc.c (db_indent): Simplify style, improve comments.
3643 Remove !IN_RTS part (dead).
3645 2012-07-09 Robert Dewar <dewar@adacore.com>
3647 * usage.adb: Minor change to format of -gnatn line.
3649 2012-07-09 Tristan Gingold <gingold@adacore.com>
3651 * a-exexpr-gcc.adb: Reorder routine.
3653 2012-07-09 Vincent Celier <celier@adacore.com>
3655 * lib-writ.ads: Add documentation for the Z lines (implicitly
3656 withed units) and Y lines (limited withed units).
3658 2012-07-09 Robert Dewar <dewar@adacore.com>
3660 * lib.ads, exp_attr.adb, exp_ch9.adb, sem_dim.adb, sem_ch9.adb,
3661 sem_prag.adb, sem_ch12.adb, mlib-utl.adb, freeze.adb, sem_res.adb,
3662 sem_attr.adb, sem_case.adb, gnatlink.adb, exp_ch4.adb, sem_ch6.adb,
3663 sem_elim.adb, s-dimmks.ads, sem_ch13.adb: Minor code clean ups.
3665 2012-07-09 Eric Botcazou <ebotcazou@adacore.com>
3667 * gnat_ugn.texi (Switches for gcc): Document -gnatn[12] only
3668 lightly in the summary and more thoroughly in inlining section.
3669 (Performance Considerations): Document -gnatn[12] in inlining
3672 2012-07-09 Tristan Gingold <gingold@adacore.com>
3674 * a-exexpr-gcc.adb (Unhandled_Except_Handler): New procedure.
3675 (Unhandled_Others_Value): New const.
3676 * raise-gcc.c (GNAT_UNHANDLED_OTHERS): Define.
3677 (action_descriptor): Remove ttype_entry.
3678 (get_action_description_for): Do not assign ttype_entry.
3679 (is_handled_by): Consider GNAT_UNHANDLED_OTHERS.
3681 2012-07-03 Eric Botcazou <ebotcazou@adacore.com>
3683 * gcc-interface/trans.c (Call_to_gnu): Robustify test for function case
3684 if the CICO mechanism is used.
3686 2012-07-03 Eric Botcazou <ebotcazou@adacore.com>
3688 * gcc-interface/utils2.c (build_simple_component_ref): Do not look
3689 through an extension if the type contains a placeholder.
3691 2012-07-03 Eric Botcazou <ebotcazou@adacore.com>
3693 * exp_disp.adb (Expand_Dispatching_Call): Propagate the convention on
3694 the designated subprogram type and also set Is_Dispatch_Table_Entity.
3695 (Expand_Interface_Thunk): Propagate the convention on the thunk.
3696 (Set_CPP_Constructors_Old): Set Is_Constructor and Convention_CPP on
3697 the internal view of the constructors.
3698 (Set_CPP_Constructors): Likewise.
3699 * sem_prag.adb (Analyze_Pragma) <Pragma_CPP_Constructor>: Set the
3700 convention on the function.
3701 * gcc-interface/gigi.h (is_cplusplus_method): Declare.
3702 * gcc-interface/decl.c (Has_Thiscall_Convention): New macro.
3703 (gnat_to_gnu_entity) <E_Subprogram_Type>: Test it to set the `thiscall'
3705 (get_minimal_subprog_decl): Likewise.
3706 (is_cplusplus_method): New predicate.
3707 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Access>: Issue an
3708 error on access to C++ constructor or member function.
3710 2012-07-03 Eric Botcazou <ebotcazou@adacore.com>
3712 * gcc-interface/utils.c (gnat_pushdecl): Set TYPE_CONTEXT for types
3713 attached to a TYPE_DECL.
3715 2012-06-26 Vincent Pucci <pucci@adacore.com>
3717 * exp_ch3.adb (Build_Init_Statements): Don't check the parents
3718 in the Rep Item Chain of the task for aspects Interrupt_Priority,
3719 Priority, CPU and Dispatching_Domain.
3720 * exp_ch9.adb (Expand_N_Task_Type_Declaration): fields _Priority,
3721 _CPU and _Domain are present in the corresponding record type
3722 only if the task entity has a pragma, attribute definition
3723 clause or aspect specification.
3724 (Make_Initialize_Protection): Don't check the parents in the Rep Item
3725 Chain of the task for aspects Interrupt_Priority, Priority, CPU and
3727 * freeze.adb (Freeze_Entity): Use of Evaluate_Aspects_At_Freeze_Point
3728 call replaced by Analyze_Aspects_At_Freeze_Point.
3729 * sem_ch13.adb, sem_ch13.ads (Analyze_Aspects_At_Freeze_Point):
3730 Renaming of Evaluate_Aspects_At_Freeze_Point.
3732 2012-06-26 Yannick Moy <moy@adacore.com>
3734 * sem_attr.adb (Analyze_Attribute): Detect if 'Old is used outside a
3735 postcondition, and issue an error in such a case.
3737 2012-06-26 Yannick Moy <moy@adacore.com>
3739 * gnat_rm.texi: Minor editing.
3741 2012-06-26 Tristan Gingold <gingold@adacore.com>
3743 * raise-gcc.c: Minor cleanup: remove unused prototype.
3744 * seh_init.c: Do not create an image wide unwind info to catch
3745 SEH when SEH unwind info are emitted by the compiler.
3747 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
3749 * gcc-interface/trans.c: Include target.h.
3750 (gigi): Try to put out .ident with targetm.asm_out.output_ident.
3751 Remove uses of ASM_OUTPUT_IDENT.
3752 * gcc-interface/Make-lang.in: Fix dependencies.
3754 2012-06-15 Eric Botcazou <ebotcazou@adacore.com>
3757 * gcc-interface/gigi.h (maybe_vector_array): Make static inline.
3758 * gcc-interface/utils.c (maybe_vector_array): Delete.
3759 * gcc-interface/trans.c (gnat_to_gnu) <N_Indexed_Component>: Mark the
3760 array object as addressable if it has vector type and is on the LHS.
3762 2012-06-15 Eric Botcazou <ebotcazou@adacore.com>
3765 * gcc-interface/misc.c (gnat_init_options_struct): Set
3766 opts->x_flag_delete_dead_exceptions to 1.
3768 2012-06-14 Jose Ruiz <ruiz@adacore.com>
3770 * gcc-interface/Make-lang.in (ada.install-common, ada.uninstall):
3771 Use the prefix specified with the --program-prefix configure option
3772 to determine the install name of the Ada tools.
3773 (ada.all.cross): Use a for loop to iterate over the set of Ada tools
3774 instead of duplicate the same processing.
3775 Update dependencies.
3777 2012-06-14 Vincent Pucci <pucci@adacore.com>
3779 * exp_ch6.adb (Expand_Call): Expand_Put_Call_With_Dimension_Symbol
3780 call replaced by Expand_Put_Call_With_Symbol call.
3781 * sem_dim.adb: New fields Unit_Names, Unit_Symbols
3782 and Dim_Symbols for record type System_Type.
3783 (From_Dimension_To_String_Of_Symbols): Removed.
3784 (From_Dim_To_Str_Of_Dim_Symbols): Renames previous
3785 routine From_Dimension_To_String_Of_Symbols.
3786 (From_Dim_To_Str_Of_Unit_Symbols): New routine.
3787 (Analyze_Aspect_Dimension): argument Symbol in aspect
3788 Dimension aggregate is optional. Named association implemented.
3789 (Has_Compile_Time_Known_Expressions): Removed.
3790 (Analyze_Aspect_Dimension_System): New
3791 component Dim_Symbol in each Dimension aggregate in
3792 aspect Dimension_System. Named associations implemented.
3793 (Add_Dimension_Vector_To_Buffer): Removed.
3794 (Add_Whole_To_Buffer): Removed.
3795 (Expand_Put_Call_With_Dimension_Symbol.): Removed.
3796 (Expand_Put_Call_With_Symbol): Renames previous routine
3797 Expand_Put_Call_With_Dimension_Symbol.
3798 (Has_Dimension_Symbols): Removed.
3799 (Has_Symbols): Renames previous routine
3800 Has_Dimension_Symbols. (Store_String_Oexpon): New routine.
3801 * sem_dim.ads (Expand_Put_Call_With_Dimension_Symbol.): Removed.
3802 (Expand_Put_Call_With_Symbol): Renames previous routine
3803 Expand_Put_Call_With_Dimension_Symbol.
3804 * s-diflio.adb, s-diinio.adb (Put): Symbol renames Symbols.
3805 (Put_Dim_Of): New routines.
3806 * s-diflio.ads, s-diinio.ads: documentation updated.
3807 (Put): Symbol renames Symbols.
3808 (Put_Dim_Of): New routines.
3809 * s-dim.ads: documentation updated.
3810 * s-dimmks.ads: dimensioned type and subtypes updated.
3811 * snames.ads-tmpl: Name_Dim_Symbol, Name_Put_Dim_Of, Name_Symbol,
3812 and Name_Unit_Symbol added. Name_Symbols removed.
3814 2012-06-14 Vincent Pucci <pucci@adacore.com>
3816 * freeze.adb (In_Exp_Body): Expression function case added.
3817 (Freeze_Expression): Insert the Freeze_Nodes
3818 list before the correct current scope in case of a quantified
3821 2012-06-14 Pascal Obry <obry@adacore.com>
3823 * projects.texi: Document the Install package for gprinstall.
3824 2012-06-14 Ed Schonberg <schonberg@adacore.com>
3826 * sem_elim.adb (Check_For_Eliminated_Subprogram): Do not check within
3827 a default expression.
3828 * sem_res.adb (Resolve_Call): simplify code.
3830 2012-06-14 Ed Schonberg <schonberg@adacore.com>
3832 * sem_case.adb (Check, Issue_Msg): within an instance, non-other
3833 values in a variant part or a case expression do not have to
3834 belong to the actual subtype.
3836 2012-06-14 Ed Schonberg <schonberg@adacore.com>
3838 * sem_ch12.adb (Validate_Derived_Type_Instance): If parent is
3839 an interface type, check whether it is itself a previous formal
3840 already instantiated in the current list of actuals.
3842 2012-06-14 Ed Schonberg <schonberg@adacore.com>
3844 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): The
3845 expression for a stream attribute is a name that may be overloaded
3846 with other declarations. To determine whether it matches the
3847 aspect at the freeze point, it is necessary to verify that one
3848 of its interpretations matches.
3850 2012-06-14 Robert Dewar <dewar@adacore.com>
3852 * exp_ch7.adb, exp_util.adb, sem_aux.ads, exp_ch9.adb,
3853 sem_ch10.adb, freeze.adb, sem_util.adb, exp_ch4.adb,
3854 s-taprop-dummy.adb: Minor reformatting.
3856 2012-06-14 Vincent Pucci <pucci@adacore.com>
3858 * exp_attr.adb (Expand_N_Attribute_Reference): Lock_Free
3859 attribute case added.
3860 * par-prag.adb (Prag): Lock_Free pragma case added.
3861 * sem_attr.adb (Analyze_Attribute_Reference): Lock_Free attribute
3863 * sem_ch13.adb (Analyze_Aspect_Specifications): Record_Rep_Item
3864 call added for Aspect_Lock_Free.
3865 * sem_ch9.adb (Allows_Lock_Free_Implementation): New Lock_Free
3866 error messages for subprogram bodies.
3867 (Lock_Free_Disabled): New routine.
3868 (Analyze_Protected_Body): Call to Lock_Free_Disabled added.
3869 * sem_prag.adb (Analyze_Pragma): Lock_Free pragma case added.
3870 * snames.adb-tmpl (Get_Pragma_Id): Name_Lock_Free case added.
3871 (Is_Pragma_Name): Name_Lock_Free case added.
3872 * snames.ads-tmpl: Attribute_Lock_Free and Pragma_Lock_Free added.
3874 2012-06-14 Ed Schonberg <schonberg@adacore.com>
3876 * a-coorma.adb, a-cborma.adb, a-cbhama.adb, a-ciorma.adb: Add missing
3879 2012-06-14 Bob Duff <duff@adacore.com>
3881 * lib.ads, lib.adb, sem.adb (Write_Unit_Info): Move this
3882 procedure from Sem body to Lib spec, so it can be used for
3883 debugging elsewhere.
3885 2012-06-14 Ed Schonberg <schonberg@adacore.com>
3887 * sem_ch6.adb (Check_Conformance): Add Ada 2012 check on mode
3888 conformance: "aliased" must apply to both or neither formal
3891 2012-06-14 Gary Dismukes <dismukes@adacore.com>
3893 * exp_ch9.adb: Minor reformatting.
3895 2012-06-14 Thomas Quinot <quinot@adacore.com>
3897 * freeze.adb (Freeze_Record_Type): Warn about useless bit order
3898 specification [when there's no component clause] regardless
3899 of whether the specified bit order is reversed or not.
3901 2012-06-14 Tristan Gingold <gingold@adacore.com>
3903 * raise-gcc.c (__gnat_personality_seh0): New function.
3905 2012-06-14 Tristan Gingold <gingold@adacore.com>
3907 * gnatname.adb (Gnatname): Make sure that dynamic table
3908 argument_data is initialized.
3910 2012-06-14 Robert Dewar <dewar@adacore.com>
3912 * sem_aux.adb: Minor code reorganization.
3914 2012-06-14 Vincent Pucci <pucci@adacore.com>
3916 * einfo.adb einfo.ads (Get_Rep_Item): Removed.
3917 (Get_Rep_Item_For_Entity): Removed.
3918 (Get_Rep_Pragma): Removed.
3919 (Get_Rep_Pragma_For_Entity): Removed.
3920 (Has_Rep_Item): Removed.
3921 (Has_Rep_Pragma): Removed.
3922 (Has_Rep_Pragma_For_Entity): Removed.
3923 * exp_ch9.adb (Expand_N_Task_Type_Declaration):
3924 Has_Rep_Pragma_For_Entity replaced by Has_Rep_Pragma
3925 and Get_Rep_Pragma_For_Entity replaced by Get_Rep_Pragma.
3926 (Make_Task_Create_Call): Has_Rep_Pragma_For_Entity replaced
3927 by Has_Rep_Pragma and Get_Rep_Pragma_For_Entity replaced by
3929 * exp_intr.adb: Dependency to Sem_Aux added for call to Get_Rep_Pragma.
3930 * sem_aux.adb (Get_Rep_Item): New routine.
3931 (Get_Rep_Pragma): New routine.
3932 (Has_Rep_Item): New routine.
3933 (Has_Rep_Pragma): New routine.
3934 (Nearest_Ancestor): Minor reformatting.
3935 * sem_aux.ads (Get_Rep_Item): New routine.
3936 (Get_Rep_Pragma): New routine.
3937 (Has_Rep_Item): New routine.
3938 (Has_Rep_Pragma): New routine.
3939 * sem_ch13.adb (Duplicate_Clause): Restore original error messages.
3940 * sem_eval.adb (Subtypes_Statically_Match): Get_Rep_Item_For_Entity
3941 replaced by Get_Rep_Item.
3942 * sem_prag.adb (Analyze_Pragma): Restore original error messages.
3943 (Check_Duplicate_Pragma): Restore original error messages.
3945 2012-06-14 Ed Schonberg <schonberg@adacore.com>
3947 * sem_util.adb (Is_Object_Reference): in Ada 2012, qualified
3948 expressions are valid names.
3950 2012-06-14 Ed Schonberg <schonberg@adacore.com>
3952 * sem_ch10.adb (Analyze_Compilation_Unit): If the unit is an
3953 instantiation do not emit warnings for obsolescent units. The
3954 warnings belong on the corresponding generic.
3956 2012-06-14 Hristian Kirtchev <kirtchev@adacore.com>
3958 * einfo.adb: Update the usage of Node15.
3959 (Return_Flag_Or_Transient_Decl): Removed.
3960 (Set_Return_Flag_Or_Transient_Decl): Removed.
3961 (Set_Status_Flag_Or_Transient_Decl): New routine.
3962 (Status_Flag_Or_Transient_Decl): New routine.
3963 (Write_Field15_Name): Update the output for variables and constants.
3964 * einfo.ads: Remove attribute
3965 Return_Flag_Or_Transient_Decl along with occurrences in nodes.
3966 (Return_Flag_Or_Transient_Decl): Removed along with pragma Inline.
3967 (Set_Return_Flag_Or_Transient_Decl): Removed along with pragma Inline.
3968 (Set_Status_Flag_Or_Transient_Decl): New routine along with pragma
3970 (Status_Flag_Or_Transient_Decl): New routine along with pragma Inline.
3971 * exp_ch4.adb (Create_Alternative): New routine.
3972 (Expand_N_Conditional_Expression): Handle the case
3973 where at least one of the conditional expression
3974 alternatives prodices a controlled temporary by means of a function
3976 (Is_Controlled_Function_Call): New routine.
3977 (Process_Transient_Object): Update the call to
3978 Set_Return_Flag_Or_Transient_Decl.
3979 * exp_ch6.adb (Enclosing_Context): New routine.
3980 (Expand_N_Extended_Return_Statement): Update all calls to
3981 Set_Return_Flag_Or_Transient_Decl.
3982 (Expand_Ctrl_Function_Call): Prohibit the finalization of a controlled
3983 function result when the context is a conditional expression.
3984 * exp_ch7.adb (Process_Declarations): Update all calls to
3985 Return_Flag_Or_Transient_Decl. Add processing for intermediate
3986 results of conditional expressions where one of the alternatives
3987 uses a controlled function call.
3988 (Process_Object_Declaration): Update all calls to
3989 Return_Flag_Or_Transient_Decl and rearrange the logic to process
3990 "hook" objects first.
3991 (Process_Transient_Objects): Update the call to
3992 Set_Return_Flag_Or_Transient_Decl.
3993 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean,
3994 Boolean)): Update all calls to Return_Flag_Or_Transient_Decl. Add
3995 detection for intermediate results of conditional expressions
3996 where one of the alternatives uses a controlled function call.
3998 2012-06-13 Eric Botcazou <ebotcazou@adacore.com>
4001 2012-05-19 Eric Botcazou <ebotcazou@adacore.com>
4003 * gcc-interface/decl.c (Has_Thiscall_Convention): New macro.
4004 (gnat_to_gnu_entity) <E_Subprogram_Type>: Test it to set the thiscall
4006 (get_minimal_subprog_decl): Likewise.
4007 (gnat_first_param_is_class): New predicate.
4009 2012-06-12 Robert Dewar <dewar@adacore.com>
4011 * gcc-interface/Make-lang.in: Update dependencies.
4012 * sem_ch9.ads, einfo.adb, einfo.ads, sem_prag.adb, freeze.adb,
4013 sem_util.adb, sem_ch13.adb, sem_ch13.ads, exp_ch3.adb: Add comments.
4016 2012-06-12 Ed Schonberg <schonberg@adacore.com>
4018 * sem_ch12.adb (Instantiate_Formal_Subprogram): Remove code that
4019 implements AI05-0296, because the actual may be overloaded.
4020 * sem_ch8.adb (Analyze_Subprogram_Renaming): and move it here,
4021 to be applied once the actual subprogram is properly resolved.
4023 2012-06-12 Robert Dewar <dewar@adacore.com>
4025 * switch-c.adb, a-exexpr-gcc.adb: Minor reformatting.
4027 2012-06-12 Vincent Pucci <pucci@adacore.com>
4029 * checks.adb (Tag_Checks_Suppressed): Remove Kill_Tag_Checks check.
4030 * einfo.adb (Universal_Aliasing): Apply to the implementation
4031 base type instead of the base type.
4032 (Get_Rep_Item_For_Entity):
4033 Return a pragma if the pragma node is not present in the Rep
4034 Item chain of the parent.
4035 (Kill_Tag_Checks): Removed (unused flag).
4036 (Set_Kill_Tag_Checks): Removed.
4037 (Get_First_Rep_Item): New routine.
4038 (Get_Rep_Pragma_For_Entity): New routine.
4039 (Has_Rep_Item): New routine.
4040 (Has_Rep_Pragma_For_Entity): New routine.
4041 (Present_In_Rep_Item): New routine.
4042 * einfo.ads (Kill_Tag_Checks): Removed.
4043 (Set_Kill_Tag_Checks): Removed.
4044 (Get_First_Rep_Item): New routine.
4045 (Get_Rep_Pragma_For_Entity): New routine.
4046 (Has_Rep_Item): New routine.
4047 (Has_Rep_Pragma_For_Entity): New routine.
4048 (Present_In_Rep_Item): New routine.
4049 * exp_attr.adb, sem_attr.adb: Attribute_CPU,
4050 Attribute_Dispatching_Domain and Attribute_Interrupt_Priority
4052 * exp_ch13.adb (Expand_N_Attribute_Definition_Clause): For
4053 attribute Storage_Size, insert the new assignement statement
4054 after the Size variable declaration.
4055 * exp_ch3.adb (Build_Init_Statements): Fill the CPU,
4056 Dispatching_Domain, Priority and Size components with the Rep
4057 Item expression (if any).
4058 * exp_ch9.adb (Expand_N_Task_Type_Declaration): _CPU,
4059 _Priority, _Domain fields are always present in the
4060 corresponding record type.
4061 (Find_Task_Or_Protected_Pragma): Removed.
4062 (Get_Relative_Deadline_Pragma): New routine.
4063 (Make_Initialize_Protection): Find_Task_Or_Protected_Pragma removed.
4064 (Make_Task_Create_Call): Check CPU, Size or
4065 Dispatching_Domain Rep Item is present using new routine Has_Rep_Item.
4066 * freeze.adb (Freeze_All): Push_Scope_And_Install_Discriminants
4067 and Uninstall_Discriminants_And_Pop_Scope calls added.
4068 (Freeze_Entity): Evaluate_Aspects_At_Freeze_Point call added.
4069 * sem_aux.adb (Nearest_Ancestor): Retrieve the nearest ancestor
4070 for private derived types.
4071 * sem_ch13.adb (Analyze_Aspect_Specifications): Clean-up
4072 and reordering. Delay analysis for all aspects (except some
4074 (Analyze_Attribute_Definition_Clause):
4075 Attribute_CPU, Attribute_Dispatching_Domain,
4076 Interrupt_Priority and Attribute_Priority cases added.
4077 (Analyze_Freeze_Entity): Push_Scope_And_Install_Discriminants
4078 and Uninstall_Discriminants_And_Pop_Scope calls added.
4079 (Check_Aspect_At_Freeze_Point): Reordering and clean-up.
4080 (Duplicate_Clause): Issue an explicit error msg when the current
4081 clause duplicates an aspect specification, an attribute definition
4083 (Evaluate_Aspects_At_Freeze_Point): New routine.
4084 * sem_ch13.ads (Evaluate_Aspects_At_Freeze_Point): New routine.
4085 * sem_ch9.adb, sem_ch9.ads (Install_Discriminants): New routine.
4086 (Push_Scope_And_Install_Discriminants): New routine.
4087 (Uninstall_Discriminants): New routine.
4088 (Uninstall_Discriminants_And_Pop_Scope): New routine.
4089 * sem_prag.adb (Check_Duplicate_Pragma): Issue an explicit error
4090 msg when the current pragma duplicates an aspect specification,
4091 an attribute definition clause or a pragma.
4092 (Analyze_Pragma): Remove use of flags Has_Pragma_CPU,
4093 Has_Pragma_Priority and Has_Pragma_Dispatching_Domain.
4094 * sem_util.adb (Compile_Time_Constraint_Error): Don't complain
4095 about the type if the corresponding concurrent type doesn't come
4097 * sinfo.adb, sinfo.ads (Has_Pragma_CPU): Removed.
4098 (Has_Pragma_Dispatching_Domain): Removed.
4099 (Has_Pragma_Priority): Removed.
4100 (Has_Task_Info_Pragma): Removed.
4101 (Has_Task_Name_Pragma): Removed.
4102 (Set_Has_Pragma_CPU): Removed.
4103 (Set_Has_Pragma_Dispatching_Domain): Removed.
4104 (Set_Has_Pragma_Priority): Removed.
4105 (Set_Has_Task_Info_Pragma): Removed.
4106 (Set_Has_Task_Name_Pragma): Removed.
4107 * snames.adb-tmpl (Get_Pragma_Id): Pragma_CPU,
4108 Pragma_Dispatching_Domain and Pragma_Interrupt_Priority added.
4109 (Is_Pragma_Name): Name_CPU, Name_Dispatching_Domain and
4110 Name_Interrupt_Priority added.
4111 * snames.ads-tmpl: Name_Dispatching_Domain, Name_CPU
4112 and Name_Interrupt_Priority moved to the list of
4113 Attribute_Name. Attribute_CPU, Attribute_Dispatching_Domain and
4114 Attribute_Interrupt_Priority added. Pragma_Dispatching_Domain,
4115 Pragma_CPU and Pragma_Interrupt_Priority moved to the end of
4116 the Pragma_Name list.
4118 2012-06-12 Arnaud Charlet <charlet@adacore.com>
4120 * xref_lib.adb (Get_Full_Type): Add support for 'G'.
4122 2012-06-12 Tristan Gingold <gingold@adacore.com>
4124 * a-exexpr-gcc.adb (Unwind_Exception): Add 4 more private fields.
4126 2012-06-12 Fedor Rybin <frybin@adacore.com>
4128 * gnat_ugn.texi: Update doc on gnattest.
4130 2012-06-12 Robert Dewar <dewar@adacore.com>
4132 * sem_ch12.adb: Add comments.
4134 2012-06-12 Robert Dewar <dewar@adacore.com>
4136 * switch-c.adb, inline.adb, usage.adb, opt.ads: Minor reformatting.
4138 2012-06-12 Robert Dewar <dewar@adacore.com>
4140 * sem_ch12.adb: Minor reformatting.
4142 2012-06-12 Eric Botcazou <ebotcazou@adacore.com>
4144 * opt.ads (Inline_Level): New variable.
4145 * gnat1drv.adb (Adjust_Global_Switches): Set it based on optimization
4146 level if it has not been set by the user.
4147 * switch-c.adb (Scan_Front_End_Switches): Accept -gnatn1 and -gnatn2
4148 and set Inline_Level accordingly.
4149 * inline.adb (Add_Inlined_Body): Declate new Inline_Level_Type type.
4150 (Must_Inline): Return Inline_Level_T instead of Boolean to indicate
4151 whether the package of the inlined subprogram must be compiled.
4152 If Inline_Level is set to 1, only compile packages of subprograms
4153 directly called from the main unit.
4154 * usage.adb (Usage): Adjust line for -gnatn switch.
4155 * gnat_ugn.texi (Switches for gcc): Document -gnatn1 and -gnatn2.
4157 2012-06-12 Ed Schonberg <schonberg@adacore.com>
4159 * sem_ch12.adb (Instantiate_Formal_Subprogram): Do not apply
4160 AI05-296 if the actual is overloaded. In this case The rule must
4161 be applied after resolution, in Analyze_Subprogram_Renaming.
4163 2012-06-12 Robert Dewar <dewar@adacore.com>
4165 * stringt.adb: Minor reformatting.
4167 2012-06-12 Robert Dewar <dewar@adacore.com>
4169 * ali-util.adb, stringt.ads: Minor reformatting.
4171 2012-06-12 Hristian Kirtchev <kirtchev@adacore.com>
4173 * exp_ch7.adb (Process_Declarations): Handle the case where
4174 the original context has been wrapped in a block to avoid
4175 interference between exception handlers and At_End handlers.
4176 (Wrap_HSS_In_Block): Mark the block which contains the original
4177 statements of the context as being a finalization wrapper.
4178 * sinfo.adb (Is_Finalization_Wrapper): New routine.
4179 (Set_Is_Finalization_Wrapper): New routine.
4181 * sinfo.ads: Add new attribute Is_Finalization_Wrapper applicable
4183 (Is_Finalization_Wrapper): New routine with corresponding pragma Inline.
4184 (Set_Is_Finalization_Wrapper): New routine with corresponding pragma
4187 2012-06-12 Steve Baird <baird@adacore.com>
4189 * gnat1drv.adb (Adjust_Global_Switches): No longer need to set
4190 Exception_Extra_Info in CodePeer_Mode.
4192 2012-06-12 Robert Dewar <dewar@adacore.com>
4194 * sem_dist.adb, exp_ch7.adb, sem_type.adb, exp_attr.adb,
4195 sinfo.ads, sem_ch7.adb, exp_alfa.adb, sem_scil.adb, sem_ch12.adb,
4196 sem_util.adb, sem_res.adb, sem_attr.adb, sem_elab.adb, exp_ch6.adb,
4197 sem_ch4.adb, sem_warn.adb, scil_ll.adb, exp_cg.adb: Minor code
4200 2012-06-12 Eric Botcazou <ebotcazou@adacore.com>
4202 * s-tasini.ads: Minor fix in comment.
4204 2012-06-12 Thomas Quinot <quinot@adacore.com>
4206 * freeze.adb (Freeze_Record_Type): Warn on record with
4207 Scalar_Storage_Order if there is no placed component.
4209 2012-06-12 Thomas Quinot <quinot@adacore.com>
4211 * sem_ch3.adb: Minor comment fix.
4213 2012-06-12 Vincent Celier <celier@adacore.com>
4215 * ali-util.adb (Time_Stamp_Mismatch): In minimal recompilation
4216 mode, use Stringt Mark and Release to avoid growing the Stringt
4217 internal tables uselessly.
4218 * stringt.adb (Strings_Last): New global variable
4219 (String_Chars_Last): New global variable.
4220 (Mark, Release): New procedures.
4221 * stringt.ads (Mark, Release) New procedures.
4223 2012-06-12 Hristian Kirtchev <kirtchev@adacore.com>
4225 * exp_ch7.adb (Process_Transient_Objects): Renamed constant
4226 Requires_Hooking to Must_Hook and replace all occurrences of the name.
4227 (Requires_Hooking): New routine. Detect all contexts that require
4228 transient variable export to the outer finalizer due to a potential
4231 2012-06-12 Ed Schonberg <schonberg@adacore.com>
4233 * sem_ch12.adb: Small adjustment.
4235 2012-06-12 Vincent Celier <celier@adacore.com>
4237 * vms_cmds.ads (Command_Type): New enumeration value Test
4238 * vms_conv.adb (Initialize): Add component at index Test in
4240 * vms_data.ads (Test_Switches): New global variable for the
4241 switches of gnattest, currently empty.
4243 2012-06-12 Ed Schonberg <schonberg@adacore.com>
4245 * sem_ch3.adb (Analyze_Subtype_Declaration): if an incomplete
4246 type is tagged, so is a subtype of it.
4247 * sem_ch12.adb (Validate_Actual_Subprogram): implement AI05-0296,
4248 concerning freeze rules in the presence of formal incomplete
4249 types: a formal abstract subprogram cannot have an incomplete
4250 controlling type, and the profile of the actual subprogram does
4251 not freeze if it includes an incomplete untagged type.
4253 2012-06-12 Robert Dewar <dewar@adacore.com>
4255 * a-direct.adb: Minor reformatting.
4257 2012-06-12 Robert Dewar <dewar@adacore.com>
4259 * gnat_ugn.texi: Add missing documentation for -gnatw.v and
4262 2012-06-12 Thomas Quinot <quinot@adacore.com>
4264 * sem_ch7.adb, sem_prag.adb, sem_ch12.adb, sem_ch4.adb,
4265 sem_ch13.adb: Minor rewording of error messages for unchecked unions.
4267 2012-06-12 Robert Dewar <dewar@adacore.com>
4269 * lib-xref.ads: Minor reformatting.
4271 2012-06-12 Pascal Obry <obry@adacore.com>
4273 * a-direct.adb (Delete_File): Delete symbolic links silently
4274 instead of raising the Name_Error exception when the symbolic
4275 link is pointing to a non existent file.
4277 2012-06-12 Robert Dewar <dewar@adacore.com>
4279 * xref_lib.adb, sem_ch13.adb, lib-xref.adb: Minor reformatting.
4281 2012-06-12 Javier Miranda <miranda@adacore.com>
4283 * lib-xref.ads Adding missing documentation.
4285 2012-06-12 Hristian Kirtchev <kirtchev@adacore.com>
4287 * exp_ch7.adb (Create_Finalizer): Add the
4288 exception reraise mechanism at the very end of the finalizer
4289 statements. This placement ensures that all objects are finalized,
4290 the secondary stack mark released and aborts undeferred before
4291 propagating an exception.
4293 2012-06-12 Ed Schonberg <schonberg@adacore.com>
4295 * sem_ch10.adb (Remove_Unit_From_Visibility): if the unit is a
4296 wrapper package. remove from visibility the original subprogram
4299 2012-06-12 Javier Miranda <miranda@adacore.com>
4301 * sem_prag.adb (Process_Convention): Generate reference to entity
4302 exported to foreign language. Needed for GPS navigation.
4303 * xref_lib.adb (Parse_Identifier_Info): Parse exported entities.
4304 * lib-xref (Output_References): Output exported entities.
4306 2012-06-12 Pascal Obry <obry@adacore.com>
4308 * prj-attr.adb: Add install package and corresponding attributes.
4309 * snames.ads-tmpl (Name_Active): New constant.
4310 (Name_Exec_Subdir): Likewise.
4311 (Name_Install): Likewise.
4312 (Name_Lib_Subdir): Likewise.
4313 (Name_Project_Subdir): Likewise.
4314 (Name_Sources_Subdir): Likewise.
4316 2012-06-12 Bob Duff <duff@adacore.com>
4318 * sem_res.adb (Check_Infinite_Recursion):
4319 Suppress spurious warning on recursion after "raise with ...".
4321 2012-06-12 Thomas Quinot <quinot@adacore.com>
4323 * sem_prag.adb (Analyze_Pragma, case Unchecked_Union): Do
4324 not crash on illegal unchecked union that is a null record.
4326 2012-06-12 Thomas Quinot <quinot@adacore.com>
4328 * exp_ch4.adb (Has_Inferable_Discriminants): Reorganize code to
4329 treat implicit dereferences with a constrained unchecked union
4330 nominal subtype as having inferable discriminants.
4332 2012-06-12 Robert Dewar <dewar@adacore.com>
4334 * sem_ch6.adb: Minor reformatting.
4336 2012-06-12 Eric Botcazou <ebotcazou@adacore.com>
4338 * gnat_ugn.texi: Couple of minor corrections.
4340 2012-06-12 Thomas Quinot <quinot@adacore.com>
4342 * sem_prag.adb (Check_Variant): An empty component list is not
4343 illegal in an unchecked union variant.
4345 2012-06-12 Gary Dismukes <dismukes@adacore.com>
4347 * projects.texi: Remove comments.
4349 2012-06-12 Thomas Quinot <quinot@adacore.com>
4351 * back_end.adb (Scan_Back_End_Switches): Treat -fdump-scos as
4353 (gnat_post_options): Disable gimple-based SCO generator.
4354 * gnat_ugn.texi: Document that -gnateS is an obsolete synonym
4357 2012-06-12 Ed Schonberg <schonberg@adacore.com>
4359 * sem_ch6.adb (Different_Generic_Profile): new predicate for
4360 Find_Corresponding_Spec, to handle a rare case of accidental
4361 overloading in an instance, when the profile of a subprogram body
4362 that depends on a formal type becomes compatible with that of
4363 a homonym whose profile in the generic mentions the actual type.
4365 2012-06-12 Thomas Quinot <quinot@adacore.com>
4367 * gnat1drv.adb: Minor reformatting.
4369 2012-06-12 Ed Schonberg <schonberg@adacore.com>
4371 * sem_util.adb (Build_Explicit_Dereference): If the expression
4372 is an entity, ensure that the type of the expression is the same
4373 as that of the entity.
4375 2012-06-12 Pat Rogers <rogers@adacore.com>
4377 * projects.texi: Corrected instances of the word "build" that
4378 should be "built" instead. Other similar changes and minor
4379 punctuation changes.
4381 2012-06-12 Eric Botcazou <ebotcazou@adacore.com>
4383 * sem_util.adb (Is_Atomic_Object): Return true for an atomic
4384 component as well as a prefix which is an atomic component.
4386 2012-06-12 Ed Schonberg <schonberg@adacore.com>
4388 * exp_prag.adb (Expand_Pragma_Import_Or_Interface): revert previous
4389 patch. The processing of interfacing aspects now generates a
4390 proper Ada 2005 pragma.
4391 * sem_prag.adb (Analyze_Pragma, cases Pragma_Export and
4392 Pragma_Import): revert previous patch. The processing of
4393 interfacing aspects now generates a proper Ada 2005 pragma.
4394 * sem_ch13.adb (Analyze_Aspect_Specifications): generate proper
4395 pragam for aspects Convention, Import and Export. Scan list
4396 of aspects to collect link name and external name if present,
4397 and verify that a complete pragma can be generated.
4399 2012-06-11 Olivier Hainque <hainque@adacore.com>
4401 * gcc-interface/Makefile.in (GNATLIBCFLAGS_FOR_C): Remove
4402 $(PIC_FLAG_FOR_TARGET).
4403 (gnatlib-shared-default): Add $(PIC_FLAG_FOR_TARGET) to
4404 GNATLIBCFLAGS_FOR_C passed to gnatlib.
4405 (gnatlib-shared-win32): Likewise.
4406 (gnatlib-shared-darwin): Likewise.
4407 (gnatlib-shared-dual-win32): Pass PIC_FLAG_FOR_TARGET to
4408 gnatlib-shared-win32.
4410 2012-06-11 Eric Botcazou <ebotcazou@adacore.com>
4412 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Convert GNU_SIZE
4413 to units before invoking allocatable_size_p on it.
4414 Remove orphaned comment. Do not use ssize_int.
4415 <E_Record_Subtype>: Traverse list in original order. Minor tweak.
4416 (allocatable_size_p): Adjust and simplify.
4417 (build_subst_list): Use consistent terminology throughout.
4418 (build_variant_list): Likewise. Traverse list in original order.
4419 (create_field_decl_from): Likewise.
4420 (copy_and_substitute_in_size): Likewise.
4421 (create_variant_part_from): Add comment about field list order.
4422 * gcc-interface/utils.c (build_vms_descriptor): Do not use ssize_int.
4423 * gcc-interface/utils2.c (build_allocator): Likewise.
4425 2012-06-11 Eric Botcazou <ebotcazou@adacore.com>
4427 * gcc-interface/trans.c (Identifier_to_gnu): Test Is_Elementary_Type
4428 instead of Is_Scalar_Type for a constant with an address clause.
4429 Do not return the underlying constant for a constant used by reference
4430 if it holds the address of a constant and an lvalue is required.
4432 2012-06-11 Eric Botcazou <ebotcazou@adacore.com>
4434 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not specifically deal
4435 with external constants wrt force_global here...
4436 <E_Constant>: ...but here instead.
4437 * gcc-interface/utils.c (gnat_pushdecl): Do not put external DECLs onto
4438 the list of global DECLs.
4440 2012-06-11 Eric Botcazou <ebotcazou@adacore.com>
4442 * gcc-interface/decl.c (gnat_to_gnu_entity): Translate the Esize on
4443 entry only for elementary types and abort if it is too large.
4444 <E_Record_Type>: Make sure the Esize is known before using it.
4446 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
4448 * gcc-interface/utils2.c: Do not include output.h.
4449 * gcc-interface/Make-lang.in: Fix dependencies.
4451 2012-05-29 Michael Matz <matz@suse.de>
4453 * gcc-interface/utils.c (create_var_decl_1): Don't call expand_decl.
4455 2012-05-26 Eric Botcazou <ebotcazou@adacore.com>
4457 * gcc-interface/decl.c (variant_desc): Rename 'record' to 'new_type'.
4458 (build_variant_list): Adjust to above renaming.
4459 (gnat_to_gnu_entity) <E_Record_Subtype>: Likewise. Give a unique name
4460 to the type of the variant containers.
4461 (create_variant_part_from): Likewise. Give a unique name to the type
4462 of the variant part.
4464 2012-05-25 Eric Botcazou <ebotcazou@adacore.com>
4467 * link.c (__gnat_object_file_option): Set to "-Wl,@" for GNU linker.
4468 (__gnat_using_gnu_linker): Delete.
4469 * gnatlink.adb (Gnatlink): Declare Object_File_Option_Ptr here...
4470 Declare Object_File_Option string constant and Using_GNU_response_file
4472 (Process_Binder_File): ...instead of here. Delete Using_GNU_Linker,
4473 Opening and Closing local variables. Do not handle the GNU linker
4475 (Write_RF): New procedure to write into the response file. Escape some
4476 characters if a GNU response file is used. Keep track of error status.
4477 Invoke Write_RF to write into the response file. Delete the file only
4478 if the link was successful.
4479 * mlib-utl.adb: Do not `with' package System.
4480 (Gcc): Likewise. Declare Object_File_Option string constant and
4481 Using_GNU_response_file boolean constant.
4482 (Write_RF): Take a string instead of address and length. Escape some
4483 characters if a GNU response file is used.
4484 Invoke Write_RF to write into the response file. Delete the file only
4485 if the link was successful. Do not warn if it cannot be deleted.
4487 2012-05-20 Eric Botcazou <ebotcazou@adacore.com>
4489 * gcc-interface/utils.c (gnat_write_global_declarations): Put a name
4490 on the dummy global variable.
4492 2012-05-19 Eric Botcazou <ebotcazou@adacore.com>
4494 * gcc-interface/decl.c (Has_Thiscall_Convention): New macro.
4495 (gnat_to_gnu_entity) <E_Subprogram_Type>: Test it to set the thiscall
4497 (get_minimal_subprog_decl): Likewise.
4498 (gnat_first_param_is_class): New predicate.
4500 * gcc-interface/misc.c (gnat_handle_option): Fix formatting.
4501 * gcc-interface/Makefile.in: Likewise.
4503 2012-05-18 Eric Botcazou <ebotcazou@adacore.com>
4505 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: For an object at
4506 global level with unconstrained nominal subtype and a non-fixed size,
4507 make a variable for the size.
4509 2012-05-15 Andris Pavenis <andris.pavenis@iki.fi>
4512 * s-taprop-dummy.adb (Specific): New package.
4514 2012-05-15 Olivier Hainque <hainque@adacore.com>
4516 * gcc-interface/Make-lang.in (COMMON_FLAGS_TO_PASS): Use WARN_CFLAGS
4517 instead of trying to mimic it.
4519 2012-05-15 Robert Dewar <dewar@adacore.com>
4521 * sem_ch5.adb, sem_util.adb, s-stposu.adb, exp_ch4.adb: Minor
4524 2012-05-15 Geert Bosch <bosch@adacore.com>
4526 * uintp.adb (UI_Rem): Remove optimizations, as they are complex and are
4528 (Sum_Digits): Remove, no longer used.
4529 (Sum_Double_Digits): Likewise.
4531 2012-05-15 Yannick Moy <moy@adacore.com>
4533 * aspects.ads: Minor typo.
4535 2012-05-15 Thomas Quinot <quinot@adacore.com>
4537 * gnat_rm.texi (Scalar_Storage_Order): Fix RM reference.
4538 * sem_ch13.adb: Minor comment fix: incorrect RM reference.
4540 2012-05-15 Eric Botcazou <ebotcazou@adacore.com>
4542 * sem_prag.adb (Process_Atomic_Shared_Volatile): Propagate
4543 atomicity from an object to its underlying type only if it
4546 2012-05-15 Ed Schonberg <schonberg@adacore.com>
4548 * sem_ch5.adb (Analyze_Iterator_Specification): Set kind of
4549 loop variable after pre-analysis of iterator name, to prevent
4550 premature usage of loop variable.
4552 2012-05-15 Ed Schonberg <schonberg@adacore.com>
4554 * sem_util.adb (Is_Variable): In Ada 2012, an explicit
4555 dereference that is a rewriting of an expression whose type has
4556 a declared Implicit_Derenference aspect is a variable.
4558 2012-05-15 Hristian Kirtchev <kirtchev@adacore.com>
4560 * exp_ch4.adb (Insert_Dereference_Action): Reimplemented. The
4561 routine performs address and size adjustments for dereferences
4562 of heap-allocated controlled objects. This manipulation is needed
4563 in order to restore the original state of the memory at the time
4564 it was allocated by the finalization machinery.
4565 * rtsfind.ads: Add RE_Adjust_Controlled_Dereference to tables
4566 RE_Id and RE_Unit_Table.
4567 * sinfo.adb (Has_Dereference_Action): New routine.
4568 (Set_Has_Dereference_Action): New routine.
4569 * sinfo.ads: Add new semantic flag Has_Dereference_Action along
4570 its association in nodes.
4571 (Has_Dereference_Action): New routine and pragma Inline.
4572 (Set_Has_Dereference_Action): New routine and pragma Inline.
4573 * s-stposu.ads, s-stposu.adb (Adjust_Controlled_Dereference): New
4576 2012-05-15 Thomas Quinot <quinot@adacore.com>
4578 * uintp.adb (Image_Uint): Use UI_Div_Rem to get quotient and
4579 remainder of U / Base in a single operation.
4581 2012-05-15 Robert Dewar <dewar@adacore.com>
4583 * exp_ch5.adb, inline.adb, sem_ch10.adb, prj.ads, sem_util.adb,
4584 a-ngelfu.ads, exp_ch4.adb, exp_ch6.adb, aspects.ads, sem_ch6.adb,
4585 vms_data.ads, exp_ch3.adb, prj-env.adb: Minor reformatting.
4587 2012-05-15 Thomas Quinot <quinot@adacore.com>
4589 * exp_ch4.adb (Has_Inferable_Discriminants): For a qualified
4590 expression, use correct node for test on the subtype denoted by
4593 2012-05-15 Eric Botcazou <ebotcazou@adacore.com>
4595 * inline.adb (Scope_In_Main_Unit): Rename into...
4596 (In_Main_Unit_Or_Subunit): ...this. Also return
4597 true if the subprogram is within a subunit of the
4599 (Add_Inlined_Body): Adjust for above renaming.
4600 (Add_Inlined_Subprogram): Likewise. Pass the subprogram directly.
4601 (Analyze_Inlined_Bodies): Really set aside inlined subprograms
4602 not handled by Add_Inlined_Body.
4604 2012-05-15 Ed Schonberg <schonberg@adacore.com>
4606 * sem_ch10.adb (Expand_With_Clause): In the context of a generic
4607 package declaration, a private with-clause on a child unit implies
4608 that the implicit with clauses on its parents are private as well.
4610 2012-05-15 Javier Miranda <miranda@adacore.com>
4612 * sem_ch6.adb (Is_Interface_Conformant): Add missing call to
4613 Base_Type to handle subtypes.
4614 * exp_ch6.adb (Expand_Call): For calls located in thunks handle
4615 unchecked conversions of access types found in actuals.
4616 * exp_disp.adb (Expand_Interface_Thunk): Add missing unchecked
4617 conversion to actuals whose type is an access type. Done to
4618 avoid reporting spurious errors.
4620 2012-05-15 Vincent Celier <celier@adacore.com>
4622 * prj-env.adb (Create_Mapping): Ignore sources that are
4623 suppressed (Create_Mapping_File.Process): Ditto
4624 * prj-nmsc.adb (Add_Source): Update to take into
4625 account suppressed files that may hide inherited sources.
4626 (Mark_Excluded_Sources): Mark excluded sources of the current
4627 project as suppressed.
4628 * prj.ads (Source_Data): New Boolean component Suppressed,
4631 2012-05-15 Thomas Quinot <quinot@adacore.com>
4633 * exp_intr.adb: Minor reformatting.
4635 2012-05-15 Thomas Quinot <quinot@adacore.com>
4637 * gnat_rm.texi: Document attribute Scalar_Storage_Order.
4639 2012-05-15 Javier Miranda <miranda@adacore.com>
4641 * exp_ch3.adb (Build_Offset_To_Top): Modify the
4642 expansion of the offset_to_top functions to ensure that their
4643 profile is conformant with the profile specified in Ada.Tags. No
4644 change in functionality.
4646 2012-05-15 Eric Botcazou <ebotcazou@adacore.com>
4648 * inline.adb (Subp_Info): Remove Count and Next_Nopred
4649 components, add Processed component and move around Next component.
4650 (Add_Call): Reverse meaning of Successors table to the natural one.
4651 (Add_Inlined_Body): Do not inline a package if it is in the main unit.
4652 (Add_Inlined_Subprogram): Do not add the subprogram to the list if the
4653 package is in the main unit. Do not recurse on the successors.
4654 (Add_Subp): Adjust to new contents of Subp_Info.
4655 (Analyze_Inlined_Bodies): Do not attempt
4656 to compute a topological order on the list of inlined subprograms,
4657 but compute the transitive closure from the main unit instead.
4658 (Get_Code_Unit_Entity): Always return the spec for a package.
4660 2012-05-15 Yannick Moy <moy@adacore.com>
4662 * aspects.ads: Minor addition of comments to provide info on
4663 how to add new aspects.
4665 2012-05-15 Thomas Quinot <quinot@adacore.com>
4667 * osint.ads: Minor reformatting.
4669 2012-05-15 Thomas Quinot <quinot@adacore.com>
4671 * exp_ch5.adb, exp_pakd.adb, sem_util.adb, sem_util.ads
4672 (Expand_Assign_Array): Handle the case of a packed bit array within a
4673 record with reverse storage order (assign element by element in that
4675 (In_Reverse_Storage_Order_Record): New subprogram,
4676 code extracted from Exp_Pakd.
4678 2012-05-15 Yannick Moy <moy@adacore.com>
4680 * a-ngelfu.ads: Add postconditions using Ada 2012
4681 aspect syntax, reflecting some of the RM requirements for these
4682 functions, from Annex A.5.1 or G.2.4.
4684 2012-05-15 Thomas Quinot <quinot@adacore.com>
4686 * adaint.c: Minor fix: move misplaced comment.
4688 2012-05-15 Doug Rupp <rupp@adacore.com>
4690 * vms_data.ads: Enhance help for /IMMEDIATE_ERRORS to discourage
4693 2012-05-15 Tristan Gingold <gingold@adacore.com>
4695 * a-exextr.adb: Add comment.
4697 2012-05-15 Ed Schonberg <schonberg@adacore.com>
4699 * sem_ch3.adb: Minor reformatting (remove long dead code).
4701 2012-05-15 Ed Schonberg <schonberg@adacore.com>
4703 * aspects.adb, aspects.ads: Add aspects for Convention, Export,
4704 External_Name, Import, and Link_Name.
4705 * exp_prag.adb (Expand_Pragma_Import_Or_Interface): if the
4706 pragma comes from an aspect specification, the entity is the
4708 * sem_prag.adb (Analyze_Pragma, cases Pragma_Export and
4709 Pragma_Import): if the pragma comes from an aspect specification,
4710 the entity is the first argument, and the second has the value
4712 * sem_ch13.adb (Analyze_Aspect_Specifications): generate pragam
4713 for aspect Convention. Add placeholders for Link_Name and
4716 2012-05-15 Hristian Kirtchev <kirtchev@adacore.com>
4718 * exp_ch9.adb (Expand_N_Asynchronous_Select): Extract the statements
4719 of the abortable part and triggering alternative after being processed
4720 for controlled objects.
4721 (Expand_N_Timed_Entry_Call): Code and comment reformatting.
4723 2012-05-15 Robert Dewar <dewar@adacore.com>
4725 * sem_util.adb: Minor code reorganization.
4727 2012-05-15 Robert Dewar <dewar@adacore.com>
4729 * exp_ch7.adb, exp_ch11.adb, exp_ch11.ads: Minor reformatting.
4731 2012-05-15 Thomas Quinot <quinot@adacore.com>
4733 * sem_res.adb (Resolve): Enforce E.2.2(11/2) and E.2.2(12) for
4734 'Unrestricted_Access and 'Unchecked_Access (not just 'Access):
4735 even in those cases, a remote access type may only designate a
4738 2012-05-15 Thomas Quinot <quinot@adacore.com>
4740 * sem_util.adb, sem_util.ads, sem_cat.adb: Minor refactoring.
4741 (Enclosing_Lib_Unit_Node): Rename to Enclosing_Comp_Unit_Node.
4743 2012-05-15 Ed Schonberg <schonberg@adacore.com>
4745 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Remove obsolete
4746 checks on nested inlined subprograms.
4748 2012-05-15 Tristan Gingold <gingold@adacore.com>
4750 * fe.h (Get_RT_Exception_Name): Declare.
4752 2012-05-15 Tristan Gingold <gingold@adacore.com>
4754 * raise-gcc.c (db_region_for): Use %p + cast to avoid warnings.
4755 (get_region_description_for): Likewise.
4756 (db_action_for): Likewise.
4757 (get_call_site_action_for): Likewise.
4758 (get_ttype_entry_for): Remove useless 'const'.
4759 (PERSONALITY_FUNCTION): Add ATTRIBUTE_UNUSED on uw_exception_class.
4761 2012-05-15 Tristan Gingold <gingold@adacore.com>
4763 * a-exextr.adb (Unhandled_Exception_Terminate): Save occurrence
4764 on the stack to avoid a dynamic memory allocation.
4766 2012-05-15 Bob Duff <duff@adacore.com>
4768 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Move initialization of
4769 E_Stats and D_Stats after Process_Statements_For_Controlled_Objects,
4770 because those calls can destroy the Statements list.
4772 2012-05-15 Tristan Gingold <gingold@adacore.com>
4774 * fe.h (Get_RT_Exception_Name): Define.
4775 * types.ads (RT_Exception_Code): Update comment.
4776 * exp_ch11.adb, exp_ch11.ads (Get_RT_Exception_Name): New
4777 procedure to get the name of the rcheck subprograms.
4778 * a-except-2005.adb (Rcheck_xx): Rename.
4779 * a-except.adb Likewise, but also keep the old Rcheck_nn routines
4781 * arith64.c (__gnat_mulv64): Use __gnat_rcheck_CE_Overflow_Check
4782 instead of __gnat_rcheck_10.
4783 * gcc-interface/trans.c (build_raise_check): Use Get_RT_Exception_Name
4784 to create the __gnat_rcheck routines name.
4785 * gcc-interface/Make-lang.in: Update dependencies.
4787 2012-05-15 Tristan Gingold <gingold@adacore.com>
4789 * exp_ch7.adb (Build_Exception_Handler): Save current
4790 occurrence only if -gnateE.
4791 (Build_Object_Declaration): Declare E_Id only if -gnateE.
4792 (Build_Raise_Statement): Call Raise_From_Controlled_Operation only if
4793 -gnateE (else raise PE).
4794 * s-soflin.adb (Save_Library_Occurrence): Handle null occurrence
4796 * a-except-2005.adb (Reraise_Library_Exception_If_Any): Call
4797 Raise_From_Controlled_Operation only if the saved occurrence is
4798 not null, otherwise raise PE.
4800 2012-05-15 Yannick Moy <moy@adacore.com>
4802 * exp_alfa.ads: Add comments describing the Alfa mode.
4804 2012-05-15 Tristan Gingold <gingold@adacore.com>
4806 * s-soflin.ads, s-soflin.adb (Save_Library_Occurrence): Parameter
4807 E is now of type Exception_Occurrence_Access.
4808 * exp_ch7.ads, exp_ch7.adb (Build_Exception_Handler): Adjust generated
4809 call to Save_Library_Occurrence.
4811 2012-05-15 Thomas Quinot <quinot@adacore.com>
4813 * exp_ch4.adb (Rewrite_Coextension): Use Insert_Action to
4814 insert temporary variable decl at the proper place in the tree.
4816 2012-05-15 Hristian Kirtchev <kirtchev@adacore.com>
4818 * g-calend.adb (Split_At_Locale): New routine.
4819 (Time_Of_At_Locale): New routine.
4820 * g-calend.ads (Split_At_Locale): New routine.
4821 (Time_Of_At_Locale): New routine.
4823 2012-05-15 Gary Dismukes <dismukes@adacore.com>
4825 * a-except.ads: Minor reformatting.
4827 2012-05-15 Ed Schonberg <schonberg@adacore.com>
4829 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): If the loop
4830 parameter specification is part of a quantified expression, and it
4831 already carries a type, do not repeat the analysis to preserve
4832 type information: a range attribute reference may have been
4833 rewritten as a range with static bounds, and its re-analysis may
4834 type it as Integer by default, instead of the original index type.
4836 2012-05-15 Robert Dewar <dewar@adacore.com>
4838 * s-osprim-mingw.adb: Minor reformatting.
4840 2012-05-15 Arnaud Charlet <charlet@adacore.com>
4842 * a-except.adb, a-except.ads (Reraise_Library_Exception_If_Any): New.
4843 Mark this unit preelaborate.
4844 * s-soflin.ads: Make package Preelaborate.
4846 2012-05-15 Robert Dewar <dewar@adacore.com>
4848 * s-osprim-mingw.adb, sem_eval.adb, a-calend-vms.ads: Minor reformatting
4850 2012-05-15 Ed Schonberg <schonberg@adacore.com>
4852 * sem_eval.adb (Subtypes_Statically_Match): In Ada 2012, static
4853 matching requires matching of static subtype predicates as well.
4855 2012-05-15 Ed Schonberg <schonberg@adacore.com>
4857 * sem_case.adb (Analyze_Choices): If the subtype of the
4858 expression has a non-static predicate, the case alternatives
4859 must cover the base type.
4861 2012-05-15 Tristan Gingold <gingold@adacore.com>
4863 * a-calend-vms.ads: Add pragma export to Split and Time_Of.
4864 Merge comments from a-calend.ads to minimize differences.
4866 2012-05-15 Sergey Rybin <rybin@adacore.com frybin>
4868 * gnat_ugn.texi: gnatmetric: add a small example that demonstrates
4869 the difference between control coupling and unit coupling.
4871 2012-05-15 Tristan Gingold <gingold@adacore.com>
4873 * bindgen.adb (Gen_Header): Remove code to emit LE_Set.
4874 (Gen_Finalize_Library): Replace test with
4875 a call to __gnat_reraise_library_exception_if_any.
4876 * s-soflin.ads (Library_Exception): Do not export.
4877 (Library_Exception_Set): Likewise.
4878 * a-except-2005.ads, a-except-2005.adb
4879 (Reraise_Library_Exception_If_Any): New procedure.
4881 2012-05-15 Geert Bosch <bosch@adacore.com>
4883 * sem_ch9.adb (Allows_Lock_Free_Implementation): out or in out
4884 parameters can be access types as well, not just scalar types,
4885 so relax the test to Is_Elementary_Type.
4887 2012-05-15 Bob Duff <duff@adacore.com>
4889 * s-atacco.ads s-atacco.adb: Replace pragma Elaborate_Body
4890 with pragma No_Body.
4891 (Xyz): Remove Xyz, which is apparently unnecessary.
4893 2012-05-15 Tristan Gingold <gingold@adacore.com>
4895 * a-calend-vms.adb: Complete previous change.
4897 2012-05-15 Bob Duff <duff@adacore.com>
4899 * s-win32.ads: Minor comment fix.
4900 * s-osprim-mingw.adb: Minor editing.
4902 2012-05-15 Robert Dewar <dewar@adacore.com>
4904 * exp_ch9.adb, sem_ch9.adb, sem_ch13.adb: Minor reformatting.
4906 2012-05-15 Robert Dewar <dewar@adacore.com>
4908 * g-comlin.adb, g-comlin.ads: Minor reformatting.
4910 2012-05-15 Vincent Pucci <pucci@adacore.com>
4912 * aspects.adb, aspects.adb: Reordering of the Aspect_Idi list. New
4913 aspect Aspect_Lock_Free.
4914 * einfo.adb, einfo.ads: New flag Uses_Lock_Free (flag 188).
4915 (Set_Uses_Lock_Free): New routine.
4916 (Uses_Lock_Free): New routine.
4917 * exp_ch7.adb (Is_Simple_Protected_Type): Return False for
4918 lock-free implementation.
4919 * exp_ch9.adb (Allows_Lock_Free_Implementation): Moved to Sem_Ch9.
4920 (Build_Lock_Free_Unprotected_Subprogram_Body): Protected
4921 procedure uses __sync_synchronise. Check both Object_Size
4923 (Expand_N_Protected_Body): Lock_Free_Active
4924 renames Lock_Free_On.
4925 (Expand_N_Protected_Type_Declaration):
4926 _Object field removed for lock-free implementation.
4927 (Install_Private_Data_Declarations): Protection object removed
4928 for lock-free implementation.
4929 (Make_Initialize_Protection):
4930 Protection object initialization removed for lock-free implementation.
4931 * rtsfind.ads: RE_Atomic_Synchronize and RE_Relaxed added.
4932 * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect_Lock_Free
4934 * sem_ch9.adb (Allows_Lock_Free_Implementation): New routine.
4935 (Analyze_Protected_Body): Allows_Lock_Free_Implementation call added.
4936 (Analyze_Protected_Type_Declaration):
4937 Allows_Lock_Free_Implementation call added.
4938 (Analyze_Single_Protected_Declaration): Second analysis of
4940 * s-atopri.ads: Header added.
4941 (Atomic_Synchronize): New routine.
4943 2012-05-15 Robert Dewar <dewar@adacore.com>
4945 * exp_ch7.ads: Add comment.
4947 2012-05-15 Hristian Kirtchev <kirtchev@adacore.com>
4949 * a-calend.adb (Day_Of_Week): The routine once again treats
4950 all dates as historic. (Formatting_Operations.Split): All
4951 calls to UTC_Time_Offset are now controlled through formal
4952 parameter Is_Historic. (Formatting_Operations.Time_Of):
4953 All calls to UTC_Time_Offset are now handled through
4954 formal parameter Is_Historic.
4955 (Split): Update the call to Formatting_Operations.Split.
4956 (Time_Of): Update the call to Formatting_Operations.Time_Of.
4957 (To_Ada_Time): Update the call to Formatting_Operations.Time_Of.
4958 (To_Strict_Tm): Update the call to Formatting_Operations.Split.
4959 * a-calend.ads (Split): Add new formal Is_Historic along with
4960 comment on usage. This routine is now exported for the purposes
4961 of GNAT.Calendar.Locale.
4962 (Time_Of): Remove defaults. Add new
4963 formal Is_Historic along with comment on usage. This routine is
4964 now exported for the purposes of GNAT.Calendar.Locale.
4965 * a-calend-vms.adb (Split): Update the call to
4966 Formatting_Operations.Split.
4967 (Time_Of): Update the call to Formatting_Operations.Time_Of.
4968 * a-calend-vms.ads (Split): Add new formal Is_Historic along
4969 with comment on usage. (Time_Of): Remove defaults. Add new
4970 formal Is_Historic along with comment on usage.
4971 * a-calfor.adb (Split): Update the call to
4972 Formatting_Operations.Split.
4973 (Time_Of): Update the call to Formatting_Operations.Time_Of.
4975 2012-05-15 Vincent Celier <celier@adacore.com>
4977 * prj-nmsc.adb (Add_Source): Always add the source if it is
4978 excluded, to avoid incorrect duplicate checks.
4980 2012-05-15 Yannick Moy <moy@adacore.com>
4982 * sem_aux.ads: Correct typo.
4983 * sem_eval.adb (Compile_Time_Known_Value): Return False in Alfa
4984 mode for a deferred constant when outside of the scope of its
4987 2012-05-15 Emmanuel Briot <briot@adacore.com>
4989 * g-comlin.adb, g-comlin.ads (Define_Switch): Allow specifying the name
4990 of the argument, for the automatic help message.
4991 (Getopt): do not systematically initialize switches with string values
4992 to the empty string, when the user has already specified a default.
4994 2012-05-14 Bernd Schmidt <bernds@codesourcery.com>
4996 * gcc-interface/utils.c (DEF_ATTR_STRING): New.
4998 2012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
5001 * gcc-interface/misc.c: Include opts.h and options.h before tm.h.
5002 (gnat_handle_option): Call lang-specific generated function.
5004 2012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
5006 * gcc-interface/lang.opt (I): Comment out help text with no effect.
5007 (nostdinc): Comment out help text with no effect.
5009 2012-05-12 Eric Botcazou <ebotcazou@adacore.com>
5011 * gcc-interface/Makefile.in (TOOLS_LIBS): Add ../../ggc-none.o.
5013 2012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
5016 * gcc-interface/misc.c (gnat_parse_file): Move before ...
5017 (gnat_handle_option): ... this. Use handle_generated_option.
5019 2012-05-10 Richard Guenther <rguenther@suse.de>
5021 * gcc-interface/cuintp.c (UI_From_gnu): Remove TYPE_IS_SIZETYPE use.
5023 2012-05-06 Tristan Gingold <gingold@adacore.com>
5025 * gcc-interface/trans.c (gigi): Decorate reraise_zcx_decl.
5027 2012-05-06 Eric Botcazou <ebotcazou@adacore.com>
5029 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: In the renaming
5030 case, use the padded type if the renamed object has an unconstrained
5031 type with default discriminant.
5033 2012-05-06 Eric Botcazou <ebotcazou@adacore.com>
5035 * gcc-interface/trans.c (Loop_Statement_to_gnu): Also handle invariant
5036 conditions with only one bound.
5037 (Raise_Error_to_gnu): Likewise. New function extracted from...
5038 (gnat_to_gnu) <N_Raise_Constraint_Error>: ...here. Call above function
5039 in regular mode only.
5041 2012-05-06 Eric Botcazou <ebotcazou@adacore.com>
5043 * gcc-interface/misc.c (gnat_post_options): Disable caret by default.
5045 2012-05-06 Eric Botcazou <ebotcazou@adacore.com>
5047 * gcc-interface/gigi.h (make_packable_type): Declare.
5048 (make_type_from_size): Likewise.
5049 (relate_alias_sets): Likewise.
5050 (maybe_pad_type): Adjust.
5051 (init_gnat_to_gnu): Delete.
5052 (destroy_gnat_to_gnu): Likewise.
5053 (init_dummy_type): Likewise.
5054 (destroy_dummy_type): Likewise.
5055 (init_gnat_utils): Declare.
5056 (destroy_gnat_utils): Likewise.
5057 (ceil_pow2): New inline function.
5058 * gcc-interface/decl.c (gnat_to_gnu_entity): Use ceil_pow2.
5059 <object>: Pass True for the final processing of alignment and size.
5060 <E_Subprogram_Type>: Only create the TYPE_DECL for a padded return
5062 (round_up_to_align): Delete.
5063 (ceil_alignment): Likewise.
5064 (relate_alias_sets): Move to...
5065 (make_aligning_type): Likewise.
5066 (make_packable_type): Likewise.
5067 (maybe_pad_type): Likewise.
5068 (make_type_from_size): Likewise.
5069 * gcc-interface/utils.c (MAX_BITS_PER_WORD): Delete.
5070 (struct pad_type_hash): New type.
5071 (pad_type_hash_table): New static variable.
5072 (init_gnat_to_gnu): Merge into...
5073 (init_dummy_type): Likewise.
5074 (init_gnat_utils): ...this. New function.
5075 (destroy_gnat_to_gnu): Merge into...
5076 (destroy_dummy_type): Likewise.
5077 (destroy_gnat_utils): ...this. New function.
5078 (pad_type_hash_marked_p): New function.
5079 (pad_type_hash_hash): Likewise.
5080 (pad_type_hash_eq): Likewise.
5081 (relate_alias_sets): ...here.
5082 (make_aligning_type): Likewise.
5083 (make_packable_type): Likewise.
5084 (maybe_pad_type): Likewise. Change same_rm_size parameter into
5085 set_rm_size; do not set TYPE_ADA_SIZE if it is false. Do not set
5086 null as Ada size. Do not set TYPE_VOLATILE on the padded type. If it
5087 is complete and has constant size, canonicalize it. Bail out earlier
5088 if a warning need not be issued.
5089 (make_type_from_size): Likewise.
5090 <INTEGER_TYPE>: Bail out if size is too large
5091 (gnat_types_compatible_p): Do not deal with padded types.
5092 (convert): Compare main variants for padded types.
5093 * gcc-interface/trans.c (gigi): Call {init|destroy}_gnat_utils.
5094 (gnat_to_gnu): Do not convert at the end for a call to a function that
5095 returns an unconstrained type with default discriminant.
5096 (Attribute_to_gnu) <Attr_Size>: Simplify handling of padded objects.
5097 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Likewise.
5098 Do not use the padded type if it is BLKmode and the inner type is
5101 2012-05-02 Pascal Obry <obry@adacore.com>
5104 2012-02-24 Dave Korn <dave.korn.cygwin@gmail.com>
5106 * gcc-interface/Makefile.in (WIN_SO_PREFIX [windows targets]): New
5107 Windows-specific make variable.
5108 (WIN_SO_INSTALL_DIR [windows targets]): Likewise.
5109 (install-gnatlib): Respect the above during installation when set,
5110 and also install any windows import library that has been built.
5111 (gnatlib-shared-win32): Use WIN_SO_PREFIX to name output DLL and also
5112 build a corresponding import library.
5114 2012-04-30 Jan Hubicka <jh@suse.cz>
5116 * gcc-interface/utils.c (rest_of_subprog_body_compilation): Update
5118 (gnat_write_global_declarations): Use finalize_compilation_unit.
5120 2012-04-30 Eric Botcazou <ebotcazou@adacore.com>
5122 * gcc-interface/decl.c (gnat_to_gnu_entity): In type annotation mode,
5123 do not adjust the size of a tagged type if there is a representation
5124 clause on it. Otherwise, round the adjustment up to the alignment
5125 of the first field and use the appropriate helper routine.
5126 (maybe_pad_type): Do not warn in type annotation mode on a tagged type.
5127 (gnat_to_gnu_field): Do not error out under the same circumstances.
5128 (annotate_rep): In type annotation mode, do not adjust the offset of
5129 components of a tagged type with representation clause. Otherwise,
5130 round the adjustment up to the alignment of the first field.
5132 2012-04-30 Eric Botcazou <ebotcazou@adacore.com>
5134 * gcc-interface/utils.c (finish_record_type): Force the traditional GCC
5135 layout for bitfields on the type if it is packed or has a representation
5136 clause and an alternate layout is available.
5138 2012-04-30 Eric Botcazou <ebotcazou@adacore.com>
5140 * gcc-interface/gigi.h (mark_out_of_scope): Delete.
5141 (destroy_gnat_to_gnu): Declare.
5142 (destroy_dummy_type): Likewise.
5143 * gcc-interface/decl.c (mark_out_of_scope): Delete.
5144 * gcc-interface/utils.c (destroy_gnat_to_gnu): New function.
5145 (destroy_dummy_type): Likewise.
5146 * gcc-interface/trans.c (gnat_validate_uc_list): New variable.
5147 (gigi): Call validate_unchecked_conversion on gnat_validate_uc_list
5148 after the translation is completed. Call destroy_gnat_to_gnu and
5149 destroy_dummy_type at the end.
5150 (Subprogram_Body_to_gnu): Do not call mark_out_of_scope.
5151 (gnat_to_gnu) <N_Block_Statement>: Likewise.
5152 <N_Validate_Unchecked_Conversion>: Do not process the node, only push
5153 it onto gnat_validate_uc_list.
5154 (validate_unchecked_conversion): New function.
5156 2012-04-26 Tristan Gingold <gingold@adacore.com>
5158 * gcc-interface/Make-lang.in: Update dependencies.
5159 Remove s-traceb and tracebak objects from gnat1 and gnatbind (not used).
5160 Remove s-tasdeb and s-vaflop rules (not used).
5162 2012-04-26 Olivier Hainque <hainque@adacore.com>
5164 * gcc-interface/targtyps.c (WIDEST_HARDWARE_FP_SIZE): Default to
5165 DOUBLE_TYPE_SIZE instead of LONG_DOUBLE_TYPE_SIZE.
5167 2012-04-26 Hristian Kirtchev <kirtchev@adacore.com>
5169 * a-calend.adb (Day_Of_Week): Keep the internal
5170 usage of UTC_Time_Offset consistent with Time_Of and Split.
5172 2012-04-26 Hristian Kirtchev <kirtchev@adacore.com>
5174 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Do not freeze
5175 the loop variable while preanalyzing a quantified expression.
5177 2012-04-26 Hristian Kirtchev <kirtchev@adacore.com>
5179 * a-calend.adb (Split, Time_Of): Rename parameter Is_Ada_05
5180 to Use_TZ to better illustrate its function. Update all
5181 references to the parameter.
5182 (To_Ada_Time): Update the call to Formatting_Operations.Time_Of.
5183 * a-calend.ads (Split, Time_Of): Rename parameter Is_Ada_05
5184 to Use_TZ to better illustrate its function. Update the related
5186 * a-calend-vms.adb (Split, Time_Of): Rename parameter
5187 Is_Ada_05 to Use_TZ to better illustrate its function. Update
5188 all references to the parameter.
5189 (To_Ada_Time): Update the call to Formatting_Operations.Time_Of.
5190 * a-calend-vms.ads (Split, Time_Of): Rename parameter Is_Ada_05
5191 to Use_TZ to better illustrate its function. Update the related
5193 * a-calfor.adb (Split, Time_Of): Update the call to
5194 Formatting_Operations.Time_Of.
5195 * sysdep.c (__gnat_localtime_tzoff): Dereference pointer
5196 "is_historic" and rewrite the check as a comparison. Add a
5197 comment on flag values.
5199 2012-04-26 Robert Dewar <dewar@adacore.com>
5201 * exp_ch2.adb, sem_ch8.adb: Minor reformatting.
5203 2012-04-26 Vasiliy Fofanov <fofanov@adacore.com>
5205 * a-stzunb-shared.adb, gnat_ugn.texi, a-strunb-shared.adb,
5206 a-strunb-shared.ads, uintp.adb, a-stwiun-shared.adb,
5207 a-stwiun-shared.ads, a-cbhama.ads, vms_data.ads, a-cobove.adb,
5208 a-convec.adb, sem_ch13.adb, a-cbhase.ads: Fix common misuses of the
5209 word "then" where "than" should be used in English.
5211 2012-04-26 Robert Dewar <dewar@adacore.com>
5213 * sem_ch5.adb (Check_Unreachable_Code): Skip past pragmas.
5215 2012-04-26 Hristian Kirtchev <kirtchev@adacore.com>
5217 * s-finroo.ads: Remove with clause for
5218 Ada.Streams. Type Root_Controlled is now abstract tagged null
5219 record. Remove internal package Stream_Attributes. Root_Controlled
5220 doesn't need stream attribute redeclaration and avoids the
5221 dependency on streams.
5223 2012-04-26 Tristan Gingold <gingold@adacore.com>
5225 * adaint.c (to_host_path_spec): Removed (unused).
5228 2012-04-26 Steve Baird <baird@adacore.com>
5230 * gnat_rm.texi Improve description of Valid_Scalars attribute.
5232 2012-04-26 Ed Schonberg <schonberg@adacore.com>
5234 * sem_ch6.adb (Can_Override_Operator): If the formal is a
5235 generic type the operator cannot be overriding.
5237 2012-04-26 Ed Schonberg <schonberg@adacore.com>
5239 * sem_ch8.adb (Spec_Reloaded_For_Body): Check whether the type
5240 is declared in a package specification, and current unit is the
5241 corresponding package body. The use clauses themselves may be
5242 within a nested package.
5244 2012-04-26 Bob Duff <duff@adacore.com>
5246 * exp_ch2.adb (Param_Entity): Take into account the case where
5247 the type of the entry parameter has a representation clause.
5249 2012-04-26 Ed Schonberg <schonberg@adacore.com>
5251 * gnat_ugn.texi: Tweak dimensionality doc.
5253 2012-04-26 Robert Dewar <dewar@adacore.com>
5255 * sem_eval.adb: Minor reformatting.
5257 2012-04-26 Robert Dewar <dewar@adacore.com>
5259 * einfo.adb, einfo.ads, sem_res.adb, sem_ch4.adb,
5260 sem_eval.adb: Minor reformatting.
5262 2012-04-26 Thomas Quinot <quinot@adacore.com>
5264 * freeze.adb: Minor change in error wording.
5266 2012-04-26 Ed Schonberg <schonberg@adacore.com>
5268 * gnat_ugn.texi: Documentation on dimensional analysis.
5270 2012-04-26 Hristian Kirtchev <kirtchev@adacore.com>
5272 * einfo.adb, einfo.ads: Remove synthesized attribute
5273 Proper_First_Index along with its associations in various nodes.
5274 (Proper_First_Index): Removed.
5275 * sem_ch4.adb (Analyze_Slice): Alphabetize constants. Add new
5276 local variable Index_Type. The index type of a string literal
5277 subtype is that of the stored low bound.
5278 * sem_eval (Get_Static_Length): Remove the use of Proper_First_Index.
5279 * sem_res.adb (Resolve_Slice): Alphabetize constants. Add
5280 new local variable Index_Type. The index type of a
5281 string literal subtype is that of the stored low bound.
5282 (Set_String_Literal_Subtype): Code reformatting.
5284 2012-04-26 Robert Dewar <dewar@adacore.com>
5286 * exp_aggr.adb: Minor reformatting.
5288 2012-04-26 Hristian Kirtchev <kirtchev@adacore.com>
5290 * exp_ch7.adb (Expand_Cleanup_Actions): Update the call to
5291 Requires_Cleanup_Actions.
5292 * exp_util.adb (Requires_Cleanup_Actions (List_Id; Boolean;
5293 Boolean)): Rename formal parameter For_Package to Lib_Level to
5294 better reflect its purpose. Update the related comment and all
5295 occurrences of For_Package in the body.
5296 (Requires_Cleanup_Actions
5297 (Node_Id; Boolean)): Add new formal parameter Lib_Level. Add
5298 local constant At_Lib_Level to keep monitor whether the path
5299 taken from the top-most context to the current construct involves
5300 package constructs. Update all calls to Requires_Cleanup_Actions.
5301 * exp_util.ads (Requires_Cleanup_Actions): Add new formal
5302 parameter Lib_Level and associated comment.
5304 2012-04-26 Ed Schonberg <schonberg@adacore.com>
5306 * sem_ch6.adb (Process_Formals): If the type of the formal is
5307 a non null access type, mark the generated subtype as having a
5308 delayed freeze only if the designated type is not frozen yet.
5310 2012-04-26 Vincent Celier <celier@adacore.com>
5312 * prj-attr.adb: New package Clean with attributes
5313 Object_Artifact_Extensions and Source_Artifact_Extensions.
5314 * prj-nmsc.adb (Process_Clean): Process new package Clean
5315 * prj.ads (Language_Config): New components
5316 Clean_Object_Artifacts and Clean_Source_Artifacts.
5317 * snames.ads-tmpl: New standard names Clean,
5318 Object_Artifact_Extensions and Source_Artifact_Extensions.
5320 2012-04-26 Hristian Kirtchev <kirtchev@adacore.com>
5322 * einfo.adb (Proper_First_Index): Moved from Sem_Util.
5323 * einfo.ads: Add new synthesized attribute Proper_First_Index
5324 along with usage in nodes.
5325 (Proper_First_Index): Moved from Sem_Util.
5326 * sem_util.ads, sem_util.adb (Proper_First_Index): Moved to Einfo.
5328 2012-04-26 Gary Dismukes <dismukes@adacore.com>
5330 * layout.adb (Layout_Component_List): Test for the case of a
5331 single variant and the size of its component list was computed
5332 as an integer literal, and use that size (which is in bits)
5333 as is rather than converting to storage units.
5335 2012-04-26 Robert Dewar <dewar@adacore.com>
5337 * exp_aggr.adb: Minor reformatting.
5339 2012-04-26 Robert Dewar <dewar@adacore.com>
5341 * sem_util.adb: Minor reformatting.
5343 2012-04-26 Thomas Quinot <quinot@adacore.com>
5345 * exp_aggr.adb, exp_pakd.adb (Setup_Inline_Packed_Array_Reference,
5346 Packed_Array_Aggregate_Handled.Get_Component_Val):
5347 Reverse bit numbering within PAT when Reverse_Storage_Order
5348 applies to the enclosing record.
5350 2012-04-26 Thomas Quinot <quinot@adacore.com>
5352 * freeze.adb (Freeze_Record_Type): Improve error message for
5353 Scalar_Storage_Order inconsistent with Bit_Order.
5355 2012-04-25 Gary Dismukes <dismukes@adacore.com>
5357 * exp_ch9.adb: Add comments on the usage of the
5358 lock-free data structures.
5360 2012-04-25 Vincent Pucci <pucci@adacore.com>
5362 * exp_intr.adb (Expand_Shift): Convert the left
5363 operand and the operator when the type of the call differs from
5364 the type of the operator.
5366 2012-04-25 Geert Bosch <bosch@adacore.com>
5368 * stand.ads: Minor comment fix.
5370 2012-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5372 * sem_ch4.adb (Analyze_Slice): Handle the case where the prefix
5373 is a string literal. Retrieve the first index from the base type
5374 when slicing a string literal.
5375 * sem_ch12.adb (Check_Private_View): Move the initialization
5376 of the type inside the loop to reflect the changing index.
5377 * sem_eval.adb (Eval_Relational_Op): Retrieve the first index
5378 from the base type when dealing with a string literal.
5379 * sem_res.adb (Resolve_Slice): Retrieve the first index from
5380 the base type when slicing a string literal.
5381 * sem_util.adb (Is_Internally_Generated_Renaming): New routine.
5382 (Is_Object_Reference): String literals may act
5383 as object references only when they are renamed internally.
5384 (Proper_First_Index): New routine.
5385 * sem_util.ads (Proper_First_Index): New routine.
5387 2012-04-25 Robert Dewar <dewar@adacore.com>
5389 * sem_ch3.adb, csinfo.adb, lib-writ.adb, sem_ch12.adb,
5390 lib-xref.adb: Minor reformatting.
5392 2012-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5394 * exp_ch9.adb: Rename Lock_Free_Sub_Type
5395 to Lock_Free_Subprogram. Remove type Subprogram_Id.
5396 Rename LF_Sub_Table to Lock_Free_Subprogram_Table.
5397 (Allow_Lock_Free_Implementation): Renamed to
5398 Allows_Lock_Free_Implementation. Update the comment on
5399 lock-free restrictions. Code clean up and restructuring.
5400 (Build_Lock_Free_Protected_Subprogram_Body): Update the
5401 profile and related comments. Code clean up and restructuring.
5402 (Build_Lock_Free_Unprotected_Subprogram_Body): Update the
5403 profile and related comments. Code clean up and restructuring.
5406 2012-04-25 Vincent Celier <celier@adacore.com>
5408 * sem_ch12.adb (Inherit_Context): Compare library units, not
5409 names of units, when checking if a unit is already in the context.
5411 2012-04-25 Thomas Quinot <quinot@adacore.com>
5413 * sem_ch3.adb: Reverse_Storage_Order must be propagated to
5414 untagged derived record types.
5416 2012-04-25 Ed Schonberg <schonberg@adacore.com>
5418 * lib-xref.adb: Adjust position of end label.
5420 2012-04-22 Jan Hubicka <jh@suse.cz>
5422 * gcc-interface/utils.c (gnat_write_global_declarations): Do not mark
5425 2012-04-20 Jan Hubicka <jh@suse.cz>
5427 * gcc-interface/utils.c (gnat_write_global_declarations): Update for new
5428 force_output placement.
5430 2012-04-14 Jan Hubicka <jh@suse.cz>
5432 * gcc-interface/trans.c (finalize_nrv): Update field referenced for new
5433 cgraph/varpool layout.
5435 2012-04-09 Mike Stump <mikestump@comcast.net>
5437 * a-assert.ads: Remove execute permission.
5438 * a-chacon.ads: Likewise.
5439 * a-coteio.ads: Likewise.
5440 * a-envvar.ads: Likewise.
5441 * a-exetim-mingw.ads: Likewise.
5442 * a-fzteio.ads: Likewise.
5443 * a-izteio.ads: Likewise.
5444 * a-lcteio.ads: Likewise.
5445 * a-llctio.ads: Likewise.
5446 * a-scteio.ads: Likewise.
5447 * a-suenco.ads: Likewise.
5448 * a-suenst.ads: Likewise.
5449 * a-suewst.ads: Likewise.
5450 * a-suezst.ads: Likewise.
5451 * a-tirsfi.ads: Likewise.
5452 * a-wichha.ads: Likewise.
5453 * a-zchara.ads: Likewise.
5454 * a-zchhan.ads: Likewise.
5455 * a-zchuni.ads: Likewise.
5456 * a-zrstfi.ads: Likewise.
5457 * aspects.ads: Likewise.
5458 * g-byorma.ads: Likewise.
5459 * g-decstr.ads: Likewise.
5460 * g-encstr.ads: Likewise.
5461 * g-spchge.ads: Likewise.
5462 * g-u3spch.ads: Likewise.
5463 * g-wispch.ads: Likewise.
5464 * g-zspche.ads: Likewise.
5465 * namet-sp.ads: Likewise.
5466 * s-os_lib.ads: Likewise.
5467 * s-regexp.ads: Likewise.
5468 * s-regpat.ads: Likewise.
5469 * s-string.ads: Likewise.
5470 * s-tasloc.ads: Likewise.
5471 * s-utf_32.ads: Likewise.
5472 * sem_aux.ads: Likewise.
5473 * a-assert.adb: Likewise.
5474 * a-chacon.adb: Likewise.
5475 * a-envvar.adb: Likewise.
5476 * a-exetim-mingw.adb: Likewise.
5477 * a-suenco.adb: Likewise.
5478 * a-suenst.adb: Likewise.
5479 * a-suewst.adb: Likewise.
5480 * a-suezst.adb: Likewise.
5481 * a-tirsfi.adb: Likewise.
5482 * a-wichha.adb: Likewise.
5483 * a-zchhan.adb: Likewise.
5484 * a-zchuni.adb: Likewise.
5485 * a-zrstfi.adb: Likewise.
5486 * aspects.adb: Likewise.
5487 * g-byorma.adb: Likewise.
5488 * g-decstr.adb: Likewise.
5489 * g-encstr.adb: Likewise.
5490 * g-spchge.adb: Likewise.
5491 * g-u3spch.adb: Likewise.
5492 * g-wispch.adb: Likewise.
5493 * g-zspche.adb: Likewise.
5494 * namet-sp.adb: Likewise.
5495 * s-except.adb: Likewise.
5496 * s-inmaop-vxworks.adb: Likewise.
5497 * s-os_lib.adb: Likewise.
5498 * s-regexp.adb: Likewise.
5499 * s-regpat.adb: Likewise.
5500 * s-string.adb: Likewise.
5501 * s-tasloc.adb: Likewise.
5502 * s-utf_32.adb: Likewise.
5503 * s-wchcon.adb: Likewise.
5504 * sem_aux.adb: Likewise.
5506 2012-04-02 Robert Dewar <dewar@adacore.com>
5508 * s-atopri.ads: Minor reformatting.
5510 2012-04-02 Thomas Quinot <quinot@adacore.com>
5512 * sem_util.adb: Minor reformatting, minor code cleanup.
5514 2012-04-02 Ed Schonberg <schonberg@adacore.com>
5516 * lib-xref.adb (Generate_Reference): For a reference to an
5517 operator symbol, set the sloc to point to the first character
5518 of the operator name, and not to the initial quaote.
5519 (Output_References): Ditto for the definition of an operator
5522 2012-04-02 Vincent Celier <celier@adacore.com>
5524 * ali.adb (Scan_Ali): Recognize Z lines. Set
5525 Implicit_With_From_Instantiation to True in the With_Record for
5527 * ali.ads (With_Record): New Boolean component
5528 Implicit_With_From_Instantiation, defaulted to False.
5529 * csinfo.adb: Indicate that Implicit_With_From_Instantiation
5531 * lib-writ.adb (Write_ALI): New array Implicit_With.
5532 (Collect_Withs): Set Implicit_With for the unit is it is not Yes.
5533 (Write_With_Lines): Write a Z line instead of a W line if
5534 Implicit_With is Yes for the unit.
5535 * sem_ch12.adb (Inherit_Context): Only add a unit in the context
5536 if it is not there yet.
5537 * sinfo.ads: New flag Implicit_With_From_Instantiation (Flag12)
5540 2012-04-02 Yannick Moy <moy@adacore.com>
5542 * osint.adb, osint.ads (Add_Default_Search_Dirs): Add library
5543 search dirs in file specified with option -gnateO.
5545 2012-04-02 Robert Dewar <dewar@adacore.com>
5547 * sem_ch5.adb, exp_util.adb, sem_util.adb, exp_ch4.adb: Minor
5550 2012-04-02 Olivier Hainque <hainque@adacore.com>
5552 * g-sse.ads: Add x86-solaris and x86_64-darwin to the set of
5553 platforms where the use of this spec is supported. Add current
5554 year to the copyright notice.
5555 * gcc-interfaces/Makefile.in: Add g-sse.o and g-ssvety.o to
5556 EXTRA_GNATRTL_NONTASKING_OBJS on x86 32/64 targets that support
5557 it and where they were missing (x86-solaris, x86-freebsd,
5558 x86_64-freebsd, and x86-darwin).
5560 2012-04-02 Gary Dismukes <dismukes@adacore.com>
5562 * bindgen.adb (Gen_Ada_Init): When compiling for the AAMP small
5563 library, where we no longer suppress the Standard_Library,
5564 generate an empty body rather than the usual generation of
5565 assignments to imported globals, since those aren't present in
5568 2012-04-02 Ed Schonberg <schonberg@adacore.com>
5570 * sinfo.ads: Minor documentation fix.
5572 2012-04-02 Hristian Kirtchev <kirtchev@adacore.com>
5574 * sem_res.adb (Resolve_Conditional_Expression): Add local variables
5575 Else_Typ and Then_Typ. Add missing type conversions to the "then" and
5576 "else" expressions when their respective types are scalar.
5578 2012-04-02 Vincent Pucci <pucci@adacore.com>
5580 * exp_ch9.adb: Reordering of the local subprograms. New Table
5581 for the lock free implementation that maps each protected
5582 subprograms with the protected component it references.
5583 (Allow_Lock_Free_Implementation): New routine. Check if
5584 the protected body enables the lock free implementation.
5585 (Build_Lock_Free_Protected_Subprogram_Body): New routine.
5586 (Build_Lock_Free_Unprotected_Subprogram_Body): New routine.
5587 (Comp_Of): New routine.
5588 * Makefile.rtl: Add s-atopri.o
5589 * debug.adb: New compiler debug flag -gnatd9 for lock free
5591 * rtsfind.ads: RE_Atomic_Compare_Exchange_8,
5592 RE_Atomic_Compare_Exchange_16, RE_Atomic_Compare_Exchange_32,
5593 RE_Atomic_Compare_Exchange_64, RE_Atomic_Load_8,
5594 RE_Atomic_Load_16, RE_Atomic_Load_32, RE_Atomic_Load_64, RE_Uint8,
5595 RE_Uint16, RE_Uint32, RE_Uint64 added.
5596 * s-atropi.ads: New file. Defines atomic primitives used
5597 by the lock free implementation.
5599 2012-04-02 Emmanuel Briot <briot@adacore.com>
5601 * g-expect.adb (Expect_Internal): Fix leak of the input file descriptor.
5603 2012-04-02 Hristian Kirtchev <kirtchev@adacore.com>
5605 * exp_ch4.adb (Expand_N_Quantified_Expression): Reimplemented.
5606 The expansion no longer uses the copy of the original QE created
5608 * sem.adb (Analyze): Add processing for loop parameter specifications.
5609 * sem_ch4.adb (Analyze_Quantified_Expression): Reimplemented. The
5610 routine no longer creates a copy of the original QE. All
5611 constituents of a QE are now preanalyzed and resolved.
5612 * sem_ch5.adb (Analyze_Iteration_Scheme): Remove the guard which
5613 bypasses all processing when the iteration scheme is related to a
5614 QE. Relovate the code which analyzes loop parameter specifications
5615 to a separate routine. (Analyze_Iterator_Specification):
5616 Preanalyze the iterator name. This action was originally
5617 done in Analyze_Iteration_Scheme. Update the check which
5618 detects an iterator specification in the context of a QE.
5619 (Analyze_Loop_Parameter_Specification): New routine. This
5620 procedure allows for a stand-alone analysis of a loop parameter
5621 specification without the need of a parent iteration scheme. Add
5622 code to update the type of the loop variable when the range
5623 generates an itype and the context is a QE.
5624 (Pre_Analyze_Range): Renamed to Preanalyze_Range. Update all references
5626 * sem_ch5.ads: Code reformatting.
5627 (Analyze_Loop_Parameter_Specification): New routine.
5628 * sem_ch6.adb (Fully_Conformant_Expressions): Detect a case
5629 when establishing conformance between two QEs utilizing different
5631 * sem_res.adb (Proper_Current_Scope): New routine.
5632 (Resolve): Do not resolve a QE as there is nothing to be done now.
5633 Ignore any loop scopes generated for QEs when detecting an expression
5634 function as the scopes are cosmetic and do not appear in the tree.
5635 (Resolve_Quantified_Expression): Removed. All resolution of
5636 QE constituents is now performed during analysis. This ensures
5637 that loop variables appearing in array aggregates are properly
5640 2012-04-02 Ed Schonberg <schonberg@adacore.com>
5642 * sem_util.adb (Build_Default_Subtype): If the base type is
5643 private and its full view is available, use the full view in
5644 the subtype declaration.
5646 2012-04-02 Jose Ruiz <ruiz@adacore.com>
5648 * gnat_ugn.texi: Add some minimal documentation about how to
5649 use GNATtest for cross platforms.
5651 2012-04-02 Vincent Celier <celier@adacore.com>
5653 * opt.ads (Object_Path_File_Name): New variable.
5654 * prj-attr.adb: New Compiler attribute Object_Path_Switches.
5655 * prj-nmsc.adb (Process_Compiler): Recognize new attribute
5656 Object_Path_Switches.
5657 * snames.ads-tmpl: New standard name Object_Path_Switches.
5658 * switch-c.adb (Scan_Front_End_Switches): Recognize new switch
5659 -gnateO= and put its value in Opt.Object_Path_File_Name.
5661 2012-04-02 Hristian Kirtchev <kirtchev@adacore.com>
5663 * exp_ch7.adb (Process_Declarations): Detect a case where
5664 a source object was initialized by another source object,
5665 but the expression was rewritten as a class-wide conversion
5666 of Ada.Tags.Displace.
5667 * exp_util.adb (Initialized_By_Ctrl_Function): Removed.
5668 (Is_Controlled_Function_Call): New routine.
5669 (Is_Displacement_Of_Ctrl_Function_Result): Removed.
5670 (Is_Displacement_Of_Object_Or_Function_Result): New routine.
5671 (Is_Source_Object): New routine.
5672 (Requires_Cleanup_Actions): Detect a case where a source object was
5673 initialized by another source object, but the expression was rewritten
5674 as a class-wide conversion of Ada.Tags.Displace.
5675 * exp_util.ads (Is_Displacement_Of_Ctrl_Function_Result): Removed.
5676 (Is_Displacement_Of_Object_Or_Function_Result): New routine.
5678 2012-04-02 Ed Schonberg <schonberg@adacore.com>
5680 * sem_res.adb (Resolve_Call): A call to an expression function
5681 does not freeze if it appears in a different scope from the
5682 expression function itself. Such calls appear in the generated
5683 bodies of other expression functions, or in pre/postconditions
5684 of subsequent subprograms.
5686 2012-04-02 Yannick Moy <moy@adacore.com>
5688 * lib-xref-alfa.adb: Code clean up.
5690 2012-04-02 Ed Schonberg <schonberg@adacore.com>
5692 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Do not suppress
5693 style checks, because the subprogram instance itself may contain
5694 violations of syle rules.
5695 * style.adb (Missing_Overriding): Check for missing overriding
5696 indicator on a subprogram instance.
5698 2012-04-02 Hristian Kirtchev <kirtchev@adacore.com>
5700 * sem_ch6.adb (Last_Implicit_Declaration): New routine.
5701 (Process_PPCs): Insert the body of _postconditions after the
5702 last internally generated declaration. This ensures that actual
5703 subtypes created for formal parameters are visible and properly
5704 frozen as _postconditions may reference them.
5706 2012-04-02 Robert Dewar <dewar@adacore.com>
5708 * einfo.adb (First_Component_Or_Discriminant) Now applies to
5709 all types with discriminants, not just records.
5710 * exp_attr.adb (Expand_N_Attribute): Add Scalar_Values handling
5711 for arrays, scalars and non-variant records.
5712 * sem_attr.adb (Analyze_Attribute): Handle Valid_Scalars
5713 * sem_attr.ads (Valid_Scalars): Update description
5714 * sem_util.ads, sem_util.adb (No_Scalar_Parts): New function.
5716 2012-03-31 Eric Botcazou <ebotcazou@adacore.com>
5719 2012-03-25 Eric Botcazou <ebotcazou@adacore.com>
5721 * gcc-interface/decl.c (SS_MARK_NAME): New define.
5722 (gnat_to_gnu_entity) <E_Function>: Prepend leaf attribute on entities
5723 whose name is SS_MARK_NAME.
5725 2012-03-30 Robert Dewar <dewar@adacore.com>
5727 * exp_ch5.adb, sem_util.adb, exp_ch4.adb: Minor comment updates.
5729 2012-03-30 Yannick Moy <moy@adacore.com>
5731 * lib-xref-alfa.adb (Add_Alfa_File): Treat possibly 2 units at the same
5732 time, putting all scopes in the same Alfa file.
5733 (Add_Alfa_Xrefs): Correct errors in comparison function. Correct value
5735 (Collect_Alfa): Possibly pass 2 units to Add_Alfa_File.
5737 2012-03-30 Hristian Kirtchev <kirtchev@adacore.com>
5739 * exp_util.adb (Is_Secondary_Stack_BIP_Func_Call): Handle a case where
5740 a build-in-place call appears as Prefix'Reference'Reference.
5742 2012-03-30 Yannick Moy <moy@adacore.com>
5744 * lib-xref-alfa.adb: Minor refactoring to remove internal package.
5746 2012-03-30 Hristian Kirtchev <kirtchev@adacore.com>
5748 * sem_ch5.adb (Analyze_Iteration_Scheme): Preanalyze the subtype
5749 definition of a loop when the context is a quantified expression.
5751 2012-03-30 Vincent Celier <celier@adacore.com>
5753 * prj.ads: Minor comment update.
5755 2012-03-30 Yannick Moy <moy@adacore.com>
5757 * lib-xref-alfa.adb, alloc.ads, lib-xref.ads: Minor addition of
5758 comments and refactoring.
5760 2012-03-30 Robert Dewar <dewar@adacore.com>
5762 * lib-xref.adb, lib-xref-alfa.adb: Minor reformatting & code
5765 2012-03-30 Yannick Moy <moy@adacore.com>
5767 * lib-xref-alfa.adb (Generate_Dereference): Use Get_Code_Unit
5768 instead of Get_Source_Unit to get file for reference.
5769 (Traverse_Compilation_Unit): Do not add scopes for generic units.
5770 * lib-xref.adb (Generate_Reference): Use Get_Code_Unit instead
5771 of Get_Source_Unit to get file for reference.
5772 * sem_ch12.adb (Analyze_Package_Instantiation): Enable
5773 instantiation in Alfa mode.
5775 2012-03-30 Hristian Kirtchev <kirtchev@adacore.com>
5777 * exp_ch7.adb (Process_Declarations): Replace
5778 the call to Is_Null_Access_BIP_Func_Call with
5779 Is_Secondary_Stack_BIP_Func_Call. Update the related comment.
5780 * exp_util.adb (Is_Null_Access_BIP_Func_Call): Removed.
5781 (Is_Secondary_Stack_BIP_Func_Call): New routine.
5782 (Requires_Cleanup_Actions): Replace
5783 the call to Is_Null_Access_BIP_Func_Call with
5784 Is_Secondary_Stack_BIP_Func_Call. Update the related comment.
5785 * exp_util.ads (Is_Null_Access_BIP_Func_Call): Removed.
5786 (Is_Secondary_Stack_BIP_Func_Call): New routine.
5788 2012-03-30 Yannick Moy <moy@adacore.com>
5790 * lib-xref-alfa.adb, lib-xref.adb: Code clean ups.
5792 2012-03-30 Gary Dismukes <dismukes@adacore.com>
5794 * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): For the case of a
5795 loop entity which is rewritten as a renaming
5796 of the indexed array, explicitly mark the entity as needing
5797 debug info so that Materialize entity will be set later by
5798 Debug_Renaming_Declaration when the renaming is expanded.
5800 2012-03-30 Robert Dewar <dewar@adacore.com>
5802 * sem_attr.ads: Update comment.
5804 2012-03-30 Vincent Celier <celier@adacore.com>
5806 * prj.ads: New Dependency_Kind: ALI_Closure.
5808 2012-03-30 Thomas Quinot <quinot@adacore.com>
5810 * exp_pakd.adb: Minor reformatting.
5812 2012-03-30 Yannick Moy <moy@adacore.com>
5814 * lib-xref-alfa.adb (Add_Alfa_File): Take into account possible absence
5815 of compilation unit for unit in Sdep_Table.
5817 2012-03-30 Thomas Quinot <quinot@adacore.com>
5819 * freeze.adb (Freeze_Record_Type): For a type with reversed bit
5820 order and reversed storage order, disable front-end relayout.
5822 2012-03-25 Eric Botcazou <ebotcazou@adacore.com>
5824 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Copy
5825 the TYPE_PACKED flag from the base type.
5827 2012-03-25 Eric Botcazou <ebotcazou@adacore.com>
5829 * gcc-interface/decl.c (SS_MARK_NAME): New define.
5830 (gnat_to_gnu_entity) <E_Function>: Prepend leaf attribute on entities
5831 whose name is SS_MARK_NAME.
5833 2012-03-25 Eric Botcazou <ebotcazou@adacore.com>
5835 * gcc-interface/utils.c (add_parallel_type): Take a TYPE instead of a
5836 DECL and adjust. Move around.
5837 (has_parallel_type): New predicate.
5838 (rest_of_record_type_compilation): Return early if the type already
5839 has a parallel type.
5840 * gcc-interface/gigi.h (add_parallel_type): Adjust.
5841 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust for above changes.
5843 2012-03-25 Eric Botcazou <ebotcazou@adacore.com>
5845 * gcc-interface/utils.c (finish_record_type): Return early for padded
5848 2012-03-20 Arnaud Charlet <charlet@adacore.com>
5850 * hlo.ads, hlo.adb: Removed, no longer used.
5851 * gcc-interface/Make-lang.in: Remove hlo.o. Update dependencies.
5852 * gcc-interface/Makefile.in: Remove EXTRA_LIBGNAT_SRCS (temporarly)
5853 and compute it from EXTRA_LIBGNAT_OBJS.
5854 Clean up comments, reorder LIBGNAT_SRCS and LIBGNAT_OBJS.
5856 2012-03-20 Yannick Moy <moy@adacore.com>
5858 * gnat_rm.texi, sem_attr.ads: Update documentation.
5860 2012-03-19 Yannick Moy <moy@adacore.com>
5862 * sem_ch6.adb: Minor code clean up.
5864 2012-03-19 Vincent Celier <celier@adacore.com>
5866 * make.adb (Scan_Make_Arg): Make sure all significant -m switches
5867 on the command line are counted.
5869 2012-03-19 Robert Dewar <dewar@adacore.com>
5871 * sem_elab.adb (Generate_Elab_Warnings): Fix spec, fix attribute
5874 2012-03-19 Robert Dewar <dewar@adacore.com>
5876 * par-ch4.adb (Check_Bad_Exp): New procedure
5878 2012-03-19 Robert Dewar <dewar@adacore.com>
5880 * exp_attr.adb, sem_attr.adb, sem_attr.ads, snames.ads-tmpl: Add
5881 initial framework for Valid_Scalars attribute.
5883 2012-03-19 Robert Dewar <dewar@adacore.com>
5885 * scng.adb (Scan): Recognize incorrect preprocessor directive
5887 2012-03-19 Robert Dewar <dewar@adacore.com>
5889 * atree.adb (Allocate_Initialize_Node): Use Num_Extension_Nodes
5890 * atree.ads (Num_Extension_Nodes): New variable
5891 * debug.adb: New debug flag -gnatd.N
5892 * gnat1drv.adb (Adjust_Global_Switches): Adjust
5893 Num_Extension_Nodes if -gnatd.N set
5895 2012-03-19 Eric Botcazou <ebotcazou@adacore.com>
5897 * einfo.ads: Minor update to First_Rep_Item and Has_Gigi_Rep_Item
5900 2012-03-19 Robert Dewar <dewar@adacore.com>
5902 * opt.ads: Remove HLO_Active flag.
5903 * sem.adb: Remove call of high level optimizer.
5904 * sem.ads (New_Nodes_OK): Removed.
5905 * sem_ch10.adb: Remove references to New_Nodes_OK.
5906 * switch-c.adb: Remove handling of -gnatH switch.
5908 2012-03-19 Yannick Moy <moy@adacore.com>
5910 * sem_ch6.adb (Check_Subprogram_Contract): Do not emit warnings
5911 on trivially True or False postconditions and Ensures components
5914 2012-03-19 Robert Dewar <dewar@adacore.com>
5916 * gnat_ugn.texi: Fix index entry for -gnatei (now we have
5919 2012-03-19 Hristian Kirtchev <kirtchev@adacore.com>
5921 * sem_ch3.adb (Get_Discriminant_Value): Instead of looking
5922 at the immediate correcponsing discriminant, traverse a
5923 potential chain of discriminants produced by type derivations.
5924 (Root_Corresponding_Discriminant): Traverse a chain of inherited
5925 discriminants and return the topmost discriminant.
5927 2012-03-19 Bob Duff <duff@adacore.com>
5929 * debug.adb: Minor comment change.
5930 * gnat_ugn.texi: Update documentation for elaboration regarding
5933 2012-03-19 Gary Dismukes <dismukes@adacore.com>
5935 * exp_ch3.adb (Expand_N_Object_Declaration): In
5936 the case of an object of a class-wide interface type, where the
5937 declaration is rewritten as a renaming, call Set_Debug_Info_Needed
5938 on the renaming entity so that Materialize_Entity will be
5939 set. Also, change existing call (for other than interface cases)
5940 to call Set_Debug_Info_Needed rather than Set_Needs_Debug_Info
5941 (as specified for that flag).
5943 2012-03-19 Hristian Kirtchev <kirtchev@adacore.com>
5945 * sem_ch4.adb (Analyze_Allocator): Detect an allocator generated
5946 by the build-in-place machinery where the designated type is
5947 indefinite, but the underlying type is not. Do not emit errors
5948 related to missing initialization in this case.
5950 2012-03-19 Robert Dewar <dewar@adacore.com>
5952 * gnat_ugn.texi: Add documentation for -gnateinnn switch.
5953 * sem_elab.adb, put_alfa.adb, lib-xref-alfa.adb: Minor reformatting.
5954 * sem_prag.adb: Minor comment update.
5956 2012-03-15 Robert Dewar <dewar@adacore.com>
5958 * errout.ads: Add entry for translating -gnateinn to
5959 /MAX_INSTANTIATIONS for VMS.
5960 * hostparm.ads (Max_Instantiations): Moved to Opt.
5961 * opt.ads (Maximum_Instantiations): Moved from Hostparm, and renamed.
5962 * sem_ch12.adb (Maximum_Instantiations): New name of
5963 Max_Instantiations (Analyze_Package_Instantiation): Change error
5964 msg for too many instantiations (mention -gnateinn switch).
5965 * switch-c.adb (Scan_Front_End_Switches): Implement -gnateinn switch.
5966 * switch.ads: Minor comment update.
5967 * usage.adb (Usage): Output line for -maxeinn switch.
5968 * vms_data.ads: Add entry for MAX_INSTANTIATIONS (-gnateinn).
5970 2012-03-15 Yannick Moy <moy@adacore.com>
5972 * alfa.ads Update the decription of ALI sections.
5973 (Alfa_File_Record): Add a component Unit_File_Name to store the
5974 unit file name for subunits.
5975 * get_alfa.adb, put_alfa.adb Adapt to the possible presence of
5977 * lib-xref-alfa.adb (Add_Alfa_File): For subunits, retrieve the
5978 file name of the unit.
5980 2012-03-15 Yannick Moy <moy@adacore.com>
5982 * sem_ch6.adb (Check_Subprogram_Contract): Do
5983 not issue warning on missing 'Result in postcondition if all
5984 postconditions and contract-cases already get a warning for only
5985 referring to pre-state.
5987 2012-03-15 Bob Duff <duff@adacore.com>
5989 * debug.adb: Add new debug switch -gnatd.U, which disables the
5990 support added below, in case someone trips over a cycle, and needs
5992 * sem_attr.adb (Analyze_Access_Attribute):
5993 Treat Subp'Access as a call for elaboration purposes.
5994 * sem_elab.ads, sem_elab.adb (Check_Elab_Call): Add support
5997 2012-03-15 Vincent Pucci <pucci@adacore.com>
5999 * sem.ads, sem.adb (Preanalyze): New routine.
6000 * sem_ch4.adb (Analyze_Quantified_Expression): Call to the
6001 Preanalyze routine in Sem added. Renaming of Needs_Expansion
6002 into Need_Preanalysis.
6003 * sem_ch6.adb (Preanalyze): Removed.
6005 2012-03-15 Robert Dewar <dewar@adacore.com>
6007 * sem_ch4.adb (Analyze_Quantified_Expression): Add comment.
6008 * sem_prag.adb: Minor comment additions.
6009 * sem_attr.adb (Check_First_Last_Valid): Make sure prefix type
6012 2012-03-15 Vincent Pucci <pucci@adacore.com>
6014 * sem_ch4.adb (Analyze_Quantified_Expression):
6015 Preanalyze the condition when the quantified expression will be
6018 2012-03-15 Yannick Moy <moy@adacore.com>
6020 * sem_prag.adb, sem_util.adb, sem_util.ads, sem_attr.adb, sem_ch6.adb,
6021 sem_warn.adb: Minor refactoring, renaming Case_Pragma in CTC_Pragma,
6022 to refer to both Test_Case pragma and Contract_Case pragma (same
6023 acronym as in Spec_CTC_List).
6025 2012-03-15 Robert Dewar <dewar@adacore.com>
6027 * sem_prag.adb, sem_prag.ads, sem_util.ads, sem_attr.adb, sem_ch6.adb,
6028 sem_warn.adb: Minor reformatting.
6030 2012-03-15 Hristian Kirtchev <kirtchev@adacore.com>
6032 * exp_util.adb (Initialized_By_Ctrl_Function): Do not loop over
6033 selector names as the function call always appears at the top selected
6036 2012-03-15 Ed Schonberg <schonberg@adacore.com>
6038 * sem_ch12.adb (Validate_Access_Subprogram_Instance): keep
6039 Mode_Conformance check for older versions of the language.
6041 2012-03-15 Yannick Moy <moy@adacore.com>
6043 * gnat_ugn.texi Document the extension of option -gnatw.t.
6044 * sem_ch3.adb (Analyze_Declaration): Check for suspicious
6045 contracts only after contract cases have been semantically
6047 * sem_ch6.adb (Check_Subprogram_Contract): Consider also Ensures
6048 components of contract cases for detecting suspicious contracts.
6050 2012-03-15 Yannick Moy <moy@adacore.com>
6052 * aspects.adb, aspects.ads (Aspect_Id): New GNAT aspect
6053 Aspect_Contract_Case.
6054 * gnat_rm.texi Document the new pragma/aspect
6055 Contract_Case. Correct the documentation of the existing
6056 pragma/aspect Test_Case with the new semantics.
6057 * sem_attr.adb (Analyze_Attribute): Allow use of 'Result in the
6058 Ensures component of a Contract_Case pragma.
6059 * sem_ch13.adb (Analyze_Aspect_Specifications): Check new aspect
6060 and translate it into a pragma.
6061 (Check_Aspect_At_Freeze_Point): Take into account the new aspect.
6062 * sem_ch3.adb, sinfo.adb, sinfo.ads Renaming of TC (for test case)
6063 into CTC (for contract and test case).
6064 * sem_ch6.adb (Process_PPCs): Generate Check pragmas from
6065 Contract_Case pragmas, similarly to what is done already for
6067 * sem_prag.adb, sem_prag.ads (Check_Contract_Or_Test_Case):
6068 Renaming of Check_Test_Case.
6069 (Analyze_Pragma, Sig_Flags): Take into account the new pragma.
6070 * sem_util.adb, sem_util.ads Renaming to take into account the
6071 new pragma, so that functions which applied only to Test_Case
6072 now apply to both Test_Case and Contract_Case.
6073 * par-prag.adb, sem_warn.adb, snames.ads-tmpl Take into account
6076 2012-03-15 Robert Dewar <dewar@adacore.com>
6078 * sem_ch6.ads: Minor comment updates.
6079 * sem_ch12.adb: Minor comment clarification.
6081 2012-03-15 Robert Dewar <dewar@adacore.com>
6083 * sem_ch5.adb: Minor reformatting.
6085 2012-03-15 Ed Schonberg <schonberg@adacore.com>
6087 * exp_ch3.adb (Expand_N_Object_Declaration): When rewriting the
6088 declaration of a class-wide object, retain the Ekind to prevent
6089 subsequent misuse of constants.
6091 2012-03-15 Yannick Moy <moy@adacore.com>
6093 * gnat_rm.texi, gnat_ugn.texi: Minor correction of invariant
6096 2012-03-15 Hristian Kirtchev <kirtchev@adacore.com>
6098 * exp_util.adb (Initialized_By_Ctrl_Function): Add code to
6099 process the case when a function call appears in object.operation
6102 2012-03-15 Ed Schonberg <schonberg@adacore.com>
6104 * sem_ch6.ads, sem_ch6.adb (Check_Subtype_Conformant): add
6105 Get_Inst formal, so that conformance within an instantiation
6106 follows renamings of formals. This is similar to what is already
6107 done in Check_Mode_conformant.
6108 * sem_ch12.adb (Vailidate_Access_Subprogram_Instance): check that
6109 formal and actual are subtype conformant. Previously only mode
6110 conformance was required.
6112 2012-03-15 Robert Dewar <dewar@adacore.com>
6114 * par-ch6.adb, einfo.ads, sem_eval.adb, sem_eval.ads,
6115 sem_case.adb: Minor reformatting.
6117 2012-03-15 Robert Dewar <dewar@adacore.com>
6119 * exp_attr.adb (Expand_N_Attribute_Reference): Add handling
6120 of First_Valid/Last_Valid.
6121 * sem_attr.adb (Check_First_Last_Valid): New procedure
6122 (Analyze_Attribute): Add handling of First_Valid and Last_Valid
6123 (Eval_Attribute): ditto.
6124 * snames.ads-tmpl: Add entries for First_Valid and Last_Valid.
6126 2012-03-15 Ed Schonberg <schonberg@adacore.com>
6128 * exp_ch5.adb (Expand_Predicated_Loop): Suppress warnings on
6129 loop variable, for the unusual case where the range has a single
6130 element and the loop variable has no visible assignment to it.
6132 2012-03-15 Vincent Pucci <pucci@adacore.com>
6134 * exp_ch4.adb (Expand_N_Quantified_Expression): Expand the
6135 original quantified expression node.
6136 * sem_ch4.adb (Analyze_Quantified_Expression): Properly analyze
6137 the quantified expression and preserve the original non-analyzed
6138 quantified expression when an expansion is needed.
6139 * sem_ch5.adb (Analyze_Iteration_Scheme): Special treatment
6140 for quantified expressions.
6141 (Analyze_Iterator_Specification): Special treatment for quantified
6144 2012-03-15 Ed Falis <falis@adacore.com>
6146 * s-vxwork-ppc.ads: Update FP_CONTEXT so name of former pad
6147 field matches VxWorks headers.
6149 2012-03-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6151 * gcc-interface/Makefile.in (mips-sgi-irix6*): Remove.
6153 * a-intnam-irix.ads, mlib-tgt-specific-irix.adb,
6154 s-intman-irix.adb, s-mastop-irix.adb, s-osinte-irix.adb,
6155 s-osinte-irix.ads, s-proinf-irix-athread.adb,
6156 s-proinf-irix-athread.ads, s-taprop-irix.adb, s-tasinf-irix.ads,
6157 system-irix-n32.ads, system-irix-n64.ads, system-irix-o32.ads:
6160 * adaint.c [__mips && __sgi]: Remove.
6161 (__gnat_number_of_cpus) [__mips && __sgi]: Remove.
6162 [IS_CROSS && !(__mips && __sgi)]: Remove.
6163 * adaint.h [sgi && _LFAPI]: Remove.
6164 * cstreams.c (__gnat_full_name) [sgi]: Remove.
6165 * env.c (__gnat_unsetenv) [__mips && __sgi]: Remove.
6166 (__gnat_clearenv) [__mips && __sgi]: Remove.
6167 * errno.c (_SGI_MP_SOURCE): Remove.
6168 * gsocket.h [sgi]: Remove.
6169 * init.c: Remove IRIX reference.
6171 * link.c [sgi]: Remove.
6172 * s-oscons-tmplt.c [__mips && __sgi] (IOV_MAX): Don't define.
6173 (main) [__mips && __sgi] (MAX_tv_sec): Don't define.
6174 (CLOCK_SGI_FAST, CLOCK_SGI_CYCLE): Remove.
6175 * sysdep.c [sgi]: Remove.
6176 (getc_immediate_common) [sgi]: Remove.
6177 (__gnat_localtime_tzoff) [sgi]: Remove.
6178 * terminals.c [__mips && __sgi] (IRIX): Don't define.
6179 [IRIX] (USE_GETPTY): Don't define.
6180 (allocate_pty_desc) [USE_GETPTY]: Remove.
6182 * g-traceb.ads: Remove IRIX reference.
6183 * g-trasym.ads: Likewise.
6184 * memtrack.adb: Likewise.
6185 * s-interr-sigaction.adb: Likewise.
6187 * gnat_rm.texi (Implementation Advice): Remove SGI info.
6188 (Implementation Defined Characteristics): Likewise.
6189 * gnat_ugn.texi (Summary of Run-Time Configurations, mips-irix):
6191 (Irix-Specific Considerations): Remove.
6193 2012-03-13 Tristan Gingold <gingold@adacore.com>
6195 * gcc-interface/gigi.h (flag_vms_malloc64): Refine condition.
6197 2012-03-13 Tristan Gingold <gingold@adacore.com>
6199 * sysdep.c: Adjust condition after removal of __osf__.
6201 2012-03-12 Eric Botcazou <ebotcazou@adacore.com>
6203 * gcc-interface/gigi.h (shift_unc_components_for_thin_pointers): Kill.
6204 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Remove call
6206 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Pool_Address>: Adjust
6207 handling of thin pointers.
6208 <Attr_Descriptor_Size>: Likewise.
6209 (gnat_to_gnu) <N_Free_Statement>: Likewise.
6210 * gcc-interface/utils.c (shift_unc_components_for_thin_pointers): Kill.
6211 (convert_to_fat_pointer): Adjust handling of thin pointers.
6212 (convert) <POINTER_TYPE>: Likewise.
6213 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: Likewise.
6215 2012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6217 * gcc-interface/Makefile.in (alpha*-dec-osf*): Remove.
6218 * a-intnam-tru64.ads, mlib-tgt-specific-tru64.adb,
6219 s-mastop-tru64.adb, s-osinte-tru64.adb, s-osinte-tru64.ads,
6220 s-taprop-tru64.adb, s-tasinf-tru64.ads, s-taspri-tru64.ads,
6221 system-tru64.ads: Remove.
6223 * adaint.c (__gnat_number_of_cpus) [__alpha__ && __osf__]:
6225 [IS_CROSS] [!(__alpha__ && __osf__)]: Remove.
6226 * env.c [__alpha__ && __osf__]: Remove.
6227 * gsocket.h (_OSF_SOURCE): Remove.
6228 (HAVE_THREAD_SAFE_GETxxxBYyyy) [__osf__]: Remove.
6229 * init.c [__alpha__ && __osf__]: Remove.
6230 * link.c [__osf__]: Remove.
6231 * s-oscons-tmplt.c [__alpha__ && __osf__]: Remove.
6232 [__osf__ && !_SS_MAXSIZE]: Remove.
6233 * sysdep.c [__osf__]: Remove.
6234 * terminals.c [__alpha__ && __osf__]: Remove.
6237 * g-traceb.ads: Remove Tru64 reference.
6238 * g-trasym.ads: Likewise.
6239 * gnat_ugn.texi (Linking a Mixed C++ & Ada Program): Likewise.
6240 (Summary of Run-Time Configurations): Likewise.
6241 * memtrack.adb: Likewise.
6243 2012-03-12 Tristan Gingold <gingold@adacore.com>
6245 * gcc-interface/decl.c (gnat_to_gnu_param): Use flag_vms_malloc64
6246 instead of TARGET_MALLOC64.
6247 * gcc-interface/gigi.h (flag_vms_malloc64): Define instead
6250 2012-03-09 Robert Dewar <dewar@adacore.com>
6252 * a-direct.adb, comperr.adb, freeze.adb: Minor reformatting.
6254 2012-03-09 Arnaud Charlet <charlet@adacore.com>
6256 * s-taskin.adb (Initialize_ATCB): Set Task_Image_Len to
6257 0 so that we never access this field uninitialized (e.g. in
6258 Task_Primitives.Operations.Enter_Task for the environment task).
6260 2012-03-09 Vincent Pucci <pucci@adacore.com>
6262 * exp_ch5.adb (Expand_Iterator_Loop):
6263 Call to Expand_Iterator_Loop_Over_Array added.
6264 (Expand_Iterator_Loop_Over_Array): New routine. Expansion of
6265 "of" iterator loop over arrays. Multidimensional array case added.
6267 2012-03-09 Eric Botcazou <ebotcazou@adacore.com>
6269 * uintp.ads: Fix minor pasto in comment.
6271 2012-03-09 Vasiliy Fofanov <fofanov@adacore.com>
6273 * a-direct.adb: Do not strip the trailing directory separator
6274 from path, as this is already done inside Normalize_Pathname;
6275 doing it again produces the wrong result on Windows for the
6276 drive's root dir (i.e. "X:\" becomes "X:").
6278 2012-03-09 Thomas Quinot <quinot@adacore.com>
6280 * exp_attr.adb, freeze.adb, sem_attr.adb, aspects.adb, aspects.ads,
6281 sem_ch13.adb, snames.ads-tmpl (Exp_Attr.Expand_N_Attribute_Reference):
6282 Add Attribute_Scalar_Storage_Order.
6283 (Sem_Attr.Analyze_Attribute, Eval_Attribute): Ditto.
6284 (Aspects): Add Aspect_Scalar_Storage_Order (Snames): Add
6285 Name_Scalar_Storage_Order and Attribute_Scalar_Storage_Order.
6286 (Sem_Ch13.Analyze_Attribute_Definition_Clause): Add processing
6287 for Scalar_Storage_Order.
6288 (Freeze): If Scalar_Storage_Order is specified, check that it
6289 is compatible with Bit_Order.
6291 2012-03-09 Robert Dewar <dewar@adacore.com>
6293 * s-osinte-linux.ads, sem_util.adb, s-taprop-linux.adb, exp_ch4.adb,
6294 a-strsup.ads, sem_ch6.adb, a-stwisu.ads, exp_ch3.adb,
6295 a-stzsup.ads: Minor reformatting.
6297 2012-03-09 Thomas Quinot <quinot@adacore.com>
6299 * s-ransee-vms.adb: Minor reformatting.
6301 2012-03-09 Arnaud Charlet <charlet@adacore.com>
6303 * comperr.adb (Delete_SCIL_Files): Fix handling of
6304 N_Package_Renaming_Declaration and N_Generic_Package_Declaration.
6306 2012-03-09 Javier Miranda <miranda@adacore.com>
6308 * sem_ch6.adb (Check_Body_To_Inline): In AAMP and VM targets
6309 use frontend inlining at all optimization levels.
6310 * sem_util.adb (Must_Inline): In AAMP and VM targets, given that
6311 there is no inlining support in the backend, use also frontend
6312 inlining when compiling with optimizations enabled.
6313 * exp_ch6.adb (Expand_Call): Minor code reorganization.
6315 2012-03-09 Eric Botcazou <ebotcazou@adacore.com>
6317 * gcc-interface/ada-tree.h (TYPE_VAX_FLOATING_POINT_P): Move around.
6318 (TYPE_UNCONSTRAINED_ARRAY): Adjust comment.
6319 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Pool_Address>: Tidy
6320 up. Add comment and use canonical predicate for thin pointers.
6321 (gnat_to_gnu) <N_Free_Statement>: Tidy up and reorder. Add comment
6322 and use canonical predicate for thin pointers.
6323 * gcc-interface/utils.c (convert_to_fat_pointer): Remove superfluous
6324 'else' and use standard name.
6325 (convert_to_thin_pointer): Delete.
6326 (convert) <POINTER_TYPE>: Do the difference in sizetype directly and
6327 change obsolete idioms. Do not call above function.
6328 (unchecked_convert): Fix formatting.
6329 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: In the thin
6330 pointer case, use byte_position to get the field position.
6332 2012-03-07 Eric Botcazou <ebotcazou@adacore.com>
6334 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set flags on the
6335 DECL node built for a type which has a non-trivial equivalent type.
6337 2012-03-07 Eric Botcazou <ebotcazou@adacore.com>
6339 * gcc-interface/gigi.h (rest_of_type_decl_compilation): Delete.
6340 * gcc-interface/decl.c (defer_finalize_level): Likewise.
6341 (defer_finalize_list): Likewise.
6342 (gnat_to_gnu_entity): Delete references to above variables and do not
6343 call rest_of_type_decl_compilation.
6344 (rest_of_type_decl_compilation): Delete.
6345 (rest_of_type_decl_compilation_no_defer): Likewise.
6346 * gcc-interface/utils.c (rest_of_record_type_compilation): Do not call
6347 rest_of_type_decl_compilation.
6348 (create_type_decl): Likewise.
6349 (update_pointer_to): Likewise.
6351 2012-03-07 Eric Botcazou <ebotcazou@adacore.com>
6353 * gcc-interface/trans.c (Identifier_to_gnu): Don't unshare initializer.
6354 (add_decl_expr): Mark external DECLs as used.
6355 * gcc-interface/utils.c (convert) <CONSTRUCTOR>: Copy the vector.
6357 2012-03-07 Tristan Gingold <gingold@adacore.com>
6359 * s-ransee-vms.adb: New file.
6360 * gcc-interface/Makefile.in: Use s-ransee-vms.adb on VMS.
6361 * gcc-interface/Make-lang.in: Update dependencies.
6363 2012-03-07 Bob Duff <duff@adacore.com>
6365 * rtsfind.ads: Add support for finding Super_String types.
6366 * sem_util.ads, sem_util.adb (Is_Bounded_String): New function
6367 to determine whether a given type is a bounded string type.
6368 (Is_Fully_Initialized_Type): Return True for bounded
6369 string types, to suppress bogus warnings.
6370 * exp_ch4.adb (Expand_Composite_Equality): Special case for bounded
6371 strings: equality composes. This allows us to remove default values in
6373 * a-strsup.ads, a-stwisu.ads, a-stzsup.ads: Update comments.
6374 * exp_ch3.adb (Expand_Freeze_Record_Type): Comment.
6376 2012-03-07 Robert Dewar <dewar@adacore.com>
6378 * sem_util.adb, exp_ch4.adb, exp_ch6.adb, sem_ch6.adb: Minor
6381 2012-03-07 Sergey Rybin <rybin@adacore.com frybin>
6383 * gnat_ugn.texi: gnatpp: fix paragraph about sources with
6384 preprocessor directives.
6386 2012-03-07 Arnaud Charlet <charlet@adacore.com>
6388 * s-osinte-linux.ads, s-taprop-linux.adb (prctl): New function.
6389 (Enter_Task): Call prctl when relevant.
6391 2012-03-07 Tristan Gingold <gingold@adacore.com>
6393 * s-osinte-vms.ads: pthread_mutex_setname_np: new function.
6395 2012-03-07 Ed Schonberg <schonberg@adacore.com>
6397 * sem_ch6.adb (Process_Formals): a generic subprogram with
6398 a formal incomplete type does not require a freeze node.
6400 2012-03-07 Bob Duff <duff@adacore.com>
6402 * sem_util.ads: Minor reformatting.
6404 2012-03-07 Geert Bosch <bosch@adacore.com>
6406 * targparm.ads: New target parameter Atomic_Sync_Default,
6408 * targparm.adb (Get_Target_Parameters): Add processing for
6409 Atomic_Sync_Default.
6410 * gnat1drv.adb (Adjust_Global_Switches): Adjust Supress_Options
6413 2012-03-07 Javier Miranda <miranda@adacore.com>
6415 * sem_ch3.adb (Analyze_Object_Declaration): If the object
6416 declaration has an init expression then stop the analysis of the
6417 object declaration if the expression which initializes the object
6418 is a call to an inlined function which returns an unconstrained
6419 and has been expanded into a procedure call.
6420 * sem_ch5.adb (Has_Call_Using_Secondary_Stack): Add missing
6421 support to handle selected components.
6422 * sem_ch6.ads (Cannot_Inline): Adding parameter Is_Serious plus
6424 * sem_ch6.adb (Check_And_Build_Body_To_Inline): New
6425 subprogram which implements the checks required by the
6426 new rules for frontend inlining and builds the body to inline.
6427 (Analyze_Subprogram_Body_Helper): Move code that
6428 checks inlining of subprogram that has nested subprogram
6429 to Check_And_Build_Body_To_Inline. Replace call to
6430 Build_Body_To_Inline by call to the new subprogram
6431 Check_And_Build_Body_To_Inline.
6432 (Cannot_Inline): New implementation.
6433 * sem_ch12.adb (Analyze_Package_Instantiation.Must_Inline_Subp):
6435 * sem_util.ad[sb] (Must_Inline): New subprogram.
6436 (Returns_Unconstrained_Type): New subprogram.
6437 * sem_res.adb (Resolve_Call): Do not create a transient scope
6439 * inline.ads (Analyzing_Inlined_Bodies): Remove unreferenced variable.
6440 * inline.adb (Analyze_Inlined_Bodies, Initialize): Remove setting
6441 to false the variable Analyzing_Inlined_Bodies. Fix comments.
6442 * exp_ch4.adb (Expand_N_Allocator): Fix handling of finalization master.
6443 * exp_ch6.ads (List_Inlining_Info): New subprogram.
6444 * exp_ch6.adb (Expand_Call.Do_Inline): New subprogram.
6445 (Expand_Call.Do_Inline_Always): New subprogram.
6446 (In_Unfrozen_Instance): Move the declaration of this subprogram.
6447 (Expand_Inlined_Call.Reset_Dispatching_Calls): New subprogram.
6448 (Expand_Inlined_Call): Adding new support for inlining functions
6449 that return unconstrained types.
6450 (List_Inlining_Info): New subprogram.
6451 * debug.adb Document flags -gnatd.j and -gnatd.k
6452 * gnat1drv.adb Add call to generate the new listing of inlined
6453 calls and calls passed to the backend.
6455 2012-03-07 Robert Dewar <dewar@adacore.com>
6457 * sem_ch5.adb, s-vaflop.adb, s-taprop-vms.adb, exp_ch6.adb,
6458 s-gearop.adb, sem_ch6.adb, g-trasym.adb: Minor reformatting.
6460 2012-03-07 Javier Miranda <miranda@adacore.com>
6462 * a-ngrear.ads: Add documentation.
6464 2012-03-07 Tristan Gingold <gingold@adacore.com>
6466 * s-taprop-vms.adb (Create_Task): set thread name.
6467 * s-osinte-vms.ads (pthread_attr_setname_np): Declare.
6469 2012-03-07 Arnaud Charlet <charlet@adacore.com>
6471 * g-trasym.adb: Minor reformatting.
6473 2012-03-07 Robert Dewar <dewar@adacore.com>
6475 * a-ngrear.ads: Minor addition of ??? comment.
6477 2012-03-07 Gary Dismukes <dismukes@adacore.com>
6479 * exp_ch4.adb (Apply_Accessibility_Check): Call
6480 Remove_Side_Effects in the build-in-place case, to ensure that
6481 we capture the call and don't end up with two calls.
6483 2012-03-07 Javier Miranda <miranda@adacore.com>
6485 * exp_ch6.adb (Expand_Inlined_Call): Skip inlining of functions
6486 that return unconstrained types using an extended return statement
6487 since the support for inlining these functions has not been yet
6488 added to the frontend.
6489 * s-vaflop.adb, s-vaflop-vms-alpha.adb: Code reorganization.
6490 * a-ngrear.ads: Replace all the Inline_Always pragmas by pragma
6492 * a-ngrear.adb (Eigenvalues, Transpose): Restructured to use
6493 extended return statement.
6494 * a-strsup.adb, a-stzsup.adb, a-stwisu.adb (Concat, Super_Slice,
6495 Super_To_String): Restructured to use extended return statement.
6496 * a-chahan.adb (To_Basic, To_Lower, To_Upper): Restructured to
6497 use extended return statement.
6498 * s-gearop.adb (Diagonal, Matrix_Elementwise_Operation,
6499 Vector_Elementwise_Operation, Matrix_Elementwise_Operation,
6500 Matrix_Matrix_Scalar_Elementwise_Operation,
6501 Vector_Vector_Elementwise_Operation,
6502 Vector_Vector_Scalar_Elementwise_Operation,
6503 Matrix_Scalar_Elementwise_Operation,
6504 Vector_Scalar_Elementwise_Operation,
6505 Scalar_Matrix_Elementwise_Operation,
6506 Scalar_Vector_Elementwise_Operation, Matrix_Matrix_Product,
6507 Matrix_Vector_Product, Outer_Product, Unit_Matrix, Unit_Vector,
6508 Vector_Matrix_Product): Restructured to use extended return
6511 2012-03-07 Vincent Pucci <pucci@adacore.com>
6513 * sem_ch5.adb (One_Bound): Minor reformatting.
6515 2012-03-07 Tristan Gingold <gingold@adacore.com>
6517 * s-osinte-vms-ia64.adb, s-osinte-vms-ia64.ads, s-osinte-vms.adb,
6518 s-osinte-vms.ads, gcc-interface/Makefile.in: Merge s-osinte-vms and
6521 2012-03-07 Ed Schonberg <schonberg@adacore.com>
6523 * checks.adb (Apply_Predicate_Check): Do not generate a predicate
6524 check is the context is an internally generated type-specific
6526 * sem_ch6.adb (Process_PPCs); the formals of internally generated
6527 type-specific functions do not get assertion checks.
6529 2012-03-07 Yannick Moy <moy@adacore.com>
6531 * gnat_rm.texi: Minor renaming of title.
6532 * gnat_ugn.texi: Minor correction.
6534 2012-03-07 Vincent Pucci <pucci@adacore.com>
6536 * exp_ch4.adb (Expand_N_Quantified_Expression): Minor
6538 * sem_ch4.adb (Analyze_Quantified_Expression): Creation and
6539 analysis of the iteration scheme added in all cases.
6540 * sem_ch5.adb (Analyze_Iteration_Scheme): Minor reformating.
6541 (Analyze_Iterator_Specification): Minor reformating.
6542 * sem_res.adb (Resolve_Quantified_Expression): Resolution of
6543 the condition added in all cases.
6545 2012-03-07 Thomas Quinot <quinot@adacore.com>
6547 * einfo.adb, einfo.ads: Add flag Reverse_Storage_Order.
6549 2012-03-07 Yannick Moy <moy@adacore.com>
6551 * gnat_rm.texi, gnat_ugn.texi: Rewording of GNAT UG and GNAT RM to
6552 account for Ada 2012 assertions, and their pragma counterparts in GNAT.
6554 2012-03-07 Thomas Quinot <quinot@adacore.com>
6556 * exp_attr.adb, sem_attr.adb: Minor reformatting.
6558 2012-03-07 Bob Duff <duff@adacore.com>
6560 * hostparm.ads (Max_Instantiations): Increase parameter.
6562 2012-03-07 Bob Duff <duff@adacore.com>
6564 * par-prag.adb: Minor code rearrangement.
6566 2012-03-07 Bob Duff <duff@adacore.com>
6568 * a-strsup.ads, a-stwisu.ads, a-stzsup.ads (Super_String):
6569 Remove default initial value for Data. It is no longer needed
6570 because "=" now composes properly for untagged records. This
6571 default has caused efficiency problems.
6573 2012-03-07 Ed Schonberg <schonberg@adacore.com>
6575 * sem_res.adb (Resolve_Actuals): If the actual is a selected
6576 component of an anonymous access type, whose prefix is a variable,
6577 treat the variable as if it may be modified by the call, to
6578 suppress spurious warnings that a variable might be declared as
6581 2012-03-07 Thomas Quinot <quinot@adacore.com>
6583 * einfo.adb, einfo.ads: Remove unused entity flags.
6585 2012-03-07 Eric Botcazou <ebotcazou@adacore.com>
6587 * gnat_ugn.texi (Inline Assembler): Fix swapping of Input and
6588 Output operands throughout.
6590 2012-03-07 Hristian Kirtchev <kirtchev@adacore.com>
6592 * sem_ch12.adb (Earlier): When two nodes come from the same
6593 generic instantiation, compare their locations. Otherwise always
6594 use the top level locations of the nodes.
6596 2012-03-07 Thomas Quinot <quinot@adacore.com>
6598 * einfo.ads, sem_prag.adb: Minor reformatting.
6600 2012-03-05 Jason Merrill <jason@redhat.com>
6602 * gcc-interface/Make-lang.in (doc/gnat_ugn.texi): Build xgnatugn
6605 2012-03-04 Eric Botcazou <ebotcazou@adacore.com>
6607 * gnatvsn.ads (Library_Version): Bump to 4.8.
6609 2012-03-03 H.J. Lu <hongjiu.lu@intel.com>
6611 * init.c (__gnat_adjust_context_for_raise): Also check
6612 "orq $0x0,(%esp)" for x32.
6614 * link.c (__gnat_default_libgcc_subdir): Set to libx32 for x32.
6616 * gcc-interface/Makefile.in (arch): Set to x32 if MULTISUBDIR
6617 is /x32 and add support for x32.
6619 2012-02-29 Eric Botcazou <ebotcazou@adacore.com>
6621 * gcc-interface/decl.c (components_to_record): Add ARTIFICIAL parameter
6622 and set TYPE_ARTIFICIAL according to it. Adjust recursive call.
6623 (gnat_to_gnu_entity) <E_Record_Type>: Adjust call to above function.
6624 * gcc-interface/utils.c (rest_of_record_type_compilation): Do not
6625 invoke rest_of_type_decl_compilation on the parallel type, if any.
6627 2012-02-29 Eric Botcazou <ebotcazou@adacore.com>
6629 * gcc-interface/utils.c (gnat_write_global_declarations): Make sure the
6630 dummy global built for global types is preserved.
6632 2012-02-27 Tristan Gingold <gingold@adacore.com>
6634 * gcc-interface/decl.c (gnat_to_gnu_entity) [E_String_Type,
6635 E_Array_Type]: Reuse dummy fat type for gnu_ptr_template and
6638 2012-02-27 Eric Botcazou <ebotcazou@adacore.com>
6640 * gcc-interface/ada-tree.h (TYPE_PACKED_ARRAY_TYPE_P): Add checking.
6641 (TYPE_BY_REFERENCE_P): New flag.
6642 (TYPE_IS_BY_REFERENCE_P): New macro.
6643 (TYPE_DUMMY_P): Add checking and remove VOID_TYPE.
6644 (TYPE_IS_DUMMY_P): Adjust for above change.
6645 * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_BY_REFERENCE_P
6646 and TYPE_IS_BY_REFERENCE_P instead of TREE_ADDRESSABLE.
6647 (gnat_to_gnu_param): Likewise.
6648 (maybe_pad_type): Likewise.
6649 (make_type_from_size): Use TYPE_IS_PACKED_ARRAY_TYPE_P.
6650 * gcc-interface/misc.c (must_pass_by_ref): Use TYPE_IS_BY_REFERENCE_P
6651 instead of TREE_ADDRESSABLE.
6652 * gcc-interface/trans.c (finalize_nrv): Likewise.
6653 (call_to_gnu): Likewise. Do not create a temporary for return values
6654 with by-reference type here.
6655 (gnat_to_gnu): Test TYPE_IS_DUMMY_P instead of TYPE_DUMMY_P.
6656 (gnat_gimplify_expr) <ADDR_EXPR>: Don't do anything for non-constant
6657 CONSTRUCTORs and calls.
6658 * gcc-interface/utils.c (make_dummy_type): Get the equivalent type of
6659 the underlying type and use it throughout. Use TYPE_IS_BY_REFERENCE_P
6660 instead of TREE_ADDRESSABLE.
6661 * gcc-interface/utils2.c (build_cond_expr): Deal with by-reference
6664 2012-02-27 Eric Botcazou <ebotcazou@adacore.com>
6666 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Revert previous
6667 change that creates a special VAR_DECL for debugging purposes. For an
6668 aliased object with an unconstrained nominal subtype, make its type a
6669 thin reference to the underlying object.
6670 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: Deal with
6671 expressions built for the initialization of above objects.
6673 2012-02-24 Dave Korn <dave.korn.cygwin@gmail.com>
6675 * gcc-interface/Makefile.in (WIN_SO_PREFIX [windows targets]): New
6676 Windows-specific make variable.
6677 (WIN_SO_INSTALL_DIR [windows targets]): Likewise.
6678 (install-gnatlib): Respect the above during installation when set,
6679 and also install any windows import library that has been built.
6680 (gnatlib-shared-win32): Use WIN_SO_PREFIX to name output DLL and also
6681 build a corresponding import library.
6683 2012-02-22 Robert Dewar <dewar@adacore.com>
6685 * exp_util.adb, make.adb, sem_dim.adb, sem_ch4.adb, exp_disp.adb: Minor
6688 2012-02-22 Geert Bosch <bosch@adacore.com>
6690 * g-bytswa-x86.adb, g-bytswa.adb, gcc-interface/Makefile.in: Remove
6691 x86-specific version of byteswap and use GCC builtins instead.
6693 2012-02-22 Tristan Gingold <gingold@adacore.com>
6695 * gcc-interface/decl.c (gnat_to_gnu_entity) [E_String_Type,
6696 E_Array_Type]: Translate component ealier.
6698 2012-02-22 Robert Dewar <dewar@adacore.com>
6700 * par-ch3.adb (P_Signed_Integer_Type_Definition): Specialize
6701 error message for 'Range.
6703 2012-02-22 Pascal Obry <obry@adacore.com>
6705 * s-taprop-mingw.adb (Finalize_TCB): Do not wait on thread handle as
6706 this is our own thread.
6708 2012-02-22 Sergey Rybin <rybin@adacore.com frybin>
6710 * tree_io.ads: Update ASIS_Version_Number because of the changes
6713 2012-02-22 Hristian Kirtchev <kirtchev@adacore.com>
6715 * exp_ch7.adb (Create_Finalizer): Suppress elaboration checks on
6716 stack-related finalizers.
6718 2012-02-22 Ed Schonberg <schonberg@adacore.com>
6720 * sem_ch6.adb (Analyze_Expression_Function): If the construct
6721 is a completion, indicate that its formals are the formals of
6722 a completion, and as such do not get a cross- reference entry.
6723 (Analyze_Subprogram_Specification): Do not generate a definition
6724 for the entity of an expression function, because it may be a
6725 completion. Definition will be generated if needed when analyzing
6726 the generated subprogram declaration.
6728 2012-02-22 Vincent Celier <celier@adacore.com>
6730 * make.adb (Check): When checking if an object file is in the
6731 correct object directory, get the unit name from a previous call
6732 to Check_Source_Info_In_ALI.
6733 * makeutl.adb (Check_Source_Info_In_ALI): Return the name of
6734 the unit when everything is OK, otherwise return No_Name.
6735 * makeutl.ads (Check_Source_Info_In_ALI): Return Name_Id instead
6738 2012-02-22 Ed Schonberg <schonberg@adacore.com>
6740 * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): In an
6741 instance, the operator is visible if an operand is of some
6742 numeric type which is not in use or directly visible, and the
6743 other operand is a numeric literal.
6745 2012-02-22 Tristan Gingold <gingold@adacore.com>
6747 * init.c: Minor code clean up.
6748 * gcc-interface/Make-lang.in: Update dependencies.
6750 2012-02-22 Arnaud Charlet <charlet@adacore.com>
6752 * gnatlink.adb (Gnatlink): Use -gnatcC in CodePeer_Node,
6753 otherwise GCC will generate an object file.
6755 2012-02-22 Vincent Celier <celier@adacore.com>
6757 * projects.texi: Correct typo related to "**" in Source_Dirs.
6759 2012-02-22 Steve Baird <baird@adacore.com>
6761 * sem_prag.adb (Analyze_PPC_In_Decl_Part): Clean up generation of
6764 2012-02-22 Vincent Pucci <pucci@adacore.com>
6766 * rtsfind.adb (Get_Unit_Name): Ada_Numerics_Child and
6767 System_Dim_Child cases added.
6768 * rtsfind.ads: Ada_Numerics,
6769 Ada_Numerics_Generic_Elementary_Functions, System_Dim,
6770 System_Dim_Float_IO and System_Dim_Integer_IO added to the list
6771 of RTU_Id. Ada_Numerics_Child and System_Dim_Child added as
6772 new RTU_Id subtypes.
6773 * sem_dim.adb (Is_Dim_IO_Package_Entity): Use of
6774 Rtsfind to verify the package entity is located either
6775 in System.Dim.Integer_IO or in System.Dim.Float_IO.
6776 (Is_Dim_IO_Package_Instantiation): Minor
6777 changes. (Is_Elementary_Function_Call): Removed.
6778 (Is_Elementary_Function_Entity): New routine.
6779 (Is_Procedure_Put_Call): Is_Dim_IO_Package_Entity call added.
6780 * snames.ads-tmpl: Name_Dim and Name_Generic_Elementary_Functions
6783 2012-02-22 Vincent Pucci <pucci@adacore.com>
6785 * sem_prag.adb: Minor reformatting.
6787 2012-02-22 Ed Schonberg <schonberg@adacore.com>
6789 * sem_ch3.adb (Find_Type_Name): When analyzing a private type
6790 declaration that is the completion of a tagged incomplete type, do
6791 not associate the class-wide type already created with the private
6792 type to prevent order-of-elaboration issues in the back-end.
6793 * exp_disp.adb (Find_Specific_Type): Find specific type of
6794 a class-wide type, and handle the case of an incomplete type
6795 coming either from a limited_with clause or from an incomplete
6796 type declaration. Used when expanding a dispatchin call and
6797 generating tag checks (minor refactoring).
6799 2012-02-22 Robert Dewar <dewar@adacore.com>
6801 * exp_ch5.adb: Add comment.
6802 * sem_ch12.adb, exp_ch6.adb: minor reformatting
6804 2012-02-22 Ed Schonberg <schonberg@adacore.com>
6806 * freeze.adb (Freeze_Entity): Do not perform type layout within
6809 2012-02-22 Eric Botcazou <ebotcazou@adacore.com>
6811 * init.c (__gnat_error_handler) [Linux]: Map SIGBUS to
6814 2012-02-22 Ed Schonberg <schonberg@adacore.com>
6816 * exp_ch5.adb (Expand_N_Assignment_Statement): Reject an
6817 assignment to a classwide type whose type is limited, as
6818 can happen in an instantiation in programs that run afoul or
6821 2012-02-17 Ed Schonberg <schonberg@adacore.com>
6823 * exp_ch6.adb (Legal_Copy): If layout is not
6824 determined in the front-end, do not emit error message when
6825 by-reference actual is potentially unaligned.
6826 * gcc-interface/decl.c (gnat_to_gnu_field): Better error message for
6827 illegal representation clause on tagged or aliased component, or on
6828 by-reference type with forced alignment.
6830 2012-02-17 Nicolas Roche <roche@adacore.com>
6832 * gcc-interface/Makefile.in: Ensure FORCE_DEBUG_ADAFLAGS variables is
6833 propagated by gnatlib-sjlj and gnatlib-zcx targets.
6834 * gcc-interface/Make-lang.in: Update dependencies.
6836 2012-02-17 Thomas Quinot <quinot@adacore.com>
6838 * sem_ch12.adb (Analyze_Package_Instantiation): For an
6839 instantiation in an RCI library unit, omit the instance body
6840 if the RCI library unit is the instance itself (E.2.3(18)),
6841 but include the body if the instantiation is within the RCI
6842 declaration (12.3(12)).
6844 2012-02-17 Steve Baird <baird@adacore.com>
6846 * sem_prag.adb (Analyze_PPC_In_Decl_Part): Pre'Class and
6847 Post'Class aspects can only be specified for a primitive operation
6850 2012-02-17 Yannick Moy <moy@adacore.com>
6852 * gnat_rm.texi: Minor shuffling.
6854 2012-02-17 Ed Schonberg <schonberg@adacore.com>
6856 * aspects.adb: Expression functions can carry pre/postconditions.
6857 * par-ch6.adb (P_Subprogram): look for optional pre/postconditions
6858 in an expression function.
6859 * sem_prag (Check_Precondition_Postcondition): legal on expression
6862 2012-02-17 Vincent Pucci <pucci@adacore.com>
6864 * a-cdlili.adb, a-cidlli.adb, a-cihama.adb, a-cimutr.adb,
6865 * a-ciorma.adb, a-cohama.adb, a-coinve.adb, a-comutr.adb,
6866 * a-convec.adb, a-coorma.adb (Adjust): New routine.
6867 (Constant_Reference): Increment Busy and Lock counters.
6868 (Reference): Increase Busy and Lock counters.
6869 (Finalize): New routine.
6870 * a-cihase.adb, a-ciorse.adb, a-cohase.adb, a-coorse.adb:
6871 (Adjust): New routine. (Constant_Reference): Increment Busy
6873 (Finalize): New routine.
6874 * a-cdlili.ads, a-cidlli.ads, a-cihama.ads, a-cihase.ads,
6875 * a-cimutr.ads, a-ciorma.ads, a-ciorse.ads, a-cohama.ads,
6876 * a-cohase.ads, a-coinve.ads, a-comutr.ads, a-convec.ads,
6877 * a-coorma.ads, a-coorse: Controlled component added to the
6880 2012-02-17 Robert Dewar <dewar@adacore.com>
6882 * restrict.adb (Check_Restriction): Add special handling for
6883 No_Obsolescent_Features.
6885 2012-02-17 Hristian Kirtchev <kirtchev@adacore.com>
6887 * exp_util.adb (Find_Finalize_Address): When dealing with an
6888 internally built full view for a type with unknown discriminants,
6889 use the original record type.
6891 2012-02-17 Robert Dewar <dewar@adacore.com>
6893 * sem_dim.adb: Minor reformatting.
6895 2012-02-17 Yannick Moy <moy@adacore.com>
6897 * gnat_rm.texi: Minor rewording.
6899 2012-02-17 Thomas Quinot <quinot@adacore.com>
6901 * sem_aggr.adb: Minor reformatting.
6903 2012-02-17 Robert Dewar <dewar@adacore.com>
6905 * gnat_ugn.texi: Update doc for -gnatw.m to include 2*x case.
6907 2012-02-17 Vincent Pucci <pucci@adacore.com>
6909 * sem_dim.adb (Is_Dim_IO_Package_Entity): New routine.
6910 (Is_Dim_IO_Package_Instantiation): Is_Dim_IO_Package_Entity
6912 (Is_Procedure_Put_Call): Is_Dim_IO_Package_Entity
6914 * s-dim.ads: Make package Pure.
6916 2012-02-17 Gary Dismukes <dismukes@adacore.com>
6918 * prj-nmsc.adb: Minor reformatting.
6920 2012-02-17 Yannick Moy <moy@adacore.com>
6922 * gnat_rm.texi: Update GNAT RM with a separate chapter on restrictions.
6924 2012-02-17 Yannick Moy <moy@adacore.com>
6926 * gnat_ugn.texi: Fix typos.
6928 2012-02-17 Pascal Obry <obry@adacore.com>
6930 * prj-nmsc.adb: prj-nmsc.adb (Check_Aggregated): Check that an
6931 aggregate is not Externally_Built.
6933 2012-02-17 Ed Schonberg <schonberg@adacore.com>
6935 * sem_aggr.adb (Resolve_Record_Aggregate): If a composite
6936 component has a box association, copy the default value using
6937 the current scope as the scope of internal types, to prevent
6938 scoping anomalies in gigi.
6940 2012-02-17 Robert Dewar <dewar@adacore.com>
6942 * sem_dim.adb, sem_dim.ads, s-tasren.adb, prj.adb, prj.ads, freeze.adb,
6943 sem_res.adb, exp_ch4.adb, sinput.adb, sinput.ads, exp_aggr.adb,
6944 exp_intr.adb, s-os_lib.adb: Minor reformatting.
6946 2012-02-17 Ed Schonberg <schonberg@adacore.com>
6948 * sem_ch6.adb (Is_Non_Overriding_Operation): Add warning if the
6949 old operation is abstract, the relevant type is not abstract,
6950 and the new subprogram fails to override.
6952 2012-02-15 Eric Botcazou <ebotcazou@adacore.com>
6954 * gcc-interface/trans.c (Identifier_to_gnu): Move block retrieving the
6955 type of the result to the end and execute it for a deferred constant of
6956 a discriminated type whose full view can be elaborated statically.
6958 2012-02-15 Eric Botcazou <ebotcazou@adacore.com>
6960 * gcc-interface/trans.c (gnat_to_gnu) <N_Qualified_Expression>: If the
6961 type is tagged, mark it as used for debugging purposes.
6962 <N_Allocator>: Likewise for a qualified expression.
6964 2012-02-15 Eric Botcazou <ebotcazou@adacore.com>
6966 * gcc-interface/trans.c (call_to_gnu): Create the temporary for the
6967 return value in the by-reference return type case if this isn't the
6968 expression of an object declaration. Tidy up.
6970 2012-02-09 Tristan Gingold <gingold@adacore.com>
6972 * gcc-interface/Makefile.in: Remove .sym rule (not used).
6973 Remove adamsg.o object (requires native message compiler).
6974 * init.c (CMA$_EXIT_THREAD, MTH$_FLOOVEMAT, SS$_INTDIV): Define as a
6975 macro instead of as extern int.
6976 (ADA$_ALREADY_OPEN, ADA$_CONSTRAINT_ERRO, ADA$_DATA_ERROR)
6977 (ADA$_DEVICE_ERROR, ADA$_END_ERROR, ADA$_FAC_MODE_MISMAT)
6978 (ADA$_IOSYSFAILED, ADA$_KEYSIZERR, ADA$_KEY_MISMATCH)
6979 (ADA$_LAYOUT_ERROR, ADA$_LINEXCMRS, ADA$_MAXLINEXC)
6980 (ADA$_MODE_ERROR, ADA$_MRN_MISMATCH, ADA$_MRS_MISMATCH)
6981 (ADA$_NAME_ERROR, ADA$_NOT_OPEN, ADA$_ORG_MISMATCH)
6982 (ADA$_PROGRAM_ERROR, ADA$_RAT_MISMATCH, ADA$_RFM_MISMATCH)
6983 (ADA$_STAOVF, ADA$_STATUS_ERROR, ADA$_STORAGE_ERROR)
6984 (ADA$_UNSUPPORTED, ADA$_USE_ERROR): Likewise.
6985 (struct cond_except): Field cond is now an unsigned int.
6986 (dec_ada_cond_except_table): Adjust.
6987 (cond_except_table): Likewise.
6988 (cond_resignal_table): Likewise.
6989 (__gnat_default_resignal_p): Fix style.
6991 2012-02-08 Vincent Celier <celier@adacore.com>
6993 * gcc-interface/Make-lang.in: Add g-byorma.o to gnatbind objects
6994 (g-buorma is now imported by sinput).
6995 Update dependencies.
6996 * scn.adb (Initialize_Scanner): Call Check_For_BOM
6997 * sinput-p.adb (Source_File_Is_Subunit): Call Check_For_BOM
6998 * sinput.adb: New procedure Check_For_BOM
6999 * sinput.ads: New procedure Check_For_BOM
7001 2012-02-08 Vincent Pucci <pucci@adacore.com>
7003 * impunit.adb: Dimension package names updated
7004 * Makefile.rtl: s-dim added
7005 * sem_dim.adb (Is_Procedure_Put_Call): minor changes
7006 (Is_Dim_IO_Package_Instantiation): minor changes
7007 * sem_dim.ads: minor changes in comments
7008 * snames.ads-tmpl: Name_Dim added Name_Dim_Float_IO and
7009 Name_Dim_Integer_IO removed
7010 * s-dim.ads: New package. Define the dimension terminology.
7011 * s-diflio.adb, s-diinio.adb, s-dimkio.ads, s-dimmks.ads,
7012 * s-dmotpr.ads: Package names updated.
7013 * s-diflio.ads, s-diinio.ads: Documentation added and package
7016 2012-02-08 Gary Dismukes <dismukes@adacore.com>
7018 * gcc-interface/utils2.c (build_call_alloc_dealloc_proc): Revise test
7019 for storage pools to test for an underlying record type rather than
7020 testing Is_Tagged_Type, so that simple storage pools will be handled
7021 the same as normal Ada storage pools.
7023 2012-02-08 Yannick Moy <moy@adacore.com>
7025 * gnat_rm.texi: Minor reshuffling to place restriction at
7028 2012-02-08 Bob Duff <duff@adacore.com>
7030 * warnsw.adb (Set_Warning_Switch): Set Warn_On_Suspicious_Modulus_Value
7031 False for '-gnatwA', to suppress these warnings.
7033 2012-02-08 Vincent Celier <celier@adacore.com>
7035 * sinput-p.adb (Source_File_Is_Subunit): Check for BOM before
7036 starting to scan, so that UTF8 encoding is taken into account.
7038 2012-02-08 Arnaud Charlet <charlet@adacore.com>
7040 * s-tasren.adb, s-tasren.ads (Internal_Complete_Rendezvous): New
7042 (Complete_Rendezvous): Now call Internal_Complete_Rendezvous.
7043 (Exceptional_Complete_Rendezvous): Mark No_Return.
7045 2012-02-08 Eric Botcazou <ebotcazou@adacore.com>
7047 * exp_aggr.adb (Compile_Time_Known_Composite_Value):
7048 New predicate to compute whether a composite value can be
7049 evaluated at compile time.
7050 (Component_Not_OK_For_Backend): Use Compile_Time_Known_Value for all
7051 expressions of elementary type and Compile_Time_Known_Composite_Value
7052 for all other expressions.
7053 (Expand_Record_Aggregate): Convert to assignments in the case
7054 of a type with mutable components if the aggregate cannot be
7057 2012-02-08 Gary Dismukes <dismukes@adacore.com>
7059 * aspects.ads (type Aspect_Id): Add Simple_Storage_Pool_Type.
7060 (Impl_Defined_Aspects): Add association for
7061 Aspect_Simple_Storage_Pool_Type.
7063 association for Aspect_Simple_Storage_Pool_Type.
7065 (Canonical_Aspect): Add association for Simple_Storage_Pool_Type.
7066 * exp_attr.adb (Expand_N_Attribute_Reference):
7067 Change name to Name_Simple_Storage_Pool_Type.
7068 * exp_ch4.adb (Expand_N_Allocator): Change
7069 name to Name_Simple_Storage_Pool_Type.
7070 * exp_intr.adb (Expand_Unc_Deallocation): Change name to
7071 Name_Simple_Storage_Pool_Type. * freeze.adb (Freeze_Entity):
7072 Change names to Name_Simple_Storage_Pool_Type. * par-prag.adb:
7073 Change names to Name_Simple_Storage_Pool_Type. * sem_attr.adb:
7074 (Analyze_Attribute): Change name to Name_Simple_Storage_Pool_Type.
7075 * sem_ch13.adb (Analyze_Attribute_Definition_Clause):
7076 Change name to Name_Simple_Storage_Pool_Type.
7078 (Analyze_Pragma): Change name to Name_Simple_Storage_Pool_Type.
7079 (Sig_Flags): Change name to Name_Simple_Storage_Pool_Type.
7080 * sem_res.adb (Resolve_Allocator): Change name to
7081 Name_Simple_Storage_Pool_Type. * snames.ads-tmpl:
7082 (Name_Simple_Storage_Pool_Type): New name constant.
7083 (type Pragma_Id): Change name to Name_Simple_Storage_Pool_Type and
7084 move to main pragma section because it no longer matches the
7086 * snames.adb-tmpl (Get_Pragma_Id): Remove test for
7087 Name_Simple_Storage_Pool.
7088 (Is_Pragma_Name): Remove test for Name_Simple_Storage_Pool.
7090 2012-02-08 Robert Dewar <dewar@adacore.com>
7092 * gnat_ugn.texi: Add some clarification to -gnatwA and -gnatws.
7094 2012-02-08 Pascal Obry <obry@adacore.com>
7096 * prj.adb (Compute_All_Imported_Projects): Use new
7097 For_Project_And_Aggregated_Context to ensure proper context is
7098 used for encapsulated aggregate libraries.
7099 * prj-proc.adb (Recursive_Process): Call
7100 Process_Aggregated_Projects earlier to ensure that all dependent
7101 projects are set with the proper encapsulated status.
7103 2012-02-08 Pascal Obry <obry@adacore.com>
7105 * s-os_lib.adb (Normalize_Arguments): Properly escape last \ in null
7108 2012-02-08 Pascal Obry <obry@adacore.com>
7110 * prj.ads, prj.adb (For_Project_And_Aggregated_Context): New
7111 generic routine with a context parameter.
7113 2012-02-08 Robert Dewar <dewar@adacore.com>
7115 * a-coinve.adb, sem_util.adb, sem_ch8.adb, a-cobove.adb,
7116 a-convec.adb: Minor reformatting and code reorganization.
7118 2012-02-08 Steve Baird <baird@adacore.com>
7120 * sem_cat.adb (In_Preelaborated_Unit): A child
7121 unit instantiation does not inherit preelaboration requirements
7124 2012-02-08 Gary Dismukes <dismukes@adacore.com>
7126 * aspects.ads (type Aspect_Id): Add Aspect_Simple_Storage_Pool.
7127 (Impl_Defined_Aspects): Add entry for Aspect_Simple_Storage_Pool.
7128 (Aspect_Argument): Add Name entry for Aspect_Simple_Storage_Pool.
7129 (Aspect_Names): Add entry for Aspect_Simple_Storage_Pool.
7130 * aspects.adb (Canonical_Aspect): Add entry for
7131 Aspect_Simple_Storage_Pool.
7132 * exp_attr.adb (Expand_N_Attribute_Reference): Handle case of
7133 Attribute_Simple_Storage_Pool in the same way as Storage_Pool
7134 (add conversion, analyze/resolve). For the Storage_Size attribute,
7135 for the simple pool case, locate and use the simple pool type's
7136 Storage_Size function (if any), otherwise evaluate to zero.
7137 * exp_ch4.adb (Expand_N_Allocator): In the case of an allocator
7138 for an access type with an associated simple storage pool,
7139 locate and use the pool type's Allocate.
7140 * exp_intr.adb (Expand_Unc_Deallocation): In the case where the
7141 access type has a simple storage pool, locate the pool type's
7142 Deallocate procedure (if present) and use it as the procedure
7143 to call on the Free operation.
7144 * freeze.adb (Freeze_Entity): In the case of a full type for
7145 a private type defined with pragma Simple_Storage_Pool, check
7146 that the full type is also appropriate for the pragma. For
7147 a simple storage pool type, validate that the operations
7148 Allocate, Deallocate (if present), and Storage_Size
7149 (if present) are defined with appropriate expected profiles.
7150 (Validate_Simple_Pool_Op_Formal): New procedure
7151 (Validate_Simple_Pool_Operation): New procedure Add with and
7153 * par-prag.adb: Add Pragma_Simple_Storage_Pool to case statement
7154 (no action required).
7155 * sem_attr.adb (Analyze_Attribute): For the case of the
7156 Storage_Pool attribute, give a warning if the prefix type has an
7157 associated simple storage pool, and rewrite the attribute as a
7158 raise of Program_Error. In the case of the Simple_Storage_Pool
7159 attribute, check that the prefix type has an associated simple
7160 storage pool, and set the attribute type to the pool's type.
7161 * sem_ch13.adb (Analyze_Aspect_Specifications): Add
7162 Aspect_Simple_Storage_Pool case choice.
7163 (Analyze_Attribute_Definition_Clause): Add
7164 Aspect_Simple_Storage_Pool to case for Ignore_Rep_Clauses
7165 (no action). Add handling for Simple_Storage_Pool attribute
7166 definition, requiring the name to denote a simple storage pool
7168 (Check_Aspect_At_Freeze_Point): For a simple storage pool
7169 aspect, set the type to that of the name specified for the aspect.
7170 * sem_prag.adb (Analyze_Pragma): Add handling for pragma
7171 Simple_Storage_Pool, requiring that it applies to a library-level
7172 type declared in a package declaration that is a limited private
7173 or limited record type.
7174 * sem_res.adb (Resolve_Allocator): Flag an attempt to call a
7175 build-in-place function in an allocator for an access type with
7176 a simple storage pool as unsupported.
7177 * snames.ads-tmpl: Add Name_Simple_Storage_Pool.
7178 (type Attribute_Id): Add Attribute_Simple_Storage_Pool.
7179 (type Pragma_Id): Add Pragma_Simple_Storage_Pool.
7180 * snames.adb-tmpl (Get_Pragma_Id): Handle case of
7181 Name_Simple_Storage_Pool.
7182 (Is_Pragma_Name): Return True for Name_Simple_Storage_Pool.
7184 2012-02-08 Cyrille Comar <comar@adacore.com>
7186 * projects.texi: Clarify doc for interfaces.
7188 2012-02-07 Eric Botcazou <ebotcazou@adacore.com>
7190 * gcc-interface/Make-lang.in (GCC_LINKERFLAGS): New variable.
7193 2012-02-01 Tristan Gingold <gingold@adacore.com>
7195 * gcc-interface/trans.c (Loop_Statement_to_gnu): Use sizetype
7196 instead of size_type_node.
7198 2012-01-30 Nicolas Roche <roche@adacore.com>
7200 * gcc-interface/Make-lang.in: Update dependencies.
7201 * gcc-interface/Makefile.in: Use system-vxworks-system-ppc-mils.ads
7203 Remove Linker_Options -crtbe when building sjlj run-time.
7205 2012-01-30 Robert Dewar <dewar@adacore.com>
7207 * sem.adb (Analyze): Call Analyze_Mod for N_Op_Mod mode.
7208 * sem_ch3.adb (Modular_Type_Declaration): Warn on mod value of
7209 form 2 * small-literal.
7210 * sem_ch4.adb (Analyze_Mod): New procedure (warn on suspicious
7212 * sem_ch4.ads (Analyze_Mod): New procedure.
7214 2012-01-30 Ed Schonberg <schonberg@adacore.com>
7216 * sem_ch6.adb: sem_ch6.adb (Analyze_Expression_Function): Copy
7217 types and return expression when building spec for implicit
7218 body, to preserve global references that may be present in an
7221 2012-01-30 Matthew Heaney <heaney@adacore.com>
7223 * a-convec.adb, a-coinve.adb, a-cobove.adb (Sort,
7224 Reverse_Elements): Check for cursor tampering.
7226 2012-01-30 Ed Schonberg <schonberg@adacore.com>
7228 * sem_util.adb (Is_Fully_Initialized_Type): In Ada 2012, a
7229 type with aspect Default_Value or Default_Component_Value is
7230 fully initialized, and use of variables of such types do not
7233 2012-01-30 Javier Miranda <miranda@adacore.com>
7236 * sem_ch8.adb (Analyze_Subprogram_Renaming):
7237 Handle self-renaming when the renamed entity is referenced using
7240 2012-01-30 Vincent Celier <celier@adacore.com>
7242 * projects.texi: Add documentation for attribute Interfaces.
7244 2012-01-30 Hristian Kirtchev <kirtchev@adacore.com>
7246 * exp_ch7.adb (Build_Finalizer_Call): Set loc again.
7247 * exp_ch11.adb (Expand_At_End_Handler): Do not provide a source
7248 location for the wrapped call to the original AT_END routine
7249 and the subsequent return statement.
7251 2012-01-30 Pascal Obry <obry@adacore.com>
7253 * s-rannum.adb: Minor reformatting.
7255 2012-01-30 Hristian Kirtchev <kirtchev@adacore.com>
7257 * a-calend-vms.adb, a-calend.adb: Increment the number of leap seconds
7258 to 25 and add the hard time value for 2012-06-30.
7260 2012-01-30 Robert Dewar <dewar@adacore.com>
7262 * a-strhas.ads, einfo.adb, einfo.ads, exp_ch7.adb, exp_ch9.adb,
7263 freeze.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-proc.adb, s-llflex.ads,
7264 s-ransee.adb, s-ransee.ads, sem_ch13.adb, sem_dim.adb, sem_prag.adb:
7265 Minor reformatting/code reorganization.
7267 2012-01-30 Thomas Quinot <quinot@adacore.com>
7269 * s-rannum.adb, s-ransee.adb, s-ransee.ads (Get_Seed): Return
7270 Unsigned_64 rather than Duration.
7271 (System.Random_Numbers.Reset): Use full value of seed
7272 (do not truncate sub-second bits).
7274 2012-01-30 Thomas Quinot <quinot@adacore.com>
7276 * sem_cat.adb, sem_ch12.adb: Minor reformatting.
7278 2012-01-30 Yannick Moy <moy@adacore.com>
7280 * gnat_ugn.texi: Minor correction of GNAT UG, to take into
7281 account changes to -gnatwa and more recent warnings.
7283 2012-01-30 Hristian Kirtchev <kirtchev@adacore.com>
7285 * exp_ch7.adb (Build_Finalizer_Call): Do not provide a source
7286 location when creating a call to a finalizer.
7287 * exp_ch11.adb (Expand_Exception_Handlers): Do not provide
7288 a source location for the first actual of Save_Occurrence for
7291 2012-01-30 Ed Schonberg <schonberg@adacore.com>
7293 * einfo.ads, einfo,adb: New attribute on scalar types:
7294 Default_Aspect_Value New attribute on array types:
7295 Default_Aspect_Component_Value Move attribute Related_Array_Object
7296 to a different position to accomodate new aspect attributes.
7297 * freeze.adb (Freeze_Entity): Use new attributes to retrieve value
7298 of defaults set with an aspect specification, rather than using
7299 the list of aspects attached to the type, to prevent issues with
7301 * sem_ch13.adb (Analyze_Aspect_Specifications): For aspects
7302 Default_Value and Default_Component _Value, store corresponding
7303 expression in type entity.
7304 (Check_Aspect_At_End_Of_Declaration): If the default aspects
7305 are declared on the full view, use the full view to resolve the
7306 correseponding expression.
7307 * exp_ch3.adb (Init_Component): Use attribute
7308 Default_Aspect_Component_Value to perform default initialization,
7309 rather than relying on the rep item list for the type.
7310 (Get_Simple_Init_Val): Ditto.
7312 2012-01-30 Thomas Quinot <quinot@adacore.com>
7314 * a-strhas.ads: Document risk of collision attack.
7316 2012-01-30 Yannick Moy <moy@adacore.com>
7318 * gnat_ugn.texi: Minor update wrt warning switches.
7320 2012-01-30 Vincent Celier <celier@adacore.com>
7322 * prj-nmsc.adb (Check_Interfaces): Report an error when a
7323 unit from Library_Interface is not a unit of the project.
7325 2012-01-30 Vincent Pucci <pucci@adacore.com>
7327 * sem_prag.adb (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Parent
7328 links fixed inside PPC pragmas.
7329 * sem_ch12.adb: Move call to Make_Aspect_For_PPC_In_Gen_Sub_Decl.
7331 2012-01-30 Thomas Quinot <quinot@adacore.com>
7333 * s-ransee.ads: Minor reformatting.
7335 2012-01-30 Pascal Obry <obry@adacore.com>
7337 * prj.ads, prj.adb (For_Each_Source): Add support for skipping
7338 sources coming from an encapsulated library.
7340 2012-01-30 Ed Schonberg <schonberg@adacore.com>
7342 * sem_ch3.adb (Process-Full_View): fix typo.
7343 * sem_ch13.adb (Aalyze_Aspect_Specifications): if predicates
7344 appear on a private type and the full view is available, ensure
7345 existence of freeze node for full view.
7346 (Build_Predicate_Function): Attach predicate function to both
7347 views of a private type.
7349 2012-01-30 Vincent Celier <celier@adacore.com>
7351 * prj-nmsc.adb (Check_Interfaces): Compute the Lib_Interface_ALIs
7352 for the project if either attribute Library_Interface or
7353 Interfaces is declared.
7354 (Check_Stand_Alone_Library): Use Lib_Interface_ALIs computed in
7357 2012-01-30 Pascal Obry <obry@adacore.com>
7359 * prj-proc.adb (Recursive_Process): Set From_Encapsulated_Lib
7360 boolean value to true in the process list created by this routine.
7361 * prj.ads (Project_List_Element): New field From_Encapsulated_Lib.
7362 Continued work for KA06-021.
7363 * prj.adb (Compute_All_Imported_Projects): Set
7364 From_Encapsulated_Lib boolean flag.
7366 2012-01-30 Vincent Pucci <pucci@adacore.com>
7368 * sem_dim.adb (Expand_Put_Call_With_Dimension_Symbol): Minor
7370 * s-diflio.ads: Minor change.
7372 2012-01-30 Javier Miranda <miranda@adacore.com>
7374 * exp_ch9.adb (Build_Dispatching_Requeue): Add missing call
7375 to Get_Entry_Index. Required to generate code which provides
7376 the correct value of Entry_Index in the target entry.
7378 2012-01-30 Nicolas Roche <roche@adacore.com>
7380 * system-vxworks-ppc.ads: Add pragma Linker_Options -crtbe to
7381 fix issue with zcx on VxWorks5.
7383 2012-01-30 Pascal Obry <obry@adacore.com>
7385 * prj.ads, prj.adb (For_Every_Project_Imported): Remove
7387 (For_Every_Project_Imported_Context): New generic routine with
7388 a context parameter.
7389 * prj-nmsc.adb: Revert to use For_Every_Project_Imported Avoid
7390 distributed complexity.
7391 * prj-env.adb, prj-conf.adb, makeutl.adb, gnatcmd.adb: Ditto.
7393 2012-01-30 Thomas Quinot <quinot@adacore.com>
7395 * exp_aggr.adb (Expand_Record_Aggregate): After creating the
7396 _parent aggregate for an extension aggregate, check whether it
7397 requires delayed (top-down) expansion.
7399 2012-01-30 Vincent Pucci <pucci@adacore.com>
7401 * sem_dim.adb (Expand_Put_Call_With_Dimension_Symbol): Rewritten.
7402 * snames.ads-tmpl: Name_Item and Name_Symbols added.
7403 * s-diflio.adb, s-diflio.ads, s-diinio.adb, s-diinio.ads: Rename
7404 and change the position of parameter Symbols in every Put routine.
7405 * s-dimmks.ads: Convert long float type Mks_Type into long
7407 * s-llflex.ads: Modifications in comments.
7409 2012-01-30 Hristian Kirtchev <kirtchev@adacore.com>
7411 * sem_ch12.adb (Earlier): Do not use the
7412 top level source locations of the two input nodes.
7414 2012-01-30 Robert Dewar <dewar@adacore.com>
7416 * einfo.ads, sem_prag.adb, sem_attr.adb, aspects.ads,
7417 sem_cat.adb, sem_aggr.adb, exp_aggr.adb: Minor reformatting.
7419 2012-01-30 Robert Dewar <dewar@adacore.com>
7421 * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb: Minor reformatting.
7423 2012-01-30 Olivier Hainque <hainque@adacore.com>
7425 * sigtramp-ppcvxw.c (CFI_COMMON_REGS): Add rule for r1 back +
7428 2012-01-30 Thomas Quinot <quinot@adacore.com>
7430 * gnat_rm.texi, sem_dist.adb, sem_dist.ads, einfo.ads, sem_prag.adb,
7431 sem_ch12.adb, sem_attr.adb, aspects.adb, aspects.ads, par-prag.adb,
7432 sem_cat.adb, snames.ads-tmpl (Sem_Dist.Is_Valid_Remote_Object_Type):
7433 New subprogram (extracted from
7434 Sem_Cat.Validate_Remote_Access_Object_Type_Declaration).
7435 (Einfo.Is_Remote_Types): Now applies to generic types. Update
7436 documentation accordingly.
7437 (Sem_Ch12.Analyze_Associations): A RACW type is acceptable as
7438 actual for a formal type to which a pragma Remote_Access_Type
7440 (Aspects, Par.Prag, Sem_Prag): Support for new pramga/aspect
7442 (Sem_Attr.Analyze_Attribute, case Stub_Type): Attribute can
7443 be applied to a generic type if pragma Remote_Access_Type
7444 applies, in which case the type of the attribute is
7445 System.Partition_Interface.RACW_Stub_Type.
7447 2012-01-27 Eric Botcazou <ebotcazou@adacore.com>
7449 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Do not set
7450 an alignment on fields of the RETURN type built for the CICO mechanism.
7452 2012-01-27 Eric Botcazou <ebotcazou@adacore.com>
7454 * gcc-interface/trans.c (gnat_to_gnu): Avoid making a SAVE_EXPR for
7455 a call to a function that returns an unconstrained type with default
7456 discriminant. Similarly, avoid doing the conversion to the nominal
7457 result type in this case.
7459 2012-01-27 Eric Botcazou <ebotcazou@adacore.com>
7461 * gcc-interface/ada-tree.h (DECL_ALIASED_P): New flag.
7462 * gcc-interface/decl.c (is_variable_size): Rename to...
7463 (type_has_variable_size): ...this.
7464 (adjust_packed): Adjust to above renaming.
7465 (gnat_to_gnu_field): Set DECL_ALIASED_P on the field.
7466 (field_is_artificial): New predicate.
7467 (field_is_aliased): Likewise.
7468 (field_has_self_size): Likewise.
7469 (field_has_variable_size): Likewise.
7470 (components_to_record): Record information for the final layout during
7471 the first pass on fields.
7472 If there is an aliased field placed after a field whose length depends
7473 on discriminants, put all the fields of the latter sort, last.
7475 2012-01-27 Eric Botcazou <ebotcazou@adacore.com>
7477 * gcc-interface/gigi.h (get_minimal_subprog_decl): Declare.
7478 * gcc-interface/decl.c (get_minimal_subprog_decl): New function.
7479 * gcc-interface/trans.c (Attribute_to_gnu): Use it for the prefix of an
7480 Access-like attribute in a dispatch table if the subprogram is public.
7482 2012-01-27 Eric Botcazou <ebotcazou@adacore.com>
7484 * gcc-interface/gigi.h (create_label_decl): Adjust.
7485 * gcc-interface/utils.c (create_label_decl): Add GNAT_NODE parameter
7486 and invoke gnat_pushdecl on it. Remove obsolete settings.
7487 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Label>: Adjust call to
7489 * gcc-interface/trans.c (gnat_to_gnu) <N_Null): Likewise. Ignore the
7490 label for debugging purposes.
7492 2012-01-27 Eric Botcazou <ebotcazou@adacore.com>
7494 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: For an aliased
7495 object with an unconstrained nominal subtype and if optimization isn't
7496 enabled, create a special VAR_DECL for debugging purposes.
7498 2012-01-23 Robert Dewar <dewar@adacore.com>
7500 * sem_prag.ads, sem_prag.adb: Minor reformatting.
7502 2012-01-23 Robert Dewar <dewar@adacore.com>
7504 * sem_ch13.adb (Analyze_Aspect_Specifications): Check for
7505 language defined aspect applied to renaming or formal type
7506 declaration (not permitted)
7508 2012-01-23 Matthew Heaney <heaney@adacore.com>
7510 * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb (Vet): Replaced
7511 comment with pragma Assert.
7513 2012-01-23 Vincent Pucci <pucci@adacore.com>
7515 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Call
7516 to Make_Aspect_For_PPC_In_Gen_Sub_Decl added in ASIS mode.
7517 * sem_prag.adb, sem_prag.ads (Make_Aspect_For_PPC_In_Gen_Sub_Decl): New
7518 routine. In ASIS mode, convert any PPC pragmas into aspects in generic
7519 subprogram declaration in order to enable the analysis of PPC boolean
7522 2012-01-23 Robert Dewar <dewar@adacore.com>
7524 * sem_ch3.adb (Analyze_Object_Declaration): Properly
7525 handle Current_Value for volatile variables (also propagate
7526 Treat_As_Volatile from type to object).
7528 2012-01-23 Hristian Kirtchev <kirtchev@adacore.com>
7530 * sem_ch12.adb (Install_Body): Detect the case
7531 where the enclosing context is a package with a stub body that
7532 has already been replaced by the actual body. In such cases,
7533 the freeze node for the enclosing context must be inserted after
7536 2012-01-23 Ed Schonberg <schonberg@adacore.com>
7538 * sem_prag.adb (Analyze_Pragma, case Debug): Freeze the called
7539 subprogram before expanding the pragma into an if-statement with
7540 a block, to ensure that when the subprogram is null its body is
7541 properly generated before expansion.
7543 2012-01-23 Hristian Kirtchev <kirtchev@adacore.com>
7545 * sem_ch12.adb (Analyze_Associations): Alphabetize local variables and
7546 constants. Rename Actual_Types to Actuals_To_Freeze. Rename Next_Formal
7548 Freeze all eligible subprograms which appear as actuals in
7550 (Has_Fully_Defined_Profile): New routine.
7551 (Renames_Standard_Subprogram): New routine.
7552 (Earlier): Add local variable N. Comment update. Do not use source
7553 locations when trying to determine whether one node precedes another.
7555 2012-01-23 Gary Dismukes <dismukes@adacore.com>
7557 * exp_ch4.adb (Expand_Concatenate): In the case
7558 where the result of a concatentation can be null, set the to
7559 result have both the low and high bounds of the right operand (not
7560 just the high bound, as was the case prior to this fix). Also,
7561 fix the saved high bound setting (Last_Opnd_High_Bound) in the
7562 empty string literal case (should have been low bound minus one,
7563 rather than plus one).
7565 2012-01-23 Thomas Quinot <quinot@adacore.com>
7567 * scos.ads, put_scos.adb, get_scos.adb (Get_SCOs, Put_SCOs): Do not
7568 omit statement SCOs for disabled pragmas.
7570 2012-01-23 Matthew Heaney <heaney@adacore.com>
7572 * a-cohase.ads, a-cihase.ads, a-cbhase.ads, a-coorse.ads,
7573 a-ciorse.ads, a-cborse.ads, a-cohama.ads, a-cihama.ads, a-cbhama.ads,
7574 a-coorma.ads, a-ciorma.ads, a-cborma.ads, a-cdlili.ads, a-cidlli.ads,
7575 a-cbdlli.ads, a-convec.ads, a-coinve.ads, a-cobove.ads (Cursor'Read,
7576 Cursor'Write): Declare in private part.
7577 (Reference_Type'Read, Reference_Type'Write): Ditto.
7578 (Constant_Reference_Type'Read, Constant_Reference_Type'Write): Ditto.
7580 2012-01-23 Robert Dewar <dewar@adacore.com>
7582 * a-catizo.ads, a-calend.adb, a-calend.ads, par-ch13.adb: Minor
7585 2012-01-23 Ed Schonberg <schonberg@adacore.com>
7587 * sem_ch6.adb (Analyze_Subprogram_Declaration): Do not set the
7588 Corresponding_Body on a defaulted null formal subprogram.
7589 * sem_ch12.adb (Check_Formal_Package_Instance): No check needed
7590 on a defaulted formal subprogram that is a null procedure.
7592 2012-01-23 Hristian Kirtchev <kirtchev@adacore.com>
7594 * exp_ch9.adb: Update the comments involving pragma Implemented.
7595 * sem_ch3.adb (Check_Pragma_Implemented (Entity_Id)): Add local
7596 constant Subp_Alias and local variable Impl_Subp. Properly
7597 handle aliases of synchronized wrappers. Code cleanup.
7598 (Check_Pragma_Implemented (Entity_Id; Entity_Id)): Add
7599 Name_Optional as part of the condition.
7600 * sem_prag.adb (Analyze_Pragma): Add "Optional" as one of the
7601 valid choices of implementation kind.
7602 (Check_Arg_Is_One_Of): New routine.
7603 * snames.ads-tmlp: Add Name_Optional.
7605 2012-01-23 Ed Schonberg <schonberg@adacore.com>
7607 * par-ch13.adb: Better error recovery in illegal aspect
7610 2012-01-23 Hristian Kirtchev <kirtchev@adacore.com>
7612 * a-calend.adb: Add with clause for Interfaces.C. Add constant
7614 (Day_Of_Week): Call the internal UTC_Time_Offset.
7615 (Split): Call the internal UTC_Time_Offset.
7616 (Time_Of): Call the internal UTC_Time_Offset.
7617 (Time_Zone_Operations.UTC_Time_Offset): Call internal UTC_Time_Offset.
7618 (UTC_Time_Offset): New library-level routine.
7619 * a-calend.ads (UTC_Time_Offset): Remove parameter
7620 Is_Historic. Update related comment on usage.
7621 * a-catizo.adb (UTC_Time_Offset): Removed.
7622 (UTC_Time_Offset (Time)): Call Time_Zone_Operations.UTC_Time_Offset.
7623 * a-caltizo.ads (UTC_Time_Offset): Removed.
7624 (UTC_Time_Offset (Time)): Add back the default expression of parameter
7627 2012-01-23 Robert Dewar <dewar@adacore.com>
7629 * sprint.ads, sprint.adb (Sprint_Node_List): Add New_Lines parameter
7630 (pg,po,ps): Make sure each entry starts on new line.
7632 2012-01-23 Hristian Kirtchev <kirtchev@adacore.com>
7634 * a-calend.ads, a-calend.adb: Define types int and int_Pointer. Update
7635 the parameter profile of procedure localtime_tzoff and its associated
7637 (Day_Of_Week): Do not treat the input date as historical
7638 with respect to time zones.
7639 (Split): Do not treat the input
7640 date as historical with respect to time zones. (Time_Of): Do
7641 not treat the input constituents as forming a historical date
7642 with respect to time zones.
7643 (UTC_Time_Offset): Add new formal
7644 parameter Is_Historic. Add local variable Flag. Update the call
7646 * a-catizo.ads, a-catizo.adb (UTC_Time_Offset): New routine.
7647 (UTC_Time_Offset (Time)): Update the call to
7648 Time_Zone_Operations.UTC_Time_Offset.
7649 * sysdep.c (__gnat_localtime_tzoff): Update parameter
7650 profile. Split the processing of offsets on Windows into two - one
7651 part of historic time stamps and the other for the current time.
7653 2012-01-23 Robert Dewar <dewar@adacore.com>
7655 * a-calend.adb: Minor reformatting.
7657 2012-01-23 Ed Schonberg <schonberg@adacore.com>
7659 * exp_ch9.adb, sem_ch9.adb: Handle array of access to synchronized
7660 interface in requeue statement.
7662 2012-01-23 Cyrille Comar <comar@adacore.com>
7664 * projects.texi: Remove references to main units and replace
7665 with references to main programs to be coherent with the
7668 2012-01-23 Robert Dewar <dewar@adacore.com>
7670 * s-utf_32.adb: Minor reformatting.
7672 2012-01-23 Vincent Celier <celier@adacore.com>
7674 * snames.ads-tmpl: Minor comment addition Indicate that
7675 Name_Library_Encapsulated_Options is only used in gprbuild.
7677 2012-01-23 Robert Dewar <dewar@adacore.com>
7679 * sem_ch10.adb (Analyze_Subunit): Properly save/restore cunit
7682 2012-01-23 Ed Schonberg <schonberg@adacore.com>
7684 * snames.ads-tmpl: Add Name_Synchronization.
7685 * aspects.ads, aspects.adb: Add Aspect_Synchronization to
7686 enumeration type and related maps.
7687 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle Aspect
7688 Synchronization, build corresponding pragma Implemented.
7689 * sem_util.adb (Implementation_Kind): Handle both explicit and
7690 implicit pragma_argument association to retrieve the given
7691 synchronization mode.
7693 2012-01-23 Robert Dewar <dewar@adacore.com>
7695 * sem_ch10.adb, errout.adb: Minor reformatting.
7697 2012-01-23 Ed Schonberg <schonberg@adacore.com>
7699 * sem_res.adb (Resolve_Actuals): An actual in a call to an
7700 Ada 2012 Reference function does not lead to a dangerous order
7703 2012-01-23 Gary Dismukes <dismukes@adacore.com>
7705 * exp_util.adb (Is_Iterated_Container): Test
7706 Is_Entity_Name when searching for calls to the default iterator,
7707 to avoid blowing up on indirect calls which have an explicit
7708 dereference as the call name.
7710 2012-01-23 Thomas Quinot <quinot@adacore.com>
7712 * errout.adb (Set_Msg_Node): For an N_Expanded_Name, output
7713 the complete expanded name, rather than just its Selector_Name.
7715 2012-01-23 Thomas Quinot <quinot@adacore.com>
7717 * a-textio.adb (Put): Rewrite one-parameter Character version to
7718 just call the two-parameter one with Current_Out.
7720 2012-01-23 Hristian Kirtchev <kirtchev@adacore.com>
7722 * freeze.adb (Check_Current_Instance): Issue an
7723 error when the prefix of 'Unchecked_Access or 'Access does not
7724 denote a legal aliased view of a type.
7725 (Freeze_Record_Type): Do not halt the processing of record components
7726 once the Has_Controlled_Component is set as this bypasses the remaining
7728 (Is_Aliased_View_Of_Type): New routine.
7730 2012-01-23 Thomas Quinot <quinot@adacore.com>
7732 * errout.ads, freeze.adb: Minor reformatting.
7734 2012-01-23 Thomas Quinot <quinot@adacore.com>
7736 * sem_ch10.adb, sem_prag.adb: Remove redundant apostrophes in error
7739 2012-01-23 Olivier Hainque <hainque@adacore.com>
7741 * adadecode.c (__gnat_decode): Deal with empty input early,
7742 preventing potential erroneous memory access later on.
7744 2012-01-21 Eric Botcazou <ebotcazou@adacore.com>
7747 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: In the case of a
7748 renaming, preserve the volatileness through the indirection, if any.
7750 2012-01-14 Andreas Schwab <schwab@linux-m68k.org>
7752 * gcc-interface/Makefile.in (OSCONS_EXTRACT): Add
7755 2012-01-10 Pascal Obry <obry@adacore.com>
7757 * prj-nmsc.adb (Check_Library_Attributes):
7758 Kill check for object/source directories for aggregate libraries.
7760 2012-01-10 Matthew Heaney <heaney@adacore.com>
7762 * a-cdlili.adb, a-cdlili.ads, a-cihama.adb, a-cihama.ads, a-coinve.adb,
7763 a-coinve.ads, a-ciorse.adb, a-ciorse.ads, a-coorma.adb, a-coorma.ads,
7764 a-cborma.adb, a-cborma.ads, a-cidlli.adb, a-cidlli.ads, a-cimutr.adb,
7765 a-cimutr.ads, a-cihase.adb, a-cihase.ads, a-cohama.adb, a-cohama.ads,
7766 a-coorse.adb, a-coorse.ads, a-cbhama.adb, a-cbhama.ads, a-cborse.adb,
7767 a-cborse.ads, a-comutr.adb, a-comutr.ads, a-ciorma.adb, a-cobove.adb,
7768 a-ciorma.ads, a-cobove.ads, a-convec.adb, a-convec.ads, a-cohase.adb,
7769 a-cohase.ads, a-cbdlli.adb, a-cbdlli.ads, a-cbmutr.adb, a-cbmutr.ads,
7770 a-cbhase.adb, a-cbhase.ads (Reference, Constant_Reference): Declare
7771 container parameter as aliased in/in out.
7774 2012-01-10 Bob Duff <duff@adacore.com>
7776 * s-os_lib.ads: Improve comment.
7778 2012-01-10 Geert Bosch <bosch@adacore.com>
7780 * s-gearop.adb (Forward_Eliminate): Avoid improper aliasing
7783 2012-01-10 Bob Duff <duff@adacore.com>
7785 * sem_intr.adb (Check_Shift): Use RM_Size instead of Esize, when
7786 checking that the 'Size is correct. If the type is "mod 2**12",
7787 for example, it's illegal, but Esize is the 'Object_Size, which
7788 will be something like 16 or 32, so the error ('Size = 12) was
7790 * gnat_rm.texi: Improve documentation of shift
7791 and rotate intrinsics.
7793 2012-01-10 Pascal Obry <obry@adacore.com>
7795 * prj.adb (For_Every_Project_Imported): Fix
7796 implementation to make sure we return each project only once
7797 for aggragte libraries. It is fine to return a project twice for
7798 aggregate projects, this was the case as a Project_Id is different
7799 in each project tree. The new implementation use a table based on
7800 the project name to ensure proper detection of duplicate project
7801 in aggregate library. A new context is then created to continue
7802 retrurning duplicate project for aggregate libraries.
7804 2012-01-09 Eric Botcazou <ebotcazou@adacore.com>
7806 * gcc-interface/trans.c (call_to_gnu): Create the temporary for the
7807 return value in the variable-sized return type case if the target is
7808 an array with fixed size. However, do not create it if this is the
7809 expression of an object declaration.
7811 2012-01-09 Eric Botcazou <ebotcazou@adacore.com>
7813 * gcc-interface/trans.c (addressable_p) <COMPONENT_REF>: Fix thinko.
7815 2012-01-06 Robert Dewar <dewar@adacore.com>
7817 * a-wichha.ads, a-wichun.ads, a-zchhan.ads, a-zchuni.ads,
7818 s-utf_32.ads: Add pragma Pure
7819 * s-utf_32.adb: Suppress warnings on non-static constants (now
7822 2012-01-06 Bob Duff <duff@adacore.com>
7824 * s-rpc.ads (Read, Write): Add overriding indicators.
7826 2012-01-06 Robert Dewar <dewar@adacore.com>
7828 * gnat_rm.texi: Add documentation for conventions
7829 Ada_Pass_By_Copy and Ada_Pass_By_Reference.
7831 2012-01-06 Gary Dismukes <dismukes@adacore.com>
7833 * a-tienio.adb (Put): Add exception message on
7834 raise statements. Remove unneeded blocks and object declarations.
7836 2012-01-06 Robert Dewar <dewar@adacore.com>
7838 * sem_prag.adb: Minor reformatting.
7840 2012-01-06 Ed Schonberg <schonberg@adacore.com>
7842 * sinfo.ads, sinfo.adb (Has_Prefixed_Call): New flag to indicate
7843 that a selected component within a generic unit has been resolved
7844 as a prefixed call with local references.
7845 * sem_ch3.adb (Is_Visible_Component): In an instance body a selected
7846 component is always visible.
7847 * sem_ch4.adb (Analyze_Selected_Component): If the node is a
7848 prefixed call in an instance, do not look for visible components
7850 * sem_ch12.adb (Reset_Entity): If a selected component has resolved
7851 to a prefixed call, mark the node accordingly when prefix and
7852 selector are local references.
7854 2012-01-02 Eric Botcazou <ebotcazou@adacore.com>
7856 * gnatvsn.ads (Current_Year): Bump to 2012.
7858 Copyright (C) 2012 Free Software Foundation, Inc.
7860 Copying and distribution of this file, with or without modification,
7861 are permitted in any medium without royalty provided the copyright
7862 notice and this notice are preserved.