1 2012-10-02 Ed Schonberg <schonberg@adacore.com>
3 * exp_ch4.adb (Expand_N_Case_Expression): Do not introduce
4 indirections when the type of the alternatives is an access type:
5 more efficient, and removes anomalies when an alternative is
8 2012-10-02 Robert Dewar <dewar@adacore.com>
10 * aspects.ads: Minor comment addition (Invariant is a GNAT aspect).
12 2012-10-02 Robert Dewar <dewar@adacore.com>
14 * exp_ch7.adb, sem_dim.adb, sem_dim.ads, prj-part.adb, checks.adb,
15 freeze.adb, sem_ch4.adb, sem_ch13.adb: Minor reformatting.
17 2012-10-02 Robert Dewar <dewar@adacore.com>
19 * sem_prag.adb (Analyze_Pragma, case Overflow_Checks): Fix
20 typo preventing proper processing of Overflow_Checks pragmas
23 2012-10-02 Robert Dewar <dewar@adacore.com>
25 * exp_ch4.adb (Expand_N_Op_Mod): Fix crash in ELIMINATED overflow
26 checks mode when bignum mode is used.
28 2012-10-02 Robert Dewar <dewar@adacore.com>
30 * stylesw.ads, gnat_ugn.texi: Document new style rule for NOT IN.
31 * par-ch4.adb (P_Relational_Operator): Add style check for NOT IN.
32 * style.ads, styleg.adb, styleg.ads (Check_Not_In): New procedure.
34 2012-10-02 Vincent Pucci <pucci@adacore.com>
36 * sem_attr.adb (Analyze_Attribute): Check dimension for attribute
37 Old before it gets expanded.
38 * sem_dim.adb (Analyze_Dimension_Has_Etype): Correctly propagate
39 dimensions for identifier.
41 2012-10-02 Ed Schonberg <schonberg@adacore.com>
43 * exp_ch5.adb (Expand_Iterator_Loop): Handle properly the case
44 where the iterator type is derived locally from an instantiation
45 of Ada.Iterators_Interface.
46 * exp_ch7.adb (Establish_Transient_Scope): Do not create a
47 transient scope if within the expansion of an iterator loop,
48 because a transient block already exists.
50 2012-10-02 Vincent Celier <celier@adacore.com>
52 * gnatcmd.adb: Use absolute path for configuration pragmas files
53 * make.adb (Configuration_Pragmas_Switch.Absolute_Path): Moved
55 * makeutl.ads, makeutl.adb (Absolute_Path): New function, moved from
58 2012-10-02 Vincent Celier <celier@adacore.com>
60 * prj-part.adb (Post_Parse_Context_Clause): Resurrect Boolean
61 parameter In_Limited. Check for circularity also if In_Limited
63 (Parse_Single_Project): Call Post_Parse_Context_Clause with
66 2012-10-02 Bob Duff <duff@adacore.com>
68 * checks.adb (Apply_Predicate_Check): Disable check in -gnatc mode.
70 2012-10-02 Vincent Pucci <pucci@adacore.com>
72 * sem_ch6.adb (Analyze_Function_Call): Dimension propagation
73 for function calls moved to Analyze_Dimension_Call.
74 * sem_dim.adb (Analyze_Dimension_Call): Properly propagate the
75 dimensions from the returned type for function calls.
77 2012-10-02 Vincent Celier <celier@adacore.com>
79 * gnatcmd.adb: Take into account any configuration pragma file
80 in the project files for gnat pretty/stub/metric.
82 2012-10-02 Ed Schonberg <schonberg@adacore.com>
84 * sem_ch13.adb (Check_Indexing_Functions): Refine several tests
85 on the legality of indexing aspects: Constant_Indexing functions
86 do not have to return a reference type, and given an indexing
87 aspect Func, not all overloadings of Func in the current scope
88 need to be indexing functions.
90 2012-10-02 Vasiliy Fofanov <fofanov@adacore.com>
92 * gnat_ugn.texi: Adjust docs for overflow checks to be VMS-friendly.
94 2012-10-02 Vincent Celier <celier@adacore.com>
96 * switch-m.adb (Normalize_Compiler_Switches): Recognize switches
97 -gnatox and -gnatoxx when x=0/1/2/3.
99 2012-10-02 Vincent Pucci <pucci@adacore.com>
101 * sem_ch4.adb (Analyze_Indexed_Component_Form): Dimension
102 analysis for indexed components added.
103 * sem_ch6.adb (Analyze_Function_Call): Dimension propagation
104 for function calls added.
105 * sem_dim.adb (Analyze_Dimension): Call to
106 Analyze_Dimension_Has_Etype when N is a function call.
107 (Analyze_Dimension_Call): Don't propagate anymore the dimensions
108 for function calls since this is now treated separately in
109 Analyze_Dimension_Has_Etype.
110 (Analyze_Dimension_Has_Etype): For
111 attribute references, propagate the dimensions from the prefix.
112 * sem_dim.ads (Copy_Dimensions): Fix comment.
114 2012-10-02 Hristian Kirtchev <kirtchev@adacore.com>
116 * checks.ads, checks.adb (Apply_Parameter_Aliasing_Checks): New routine.
117 (Apply_Parameter_Aliasing_And_Validity_Checks): This routine
118 has been split into two.
119 (Apply_Parameter_Validity_Checks): New routine.
120 * exp_ch6.adb (Expand_Call): Add checks to verify that actuals
121 do not overlap. The checks are made on the caller side to overcome
122 issues of parameter passing mechanisms.
123 * freeze.adb (Freeze_Entity): Update call to
124 Apply_Parameter_Aliasing_And_Validity_Checks.
126 2012-10-02 Ed Schonberg <schonberg@adacore.com>
128 * sem_ch4.adb (Is_Empty_Range): Use bounds of index type
129 to determine whether an array is empty when optimizing
130 a quantified expression over a null range. Use of RM_Size
131 was incorrect. Analyze condition before constant-folding the
132 expression to catch potential errors. Modify the error message
133 to avoid mathematical terminology.
135 2012-10-02 Robert Dewar <dewar@adacore.com>
137 * usage.adb, gnat_rm.texi, vms_data.ads: Add entry for
138 /OVERFLOW_CHECKS=?? generating -gnato?? for control
139 of extended overflow checking.
140 * ug_words: Add entry for -gnato?? for /OVERFLOW_CHECKS=??
141 * gnat_ugn.texi: Add documentation for -gnato?? for control of overflow
144 2012-10-02 Ed Schonberg <schonberg@adacore.com>
146 * sem_ch4.adb (Analyze_Quantified_Expression): If the iterator in
147 a quantified expression is statically known to be null (e.g. a
148 array with an empty index type) emit a warning.
150 2012-10-02 Robert Dewar <dewar@adacore.com>
152 * sem_dim.adb: Minor code reorganization.
153 * sem_dim.ads: Add comment.
155 2012-10-02 Robert Dewar <dewar@adacore.com>
157 * checks.ads, exp_ch4.adb, checks.adb
158 (Minimize_Eliminate_Overflow_Checks): Add Top_Level parameter to avoid
159 unnecessary conversions to Bignum.
162 2012-10-02 Ed Schonberg <schonberg@adacore.com>
164 * sem_ch6.adb (Process_PPCs): Generate invariant checks for a
165 return value whose type is an access type and whose designated
166 type has invariants. Ditto for in-out parameters and in-parameters
168 * exp_ch3.adb (Build_Component_Invariant_Call): Add invariant check
169 for an access component whose designated type has invariants.
171 2012-10-01 Vincent Pucci <pucci@adacore.com>
173 * sem_aggr.adb (New_Copy_Tree_And_Copy_Dimensions): New routine.
174 (Resolve_Record_Aggregate): New_Copy_Tree calls replaced by
175 New_Copy_Tree_And_Copy_Dimensions calls. Move_Dimensions call
176 replaced by Copy_Dimensions call.
177 * sem_dim.adb (Analyze_Dimension_Component_Declaration): Don't
178 remove the dimensions of expression in component declaration anymore.
179 (Copy_Dimensions): New routine.
180 (Move_Dimensions): Add call to Copy_Dimensions.
181 * sem_dim.ads (Copy_Dimensions): New routine.
182 (Move_Dimensions): Spec moved to body of Sem_Dim.
184 2012-10-01 Ed Schonberg <schonberg@adacore.com>
186 * checks.adb (Apply_Predicate_Check): If the predicate is a
187 static one and the operand is static, evaluate the predicate at
189 * sem_eval.ads, sem_eval.adb (Eval_Static_Predicate_Check): new
190 procedure, to evaluate a static predicate check whenever possible.
191 * sem_res.adb (Resolve_Type_Conversion): Apply predicate check
192 on the conversion if the target type has predicates.
194 2012-10-01 Vincent Pucci <pucci@adacore.com>
196 * sem_dim.adb (Has_Symbols): Complain if parameter Symbol has been
197 provided by the user in the dimension output call.
199 2012-10-01 Robert Dewar <dewar@adacore.com>
201 * checks.adb (Apply_Divide_Checks): New name for
202 Apply_Divide_Check (Minimize_Eliminate_Overflow_Checks):
203 Add code to handle division (and rem and mod) properly.
204 (Apply_Division_Check): New procedure (Apply_Divide_Checks):
205 Use Apply_Division_Check (Apply_Divide_Checks): Use
206 Apply_Arithmetic_Overflow_Minimized_Eliminated.
207 * checks.ads (Apply_Divide_Checks): New name for
208 Apply_Divide_Check, also add clearer documentation for this
209 routine and put in alfa order.
210 * exp_ch4.adb (Apply_Divide_Checks): New name for
212 * s-bignum.adb (To_Bignum): Handle largest negative integer
214 * sem.adb (Analyze): Handle overflow suppression correctly
215 (Analyze_List): Handle overflow suppression correctly
216 * sem_res.adb (Analyze_And_Resolve): Handle overflow suppression
219 2012-10-01 Vasiliy Fofanov <fofanov@adacore.com>
221 * s-oscons-tmplt.c, g-socket.ads: Revert previous change, breaks VMS.
223 2012-10-01 Robert Dewar <dewar@adacore.com>
225 * checks.adb (Minimize_Eliminate_Overflow_Checks): Changes
227 * exp_ch4.adb (Expand_N_Op_Expon): Changes for Minimize/Eliminate
229 * s-bignum.adb (Compare): Fix bad precondition.
231 2012-10-01 Ed Schonberg <schonberg@adacore.com>
233 * sem_ch3.adb (Build_Derived_Record_Type): If the derived
234 type has new discriminantss that constrain inherited ones, use
235 the discriminant type in the original declaration to check for
236 conformance, because in the presence of array components with a
237 smaller range that are constrained by the origina discriminant,
238 the compiler will have created a narrower subtype for that
241 2012-10-01 Robert Dewar <dewar@adacore.com>
243 * checks.adb (Apply_Arithmetic_Overflow_Minimized_Eliminated):
244 Handle case of appearing in range in membership test.
245 * exp_ch4.adb (Expand_Membership_Minimize_Eliminate_Overflow):
246 New procedure (Expand_N_In): Use
247 Expand_Membership_Minimize_Eliminate_Overflow.
248 * rtsfind.ads: Add RE_Bignum_In_LLI_Range.
249 * s-bignum.ads, s-bignum.adb (Bignum_In_LLI_Range): New function.
250 * sinfo.ads, sinfo.adb (No_Minimize_Eliminate): New flag.
252 2012-10-01 Robert Dewar <dewar@adacore.com>
254 * uintp.ads: Minor reformatting.
256 2012-10-01 Ed Schonberg <schonberg@adacore.com>
258 * checks.adb: Improve warning message.
260 2012-10-01 Robert Dewar <dewar@adacore.com>
262 * checks.adb: Minor reformatting.
264 2012-10-01 Javier Miranda <miranda@adacore.com>
266 * exp_ch3.adb (Expand_N_Object_Declaration): Suppress tag
267 assignment for initializations that are aggregates.
269 2012-10-01 Robert Dewar <dewar@adacore.com>
271 * exp_ch4.adb (Expand_Compare_Minimize_Eliminate_Overflow):
274 2012-10-01 Robert Dewar <dewar@adacore.com>
276 * checks.adb (Minimize_Eliminate_Checks): Changes from testing.
277 (Apply_Arithmetic_Overflow_Minimized_Eliminated): Changes
279 * sinfo.ads: Remove note on not setting Entity field in overflow
280 case since this is no longer true.
281 * Makefile.rtl: Add s-bignum.o
283 2012-10-01 Thomas Quinot <quinot@adacore.com>
285 * Make-generated.in: Correction to previous change for s-oscons
288 2012-10-01 Thomas Quinot <quinot@adacore.com>
290 * s-bignum.adb (Allocate_Bignum): Reorganize to kill strict
293 2012-10-01 Robert Dewar <dewar@adacore.com>
295 * checks.adb (Overflow_Check_Mode): New function
296 (Apply_Overflow_Check): New procedure (Is_Check_Suppressed):
297 Moved here from Sem, Overflow_Check case now specially treated.
298 * checks.ads (Overflow_Check_Mode): New function
299 (Is_Check_Suppressed): Moved here from Sem (more logical)
300 * exp_ch4.adb (Substitute_Valid_Check): Suppress warning about
301 optimization if we are in MINIMIZED or ELIMINATED overflow
302 checking mode and within an assertiom expression.
303 * rtsfind.ads: Add entries for Bignum stuff.
304 * s-bignum.ads, s-bignum.adb: New files.
305 * sem.ads, sem.adb (Is_Check_Suppressed): Moved to Checks, more logical.
306 * sem_prag.adb (Process_Suppress_Unsuppress): New behavior for
307 Unsuppress of Overflow_Check (sets Checked instead of Minimized)
308 * sem_res.adb: Update comments.
309 * sinfo.ads (N_Op): Add documentation on overflow handling.
310 * tbuild.ads, tbuild.adb (Convert_To_And_Rewrite): New procedure.
311 * types.ads (Minimized_Or_Eliminated): New subtype.
313 2012-10-01 Eric Botcazou <ebotcazou@adacore.com>
315 * layout.adb (Layout_Type): Do not set twice the address size
316 on an access-to-unconstrained array if Debug_Flag_6 is set.
318 2012-10-01 Hristian Kirtchev <kirtchev@adacore.com>
320 * sem_ch3.adb (Analyze_Declarations): Remove the specialized
321 code which prevents freezing when the declarative list contains
322 a _postconditions body. This is no longer needed because the
323 body is now inserted at the end of the declarations.
324 * sem_ch6.adb (Insert_After_Last_Declaration): New routine.
325 (Insert_Before_First_Source_Declaration): Removed.
326 (Process_PPCs): Insert the _postconditions body at the end of
327 the declarative list to prevent premature freezing of types that
328 appear in the declarations.
330 2012-10-01 Robert Dewar <dewar@adacore.com>
332 * sem_aggr.adb, sem_dim.adb: Minor reformatting.
334 2012-10-01 Ed Schonberg <schonberg@adacore.com>
336 * sem_prag.adb (Process_Convention, Process_Import_Or_Interface):
337 Adjust test so that when the pragma comes from an aspect
338 specification it only applies to the entity in the original
341 2012-10-01 Thomas Quinot <quinot@adacore.com>
343 * gnat_ugn.texi: Document new command line switch -fada-spec-parent.
345 2012-10-01 Thomas Quinot <quinot@adacore.com>
347 * s-oscons-tmplt.c, g-socket.ads: Minor code improvement: use gcc
348 builtin __alignof__ to get the alignment of struct fd_set.
350 2012-10-01 Vincent Pucci <pucci@adacore.com>
352 * exp_ch6.adb (Expand_Call): Remove call to
353 Remove_Dimension_In_Call.
354 * sem_aggr.adb (Resolve_Array_Aggregate): Analyze dimension of
355 components in array aggregate.
356 (Resolve_Aggr_Expr): Propagate dimensions from the original expression
357 Expr to the new created expression New_Expr when resolving the
358 expression of a component in record aggregates.
359 (Resolve_Record_Aggregate): Analyze
360 dimension of components in record (or extension) aggregate.
361 * sem_ch6.adb (Analyze_Subprogram_Specification): Analyze
362 dimension of formals with default expressions in subprogram
364 * sem_ch8.adb (Analyze_Expanded_Name): Analyze dimension of
366 (Find_Selected_Component): Analyze dimension of selected component.
367 * sem_dim.adb: Several dimension error messages reformatting.
368 (Dimensions_Msg_Of): New flag Description_Needed in order to
369 differentiate two different sort of dimension error messages.
370 (Dim_Warning_For_Numeric_Literal): New routine.
371 (Exists): New routine.
372 (Move_Dimensions): Routine spec moved to spec file.
373 * sem_dim.ads (String_From_Numeric_Literal): New routine.
374 (Analyze_Dimension): Analyze dimension only when the
375 node comes from source. Dimension analysis for expanded names added.
376 (Analyze_Dimension_Array_Aggregate): New routine.
377 (Analyze_Dimension_Call): New routine.
378 (Analyze_Dimension_Component_Declaration): Warning if default
379 expression is a numeric literal.
380 (Analyze_Dimension_Extension_Or_Record_Aggregate): New routine.
381 (Analyze_Dimension_Formals): New routine.
382 (Analyze_Dimension_Object_Declaration): Warning if default
383 expression is a numeric literal.
384 (Symbol_Of): Return either the dimension subtype symbol or the
385 dimension symbol built by From_Dim_To_Str_Of_Unit_Symbols.
386 * sem_dim.ads (Analyze_Dimension_Array_Aggregate): New routine.
387 (Analyze_Dimension_Call): New routine.
388 (Analyze_Dimension_Extension_Or_Record_Aggregate): New routine.
389 (Analyze_Dimension_Formals): New routine.
390 (Move_Dimensions): Moved from sem_dim.adb.
391 * s-dimmks.ads: Turn off the warnings for dimensioned object
392 declaration. Dimensioned subtypes sorted in alphabetical
393 order. New subtypes Area, Speed, Volume.
394 * s-dmotpr.ads: Turn off the warnings for dimensioned object
396 * sem_res.adb (Resolve_Call): Analyze dimension for calls.
398 2012-10-01 Thomas Quinot <quinot@adacore.com>
400 * Make-generated.in: Minor cleanup of all targets: use
401 MOVE_IF_CHANGE to put generated files in place, to avoid useless
404 2012-10-01 Javier Miranda <miranda@adacore.com>
406 * exp_disp.adb (Expand_Dispatching_Call): For functions returning
407 interface types add an implicit conversion to the returned object
408 to force the displacement of the pointer to the returned object
409 to reference the corresponding secondary dispatch table. This
410 is needed to handle well combined calls involving secondary
411 dispatch tables (for example Obj.Prim1.Prim2).
412 * exp_ch4.adb (Expand_Allocator_Expression): Declare internal
413 access type as access to constant or access to variable depending
414 on the context. Found working in this ticket.
416 2012-10-01 Ed Schonberg <schonberg@adacore.com>
418 * checks.adb (Apply_Predicate_Check): Do not apply check to
419 actual of predicate checking procedure, to prevent infinite
422 2012-10-01 Arnaud Charlet <charlet@adacore.com>
424 * gcc-interface/Make-lang.in: Update dependencies.
425 (GCC_LINK): Add -static-libstdc++.
427 2012-10-01 Arnaud Charlet <charlet@adacore.com>
429 * a-catizo.adb, a-stwiun.adb, a-cdlili.adb, a-cihama.adb, a-direct.adb,
430 a-coinve.adb, a-calend.adb, a-ciorse.adb, a-coorma.adb, a-cfdlli.adb,
431 a-stzunb-shared.adb, a-cfhase.adb, bindgen.adb, ceinfo.adb, a-tags.adb,
432 einfo.adb, checks.adb, eval_fat.adb, a-cborma.adb, a-stwifi.adb,
433 a-tifiio.adb, a-textio.adb, a-cidlli.adb, a-strunb-shared.adb,
434 a-cimutr.adb, a-calcon.adb, a-exexpr-gcc.adb, a-ciormu.adb,
435 a-stzunb.adb, a-stzsea.adb, a-ngelfu.adb, a-stzfix.adb,
436 a-cihase.adb, a-cohama.adb, a-exetim-posix.adb, a-dirval-vms.adb,
437 a-caldel-vms.adb, a-coorse.adb, errout.adb,
438 a-except.adb, butil.adb, a-dirval-mingw.adb, a-cforma.adb,
439 a-except-2005.adb, a-wtedit.adb, cstand.adb, a-stwiun-shared.adb,
440 a-cbhama.adb, a-direio.adb, clean.adb, a-cborse.adb, back_end.adb,
441 binde.adb, a-exexda.adb, a-comutr.adb, a-ciorma.adb, a-cobove.adb,
442 a-coormu.adb, a-teioed.adb, a-convec.adb, a-wtenau.adb, exp_aggr.adb,
443 a-ztedit.adb, a-cohase.adb, a-exetim-mingw.adb, bcheck.adb,
444 a-dynpri.adb, a-cfhama.adb, a-calfor.adb, a-cbdlli.adb,
445 a-crdlli.adb, a-cbmutr.adb, a-sequio.adb, a-ngcoar.adb, a-cforse.adb,
446 a-strunb.adb, a-calend-vms.adb, a-clrefi.adb, a-cofove.adb,
447 a-ztenau.adb, a-strfix.adb, a-cbhase.adb, a-stzsup.adb: Minor
450 2012-10-01 Vincent Pucci <pucci@adacore.com>
452 * s-gearop.adb (Vector_Matrix_Product): Dimensions check fixed. Index
453 of Left in S evaluation fixed.
455 2012-10-01 Javier Miranda <miranda@adacore.com>
457 * sem_ch3.adb (Analyze_Declarations): Avoid
458 premature freezing caused by the internally generated subprogram
460 * checks.adb (Expr_Known_Valid): Float literals are assumed to be valid
463 2012-10-01 Thomas Quinot <quinot@adacore.com>
465 * sinput.ads, sinput.adb, sinput-l.adb sinput-c.adb (Sinput): New
466 Instances table, tracking all generic instantiations. Source file
467 attribute Instance replaces previous Instantiation attribute with an
468 index into the Instances table.
469 (Iterate_On_Instances): New generic procedure.
470 (Create_Instantiation_Source): Record instantiations in Instances.
471 (Tree_Read, Tree_Write): Read/write the instance table.
472 * scils.ads, scos.adb (SCO_Instance_Table): New table, contains
473 information copied from Sinput.Instance_Table, but self-contained
474 within the SCO data structures.
475 * par_sco.ads, par_sco.adb (To_Source_Location): Move to library level.
476 (Record_Instance): New subprogram, used by...
477 (Populate_SCO_Instance_Table): New subprogram to fill
478 the SCO instance table from the Sinput one (called by SCO_Output).
479 * opt.ads (Generate_SCO_Instance_Table): New option.
480 * put_scos.adb (Write_Instance_Table): New subprogram, used by...
481 (Put_SCOs): Dump the instance table at the end of SCO information
483 * get_scos.adb (Get_SCOs): Read SCO_Instance_Table.
484 * types.h: Add declaration for Instance_Id.
485 * back_end.adb (Call_Back_End): Pass instance ids in source file
487 (Scan_Back_End_Switches): -fdebug-instances sets
488 Opt.Generate_SCO_Instance_Table.
489 * gcc-interface/gigi.h: File_Info_Type includes instance id.
490 * gcc-interface/trans.c: Under -fdebug-instances, set instance
491 id in line map from same in file info.
493 2012-10-01 Thomas Quinot <quinot@adacore.com>
495 * sem_elab.adb: Minor reformatting
496 (Check_Elab_Call): Minor fix to debugging code
497 (add special circuit for the valid case where a 'Access attribute
498 reference is passed to Check_Elab_Call).
500 2012-10-01 Thomas Quinot <quinot@adacore.com>
502 * exp_ch3.adb: Minor reformatting.
504 2012-10-01 Ed Schonberg <schonberg@adacore.com>
506 * exp_ch3.ads (Build_Array_Invariant_Proc): moved to body.
507 * exp_ch3.adb (Build_Array_Invariant_Proc,
508 Build_Record_Invariant_Proc): transform into functions.
509 (Insert_Component_Invariant_Checks): for composite types that have
510 components with specified invariants, build a checking procedure,
511 and make into the invariant procedure of the composite type,
512 or incorporate it into the user- defined invariant procedure if
513 one has been created.
514 * sem_ch3.adb (Array_Type_Declaration): Checking for invariants
515 on the component type is defered to the expander.
517 2012-10-01 Thomas Quinot <quinot@adacore.com>
519 * xsnamest.adb, namet.h, sem_ch10.adb, s-oscons-tmplt.c,
520 xoscons.adb: Minor reformatting.
522 2012-10-01 Hristian Kirtchev <kirtchev@adacore.com>
524 * checks.adb (Apply_Parameter_Aliasing_And_Validity_Checks):
525 Do not process subprogram renaminds because a) those cannot
526 have PPC pragmas b) the renamed entity already has the PPCs.
527 (Build_PPC_Pragma): Prepend a PPC pragma for consistency with
529 * sem_ch6.adb (Last_Implicit_Declaration): Removed.
530 (Process_PPCs): Insert a post condition body at the start of the
531 declarative region of the related subprogram. This way the body
532 will not freeze anything it shouldn't.
534 2012-10-01 Robert Dewar <dewar@adacore.com>
536 * freeze.adb, sem_ch6.adb, opt.ads, sem_ch13.adb,
537 exp_ch3.adb: Minor reformatting.
539 2012-10-01 Hristian Kirtchev <kirtchev@adacore.com>
541 * checks.adb (Build_PPC_Pragma): A PPC pragma can now be properly
542 associated with a subprogram body.
544 2012-10-01 Ed Schonberg <schonberg@adacore.com>
546 * aspects.ads: Type_Invariant'class is a valid aspect.
547 * sem_ch6.adb (Is_Public_Subprogram_For): with the exception of
548 initialization procedures, subprograms that do not come from
549 source are not public for the purpose of invariant checking.
550 * sem_ch13.adb (Build_Invariant_Procedure): Handle properly the
551 case of a non-private type in a package without a private part,
552 when the type inherits invariants from its ancestor.
554 2012-10-01 Ed Schonberg <schonberg@adacore.com>
556 * exp_ch3.adb (Build_Record_Invariant_Proc): new procedure to
557 generate a checking procedure for record types that may have
558 components whose types have type invariants declared.
560 2012-10-01 Vincent Pucci <pucci@adacore.com>
562 * system-solaris-sparcv9.ads, system-mingw.ads, system-vms_64.ads: Flag
563 Support_Atomic_Primitives set to True.
565 2012-10-01 Robert Dewar <dewar@adacore.com>
567 * impunit.adb: Ada.Locales is a language defined unit.
569 2012-10-01 Hristian Kirtchev <kirtchev@adacore.com>
571 * checks.adb (Apply_Parameter_Aliasing_Checks): Removed.
572 (Apply_Parameter_Aliasing_And_Validity_Checks): New routine.
573 (Apply_Parameter_Validity_Checks): Removed.
574 * checks.ads (Apply_Parameter_Aliasing_Checks): Removed.
575 (Apply_Parameter_Aliasing_And_Validity_Checks): New routine.
576 (Apply_Parameter_Validity_Checks): Removed.
577 * exp_ch6.adb (Expand_Call): Remove the generation of parameter
579 * freeze.adb: Remove with and use clauses for Validsw.
580 (Freeze_Entity): Update the guard and generation of aliasing
581 and scalar initialization checks for subprogram parameters.
582 * opt.ads: Add new flags Check_Aliasing_Of_Parameters and
583 Check_Validity_Of_Parameters along with comments on usage.
584 * sem_attr.adb (Analyze_Attribute): Pragma Overlaps_Storage is
585 no longer an Ada 2012 feature.
586 * sem_ch4.adb: Remove with and use clauses for Checks and Validsw.
587 (Analyze_Call): Remove the generation of aliasing checks for
588 subprogram parameters.
589 * sem_ch13.adb: Remove with and use clauses for Validsw.
590 (Analyze_Aspect_Specifications): Remove the generation of scalar
591 initialization checks.
592 * switch-c.adb (Scan_Front_End_Switches): Add processing for
594 * usage.adb (Usage): Add information on switches -gnateA and
595 -gnateV. Remove information on validity switches 'l', 'L',
597 * validsw.adb (Reset_Validity_Check_Options): Remove the
598 reset of flags Validity_Check_Non_Overlapping_Params
599 and Validity_Check_Valid_Scalars_On_Params.
600 (Save_Validity_Check_Options): Remove the processing
601 for flags Validity_Check_Non_Overlapping_Params
602 and Validity_Check_Valid_Scalars_On_Params.
603 (Set_Validity_Check_Options): Remove the processing
604 for flags Validity_Check_Non_Overlapping_Params and
605 Validity_Check_Valid_Scalars_On_Params.
606 * validsw.ads: Remove flags Validity_Check_Non_Overlapping_Params
607 and Validity_Check_Valid_Scalars_On_Params along with their
610 2012-10-01 Yannick Moy <moy@adacore.com>
612 * sem_ch13.adb (Add_Invariants): Analyze the invariant expression
613 as an assertion expression.
614 * sem_ch3.adb / sem_ch3.ads (Preanalyze_Assert_Expression):
615 New procedure that wraps a call to Preanalyze_Spec_Expression
616 for assertion expressions, so that In_Assertion_Expr can be
618 * sem_prag.adb (Analyze_PPC_In_Decl_Part
619 Check_Precondition_Postcondition Preanalyze_CTC_Args): Call the
620 new Preanalyze_Assert_Expression.
622 2012-10-01 Robert Dewar <dewar@adacore.com>
624 * checks.ads: Minor reformatting.
626 2012-10-01 Yannick Moy <moy@adacore.com>
628 * types.ads, sem_prag.adb, sem.ads: Correct minor typos in comments.
630 2012-10-01 Vincent Celier <celier@adacore.com>
632 * make.adb (Scan_Make_Arg): Only test for "vP" of the option
633 includes at least 3 characters.
634 * gnatcmd.adb (GNATCmd): Ditto.
636 2012-10-01 Eric Botcazou <ebotcazou@adacore.com>
638 * exp_ch7.adb, sinfo.ads: Add comments.
640 2012-10-01 Robert Dewar <dewar@adacore.com>
642 * checks.adb: Remove reference to Enable_Overflow_Checks Use
643 Suppress_Options rather than Scope_Suppress.
644 * gnat1drv.adb (Adjust_Global_Switches): Handle new overflow
645 settings (Adjust_Global_Switches): Initialize Scope_Suppress
646 from Suppress_Options.
647 * opt.adb: Remove Enable_Overflow_Checks (use Suppress_Options
649 * opt.ads: Remove Overflow_Checks_Unsuppressed (not used)
650 Remove Enable_Overflow_Checks (use Suppress_Options instead)
651 Suppress_Options is now current setting (replaces Scope_Suppress).
652 * osint.adb (Initialize): Deal with initializing overflow
654 * par-prag.adb: Add dummy entry for pragma Overflow_Checks.
655 * sem.adb (Semantics): Save and restore In_Assertion_Expr Use
656 Suppress_Options instead of Scope_Suppress.
657 * sem.ads (In_Assertion_Expr): New flag (Scope_Suppress):
658 Removed, use Suppress_Options instead.
659 * sem_eval.adb (Compile_Time_Compare): Return Unknown in
661 * sem_prag.adb (Process_Suppress_Unsuppress): Setting of
662 Overflow_Checks_Unsuppressed removed (not used anywhere!)
663 (Analyze_Pragma, case Check): Set In_Assertion_Expression
664 (Analyze_Pragma, case Overflow_Checks): Implement new pragma
665 * snames.ads-tmpl: Add names needed for handling pragma
667 * switch-c.adb (Scan_Front_End_Switches) Handle -gnato? and
668 -gnato?? where ? is 0-3
669 * types.ads: Updates and fixes to comment on Suppress_Record.
671 2012-10-01 Vincent Celier <celier@adacore.com>
673 * prj-part.adb (Parse): Remove incorrect comment about checking
674 imported non extending projects from and "extending all"
675 one. Minor correction.
677 2012-10-01 Robert Dewar <dewar@adacore.com>
679 * make.adb, exp_ch3.adb: Minor reformatting.
681 2012-10-01 Hristian Kirtchev <kirtchev@adacore.com>
683 * validsw.adb (Save_Validity_Check_Options): Do not set
684 Validity_Check_Non_Overlapping_Params and
685 Validity_Check_Valid_Scalars_On_Params when -gnatVa is present
686 because the related checks are deemed too aggressive.
688 2012-10-01 Ed Schonberg <schonberg@adacore.com>
690 * sem_util.ads sem_util.adb (Check_Internal_Protected_Use):
691 reject use of protected procedure or entry within the body of
692 a protected function of the same protected type, when usage is
693 a call, an actual in an instantiation, a or prefix of 'Access.
694 * sem_ch8.adb (Analyze_Subprogram_Renaming): Verify that target
695 object in renaming of protected procedure is a variable, and
696 apply Check_Internal_Protected_Use.
697 * sem_res.adb (Analyze_Call, Analyze_Entry_Call): apply
698 Check_Internal_Protected_Use rather than on-line code.
699 * sem_attr.adb (Analyze_Access_Attribute): Verify that target
700 object in accsss to protected procedure is a variable, and apply
701 Check_Internal_Protected_Use.
703 2012-10-01 Gary Dismukes <dismukes@adacore.com>
705 * sem_ch4.adb (Find_Equality_Types.Try_One_Interp): Exclude the
706 predefined interpretation from consideration if it's for a "/="
707 operator of a tagged type. This will allow Analyze_Equality_Op to
708 rewrite the "/=" as a logical negation of a call to the appropriate
709 dispatching equality function. This needs to be done during
710 analysis rather than expansion for the benefit of ASIS, which
711 otherwise gets the unresolved N_Op_Ne operator from Standard.
713 2012-10-01 Thomas Quinot <quinot@adacore.com>
715 * gnatcmd.adb, make.adb (Scan_Make_Arg, Inspect_Switches): Recognize
716 and reject an invalid parameter passed to -vP.
718 2012-10-01 Yannick Moy <moy@adacore.com>
720 * sem_warn.adb (Check_Infinite_Loop_Warning/Test_Ref): Improve
721 the detection of modifications to the loop variable by noting
722 that, if the type of variable is elementary and the condition
723 does not contain a function call, then the condition cannot be
724 modified by side-effects from a procedure call.
726 2012-10-01 Robert Dewar <dewar@adacore.com>
728 * checks.adb: Add comments.
730 2012-10-01 Javier Miranda <miranda@adacore.com>
732 * exp_ch3.adb (Expand_N_Object_Declaration): Improve condition catching
733 never-ending recursion. The previous condition erroneously disabled
734 silently the expansion of the class-wide interface object
735 initialization in cases not involving the recursion.
737 2012-10-01 Thomas Quinot <quinot@adacore.com>
739 * make.adb: Minor documentation fix: error messages are sent to
742 2012-10-01 Hristian Kirtchev <kirtchev@adacore.com>
744 * checks.ads, checks.adb (Apply_Parameter_Aliasing_Checks): New routine.
745 (Apply_Parameter_Validity_Checks): New routines.
746 * exp_ch6.adb (Expand_Call): Add aliasing checks to detect
748 * freeze.adb: Add with and use clauses for Checks and Validsw.
749 (Freeze_Entity): Add checks to detect proper initialization
751 * sem_ch4.adb: Add with and use clauses for Checks and Validsw.
752 (Analyze_Call): Add aliasing checks to detect overlapping objects.
753 * sem_ch13.adb: Add with and use clauses for Validsw.
754 (Analyze_Aspect_Specifications): Add checks to detect proper
755 initialization of scalars.
756 * sem_prag.adb (Chain_PPC): Correct the extraction of the
758 * sem_util.adb (Is_Object_Reference): Attribute 'Result now
760 * usage.adb (Usage): Add usage lines for validity switches 'l',
762 * validsw.adb (Reset_Validity_Check_Options): Include
763 processing for flags Validity_Check_Non_Overlapping_Params and
764 Validity_Check_Valid_Scalars_On_Params. Code reformatting.
765 (Save_Validity_Check_Options): Include processing
766 for flags Validity_Check_Non_Overlapping_Params
767 and Validity_Check_Valid_Scalars_On_Params.
768 (Set_Validity_Check_Options): Add processing for validity switches
769 'a', 'l', 'L', 'n', 'v' and 'V'. Code reformatting.
770 * validsw.ads: Add new flags Validity_Check_Non_Overlapping_Params
771 and Validity_Check_Valid_Scalars_On_Params along with comments
774 2012-10-01 Thomas Quinot <quinot@adacore.com>
776 * namet.ads, xsnamest.adb, prj-env.adb, sem_warn.adb,
777 errout.ads: Minor reformatting.
778 * prj-part.adb: Add comment.
780 2012-10-01 Robert Dewar <dewar@adacore.com>
782 * sinfo.ads, exp_aggr.adb, sem_ch13.adb: Minor reformatting.
784 2012-10-01 Ed Schonberg <schonberg@adacore.com>
786 * sem_aggr.adb (Resolve_Array_Aggregate): Handle properly
787 component associations given by subtypes that have static
788 predicates. Improve error message for overlapping ranges in
791 2012-10-01 Pascal Obry <obry@adacore.com>
793 * snames.ads-tmpl (Name_Link_Lib_Subdir): New constant.
795 2012-10-01 Ed Schonberg <schonberg@adacore.com>
797 * sem_ch9.adb (Analyze_Requeue): The target of a requeue
798 statement on a protected entry must be a variable. This is part
801 2012-09-26 Ian Lance Taylor <iant@google.com>
803 * gcc-interface/Makefile.in (LIBBACKTRACE): New variable.
804 (LIBS): Add $(LIBBACKTRACE).
805 (LIBDEPS): Add $(LIBBACKTRACE).
806 (TOOLS_LIBS): Add ../../../libbacktrace/.libs/libbacktrace.a.
808 2012-09-10 Diego Novillo <dnovillo@google.com>
810 * gcc-interface/decl.c (build_subst_list): Adjust call to VEC_safe_push.
811 (build_variant_list): Likewise.
812 * gcc-interface/utils.c (convert): Adjust calls to VEC_quick_push.
814 2012-09-07 Eric Botcazou <ebotcazou@adacore.com>
816 * gcc-interface/trans.c (Loop_Statement_to_gnu): Revert to using
817 size_type_node instead of sizetype.
819 2012-08-19 Eric Botcazou <ebotcazou@adacore.com>
821 * layout.adb (Set_Elem_Alignment): Cap the alignment of access types
822 to that of a regular access type for non-strict-alignment platforms.
823 * gcc-interface/utils.c (finish_fat_pointer_type): Do not set the
824 alignment for non-strict-alignment platforms.
826 2012-08-19 Eric Botcazou <ebotcazou@adacore.com>
828 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Use proper
829 dummy type for the temporary COMPONENT_REF built for a derived tagged
830 type with discriminant.
832 2012-08-14 Diego Novillo <dnovillo@google.com>
834 Merge from cxx-conversion branch. Re-implement VEC in C++.
836 * gcc-interface/trans.c (finalize_nrv_unc_r): Adjust VEC_index usage.
837 * gcc-interface/utils.c (convert): Likewise.
838 (remove_conversions): Likewise.
839 * gcc-interface/utils2.c (compare_fat_pointers): Likewise.
840 (build_unary_op): Likewise.
841 (gnat_stabilize_reference): Likewise.
843 2012-08-06 Jose Ruiz <ruiz@adacore.com>
845 * gcc-interface/Makefile.in: Add support for 32-bit VxWorks for SPARC
848 2012-08-06 Arnaud Charlet <charlet@adacore.com>
850 * prj-attr.adb (Register_New_Package): Add missing blank.
852 2012-08-06 Ed Schonberg <schonberg@adacore.com>
854 * exp_aggr.adb (Is_Two_Dim_Packed_Array): New predicate,
855 used when computing maximum size allowable to construct static
858 2012-08-06 Vincent Pucci <pucci@adacore.com>
860 * freeze.adb (Freeze_Entity): Inherit_Aspects_At_Freeze_Point
861 calls added for derived types and subtypes.
862 * sem_aux.adb, sem_aux.ads (Get_Rep_Item, Get_Rep_Pragma,
863 Has_Rep_Pragma): New routines.
864 * sem_ch13.ads (Inherit_Aspects_At_Freeze_Point): New routine.
865 * sem_ch13.adb (Analyze_Aspect_Specifications): Error message
866 for aspect Lock_Free fixed.
867 (Inherits_Aspects_At_Freeze_Point): New routine.
868 * sem_ch3.adb: Several flag settings removed since inheritance
869 of aspects must be performed at freeze point.
871 2012-08-06 Thomas Quinot <quinot@adacore.com>
873 * s-oscons-tmplt.c: Fix s-oscons.ads formatting on VxWorks.
875 2012-08-06 Vincent Pucci <pucci@adacore.com>
877 * sem_dim.adb (Analyze_Dimension_Binary_Op): Issue an error message
878 for unknown exponent at compile-time.
880 2012-08-06 Gary Dismukes <dismukes@adacore.com>
882 * sem_eval.ads (Compile_Time_Known_Value_Or_Aggr): Enhance
883 comment to make it clear that the aggregate's evaluation might
884 still involve run-time checks even though the aggregate is
885 considered known at compile time.
886 * sinfo.ads (Compile_Time_Known_Aggregate): Correct comment to
887 refer to Exp_Aggr instead of Sem_Aggr.
889 2012-08-06 Robert Dewar <dewar@adacore.com>
891 * xoscons.adb: Minor code reorganization (remove unused variable
893 * g-sercom.ads, exp_attr.adb: Minor reformatting.
894 * sinfo.adb, sinfo.ads: Minor cleanup, remove unused flag
895 Static_Processing_OK.
897 2012-08-06 Ed Schonberg <schonberg@adacore.com>
899 * sem_ch3.adb (Build_Derived_Concurrent_Type): Copy discriminant
900 constraint when building a constrained subtype, to prevent
901 undesirable tree sharing betweeb geberated subtype and derived
904 2012-08-06 Thomas Quinot <quinot@adacore.com>
906 * g-sercom-mingw.adb, s-oscons-tmplt.c: Add missing constants
909 2012-08-06 Sergey Rybin <rybin@adacore.com frybin>
911 * tree_io.ads: Update ASIS_Version_Number because of the tree fix
912 for discriminant constraints for concurrent types.
914 2012-08-06 Thomas Quinot <quinot@adacore.com>
916 * sem_ch4.adb: Minor reformatting.
918 2012-08-06 Thomas Quinot <quinot@adacore.com>
920 * s-oscons-tmplt.c, xoscons.adb: Per the Single UNIX Specification,
921 types cc_t, speed_t, and tcflag_t defined in <termios.h> all are
922 unsigned types. Add required special handling to have their correct
923 unsigned values in s-oscons.ads.
925 2012-08-06 Thomas Quinot <quinot@adacore.com>
927 * par-ch13.adb: Minor reformatting.
929 2012-08-06 Thomas Quinot <quinot@adacore.com>
931 * g-sercom.adb, g-sercom.ads, g-sercom-mingw.adb, g-sercom-linux.adb
932 (Set): Add Local and Flow_Control settings.
934 2012-08-06 Ed Schonberg <schonberg@adacore.com>
936 * exp_attr.adb: Suppress saving of 'Old if assertions are not
939 2012-08-06 Yannick Moy <moy@adacore.com>
941 * sem_ch4.adb (Analyze_Selected_Component): Issue an error in
942 Alfa mode for component not present.
944 2012-08-06 Thomas Quinot <quinot@adacore.com>
946 * exp_ch7.adb (Insert_Actions_In_Scope_Around): Do not
947 use a renaming of Scope_Stack.Table (Scope_Stack.Last), as
948 Process_Transient_Object may introduce new scopes and cause
949 Scope_Stack.Table to be reallocated.
951 2012-08-06 Robert Dewar <dewar@adacore.com>
953 * exp_util.adb, switch-c.adb, inline.ads, sem_ch10.adb, types.ads,
954 checks.adb, sem_prag.adb, sem.adb, sem.ads, sem_res.adb, sem_attr.adb,
955 gnat1drv.adb, exp_ch4.adb, exp_ch6.adb, opt.ads, osint.adb: Implement
956 extended overflow checks (step 1).
957 (Overflow_Check_Type, Suppress_Record, Suppress_All): New types.
958 (Suppress_Array): Extended to include switches to control extended
959 overflow checking (and renamed to Suppress_Record).
960 Update all uses of Suppress_Array.
962 2012-08-06 Thomas Quinot <quinot@adacore.com>
964 * makeutl.ads: Minor documentation fix.
966 2012-08-06 Thomas Quinot <quinot@adacore.com>
968 * exp_ch7.adb: Minor reformatting.
970 2012-08-06 Geert Bosch <bosch@adacore.com>
972 * a-ngelfu.adb: Change obsolete comment that this is a non-strict
975 2012-08-06 Steve Baird <baird@adacore.com>
977 * exp_ch7.adb (Build_Finalizer.Process_Object_Declaration): If
978 CodePeer_Mode = True then omit exception handlers for finalization calls
980 2012-08-06 Robert Dewar <dewar@adacore.com>
982 * exp_aggr.adb: Minor reformatting.
984 2012-08-06 Robert Dewar <dewar@adacore.com>
986 * sem_ch6.adb: Remove useless flag Body_Deleted.
988 2012-08-06 Thomas Quinot <quinot@adacore.com>
990 * sinfo.ads (End_Span): Change default from No_Uint to Uint_0,
991 as this is what all usage occurrences of this attribute are
993 * uintp.adb (UI_To_Int): Add assertion to guard against calling
996 2012-08-06 Vincent Pucci <pucci@adacore.com>
999 * exp_attr.adb (Expand_N_Attribute_Reference): Expand new
1000 Atomic_Always_Lock_Free attribute.
1001 * sem_attr.adb (Analyze_Attribute): Analyze new
1002 Atomic_Always_Lock_Free attribute.
1003 (Eval_Attribute): Nothing to do with new Atomic_Always_Lock_Free
1005 * sem_ch9.adb (Allows_Lock_Free_Implementation):
1006 Support_Atomic_Primitives check replaces previous erroneous
1008 * sem_util.adb, sem_util.ads (Support_Atomic_Primitives):
1010 * snames.ads-tmpl: New name Name_Atomic_Always_Lock_Free and
1011 new attribute Attribute_Atomic_Always_Lock_Free defined.
1012 * s-atopri.adb: Support_Atomic_Primitives checks replaced by
1013 Atomic_Always_Lock_Free queries.
1014 * system-aix64.ads, system-aix.ads, system-darwin-ppc.ads,
1015 system-hpux.ads, system-linux-alpha.ads, system-linux-hppa.ads,
1016 system-linux-ppc.ads, system-linux-s390.ads,
1017 system-linux-s390x.ads, system-linux-sh4.ads,
1018 system-linux-sparc.ads, system-lynxos178-ppc.ads,
1019 system-lynxos-ppc.ads, system-mingw.ads,
1020 system-vxworks-arm.ads, system-solaris-sparc.ads,
1021 system-solaris-sparcv9.ads, system-vms_64.ads,
1022 system-vxworks-m68k.ads, system-vxworks-mips.ads,
1023 system-vxworks-ppc.ads, system-vxworks-sparcv9.ads: Flag
1024 Support_Atomic_Primitives removed.
1026 2012-08-06 Hristian Kirtchev <kirtchev@adacore.com>
1028 * sem_mech.adb (Set_Mechanisms): OUT and IN OUT parameters are
1029 now unconditionally passed by reference. IN parameters subject
1030 to convention C_Pass_By_Copy are passed by copy, otherwise they
1031 are passed by reference.
1033 2012-08-06 Ed Schonberg <schonberg@adacore.com>
1035 * sem_ch3.adb (Analyze_Object_Declaration): According to
1036 AI95-0303, protected objects with interrupt handlers can be
1037 declared in nested scopes. This is a binding interpretation,
1038 and thus applies to all versions of the compiler.
1040 2012-08-06 Robert Dewar <dewar@adacore.com>
1042 * frontend.adb, exp_aggr.adb: Minor reformatting.
1044 2012-08-06 Thomas Quinot <quinot@adacore.com>
1046 * par-endh.adb: Minor reformatting.
1048 2012-08-06 Hristian Kirtchev <kirtchev@adacore.com>
1050 * exp_ch7.adb (Process_Transient_Objects): Remove obsolete loop
1051 processing related to array initialization. The expansion of
1052 loops already contains a mechanism to detect controlled objects
1053 generated by expansion and introduce a block around the loop
1054 statements for finalization purposes.
1056 2012-08-06 Vincent Pucci <pucci@adacore.com>
1058 * sem_ch13.adb: Current scope must be within
1059 or same as the scope of the entity while analysing aspect
1060 specifications at freeze point.
1062 2012-08-06 Thomas Quinot <quinot@adacore.com>
1064 * par_sco.adb: Add note about dubious SCO for TERMINATE
1066 * sem_ch8.adb, exp_ch11.adb: Minor reformatting.
1068 2012-08-06 Ed Schonberg <schonberg@adacore.com>
1070 * exp_aggr.adb (Two_Dim_Packed_Array_Handled): New procedure to
1071 transform an aggregate for a packed two-dimensional array into
1072 a one-dimensional array of constant values, in order to avoid
1073 the generation of component-by-component assignments.
1075 2012-08-06 Thomas Quinot <quinot@adacore.com>
1077 * frontend.adb: Do not attempt to process deferred configuration
1078 pragmas if the main unit failed to load, to avoid cascaded
1079 inconsistencies that can lead to a compiler crash.
1081 2012-08-06 Vincent Pucci <pucci@adacore.com>
1083 * s-atopri.adb: Minor reformatting.
1085 2012-08-06 Arnaud Charlet <charlet@adacore.com>
1087 * gnat-style.texi: Clarify that all subprograms should be
1088 documented. Minor rewording.
1090 2012-08-06 Robert Dewar <dewar@adacore.com>
1092 * aspects.ads: Define Aspect_Id_Exclude_No_Aspect.
1093 * par-ch13.adb, restrict.adb: Use Aspect_Id_Exclude_No_Aspect to
1096 2012-08-06 Yannick Moy <moy@adacore.com>
1098 * gnat-style.texi: Update style guide for declarations.
1100 2012-08-06 Yannick Moy <moy@adacore.com>
1102 * sem_attr.adb (Analyze_Attribute): In the case for 'Old,
1103 skip a special expansion which is not needed in Alfa mode.
1105 2012-08-06 Yannick Moy <moy@adacore.com>
1107 * sem_ch5.adb (Analyze_Iterator_Specification): Do not perform
1108 an expansion of the iterator in Alfa mode.
1110 2012-08-06 Robert Dewar <dewar@adacore.com>
1112 * s-oscons-tmplt.c, sem_ch9.adb, osint.adb: Minor reformatting.
1114 2012-08-06 Hristian Kirtchev <kirtchev@adacore.com>
1116 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Remove obsolete
1117 Alfa-specific guard. The code is a leftover from an early
1118 implementation of iterators which is no longer in use.
1120 2012-08-06 Vincent Celier <celier@adacore.com>
1122 * par-ch13.adb (Get_Aspect_Specifications): Do not consider
1123 No_Aspect when checking for a mispelled aspect.
1125 2012-08-06 Robert Dewar <dewar@adacore.com>
1127 * s-htable.adb: Minor reformatting.
1129 2012-08-06 Thomas Quinot <quinot@adacore.com>
1131 * s-oscons-tmplt.c, g-socket.adb (System.OS_Constants.Target_OS):
1132 Suppress warnings so that we don't have to do it at each usage.
1134 2012-08-06 Vincent Pucci <pucci@adacore.com>
1136 * exp_ch9.adb (Build_Lock_Free_Unprotected_Subprogram_Body):
1137 Use of Known_Static_Esize instead of Known_Esize and
1138 Known_Static_RM_Size instead of Known_RM_Size in order to
1139 properly call UI_To_Int. Don't check the size of the component
1140 type in case of generic.
1141 * sem_ch9.adb (Allows_Lock_Free_Implementation):
1142 Use of Known_Static_Esize instead of Known_Esize and
1143 Known_Static_RM_Size instead of Known_RM_Size in order to properly
1144 call UI_To_Int. Don't check the size of the component type in
1147 2012-08-06 Hristian Kirtchev <kirtchev@adacore.com>
1149 * checks.adb (Discrete_Range_Cond): Do not try to optimize on
1150 the assumption that the type of an expression can always fit in
1151 the target type of a conversion.
1153 2012-07-30 Robert Dewar <dewar@adacore.com>
1155 * bindusg.adb: Clarify file in -A lines.
1157 2012-07-30 Robert Dewar <dewar@adacore.com>
1159 * freeze.adb: Minor reformatting.
1161 2012-07-30 Robert Dewar <dewar@adacore.com>
1163 * gnatcmd.adb, makeutl.adb, makeutl.ads: Minor code reorganization.
1165 2012-07-30 Vincent Pucci <pucci@adacore.com>
1167 * exp_ch9.adb (Build_Lock_Free_Unprotected_Subprogram_Body): Minor
1169 * sem_ch9.adb (Allows_Lock_Free_Implementation): Minor reformatting.
1170 Capture the correct error message in case of a quantified expression.
1172 2012-07-30 Thomas Quinot <quinot@adacore.com>
1174 * g-socket.adb (Get_Socket_Option, Set_Socket_Option): On Windows, the
1175 value is a milliseconds count in a DWORD, not a struct timeval.
1177 2012-07-30 Hristian Kirtchev <kirtchev@adacore.com>
1179 * sem_ch12.adb (Earlier): Add local variables T1 and T2. Minor code
1182 2012-07-30 Thomas Quinot <quinot@adacore.com>
1184 * gnatcmd.adb, make.adb, makeutl.adb, makeutl.ads
1185 (Test_If_Relative_Path): Rename to Ensure_Absolute_Path to better
1186 reflect what this subprogram does. Rename argument Including_L_Switch
1187 to For_Gnatbind, and also exempt -A from rewriting.
1188 * bindusg.adb: Document optional =file argument to gnatbind -A.
1190 2012-07-30 Ed Schonberg <schonberg@adacore.com>
1192 * freeze.adb (Freeze_Entity): Do no apply restriction check on
1193 storage pools to access to subprogram types.
1195 2012-07-30 Robert Dewar <dewar@adacore.com>
1197 * par_sco.adb, a-cihama.adb, a-coinve.adb, exp_ch7.adb, a-ciorse.adb,
1198 exp_ch9.adb, sem_dim.adb, par-ch13.adb, sem_ch9.adb, a-cidlli.adb,
1199 a-cimutr.adb, freeze.adb, a-ciormu.adb, sem_res.adb, sem_attr.adb,
1200 a-cihase.adb, exp_ch4.adb, sem_ch4.adb, a-ciorma.adb,
1201 s-tasinf-linux.ads, sem_ch13.adb, a-coinho.adb: Minor reformatting.
1204 2012-07-30 Vincent Pucci <pucci@adacore.com>
1206 * sem_ch9.adb (Allows_Lock_Free_Implementation): Restrict implicit
1207 dereferences of access values.
1209 2012-07-27 Iain Sandoe <iain@codesourcery.com>
1211 * system-darwin-ppc64.ads: Add Support_Atomic_Primitives, set to True.
1213 2012-07-25 Eric Botcazou <ebotcazou@adacore.com>
1215 * gcc-interface/utils2.c (gnat_stabilize_reference) <BIT_FIELD_REF>: Do
1216 not stabilize operand #1 and #2.
1218 2012-07-23 Tristan Gingold <gingold@adacore.com>
1220 * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): Use
1221 End_Label sloc when possible for sloc of the TRY_CATCH_EXPR node.
1223 2012-07-23 Olivier Hainque <hainque@adacore.com>
1225 * gcc-interface/Makefile.in: Adjust processing of Linker_Options for
1227 * gcc-interface/Make-lang.in: Update dependencies.
1229 2012-07-23 Arnaud Charlet <charlet@adacore.com>
1231 * s-tasinf-linux.ads: Fix typo.
1233 2012-07-23 Thomas Quinot <quinot@adacore.com>
1235 * exp_ch7.adb, switch-m.adb, exp_ch3.adb, freeze.adb: Minor reformatting
1237 2012-07-23 Ed Schonberg <schonberg@adacore.com>
1239 * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): If original
1240 loop carries an identifier, preserve it when rewriting it as a
1241 standard loop to validate exit statements that may reference
1242 that name in the body of the loop.
1244 2012-07-23 Thomas Quinot <quinot@adacore.com>
1246 * exp_ch9.adb: Minor code cleanup.
1248 2012-07-23 Ed Schonberg <schonberg@adacore.com>
1250 * sem_ch4.adb (Analyze_Selected_Component): When checking for
1251 potential ambiguities with class-wide operations on synchronized
1252 types, attach the copied node properly to the tree, to prevent
1253 errors during expansion.
1255 2012-07-23 Yannick Moy <moy@adacore.com>
1257 * sem_ch5.adb (Analyze_Loop_Statement): Make sure the loop body
1258 is analyzed in Alfa mode.
1260 2012-07-23 Ed Schonberg <schonberg@adacore.com>
1262 * sem_res.adb: Adjust previous change.
1264 2012-07-23 Vincent Pucci <pucci@adacore.com>
1266 * sem_ch9.adb (Allows_Lock_Free_Implementation): Flag
1267 Lock_Free_Given renames previous flag Complain. Description
1268 updated. Henceforth, catch every error messages issued by this
1269 routine when Lock_Free_Given is True. Declaration restriction
1270 updated: No non-elementary parameter instead (even in parameter)
1271 New subprogram body restrictions implemented: No allocator,
1272 no address, import or export rep items, no delay statement,
1273 no goto statement, no quantified expression and no dereference
1276 2012-07-23 Hristian Kirtchev <kirtchev@adacore.com>
1278 * checks.adb (Determine_Range): Add local variable Btyp. Handle
1279 the case where the base type of an enumeration subtype is
1280 private. Replace all occurrences of Base_Type with Btyp.
1281 * exp_attr.adb (Attribute_Valid): Handle the case where the
1282 base type of an enumeration subtype is private. Replace all
1283 occurrences of Base_Type with Btyp.
1284 * sem_util.adb (Get_Enum_Lit_From_Pos): Add local variable
1285 Btyp. Handle the case where the base type of an enumeration
1286 subtype is private. Replace all occurrences of Base_Type with
1289 2012-07-23 Ed Schonberg <schonberg@adacore.com>
1291 * par-ch6.adb (P_Mode): in Ada 2005, a mode indicator can apply
1292 to a formal object of an anonymous access type.
1294 2012-07-23 Ed Schonberg <schonberg@adacore.com>
1296 * sem_ch4.adb (Try_Container_Indexing): A user-defined indexing
1297 aspect can have more than one index, e.g. to describe indexing
1298 of a multidimensional object.
1300 2012-07-23 Hristian Kirtchev <kirtchev@adacore.com>
1302 * exp_ch4.adb (Apply_Accessibility_Check): Reimplemented. The check is
1303 now more complex and contains optional finalization part and mandatory
1306 2012-07-23 Gary Dismukes <dismukes@adacore.com>
1308 * a-cihama.adb, a-cihase.adb, a-cimutr.adb, a-ciorma.adb, a-ciormu.adb,
1309 a-ciorse.adb, a-coinho.adb, a-coinve.adb, a-cidlli.adb: Unsuppress
1310 Accessibility_Check for Element_Type allocators.
1312 2012-07-23 Vasiliy Fofanov <fofanov@adacore.com>
1314 * projects.texi: Fix typo.
1316 2012-07-23 Ed Schonberg <schonberg@adacore.com>
1318 * sem_res.adb (Resolve_Explicit_Derenference): If prefix is
1319 overloaded, remove those interpretations whose designated type
1320 does not match the context, to avoid spurious ambiguities that
1321 may be caused by the Ada 2012 conversion rule for anonymous
1324 2012-07-23 Vincent Celier <celier@adacore.com>
1326 * g-spitbo.adb (Substr (String)): Return full string and do not
1327 raise exception when Start is 1 and Len is exactly the length
1328 of the string parameter.
1329 * g-spitbo.ads: Fix spelling error in the name of exception
1332 2012-07-23 Ed Schonberg <schonberg@adacore.com>
1334 * par.adb: new subprogram Get_Aspect_Specifications.
1335 * par-ch6.adb (P_Subprogram): handle subprogram bodies with aspect
1337 * par-ch13.adb (Get_Aspect_Specifications): extracted from
1338 P_Aspect_Specifications. Collect aspect specifications in some
1339 legal context, but do not attach them to any declaration. Used
1340 when parsing subprogram declarations or bodies that include
1341 aspect specifications.
1342 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If aspects are
1343 present, analyze them, or reject them if the subprogram as a
1346 2012-07-23 Vasiliy Fofanov <fofanov@adacore.com>
1348 * gnat_ugn.texi: Omit section on other platforms/runtimes support
1349 in gnattest for vms version.
1351 2012-07-23 Ed Schonberg <schonberg@adacore.com>
1353 * sem_ch13.adb (Analyze_Aspect_Specifications):
1354 Handle properly aspects that can be specified on a subprogram
1355 body: CPU, Priority, and Interrupt_Priority.
1357 2012-07-23 Claire Dross <dross@adacore.com>
1359 * a-cfdlli.ads: Switch definition of Constant_Reference_Type
1362 2012-07-23 Thomas Quinot <quinot@adacore.com>
1364 * par_sco.adb (Process_Decisions.Output_Header): For the guard
1365 on an alternative in a SELECT statement, use the First_Sloc
1366 of the guard expression (not its topmost sloc) as the decision
1367 location, because this is what is referenced by dominance markers.
1369 2012-07-23 Hristian Kirtchev <kirtchev@adacore.com>
1371 * exp_ch7.adb (Requires_Hooking): Examine the original expression
1372 of an object declaration node because a function call that
1373 returns on the secondary stack may have been rewritten into
1376 2012-07-23 Vincent Pucci <pucci@adacore.com>
1378 * sem_dim.adb (Analyze_Dimension_Has_Etype): For identifier, propagate
1379 dimension when entity is a non-dimensionless constant.
1380 (Analyze_Dimension_Object_Declaration): Propagate
1381 dimension from the expression to the entity when type is a
1382 dimensioned type and object is a constant.
1384 2012-07-23 Ed Schonberg <schonberg@adacore.com>
1386 * sem_attr.adb (Analyze_Attribute, case 'Old): if the prefix
1387 is not an entity name, expand at once so that code generated by
1388 the expansion of the prefix is not generated before the constant
1389 that captures the old value is properly inserted and analyzed.
1391 2012-07-23 Thomas Quinot <quinot@adacore.com>
1393 * exp_ch9.adb (Ensure_Statement_Present): Mark generated NULL
1394 statement as Comes_From_Source so that GIGI does not eliminate it.
1396 2012-07-23 Hristian Kirtchev <kirtchev@adacore.com>
1398 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): Inst is now
1399 a local variable. Retrieve the related instance when processing
1400 a subprogram instantiation. Such instances appear as wrapper
1403 2012-07-23 Vincent Pucci <pucci@adacore.com>
1405 * system-aix64.ads, system-aix.ads, system-darwin-ppc.ads,
1406 system-hpux.ads, system-linux-alpha.ads,
1407 system-linux-hppa.ads, system-linux-ppc.ads,
1408 system-linux-s390.ads, system-linux-s390x.ads,
1409 system-linux-sh4.ads, system-linux-sparc.ads,
1410 system-lynxos-ppc.ads, system-mingw.ads,
1411 system-solaris-sparc.ads, system-solaris-sparcv9.ads,
1412 system-vms_64.ads, * system-vxworks-arm.ads, system-vxworks-m68k.ads,
1413 system-vxworks-mips.ads, system-vxworks-ppc.ads,
1414 system-vxworks-sparcv9.ads: Support_Atomic_Primitives set to False.
1415 * system-darwin-x86.ads, system-darwin-x86_64.ads,
1416 system-freebsd-x86.ads, system-freebsd-x86_64.ads,
1417 system-hpux-ia64.ads, system-linux-ia64.ads, system-linux-x86.ads,
1418 system-linux-x86_64.ads, system-lynxos-x86.ads,
1419 system-mingw-x86_64.ads, system-solaris-x86.ads,
1420 system-solaris-x86_64.ads, system-vms-ia64.ads,
1421 system-vxworks-x86.ads: Support_Atomic_Primitives set to True.
1422 * s-atopri.adb (Lock_Free_Read_X): New body.
1423 (Lock_Free_Try_Write_X): Support_Atomic_Primitives check added.
1424 (Lock_Free_Try_Write_64): New body.
1425 * s-atopri.ads: New type uint.
1426 (Sync_Compare_And_Swap_64): __sync_val_compare_and_swap_8 intrinsic
1428 (Lock_Free_Read_X): Body moved to s-atopri.adb.
1429 (Lock_Free_Try_Write_64): Similar to other Lock_Free_Try_Write_X
1431 * targparm.adb: New enumeration literal SAP
1432 (Support_Atomic_Primitives) for type Targparm_Tags. New constant
1433 SAP_Str. New component SAP_Str'Access for array Targparm_Str.
1434 (Get_Target_Parameters): Parse Support_Atomic_Primitives_On_Target
1436 * targparm.ads: New back-end code generation flag
1437 Support_Atomic_Primitives_On_Target
1439 2012-07-23 Vincent Pucci <pucci@adacore.com>
1441 * gnat_ugn.texi: Dimensionality checking documentation updated.
1443 2012-07-23 Ed Schonberg <schonberg@adacore.com>
1445 * sem_prag.adb (Make_Inline): If the pragma applies to a
1446 subprogram renaming, set inline flags on both the renamed entity
1447 and on the renaming, so that some ASIS queries can be handled
1448 consistently in the absence of expansion.
1450 2012-07-23 Fedor Rybin <frybin@adacore.com>
1452 * gnat_ugn.texi: Removing obsolete limitation of gnattest
1453 to support only ada05. Updating gnattest support for other
1454 platforms/run-times section to reflect the usage of taget
1455 prefix in gnattest calls. Fixing missed obsolete --stub-default
1458 2012-07-23 Robert Dewar <dewar@adacore.com>
1460 * uintp.adb: Minor reformatting.
1462 2012-07-23 Olivier Hainque <hainque@adacore.com>
1464 * system-vxworks-ppc.ads: Replace the default
1465 Linker_Options requesting crtbe by a commented out request for
1468 2012-07-23 Vincent Celier <celier@adacore.com>
1470 * prj-nmsc.adb (Check_Naming): Do not get the exceptions names
1471 in a virtual project.
1473 2012-07-23 Robert Dewar <dewar@adacore.com>
1475 * layout.adb, sem_prag.adb, sem.ads, freeze.adb,
1476 switch-m.adb, exp_disp.adb, system-vxworks-ppc.ads, exp_ch6.adb: Minor
1479 2012-07-23 Tristan Gingold <gingold@adacore.com>
1481 * gcc-interface/trans.c: (Handled_Sequence_Of_Statements_to_gnu): Set
1482 location on TRY_CATCH_EXPR.
1484 2012-07-19 Eric Botcazou <ebotcazou@adacore.com>
1486 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Try to ensure
1487 that an object of CW type initialized to a value is sufficiently
1488 aligned for this value.
1490 2012-07-19 Eric Botcazou <ebotcazou@adacore.com>
1492 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Do not
1493 look up the REP part of the base type in advance. Deal with that of
1495 (get_rep_part): Be prepared for record types with fields.
1497 2012-07-18 Eric Botcazou <ebotcazou@adacore.com>
1499 * gcc-interface/trans.c (stmt_group_may_fallthru): New function.
1500 (gnat_to_gnu) <N_Block_Statement>: Use it to find out whether the
1501 block needs to be translated.
1503 2012-07-17 Tristan Gingold <gingold@adacore.com>
1505 * gnat_rm.texi: Adjust previous change.
1507 2012-07-17 Ed Schonberg <schonberg@adacore.com>
1509 * sem_prag.adb (Process_Import_Or_Interface): If the pragma
1510 comes from an aspect, it applies to the corresponding entity
1511 without further check.
1513 2012-07-17 Olivier Hainque <hainque@adacore.com>
1515 * initialize.c (__gnat_initialize for VxWorks): Remove section with
1516 call to __gnat_vxw_setup_for_eh.
1517 * system-vxworks-ppc.ads: Add -auto-register to -crtbe, relying
1518 on the VxWorks constructor mechanism for network loaded modules
1521 2012-07-17 Tristan Gingold <gingold@adacore.com>
1523 * adaint.c: Minor reformatting.
1525 2012-07-17 Pascal Obry <obry@adacore.com>
1527 * s-regexp.adb (Adjust): Fix access violation in Adjust.
1529 2012-07-17 Ed Schonberg <schonberg@adacore.com>
1531 * freeze.adb (Freeze_Entity): Warn if an imported subprogram
1532 has pre/post conditions, because these will not be enforced.
1534 2012-07-17 Eric Botcazou <ebotcazou@adacore.com>
1536 * exp_ch7.adb (Process_Transient_Objects): Put all the
1537 finalization blocks and the final raise statement into a wrapper
1540 2012-07-17 Vincent Pucci <pucci@adacore.com>
1542 * s-atopri.adb (Lock_Free_Try_Write_X): Atomic_Compare_Exchange_X
1543 replaced by Sync_Compare_And_Swap_X.
1544 (Lock_Free_Try_Write_64): Removed.
1545 * s-atopri.ads (Sync_Compare_And_Swap_X): Replaces previous
1546 routine Atomic_Compare_Exchange_X.
1547 (Lock_Free_Read_64): Renaming of Atomic_Load_64.
1548 (Lock_Free_Try_Write_64): Renaming of Sync_Compare_And_Swap_64.
1550 2012-07-17 Vincent Celier <celier@adacore.com>
1552 * switch-m.adb (Normalize_Compiler_Switches): Recognize new
1553 switches -gnatn1 and -gnatn2.
1555 2012-07-17 Vincent Pucci <pucci@adacore.com>
1557 * gnat_ugn.texi: GNAT dimensionality checking
1558 documentation updated with System.Dim.Mks modifications.
1560 2012-07-17 Ed Schonberg <schonberg@adacore.com>
1562 * exp_ch3.adb: sloc of array init_proc is sloc of type declaration.
1564 2012-07-17 Tristan Gingold <gingold@adacore.com>
1566 * raise-gcc.c (get_call_site_action_for): Remove useless init
1568 (get_action_description_for): Do not overwrite action->kind.
1570 2012-07-17 Hristian Kirtchev <kirtchev@adacore.com>
1572 * exp_attr.adb (Expand_N_Attribute_Reference): Add local variables Attr
1573 and Conversion_Added. Add local constant Typ.
1574 Retrieve the original attribute after the arithmetic check
1575 machinery has modified the node. Add a conversion to the target
1576 type when the prefix of attribute Max_Size_In_Storage_Elements
1577 is a controlled type.
1579 2012-07-17 Gary Dismukes <dismukes@adacore.com>
1581 * exp_ch6.adb (Expand_Inlined_Call): For each actual parameter
1582 of mode 'out' or 'in out' that denotes an entity, reset
1583 Last_Assignment on the entity so that any assignments to the
1584 corresponding formal in the inlining will not trigger spurious
1585 warnings about overwriting assignments.
1587 2012-07-17 Robert Dewar <dewar@adacore.com>
1589 * s-assert.ads: Fix comments to make it clear that this is used
1590 for all assertions, not just pragma Assert.
1592 2012-07-17 Jerome Guitton <guitton@adacore.com>
1594 * par_sco.ads: Minor typo fix.
1596 2012-07-17 Gary Dismukes <dismukes@adacore.com>
1598 * layout.adb (Layout_Type): In the case where the target is
1599 AAMP, use 32 bits (a single pointer) rather than 64 bits for an
1600 anonymous access-to-subprogram type if the type is library-level
1601 and Is_Local_Anonymous_Access is True.
1603 2012-07-17 Jose Ruiz <ruiz@adacore.com>
1605 * s-tassta.adb, s-tarest.adb (Create_Task, Create_Restricted_Task,
1606 Initialize): Add comments explaining that the CPU affinity value that
1607 is passed to the run-time library can be either Unspecified_CPU, to
1608 indicate that the task inherits the affinity of its activating task,
1609 or a value in the range of CPU_Range but no greater than Number_Of_CPUs.
1611 2012-07-17 Javier Miranda <miranda@adacore.com>
1613 * exp_disp.adb (Make_DT): Remove decoration of Ada.Tags entities.
1614 (Make_Tags): Add decoration of Ada.Tags entities.
1616 2012-07-17 Ed Schonberg <schonberg@adacore.com>
1618 * sem_ch6.adb (Check_Statement_Sequence): When locating the
1619 last significant statement in a sequence, ignore iserted nodes
1620 that typically come from expansion of controlled operations.
1622 2012-07-17 Tristan Gingold <gingold@adacore.com>
1624 * gnat_rm.texi: Document foreign exceptions.
1626 2012-07-17 Robert Dewar <dewar@adacore.com>
1628 * sem_prag.adb, treepr.ads: Minor reformatting.
1630 2012-07-17 Robert Dewar <dewar@adacore.com>
1632 * exp_ch9.adb: Minor code reorganization.
1633 * exp_ch3.adb: Minor code improvement.
1635 2012-07-17 Tristan Gingold <gingold@adacore.com>
1637 * seh_init.c (__gnat_SEH_error_handler): Not compiled anymore
1638 on Windows 64 (+ SEH), as it is unused.
1640 2012-07-17 Javier Miranda <miranda@adacore.com>
1642 * sem_prag.adb (CPP_Class): Transform obsolescent pragma CPP_Class into
1643 CPP convention automatically.
1645 2012-07-16 Tristan Gingold <gingold@adacore.com>
1647 * gcc-interface/decl.c (intrin_return_compatible_p): Map Address to
1650 2012-07-16 Thomas Quinot <quinot@adacore.com>
1652 * exp_ch9.adb (Ensure_Statement_Present): New subprogram.
1653 (Expand_N_Asynchronous_Select,
1654 Expand_N_Selective_Accept.Process_Accept_Alternative,
1655 Expand_N_Selective_Accept.Process_Delay_Alternative,
1656 Expand_N_Timed_Entry_Call): For an alternative with no trailing
1657 statements, introduce a null statement to carry the sloc of
1658 the initial special statement (accept, delay, or entry call)
1659 in the alternative, for coverage analysis purposes.
1661 2012-07-16 Thomas Quinot <quinot@adacore.com>
1663 * sem_eval.adb (In_Subrange_Of): Fix typo in test for scalar
1666 2012-07-16 Robert Dewar <dewar@adacore.com>
1668 * a-exexpr.adb, freeze.adb, a-exexpr-gcc.adb, a-except-2005.adb,
1669 sem_eval.adb, s-fileio.adb: Minor reformatting.
1671 2012-07-16 Javier Miranda <miranda@adacore.com>
1673 * sem_prag.adb (Analyze_Pragma): Remove support for obsolescent
1675 * sem_ch13.adb (Analyze_Freeze_Entity): Add missing error on Ada
1676 derivations of CPP types. Found updating the tests affected by
1677 the removal of pragma CPP_Class.
1679 2012-07-16 Thomas Quinot <quinot@adacore.com>
1681 * back_end.adb: Minor reformatting.
1683 2012-07-16 Thomas Quinot <quinot@adacore.com>
1685 * exp_ch9.adb (Expand_N_Selective_Accept.Process_Accept_Alternative):
1686 Remove junk test that was always true. For the case of no statements
1687 following the ACCEPT, jump directly to End_Lab instead of
1688 introducing an intermediate jump.
1689 (Expand_N_Selective_Accept.Process_Delay_Alternative): Fix
1690 predicate testing for presence of statements following the DELAY.
1691 that was always true. For the case of no statements following
1692 the ACCEPT, jump directly to End_Lab instead of introducing an
1694 (Expand_N_Selective_Accept): Fix incorrect insertion point for
1697 2012-07-16 Thomas Quinot <quinot@adacore.com>
1699 * gnat_rm.texi: Minor documentation improvements.
1701 2012-07-16 Yannick Moy <moy@adacore.com>
1703 * sem_ch13.adb (Analyze_Aspect_Specifications): Allow Pre
1704 and Pre'Class aspects on the same declaration.
1705 * sem_prag.adb (Chain_PPC): Allow Pre and Pre'Class aspects on the
1706 same hierarchy of primitive operations.
1708 2012-07-16 Thomas Quinot <quinot@adacore.com>
1710 * freeze.adb (Check_Component_Storage_Order): Do not reject a
1711 nested composite with different scalar storage order if it is
1714 2012-07-16 Thomas Quinot <quinot@adacore.com>
1716 * gnat_rm.texi: Update documentation for Scalar_Storage_Order.
1718 2012-07-16 Tristan Gingold <gingold@adacore.com>
1720 * a-exexpr.adb (Propagate_Exception): Adjust call to
1721 Exception_Traces procedures.
1722 * a-exexpr-gcc.adb (Setup_Current_Excep): Now a
1723 function that returns an access to the Ada occurrence.
1724 (Propagate_GCC_Exception): Adjust calls.
1725 * raise.h (struct Exception_Occurrence): Declare.
1726 * a-exextr.adb: Remove useless pragma. (Notify_Handled_Exception,
1727 Notify_Unhandled_Exception) (Unhandled_Exception_Terminate):
1728 Add Excep parameter.
1729 * a-except.adb (Notify_Handled_Exception,
1730 Notify_Unhandled_Exception) (Unhandled_Exception_Terminate):
1731 Add Excep parameter.
1732 (Process_Raise_Exception): Adjust calls.
1733 * a-except-2005.adb (Notify_Handled_Exception,
1734 Notify_Unhandled_Exception) (Unhandled_Exception_Terminate): Add
1736 (Raise_Exception): Calls Raise_Exception_Always.
1737 * raise-gcc.c (__gnat_setup_current_excep,
1738 __gnat_notify_handled_exception)
1739 (__gnat_notify_unhandled_exception): Adjust declarations.
1740 (PERSONALITY_FUNCTION): Adjust calls.
1741 (__gnat_personality_seh0): Remove warning.
1743 2012-07-16 Javier Miranda <miranda@adacore.com>
1745 * sem_eval.adb (Test_Expression_Is_Foldable): Adding documentation.
1746 (Eval_Relational_Op): Adding documentation.
1748 2012-07-16 Robert Dewar <dewar@adacore.com>
1750 * freeze.adb, g-debpoo.adb, exp_ch3.adb: Minor reformatting.
1752 2012-07-16 Thomas Quinot <quinot@adacore.com>
1754 * s-oscons-tmplt.c: Add definitions of E2BIG and EILSEQ.
1756 2012-07-16 Tristan Gingold <gingold@adacore.com>
1758 * a-exexpr.adb (Propagate_Continue): New function replacing
1759 Raise_Current_Excep.
1760 (Allocate_Occurrence): New function.
1761 (Propagate_Exception): Add Excep parameter, remove call to Call_Chain.
1762 * a-exexpr-gcc.adb (GNAT_GCC_Exception): Occurrence component
1764 (To_GCC_Exception): Convert from Address.
1765 (Allocate_Occurrence): Allocate an Unwind exception occurrence.
1766 (Setup_Current_Excep): Fill the machine occurrence in case of
1768 (Propagate_Exception): Add Excep parameter, remove call to Call_Chain.
1769 * a-except.adb (Set_Exception_C_Msg, Set_Exception_Msg): add
1771 (Raise_Exception, Raise_Exception_Always,
1772 Raise_Exception_No_Defer): Adjust calls to the above procedures.
1773 (Raise_From_Signal_Handler, Raise_With_Location_And_Msg)
1774 (Rcheck_PE_Finalize_Raised_Exception): Likewise.
1775 * a-except-2005.adb (Set_Exception_C_Msg, Set_Exception_Msg):
1776 add Excep parameter.
1777 (Propagate_Exception): Likewise.
1778 (Allocate_Occurrence): New function.
1779 (Raise_Current_Excep): Removed.
1780 (Complete_Occurrence): New function to save the call chain.
1781 (Complete_And_Propagate_Occurrence): New procedure.
1782 (Create_Occurrence_From_Signal_Handler): New function to build an
1783 occurrence without propagating it.
1784 (Create_Machine_Occurrence_From_Signal_Handler): Likewise, but
1785 return the machine occurrence.
1786 (Raise_From_Signal_Handler): Use Create_Occurrence_From_Signal_Handler.
1787 (Raise_Exception, Raise_Exception_Always, Raise_Exception_No_Defer):
1788 Adjust calls to the above procedures. Allocate the occurrence at
1790 (Raise_With_Location_And_Msg, Raise_With_Msg)
1791 (Rcheck_PE_Finalize_Raised_Exceptionm Reraise): Likewise.
1792 (Reraise_Occurrence): Use Reraise_Occurrence_Always.
1793 (Reraise_Occurrence_Always): Use Reraise_Occurrence_No_Defer.
1794 (Reraise_Occurrence_No_Defer): Preserve machine occurrence.
1795 (Save_Occurrence): Do not save machine occurrence.
1796 * a-except-2005.ads (Exception_Occurrence): Add Machine_Occurrence
1798 (Null_Occurrence): Consider it.
1799 * a-exexda.adb (Set_Exception_C_Msg, Set_Exception_Msg): add
1802 2012-07-16 Tristan Gingold <gingold@adacore.com>
1804 * seh_init.c (__gnat_map_SEH): New function extracted from
1805 __gnat_SEH_error_handler.
1806 * raise-gcc.c: __gnat_personality_seh0: Directly transforms
1807 Windows system exception into GCC one when possible, in order
1808 to save stack room (particularly useful when Storage_Error will
1811 2012-07-16 Robert Dewar <dewar@adacore.com>
1813 * a-direct.adb, g-dirope.adb: Minor reformatting.
1815 2012-07-16 Tristan Gingold <gingold@adacore.com>
1817 * a-except.ads, a-except-2005.ads: Remove outdated comment.
1819 2012-07-16 Robert Dewar <dewar@adacore.com>
1821 * sem_ch6.adb (Subprogram_Name_Greater): Fix algorithm to
1822 conform to documentation.
1824 2012-07-16 Ed Schonberg <schonberg@adacore.com>
1826 * gnat1drv.adb (Check_Library_Items): Removed, no longer used.
1828 2012-07-16 Ed Schonberg <schonberg@adacore.com>
1830 * sem_ch3.adb (Array_Type_Declaration): if component type has
1831 invariants, the array type itself requires an invariant procedure.
1832 * exp_ch3.ads, exp_ch3.adb (Build_Array_Invariant_Proc): new
1833 procedure, to build a checking procedure that applies the
1834 invariant check on some type T to each component of an array
1835 of T's. Code is similar to the construction of the init_proc
1836 for an array, and handles multidimensional arrays by recursing
1837 over successive dimensions.
1839 2012-07-16 Hristian Kirtchev <kirtchev@adacore.com>
1841 * g-debpoo.adb: Revert previous change.
1843 2012-07-16 Hristian Kirtchev <kirtchev@adacore.com>
1845 * freeze.adb (Freeze_Entity): Insert the itype reference to a
1846 library-level class-wide subtype after the freeze node of the
1847 equivalent record type.
1849 2012-07-16 Pascal Obry <obry@adacore.com>
1851 * s-crtl.ads (mkdir): New routine, support encoding.
1852 * adaint.h (__gnat_mkdir): Update spec to pass encoding.
1853 * mkdir.c (__gnat_mkdir): Add encoding parameter.
1854 * a-direct.adb (Create_Directory): Use CRTL.mkdir, parse encoding
1856 * g-dirope.adb (Make_Dir): Update to pass encoding parameter.
1858 2012-07-16 Pascal Obry <obry@adacore.com>
1860 * adaint.c: Minor reformatting.
1862 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
1864 * gcc-interface/utils.c: Include timevar.h.
1865 * Make-lang.in: Fix dependencies.
1867 2012-07-16 Vasiliy Fofanov <fofanov@adacore.com>
1869 * ug_words, vms_data.ads: Document VMS qualifiers for -gnatn1/2
1872 2012-07-16 Bob Duff <duff@adacore.com>
1874 * sinfo.ads: Minor comment fix.
1876 2012-07-16 Bob Duff <duff@adacore.com>
1878 * sem_elab.adb (Within_Elaborate_All): Walk the with clauses to
1879 find pragmas Elaborate_All that may be found in the transitive
1880 closure of the dependences.
1882 2012-07-16 Robert Dewar <dewar@adacore.com>
1884 * exp_pakd.adb, freeze.adb, sem_util.adb, vms_data.ads: Minor
1887 2012-07-12 Vasiliy Fofanov <fofanov@adacore.com>
1889 * vms_data.ads: Add VMS qualifiers for -gnatn1/2 switches.
1891 2012-07-12 Thomas Quinot <quinot@adacore.com>
1893 * exp_ch5.adb, exp_pakd.adb, rtsfind.ads, freeze.adb, sem_util.adb,
1894 sem_util.ads, exp_aggr.adb
1895 (Exp_Aggr.Packed_Array_Aggregate_Handled): Simplify processing
1896 for reverse storage order aggregate.
1897 (Exp_Pakd.Byte_Swap): New utility routine used by...
1898 (Exp_Pakd.Expand_Bit_Packed_Element_Set,
1899 Expand_Packed_Element_Reference): For the case of a free-standing
1900 packed array with reverse storage order, perform byte swapping.
1901 (Rtsfind): Make new entities RE_Bswap_{16,32,64} available.
1902 (Freeze.Check_Component_Storage_Order): New utility routine
1903 to enforce legality rules for nested composite types whose
1904 enclosing composite has an explicitly defined Scalar_Storage_Order
1906 (Sem_Util.In_Reverse_Storage_Order_Object): Renamed from
1907 Sem_Util.In_Reverse_Storage_Order_Record, as SSO now applies to
1908 array types as well.
1909 (Exp_Ch5.Expand_Assign_Array): Remove now unnecessary kludge
1910 for change of scalar storage order in assignments. The Lhs and
1911 Rhs now always have the same scalar storage order.
1913 2012-07-12 Hristian Kirtchev <kirtchev@adacore.com>
1915 * g-debpoo.adb (Allocate): Add local constant
1916 No_Element. Initialize the allocated memory chunk to No_Element.
1918 2012-07-12 Ed Schonberg <schonberg@adacore.com>
1920 * sem_ch12.adb (Validate_Derived_Type_Instance): Handle properly
1921 the case of an instance of a child unit where a formal derived
1922 type DT is an extension of a type T declared in a parent unit,
1923 and the actual in the instance of the child is the type T declared
1924 in the parent instance, and that actual is not a derived type.
1926 2012-07-12 Eric Botcazou <ebotcazou@adacore.com>
1927 Tristan Gingold <gingold@adacore.com>
1929 * system-hpux-ia64.ads: Enable ZCX by default.
1930 * gcc-interface/Makefile.in: Use alternate stack on ia64-hpux.
1931 Change soext to .so.
1933 2012-07-12 Robert Dewar <dewar@adacore.com>
1935 * s-atopri.adb, s-atopri.ads: Minor reformatting.
1937 2012-07-12 Robert Dewar <dewar@adacore.com>
1939 * ali.adb: Add circuitry to read new named form of restrictions lines.
1940 * debug.adb: Add doc for new -gnatd.R switch (used positional
1941 notation for output of restrictions data in ali file).
1942 * lib-writ.adb: Implement new named format for restrictions lines.
1943 * lib-writ.ads: Add documentation for new named format for
1944 restrictions in ali files.
1945 * restrict.adb, restrict.ads, sem_prag.adb: Update comments.
1946 * rident.ads: Go back to withing System.Rident
1947 * s-rident.ads: Add extensive comment on dealing with consistency
1950 2012-07-12 Thomas Quinot <quinot@adacore.com>
1952 * par_sco.adb, scos.ads: Emit detailed SCOs for SELECT statements.
1954 2012-07-12 Robert Dewar <dewar@adacore.com>
1956 * sem_disp.adb: Minor reformatting
1957 * s-bytswa.ads: Minor comment update.
1959 2012-07-12 Vincent Pucci <pucci@adacore.com>
1961 * exp_ch9.adb (Build_Lock_Free_Unprotected_Subprogram_Body):
1962 Atomic_Load_N replaced by Lock_Free_Read_N. Atomic_Compare_Exchange_N
1963 replaced by Lock_Free_Try_Write_N.
1964 Renaming of several local variables. For
1965 procedure, Expected_Comp declaration moved to the declaration
1966 list of the procedure.
1967 * rtsfind.ads: RE_Atomic_Compare_Exchange_8,
1968 RE_Atomic_Compare_Exchange_16, RE_Atomic_Compare_Exchange_32,
1969 RE_Atomic_Compare_Exchange_64, RE_Atomic_Load_8,
1970 RE_Atomic_Load_16, RE_Atomic_Load_32, RE_Atomic_Load_64,
1971 RE_Atomic_Synchronize, RE_Relaxed removed. RE_Lock_Free_Read_8,
1972 RE_Lock_Free_Read_16, RE_Lock_Free_Read_32, RE_Lock_Free_Read_64,
1973 RE_Lock_Free_Try_Write_8, RE_Lock_Free_Try_Write_16,
1974 RE_Lock_Free_Try_Write_32, RE_Lock_Free_Try_Write_64 added.
1975 * s-atopri.adb: New file.
1976 * s-atopri.ads (Atomic_Compare_Exchange_8): Renaming of
1977 parameters. Import primitive __sync_val_compare_and_swap_1.
1978 (Atomic_Compare_Exchange_16): Renaming of parameters.
1979 Import primitive __sync_val_compare_and_swap_2.
1980 (Atomic_Compare_Exchange_32): Renaming of parameters.
1981 Import primitive __sync_val_compare_and_swap_4.
1982 (Atomic_Compare_Exchange_64): Renaming of parameters. Import
1983 primitive __sync_val_compare_and_swap_8.
1984 (Atomic_Load_8): Ptr renames parameter X.
1985 (Atomic_Load_16): Ptr renames parameter X.
1986 (Atomic_Load_32): Ptr renames parameter X.
1987 (Atomic_Load_64): Ptr renames parameter X.
1988 (Lock_Free_Read_8): New routine.
1989 (Lock_Free_Read_16): New routine.
1990 (Lock_Free_Read_32): New routine.
1991 (Lock_Free_Read_64): New routine.
1992 (Lock_Free_Try_Write_8): New routine.
1993 (Lock_Free_Try_Write_16): New routine.
1994 (Lock_Free_Try_Write_32): New routine.
1995 (Lock_Free_Try_Write_64): New routine.
1997 2012-07-12 Robert Dewar <dewar@adacore.com>
1999 * exp_attr.adb, exp_ch9.adb, sem_ch9.adb, exp_aggr.adb: Minor
2002 2012-07-12 Vincent Pucci <pucci@adacore.com>
2004 * sem_dim.adb (Analyze_Dimension_Function_Call): Reformatting of error
2005 msgs for elementary functions.
2007 2012-07-12 Vincent Pucci <pucci@adacore.com>
2009 * sem_attr.adb (Eval_Attribute): Minor reformatting.
2011 2012-07-12 Pascal Obry <obry@adacore.com>
2013 * prj-nmsc.adb (Check_Library_Attributes): Allow the same library
2014 project in different project tree (different aggregated projects).
2016 2012-07-12 Thomas Quinot <quinot@adacore.com>
2018 * s-bytswa.adb, g-bytswa.adb, g-bytswa.ads, s-bytswa.ads: Further
2019 reorganization of byte swapping routines.
2021 2012-07-12 Ed Schonberg <schonberg@adacore.com>
2023 * sem_disp.adb (Check_Dispatching_Context): Refine legality
2024 checks on tagg indeterminate calls to abstract operations,
2025 that appear in the context of other calls.
2027 2012-07-12 Thomas Quinot <quinot@adacore.com>
2029 * s-bytswa.adb (Swapped2.Bswap16): Remove local function,
2032 2012-07-12 Javier Miranda <miranda@adacore.com>
2034 * exp_attr.adb (Expand_N_Attribute_Reference): For
2035 attributes 'access, 'unchecked_access and 'unrestricted_access,
2036 iff the current instance reference is located in a protected
2037 subprogram or entry then rewrite the access attribute to be the
2038 name of the "_object" parameter.
2040 2012-07-12 Tristan Gingold <gingold@adacore.com>
2042 * raise.h: Revert previous patch: structure is used in init.c
2045 2012-07-12 Vincent Celier <celier@adacore.com>
2047 * make.adb (Binding_Phase): If --subdirs was used, but not
2048 -P, change the working directory to the specified subdirectory
2049 before invoking gnatbind.
2050 (Linking_Phase): If --subdirs was used, but not -P, change the working
2051 directory to the specified subdirectory before invoking gnatlink.
2053 2012-07-12 Vincent Pucci <pucci@adacore.com>
2055 * exp_ch9.adb (Build_Lock_Free_Unprotected_Subprogram_Body):
2056 For a procedure, instead of replacing each Comp reference by a
2057 reference to Current_Comp, make a renaming Comp of Current_Comp
2058 that rewrites the original renaming generated by the compiler
2059 during the analysis. Move the declarations of the procedure
2060 inside the generated block.
2061 (Process_Stmts): Moved in the body
2062 of Build_Lock_Free_Unprotected_Subprogram_Body.
2064 Moved in the body of Build_Lock_Free_Unprotected_Subprogram_Body.
2065 * sem_ch9.adb (Allows_Lock_Free_Implementation): Restrict any
2066 non-elementary out parameters in protected procedures.
2068 2012-07-12 Thomas Quinot <quinot@adacore.com>
2070 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
2071 Scalar_Storage_Order): Attribute applies to base type only.
2073 2012-07-12 Ed Schonberg <schonberg@adacore.com>
2075 * exp_aggr.adb (Convert_To_Positional): Increase acceptable size
2076 of static aggregate when Static_Elaboration_Desired is requested.
2077 Add a warning if the request cannot be satisfied either because
2078 some components or some array bounds are non-static.
2080 2012-07-12 Thomas Quinot <quinot@adacore.com>
2082 * exp_pakd.adb: Minor reformatting.
2084 2012-07-12 Tristan Gingold <gingold@adacore.com>
2086 * tracebak.c: Fix warnings.
2087 * raise-gcc.c (__gnat_adjust_context): New function
2088 (__gnat_personality_seh0): Call __gnat_adjust_context to adjust
2089 PC in machine frame for exceptions that occur in the current
2092 2012-07-12 Thomas Quinot <quinot@adacore.com>
2094 * g-bytswa.adb, g-bytswa.ads, s-bytswa.adb, s-bytswa.ads, Makefile.rtl:
2095 Move GNAT.Byte_Swapping to System (with a renaming under GNAT)
2096 so that it is usable in expanded code.
2098 2012-07-12 Tristan Gingold <gingold@adacore.com>
2100 * s-osinte-hpux.ads: Increase alternate stack size on hpux.
2102 2012-07-12 Javier Miranda <miranda@adacore.com>
2104 * exp_ch3.adb (Make_Neq_Body): Fix typo in comment.
2106 2012-07-12 Eric Botcazou <ebotcazou@adacore.com>
2108 * tb-gcc.c (trace_callback): On IA-64/HP-UX, use workaround only
2109 if USE_LIBUNWIND_EXCEPTIONS is defined.
2110 * init.c: Further tweaks for IA-64/HP-UX.
2112 2012-07-12 Tristan Gingold <gingold@adacore.com>
2114 * raise-gcc.c: Do not include unwind-dw2-fde.h. Adjust comments.
2115 (db_region_for): Second argument is ip. Do not recompute ip.
2116 (action_kind): Remove typedef, add unhandler enum const.
2117 (action_descriptor): Adjust type of kind field.
2118 (db_action_for): Second argument is ip, do not recompute it.
2119 (get_call_site_action_for): First argument is call_site, do not
2120 recompute it. Remove useless return.
2121 (is_handled_by): Now return enum action_kind.
2122 Handle GNAT_ALL_OTHERS first.
2123 Return unhandler for GNAT_UNHANDLED_OTHERS.
2124 (get_action_description_for): First argument is now ip, do not
2125 recompute it. Adjust code for call to is_handled_by.
2126 (__gnat_notify_unhandled_exception): Add prototype.
2127 (PERSONALITY_FUNCTION): Call get_ip_from_context. Adjust calls.
2128 Handle unhandler case.
2129 (__gnat_cleanupunwind_handler): Add comments, add
2130 ATTRIBUTE_UNUSED on arguments.
2131 (__gnat_Unwind_RaiseException, __gnat_Unwind_ForcedUnwind): Define
2133 * raise.h: Makes struct Exception_Data opaque.
2135 2012-07-12 Robert Dewar <dewar@adacore.com>
2137 * make.adb, sem_ch9.adb, prj.adb, s-rident.ads, snames.ads-tmpl: Minor
2140 2012-07-12 Javier Miranda <miranda@adacore.com>
2142 * exp_ch3.adb (Is_User_Defined_Equality): New subprogram.
2143 (Make_Neq_Body): New subprogram.
2144 (Make_Predefined_Primitive_Specs): Adding local variable
2145 Has_Predef_Eq_ Renaming to ensure that we enable the machinery
2146 which handles renamings of predefined primitive operators.
2148 2012-07-09 Pascal Obry <obry@adacore.com>
2150 * prj.adb (For_Every_Project_Imported_Context): Make sure we
2151 callback with the project having sources.
2154 2012-07-09 Eric Botcazou <ebotcazou@adacore.com>
2156 * make.adb: Fix typo.
2158 2012-07-09 Vincent Pucci <pucci@adacore.com>
2160 * sem_ch9.adb (Check_Node): Allow attributes
2161 that denote static function for lock-free implementation.
2162 (Is_Static_Function): New routine.
2164 2012-07-09 Tristan Gingold <gingold@adacore.com>
2166 * tracebak.c: Adjust skip_frames on Win64.
2168 2012-07-09 Tristan Gingold <gingold@adacore.com>
2170 * init.c: Add __gnat_adjust_context_for_raise for ia64/hpux.
2171 * raise-gcc.c: __gnat_cleanupunwind_handler: Do not call
2172 _Unwind_GetGR on hpux when using libgcc unwinder. Part of
2174 2012-07-09 Vincent Pucci <pucci@adacore.com>
2176 * exp_attr.adb, sem_attr.adb: Minor reformatting.
2177 * par-ch13.adb, par-ch4.adb, par-util.adb: Reformatting
2178 considering that internal attribute names are not defined anymore
2179 in the main attribute names list.
2180 * snames.adb-tmpl (Get_Attribute_Id): Special processinf
2181 for names CPU, Dispatching_Domain and Interrupt_Priority.
2182 (Is_Internal_Attribute_Name): Minor reformatting.
2183 * snames.ads-tmpl: New list of internal attribute names. Internal
2184 attributes moved at the end of the attribute Id list.
2186 2012-07-09 Robert Dewar <dewar@adacore.com>
2188 * freeze.adb: Minor code reorganization (use Ekind_In).
2189 * exp_attr.adb, sem_ch9.adb par-ch4.adb, s-taprop-mingw.adb,
2190 sem_attr.adb, exp_ch8.adb, snames.adb-tmpl, par-util.adb,
2191 sem_ch13.adb, snames.ads-tmpl: Minor reformatting.
2193 2012-07-09 Tristan Gingold <gingold@adacore.com>
2195 * raise-gcc.c: Adjust previous patch.
2197 2012-07-09 Vincent Celier <celier@adacore.com>
2199 * make.adb (Compilation_Phase): Do not build libraries in
2200 Codepeer mode (do not call Library_Phase).
2202 2012-07-09 Ed Schonberg <schonberg@adacore.com>
2204 * sem_ch13.adb: Extend previous change to elementary types.
2206 2012-07-09 Javier Miranda <miranda@adacore.com>
2208 * exp_ch8.adb (Expand_N_Subprogram_Renaming_Declaration): Reverse
2209 previous patch since unconditionally handling as renaming_as_body
2210 renamings of predefined dispatching equality and unequality operator
2211 cause visibility problems with private overridings of the equality
2212 operator (see ACATS C854001).
2214 2012-07-09 Vincent Pucci <pucci@adacore.com>
2216 * exp_attr.adb (Signal_Bad_Attribute): Raise Program_Error in
2217 case of internal attribute names (already rejected by the parser).
2218 * par-ch13.adb (P_Representation_Clause): Complain if an internal
2219 attribute name that comes from source occurs.
2220 * par-ch4.adb (P_Name): Complain if an internal attribute name
2221 occurs in the context of an attribute reference.
2222 * par-util.adb (Signal_Bad_Attribute): Don't complain about
2223 mispelling attribute with internal attributes.
2224 * sem_attr.adb (Analyze_Attribute): Raise Program_Error in case
2225 of internal attribute names (already rejected by the parser).
2226 * snames.adb-tmpl (Is_Internal_Attribute_Name): New routine.
2227 * snames.ads-tmpl: Attributes CPU, Dispatching_Domain and
2228 Interrupt_Priority are marked as INT attributes since they
2229 don't denote real attribute and are only used internally in
2231 (Is_Internal_Attribute_Name): New routine.
2233 2012-07-09 Thomas Quinot <quinot@adacore.com>
2235 * einfo.adb (Set_Reverse_Storage_Order): Update assertion,
2236 flag is now valid for array types as well.
2238 2012-07-09 Tristan Gingold <gingold@adacore.com>
2240 * tracebak.c: Implement __gnat_backtrace for Win64 SEH.
2242 2012-07-09 Robert Dewar <dewar@adacore.com>
2244 * einfo.ads: Minor reformatting.
2246 2012-07-09 Javier Miranda <miranda@adacore.com>
2248 * exp_ch8.adb (Expand_N_Subprogram_Renaming_Declaration): Handle as
2249 renaming_as_body renamings of predefined dispatching equality
2250 and unequality operators.
2252 2012-07-09 Robert Dewar <dewar@adacore.com>
2254 * rident.ads: Do not instantiate r-ident.ads, this is now an
2257 2012-07-09 Javier Miranda <miranda@adacore.com>
2259 * exp_disp.adb (Write_DT): Avoid runtime crash of this debugging
2261 * sem_disp.adb (Find_Dispatching_Time): Protect this routine
2262 against partially decorated entities.
2264 2012-07-09 Ed Schonberg <schonberg@adacore.com>
2266 * sem_ch13.adb (Check_Size): Reject a size clause that specifies
2267 a value greater than Int'Last for a scalar type.
2269 2012-07-09 Vincent Pucci <pucci@adacore.com>
2271 * sem_ch9.adb (Allows_Lock_Free_Implementation): type must support
2272 atomic operation moved to the protected body case. No non-elementary
2273 out parameter moved to the protected declaration case. Functions have
2274 only one lock-free restriction.
2275 (Analyze_Protected_Type_Declaration): Issue a warning when
2276 Priority given with Lock_Free.
2278 2012-07-09 Vincent Pucci <pucci@adacore.com>
2280 * sem_dim.adb: Grammar of aspect Dimension fixed.
2282 2012-07-09 Vincent Pucci <pucci@adacore.com>
2284 * freeze.adb (Freeze_Record_Type): Code reorg in order to avoid
2285 pushing and popping the scope stack whenever a delayed aspect occurs.
2287 2012-07-09 Gary Dismukes <dismukes@adacore.com>
2289 * s-os_lib.ads: Remove pragma Elaborate_Body, as
2290 this is now unnecessary due to recently added pragma Preelaborate.
2292 2012-07-09 Jose Ruiz <ruiz@adacore.com>
2294 * s-taprop-mingw.adb (Set_Priority): Remove the code that was
2295 previously in place to reorder the ready queue when a task drops
2296 its priority due to the loss of inherited priority.
2298 2012-07-09 Robert Dewar <dewar@adacore.com>
2300 * layout.adb, i-cstrea.ads, a-ststio.ads, prj-util.ads, sem_cat.adb,
2301 s-commun.ads, s-ficobl.ads, s-os_lib.ads, s-fileio.ads: Minor
2304 2012-07-09 Eric Botcazou <ebotcazou@adacore.com>
2306 * raise-gcc.c: Update comments. Fix typo.
2308 2012-07-09 Thomas Quinot <quinot@adacore.com>
2310 * einfo.adb, einfo.ads, sem_attr.adb, sem_ch13.adb: Attribute
2311 Scalar_Storage_Order can be defined or queried for array types as well
2314 2012-07-09 Tristan Gingold <gingold@adacore.com>
2316 * a-exexpr-gcc.adb (CleanupUnwind_Handler): Now imported from
2318 * raise-gcc.c (__gnat_cleanupunwind_handler): Defined.
2319 Strictly follow the ABI convention on ia64.
2321 2012-07-09 Gary Dismukes <dismukes@adacore.com>
2323 * a-ststio.ads: Add pragma Preelaborate, per AI05-0283.
2324 * i-cstrea.ads (max_path_len): Change from variable to deferred
2325 constant to allow it to be used as a bound in string component
2326 in type System.File_IO.Temp_File_Record.
2327 * s-os_lib.ads, s-commun.ads, s-ficobl.ads, s-fileio.ads: Add pragma
2329 * s-fileio.adb (Get_Case_Sensitive): Move function inside
2331 (File_Names_Case_Sensitive): Move variable inside
2332 procedure Open, to avoid violation of Preelaborate restriction
2333 (due to call to Get_Case_Sensitive).
2335 2012-07-09 Ed Schonberg <schonberg@adacore.com>
2337 * layout.adb (Set_Elem_Alignment): Protect against meaningless
2338 size clause, to prevent overflow in internal computation of
2341 2012-07-09 Robert Dewar <dewar@adacore.com>
2343 * freeze.adb, prj-util.adb, prj-util.ads, sem_ch13.adb: Minor
2346 2012-07-09 Gary Dismukes <dismukes@adacore.com>
2348 * sem_cat.adb (Check_Categorization_Dependencies):
2349 Allow dependence of both Remote_Types and Remote_Call_Interface
2350 declarations (not just Remote_Types units) on preelaborated
2351 units, but require that the dependence be made via a private
2352 with_clause. Issue a specialized error message.
2354 2012-07-09 Pascal Obry <obry@adacore.com>
2356 * prj-util.adb, prj-util.ads (For_Interface_Sources): New routine.
2358 2012-07-09 Tristan Gingold <gingold@adacore.com>
2360 * seh_init.c (__gnat_SEH_error_handler): On Win64 and SEH,
2361 return for unknown exceptions.
2362 * raise-gcc.c (__gnat_personality_seh0): Call __gnat_SEH_error_handler.
2364 2012-07-09 Joel Brobecker <brobecker@adacore.com brobecker>
2366 * exp_dbug.ads (No_Dollar_In_Label): Delete.
2368 2012-07-09 Vincent Pucci <pucci@adacore.com>
2370 * sem_ch13.adb (Check_Overloaded_Name): New routine.
2372 2012-07-09 Vincent Pucci <pucci@adacore.com>
2374 * freeze.adb (Freeze_Record_Type): Analyze the delayed aspects of the
2375 components in a record type.
2377 2012-07-09 Pascal Obry <obry@adacore.com>
2379 * prj-util.ads: Minor reformatting.
2381 2012-07-09 Tristan Gingold <gingold@adacore.com>
2383 * raise-gcc.c (db_indent): Simplify style, improve comments.
2384 Remove !IN_RTS part (dead).
2386 2012-07-09 Robert Dewar <dewar@adacore.com>
2388 * usage.adb: Minor change to format of -gnatn line.
2390 2012-07-09 Tristan Gingold <gingold@adacore.com>
2392 * a-exexpr-gcc.adb: Reorder routine.
2394 2012-07-09 Vincent Celier <celier@adacore.com>
2396 * lib-writ.ads: Add documentation for the Z lines (implicitly
2397 withed units) and Y lines (limited withed units).
2399 2012-07-09 Robert Dewar <dewar@adacore.com>
2401 * lib.ads, exp_attr.adb, exp_ch9.adb, sem_dim.adb, sem_ch9.adb,
2402 sem_prag.adb, sem_ch12.adb, mlib-utl.adb, freeze.adb, sem_res.adb,
2403 sem_attr.adb, sem_case.adb, gnatlink.adb, exp_ch4.adb, sem_ch6.adb,
2404 sem_elim.adb, s-dimmks.ads, sem_ch13.adb: Minor code clean ups.
2406 2012-07-09 Eric Botcazou <ebotcazou@adacore.com>
2408 * gnat_ugn.texi (Switches for gcc): Document -gnatn[12] only
2409 lightly in the summary and more thoroughly in inlining section.
2410 (Performance Considerations): Document -gnatn[12] in inlining
2413 2012-07-09 Tristan Gingold <gingold@adacore.com>
2415 * a-exexpr-gcc.adb (Unhandled_Except_Handler): New procedure.
2416 (Unhandled_Others_Value): New const.
2417 * raise-gcc.c (GNAT_UNHANDLED_OTHERS): Define.
2418 (action_descriptor): Remove ttype_entry.
2419 (get_action_description_for): Do not assign ttype_entry.
2420 (is_handled_by): Consider GNAT_UNHANDLED_OTHERS.
2422 2012-07-03 Eric Botcazou <ebotcazou@adacore.com>
2424 * gcc-interface/trans.c (Call_to_gnu): Robustify test for function case
2425 if the CICO mechanism is used.
2427 2012-07-03 Eric Botcazou <ebotcazou@adacore.com>
2429 * gcc-interface/utils2.c (build_simple_component_ref): Do not look
2430 through an extension if the type contains a placeholder.
2432 2012-07-03 Eric Botcazou <ebotcazou@adacore.com>
2434 * exp_disp.adb (Expand_Dispatching_Call): Propagate the convention on
2435 the designated subprogram type and also set Is_Dispatch_Table_Entity.
2436 (Expand_Interface_Thunk): Propagate the convention on the thunk.
2437 (Set_CPP_Constructors_Old): Set Is_Constructor and Convention_CPP on
2438 the internal view of the constructors.
2439 (Set_CPP_Constructors): Likewise.
2440 * sem_prag.adb (Analyze_Pragma) <Pragma_CPP_Constructor>: Set the
2441 convention on the function.
2442 * gcc-interface/gigi.h (is_cplusplus_method): Declare.
2443 * gcc-interface/decl.c (Has_Thiscall_Convention): New macro.
2444 (gnat_to_gnu_entity) <E_Subprogram_Type>: Test it to set the `thiscall'
2446 (get_minimal_subprog_decl): Likewise.
2447 (is_cplusplus_method): New predicate.
2448 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Access>: Issue an
2449 error on access to C++ constructor or member function.
2451 2012-07-03 Eric Botcazou <ebotcazou@adacore.com>
2453 * gcc-interface/utils.c (gnat_pushdecl): Set TYPE_CONTEXT for types
2454 attached to a TYPE_DECL.
2456 2012-06-26 Vincent Pucci <pucci@adacore.com>
2458 * exp_ch3.adb (Build_Init_Statements): Don't check the parents
2459 in the Rep Item Chain of the task for aspects Interrupt_Priority,
2460 Priority, CPU and Dispatching_Domain.
2461 * exp_ch9.adb (Expand_N_Task_Type_Declaration): fields _Priority,
2462 _CPU and _Domain are present in the corresponding record type
2463 only if the task entity has a pragma, attribute definition
2464 clause or aspect specification.
2465 (Make_Initialize_Protection): Don't check the parents in the Rep Item
2466 Chain of the task for aspects Interrupt_Priority, Priority, CPU and
2468 * freeze.adb (Freeze_Entity): Use of Evaluate_Aspects_At_Freeze_Point
2469 call replaced by Analyze_Aspects_At_Freeze_Point.
2470 * sem_ch13.adb, sem_ch13.ads (Analyze_Aspects_At_Freeze_Point):
2471 Renaming of Evaluate_Aspects_At_Freeze_Point.
2473 2012-06-26 Yannick Moy <moy@adacore.com>
2475 * sem_attr.adb (Analyze_Attribute): Detect if 'Old is used outside a
2476 postcondition, and issue an error in such a case.
2478 2012-06-26 Yannick Moy <moy@adacore.com>
2480 * gnat_rm.texi: Minor editing.
2482 2012-06-26 Tristan Gingold <gingold@adacore.com>
2484 * raise-gcc.c: Minor cleanup: remove unused prototype.
2485 * seh_init.c: Do not create an image wide unwind info to catch
2486 SEH when SEH unwind info are emitted by the compiler.
2488 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
2490 * gcc-interface/trans.c: Include target.h.
2491 (gigi): Try to put out .ident with targetm.asm_out.output_ident.
2492 Remove uses of ASM_OUTPUT_IDENT.
2493 * gcc-interface/Make-lang.in: Fix dependencies.
2495 2012-06-15 Eric Botcazou <ebotcazou@adacore.com>
2498 * gcc-interface/gigi.h (maybe_vector_array): Make static inline.
2499 * gcc-interface/utils.c (maybe_vector_array): Delete.
2500 * gcc-interface/trans.c (gnat_to_gnu) <N_Indexed_Component>: Mark the
2501 array object as addressable if it has vector type and is on the LHS.
2503 2012-06-15 Eric Botcazou <ebotcazou@adacore.com>
2506 * gcc-interface/misc.c (gnat_init_options_struct): Set
2507 opts->x_flag_delete_dead_exceptions to 1.
2509 2012-06-14 Jose Ruiz <ruiz@adacore.com>
2511 * gcc-interface/Make-lang.in (ada.install-common, ada.uninstall):
2512 Use the prefix specified with the --program-prefix configure option
2513 to determine the install name of the Ada tools.
2514 (ada.all.cross): Use a for loop to iterate over the set of Ada tools
2515 instead of duplicate the same processing.
2516 Update dependencies.
2518 2012-06-14 Vincent Pucci <pucci@adacore.com>
2520 * exp_ch6.adb (Expand_Call): Expand_Put_Call_With_Dimension_Symbol
2521 call replaced by Expand_Put_Call_With_Symbol call.
2522 * sem_dim.adb: New fields Unit_Names, Unit_Symbols
2523 and Dim_Symbols for record type System_Type.
2524 (From_Dimension_To_String_Of_Symbols): Removed.
2525 (From_Dim_To_Str_Of_Dim_Symbols): Renames previous
2526 routine From_Dimension_To_String_Of_Symbols.
2527 (From_Dim_To_Str_Of_Unit_Symbols): New routine.
2528 (Analyze_Aspect_Dimension): argument Symbol in aspect
2529 Dimension aggregate is optional. Named association implemented.
2530 (Has_Compile_Time_Known_Expressions): Removed.
2531 (Analyze_Aspect_Dimension_System): New
2532 component Dim_Symbol in each Dimension aggregate in
2533 aspect Dimension_System. Named associations implemented.
2534 (Add_Dimension_Vector_To_Buffer): Removed.
2535 (Add_Whole_To_Buffer): Removed.
2536 (Expand_Put_Call_With_Dimension_Symbol.): Removed.
2537 (Expand_Put_Call_With_Symbol): Renames previous routine
2538 Expand_Put_Call_With_Dimension_Symbol.
2539 (Has_Dimension_Symbols): Removed.
2540 (Has_Symbols): Renames previous routine
2541 Has_Dimension_Symbols. (Store_String_Oexpon): New routine.
2542 * sem_dim.ads (Expand_Put_Call_With_Dimension_Symbol.): Removed.
2543 (Expand_Put_Call_With_Symbol): Renames previous routine
2544 Expand_Put_Call_With_Dimension_Symbol.
2545 * s-diflio.adb, s-diinio.adb (Put): Symbol renames Symbols.
2546 (Put_Dim_Of): New routines.
2547 * s-diflio.ads, s-diinio.ads: documentation updated.
2548 (Put): Symbol renames Symbols.
2549 (Put_Dim_Of): New routines.
2550 * s-dim.ads: documentation updated.
2551 * s-dimmks.ads: dimensioned type and subtypes updated.
2552 * snames.ads-tmpl: Name_Dim_Symbol, Name_Put_Dim_Of, Name_Symbol,
2553 and Name_Unit_Symbol added. Name_Symbols removed.
2555 2012-06-14 Vincent Pucci <pucci@adacore.com>
2557 * freeze.adb (In_Exp_Body): Expression function case added.
2558 (Freeze_Expression): Insert the Freeze_Nodes
2559 list before the correct current scope in case of a quantified
2562 2012-06-14 Pascal Obry <obry@adacore.com>
2564 * projects.texi: Document the Install package for gprinstall.
2565 2012-06-14 Ed Schonberg <schonberg@adacore.com>
2567 * sem_elim.adb (Check_For_Eliminated_Subprogram): Do not check within
2568 a default expression.
2569 * sem_res.adb (Resolve_Call): simplify code.
2571 2012-06-14 Ed Schonberg <schonberg@adacore.com>
2573 * sem_case.adb (Check, Issue_Msg): within an instance, non-other
2574 values in a variant part or a case expression do not have to
2575 belong to the actual subtype.
2577 2012-06-14 Ed Schonberg <schonberg@adacore.com>
2579 * sem_ch12.adb (Validate_Derived_Type_Instance): If parent is
2580 an interface type, check whether it is itself a previous formal
2581 already instantiated in the current list of actuals.
2583 2012-06-14 Ed Schonberg <schonberg@adacore.com>
2585 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): The
2586 expression for a stream attribute is a name that may be overloaded
2587 with other declarations. To determine whether it matches the
2588 aspect at the freeze point, it is necessary to verify that one
2589 of its interpretations matches.
2591 2012-06-14 Robert Dewar <dewar@adacore.com>
2593 * exp_ch7.adb, exp_util.adb, sem_aux.ads, exp_ch9.adb,
2594 sem_ch10.adb, freeze.adb, sem_util.adb, exp_ch4.adb,
2595 s-taprop-dummy.adb: Minor reformatting.
2597 2012-06-14 Vincent Pucci <pucci@adacore.com>
2599 * exp_attr.adb (Expand_N_Attribute_Reference): Lock_Free
2600 attribute case added.
2601 * par-prag.adb (Prag): Lock_Free pragma case added.
2602 * sem_attr.adb (Analyze_Attribute_Reference): Lock_Free attribute
2604 * sem_ch13.adb (Analyze_Aspect_Specifications): Record_Rep_Item
2605 call added for Aspect_Lock_Free.
2606 * sem_ch9.adb (Allows_Lock_Free_Implementation): New Lock_Free
2607 error messages for subprogram bodies.
2608 (Lock_Free_Disabled): New routine.
2609 (Analyze_Protected_Body): Call to Lock_Free_Disabled added.
2610 * sem_prag.adb (Analyze_Pragma): Lock_Free pragma case added.
2611 * snames.adb-tmpl (Get_Pragma_Id): Name_Lock_Free case added.
2612 (Is_Pragma_Name): Name_Lock_Free case added.
2613 * snames.ads-tmpl: Attribute_Lock_Free and Pragma_Lock_Free added.
2615 2012-06-14 Ed Schonberg <schonberg@adacore.com>
2617 * a-coorma.adb, a-cborma.adb, a-cbhama.adb, a-ciorma.adb: Add missing
2620 2012-06-14 Bob Duff <duff@adacore.com>
2622 * lib.ads, lib.adb, sem.adb (Write_Unit_Info): Move this
2623 procedure from Sem body to Lib spec, so it can be used for
2624 debugging elsewhere.
2626 2012-06-14 Ed Schonberg <schonberg@adacore.com>
2628 * sem_ch6.adb (Check_Conformance): Add Ada 2012 check on mode
2629 conformance: "aliased" must apply to both or neither formal
2632 2012-06-14 Gary Dismukes <dismukes@adacore.com>
2634 * exp_ch9.adb: Minor reformatting.
2636 2012-06-14 Thomas Quinot <quinot@adacore.com>
2638 * freeze.adb (Freeze_Record_Type): Warn about useless bit order
2639 specification [when there's no component clause] regardless
2640 of whether the specified bit order is reversed or not.
2642 2012-06-14 Tristan Gingold <gingold@adacore.com>
2644 * raise-gcc.c (__gnat_personality_seh0): New function.
2646 2012-06-14 Tristan Gingold <gingold@adacore.com>
2648 * gnatname.adb (Gnatname): Make sure that dynamic table
2649 argument_data is initialized.
2651 2012-06-14 Robert Dewar <dewar@adacore.com>
2653 * sem_aux.adb: Minor code reorganization.
2655 2012-06-14 Vincent Pucci <pucci@adacore.com>
2657 * einfo.adb einfo.ads (Get_Rep_Item): Removed.
2658 (Get_Rep_Item_For_Entity): Removed.
2659 (Get_Rep_Pragma): Removed.
2660 (Get_Rep_Pragma_For_Entity): Removed.
2661 (Has_Rep_Item): Removed.
2662 (Has_Rep_Pragma): Removed.
2663 (Has_Rep_Pragma_For_Entity): Removed.
2664 * exp_ch9.adb (Expand_N_Task_Type_Declaration):
2665 Has_Rep_Pragma_For_Entity replaced by Has_Rep_Pragma
2666 and Get_Rep_Pragma_For_Entity replaced by Get_Rep_Pragma.
2667 (Make_Task_Create_Call): Has_Rep_Pragma_For_Entity replaced
2668 by Has_Rep_Pragma and Get_Rep_Pragma_For_Entity replaced by
2670 * exp_intr.adb: Dependency to Sem_Aux added for call to Get_Rep_Pragma.
2671 * sem_aux.adb (Get_Rep_Item): New routine.
2672 (Get_Rep_Pragma): New routine.
2673 (Has_Rep_Item): New routine.
2674 (Has_Rep_Pragma): New routine.
2675 (Nearest_Ancestor): Minor reformatting.
2676 * sem_aux.ads (Get_Rep_Item): New routine.
2677 (Get_Rep_Pragma): New routine.
2678 (Has_Rep_Item): New routine.
2679 (Has_Rep_Pragma): New routine.
2680 * sem_ch13.adb (Duplicate_Clause): Restore original error messages.
2681 * sem_eval.adb (Subtypes_Statically_Match): Get_Rep_Item_For_Entity
2682 replaced by Get_Rep_Item.
2683 * sem_prag.adb (Analyze_Pragma): Restore original error messages.
2684 (Check_Duplicate_Pragma): Restore original error messages.
2686 2012-06-14 Ed Schonberg <schonberg@adacore.com>
2688 * sem_util.adb (Is_Object_Reference): in Ada 2012, qualified
2689 expressions are valid names.
2691 2012-06-14 Ed Schonberg <schonberg@adacore.com>
2693 * sem_ch10.adb (Analyze_Compilation_Unit): If the unit is an
2694 instantiation do not emit warnings for obsolescent units. The
2695 warnings belong on the corresponding generic.
2697 2012-06-14 Hristian Kirtchev <kirtchev@adacore.com>
2699 * einfo.adb: Update the usage of Node15.
2700 (Return_Flag_Or_Transient_Decl): Removed.
2701 (Set_Return_Flag_Or_Transient_Decl): Removed.
2702 (Set_Status_Flag_Or_Transient_Decl): New routine.
2703 (Status_Flag_Or_Transient_Decl): New routine.
2704 (Write_Field15_Name): Update the output for variables and constants.
2705 * einfo.ads: Remove attribute
2706 Return_Flag_Or_Transient_Decl along with occurrences in nodes.
2707 (Return_Flag_Or_Transient_Decl): Removed along with pragma Inline.
2708 (Set_Return_Flag_Or_Transient_Decl): Removed along with pragma Inline.
2709 (Set_Status_Flag_Or_Transient_Decl): New routine along with pragma
2711 (Status_Flag_Or_Transient_Decl): New routine along with pragma Inline.
2712 * exp_ch4.adb (Create_Alternative): New routine.
2713 (Expand_N_Conditional_Expression): Handle the case
2714 where at least one of the conditional expression
2715 alternatives prodices a controlled temporary by means of a function
2717 (Is_Controlled_Function_Call): New routine.
2718 (Process_Transient_Object): Update the call to
2719 Set_Return_Flag_Or_Transient_Decl.
2720 * exp_ch6.adb (Enclosing_Context): New routine.
2721 (Expand_N_Extended_Return_Statement): Update all calls to
2722 Set_Return_Flag_Or_Transient_Decl.
2723 (Expand_Ctrl_Function_Call): Prohibit the finalization of a controlled
2724 function result when the context is a conditional expression.
2725 * exp_ch7.adb (Process_Declarations): Update all calls to
2726 Return_Flag_Or_Transient_Decl. Add processing for intermediate
2727 results of conditional expressions where one of the alternatives
2728 uses a controlled function call.
2729 (Process_Object_Declaration): Update all calls to
2730 Return_Flag_Or_Transient_Decl and rearrange the logic to process
2731 "hook" objects first.
2732 (Process_Transient_Objects): Update the call to
2733 Set_Return_Flag_Or_Transient_Decl.
2734 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean,
2735 Boolean)): Update all calls to Return_Flag_Or_Transient_Decl. Add
2736 detection for intermediate results of conditional expressions
2737 where one of the alternatives uses a controlled function call.
2739 2012-06-13 Eric Botcazou <ebotcazou@adacore.com>
2742 2012-05-19 Eric Botcazou <ebotcazou@adacore.com>
2744 * gcc-interface/decl.c (Has_Thiscall_Convention): New macro.
2745 (gnat_to_gnu_entity) <E_Subprogram_Type>: Test it to set the thiscall
2747 (get_minimal_subprog_decl): Likewise.
2748 (gnat_first_param_is_class): New predicate.
2750 2012-06-12 Robert Dewar <dewar@adacore.com>
2752 * gcc-interface/Make-lang.in: Update dependencies.
2753 * sem_ch9.ads, einfo.adb, einfo.ads, sem_prag.adb, freeze.adb,
2754 sem_util.adb, sem_ch13.adb, sem_ch13.ads, exp_ch3.adb: Add comments.
2757 2012-06-12 Ed Schonberg <schonberg@adacore.com>
2759 * sem_ch12.adb (Instantiate_Formal_Subprogram): Remove code that
2760 implements AI05-0296, because the actual may be overloaded.
2761 * sem_ch8.adb (Analyze_Subprogram_Renaming): and move it here,
2762 to be applied once the actual subprogram is properly resolved.
2764 2012-06-12 Robert Dewar <dewar@adacore.com>
2766 * switch-c.adb, a-exexpr-gcc.adb: Minor reformatting.
2768 2012-06-12 Vincent Pucci <pucci@adacore.com>
2770 * checks.adb (Tag_Checks_Suppressed): Remove Kill_Tag_Checks check.
2771 * einfo.adb (Universal_Aliasing): Apply to the implementation
2772 base type instead of the base type.
2773 (Get_Rep_Item_For_Entity):
2774 Return a pragma if the pragma node is not present in the Rep
2775 Item chain of the parent.
2776 (Kill_Tag_Checks): Removed (unused flag).
2777 (Set_Kill_Tag_Checks): Removed.
2778 (Get_First_Rep_Item): New routine.
2779 (Get_Rep_Pragma_For_Entity): New routine.
2780 (Has_Rep_Item): New routine.
2781 (Has_Rep_Pragma_For_Entity): New routine.
2782 (Present_In_Rep_Item): New routine.
2783 * einfo.ads (Kill_Tag_Checks): Removed.
2784 (Set_Kill_Tag_Checks): Removed.
2785 (Get_First_Rep_Item): New routine.
2786 (Get_Rep_Pragma_For_Entity): New routine.
2787 (Has_Rep_Item): New routine.
2788 (Has_Rep_Pragma_For_Entity): New routine.
2789 (Present_In_Rep_Item): New routine.
2790 * exp_attr.adb, sem_attr.adb: Attribute_CPU,
2791 Attribute_Dispatching_Domain and Attribute_Interrupt_Priority
2793 * exp_ch13.adb (Expand_N_Attribute_Definition_Clause): For
2794 attribute Storage_Size, insert the new assignement statement
2795 after the Size variable declaration.
2796 * exp_ch3.adb (Build_Init_Statements): Fill the CPU,
2797 Dispatching_Domain, Priority and Size components with the Rep
2798 Item expression (if any).
2799 * exp_ch9.adb (Expand_N_Task_Type_Declaration): _CPU,
2800 _Priority, _Domain fields are always present in the
2801 corresponding record type.
2802 (Find_Task_Or_Protected_Pragma): Removed.
2803 (Get_Relative_Deadline_Pragma): New routine.
2804 (Make_Initialize_Protection): Find_Task_Or_Protected_Pragma removed.
2805 (Make_Task_Create_Call): Check CPU, Size or
2806 Dispatching_Domain Rep Item is present using new routine Has_Rep_Item.
2807 * freeze.adb (Freeze_All): Push_Scope_And_Install_Discriminants
2808 and Uninstall_Discriminants_And_Pop_Scope calls added.
2809 (Freeze_Entity): Evaluate_Aspects_At_Freeze_Point call added.
2810 * sem_aux.adb (Nearest_Ancestor): Retrieve the nearest ancestor
2811 for private derived types.
2812 * sem_ch13.adb (Analyze_Aspect_Specifications): Clean-up
2813 and reordering. Delay analysis for all aspects (except some
2815 (Analyze_Attribute_Definition_Clause):
2816 Attribute_CPU, Attribute_Dispatching_Domain,
2817 Interrupt_Priority and Attribute_Priority cases added.
2818 (Analyze_Freeze_Entity): Push_Scope_And_Install_Discriminants
2819 and Uninstall_Discriminants_And_Pop_Scope calls added.
2820 (Check_Aspect_At_Freeze_Point): Reordering and clean-up.
2821 (Duplicate_Clause): Issue an explicit error msg when the current
2822 clause duplicates an aspect specification, an attribute definition
2824 (Evaluate_Aspects_At_Freeze_Point): New routine.
2825 * sem_ch13.ads (Evaluate_Aspects_At_Freeze_Point): New routine.
2826 * sem_ch9.adb, sem_ch9.ads (Install_Discriminants): New routine.
2827 (Push_Scope_And_Install_Discriminants): New routine.
2828 (Uninstall_Discriminants): New routine.
2829 (Uninstall_Discriminants_And_Pop_Scope): New routine.
2830 * sem_prag.adb (Check_Duplicate_Pragma): Issue an explicit error
2831 msg when the current pragma duplicates an aspect specification,
2832 an attribute definition clause or a pragma.
2833 (Analyze_Pragma): Remove use of flags Has_Pragma_CPU,
2834 Has_Pragma_Priority and Has_Pragma_Dispatching_Domain.
2835 * sem_util.adb (Compile_Time_Constraint_Error): Don't complain
2836 about the type if the corresponding concurrent type doesn't come
2838 * sinfo.adb, sinfo.ads (Has_Pragma_CPU): Removed.
2839 (Has_Pragma_Dispatching_Domain): Removed.
2840 (Has_Pragma_Priority): Removed.
2841 (Has_Task_Info_Pragma): Removed.
2842 (Has_Task_Name_Pragma): Removed.
2843 (Set_Has_Pragma_CPU): Removed.
2844 (Set_Has_Pragma_Dispatching_Domain): Removed.
2845 (Set_Has_Pragma_Priority): Removed.
2846 (Set_Has_Task_Info_Pragma): Removed.
2847 (Set_Has_Task_Name_Pragma): Removed.
2848 * snames.adb-tmpl (Get_Pragma_Id): Pragma_CPU,
2849 Pragma_Dispatching_Domain and Pragma_Interrupt_Priority added.
2850 (Is_Pragma_Name): Name_CPU, Name_Dispatching_Domain and
2851 Name_Interrupt_Priority added.
2852 * snames.ads-tmpl: Name_Dispatching_Domain, Name_CPU
2853 and Name_Interrupt_Priority moved to the list of
2854 Attribute_Name. Attribute_CPU, Attribute_Dispatching_Domain and
2855 Attribute_Interrupt_Priority added. Pragma_Dispatching_Domain,
2856 Pragma_CPU and Pragma_Interrupt_Priority moved to the end of
2857 the Pragma_Name list.
2859 2012-06-12 Arnaud Charlet <charlet@adacore.com>
2861 * xref_lib.adb (Get_Full_Type): Add support for 'G'.
2863 2012-06-12 Tristan Gingold <gingold@adacore.com>
2865 * a-exexpr-gcc.adb (Unwind_Exception): Add 4 more private fields.
2867 2012-06-12 Fedor Rybin <frybin@adacore.com>
2869 * gnat_ugn.texi: Update doc on gnattest.
2871 2012-06-12 Robert Dewar <dewar@adacore.com>
2873 * sem_ch12.adb: Add comments.
2875 2012-06-12 Robert Dewar <dewar@adacore.com>
2877 * switch-c.adb, inline.adb, usage.adb, opt.ads: Minor reformatting.
2879 2012-06-12 Robert Dewar <dewar@adacore.com>
2881 * sem_ch12.adb: Minor reformatting.
2883 2012-06-12 Eric Botcazou <ebotcazou@adacore.com>
2885 * opt.ads (Inline_Level): New variable.
2886 * gnat1drv.adb (Adjust_Global_Switches): Set it based on optimization
2887 level if it has not been set by the user.
2888 * switch-c.adb (Scan_Front_End_Switches): Accept -gnatn1 and -gnatn2
2889 and set Inline_Level accordingly.
2890 * inline.adb (Add_Inlined_Body): Declate new Inline_Level_Type type.
2891 (Must_Inline): Return Inline_Level_T instead of Boolean to indicate
2892 whether the package of the inlined subprogram must be compiled.
2893 If Inline_Level is set to 1, only compile packages of subprograms
2894 directly called from the main unit.
2895 * usage.adb (Usage): Adjust line for -gnatn switch.
2896 * gnat_ugn.texi (Switches for gcc): Document -gnatn1 and -gnatn2.
2898 2012-06-12 Ed Schonberg <schonberg@adacore.com>
2900 * sem_ch12.adb (Instantiate_Formal_Subprogram): Do not apply
2901 AI05-296 if the actual is overloaded. In this case The rule must
2902 be applied after resolution, in Analyze_Subprogram_Renaming.
2904 2012-06-12 Robert Dewar <dewar@adacore.com>
2906 * stringt.adb: Minor reformatting.
2908 2012-06-12 Robert Dewar <dewar@adacore.com>
2910 * ali-util.adb, stringt.ads: Minor reformatting.
2912 2012-06-12 Hristian Kirtchev <kirtchev@adacore.com>
2914 * exp_ch7.adb (Process_Declarations): Handle the case where
2915 the original context has been wrapped in a block to avoid
2916 interference between exception handlers and At_End handlers.
2917 (Wrap_HSS_In_Block): Mark the block which contains the original
2918 statements of the context as being a finalization wrapper.
2919 * sinfo.adb (Is_Finalization_Wrapper): New routine.
2920 (Set_Is_Finalization_Wrapper): New routine.
2922 * sinfo.ads: Add new attribute Is_Finalization_Wrapper applicable
2924 (Is_Finalization_Wrapper): New routine with corresponding pragma Inline.
2925 (Set_Is_Finalization_Wrapper): New routine with corresponding pragma
2928 2012-06-12 Steve Baird <baird@adacore.com>
2930 * gnat1drv.adb (Adjust_Global_Switches): No longer need to set
2931 Exception_Extra_Info in CodePeer_Mode.
2933 2012-06-12 Robert Dewar <dewar@adacore.com>
2935 * sem_dist.adb, exp_ch7.adb, sem_type.adb, exp_attr.adb,
2936 sinfo.ads, sem_ch7.adb, exp_alfa.adb, sem_scil.adb, sem_ch12.adb,
2937 sem_util.adb, sem_res.adb, sem_attr.adb, sem_elab.adb, exp_ch6.adb,
2938 sem_ch4.adb, sem_warn.adb, scil_ll.adb, exp_cg.adb: Minor code
2941 2012-06-12 Eric Botcazou <ebotcazou@adacore.com>
2943 * s-tasini.ads: Minor fix in comment.
2945 2012-06-12 Thomas Quinot <quinot@adacore.com>
2947 * freeze.adb (Freeze_Record_Type): Warn on record with
2948 Scalar_Storage_Order if there is no placed component.
2950 2012-06-12 Thomas Quinot <quinot@adacore.com>
2952 * sem_ch3.adb: Minor comment fix.
2954 2012-06-12 Vincent Celier <celier@adacore.com>
2956 * ali-util.adb (Time_Stamp_Mismatch): In minimal recompilation
2957 mode, use Stringt Mark and Release to avoid growing the Stringt
2958 internal tables uselessly.
2959 * stringt.adb (Strings_Last): New global variable
2960 (String_Chars_Last): New global variable.
2961 (Mark, Release): New procedures.
2962 * stringt.ads (Mark, Release) New procedures.
2964 2012-06-12 Hristian Kirtchev <kirtchev@adacore.com>
2966 * exp_ch7.adb (Process_Transient_Objects): Renamed constant
2967 Requires_Hooking to Must_Hook and replace all occurrences of the name.
2968 (Requires_Hooking): New routine. Detect all contexts that require
2969 transient variable export to the outer finalizer due to a potential
2972 2012-06-12 Ed Schonberg <schonberg@adacore.com>
2974 * sem_ch12.adb: Small adjustment.
2976 2012-06-12 Vincent Celier <celier@adacore.com>
2978 * vms_cmds.ads (Command_Type): New enumeration value Test
2979 * vms_conv.adb (Initialize): Add component at index Test in
2981 * vms_data.ads (Test_Switches): New global variable for the
2982 switches of gnattest, currently empty.
2984 2012-06-12 Ed Schonberg <schonberg@adacore.com>
2986 * sem_ch3.adb (Analyze_Subtype_Declaration): if an incomplete
2987 type is tagged, so is a subtype of it.
2988 * sem_ch12.adb (Validate_Actual_Subprogram): implement AI05-0296,
2989 concerning freeze rules in the presence of formal incomplete
2990 types: a formal abstract subprogram cannot have an incomplete
2991 controlling type, and the profile of the actual subprogram does
2992 not freeze if it includes an incomplete untagged type.
2994 2012-06-12 Robert Dewar <dewar@adacore.com>
2996 * a-direct.adb: Minor reformatting.
2998 2012-06-12 Robert Dewar <dewar@adacore.com>
3000 * gnat_ugn.texi: Add missing documentation for -gnatw.v and
3003 2012-06-12 Thomas Quinot <quinot@adacore.com>
3005 * sem_ch7.adb, sem_prag.adb, sem_ch12.adb, sem_ch4.adb,
3006 sem_ch13.adb: Minor rewording of error messages for unchecked unions.
3008 2012-06-12 Robert Dewar <dewar@adacore.com>
3010 * lib-xref.ads: Minor reformatting.
3012 2012-06-12 Pascal Obry <obry@adacore.com>
3014 * a-direct.adb (Delete_File): Delete symbolic links silently
3015 instead of raising the Name_Error exception when the symbolic
3016 link is pointing to a non existent file.
3018 2012-06-12 Robert Dewar <dewar@adacore.com>
3020 * xref_lib.adb, sem_ch13.adb, lib-xref.adb: Minor reformatting.
3022 2012-06-12 Javier Miranda <miranda@adacore.com>
3024 * lib-xref.ads Adding missing documentation.
3026 2012-06-12 Hristian Kirtchev <kirtchev@adacore.com>
3028 * exp_ch7.adb (Create_Finalizer): Add the
3029 exception reraise mechanism at the very end of the finalizer
3030 statements. This placement ensures that all objects are finalized,
3031 the secondary stack mark released and aborts undeferred before
3032 propagating an exception.
3034 2012-06-12 Ed Schonberg <schonberg@adacore.com>
3036 * sem_ch10.adb (Remove_Unit_From_Visibility): if the unit is a
3037 wrapper package. remove from visibility the original subprogram
3040 2012-06-12 Javier Miranda <miranda@adacore.com>
3042 * sem_prag.adb (Process_Convention): Generate reference to entity
3043 exported to foreign language. Needed for GPS navigation.
3044 * xref_lib.adb (Parse_Identifier_Info): Parse exported entities.
3045 * lib-xref (Output_References): Output exported entities.
3047 2012-06-12 Pascal Obry <obry@adacore.com>
3049 * prj-attr.adb: Add install package and corresponding attributes.
3050 * snames.ads-tmpl (Name_Active): New constant.
3051 (Name_Exec_Subdir): Likewise.
3052 (Name_Install): Likewise.
3053 (Name_Lib_Subdir): Likewise.
3054 (Name_Project_Subdir): Likewise.
3055 (Name_Sources_Subdir): Likewise.
3057 2012-06-12 Bob Duff <duff@adacore.com>
3059 * sem_res.adb (Check_Infinite_Recursion):
3060 Suppress spurious warning on recursion after "raise with ...".
3062 2012-06-12 Thomas Quinot <quinot@adacore.com>
3064 * sem_prag.adb (Analyze_Pragma, case Unchecked_Union): Do
3065 not crash on illegal unchecked union that is a null record.
3067 2012-06-12 Thomas Quinot <quinot@adacore.com>
3069 * exp_ch4.adb (Has_Inferable_Discriminants): Reorganize code to
3070 treat implicit dereferences with a constrained unchecked union
3071 nominal subtype as having inferable discriminants.
3073 2012-06-12 Robert Dewar <dewar@adacore.com>
3075 * sem_ch6.adb: Minor reformatting.
3077 2012-06-12 Eric Botcazou <ebotcazou@adacore.com>
3079 * gnat_ugn.texi: Couple of minor corrections.
3081 2012-06-12 Thomas Quinot <quinot@adacore.com>
3083 * sem_prag.adb (Check_Variant): An empty component list is not
3084 illegal in an unchecked union variant.
3086 2012-06-12 Gary Dismukes <dismukes@adacore.com>
3088 * projects.texi: Remove comments.
3090 2012-06-12 Thomas Quinot <quinot@adacore.com>
3092 * back_end.adb (Scan_Back_End_Switches): Treat -fdump-scos as
3094 (gnat_post_options): Disable gimple-based SCO generator.
3095 * gnat_ugn.texi: Document that -gnateS is an obsolete synonym
3098 2012-06-12 Ed Schonberg <schonberg@adacore.com>
3100 * sem_ch6.adb (Different_Generic_Profile): new predicate for
3101 Find_Corresponding_Spec, to handle a rare case of accidental
3102 overloading in an instance, when the profile of a subprogram body
3103 that depends on a formal type becomes compatible with that of
3104 a homonym whose profile in the generic mentions the actual type.
3106 2012-06-12 Thomas Quinot <quinot@adacore.com>
3108 * gnat1drv.adb: Minor reformatting.
3110 2012-06-12 Ed Schonberg <schonberg@adacore.com>
3112 * sem_util.adb (Build_Explicit_Dereference): If the expression
3113 is an entity, ensure that the type of the expression is the same
3114 as that of the entity.
3116 2012-06-12 Pat Rogers <rogers@adacore.com>
3118 * projects.texi: Corrected instances of the word "build" that
3119 should be "built" instead. Other similar changes and minor
3120 punctuation changes.
3122 2012-06-12 Eric Botcazou <ebotcazou@adacore.com>
3124 * sem_util.adb (Is_Atomic_Object): Return true for an atomic
3125 component as well as a prefix which is an atomic component.
3127 2012-06-12 Ed Schonberg <schonberg@adacore.com>
3129 * exp_prag.adb (Expand_Pragma_Import_Or_Interface): revert previous
3130 patch. The processing of interfacing aspects now generates a
3131 proper Ada 2005 pragma.
3132 * sem_prag.adb (Analyze_Pragma, cases Pragma_Export and
3133 Pragma_Import): revert previous patch. The processing of
3134 interfacing aspects now generates a proper Ada 2005 pragma.
3135 * sem_ch13.adb (Analyze_Aspect_Specifications): generate proper
3136 pragam for aspects Convention, Import and Export. Scan list
3137 of aspects to collect link name and external name if present,
3138 and verify that a complete pragma can be generated.
3140 2012-06-11 Olivier Hainque <hainque@adacore.com>
3142 * gcc-interface/Makefile.in (GNATLIBCFLAGS_FOR_C): Remove
3143 $(PIC_FLAG_FOR_TARGET).
3144 (gnatlib-shared-default): Add $(PIC_FLAG_FOR_TARGET) to
3145 GNATLIBCFLAGS_FOR_C passed to gnatlib.
3146 (gnatlib-shared-win32): Likewise.
3147 (gnatlib-shared-darwin): Likewise.
3148 (gnatlib-shared-dual-win32): Pass PIC_FLAG_FOR_TARGET to
3149 gnatlib-shared-win32.
3151 2012-06-11 Eric Botcazou <ebotcazou@adacore.com>
3153 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Convert GNU_SIZE
3154 to units before invoking allocatable_size_p on it.
3155 Remove orphaned comment. Do not use ssize_int.
3156 <E_Record_Subtype>: Traverse list in original order. Minor tweak.
3157 (allocatable_size_p): Adjust and simplify.
3158 (build_subst_list): Use consistent terminology throughout.
3159 (build_variant_list): Likewise. Traverse list in original order.
3160 (create_field_decl_from): Likewise.
3161 (copy_and_substitute_in_size): Likewise.
3162 (create_variant_part_from): Add comment about field list order.
3163 * gcc-interface/utils.c (build_vms_descriptor): Do not use ssize_int.
3164 * gcc-interface/utils2.c (build_allocator): Likewise.
3166 2012-06-11 Eric Botcazou <ebotcazou@adacore.com>
3168 * gcc-interface/trans.c (Identifier_to_gnu): Test Is_Elementary_Type
3169 instead of Is_Scalar_Type for a constant with an address clause.
3170 Do not return the underlying constant for a constant used by reference
3171 if it holds the address of a constant and an lvalue is required.
3173 2012-06-11 Eric Botcazou <ebotcazou@adacore.com>
3175 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not specifically deal
3176 with external constants wrt force_global here...
3177 <E_Constant>: ...but here instead.
3178 * gcc-interface/utils.c (gnat_pushdecl): Do not put external DECLs onto
3179 the list of global DECLs.
3181 2012-06-11 Eric Botcazou <ebotcazou@adacore.com>
3183 * gcc-interface/decl.c (gnat_to_gnu_entity): Translate the Esize on
3184 entry only for elementary types and abort if it is too large.
3185 <E_Record_Type>: Make sure the Esize is known before using it.
3187 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
3189 * gcc-interface/utils2.c: Do not include output.h.
3190 * gcc-interface/Make-lang.in: Fix dependencies.
3192 2012-05-29 Michael Matz <matz@suse.de>
3194 * gcc-interface/utils.c (create_var_decl_1): Don't call expand_decl.
3196 2012-05-26 Eric Botcazou <ebotcazou@adacore.com>
3198 * gcc-interface/decl.c (variant_desc): Rename 'record' to 'new_type'.
3199 (build_variant_list): Adjust to above renaming.
3200 (gnat_to_gnu_entity) <E_Record_Subtype>: Likewise. Give a unique name
3201 to the type of the variant containers.
3202 (create_variant_part_from): Likewise. Give a unique name to the type
3203 of the variant part.
3205 2012-05-25 Eric Botcazou <ebotcazou@adacore.com>
3208 * link.c (__gnat_object_file_option): Set to "-Wl,@" for GNU linker.
3209 (__gnat_using_gnu_linker): Delete.
3210 * gnatlink.adb (Gnatlink): Declare Object_File_Option_Ptr here...
3211 Declare Object_File_Option string constant and Using_GNU_response_file
3213 (Process_Binder_File): ...instead of here. Delete Using_GNU_Linker,
3214 Opening and Closing local variables. Do not handle the GNU linker
3216 (Write_RF): New procedure to write into the response file. Escape some
3217 characters if a GNU response file is used. Keep track of error status.
3218 Invoke Write_RF to write into the response file. Delete the file only
3219 if the link was successful.
3220 * mlib-utl.adb: Do not `with' package System.
3221 (Gcc): Likewise. Declare Object_File_Option string constant and
3222 Using_GNU_response_file boolean constant.
3223 (Write_RF): Take a string instead of address and length. Escape some
3224 characters if a GNU response file is used.
3225 Invoke Write_RF to write into the response file. Delete the file only
3226 if the link was successful. Do not warn if it cannot be deleted.
3228 2012-05-20 Eric Botcazou <ebotcazou@adacore.com>
3230 * gcc-interface/utils.c (gnat_write_global_declarations): Put a name
3231 on the dummy global variable.
3233 2012-05-19 Eric Botcazou <ebotcazou@adacore.com>
3235 * gcc-interface/decl.c (Has_Thiscall_Convention): New macro.
3236 (gnat_to_gnu_entity) <E_Subprogram_Type>: Test it to set the thiscall
3238 (get_minimal_subprog_decl): Likewise.
3239 (gnat_first_param_is_class): New predicate.
3241 * gcc-interface/misc.c (gnat_handle_option): Fix formatting.
3242 * gcc-interface/Makefile.in: Likewise.
3244 2012-05-18 Eric Botcazou <ebotcazou@adacore.com>
3246 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: For an object at
3247 global level with unconstrained nominal subtype and a non-fixed size,
3248 make a variable for the size.
3250 2012-05-15 Andris Pavenis <andris.pavenis@iki.fi>
3253 * s-taprop-dummy.adb (Specific): New package.
3255 2012-05-15 Olivier Hainque <hainque@adacore.com>
3257 * gcc-interface/Make-lang.in (COMMON_FLAGS_TO_PASS): Use WARN_CFLAGS
3258 instead of trying to mimic it.
3260 2012-05-15 Robert Dewar <dewar@adacore.com>
3262 * sem_ch5.adb, sem_util.adb, s-stposu.adb, exp_ch4.adb: Minor
3265 2012-05-15 Geert Bosch <bosch@adacore.com>
3267 * uintp.adb (UI_Rem): Remove optimizations, as they are complex and are
3269 (Sum_Digits): Remove, no longer used.
3270 (Sum_Double_Digits): Likewise.
3272 2012-05-15 Yannick Moy <moy@adacore.com>
3274 * aspects.ads: Minor typo.
3276 2012-05-15 Thomas Quinot <quinot@adacore.com>
3278 * gnat_rm.texi (Scalar_Storage_Order): Fix RM reference.
3279 * sem_ch13.adb: Minor comment fix: incorrect RM reference.
3281 2012-05-15 Eric Botcazou <ebotcazou@adacore.com>
3283 * sem_prag.adb (Process_Atomic_Shared_Volatile): Propagate
3284 atomicity from an object to its underlying type only if it
3287 2012-05-15 Ed Schonberg <schonberg@adacore.com>
3289 * sem_ch5.adb (Analyze_Iterator_Specification): Set kind of
3290 loop variable after pre-analysis of iterator name, to prevent
3291 premature usage of loop variable.
3293 2012-05-15 Ed Schonberg <schonberg@adacore.com>
3295 * sem_util.adb (Is_Variable): In Ada 2012, an explicit
3296 dereference that is a rewriting of an expression whose type has
3297 a declared Implicit_Derenference aspect is a variable.
3299 2012-05-15 Hristian Kirtchev <kirtchev@adacore.com>
3301 * exp_ch4.adb (Insert_Dereference_Action): Reimplemented. The
3302 routine performs address and size adjustments for dereferences
3303 of heap-allocated controlled objects. This manipulation is needed
3304 in order to restore the original state of the memory at the time
3305 it was allocated by the finalization machinery.
3306 * rtsfind.ads: Add RE_Adjust_Controlled_Dereference to tables
3307 RE_Id and RE_Unit_Table.
3308 * sinfo.adb (Has_Dereference_Action): New routine.
3309 (Set_Has_Dereference_Action): New routine.
3310 * sinfo.ads: Add new semantic flag Has_Dereference_Action along
3311 its association in nodes.
3312 (Has_Dereference_Action): New routine and pragma Inline.
3313 (Set_Has_Dereference_Action): New routine and pragma Inline.
3314 * s-stposu.ads, s-stposu.adb (Adjust_Controlled_Dereference): New
3317 2012-05-15 Thomas Quinot <quinot@adacore.com>
3319 * uintp.adb (Image_Uint): Use UI_Div_Rem to get quotient and
3320 remainder of U / Base in a single operation.
3322 2012-05-15 Robert Dewar <dewar@adacore.com>
3324 * exp_ch5.adb, inline.adb, sem_ch10.adb, prj.ads, sem_util.adb,
3325 a-ngelfu.ads, exp_ch4.adb, exp_ch6.adb, aspects.ads, sem_ch6.adb,
3326 vms_data.ads, exp_ch3.adb, prj-env.adb: Minor reformatting.
3328 2012-05-15 Thomas Quinot <quinot@adacore.com>
3330 * exp_ch4.adb (Has_Inferable_Discriminants): For a qualified
3331 expression, use correct node for test on the subtype denoted by
3334 2012-05-15 Eric Botcazou <ebotcazou@adacore.com>
3336 * inline.adb (Scope_In_Main_Unit): Rename into...
3337 (In_Main_Unit_Or_Subunit): ...this. Also return
3338 true if the subprogram is within a subunit of the
3340 (Add_Inlined_Body): Adjust for above renaming.
3341 (Add_Inlined_Subprogram): Likewise. Pass the subprogram directly.
3342 (Analyze_Inlined_Bodies): Really set aside inlined subprograms
3343 not handled by Add_Inlined_Body.
3345 2012-05-15 Ed Schonberg <schonberg@adacore.com>
3347 * sem_ch10.adb (Expand_With_Clause): In the context of a generic
3348 package declaration, a private with-clause on a child unit implies
3349 that the implicit with clauses on its parents are private as well.
3351 2012-05-15 Javier Miranda <miranda@adacore.com>
3353 * sem_ch6.adb (Is_Interface_Conformant): Add missing call to
3354 Base_Type to handle subtypes.
3355 * exp_ch6.adb (Expand_Call): For calls located in thunks handle
3356 unchecked conversions of access types found in actuals.
3357 * exp_disp.adb (Expand_Interface_Thunk): Add missing unchecked
3358 conversion to actuals whose type is an access type. Done to
3359 avoid reporting spurious errors.
3361 2012-05-15 Vincent Celier <celier@adacore.com>
3363 * prj-env.adb (Create_Mapping): Ignore sources that are
3364 suppressed (Create_Mapping_File.Process): Ditto
3365 * prj-nmsc.adb (Add_Source): Update to take into
3366 account suppressed files that may hide inherited sources.
3367 (Mark_Excluded_Sources): Mark excluded sources of the current
3368 project as suppressed.
3369 * prj.ads (Source_Data): New Boolean component Suppressed,
3372 2012-05-15 Thomas Quinot <quinot@adacore.com>
3374 * exp_intr.adb: Minor reformatting.
3376 2012-05-15 Thomas Quinot <quinot@adacore.com>
3378 * gnat_rm.texi: Document attribute Scalar_Storage_Order.
3380 2012-05-15 Javier Miranda <miranda@adacore.com>
3382 * exp_ch3.adb (Build_Offset_To_Top): Modify the
3383 expansion of the offset_to_top functions to ensure that their
3384 profile is conformant with the profile specified in Ada.Tags. No
3385 change in functionality.
3387 2012-05-15 Eric Botcazou <ebotcazou@adacore.com>
3389 * inline.adb (Subp_Info): Remove Count and Next_Nopred
3390 components, add Processed component and move around Next component.
3391 (Add_Call): Reverse meaning of Successors table to the natural one.
3392 (Add_Inlined_Body): Do not inline a package if it is in the main unit.
3393 (Add_Inlined_Subprogram): Do not add the subprogram to the list if the
3394 package is in the main unit. Do not recurse on the successors.
3395 (Add_Subp): Adjust to new contents of Subp_Info.
3396 (Analyze_Inlined_Bodies): Do not attempt
3397 to compute a topological order on the list of inlined subprograms,
3398 but compute the transitive closure from the main unit instead.
3399 (Get_Code_Unit_Entity): Always return the spec for a package.
3401 2012-05-15 Yannick Moy <moy@adacore.com>
3403 * aspects.ads: Minor addition of comments to provide info on
3404 how to add new aspects.
3406 2012-05-15 Thomas Quinot <quinot@adacore.com>
3408 * osint.ads: Minor reformatting.
3410 2012-05-15 Thomas Quinot <quinot@adacore.com>
3412 * exp_ch5.adb, exp_pakd.adb, sem_util.adb, sem_util.ads
3413 (Expand_Assign_Array): Handle the case of a packed bit array within a
3414 record with reverse storage order (assign element by element in that
3416 (In_Reverse_Storage_Order_Record): New subprogram,
3417 code extracted from Exp_Pakd.
3419 2012-05-15 Yannick Moy <moy@adacore.com>
3421 * a-ngelfu.ads: Add postconditions using Ada 2012
3422 aspect syntax, reflecting some of the RM requirements for these
3423 functions, from Annex A.5.1 or G.2.4.
3425 2012-05-15 Thomas Quinot <quinot@adacore.com>
3427 * adaint.c: Minor fix: move misplaced comment.
3429 2012-05-15 Doug Rupp <rupp@adacore.com>
3431 * vms_data.ads: Enhance help for /IMMEDIATE_ERRORS to discourage
3434 2012-05-15 Tristan Gingold <gingold@adacore.com>
3436 * a-exextr.adb: Add comment.
3438 2012-05-15 Ed Schonberg <schonberg@adacore.com>
3440 * sem_ch3.adb: Minor reformatting (remove long dead code).
3442 2012-05-15 Ed Schonberg <schonberg@adacore.com>
3444 * aspects.adb, aspects.ads: Add aspects for Convention, Export,
3445 External_Name, Import, and Link_Name.
3446 * exp_prag.adb (Expand_Pragma_Import_Or_Interface): if the
3447 pragma comes from an aspect specification, the entity is the
3449 * sem_prag.adb (Analyze_Pragma, cases Pragma_Export and
3450 Pragma_Import): if the pragma comes from an aspect specification,
3451 the entity is the first argument, and the second has the value
3453 * sem_ch13.adb (Analyze_Aspect_Specifications): generate pragam
3454 for aspect Convention. Add placeholders for Link_Name and
3457 2012-05-15 Hristian Kirtchev <kirtchev@adacore.com>
3459 * exp_ch9.adb (Expand_N_Asynchronous_Select): Extract the statements
3460 of the abortable part and triggering alternative after being processed
3461 for controlled objects.
3462 (Expand_N_Timed_Entry_Call): Code and comment reformatting.
3464 2012-05-15 Robert Dewar <dewar@adacore.com>
3466 * sem_util.adb: Minor code reorganization.
3468 2012-05-15 Robert Dewar <dewar@adacore.com>
3470 * exp_ch7.adb, exp_ch11.adb, exp_ch11.ads: Minor reformatting.
3472 2012-05-15 Thomas Quinot <quinot@adacore.com>
3474 * sem_res.adb (Resolve): Enforce E.2.2(11/2) and E.2.2(12) for
3475 'Unrestricted_Access and 'Unchecked_Access (not just 'Access):
3476 even in those cases, a remote access type may only designate a
3479 2012-05-15 Thomas Quinot <quinot@adacore.com>
3481 * sem_util.adb, sem_util.ads, sem_cat.adb: Minor refactoring.
3482 (Enclosing_Lib_Unit_Node): Rename to Enclosing_Comp_Unit_Node.
3484 2012-05-15 Ed Schonberg <schonberg@adacore.com>
3486 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Remove obsolete
3487 checks on nested inlined subprograms.
3489 2012-05-15 Tristan Gingold <gingold@adacore.com>
3491 * fe.h (Get_RT_Exception_Name): Declare.
3493 2012-05-15 Tristan Gingold <gingold@adacore.com>
3495 * raise-gcc.c (db_region_for): Use %p + cast to avoid warnings.
3496 (get_region_description_for): Likewise.
3497 (db_action_for): Likewise.
3498 (get_call_site_action_for): Likewise.
3499 (get_ttype_entry_for): Remove useless 'const'.
3500 (PERSONALITY_FUNCTION): Add ATTRIBUTE_UNUSED on uw_exception_class.
3502 2012-05-15 Tristan Gingold <gingold@adacore.com>
3504 * a-exextr.adb (Unhandled_Exception_Terminate): Save occurrence
3505 on the stack to avoid a dynamic memory allocation.
3507 2012-05-15 Bob Duff <duff@adacore.com>
3509 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Move initialization of
3510 E_Stats and D_Stats after Process_Statements_For_Controlled_Objects,
3511 because those calls can destroy the Statements list.
3513 2012-05-15 Tristan Gingold <gingold@adacore.com>
3515 * fe.h (Get_RT_Exception_Name): Define.
3516 * types.ads (RT_Exception_Code): Update comment.
3517 * exp_ch11.adb, exp_ch11.ads (Get_RT_Exception_Name): New
3518 procedure to get the name of the rcheck subprograms.
3519 * a-except-2005.adb (Rcheck_xx): Rename.
3520 * a-except.adb Likewise, but also keep the old Rcheck_nn routines
3522 * arith64.c (__gnat_mulv64): Use __gnat_rcheck_CE_Overflow_Check
3523 instead of __gnat_rcheck_10.
3524 * gcc-interface/trans.c (build_raise_check): Use Get_RT_Exception_Name
3525 to create the __gnat_rcheck routines name.
3526 * gcc-interface/Make-lang.in: Update dependencies.
3528 2012-05-15 Tristan Gingold <gingold@adacore.com>
3530 * exp_ch7.adb (Build_Exception_Handler): Save current
3531 occurrence only if -gnateE.
3532 (Build_Object_Declaration): Declare E_Id only if -gnateE.
3533 (Build_Raise_Statement): Call Raise_From_Controlled_Operation only if
3534 -gnateE (else raise PE).
3535 * s-soflin.adb (Save_Library_Occurrence): Handle null occurrence
3537 * a-except-2005.adb (Reraise_Library_Exception_If_Any): Call
3538 Raise_From_Controlled_Operation only if the saved occurrence is
3539 not null, otherwise raise PE.
3541 2012-05-15 Yannick Moy <moy@adacore.com>
3543 * exp_alfa.ads: Add comments describing the Alfa mode.
3545 2012-05-15 Tristan Gingold <gingold@adacore.com>
3547 * s-soflin.ads, s-soflin.adb (Save_Library_Occurrence): Parameter
3548 E is now of type Exception_Occurrence_Access.
3549 * exp_ch7.ads, exp_ch7.adb (Build_Exception_Handler): Adjust generated
3550 call to Save_Library_Occurrence.
3552 2012-05-15 Thomas Quinot <quinot@adacore.com>
3554 * exp_ch4.adb (Rewrite_Coextension): Use Insert_Action to
3555 insert temporary variable decl at the proper place in the tree.
3557 2012-05-15 Hristian Kirtchev <kirtchev@adacore.com>
3559 * g-calend.adb (Split_At_Locale): New routine.
3560 (Time_Of_At_Locale): New routine.
3561 * g-calend.ads (Split_At_Locale): New routine.
3562 (Time_Of_At_Locale): New routine.
3564 2012-05-15 Gary Dismukes <dismukes@adacore.com>
3566 * a-except.ads: Minor reformatting.
3568 2012-05-15 Ed Schonberg <schonberg@adacore.com>
3570 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): If the loop
3571 parameter specification is part of a quantified expression, and it
3572 already carries a type, do not repeat the analysis to preserve
3573 type information: a range attribute reference may have been
3574 rewritten as a range with static bounds, and its re-analysis may
3575 type it as Integer by default, instead of the original index type.
3577 2012-05-15 Robert Dewar <dewar@adacore.com>
3579 * s-osprim-mingw.adb: Minor reformatting.
3581 2012-05-15 Arnaud Charlet <charlet@adacore.com>
3583 * a-except.adb, a-except.ads (Reraise_Library_Exception_If_Any): New.
3584 Mark this unit preelaborate.
3585 * s-soflin.ads: Make package Preelaborate.
3587 2012-05-15 Robert Dewar <dewar@adacore.com>
3589 * s-osprim-mingw.adb, sem_eval.adb, a-calend-vms.ads: Minor reformatting
3591 2012-05-15 Ed Schonberg <schonberg@adacore.com>
3593 * sem_eval.adb (Subtypes_Statically_Match): In Ada 2012, static
3594 matching requires matching of static subtype predicates as well.
3596 2012-05-15 Ed Schonberg <schonberg@adacore.com>
3598 * sem_case.adb (Analyze_Choices): If the subtype of the
3599 expression has a non-static predicate, the case alternatives
3600 must cover the base type.
3602 2012-05-15 Tristan Gingold <gingold@adacore.com>
3604 * a-calend-vms.ads: Add pragma export to Split and Time_Of.
3605 Merge comments from a-calend.ads to minimize differences.
3607 2012-05-15 Sergey Rybin <rybin@adacore.com frybin>
3609 * gnat_ugn.texi: gnatmetric: add a small example that demonstrates
3610 the difference between control coupling and unit coupling.
3612 2012-05-15 Tristan Gingold <gingold@adacore.com>
3614 * bindgen.adb (Gen_Header): Remove code to emit LE_Set.
3615 (Gen_Finalize_Library): Replace test with
3616 a call to __gnat_reraise_library_exception_if_any.
3617 * s-soflin.ads (Library_Exception): Do not export.
3618 (Library_Exception_Set): Likewise.
3619 * a-except-2005.ads, a-except-2005.adb
3620 (Reraise_Library_Exception_If_Any): New procedure.
3622 2012-05-15 Geert Bosch <bosch@adacore.com>
3624 * sem_ch9.adb (Allows_Lock_Free_Implementation): out or in out
3625 parameters can be access types as well, not just scalar types,
3626 so relax the test to Is_Elementary_Type.
3628 2012-05-15 Bob Duff <duff@adacore.com>
3630 * s-atacco.ads s-atacco.adb: Replace pragma Elaborate_Body
3631 with pragma No_Body.
3632 (Xyz): Remove Xyz, which is apparently unnecessary.
3634 2012-05-15 Tristan Gingold <gingold@adacore.com>
3636 * a-calend-vms.adb: Complete previous change.
3638 2012-05-15 Bob Duff <duff@adacore.com>
3640 * s-win32.ads: Minor comment fix.
3641 * s-osprim-mingw.adb: Minor editing.
3643 2012-05-15 Robert Dewar <dewar@adacore.com>
3645 * exp_ch9.adb, sem_ch9.adb, sem_ch13.adb: Minor reformatting.
3647 2012-05-15 Robert Dewar <dewar@adacore.com>
3649 * g-comlin.adb, g-comlin.ads: Minor reformatting.
3651 2012-05-15 Vincent Pucci <pucci@adacore.com>
3653 * aspects.adb, aspects.adb: Reordering of the Aspect_Idi list. New
3654 aspect Aspect_Lock_Free.
3655 * einfo.adb, einfo.ads: New flag Uses_Lock_Free (flag 188).
3656 (Set_Uses_Lock_Free): New routine.
3657 (Uses_Lock_Free): New routine.
3658 * exp_ch7.adb (Is_Simple_Protected_Type): Return False for
3659 lock-free implementation.
3660 * exp_ch9.adb (Allows_Lock_Free_Implementation): Moved to Sem_Ch9.
3661 (Build_Lock_Free_Unprotected_Subprogram_Body): Protected
3662 procedure uses __sync_synchronise. Check both Object_Size
3664 (Expand_N_Protected_Body): Lock_Free_Active
3665 renames Lock_Free_On.
3666 (Expand_N_Protected_Type_Declaration):
3667 _Object field removed for lock-free implementation.
3668 (Install_Private_Data_Declarations): Protection object removed
3669 for lock-free implementation.
3670 (Make_Initialize_Protection):
3671 Protection object initialization removed for lock-free implementation.
3672 * rtsfind.ads: RE_Atomic_Synchronize and RE_Relaxed added.
3673 * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect_Lock_Free
3675 * sem_ch9.adb (Allows_Lock_Free_Implementation): New routine.
3676 (Analyze_Protected_Body): Allows_Lock_Free_Implementation call added.
3677 (Analyze_Protected_Type_Declaration):
3678 Allows_Lock_Free_Implementation call added.
3679 (Analyze_Single_Protected_Declaration): Second analysis of
3681 * s-atopri.ads: Header added.
3682 (Atomic_Synchronize): New routine.
3684 2012-05-15 Robert Dewar <dewar@adacore.com>
3686 * exp_ch7.ads: Add comment.
3688 2012-05-15 Hristian Kirtchev <kirtchev@adacore.com>
3690 * a-calend.adb (Day_Of_Week): The routine once again treats
3691 all dates as historic. (Formatting_Operations.Split): All
3692 calls to UTC_Time_Offset are now controlled through formal
3693 parameter Is_Historic. (Formatting_Operations.Time_Of):
3694 All calls to UTC_Time_Offset are now handled through
3695 formal parameter Is_Historic.
3696 (Split): Update the call to Formatting_Operations.Split.
3697 (Time_Of): Update the call to Formatting_Operations.Time_Of.
3698 (To_Ada_Time): Update the call to Formatting_Operations.Time_Of.
3699 (To_Strict_Tm): Update the call to Formatting_Operations.Split.
3700 * a-calend.ads (Split): Add new formal Is_Historic along with
3701 comment on usage. This routine is now exported for the purposes
3702 of GNAT.Calendar.Locale.
3703 (Time_Of): Remove defaults. Add new
3704 formal Is_Historic along with comment on usage. This routine is
3705 now exported for the purposes of GNAT.Calendar.Locale.
3706 * a-calend-vms.adb (Split): Update the call to
3707 Formatting_Operations.Split.
3708 (Time_Of): Update the call to Formatting_Operations.Time_Of.
3709 * a-calend-vms.ads (Split): Add new formal Is_Historic along
3710 with comment on usage. (Time_Of): Remove defaults. Add new
3711 formal Is_Historic along with comment on usage.
3712 * a-calfor.adb (Split): Update the call to
3713 Formatting_Operations.Split.
3714 (Time_Of): Update the call to Formatting_Operations.Time_Of.
3716 2012-05-15 Vincent Celier <celier@adacore.com>
3718 * prj-nmsc.adb (Add_Source): Always add the source if it is
3719 excluded, to avoid incorrect duplicate checks.
3721 2012-05-15 Yannick Moy <moy@adacore.com>
3723 * sem_aux.ads: Correct typo.
3724 * sem_eval.adb (Compile_Time_Known_Value): Return False in Alfa
3725 mode for a deferred constant when outside of the scope of its
3728 2012-05-15 Emmanuel Briot <briot@adacore.com>
3730 * g-comlin.adb, g-comlin.ads (Define_Switch): Allow specifying the name
3731 of the argument, for the automatic help message.
3732 (Getopt): do not systematically initialize switches with string values
3733 to the empty string, when the user has already specified a default.
3735 2012-05-14 Bernd Schmidt <bernds@codesourcery.com>
3737 * gcc-interface/utils.c (DEF_ATTR_STRING): New.
3739 2012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
3742 * gcc-interface/misc.c: Include opts.h and options.h before tm.h.
3743 (gnat_handle_option): Call lang-specific generated function.
3745 2012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
3747 * gcc-interface/lang.opt (I): Comment out help text with no effect.
3748 (nostdinc): Comment out help text with no effect.
3750 2012-05-12 Eric Botcazou <ebotcazou@adacore.com>
3752 * gcc-interface/Makefile.in (TOOLS_LIBS): Add ../../ggc-none.o.
3754 2012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
3757 * gcc-interface/misc.c (gnat_parse_file): Move before ...
3758 (gnat_handle_option): ... this. Use handle_generated_option.
3760 2012-05-10 Richard Guenther <rguenther@suse.de>
3762 * gcc-interface/cuintp.c (UI_From_gnu): Remove TYPE_IS_SIZETYPE use.
3764 2012-05-06 Tristan Gingold <gingold@adacore.com>
3766 * gcc-interface/trans.c (gigi): Decorate reraise_zcx_decl.
3768 2012-05-06 Eric Botcazou <ebotcazou@adacore.com>
3770 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: In the renaming
3771 case, use the padded type if the renamed object has an unconstrained
3772 type with default discriminant.
3774 2012-05-06 Eric Botcazou <ebotcazou@adacore.com>
3776 * gcc-interface/trans.c (Loop_Statement_to_gnu): Also handle invariant
3777 conditions with only one bound.
3778 (Raise_Error_to_gnu): Likewise. New function extracted from...
3779 (gnat_to_gnu) <N_Raise_Constraint_Error>: ...here. Call above function
3780 in regular mode only.
3782 2012-05-06 Eric Botcazou <ebotcazou@adacore.com>
3784 * gcc-interface/misc.c (gnat_post_options): Disable caret by default.
3786 2012-05-06 Eric Botcazou <ebotcazou@adacore.com>
3788 * gcc-interface/gigi.h (make_packable_type): Declare.
3789 (make_type_from_size): Likewise.
3790 (relate_alias_sets): Likewise.
3791 (maybe_pad_type): Adjust.
3792 (init_gnat_to_gnu): Delete.
3793 (destroy_gnat_to_gnu): Likewise.
3794 (init_dummy_type): Likewise.
3795 (destroy_dummy_type): Likewise.
3796 (init_gnat_utils): Declare.
3797 (destroy_gnat_utils): Likewise.
3798 (ceil_pow2): New inline function.
3799 * gcc-interface/decl.c (gnat_to_gnu_entity): Use ceil_pow2.
3800 <object>: Pass True for the final processing of alignment and size.
3801 <E_Subprogram_Type>: Only create the TYPE_DECL for a padded return
3803 (round_up_to_align): Delete.
3804 (ceil_alignment): Likewise.
3805 (relate_alias_sets): Move to...
3806 (make_aligning_type): Likewise.
3807 (make_packable_type): Likewise.
3808 (maybe_pad_type): Likewise.
3809 (make_type_from_size): Likewise.
3810 * gcc-interface/utils.c (MAX_BITS_PER_WORD): Delete.
3811 (struct pad_type_hash): New type.
3812 (pad_type_hash_table): New static variable.
3813 (init_gnat_to_gnu): Merge into...
3814 (init_dummy_type): Likewise.
3815 (init_gnat_utils): ...this. New function.
3816 (destroy_gnat_to_gnu): Merge into...
3817 (destroy_dummy_type): Likewise.
3818 (destroy_gnat_utils): ...this. New function.
3819 (pad_type_hash_marked_p): New function.
3820 (pad_type_hash_hash): Likewise.
3821 (pad_type_hash_eq): Likewise.
3822 (relate_alias_sets): ...here.
3823 (make_aligning_type): Likewise.
3824 (make_packable_type): Likewise.
3825 (maybe_pad_type): Likewise. Change same_rm_size parameter into
3826 set_rm_size; do not set TYPE_ADA_SIZE if it is false. Do not set
3827 null as Ada size. Do not set TYPE_VOLATILE on the padded type. If it
3828 is complete and has constant size, canonicalize it. Bail out earlier
3829 if a warning need not be issued.
3830 (make_type_from_size): Likewise.
3831 <INTEGER_TYPE>: Bail out if size is too large
3832 (gnat_types_compatible_p): Do not deal with padded types.
3833 (convert): Compare main variants for padded types.
3834 * gcc-interface/trans.c (gigi): Call {init|destroy}_gnat_utils.
3835 (gnat_to_gnu): Do not convert at the end for a call to a function that
3836 returns an unconstrained type with default discriminant.
3837 (Attribute_to_gnu) <Attr_Size>: Simplify handling of padded objects.
3838 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Likewise.
3839 Do not use the padded type if it is BLKmode and the inner type is
3842 2012-05-02 Pascal Obry <obry@adacore.com>
3845 2012-02-24 Dave Korn <dave.korn.cygwin@gmail.com>
3847 * gcc-interface/Makefile.in (WIN_SO_PREFIX [windows targets]): New
3848 Windows-specific make variable.
3849 (WIN_SO_INSTALL_DIR [windows targets]): Likewise.
3850 (install-gnatlib): Respect the above during installation when set,
3851 and also install any windows import library that has been built.
3852 (gnatlib-shared-win32): Use WIN_SO_PREFIX to name output DLL and also
3853 build a corresponding import library.
3855 2012-04-30 Jan Hubicka <jh@suse.cz>
3857 * gcc-interface/utils.c (rest_of_subprog_body_compilation): Update
3859 (gnat_write_global_declarations): Use finalize_compilation_unit.
3861 2012-04-30 Eric Botcazou <ebotcazou@adacore.com>
3863 * gcc-interface/decl.c (gnat_to_gnu_entity): In type annotation mode,
3864 do not adjust the size of a tagged type if there is a representation
3865 clause on it. Otherwise, round the adjustment up to the alignment
3866 of the first field and use the appropriate helper routine.
3867 (maybe_pad_type): Do not warn in type annotation mode on a tagged type.
3868 (gnat_to_gnu_field): Do not error out under the same circumstances.
3869 (annotate_rep): In type annotation mode, do not adjust the offset of
3870 components of a tagged type with representation clause. Otherwise,
3871 round the adjustment up to the alignment of the first field.
3873 2012-04-30 Eric Botcazou <ebotcazou@adacore.com>
3875 * gcc-interface/utils.c (finish_record_type): Force the traditional GCC
3876 layout for bitfields on the type if it is packed or has a representation
3877 clause and an alternate layout is available.
3879 2012-04-30 Eric Botcazou <ebotcazou@adacore.com>
3881 * gcc-interface/gigi.h (mark_out_of_scope): Delete.
3882 (destroy_gnat_to_gnu): Declare.
3883 (destroy_dummy_type): Likewise.
3884 * gcc-interface/decl.c (mark_out_of_scope): Delete.
3885 * gcc-interface/utils.c (destroy_gnat_to_gnu): New function.
3886 (destroy_dummy_type): Likewise.
3887 * gcc-interface/trans.c (gnat_validate_uc_list): New variable.
3888 (gigi): Call validate_unchecked_conversion on gnat_validate_uc_list
3889 after the translation is completed. Call destroy_gnat_to_gnu and
3890 destroy_dummy_type at the end.
3891 (Subprogram_Body_to_gnu): Do not call mark_out_of_scope.
3892 (gnat_to_gnu) <N_Block_Statement>: Likewise.
3893 <N_Validate_Unchecked_Conversion>: Do not process the node, only push
3894 it onto gnat_validate_uc_list.
3895 (validate_unchecked_conversion): New function.
3897 2012-04-26 Tristan Gingold <gingold@adacore.com>
3899 * gcc-interface/Make-lang.in: Update dependencies.
3900 Remove s-traceb and tracebak objects from gnat1 and gnatbind (not used).
3901 Remove s-tasdeb and s-vaflop rules (not used).
3903 2012-04-26 Olivier Hainque <hainque@adacore.com>
3905 * gcc-interface/targtyps.c (WIDEST_HARDWARE_FP_SIZE): Default to
3906 DOUBLE_TYPE_SIZE instead of LONG_DOUBLE_TYPE_SIZE.
3908 2012-04-26 Hristian Kirtchev <kirtchev@adacore.com>
3910 * a-calend.adb (Day_Of_Week): Keep the internal
3911 usage of UTC_Time_Offset consistent with Time_Of and Split.
3913 2012-04-26 Hristian Kirtchev <kirtchev@adacore.com>
3915 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Do not freeze
3916 the loop variable while preanalyzing a quantified expression.
3918 2012-04-26 Hristian Kirtchev <kirtchev@adacore.com>
3920 * a-calend.adb (Split, Time_Of): Rename parameter Is_Ada_05
3921 to Use_TZ to better illustrate its function. Update all
3922 references to the parameter.
3923 (To_Ada_Time): Update the call to Formatting_Operations.Time_Of.
3924 * a-calend.ads (Split, Time_Of): Rename parameter Is_Ada_05
3925 to Use_TZ to better illustrate its function. Update the related
3927 * a-calend-vms.adb (Split, Time_Of): Rename parameter
3928 Is_Ada_05 to Use_TZ to better illustrate its function. Update
3929 all references to the parameter.
3930 (To_Ada_Time): Update the call to Formatting_Operations.Time_Of.
3931 * a-calend-vms.ads (Split, Time_Of): Rename parameter Is_Ada_05
3932 to Use_TZ to better illustrate its function. Update the related
3934 * a-calfor.adb (Split, Time_Of): Update the call to
3935 Formatting_Operations.Time_Of.
3936 * sysdep.c (__gnat_localtime_tzoff): Dereference pointer
3937 "is_historic" and rewrite the check as a comparison. Add a
3938 comment on flag values.
3940 2012-04-26 Robert Dewar <dewar@adacore.com>
3942 * exp_ch2.adb, sem_ch8.adb: Minor reformatting.
3944 2012-04-26 Vasiliy Fofanov <fofanov@adacore.com>
3946 * a-stzunb-shared.adb, gnat_ugn.texi, a-strunb-shared.adb,
3947 a-strunb-shared.ads, uintp.adb, a-stwiun-shared.adb,
3948 a-stwiun-shared.ads, a-cbhama.ads, vms_data.ads, a-cobove.adb,
3949 a-convec.adb, sem_ch13.adb, a-cbhase.ads: Fix common misuses of the
3950 word "then" where "than" should be used in English.
3952 2012-04-26 Robert Dewar <dewar@adacore.com>
3954 * sem_ch5.adb (Check_Unreachable_Code): Skip past pragmas.
3956 2012-04-26 Hristian Kirtchev <kirtchev@adacore.com>
3958 * s-finroo.ads: Remove with clause for
3959 Ada.Streams. Type Root_Controlled is now abstract tagged null
3960 record. Remove internal package Stream_Attributes. Root_Controlled
3961 doesn't need stream attribute redeclaration and avoids the
3962 dependency on streams.
3964 2012-04-26 Tristan Gingold <gingold@adacore.com>
3966 * adaint.c (to_host_path_spec): Removed (unused).
3969 2012-04-26 Steve Baird <baird@adacore.com>
3971 * gnat_rm.texi Improve description of Valid_Scalars attribute.
3973 2012-04-26 Ed Schonberg <schonberg@adacore.com>
3975 * sem_ch6.adb (Can_Override_Operator): If the formal is a
3976 generic type the operator cannot be overriding.
3978 2012-04-26 Ed Schonberg <schonberg@adacore.com>
3980 * sem_ch8.adb (Spec_Reloaded_For_Body): Check whether the type
3981 is declared in a package specification, and current unit is the
3982 corresponding package body. The use clauses themselves may be
3983 within a nested package.
3985 2012-04-26 Bob Duff <duff@adacore.com>
3987 * exp_ch2.adb (Param_Entity): Take into account the case where
3988 the type of the entry parameter has a representation clause.
3990 2012-04-26 Ed Schonberg <schonberg@adacore.com>
3992 * gnat_ugn.texi: Tweak dimensionality doc.
3994 2012-04-26 Robert Dewar <dewar@adacore.com>
3996 * sem_eval.adb: Minor reformatting.
3998 2012-04-26 Robert Dewar <dewar@adacore.com>
4000 * einfo.adb, einfo.ads, sem_res.adb, sem_ch4.adb,
4001 sem_eval.adb: Minor reformatting.
4003 2012-04-26 Thomas Quinot <quinot@adacore.com>
4005 * freeze.adb: Minor change in error wording.
4007 2012-04-26 Ed Schonberg <schonberg@adacore.com>
4009 * gnat_ugn.texi: Documentation on dimensional analysis.
4011 2012-04-26 Hristian Kirtchev <kirtchev@adacore.com>
4013 * einfo.adb, einfo.ads: Remove synthesized attribute
4014 Proper_First_Index along with its associations in various nodes.
4015 (Proper_First_Index): Removed.
4016 * sem_ch4.adb (Analyze_Slice): Alphabetize constants. Add new
4017 local variable Index_Type. The index type of a string literal
4018 subtype is that of the stored low bound.
4019 * sem_eval (Get_Static_Length): Remove the use of Proper_First_Index.
4020 * sem_res.adb (Resolve_Slice): Alphabetize constants. Add
4021 new local variable Index_Type. The index type of a
4022 string literal subtype is that of the stored low bound.
4023 (Set_String_Literal_Subtype): Code reformatting.
4025 2012-04-26 Robert Dewar <dewar@adacore.com>
4027 * exp_aggr.adb: Minor reformatting.
4029 2012-04-26 Hristian Kirtchev <kirtchev@adacore.com>
4031 * exp_ch7.adb (Expand_Cleanup_Actions): Update the call to
4032 Requires_Cleanup_Actions.
4033 * exp_util.adb (Requires_Cleanup_Actions (List_Id; Boolean;
4034 Boolean)): Rename formal parameter For_Package to Lib_Level to
4035 better reflect its purpose. Update the related comment and all
4036 occurrences of For_Package in the body.
4037 (Requires_Cleanup_Actions
4038 (Node_Id; Boolean)): Add new formal parameter Lib_Level. Add
4039 local constant At_Lib_Level to keep monitor whether the path
4040 taken from the top-most context to the current construct involves
4041 package constructs. Update all calls to Requires_Cleanup_Actions.
4042 * exp_util.ads (Requires_Cleanup_Actions): Add new formal
4043 parameter Lib_Level and associated comment.
4045 2012-04-26 Ed Schonberg <schonberg@adacore.com>
4047 * sem_ch6.adb (Process_Formals): If the type of the formal is
4048 a non null access type, mark the generated subtype as having a
4049 delayed freeze only if the designated type is not frozen yet.
4051 2012-04-26 Vincent Celier <celier@adacore.com>
4053 * prj-attr.adb: New package Clean with attributes
4054 Object_Artifact_Extensions and Source_Artifact_Extensions.
4055 * prj-nmsc.adb (Process_Clean): Process new package Clean
4056 * prj.ads (Language_Config): New components
4057 Clean_Object_Artifacts and Clean_Source_Artifacts.
4058 * snames.ads-tmpl: New standard names Clean,
4059 Object_Artifact_Extensions and Source_Artifact_Extensions.
4061 2012-04-26 Hristian Kirtchev <kirtchev@adacore.com>
4063 * einfo.adb (Proper_First_Index): Moved from Sem_Util.
4064 * einfo.ads: Add new synthesized attribute Proper_First_Index
4065 along with usage in nodes.
4066 (Proper_First_Index): Moved from Sem_Util.
4067 * sem_util.ads, sem_util.adb (Proper_First_Index): Moved to Einfo.
4069 2012-04-26 Gary Dismukes <dismukes@adacore.com>
4071 * layout.adb (Layout_Component_List): Test for the case of a
4072 single variant and the size of its component list was computed
4073 as an integer literal, and use that size (which is in bits)
4074 as is rather than converting to storage units.
4076 2012-04-26 Robert Dewar <dewar@adacore.com>
4078 * exp_aggr.adb: Minor reformatting.
4080 2012-04-26 Robert Dewar <dewar@adacore.com>
4082 * sem_util.adb: Minor reformatting.
4084 2012-04-26 Thomas Quinot <quinot@adacore.com>
4086 * exp_aggr.adb, exp_pakd.adb (Setup_Inline_Packed_Array_Reference,
4087 Packed_Array_Aggregate_Handled.Get_Component_Val):
4088 Reverse bit numbering within PAT when Reverse_Storage_Order
4089 applies to the enclosing record.
4091 2012-04-26 Thomas Quinot <quinot@adacore.com>
4093 * freeze.adb (Freeze_Record_Type): Improve error message for
4094 Scalar_Storage_Order inconsistent with Bit_Order.
4096 2012-04-25 Gary Dismukes <dismukes@adacore.com>
4098 * exp_ch9.adb: Add comments on the usage of the
4099 lock-free data structures.
4101 2012-04-25 Vincent Pucci <pucci@adacore.com>
4103 * exp_intr.adb (Expand_Shift): Convert the left
4104 operand and the operator when the type of the call differs from
4105 the type of the operator.
4107 2012-04-25 Geert Bosch <bosch@adacore.com>
4109 * stand.ads: Minor comment fix.
4111 2012-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4113 * sem_ch4.adb (Analyze_Slice): Handle the case where the prefix
4114 is a string literal. Retrieve the first index from the base type
4115 when slicing a string literal.
4116 * sem_ch12.adb (Check_Private_View): Move the initialization
4117 of the type inside the loop to reflect the changing index.
4118 * sem_eval.adb (Eval_Relational_Op): Retrieve the first index
4119 from the base type when dealing with a string literal.
4120 * sem_res.adb (Resolve_Slice): Retrieve the first index from
4121 the base type when slicing a string literal.
4122 * sem_util.adb (Is_Internally_Generated_Renaming): New routine.
4123 (Is_Object_Reference): String literals may act
4124 as object references only when they are renamed internally.
4125 (Proper_First_Index): New routine.
4126 * sem_util.ads (Proper_First_Index): New routine.
4128 2012-04-25 Robert Dewar <dewar@adacore.com>
4130 * sem_ch3.adb, csinfo.adb, lib-writ.adb, sem_ch12.adb,
4131 lib-xref.adb: Minor reformatting.
4133 2012-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4135 * exp_ch9.adb: Rename Lock_Free_Sub_Type
4136 to Lock_Free_Subprogram. Remove type Subprogram_Id.
4137 Rename LF_Sub_Table to Lock_Free_Subprogram_Table.
4138 (Allow_Lock_Free_Implementation): Renamed to
4139 Allows_Lock_Free_Implementation. Update the comment on
4140 lock-free restrictions. Code clean up and restructuring.
4141 (Build_Lock_Free_Protected_Subprogram_Body): Update the
4142 profile and related comments. Code clean up and restructuring.
4143 (Build_Lock_Free_Unprotected_Subprogram_Body): Update the
4144 profile and related comments. Code clean up and restructuring.
4147 2012-04-25 Vincent Celier <celier@adacore.com>
4149 * sem_ch12.adb (Inherit_Context): Compare library units, not
4150 names of units, when checking if a unit is already in the context.
4152 2012-04-25 Thomas Quinot <quinot@adacore.com>
4154 * sem_ch3.adb: Reverse_Storage_Order must be propagated to
4155 untagged derived record types.
4157 2012-04-25 Ed Schonberg <schonberg@adacore.com>
4159 * lib-xref.adb: Adjust position of end label.
4161 2012-04-22 Jan Hubicka <jh@suse.cz>
4163 * gcc-interface/utils.c (gnat_write_global_declarations): Do not mark
4166 2012-04-20 Jan Hubicka <jh@suse.cz>
4168 * gcc-interface/utils.c (gnat_write_global_declarations): Update for new
4169 force_output placement.
4171 2012-04-14 Jan Hubicka <jh@suse.cz>
4173 * gcc-interface/trans.c (finalize_nrv): Update field referenced for new
4174 cgraph/varpool layout.
4176 2012-04-09 Mike Stump <mikestump@comcast.net>
4178 * a-assert.ads: Remove execute permission.
4179 * a-chacon.ads: Likewise.
4180 * a-coteio.ads: Likewise.
4181 * a-envvar.ads: Likewise.
4182 * a-exetim-mingw.ads: Likewise.
4183 * a-fzteio.ads: Likewise.
4184 * a-izteio.ads: Likewise.
4185 * a-lcteio.ads: Likewise.
4186 * a-llctio.ads: Likewise.
4187 * a-scteio.ads: Likewise.
4188 * a-suenco.ads: Likewise.
4189 * a-suenst.ads: Likewise.
4190 * a-suewst.ads: Likewise.
4191 * a-suezst.ads: Likewise.
4192 * a-tirsfi.ads: Likewise.
4193 * a-wichha.ads: Likewise.
4194 * a-zchara.ads: Likewise.
4195 * a-zchhan.ads: Likewise.
4196 * a-zchuni.ads: Likewise.
4197 * a-zrstfi.ads: Likewise.
4198 * aspects.ads: Likewise.
4199 * g-byorma.ads: Likewise.
4200 * g-decstr.ads: Likewise.
4201 * g-encstr.ads: Likewise.
4202 * g-spchge.ads: Likewise.
4203 * g-u3spch.ads: Likewise.
4204 * g-wispch.ads: Likewise.
4205 * g-zspche.ads: Likewise.
4206 * namet-sp.ads: Likewise.
4207 * s-os_lib.ads: Likewise.
4208 * s-regexp.ads: Likewise.
4209 * s-regpat.ads: Likewise.
4210 * s-string.ads: Likewise.
4211 * s-tasloc.ads: Likewise.
4212 * s-utf_32.ads: Likewise.
4213 * sem_aux.ads: Likewise.
4214 * a-assert.adb: Likewise.
4215 * a-chacon.adb: Likewise.
4216 * a-envvar.adb: Likewise.
4217 * a-exetim-mingw.adb: Likewise.
4218 * a-suenco.adb: Likewise.
4219 * a-suenst.adb: Likewise.
4220 * a-suewst.adb: Likewise.
4221 * a-suezst.adb: Likewise.
4222 * a-tirsfi.adb: Likewise.
4223 * a-wichha.adb: Likewise.
4224 * a-zchhan.adb: Likewise.
4225 * a-zchuni.adb: Likewise.
4226 * a-zrstfi.adb: Likewise.
4227 * aspects.adb: Likewise.
4228 * g-byorma.adb: Likewise.
4229 * g-decstr.adb: Likewise.
4230 * g-encstr.adb: Likewise.
4231 * g-spchge.adb: Likewise.
4232 * g-u3spch.adb: Likewise.
4233 * g-wispch.adb: Likewise.
4234 * g-zspche.adb: Likewise.
4235 * namet-sp.adb: Likewise.
4236 * s-except.adb: Likewise.
4237 * s-inmaop-vxworks.adb: Likewise.
4238 * s-os_lib.adb: Likewise.
4239 * s-regexp.adb: Likewise.
4240 * s-regpat.adb: Likewise.
4241 * s-string.adb: Likewise.
4242 * s-tasloc.adb: Likewise.
4243 * s-utf_32.adb: Likewise.
4244 * s-wchcon.adb: Likewise.
4245 * sem_aux.adb: Likewise.
4247 2012-04-02 Robert Dewar <dewar@adacore.com>
4249 * s-atopri.ads: Minor reformatting.
4251 2012-04-02 Thomas Quinot <quinot@adacore.com>
4253 * sem_util.adb: Minor reformatting, minor code cleanup.
4255 2012-04-02 Ed Schonberg <schonberg@adacore.com>
4257 * lib-xref.adb (Generate_Reference): For a reference to an
4258 operator symbol, set the sloc to point to the first character
4259 of the operator name, and not to the initial quaote.
4260 (Output_References): Ditto for the definition of an operator
4263 2012-04-02 Vincent Celier <celier@adacore.com>
4265 * ali.adb (Scan_Ali): Recognize Z lines. Set
4266 Implicit_With_From_Instantiation to True in the With_Record for
4268 * ali.ads (With_Record): New Boolean component
4269 Implicit_With_From_Instantiation, defaulted to False.
4270 * csinfo.adb: Indicate that Implicit_With_From_Instantiation
4272 * lib-writ.adb (Write_ALI): New array Implicit_With.
4273 (Collect_Withs): Set Implicit_With for the unit is it is not Yes.
4274 (Write_With_Lines): Write a Z line instead of a W line if
4275 Implicit_With is Yes for the unit.
4276 * sem_ch12.adb (Inherit_Context): Only add a unit in the context
4277 if it is not there yet.
4278 * sinfo.ads: New flag Implicit_With_From_Instantiation (Flag12)
4281 2012-04-02 Yannick Moy <moy@adacore.com>
4283 * osint.adb, osint.ads (Add_Default_Search_Dirs): Add library
4284 search dirs in file specified with option -gnateO.
4286 2012-04-02 Robert Dewar <dewar@adacore.com>
4288 * sem_ch5.adb, exp_util.adb, sem_util.adb, exp_ch4.adb: Minor
4291 2012-04-02 Olivier Hainque <hainque@adacore.com>
4293 * g-sse.ads: Add x86-solaris and x86_64-darwin to the set of
4294 platforms where the use of this spec is supported. Add current
4295 year to the copyright notice.
4296 * gcc-interfaces/Makefile.in: Add g-sse.o and g-ssvety.o to
4297 EXTRA_GNATRTL_NONTASKING_OBJS on x86 32/64 targets that support
4298 it and where they were missing (x86-solaris, x86-freebsd,
4299 x86_64-freebsd, and x86-darwin).
4301 2012-04-02 Gary Dismukes <dismukes@adacore.com>
4303 * bindgen.adb (Gen_Ada_Init): When compiling for the AAMP small
4304 library, where we no longer suppress the Standard_Library,
4305 generate an empty body rather than the usual generation of
4306 assignments to imported globals, since those aren't present in
4309 2012-04-02 Ed Schonberg <schonberg@adacore.com>
4311 * sinfo.ads: Minor documentation fix.
4313 2012-04-02 Hristian Kirtchev <kirtchev@adacore.com>
4315 * sem_res.adb (Resolve_Conditional_Expression): Add local variables
4316 Else_Typ and Then_Typ. Add missing type conversions to the "then" and
4317 "else" expressions when their respective types are scalar.
4319 2012-04-02 Vincent Pucci <pucci@adacore.com>
4321 * exp_ch9.adb: Reordering of the local subprograms. New Table
4322 for the lock free implementation that maps each protected
4323 subprograms with the protected component it references.
4324 (Allow_Lock_Free_Implementation): New routine. Check if
4325 the protected body enables the lock free implementation.
4326 (Build_Lock_Free_Protected_Subprogram_Body): New routine.
4327 (Build_Lock_Free_Unprotected_Subprogram_Body): New routine.
4328 (Comp_Of): New routine.
4329 * Makefile.rtl: Add s-atopri.o
4330 * debug.adb: New compiler debug flag -gnatd9 for lock free
4332 * rtsfind.ads: RE_Atomic_Compare_Exchange_8,
4333 RE_Atomic_Compare_Exchange_16, RE_Atomic_Compare_Exchange_32,
4334 RE_Atomic_Compare_Exchange_64, RE_Atomic_Load_8,
4335 RE_Atomic_Load_16, RE_Atomic_Load_32, RE_Atomic_Load_64, RE_Uint8,
4336 RE_Uint16, RE_Uint32, RE_Uint64 added.
4337 * s-atropi.ads: New file. Defines atomic primitives used
4338 by the lock free implementation.
4340 2012-04-02 Emmanuel Briot <briot@adacore.com>
4342 * g-expect.adb (Expect_Internal): Fix leak of the input file descriptor.
4344 2012-04-02 Hristian Kirtchev <kirtchev@adacore.com>
4346 * exp_ch4.adb (Expand_N_Quantified_Expression): Reimplemented.
4347 The expansion no longer uses the copy of the original QE created
4349 * sem.adb (Analyze): Add processing for loop parameter specifications.
4350 * sem_ch4.adb (Analyze_Quantified_Expression): Reimplemented. The
4351 routine no longer creates a copy of the original QE. All
4352 constituents of a QE are now preanalyzed and resolved.
4353 * sem_ch5.adb (Analyze_Iteration_Scheme): Remove the guard which
4354 bypasses all processing when the iteration scheme is related to a
4355 QE. Relovate the code which analyzes loop parameter specifications
4356 to a separate routine. (Analyze_Iterator_Specification):
4357 Preanalyze the iterator name. This action was originally
4358 done in Analyze_Iteration_Scheme. Update the check which
4359 detects an iterator specification in the context of a QE.
4360 (Analyze_Loop_Parameter_Specification): New routine. This
4361 procedure allows for a stand-alone analysis of a loop parameter
4362 specification without the need of a parent iteration scheme. Add
4363 code to update the type of the loop variable when the range
4364 generates an itype and the context is a QE.
4365 (Pre_Analyze_Range): Renamed to Preanalyze_Range. Update all references
4367 * sem_ch5.ads: Code reformatting.
4368 (Analyze_Loop_Parameter_Specification): New routine.
4369 * sem_ch6.adb (Fully_Conformant_Expressions): Detect a case
4370 when establishing conformance between two QEs utilizing different
4372 * sem_res.adb (Proper_Current_Scope): New routine.
4373 (Resolve): Do not resolve a QE as there is nothing to be done now.
4374 Ignore any loop scopes generated for QEs when detecting an expression
4375 function as the scopes are cosmetic and do not appear in the tree.
4376 (Resolve_Quantified_Expression): Removed. All resolution of
4377 QE constituents is now performed during analysis. This ensures
4378 that loop variables appearing in array aggregates are properly
4381 2012-04-02 Ed Schonberg <schonberg@adacore.com>
4383 * sem_util.adb (Build_Default_Subtype): If the base type is
4384 private and its full view is available, use the full view in
4385 the subtype declaration.
4387 2012-04-02 Jose Ruiz <ruiz@adacore.com>
4389 * gnat_ugn.texi: Add some minimal documentation about how to
4390 use GNATtest for cross platforms.
4392 2012-04-02 Vincent Celier <celier@adacore.com>
4394 * opt.ads (Object_Path_File_Name): New variable.
4395 * prj-attr.adb: New Compiler attribute Object_Path_Switches.
4396 * prj-nmsc.adb (Process_Compiler): Recognize new attribute
4397 Object_Path_Switches.
4398 * snames.ads-tmpl: New standard name Object_Path_Switches.
4399 * switch-c.adb (Scan_Front_End_Switches): Recognize new switch
4400 -gnateO= and put its value in Opt.Object_Path_File_Name.
4402 2012-04-02 Hristian Kirtchev <kirtchev@adacore.com>
4404 * exp_ch7.adb (Process_Declarations): Detect a case where
4405 a source object was initialized by another source object,
4406 but the expression was rewritten as a class-wide conversion
4407 of Ada.Tags.Displace.
4408 * exp_util.adb (Initialized_By_Ctrl_Function): Removed.
4409 (Is_Controlled_Function_Call): New routine.
4410 (Is_Displacement_Of_Ctrl_Function_Result): Removed.
4411 (Is_Displacement_Of_Object_Or_Function_Result): New routine.
4412 (Is_Source_Object): New routine.
4413 (Requires_Cleanup_Actions): Detect a case where a source object was
4414 initialized by another source object, but the expression was rewritten
4415 as a class-wide conversion of Ada.Tags.Displace.
4416 * exp_util.ads (Is_Displacement_Of_Ctrl_Function_Result): Removed.
4417 (Is_Displacement_Of_Object_Or_Function_Result): New routine.
4419 2012-04-02 Ed Schonberg <schonberg@adacore.com>
4421 * sem_res.adb (Resolve_Call): A call to an expression function
4422 does not freeze if it appears in a different scope from the
4423 expression function itself. Such calls appear in the generated
4424 bodies of other expression functions, or in pre/postconditions
4425 of subsequent subprograms.
4427 2012-04-02 Yannick Moy <moy@adacore.com>
4429 * lib-xref-alfa.adb: Code clean up.
4431 2012-04-02 Ed Schonberg <schonberg@adacore.com>
4433 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Do not suppress
4434 style checks, because the subprogram instance itself may contain
4435 violations of syle rules.
4436 * style.adb (Missing_Overriding): Check for missing overriding
4437 indicator on a subprogram instance.
4439 2012-04-02 Hristian Kirtchev <kirtchev@adacore.com>
4441 * sem_ch6.adb (Last_Implicit_Declaration): New routine.
4442 (Process_PPCs): Insert the body of _postconditions after the
4443 last internally generated declaration. This ensures that actual
4444 subtypes created for formal parameters are visible and properly
4445 frozen as _postconditions may reference them.
4447 2012-04-02 Robert Dewar <dewar@adacore.com>
4449 * einfo.adb (First_Component_Or_Discriminant) Now applies to
4450 all types with discriminants, not just records.
4451 * exp_attr.adb (Expand_N_Attribute): Add Scalar_Values handling
4452 for arrays, scalars and non-variant records.
4453 * sem_attr.adb (Analyze_Attribute): Handle Valid_Scalars
4454 * sem_attr.ads (Valid_Scalars): Update description
4455 * sem_util.ads, sem_util.adb (No_Scalar_Parts): New function.
4457 2012-03-31 Eric Botcazou <ebotcazou@adacore.com>
4460 2012-03-25 Eric Botcazou <ebotcazou@adacore.com>
4462 * gcc-interface/decl.c (SS_MARK_NAME): New define.
4463 (gnat_to_gnu_entity) <E_Function>: Prepend leaf attribute on entities
4464 whose name is SS_MARK_NAME.
4466 2012-03-30 Robert Dewar <dewar@adacore.com>
4468 * exp_ch5.adb, sem_util.adb, exp_ch4.adb: Minor comment updates.
4470 2012-03-30 Yannick Moy <moy@adacore.com>
4472 * lib-xref-alfa.adb (Add_Alfa_File): Treat possibly 2 units at the same
4473 time, putting all scopes in the same Alfa file.
4474 (Add_Alfa_Xrefs): Correct errors in comparison function. Correct value
4476 (Collect_Alfa): Possibly pass 2 units to Add_Alfa_File.
4478 2012-03-30 Hristian Kirtchev <kirtchev@adacore.com>
4480 * exp_util.adb (Is_Secondary_Stack_BIP_Func_Call): Handle a case where
4481 a build-in-place call appears as Prefix'Reference'Reference.
4483 2012-03-30 Yannick Moy <moy@adacore.com>
4485 * lib-xref-alfa.adb: Minor refactoring to remove internal package.
4487 2012-03-30 Hristian Kirtchev <kirtchev@adacore.com>
4489 * sem_ch5.adb (Analyze_Iteration_Scheme): Preanalyze the subtype
4490 definition of a loop when the context is a quantified expression.
4492 2012-03-30 Vincent Celier <celier@adacore.com>
4494 * prj.ads: Minor comment update.
4496 2012-03-30 Yannick Moy <moy@adacore.com>
4498 * lib-xref-alfa.adb, alloc.ads, lib-xref.ads: Minor addition of
4499 comments and refactoring.
4501 2012-03-30 Robert Dewar <dewar@adacore.com>
4503 * lib-xref.adb, lib-xref-alfa.adb: Minor reformatting & code
4506 2012-03-30 Yannick Moy <moy@adacore.com>
4508 * lib-xref-alfa.adb (Generate_Dereference): Use Get_Code_Unit
4509 instead of Get_Source_Unit to get file for reference.
4510 (Traverse_Compilation_Unit): Do not add scopes for generic units.
4511 * lib-xref.adb (Generate_Reference): Use Get_Code_Unit instead
4512 of Get_Source_Unit to get file for reference.
4513 * sem_ch12.adb (Analyze_Package_Instantiation): Enable
4514 instantiation in Alfa mode.
4516 2012-03-30 Hristian Kirtchev <kirtchev@adacore.com>
4518 * exp_ch7.adb (Process_Declarations): Replace
4519 the call to Is_Null_Access_BIP_Func_Call with
4520 Is_Secondary_Stack_BIP_Func_Call. Update the related comment.
4521 * exp_util.adb (Is_Null_Access_BIP_Func_Call): Removed.
4522 (Is_Secondary_Stack_BIP_Func_Call): New routine.
4523 (Requires_Cleanup_Actions): Replace
4524 the call to Is_Null_Access_BIP_Func_Call with
4525 Is_Secondary_Stack_BIP_Func_Call. Update the related comment.
4526 * exp_util.ads (Is_Null_Access_BIP_Func_Call): Removed.
4527 (Is_Secondary_Stack_BIP_Func_Call): New routine.
4529 2012-03-30 Yannick Moy <moy@adacore.com>
4531 * lib-xref-alfa.adb, lib-xref.adb: Code clean ups.
4533 2012-03-30 Gary Dismukes <dismukes@adacore.com>
4535 * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): For the case of a
4536 loop entity which is rewritten as a renaming
4537 of the indexed array, explicitly mark the entity as needing
4538 debug info so that Materialize entity will be set later by
4539 Debug_Renaming_Declaration when the renaming is expanded.
4541 2012-03-30 Robert Dewar <dewar@adacore.com>
4543 * sem_attr.ads: Update comment.
4545 2012-03-30 Vincent Celier <celier@adacore.com>
4547 * prj.ads: New Dependency_Kind: ALI_Closure.
4549 2012-03-30 Thomas Quinot <quinot@adacore.com>
4551 * exp_pakd.adb: Minor reformatting.
4553 2012-03-30 Yannick Moy <moy@adacore.com>
4555 * lib-xref-alfa.adb (Add_Alfa_File): Take into account possible absence
4556 of compilation unit for unit in Sdep_Table.
4558 2012-03-30 Thomas Quinot <quinot@adacore.com>
4560 * freeze.adb (Freeze_Record_Type): For a type with reversed bit
4561 order and reversed storage order, disable front-end relayout.
4563 2012-03-25 Eric Botcazou <ebotcazou@adacore.com>
4565 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Copy
4566 the TYPE_PACKED flag from the base type.
4568 2012-03-25 Eric Botcazou <ebotcazou@adacore.com>
4570 * gcc-interface/decl.c (SS_MARK_NAME): New define.
4571 (gnat_to_gnu_entity) <E_Function>: Prepend leaf attribute on entities
4572 whose name is SS_MARK_NAME.
4574 2012-03-25 Eric Botcazou <ebotcazou@adacore.com>
4576 * gcc-interface/utils.c (add_parallel_type): Take a TYPE instead of a
4577 DECL and adjust. Move around.
4578 (has_parallel_type): New predicate.
4579 (rest_of_record_type_compilation): Return early if the type already
4580 has a parallel type.
4581 * gcc-interface/gigi.h (add_parallel_type): Adjust.
4582 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust for above changes.
4584 2012-03-25 Eric Botcazou <ebotcazou@adacore.com>
4586 * gcc-interface/utils.c (finish_record_type): Return early for padded
4589 2012-03-20 Arnaud Charlet <charlet@adacore.com>
4591 * hlo.ads, hlo.adb: Removed, no longer used.
4592 * gcc-interface/Make-lang.in: Remove hlo.o. Update dependencies.
4593 * gcc-interface/Makefile.in: Remove EXTRA_LIBGNAT_SRCS (temporarly)
4594 and compute it from EXTRA_LIBGNAT_OBJS.
4595 Clean up comments, reorder LIBGNAT_SRCS and LIBGNAT_OBJS.
4597 2012-03-20 Yannick Moy <moy@adacore.com>
4599 * gnat_rm.texi, sem_attr.ads: Update documentation.
4601 2012-03-19 Yannick Moy <moy@adacore.com>
4603 * sem_ch6.adb: Minor code clean up.
4605 2012-03-19 Vincent Celier <celier@adacore.com>
4607 * make.adb (Scan_Make_Arg): Make sure all significant -m switches
4608 on the command line are counted.
4610 2012-03-19 Robert Dewar <dewar@adacore.com>
4612 * sem_elab.adb (Generate_Elab_Warnings): Fix spec, fix attribute
4615 2012-03-19 Robert Dewar <dewar@adacore.com>
4617 * par-ch4.adb (Check_Bad_Exp): New procedure
4619 2012-03-19 Robert Dewar <dewar@adacore.com>
4621 * exp_attr.adb, sem_attr.adb, sem_attr.ads, snames.ads-tmpl: Add
4622 initial framework for Valid_Scalars attribute.
4624 2012-03-19 Robert Dewar <dewar@adacore.com>
4626 * scng.adb (Scan): Recognize incorrect preprocessor directive
4628 2012-03-19 Robert Dewar <dewar@adacore.com>
4630 * atree.adb (Allocate_Initialize_Node): Use Num_Extension_Nodes
4631 * atree.ads (Num_Extension_Nodes): New variable
4632 * debug.adb: New debug flag -gnatd.N
4633 * gnat1drv.adb (Adjust_Global_Switches): Adjust
4634 Num_Extension_Nodes if -gnatd.N set
4636 2012-03-19 Eric Botcazou <ebotcazou@adacore.com>
4638 * einfo.ads: Minor update to First_Rep_Item and Has_Gigi_Rep_Item
4641 2012-03-19 Robert Dewar <dewar@adacore.com>
4643 * opt.ads: Remove HLO_Active flag.
4644 * sem.adb: Remove call of high level optimizer.
4645 * sem.ads (New_Nodes_OK): Removed.
4646 * sem_ch10.adb: Remove references to New_Nodes_OK.
4647 * switch-c.adb: Remove handling of -gnatH switch.
4649 2012-03-19 Yannick Moy <moy@adacore.com>
4651 * sem_ch6.adb (Check_Subprogram_Contract): Do not emit warnings
4652 on trivially True or False postconditions and Ensures components
4655 2012-03-19 Robert Dewar <dewar@adacore.com>
4657 * gnat_ugn.texi: Fix index entry for -gnatei (now we have
4660 2012-03-19 Hristian Kirtchev <kirtchev@adacore.com>
4662 * sem_ch3.adb (Get_Discriminant_Value): Instead of looking
4663 at the immediate correcponsing discriminant, traverse a
4664 potential chain of discriminants produced by type derivations.
4665 (Root_Corresponding_Discriminant): Traverse a chain of inherited
4666 discriminants and return the topmost discriminant.
4668 2012-03-19 Bob Duff <duff@adacore.com>
4670 * debug.adb: Minor comment change.
4671 * gnat_ugn.texi: Update documentation for elaboration regarding
4674 2012-03-19 Gary Dismukes <dismukes@adacore.com>
4676 * exp_ch3.adb (Expand_N_Object_Declaration): In
4677 the case of an object of a class-wide interface type, where the
4678 declaration is rewritten as a renaming, call Set_Debug_Info_Needed
4679 on the renaming entity so that Materialize_Entity will be
4680 set. Also, change existing call (for other than interface cases)
4681 to call Set_Debug_Info_Needed rather than Set_Needs_Debug_Info
4682 (as specified for that flag).
4684 2012-03-19 Hristian Kirtchev <kirtchev@adacore.com>
4686 * sem_ch4.adb (Analyze_Allocator): Detect an allocator generated
4687 by the build-in-place machinery where the designated type is
4688 indefinite, but the underlying type is not. Do not emit errors
4689 related to missing initialization in this case.
4691 2012-03-19 Robert Dewar <dewar@adacore.com>
4693 * gnat_ugn.texi: Add documentation for -gnateinnn switch.
4694 * sem_elab.adb, put_alfa.adb, lib-xref-alfa.adb: Minor reformatting.
4695 * sem_prag.adb: Minor comment update.
4697 2012-03-15 Robert Dewar <dewar@adacore.com>
4699 * errout.ads: Add entry for translating -gnateinn to
4700 /MAX_INSTANTIATIONS for VMS.
4701 * hostparm.ads (Max_Instantiations): Moved to Opt.
4702 * opt.ads (Maximum_Instantiations): Moved from Hostparm, and renamed.
4703 * sem_ch12.adb (Maximum_Instantiations): New name of
4704 Max_Instantiations (Analyze_Package_Instantiation): Change error
4705 msg for too many instantiations (mention -gnateinn switch).
4706 * switch-c.adb (Scan_Front_End_Switches): Implement -gnateinn switch.
4707 * switch.ads: Minor comment update.
4708 * usage.adb (Usage): Output line for -maxeinn switch.
4709 * vms_data.ads: Add entry for MAX_INSTANTIATIONS (-gnateinn).
4711 2012-03-15 Yannick Moy <moy@adacore.com>
4713 * alfa.ads Update the decription of ALI sections.
4714 (Alfa_File_Record): Add a component Unit_File_Name to store the
4715 unit file name for subunits.
4716 * get_alfa.adb, put_alfa.adb Adapt to the possible presence of
4718 * lib-xref-alfa.adb (Add_Alfa_File): For subunits, retrieve the
4719 file name of the unit.
4721 2012-03-15 Yannick Moy <moy@adacore.com>
4723 * sem_ch6.adb (Check_Subprogram_Contract): Do
4724 not issue warning on missing 'Result in postcondition if all
4725 postconditions and contract-cases already get a warning for only
4726 referring to pre-state.
4728 2012-03-15 Bob Duff <duff@adacore.com>
4730 * debug.adb: Add new debug switch -gnatd.U, which disables the
4731 support added below, in case someone trips over a cycle, and needs
4733 * sem_attr.adb (Analyze_Access_Attribute):
4734 Treat Subp'Access as a call for elaboration purposes.
4735 * sem_elab.ads, sem_elab.adb (Check_Elab_Call): Add support
4738 2012-03-15 Vincent Pucci <pucci@adacore.com>
4740 * sem.ads, sem.adb (Preanalyze): New routine.
4741 * sem_ch4.adb (Analyze_Quantified_Expression): Call to the
4742 Preanalyze routine in Sem added. Renaming of Needs_Expansion
4743 into Need_Preanalysis.
4744 * sem_ch6.adb (Preanalyze): Removed.
4746 2012-03-15 Robert Dewar <dewar@adacore.com>
4748 * sem_ch4.adb (Analyze_Quantified_Expression): Add comment.
4749 * sem_prag.adb: Minor comment additions.
4750 * sem_attr.adb (Check_First_Last_Valid): Make sure prefix type
4753 2012-03-15 Vincent Pucci <pucci@adacore.com>
4755 * sem_ch4.adb (Analyze_Quantified_Expression):
4756 Preanalyze the condition when the quantified expression will be
4759 2012-03-15 Yannick Moy <moy@adacore.com>
4761 * sem_prag.adb, sem_util.adb, sem_util.ads, sem_attr.adb, sem_ch6.adb,
4762 sem_warn.adb: Minor refactoring, renaming Case_Pragma in CTC_Pragma,
4763 to refer to both Test_Case pragma and Contract_Case pragma (same
4764 acronym as in Spec_CTC_List).
4766 2012-03-15 Robert Dewar <dewar@adacore.com>
4768 * sem_prag.adb, sem_prag.ads, sem_util.ads, sem_attr.adb, sem_ch6.adb,
4769 sem_warn.adb: Minor reformatting.
4771 2012-03-15 Hristian Kirtchev <kirtchev@adacore.com>
4773 * exp_util.adb (Initialized_By_Ctrl_Function): Do not loop over
4774 selector names as the function call always appears at the top selected
4777 2012-03-15 Ed Schonberg <schonberg@adacore.com>
4779 * sem_ch12.adb (Validate_Access_Subprogram_Instance): keep
4780 Mode_Conformance check for older versions of the language.
4782 2012-03-15 Yannick Moy <moy@adacore.com>
4784 * gnat_ugn.texi Document the extension of option -gnatw.t.
4785 * sem_ch3.adb (Analyze_Declaration): Check for suspicious
4786 contracts only after contract cases have been semantically
4788 * sem_ch6.adb (Check_Subprogram_Contract): Consider also Ensures
4789 components of contract cases for detecting suspicious contracts.
4791 2012-03-15 Yannick Moy <moy@adacore.com>
4793 * aspects.adb, aspects.ads (Aspect_Id): New GNAT aspect
4794 Aspect_Contract_Case.
4795 * gnat_rm.texi Document the new pragma/aspect
4796 Contract_Case. Correct the documentation of the existing
4797 pragma/aspect Test_Case with the new semantics.
4798 * sem_attr.adb (Analyze_Attribute): Allow use of 'Result in the
4799 Ensures component of a Contract_Case pragma.
4800 * sem_ch13.adb (Analyze_Aspect_Specifications): Check new aspect
4801 and translate it into a pragma.
4802 (Check_Aspect_At_Freeze_Point): Take into account the new aspect.
4803 * sem_ch3.adb, sinfo.adb, sinfo.ads Renaming of TC (for test case)
4804 into CTC (for contract and test case).
4805 * sem_ch6.adb (Process_PPCs): Generate Check pragmas from
4806 Contract_Case pragmas, similarly to what is done already for
4808 * sem_prag.adb, sem_prag.ads (Check_Contract_Or_Test_Case):
4809 Renaming of Check_Test_Case.
4810 (Analyze_Pragma, Sig_Flags): Take into account the new pragma.
4811 * sem_util.adb, sem_util.ads Renaming to take into account the
4812 new pragma, so that functions which applied only to Test_Case
4813 now apply to both Test_Case and Contract_Case.
4814 * par-prag.adb, sem_warn.adb, snames.ads-tmpl Take into account
4817 2012-03-15 Robert Dewar <dewar@adacore.com>
4819 * sem_ch6.ads: Minor comment updates.
4820 * sem_ch12.adb: Minor comment clarification.
4822 2012-03-15 Robert Dewar <dewar@adacore.com>
4824 * sem_ch5.adb: Minor reformatting.
4826 2012-03-15 Ed Schonberg <schonberg@adacore.com>
4828 * exp_ch3.adb (Expand_N_Object_Declaration): When rewriting the
4829 declaration of a class-wide object, retain the Ekind to prevent
4830 subsequent misuse of constants.
4832 2012-03-15 Yannick Moy <moy@adacore.com>
4834 * gnat_rm.texi, gnat_ugn.texi: Minor correction of invariant
4837 2012-03-15 Hristian Kirtchev <kirtchev@adacore.com>
4839 * exp_util.adb (Initialized_By_Ctrl_Function): Add code to
4840 process the case when a function call appears in object.operation
4843 2012-03-15 Ed Schonberg <schonberg@adacore.com>
4845 * sem_ch6.ads, sem_ch6.adb (Check_Subtype_Conformant): add
4846 Get_Inst formal, so that conformance within an instantiation
4847 follows renamings of formals. This is similar to what is already
4848 done in Check_Mode_conformant.
4849 * sem_ch12.adb (Vailidate_Access_Subprogram_Instance): check that
4850 formal and actual are subtype conformant. Previously only mode
4851 conformance was required.
4853 2012-03-15 Robert Dewar <dewar@adacore.com>
4855 * par-ch6.adb, einfo.ads, sem_eval.adb, sem_eval.ads,
4856 sem_case.adb: Minor reformatting.
4858 2012-03-15 Robert Dewar <dewar@adacore.com>
4860 * exp_attr.adb (Expand_N_Attribute_Reference): Add handling
4861 of First_Valid/Last_Valid.
4862 * sem_attr.adb (Check_First_Last_Valid): New procedure
4863 (Analyze_Attribute): Add handling of First_Valid and Last_Valid
4864 (Eval_Attribute): ditto.
4865 * snames.ads-tmpl: Add entries for First_Valid and Last_Valid.
4867 2012-03-15 Ed Schonberg <schonberg@adacore.com>
4869 * exp_ch5.adb (Expand_Predicated_Loop): Suppress warnings on
4870 loop variable, for the unusual case where the range has a single
4871 element and the loop variable has no visible assignment to it.
4873 2012-03-15 Vincent Pucci <pucci@adacore.com>
4875 * exp_ch4.adb (Expand_N_Quantified_Expression): Expand the
4876 original quantified expression node.
4877 * sem_ch4.adb (Analyze_Quantified_Expression): Properly analyze
4878 the quantified expression and preserve the original non-analyzed
4879 quantified expression when an expansion is needed.
4880 * sem_ch5.adb (Analyze_Iteration_Scheme): Special treatment
4881 for quantified expressions.
4882 (Analyze_Iterator_Specification): Special treatment for quantified
4885 2012-03-15 Ed Falis <falis@adacore.com>
4887 * s-vxwork-ppc.ads: Update FP_CONTEXT so name of former pad
4888 field matches VxWorks headers.
4890 2012-03-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4892 * gcc-interface/Makefile.in (mips-sgi-irix6*): Remove.
4894 * a-intnam-irix.ads, mlib-tgt-specific-irix.adb,
4895 s-intman-irix.adb, s-mastop-irix.adb, s-osinte-irix.adb,
4896 s-osinte-irix.ads, s-proinf-irix-athread.adb,
4897 s-proinf-irix-athread.ads, s-taprop-irix.adb, s-tasinf-irix.ads,
4898 system-irix-n32.ads, system-irix-n64.ads, system-irix-o32.ads:
4901 * adaint.c [__mips && __sgi]: Remove.
4902 (__gnat_number_of_cpus) [__mips && __sgi]: Remove.
4903 [IS_CROSS && !(__mips && __sgi)]: Remove.
4904 * adaint.h [sgi && _LFAPI]: Remove.
4905 * cstreams.c (__gnat_full_name) [sgi]: Remove.
4906 * env.c (__gnat_unsetenv) [__mips && __sgi]: Remove.
4907 (__gnat_clearenv) [__mips && __sgi]: Remove.
4908 * errno.c (_SGI_MP_SOURCE): Remove.
4909 * gsocket.h [sgi]: Remove.
4910 * init.c: Remove IRIX reference.
4912 * link.c [sgi]: Remove.
4913 * s-oscons-tmplt.c [__mips && __sgi] (IOV_MAX): Don't define.
4914 (main) [__mips && __sgi] (MAX_tv_sec): Don't define.
4915 (CLOCK_SGI_FAST, CLOCK_SGI_CYCLE): Remove.
4916 * sysdep.c [sgi]: Remove.
4917 (getc_immediate_common) [sgi]: Remove.
4918 (__gnat_localtime_tzoff) [sgi]: Remove.
4919 * terminals.c [__mips && __sgi] (IRIX): Don't define.
4920 [IRIX] (USE_GETPTY): Don't define.
4921 (allocate_pty_desc) [USE_GETPTY]: Remove.
4923 * g-traceb.ads: Remove IRIX reference.
4924 * g-trasym.ads: Likewise.
4925 * memtrack.adb: Likewise.
4926 * s-interr-sigaction.adb: Likewise.
4928 * gnat_rm.texi (Implementation Advice): Remove SGI info.
4929 (Implementation Defined Characteristics): Likewise.
4930 * gnat_ugn.texi (Summary of Run-Time Configurations, mips-irix):
4932 (Irix-Specific Considerations): Remove.
4934 2012-03-13 Tristan Gingold <gingold@adacore.com>
4936 * gcc-interface/gigi.h (flag_vms_malloc64): Refine condition.
4938 2012-03-13 Tristan Gingold <gingold@adacore.com>
4940 * sysdep.c: Adjust condition after removal of __osf__.
4942 2012-03-12 Eric Botcazou <ebotcazou@adacore.com>
4944 * gcc-interface/gigi.h (shift_unc_components_for_thin_pointers): Kill.
4945 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Remove call
4947 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Pool_Address>: Adjust
4948 handling of thin pointers.
4949 <Attr_Descriptor_Size>: Likewise.
4950 (gnat_to_gnu) <N_Free_Statement>: Likewise.
4951 * gcc-interface/utils.c (shift_unc_components_for_thin_pointers): Kill.
4952 (convert_to_fat_pointer): Adjust handling of thin pointers.
4953 (convert) <POINTER_TYPE>: Likewise.
4954 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: Likewise.
4956 2012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4958 * gcc-interface/Makefile.in (alpha*-dec-osf*): Remove.
4959 * a-intnam-tru64.ads, mlib-tgt-specific-tru64.adb,
4960 s-mastop-tru64.adb, s-osinte-tru64.adb, s-osinte-tru64.ads,
4961 s-taprop-tru64.adb, s-tasinf-tru64.ads, s-taspri-tru64.ads,
4962 system-tru64.ads: Remove.
4964 * adaint.c (__gnat_number_of_cpus) [__alpha__ && __osf__]:
4966 [IS_CROSS] [!(__alpha__ && __osf__)]: Remove.
4967 * env.c [__alpha__ && __osf__]: Remove.
4968 * gsocket.h (_OSF_SOURCE): Remove.
4969 (HAVE_THREAD_SAFE_GETxxxBYyyy) [__osf__]: Remove.
4970 * init.c [__alpha__ && __osf__]: Remove.
4971 * link.c [__osf__]: Remove.
4972 * s-oscons-tmplt.c [__alpha__ && __osf__]: Remove.
4973 [__osf__ && !_SS_MAXSIZE]: Remove.
4974 * sysdep.c [__osf__]: Remove.
4975 * terminals.c [__alpha__ && __osf__]: Remove.
4978 * g-traceb.ads: Remove Tru64 reference.
4979 * g-trasym.ads: Likewise.
4980 * gnat_ugn.texi (Linking a Mixed C++ & Ada Program): Likewise.
4981 (Summary of Run-Time Configurations): Likewise.
4982 * memtrack.adb: Likewise.
4984 2012-03-12 Tristan Gingold <gingold@adacore.com>
4986 * gcc-interface/decl.c (gnat_to_gnu_param): Use flag_vms_malloc64
4987 instead of TARGET_MALLOC64.
4988 * gcc-interface/gigi.h (flag_vms_malloc64): Define instead
4991 2012-03-09 Robert Dewar <dewar@adacore.com>
4993 * a-direct.adb, comperr.adb, freeze.adb: Minor reformatting.
4995 2012-03-09 Arnaud Charlet <charlet@adacore.com>
4997 * s-taskin.adb (Initialize_ATCB): Set Task_Image_Len to
4998 0 so that we never access this field uninitialized (e.g. in
4999 Task_Primitives.Operations.Enter_Task for the environment task).
5001 2012-03-09 Vincent Pucci <pucci@adacore.com>
5003 * exp_ch5.adb (Expand_Iterator_Loop):
5004 Call to Expand_Iterator_Loop_Over_Array added.
5005 (Expand_Iterator_Loop_Over_Array): New routine. Expansion of
5006 "of" iterator loop over arrays. Multidimensional array case added.
5008 2012-03-09 Eric Botcazou <ebotcazou@adacore.com>
5010 * uintp.ads: Fix minor pasto in comment.
5012 2012-03-09 Vasiliy Fofanov <fofanov@adacore.com>
5014 * a-direct.adb: Do not strip the trailing directory separator
5015 from path, as this is already done inside Normalize_Pathname;
5016 doing it again produces the wrong result on Windows for the
5017 drive's root dir (i.e. "X:\" becomes "X:").
5019 2012-03-09 Thomas Quinot <quinot@adacore.com>
5021 * exp_attr.adb, freeze.adb, sem_attr.adb, aspects.adb, aspects.ads,
5022 sem_ch13.adb, snames.ads-tmpl (Exp_Attr.Expand_N_Attribute_Reference):
5023 Add Attribute_Scalar_Storage_Order.
5024 (Sem_Attr.Analyze_Attribute, Eval_Attribute): Ditto.
5025 (Aspects): Add Aspect_Scalar_Storage_Order (Snames): Add
5026 Name_Scalar_Storage_Order and Attribute_Scalar_Storage_Order.
5027 (Sem_Ch13.Analyze_Attribute_Definition_Clause): Add processing
5028 for Scalar_Storage_Order.
5029 (Freeze): If Scalar_Storage_Order is specified, check that it
5030 is compatible with Bit_Order.
5032 2012-03-09 Robert Dewar <dewar@adacore.com>
5034 * s-osinte-linux.ads, sem_util.adb, s-taprop-linux.adb, exp_ch4.adb,
5035 a-strsup.ads, sem_ch6.adb, a-stwisu.ads, exp_ch3.adb,
5036 a-stzsup.ads: Minor reformatting.
5038 2012-03-09 Thomas Quinot <quinot@adacore.com>
5040 * s-ransee-vms.adb: Minor reformatting.
5042 2012-03-09 Arnaud Charlet <charlet@adacore.com>
5044 * comperr.adb (Delete_SCIL_Files): Fix handling of
5045 N_Package_Renaming_Declaration and N_Generic_Package_Declaration.
5047 2012-03-09 Javier Miranda <miranda@adacore.com>
5049 * sem_ch6.adb (Check_Body_To_Inline): In AAMP and VM targets
5050 use frontend inlining at all optimization levels.
5051 * sem_util.adb (Must_Inline): In AAMP and VM targets, given that
5052 there is no inlining support in the backend, use also frontend
5053 inlining when compiling with optimizations enabled.
5054 * exp_ch6.adb (Expand_Call): Minor code reorganization.
5056 2012-03-09 Eric Botcazou <ebotcazou@adacore.com>
5058 * gcc-interface/ada-tree.h (TYPE_VAX_FLOATING_POINT_P): Move around.
5059 (TYPE_UNCONSTRAINED_ARRAY): Adjust comment.
5060 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Pool_Address>: Tidy
5061 up. Add comment and use canonical predicate for thin pointers.
5062 (gnat_to_gnu) <N_Free_Statement>: Tidy up and reorder. Add comment
5063 and use canonical predicate for thin pointers.
5064 * gcc-interface/utils.c (convert_to_fat_pointer): Remove superfluous
5065 'else' and use standard name.
5066 (convert_to_thin_pointer): Delete.
5067 (convert) <POINTER_TYPE>: Do the difference in sizetype directly and
5068 change obsolete idioms. Do not call above function.
5069 (unchecked_convert): Fix formatting.
5070 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: In the thin
5071 pointer case, use byte_position to get the field position.
5073 2012-03-07 Eric Botcazou <ebotcazou@adacore.com>
5075 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set flags on the
5076 DECL node built for a type which has a non-trivial equivalent type.
5078 2012-03-07 Eric Botcazou <ebotcazou@adacore.com>
5080 * gcc-interface/gigi.h (rest_of_type_decl_compilation): Delete.
5081 * gcc-interface/decl.c (defer_finalize_level): Likewise.
5082 (defer_finalize_list): Likewise.
5083 (gnat_to_gnu_entity): Delete references to above variables and do not
5084 call rest_of_type_decl_compilation.
5085 (rest_of_type_decl_compilation): Delete.
5086 (rest_of_type_decl_compilation_no_defer): Likewise.
5087 * gcc-interface/utils.c (rest_of_record_type_compilation): Do not call
5088 rest_of_type_decl_compilation.
5089 (create_type_decl): Likewise.
5090 (update_pointer_to): Likewise.
5092 2012-03-07 Eric Botcazou <ebotcazou@adacore.com>
5094 * gcc-interface/trans.c (Identifier_to_gnu): Don't unshare initializer.
5095 (add_decl_expr): Mark external DECLs as used.
5096 * gcc-interface/utils.c (convert) <CONSTRUCTOR>: Copy the vector.
5098 2012-03-07 Tristan Gingold <gingold@adacore.com>
5100 * s-ransee-vms.adb: New file.
5101 * gcc-interface/Makefile.in: Use s-ransee-vms.adb on VMS.
5102 * gcc-interface/Make-lang.in: Update dependencies.
5104 2012-03-07 Bob Duff <duff@adacore.com>
5106 * rtsfind.ads: Add support for finding Super_String types.
5107 * sem_util.ads, sem_util.adb (Is_Bounded_String): New function
5108 to determine whether a given type is a bounded string type.
5109 (Is_Fully_Initialized_Type): Return True for bounded
5110 string types, to suppress bogus warnings.
5111 * exp_ch4.adb (Expand_Composite_Equality): Special case for bounded
5112 strings: equality composes. This allows us to remove default values in
5114 * a-strsup.ads, a-stwisu.ads, a-stzsup.ads: Update comments.
5115 * exp_ch3.adb (Expand_Freeze_Record_Type): Comment.
5117 2012-03-07 Robert Dewar <dewar@adacore.com>
5119 * sem_util.adb, exp_ch4.adb, exp_ch6.adb, sem_ch6.adb: Minor
5122 2012-03-07 Sergey Rybin <rybin@adacore.com frybin>
5124 * gnat_ugn.texi: gnatpp: fix paragraph about sources with
5125 preprocessor directives.
5127 2012-03-07 Arnaud Charlet <charlet@adacore.com>
5129 * s-osinte-linux.ads, s-taprop-linux.adb (prctl): New function.
5130 (Enter_Task): Call prctl when relevant.
5132 2012-03-07 Tristan Gingold <gingold@adacore.com>
5134 * s-osinte-vms.ads: pthread_mutex_setname_np: new function.
5136 2012-03-07 Ed Schonberg <schonberg@adacore.com>
5138 * sem_ch6.adb (Process_Formals): a generic subprogram with
5139 a formal incomplete type does not require a freeze node.
5141 2012-03-07 Bob Duff <duff@adacore.com>
5143 * sem_util.ads: Minor reformatting.
5145 2012-03-07 Geert Bosch <bosch@adacore.com>
5147 * targparm.ads: New target parameter Atomic_Sync_Default,
5149 * targparm.adb (Get_Target_Parameters): Add processing for
5150 Atomic_Sync_Default.
5151 * gnat1drv.adb (Adjust_Global_Switches): Adjust Supress_Options
5154 2012-03-07 Javier Miranda <miranda@adacore.com>
5156 * sem_ch3.adb (Analyze_Object_Declaration): If the object
5157 declaration has an init expression then stop the analysis of the
5158 object declaration if the expression which initializes the object
5159 is a call to an inlined function which returns an unconstrained
5160 and has been expanded into a procedure call.
5161 * sem_ch5.adb (Has_Call_Using_Secondary_Stack): Add missing
5162 support to handle selected components.
5163 * sem_ch6.ads (Cannot_Inline): Adding parameter Is_Serious plus
5165 * sem_ch6.adb (Check_And_Build_Body_To_Inline): New
5166 subprogram which implements the checks required by the
5167 new rules for frontend inlining and builds the body to inline.
5168 (Analyze_Subprogram_Body_Helper): Move code that
5169 checks inlining of subprogram that has nested subprogram
5170 to Check_And_Build_Body_To_Inline. Replace call to
5171 Build_Body_To_Inline by call to the new subprogram
5172 Check_And_Build_Body_To_Inline.
5173 (Cannot_Inline): New implementation.
5174 * sem_ch12.adb (Analyze_Package_Instantiation.Must_Inline_Subp):
5176 * sem_util.ad[sb] (Must_Inline): New subprogram.
5177 (Returns_Unconstrained_Type): New subprogram.
5178 * sem_res.adb (Resolve_Call): Do not create a transient scope
5180 * inline.ads (Analyzing_Inlined_Bodies): Remove unreferenced variable.
5181 * inline.adb (Analyze_Inlined_Bodies, Initialize): Remove setting
5182 to false the variable Analyzing_Inlined_Bodies. Fix comments.
5183 * exp_ch4.adb (Expand_N_Allocator): Fix handling of finalization master.
5184 * exp_ch6.ads (List_Inlining_Info): New subprogram.
5185 * exp_ch6.adb (Expand_Call.Do_Inline): New subprogram.
5186 (Expand_Call.Do_Inline_Always): New subprogram.
5187 (In_Unfrozen_Instance): Move the declaration of this subprogram.
5188 (Expand_Inlined_Call.Reset_Dispatching_Calls): New subprogram.
5189 (Expand_Inlined_Call): Adding new support for inlining functions
5190 that return unconstrained types.
5191 (List_Inlining_Info): New subprogram.
5192 * debug.adb Document flags -gnatd.j and -gnatd.k
5193 * gnat1drv.adb Add call to generate the new listing of inlined
5194 calls and calls passed to the backend.
5196 2012-03-07 Robert Dewar <dewar@adacore.com>
5198 * sem_ch5.adb, s-vaflop.adb, s-taprop-vms.adb, exp_ch6.adb,
5199 s-gearop.adb, sem_ch6.adb, g-trasym.adb: Minor reformatting.
5201 2012-03-07 Javier Miranda <miranda@adacore.com>
5203 * a-ngrear.ads: Add documentation.
5205 2012-03-07 Tristan Gingold <gingold@adacore.com>
5207 * s-taprop-vms.adb (Create_Task): set thread name.
5208 * s-osinte-vms.ads (pthread_attr_setname_np): Declare.
5210 2012-03-07 Arnaud Charlet <charlet@adacore.com>
5212 * g-trasym.adb: Minor reformatting.
5214 2012-03-07 Robert Dewar <dewar@adacore.com>
5216 * a-ngrear.ads: Minor addition of ??? comment.
5218 2012-03-07 Gary Dismukes <dismukes@adacore.com>
5220 * exp_ch4.adb (Apply_Accessibility_Check): Call
5221 Remove_Side_Effects in the build-in-place case, to ensure that
5222 we capture the call and don't end up with two calls.
5224 2012-03-07 Javier Miranda <miranda@adacore.com>
5226 * exp_ch6.adb (Expand_Inlined_Call): Skip inlining of functions
5227 that return unconstrained types using an extended return statement
5228 since the support for inlining these functions has not been yet
5229 added to the frontend.
5230 * s-vaflop.adb, s-vaflop-vms-alpha.adb: Code reorganization.
5231 * a-ngrear.ads: Replace all the Inline_Always pragmas by pragma
5233 * a-ngrear.adb (Eigenvalues, Transpose): Restructured to use
5234 extended return statement.
5235 * a-strsup.adb, a-stzsup.adb, a-stwisu.adb (Concat, Super_Slice,
5236 Super_To_String): Restructured to use extended return statement.
5237 * a-chahan.adb (To_Basic, To_Lower, To_Upper): Restructured to
5238 use extended return statement.
5239 * s-gearop.adb (Diagonal, Matrix_Elementwise_Operation,
5240 Vector_Elementwise_Operation, Matrix_Elementwise_Operation,
5241 Matrix_Matrix_Scalar_Elementwise_Operation,
5242 Vector_Vector_Elementwise_Operation,
5243 Vector_Vector_Scalar_Elementwise_Operation,
5244 Matrix_Scalar_Elementwise_Operation,
5245 Vector_Scalar_Elementwise_Operation,
5246 Scalar_Matrix_Elementwise_Operation,
5247 Scalar_Vector_Elementwise_Operation, Matrix_Matrix_Product,
5248 Matrix_Vector_Product, Outer_Product, Unit_Matrix, Unit_Vector,
5249 Vector_Matrix_Product): Restructured to use extended return
5252 2012-03-07 Vincent Pucci <pucci@adacore.com>
5254 * sem_ch5.adb (One_Bound): Minor reformatting.
5256 2012-03-07 Tristan Gingold <gingold@adacore.com>
5258 * s-osinte-vms-ia64.adb, s-osinte-vms-ia64.ads, s-osinte-vms.adb,
5259 s-osinte-vms.ads, gcc-interface/Makefile.in: Merge s-osinte-vms and
5262 2012-03-07 Ed Schonberg <schonberg@adacore.com>
5264 * checks.adb (Apply_Predicate_Check): Do not generate a predicate
5265 check is the context is an internally generated type-specific
5267 * sem_ch6.adb (Process_PPCs); the formals of internally generated
5268 type-specific functions do not get assertion checks.
5270 2012-03-07 Yannick Moy <moy@adacore.com>
5272 * gnat_rm.texi: Minor renaming of title.
5273 * gnat_ugn.texi: Minor correction.
5275 2012-03-07 Vincent Pucci <pucci@adacore.com>
5277 * exp_ch4.adb (Expand_N_Quantified_Expression): Minor
5279 * sem_ch4.adb (Analyze_Quantified_Expression): Creation and
5280 analysis of the iteration scheme added in all cases.
5281 * sem_ch5.adb (Analyze_Iteration_Scheme): Minor reformating.
5282 (Analyze_Iterator_Specification): Minor reformating.
5283 * sem_res.adb (Resolve_Quantified_Expression): Resolution of
5284 the condition added in all cases.
5286 2012-03-07 Thomas Quinot <quinot@adacore.com>
5288 * einfo.adb, einfo.ads: Add flag Reverse_Storage_Order.
5290 2012-03-07 Yannick Moy <moy@adacore.com>
5292 * gnat_rm.texi, gnat_ugn.texi: Rewording of GNAT UG and GNAT RM to
5293 account for Ada 2012 assertions, and their pragma counterparts in GNAT.
5295 2012-03-07 Thomas Quinot <quinot@adacore.com>
5297 * exp_attr.adb, sem_attr.adb: Minor reformatting.
5299 2012-03-07 Bob Duff <duff@adacore.com>
5301 * hostparm.ads (Max_Instantiations): Increase parameter.
5303 2012-03-07 Bob Duff <duff@adacore.com>
5305 * par-prag.adb: Minor code rearrangement.
5307 2012-03-07 Bob Duff <duff@adacore.com>
5309 * a-strsup.ads, a-stwisu.ads, a-stzsup.ads (Super_String):
5310 Remove default initial value for Data. It is no longer needed
5311 because "=" now composes properly for untagged records. This
5312 default has caused efficiency problems.
5314 2012-03-07 Ed Schonberg <schonberg@adacore.com>
5316 * sem_res.adb (Resolve_Actuals): If the actual is a selected
5317 component of an anonymous access type, whose prefix is a variable,
5318 treat the variable as if it may be modified by the call, to
5319 suppress spurious warnings that a variable might be declared as
5322 2012-03-07 Thomas Quinot <quinot@adacore.com>
5324 * einfo.adb, einfo.ads: Remove unused entity flags.
5326 2012-03-07 Eric Botcazou <ebotcazou@adacore.com>
5328 * gnat_ugn.texi (Inline Assembler): Fix swapping of Input and
5329 Output operands throughout.
5331 2012-03-07 Hristian Kirtchev <kirtchev@adacore.com>
5333 * sem_ch12.adb (Earlier): When two nodes come from the same
5334 generic instantiation, compare their locations. Otherwise always
5335 use the top level locations of the nodes.
5337 2012-03-07 Thomas Quinot <quinot@adacore.com>
5339 * einfo.ads, sem_prag.adb: Minor reformatting.
5341 2012-03-05 Jason Merrill <jason@redhat.com>
5343 * gcc-interface/Make-lang.in (doc/gnat_ugn.texi): Build xgnatugn
5346 2012-03-04 Eric Botcazou <ebotcazou@adacore.com>
5348 * gnatvsn.ads (Library_Version): Bump to 4.8.
5350 2012-03-03 H.J. Lu <hongjiu.lu@intel.com>
5352 * init.c (__gnat_adjust_context_for_raise): Also check
5353 "orq $0x0,(%esp)" for x32.
5355 * link.c (__gnat_default_libgcc_subdir): Set to libx32 for x32.
5357 * gcc-interface/Makefile.in (arch): Set to x32 if MULTISUBDIR
5358 is /x32 and add support for x32.
5360 2012-02-29 Eric Botcazou <ebotcazou@adacore.com>
5362 * gcc-interface/decl.c (components_to_record): Add ARTIFICIAL parameter
5363 and set TYPE_ARTIFICIAL according to it. Adjust recursive call.
5364 (gnat_to_gnu_entity) <E_Record_Type>: Adjust call to above function.
5365 * gcc-interface/utils.c (rest_of_record_type_compilation): Do not
5366 invoke rest_of_type_decl_compilation on the parallel type, if any.
5368 2012-02-29 Eric Botcazou <ebotcazou@adacore.com>
5370 * gcc-interface/utils.c (gnat_write_global_declarations): Make sure the
5371 dummy global built for global types is preserved.
5373 2012-02-27 Tristan Gingold <gingold@adacore.com>
5375 * gcc-interface/decl.c (gnat_to_gnu_entity) [E_String_Type,
5376 E_Array_Type]: Reuse dummy fat type for gnu_ptr_template and
5379 2012-02-27 Eric Botcazou <ebotcazou@adacore.com>
5381 * gcc-interface/ada-tree.h (TYPE_PACKED_ARRAY_TYPE_P): Add checking.
5382 (TYPE_BY_REFERENCE_P): New flag.
5383 (TYPE_IS_BY_REFERENCE_P): New macro.
5384 (TYPE_DUMMY_P): Add checking and remove VOID_TYPE.
5385 (TYPE_IS_DUMMY_P): Adjust for above change.
5386 * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_BY_REFERENCE_P
5387 and TYPE_IS_BY_REFERENCE_P instead of TREE_ADDRESSABLE.
5388 (gnat_to_gnu_param): Likewise.
5389 (maybe_pad_type): Likewise.
5390 (make_type_from_size): Use TYPE_IS_PACKED_ARRAY_TYPE_P.
5391 * gcc-interface/misc.c (must_pass_by_ref): Use TYPE_IS_BY_REFERENCE_P
5392 instead of TREE_ADDRESSABLE.
5393 * gcc-interface/trans.c (finalize_nrv): Likewise.
5394 (call_to_gnu): Likewise. Do not create a temporary for return values
5395 with by-reference type here.
5396 (gnat_to_gnu): Test TYPE_IS_DUMMY_P instead of TYPE_DUMMY_P.
5397 (gnat_gimplify_expr) <ADDR_EXPR>: Don't do anything for non-constant
5398 CONSTRUCTORs and calls.
5399 * gcc-interface/utils.c (make_dummy_type): Get the equivalent type of
5400 the underlying type and use it throughout. Use TYPE_IS_BY_REFERENCE_P
5401 instead of TREE_ADDRESSABLE.
5402 * gcc-interface/utils2.c (build_cond_expr): Deal with by-reference
5405 2012-02-27 Eric Botcazou <ebotcazou@adacore.com>
5407 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Revert previous
5408 change that creates a special VAR_DECL for debugging purposes. For an
5409 aliased object with an unconstrained nominal subtype, make its type a
5410 thin reference to the underlying object.
5411 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: Deal with
5412 expressions built for the initialization of above objects.
5414 2012-02-24 Dave Korn <dave.korn.cygwin@gmail.com>
5416 * gcc-interface/Makefile.in (WIN_SO_PREFIX [windows targets]): New
5417 Windows-specific make variable.
5418 (WIN_SO_INSTALL_DIR [windows targets]): Likewise.
5419 (install-gnatlib): Respect the above during installation when set,
5420 and also install any windows import library that has been built.
5421 (gnatlib-shared-win32): Use WIN_SO_PREFIX to name output DLL and also
5422 build a corresponding import library.
5424 2012-02-22 Robert Dewar <dewar@adacore.com>
5426 * exp_util.adb, make.adb, sem_dim.adb, sem_ch4.adb, exp_disp.adb: Minor
5429 2012-02-22 Geert Bosch <bosch@adacore.com>
5431 * g-bytswa-x86.adb, g-bytswa.adb, gcc-interface/Makefile.in: Remove
5432 x86-specific version of byteswap and use GCC builtins instead.
5434 2012-02-22 Tristan Gingold <gingold@adacore.com>
5436 * gcc-interface/decl.c (gnat_to_gnu_entity) [E_String_Type,
5437 E_Array_Type]: Translate component ealier.
5439 2012-02-22 Robert Dewar <dewar@adacore.com>
5441 * par-ch3.adb (P_Signed_Integer_Type_Definition): Specialize
5442 error message for 'Range.
5444 2012-02-22 Pascal Obry <obry@adacore.com>
5446 * s-taprop-mingw.adb (Finalize_TCB): Do not wait on thread handle as
5447 this is our own thread.
5449 2012-02-22 Sergey Rybin <rybin@adacore.com frybin>
5451 * tree_io.ads: Update ASIS_Version_Number because of the changes
5454 2012-02-22 Hristian Kirtchev <kirtchev@adacore.com>
5456 * exp_ch7.adb (Create_Finalizer): Suppress elaboration checks on
5457 stack-related finalizers.
5459 2012-02-22 Ed Schonberg <schonberg@adacore.com>
5461 * sem_ch6.adb (Analyze_Expression_Function): If the construct
5462 is a completion, indicate that its formals are the formals of
5463 a completion, and as such do not get a cross- reference entry.
5464 (Analyze_Subprogram_Specification): Do not generate a definition
5465 for the entity of an expression function, because it may be a
5466 completion. Definition will be generated if needed when analyzing
5467 the generated subprogram declaration.
5469 2012-02-22 Vincent Celier <celier@adacore.com>
5471 * make.adb (Check): When checking if an object file is in the
5472 correct object directory, get the unit name from a previous call
5473 to Check_Source_Info_In_ALI.
5474 * makeutl.adb (Check_Source_Info_In_ALI): Return the name of
5475 the unit when everything is OK, otherwise return No_Name.
5476 * makeutl.ads (Check_Source_Info_In_ALI): Return Name_Id instead
5479 2012-02-22 Ed Schonberg <schonberg@adacore.com>
5481 * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): In an
5482 instance, the operator is visible if an operand is of some
5483 numeric type which is not in use or directly visible, and the
5484 other operand is a numeric literal.
5486 2012-02-22 Tristan Gingold <gingold@adacore.com>
5488 * init.c: Minor code clean up.
5489 * gcc-interface/Make-lang.in: Update dependencies.
5491 2012-02-22 Arnaud Charlet <charlet@adacore.com>
5493 * gnatlink.adb (Gnatlink): Use -gnatcC in CodePeer_Node,
5494 otherwise GCC will generate an object file.
5496 2012-02-22 Vincent Celier <celier@adacore.com>
5498 * projects.texi: Correct typo related to "**" in Source_Dirs.
5500 2012-02-22 Steve Baird <baird@adacore.com>
5502 * sem_prag.adb (Analyze_PPC_In_Decl_Part): Clean up generation of
5505 2012-02-22 Vincent Pucci <pucci@adacore.com>
5507 * rtsfind.adb (Get_Unit_Name): Ada_Numerics_Child and
5508 System_Dim_Child cases added.
5509 * rtsfind.ads: Ada_Numerics,
5510 Ada_Numerics_Generic_Elementary_Functions, System_Dim,
5511 System_Dim_Float_IO and System_Dim_Integer_IO added to the list
5512 of RTU_Id. Ada_Numerics_Child and System_Dim_Child added as
5513 new RTU_Id subtypes.
5514 * sem_dim.adb (Is_Dim_IO_Package_Entity): Use of
5515 Rtsfind to verify the package entity is located either
5516 in System.Dim.Integer_IO or in System.Dim.Float_IO.
5517 (Is_Dim_IO_Package_Instantiation): Minor
5518 changes. (Is_Elementary_Function_Call): Removed.
5519 (Is_Elementary_Function_Entity): New routine.
5520 (Is_Procedure_Put_Call): Is_Dim_IO_Package_Entity call added.
5521 * snames.ads-tmpl: Name_Dim and Name_Generic_Elementary_Functions
5524 2012-02-22 Vincent Pucci <pucci@adacore.com>
5526 * sem_prag.adb: Minor reformatting.
5528 2012-02-22 Ed Schonberg <schonberg@adacore.com>
5530 * sem_ch3.adb (Find_Type_Name): When analyzing a private type
5531 declaration that is the completion of a tagged incomplete type, do
5532 not associate the class-wide type already created with the private
5533 type to prevent order-of-elaboration issues in the back-end.
5534 * exp_disp.adb (Find_Specific_Type): Find specific type of
5535 a class-wide type, and handle the case of an incomplete type
5536 coming either from a limited_with clause or from an incomplete
5537 type declaration. Used when expanding a dispatchin call and
5538 generating tag checks (minor refactoring).
5540 2012-02-22 Robert Dewar <dewar@adacore.com>
5542 * exp_ch5.adb: Add comment.
5543 * sem_ch12.adb, exp_ch6.adb: minor reformatting
5545 2012-02-22 Ed Schonberg <schonberg@adacore.com>
5547 * freeze.adb (Freeze_Entity): Do not perform type layout within
5550 2012-02-22 Eric Botcazou <ebotcazou@adacore.com>
5552 * init.c (__gnat_error_handler) [Linux]: Map SIGBUS to
5555 2012-02-22 Ed Schonberg <schonberg@adacore.com>
5557 * exp_ch5.adb (Expand_N_Assignment_Statement): Reject an
5558 assignment to a classwide type whose type is limited, as
5559 can happen in an instantiation in programs that run afoul or
5562 2012-02-17 Ed Schonberg <schonberg@adacore.com>
5564 * exp_ch6.adb (Legal_Copy): If layout is not
5565 determined in the front-end, do not emit error message when
5566 by-reference actual is potentially unaligned.
5567 * gcc-interface/decl.c (gnat_to_gnu_field): Better error message for
5568 illegal representation clause on tagged or aliased component, or on
5569 by-reference type with forced alignment.
5571 2012-02-17 Nicolas Roche <roche@adacore.com>
5573 * gcc-interface/Makefile.in: Ensure FORCE_DEBUG_ADAFLAGS variables is
5574 propagated by gnatlib-sjlj and gnatlib-zcx targets.
5575 * gcc-interface/Make-lang.in: Update dependencies.
5577 2012-02-17 Thomas Quinot <quinot@adacore.com>
5579 * sem_ch12.adb (Analyze_Package_Instantiation): For an
5580 instantiation in an RCI library unit, omit the instance body
5581 if the RCI library unit is the instance itself (E.2.3(18)),
5582 but include the body if the instantiation is within the RCI
5583 declaration (12.3(12)).
5585 2012-02-17 Steve Baird <baird@adacore.com>
5587 * sem_prag.adb (Analyze_PPC_In_Decl_Part): Pre'Class and
5588 Post'Class aspects can only be specified for a primitive operation
5591 2012-02-17 Yannick Moy <moy@adacore.com>
5593 * gnat_rm.texi: Minor shuffling.
5595 2012-02-17 Ed Schonberg <schonberg@adacore.com>
5597 * aspects.adb: Expression functions can carry pre/postconditions.
5598 * par-ch6.adb (P_Subprogram): look for optional pre/postconditions
5599 in an expression function.
5600 * sem_prag (Check_Precondition_Postcondition): legal on expression
5603 2012-02-17 Vincent Pucci <pucci@adacore.com>
5605 * a-cdlili.adb, a-cidlli.adb, a-cihama.adb, a-cimutr.adb,
5606 * a-ciorma.adb, a-cohama.adb, a-coinve.adb, a-comutr.adb,
5607 * a-convec.adb, a-coorma.adb (Adjust): New routine.
5608 (Constant_Reference): Increment Busy and Lock counters.
5609 (Reference): Increase Busy and Lock counters.
5610 (Finalize): New routine.
5611 * a-cihase.adb, a-ciorse.adb, a-cohase.adb, a-coorse.adb:
5612 (Adjust): New routine. (Constant_Reference): Increment Busy
5614 (Finalize): New routine.
5615 * a-cdlili.ads, a-cidlli.ads, a-cihama.ads, a-cihase.ads,
5616 * a-cimutr.ads, a-ciorma.ads, a-ciorse.ads, a-cohama.ads,
5617 * a-cohase.ads, a-coinve.ads, a-comutr.ads, a-convec.ads,
5618 * a-coorma.ads, a-coorse: Controlled component added to the
5621 2012-02-17 Robert Dewar <dewar@adacore.com>
5623 * restrict.adb (Check_Restriction): Add special handling for
5624 No_Obsolescent_Features.
5626 2012-02-17 Hristian Kirtchev <kirtchev@adacore.com>
5628 * exp_util.adb (Find_Finalize_Address): When dealing with an
5629 internally built full view for a type with unknown discriminants,
5630 use the original record type.
5632 2012-02-17 Robert Dewar <dewar@adacore.com>
5634 * sem_dim.adb: Minor reformatting.
5636 2012-02-17 Yannick Moy <moy@adacore.com>
5638 * gnat_rm.texi: Minor rewording.
5640 2012-02-17 Thomas Quinot <quinot@adacore.com>
5642 * sem_aggr.adb: Minor reformatting.
5644 2012-02-17 Robert Dewar <dewar@adacore.com>
5646 * gnat_ugn.texi: Update doc for -gnatw.m to include 2*x case.
5648 2012-02-17 Vincent Pucci <pucci@adacore.com>
5650 * sem_dim.adb (Is_Dim_IO_Package_Entity): New routine.
5651 (Is_Dim_IO_Package_Instantiation): Is_Dim_IO_Package_Entity
5653 (Is_Procedure_Put_Call): Is_Dim_IO_Package_Entity
5655 * s-dim.ads: Make package Pure.
5657 2012-02-17 Gary Dismukes <dismukes@adacore.com>
5659 * prj-nmsc.adb: Minor reformatting.
5661 2012-02-17 Yannick Moy <moy@adacore.com>
5663 * gnat_rm.texi: Update GNAT RM with a separate chapter on restrictions.
5665 2012-02-17 Yannick Moy <moy@adacore.com>
5667 * gnat_ugn.texi: Fix typos.
5669 2012-02-17 Pascal Obry <obry@adacore.com>
5671 * prj-nmsc.adb: prj-nmsc.adb (Check_Aggregated): Check that an
5672 aggregate is not Externally_Built.
5674 2012-02-17 Ed Schonberg <schonberg@adacore.com>
5676 * sem_aggr.adb (Resolve_Record_Aggregate): If a composite
5677 component has a box association, copy the default value using
5678 the current scope as the scope of internal types, to prevent
5679 scoping anomalies in gigi.
5681 2012-02-17 Robert Dewar <dewar@adacore.com>
5683 * sem_dim.adb, sem_dim.ads, s-tasren.adb, prj.adb, prj.ads, freeze.adb,
5684 sem_res.adb, exp_ch4.adb, sinput.adb, sinput.ads, exp_aggr.adb,
5685 exp_intr.adb, s-os_lib.adb: Minor reformatting.
5687 2012-02-17 Ed Schonberg <schonberg@adacore.com>
5689 * sem_ch6.adb (Is_Non_Overriding_Operation): Add warning if the
5690 old operation is abstract, the relevant type is not abstract,
5691 and the new subprogram fails to override.
5693 2012-02-15 Eric Botcazou <ebotcazou@adacore.com>
5695 * gcc-interface/trans.c (Identifier_to_gnu): Move block retrieving the
5696 type of the result to the end and execute it for a deferred constant of
5697 a discriminated type whose full view can be elaborated statically.
5699 2012-02-15 Eric Botcazou <ebotcazou@adacore.com>
5701 * gcc-interface/trans.c (gnat_to_gnu) <N_Qualified_Expression>: If the
5702 type is tagged, mark it as used for debugging purposes.
5703 <N_Allocator>: Likewise for a qualified expression.
5705 2012-02-15 Eric Botcazou <ebotcazou@adacore.com>
5707 * gcc-interface/trans.c (call_to_gnu): Create the temporary for the
5708 return value in the by-reference return type case if this isn't the
5709 expression of an object declaration. Tidy up.
5711 2012-02-09 Tristan Gingold <gingold@adacore.com>
5713 * gcc-interface/Makefile.in: Remove .sym rule (not used).
5714 Remove adamsg.o object (requires native message compiler).
5715 * init.c (CMA$_EXIT_THREAD, MTH$_FLOOVEMAT, SS$_INTDIV): Define as a
5716 macro instead of as extern int.
5717 (ADA$_ALREADY_OPEN, ADA$_CONSTRAINT_ERRO, ADA$_DATA_ERROR)
5718 (ADA$_DEVICE_ERROR, ADA$_END_ERROR, ADA$_FAC_MODE_MISMAT)
5719 (ADA$_IOSYSFAILED, ADA$_KEYSIZERR, ADA$_KEY_MISMATCH)
5720 (ADA$_LAYOUT_ERROR, ADA$_LINEXCMRS, ADA$_MAXLINEXC)
5721 (ADA$_MODE_ERROR, ADA$_MRN_MISMATCH, ADA$_MRS_MISMATCH)
5722 (ADA$_NAME_ERROR, ADA$_NOT_OPEN, ADA$_ORG_MISMATCH)
5723 (ADA$_PROGRAM_ERROR, ADA$_RAT_MISMATCH, ADA$_RFM_MISMATCH)
5724 (ADA$_STAOVF, ADA$_STATUS_ERROR, ADA$_STORAGE_ERROR)
5725 (ADA$_UNSUPPORTED, ADA$_USE_ERROR): Likewise.
5726 (struct cond_except): Field cond is now an unsigned int.
5727 (dec_ada_cond_except_table): Adjust.
5728 (cond_except_table): Likewise.
5729 (cond_resignal_table): Likewise.
5730 (__gnat_default_resignal_p): Fix style.
5732 2012-02-08 Vincent Celier <celier@adacore.com>
5734 * gcc-interface/Make-lang.in: Add g-byorma.o to gnatbind objects
5735 (g-buorma is now imported by sinput).
5736 Update dependencies.
5737 * scn.adb (Initialize_Scanner): Call Check_For_BOM
5738 * sinput-p.adb (Source_File_Is_Subunit): Call Check_For_BOM
5739 * sinput.adb: New procedure Check_For_BOM
5740 * sinput.ads: New procedure Check_For_BOM
5742 2012-02-08 Vincent Pucci <pucci@adacore.com>
5744 * impunit.adb: Dimension package names updated
5745 * Makefile.rtl: s-dim added
5746 * sem_dim.adb (Is_Procedure_Put_Call): minor changes
5747 (Is_Dim_IO_Package_Instantiation): minor changes
5748 * sem_dim.ads: minor changes in comments
5749 * snames.ads-tmpl: Name_Dim added Name_Dim_Float_IO and
5750 Name_Dim_Integer_IO removed
5751 * s-dim.ads: New package. Define the dimension terminology.
5752 * s-diflio.adb, s-diinio.adb, s-dimkio.ads, s-dimmks.ads,
5753 * s-dmotpr.ads: Package names updated.
5754 * s-diflio.ads, s-diinio.ads: Documentation added and package
5757 2012-02-08 Gary Dismukes <dismukes@adacore.com>
5759 * gcc-interface/utils2.c (build_call_alloc_dealloc_proc): Revise test
5760 for storage pools to test for an underlying record type rather than
5761 testing Is_Tagged_Type, so that simple storage pools will be handled
5762 the same as normal Ada storage pools.
5764 2012-02-08 Yannick Moy <moy@adacore.com>
5766 * gnat_rm.texi: Minor reshuffling to place restriction at
5769 2012-02-08 Bob Duff <duff@adacore.com>
5771 * warnsw.adb (Set_Warning_Switch): Set Warn_On_Suspicious_Modulus_Value
5772 False for '-gnatwA', to suppress these warnings.
5774 2012-02-08 Vincent Celier <celier@adacore.com>
5776 * sinput-p.adb (Source_File_Is_Subunit): Check for BOM before
5777 starting to scan, so that UTF8 encoding is taken into account.
5779 2012-02-08 Arnaud Charlet <charlet@adacore.com>
5781 * s-tasren.adb, s-tasren.ads (Internal_Complete_Rendezvous): New
5783 (Complete_Rendezvous): Now call Internal_Complete_Rendezvous.
5784 (Exceptional_Complete_Rendezvous): Mark No_Return.
5786 2012-02-08 Eric Botcazou <ebotcazou@adacore.com>
5788 * exp_aggr.adb (Compile_Time_Known_Composite_Value):
5789 New predicate to compute whether a composite value can be
5790 evaluated at compile time.
5791 (Component_Not_OK_For_Backend): Use Compile_Time_Known_Value for all
5792 expressions of elementary type and Compile_Time_Known_Composite_Value
5793 for all other expressions.
5794 (Expand_Record_Aggregate): Convert to assignments in the case
5795 of a type with mutable components if the aggregate cannot be
5798 2012-02-08 Gary Dismukes <dismukes@adacore.com>
5800 * aspects.ads (type Aspect_Id): Add Simple_Storage_Pool_Type.
5801 (Impl_Defined_Aspects): Add association for
5802 Aspect_Simple_Storage_Pool_Type.
5804 association for Aspect_Simple_Storage_Pool_Type.
5806 (Canonical_Aspect): Add association for Simple_Storage_Pool_Type.
5807 * exp_attr.adb (Expand_N_Attribute_Reference):
5808 Change name to Name_Simple_Storage_Pool_Type.
5809 * exp_ch4.adb (Expand_N_Allocator): Change
5810 name to Name_Simple_Storage_Pool_Type.
5811 * exp_intr.adb (Expand_Unc_Deallocation): Change name to
5812 Name_Simple_Storage_Pool_Type. * freeze.adb (Freeze_Entity):
5813 Change names to Name_Simple_Storage_Pool_Type. * par-prag.adb:
5814 Change names to Name_Simple_Storage_Pool_Type. * sem_attr.adb:
5815 (Analyze_Attribute): Change name to Name_Simple_Storage_Pool_Type.
5816 * sem_ch13.adb (Analyze_Attribute_Definition_Clause):
5817 Change name to Name_Simple_Storage_Pool_Type.
5819 (Analyze_Pragma): Change name to Name_Simple_Storage_Pool_Type.
5820 (Sig_Flags): Change name to Name_Simple_Storage_Pool_Type.
5821 * sem_res.adb (Resolve_Allocator): Change name to
5822 Name_Simple_Storage_Pool_Type. * snames.ads-tmpl:
5823 (Name_Simple_Storage_Pool_Type): New name constant.
5824 (type Pragma_Id): Change name to Name_Simple_Storage_Pool_Type and
5825 move to main pragma section because it no longer matches the
5827 * snames.adb-tmpl (Get_Pragma_Id): Remove test for
5828 Name_Simple_Storage_Pool.
5829 (Is_Pragma_Name): Remove test for Name_Simple_Storage_Pool.
5831 2012-02-08 Robert Dewar <dewar@adacore.com>
5833 * gnat_ugn.texi: Add some clarification to -gnatwA and -gnatws.
5835 2012-02-08 Pascal Obry <obry@adacore.com>
5837 * prj.adb (Compute_All_Imported_Projects): Use new
5838 For_Project_And_Aggregated_Context to ensure proper context is
5839 used for encapsulated aggregate libraries.
5840 * prj-proc.adb (Recursive_Process): Call
5841 Process_Aggregated_Projects earlier to ensure that all dependent
5842 projects are set with the proper encapsulated status.
5844 2012-02-08 Pascal Obry <obry@adacore.com>
5846 * s-os_lib.adb (Normalize_Arguments): Properly escape last \ in null
5849 2012-02-08 Pascal Obry <obry@adacore.com>
5851 * prj.ads, prj.adb (For_Project_And_Aggregated_Context): New
5852 generic routine with a context parameter.
5854 2012-02-08 Robert Dewar <dewar@adacore.com>
5856 * a-coinve.adb, sem_util.adb, sem_ch8.adb, a-cobove.adb,
5857 a-convec.adb: Minor reformatting and code reorganization.
5859 2012-02-08 Steve Baird <baird@adacore.com>
5861 * sem_cat.adb (In_Preelaborated_Unit): A child
5862 unit instantiation does not inherit preelaboration requirements
5865 2012-02-08 Gary Dismukes <dismukes@adacore.com>
5867 * aspects.ads (type Aspect_Id): Add Aspect_Simple_Storage_Pool.
5868 (Impl_Defined_Aspects): Add entry for Aspect_Simple_Storage_Pool.
5869 (Aspect_Argument): Add Name entry for Aspect_Simple_Storage_Pool.
5870 (Aspect_Names): Add entry for Aspect_Simple_Storage_Pool.
5871 * aspects.adb (Canonical_Aspect): Add entry for
5872 Aspect_Simple_Storage_Pool.
5873 * exp_attr.adb (Expand_N_Attribute_Reference): Handle case of
5874 Attribute_Simple_Storage_Pool in the same way as Storage_Pool
5875 (add conversion, analyze/resolve). For the Storage_Size attribute,
5876 for the simple pool case, locate and use the simple pool type's
5877 Storage_Size function (if any), otherwise evaluate to zero.
5878 * exp_ch4.adb (Expand_N_Allocator): In the case of an allocator
5879 for an access type with an associated simple storage pool,
5880 locate and use the pool type's Allocate.
5881 * exp_intr.adb (Expand_Unc_Deallocation): In the case where the
5882 access type has a simple storage pool, locate the pool type's
5883 Deallocate procedure (if present) and use it as the procedure
5884 to call on the Free operation.
5885 * freeze.adb (Freeze_Entity): In the case of a full type for
5886 a private type defined with pragma Simple_Storage_Pool, check
5887 that the full type is also appropriate for the pragma. For
5888 a simple storage pool type, validate that the operations
5889 Allocate, Deallocate (if present), and Storage_Size
5890 (if present) are defined with appropriate expected profiles.
5891 (Validate_Simple_Pool_Op_Formal): New procedure
5892 (Validate_Simple_Pool_Operation): New procedure Add with and
5894 * par-prag.adb: Add Pragma_Simple_Storage_Pool to case statement
5895 (no action required).
5896 * sem_attr.adb (Analyze_Attribute): For the case of the
5897 Storage_Pool attribute, give a warning if the prefix type has an
5898 associated simple storage pool, and rewrite the attribute as a
5899 raise of Program_Error. In the case of the Simple_Storage_Pool
5900 attribute, check that the prefix type has an associated simple
5901 storage pool, and set the attribute type to the pool's type.
5902 * sem_ch13.adb (Analyze_Aspect_Specifications): Add
5903 Aspect_Simple_Storage_Pool case choice.
5904 (Analyze_Attribute_Definition_Clause): Add
5905 Aspect_Simple_Storage_Pool to case for Ignore_Rep_Clauses
5906 (no action). Add handling for Simple_Storage_Pool attribute
5907 definition, requiring the name to denote a simple storage pool
5909 (Check_Aspect_At_Freeze_Point): For a simple storage pool
5910 aspect, set the type to that of the name specified for the aspect.
5911 * sem_prag.adb (Analyze_Pragma): Add handling for pragma
5912 Simple_Storage_Pool, requiring that it applies to a library-level
5913 type declared in a package declaration that is a limited private
5914 or limited record type.
5915 * sem_res.adb (Resolve_Allocator): Flag an attempt to call a
5916 build-in-place function in an allocator for an access type with
5917 a simple storage pool as unsupported.
5918 * snames.ads-tmpl: Add Name_Simple_Storage_Pool.
5919 (type Attribute_Id): Add Attribute_Simple_Storage_Pool.
5920 (type Pragma_Id): Add Pragma_Simple_Storage_Pool.
5921 * snames.adb-tmpl (Get_Pragma_Id): Handle case of
5922 Name_Simple_Storage_Pool.
5923 (Is_Pragma_Name): Return True for Name_Simple_Storage_Pool.
5925 2012-02-08 Cyrille Comar <comar@adacore.com>
5927 * projects.texi: Clarify doc for interfaces.
5929 2012-02-07 Eric Botcazou <ebotcazou@adacore.com>
5931 * gcc-interface/Make-lang.in (GCC_LINKERFLAGS): New variable.
5934 2012-02-01 Tristan Gingold <gingold@adacore.com>
5936 * gcc-interface/trans.c (Loop_Statement_to_gnu): Use sizetype
5937 instead of size_type_node.
5939 2012-01-30 Nicolas Roche <roche@adacore.com>
5941 * gcc-interface/Make-lang.in: Update dependencies.
5942 * gcc-interface/Makefile.in: Use system-vxworks-system-ppc-mils.ads
5944 Remove Linker_Options -crtbe when building sjlj run-time.
5946 2012-01-30 Robert Dewar <dewar@adacore.com>
5948 * sem.adb (Analyze): Call Analyze_Mod for N_Op_Mod mode.
5949 * sem_ch3.adb (Modular_Type_Declaration): Warn on mod value of
5950 form 2 * small-literal.
5951 * sem_ch4.adb (Analyze_Mod): New procedure (warn on suspicious
5953 * sem_ch4.ads (Analyze_Mod): New procedure.
5955 2012-01-30 Ed Schonberg <schonberg@adacore.com>
5957 * sem_ch6.adb: sem_ch6.adb (Analyze_Expression_Function): Copy
5958 types and return expression when building spec for implicit
5959 body, to preserve global references that may be present in an
5962 2012-01-30 Matthew Heaney <heaney@adacore.com>
5964 * a-convec.adb, a-coinve.adb, a-cobove.adb (Sort,
5965 Reverse_Elements): Check for cursor tampering.
5967 2012-01-30 Ed Schonberg <schonberg@adacore.com>
5969 * sem_util.adb (Is_Fully_Initialized_Type): In Ada 2012, a
5970 type with aspect Default_Value or Default_Component_Value is
5971 fully initialized, and use of variables of such types do not
5974 2012-01-30 Javier Miranda <miranda@adacore.com>
5977 * sem_ch8.adb (Analyze_Subprogram_Renaming):
5978 Handle self-renaming when the renamed entity is referenced using
5981 2012-01-30 Vincent Celier <celier@adacore.com>
5983 * projects.texi: Add documentation for attribute Interfaces.
5985 2012-01-30 Hristian Kirtchev <kirtchev@adacore.com>
5987 * exp_ch7.adb (Build_Finalizer_Call): Set loc again.
5988 * exp_ch11.adb (Expand_At_End_Handler): Do not provide a source
5989 location for the wrapped call to the original AT_END routine
5990 and the subsequent return statement.
5992 2012-01-30 Pascal Obry <obry@adacore.com>
5994 * s-rannum.adb: Minor reformatting.
5996 2012-01-30 Hristian Kirtchev <kirtchev@adacore.com>
5998 * a-calend-vms.adb, a-calend.adb: Increment the number of leap seconds
5999 to 25 and add the hard time value for 2012-06-30.
6001 2012-01-30 Robert Dewar <dewar@adacore.com>
6003 * a-strhas.ads, einfo.adb, einfo.ads, exp_ch7.adb, exp_ch9.adb,
6004 freeze.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-proc.adb, s-llflex.ads,
6005 s-ransee.adb, s-ransee.ads, sem_ch13.adb, sem_dim.adb, sem_prag.adb:
6006 Minor reformatting/code reorganization.
6008 2012-01-30 Thomas Quinot <quinot@adacore.com>
6010 * s-rannum.adb, s-ransee.adb, s-ransee.ads (Get_Seed): Return
6011 Unsigned_64 rather than Duration.
6012 (System.Random_Numbers.Reset): Use full value of seed
6013 (do not truncate sub-second bits).
6015 2012-01-30 Thomas Quinot <quinot@adacore.com>
6017 * sem_cat.adb, sem_ch12.adb: Minor reformatting.
6019 2012-01-30 Yannick Moy <moy@adacore.com>
6021 * gnat_ugn.texi: Minor correction of GNAT UG, to take into
6022 account changes to -gnatwa and more recent warnings.
6024 2012-01-30 Hristian Kirtchev <kirtchev@adacore.com>
6026 * exp_ch7.adb (Build_Finalizer_Call): Do not provide a source
6027 location when creating a call to a finalizer.
6028 * exp_ch11.adb (Expand_Exception_Handlers): Do not provide
6029 a source location for the first actual of Save_Occurrence for
6032 2012-01-30 Ed Schonberg <schonberg@adacore.com>
6034 * einfo.ads, einfo,adb: New attribute on scalar types:
6035 Default_Aspect_Value New attribute on array types:
6036 Default_Aspect_Component_Value Move attribute Related_Array_Object
6037 to a different position to accomodate new aspect attributes.
6038 * freeze.adb (Freeze_Entity): Use new attributes to retrieve value
6039 of defaults set with an aspect specification, rather than using
6040 the list of aspects attached to the type, to prevent issues with
6042 * sem_ch13.adb (Analyze_Aspect_Specifications): For aspects
6043 Default_Value and Default_Component _Value, store corresponding
6044 expression in type entity.
6045 (Check_Aspect_At_End_Of_Declaration): If the default aspects
6046 are declared on the full view, use the full view to resolve the
6047 correseponding expression.
6048 * exp_ch3.adb (Init_Component): Use attribute
6049 Default_Aspect_Component_Value to perform default initialization,
6050 rather than relying on the rep item list for the type.
6051 (Get_Simple_Init_Val): Ditto.
6053 2012-01-30 Thomas Quinot <quinot@adacore.com>
6055 * a-strhas.ads: Document risk of collision attack.
6057 2012-01-30 Yannick Moy <moy@adacore.com>
6059 * gnat_ugn.texi: Minor update wrt warning switches.
6061 2012-01-30 Vincent Celier <celier@adacore.com>
6063 * prj-nmsc.adb (Check_Interfaces): Report an error when a
6064 unit from Library_Interface is not a unit of the project.
6066 2012-01-30 Vincent Pucci <pucci@adacore.com>
6068 * sem_prag.adb (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Parent
6069 links fixed inside PPC pragmas.
6070 * sem_ch12.adb: Move call to Make_Aspect_For_PPC_In_Gen_Sub_Decl.
6072 2012-01-30 Thomas Quinot <quinot@adacore.com>
6074 * s-ransee.ads: Minor reformatting.
6076 2012-01-30 Pascal Obry <obry@adacore.com>
6078 * prj.ads, prj.adb (For_Each_Source): Add support for skipping
6079 sources coming from an encapsulated library.
6081 2012-01-30 Ed Schonberg <schonberg@adacore.com>
6083 * sem_ch3.adb (Process-Full_View): fix typo.
6084 * sem_ch13.adb (Aalyze_Aspect_Specifications): if predicates
6085 appear on a private type and the full view is available, ensure
6086 existence of freeze node for full view.
6087 (Build_Predicate_Function): Attach predicate function to both
6088 views of a private type.
6090 2012-01-30 Vincent Celier <celier@adacore.com>
6092 * prj-nmsc.adb (Check_Interfaces): Compute the Lib_Interface_ALIs
6093 for the project if either attribute Library_Interface or
6094 Interfaces is declared.
6095 (Check_Stand_Alone_Library): Use Lib_Interface_ALIs computed in
6098 2012-01-30 Pascal Obry <obry@adacore.com>
6100 * prj-proc.adb (Recursive_Process): Set From_Encapsulated_Lib
6101 boolean value to true in the process list created by this routine.
6102 * prj.ads (Project_List_Element): New field From_Encapsulated_Lib.
6103 Continued work for KA06-021.
6104 * prj.adb (Compute_All_Imported_Projects): Set
6105 From_Encapsulated_Lib boolean flag.
6107 2012-01-30 Vincent Pucci <pucci@adacore.com>
6109 * sem_dim.adb (Expand_Put_Call_With_Dimension_Symbol): Minor
6111 * s-diflio.ads: Minor change.
6113 2012-01-30 Javier Miranda <miranda@adacore.com>
6115 * exp_ch9.adb (Build_Dispatching_Requeue): Add missing call
6116 to Get_Entry_Index. Required to generate code which provides
6117 the correct value of Entry_Index in the target entry.
6119 2012-01-30 Nicolas Roche <roche@adacore.com>
6121 * system-vxworks-ppc.ads: Add pragma Linker_Options -crtbe to
6122 fix issue with zcx on VxWorks5.
6124 2012-01-30 Pascal Obry <obry@adacore.com>
6126 * prj.ads, prj.adb (For_Every_Project_Imported): Remove
6128 (For_Every_Project_Imported_Context): New generic routine with
6129 a context parameter.
6130 * prj-nmsc.adb: Revert to use For_Every_Project_Imported Avoid
6131 distributed complexity.
6132 * prj-env.adb, prj-conf.adb, makeutl.adb, gnatcmd.adb: Ditto.
6134 2012-01-30 Thomas Quinot <quinot@adacore.com>
6136 * exp_aggr.adb (Expand_Record_Aggregate): After creating the
6137 _parent aggregate for an extension aggregate, check whether it
6138 requires delayed (top-down) expansion.
6140 2012-01-30 Vincent Pucci <pucci@adacore.com>
6142 * sem_dim.adb (Expand_Put_Call_With_Dimension_Symbol): Rewritten.
6143 * snames.ads-tmpl: Name_Item and Name_Symbols added.
6144 * s-diflio.adb, s-diflio.ads, s-diinio.adb, s-diinio.ads: Rename
6145 and change the position of parameter Symbols in every Put routine.
6146 * s-dimmks.ads: Convert long float type Mks_Type into long
6148 * s-llflex.ads: Modifications in comments.
6150 2012-01-30 Hristian Kirtchev <kirtchev@adacore.com>
6152 * sem_ch12.adb (Earlier): Do not use the
6153 top level source locations of the two input nodes.
6155 2012-01-30 Robert Dewar <dewar@adacore.com>
6157 * einfo.ads, sem_prag.adb, sem_attr.adb, aspects.ads,
6158 sem_cat.adb, sem_aggr.adb, exp_aggr.adb: Minor reformatting.
6160 2012-01-30 Robert Dewar <dewar@adacore.com>
6162 * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb: Minor reformatting.
6164 2012-01-30 Olivier Hainque <hainque@adacore.com>
6166 * sigtramp-ppcvxw.c (CFI_COMMON_REGS): Add rule for r1 back +
6169 2012-01-30 Thomas Quinot <quinot@adacore.com>
6171 * gnat_rm.texi, sem_dist.adb, sem_dist.ads, einfo.ads, sem_prag.adb,
6172 sem_ch12.adb, sem_attr.adb, aspects.adb, aspects.ads, par-prag.adb,
6173 sem_cat.adb, snames.ads-tmpl (Sem_Dist.Is_Valid_Remote_Object_Type):
6174 New subprogram (extracted from
6175 Sem_Cat.Validate_Remote_Access_Object_Type_Declaration).
6176 (Einfo.Is_Remote_Types): Now applies to generic types. Update
6177 documentation accordingly.
6178 (Sem_Ch12.Analyze_Associations): A RACW type is acceptable as
6179 actual for a formal type to which a pragma Remote_Access_Type
6181 (Aspects, Par.Prag, Sem_Prag): Support for new pramga/aspect
6183 (Sem_Attr.Analyze_Attribute, case Stub_Type): Attribute can
6184 be applied to a generic type if pragma Remote_Access_Type
6185 applies, in which case the type of the attribute is
6186 System.Partition_Interface.RACW_Stub_Type.
6188 2012-01-27 Eric Botcazou <ebotcazou@adacore.com>
6190 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Do not set
6191 an alignment on fields of the RETURN type built for the CICO mechanism.
6193 2012-01-27 Eric Botcazou <ebotcazou@adacore.com>
6195 * gcc-interface/trans.c (gnat_to_gnu): Avoid making a SAVE_EXPR for
6196 a call to a function that returns an unconstrained type with default
6197 discriminant. Similarly, avoid doing the conversion to the nominal
6198 result type in this case.
6200 2012-01-27 Eric Botcazou <ebotcazou@adacore.com>
6202 * gcc-interface/ada-tree.h (DECL_ALIASED_P): New flag.
6203 * gcc-interface/decl.c (is_variable_size): Rename to...
6204 (type_has_variable_size): ...this.
6205 (adjust_packed): Adjust to above renaming.
6206 (gnat_to_gnu_field): Set DECL_ALIASED_P on the field.
6207 (field_is_artificial): New predicate.
6208 (field_is_aliased): Likewise.
6209 (field_has_self_size): Likewise.
6210 (field_has_variable_size): Likewise.
6211 (components_to_record): Record information for the final layout during
6212 the first pass on fields.
6213 If there is an aliased field placed after a field whose length depends
6214 on discriminants, put all the fields of the latter sort, last.
6216 2012-01-27 Eric Botcazou <ebotcazou@adacore.com>
6218 * gcc-interface/gigi.h (get_minimal_subprog_decl): Declare.
6219 * gcc-interface/decl.c (get_minimal_subprog_decl): New function.
6220 * gcc-interface/trans.c (Attribute_to_gnu): Use it for the prefix of an
6221 Access-like attribute in a dispatch table if the subprogram is public.
6223 2012-01-27 Eric Botcazou <ebotcazou@adacore.com>
6225 * gcc-interface/gigi.h (create_label_decl): Adjust.
6226 * gcc-interface/utils.c (create_label_decl): Add GNAT_NODE parameter
6227 and invoke gnat_pushdecl on it. Remove obsolete settings.
6228 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Label>: Adjust call to
6230 * gcc-interface/trans.c (gnat_to_gnu) <N_Null): Likewise. Ignore the
6231 label for debugging purposes.
6233 2012-01-27 Eric Botcazou <ebotcazou@adacore.com>
6235 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: For an aliased
6236 object with an unconstrained nominal subtype and if optimization isn't
6237 enabled, create a special VAR_DECL for debugging purposes.
6239 2012-01-23 Robert Dewar <dewar@adacore.com>
6241 * sem_prag.ads, sem_prag.adb: Minor reformatting.
6243 2012-01-23 Robert Dewar <dewar@adacore.com>
6245 * sem_ch13.adb (Analyze_Aspect_Specifications): Check for
6246 language defined aspect applied to renaming or formal type
6247 declaration (not permitted)
6249 2012-01-23 Matthew Heaney <heaney@adacore.com>
6251 * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb (Vet): Replaced
6252 comment with pragma Assert.
6254 2012-01-23 Vincent Pucci <pucci@adacore.com>
6256 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Call
6257 to Make_Aspect_For_PPC_In_Gen_Sub_Decl added in ASIS mode.
6258 * sem_prag.adb, sem_prag.ads (Make_Aspect_For_PPC_In_Gen_Sub_Decl): New
6259 routine. In ASIS mode, convert any PPC pragmas into aspects in generic
6260 subprogram declaration in order to enable the analysis of PPC boolean
6263 2012-01-23 Robert Dewar <dewar@adacore.com>
6265 * sem_ch3.adb (Analyze_Object_Declaration): Properly
6266 handle Current_Value for volatile variables (also propagate
6267 Treat_As_Volatile from type to object).
6269 2012-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6271 * sem_ch12.adb (Install_Body): Detect the case
6272 where the enclosing context is a package with a stub body that
6273 has already been replaced by the actual body. In such cases,
6274 the freeze node for the enclosing context must be inserted after
6277 2012-01-23 Ed Schonberg <schonberg@adacore.com>
6279 * sem_prag.adb (Analyze_Pragma, case Debug): Freeze the called
6280 subprogram before expanding the pragma into an if-statement with
6281 a block, to ensure that when the subprogram is null its body is
6282 properly generated before expansion.
6284 2012-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6286 * sem_ch12.adb (Analyze_Associations): Alphabetize local variables and
6287 constants. Rename Actual_Types to Actuals_To_Freeze. Rename Next_Formal
6289 Freeze all eligible subprograms which appear as actuals in
6291 (Has_Fully_Defined_Profile): New routine.
6292 (Renames_Standard_Subprogram): New routine.
6293 (Earlier): Add local variable N. Comment update. Do not use source
6294 locations when trying to determine whether one node precedes another.
6296 2012-01-23 Gary Dismukes <dismukes@adacore.com>
6298 * exp_ch4.adb (Expand_Concatenate): In the case
6299 where the result of a concatentation can be null, set the to
6300 result have both the low and high bounds of the right operand (not
6301 just the high bound, as was the case prior to this fix). Also,
6302 fix the saved high bound setting (Last_Opnd_High_Bound) in the
6303 empty string literal case (should have been low bound minus one,
6304 rather than plus one).
6306 2012-01-23 Thomas Quinot <quinot@adacore.com>
6308 * scos.ads, put_scos.adb, get_scos.adb (Get_SCOs, Put_SCOs): Do not
6309 omit statement SCOs for disabled pragmas.
6311 2012-01-23 Matthew Heaney <heaney@adacore.com>
6313 * a-cohase.ads, a-cihase.ads, a-cbhase.ads, a-coorse.ads,
6314 a-ciorse.ads, a-cborse.ads, a-cohama.ads, a-cihama.ads, a-cbhama.ads,
6315 a-coorma.ads, a-ciorma.ads, a-cborma.ads, a-cdlili.ads, a-cidlli.ads,
6316 a-cbdlli.ads, a-convec.ads, a-coinve.ads, a-cobove.ads (Cursor'Read,
6317 Cursor'Write): Declare in private part.
6318 (Reference_Type'Read, Reference_Type'Write): Ditto.
6319 (Constant_Reference_Type'Read, Constant_Reference_Type'Write): Ditto.
6321 2012-01-23 Robert Dewar <dewar@adacore.com>
6323 * a-catizo.ads, a-calend.adb, a-calend.ads, par-ch13.adb: Minor
6326 2012-01-23 Ed Schonberg <schonberg@adacore.com>
6328 * sem_ch6.adb (Analyze_Subprogram_Declaration): Do not set the
6329 Corresponding_Body on a defaulted null formal subprogram.
6330 * sem_ch12.adb (Check_Formal_Package_Instance): No check needed
6331 on a defaulted formal subprogram that is a null procedure.
6333 2012-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6335 * exp_ch9.adb: Update the comments involving pragma Implemented.
6336 * sem_ch3.adb (Check_Pragma_Implemented (Entity_Id)): Add local
6337 constant Subp_Alias and local variable Impl_Subp. Properly
6338 handle aliases of synchronized wrappers. Code cleanup.
6339 (Check_Pragma_Implemented (Entity_Id; Entity_Id)): Add
6340 Name_Optional as part of the condition.
6341 * sem_prag.adb (Analyze_Pragma): Add "Optional" as one of the
6342 valid choices of implementation kind.
6343 (Check_Arg_Is_One_Of): New routine.
6344 * snames.ads-tmlp: Add Name_Optional.
6346 2012-01-23 Ed Schonberg <schonberg@adacore.com>
6348 * par-ch13.adb: Better error recovery in illegal aspect
6351 2012-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6353 * a-calend.adb: Add with clause for Interfaces.C. Add constant
6355 (Day_Of_Week): Call the internal UTC_Time_Offset.
6356 (Split): Call the internal UTC_Time_Offset.
6357 (Time_Of): Call the internal UTC_Time_Offset.
6358 (Time_Zone_Operations.UTC_Time_Offset): Call internal UTC_Time_Offset.
6359 (UTC_Time_Offset): New library-level routine.
6360 * a-calend.ads (UTC_Time_Offset): Remove parameter
6361 Is_Historic. Update related comment on usage.
6362 * a-catizo.adb (UTC_Time_Offset): Removed.
6363 (UTC_Time_Offset (Time)): Call Time_Zone_Operations.UTC_Time_Offset.
6364 * a-caltizo.ads (UTC_Time_Offset): Removed.
6365 (UTC_Time_Offset (Time)): Add back the default expression of parameter
6368 2012-01-23 Robert Dewar <dewar@adacore.com>
6370 * sprint.ads, sprint.adb (Sprint_Node_List): Add New_Lines parameter
6371 (pg,po,ps): Make sure each entry starts on new line.
6373 2012-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6375 * a-calend.ads, a-calend.adb: Define types int and int_Pointer. Update
6376 the parameter profile of procedure localtime_tzoff and its associated
6378 (Day_Of_Week): Do not treat the input date as historical
6379 with respect to time zones.
6380 (Split): Do not treat the input
6381 date as historical with respect to time zones. (Time_Of): Do
6382 not treat the input constituents as forming a historical date
6383 with respect to time zones.
6384 (UTC_Time_Offset): Add new formal
6385 parameter Is_Historic. Add local variable Flag. Update the call
6387 * a-catizo.ads, a-catizo.adb (UTC_Time_Offset): New routine.
6388 (UTC_Time_Offset (Time)): Update the call to
6389 Time_Zone_Operations.UTC_Time_Offset.
6390 * sysdep.c (__gnat_localtime_tzoff): Update parameter
6391 profile. Split the processing of offsets on Windows into two - one
6392 part of historic time stamps and the other for the current time.
6394 2012-01-23 Robert Dewar <dewar@adacore.com>
6396 * a-calend.adb: Minor reformatting.
6398 2012-01-23 Ed Schonberg <schonberg@adacore.com>
6400 * exp_ch9.adb, sem_ch9.adb: Handle array of access to synchronized
6401 interface in requeue statement.
6403 2012-01-23 Cyrille Comar <comar@adacore.com>
6405 * projects.texi: Remove references to main units and replace
6406 with references to main programs to be coherent with the
6409 2012-01-23 Robert Dewar <dewar@adacore.com>
6411 * s-utf_32.adb: Minor reformatting.
6413 2012-01-23 Vincent Celier <celier@adacore.com>
6415 * snames.ads-tmpl: Minor comment addition Indicate that
6416 Name_Library_Encapsulated_Options is only used in gprbuild.
6418 2012-01-23 Robert Dewar <dewar@adacore.com>
6420 * sem_ch10.adb (Analyze_Subunit): Properly save/restore cunit
6423 2012-01-23 Ed Schonberg <schonberg@adacore.com>
6425 * snames.ads-tmpl: Add Name_Synchronization.
6426 * aspects.ads, aspects.adb: Add Aspect_Synchronization to
6427 enumeration type and related maps.
6428 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle Aspect
6429 Synchronization, build corresponding pragma Implemented.
6430 * sem_util.adb (Implementation_Kind): Handle both explicit and
6431 implicit pragma_argument association to retrieve the given
6432 synchronization mode.
6434 2012-01-23 Robert Dewar <dewar@adacore.com>
6436 * sem_ch10.adb, errout.adb: Minor reformatting.
6438 2012-01-23 Ed Schonberg <schonberg@adacore.com>
6440 * sem_res.adb (Resolve_Actuals): An actual in a call to an
6441 Ada 2012 Reference function does not lead to a dangerous order
6444 2012-01-23 Gary Dismukes <dismukes@adacore.com>
6446 * exp_util.adb (Is_Iterated_Container): Test
6447 Is_Entity_Name when searching for calls to the default iterator,
6448 to avoid blowing up on indirect calls which have an explicit
6449 dereference as the call name.
6451 2012-01-23 Thomas Quinot <quinot@adacore.com>
6453 * errout.adb (Set_Msg_Node): For an N_Expanded_Name, output
6454 the complete expanded name, rather than just its Selector_Name.
6456 2012-01-23 Thomas Quinot <quinot@adacore.com>
6458 * a-textio.adb (Put): Rewrite one-parameter Character version to
6459 just call the two-parameter one with Current_Out.
6461 2012-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6463 * freeze.adb (Check_Current_Instance): Issue an
6464 error when the prefix of 'Unchecked_Access or 'Access does not
6465 denote a legal aliased view of a type.
6466 (Freeze_Record_Type): Do not halt the processing of record components
6467 once the Has_Controlled_Component is set as this bypasses the remaining
6469 (Is_Aliased_View_Of_Type): New routine.
6471 2012-01-23 Thomas Quinot <quinot@adacore.com>
6473 * errout.ads, freeze.adb: Minor reformatting.
6475 2012-01-23 Thomas Quinot <quinot@adacore.com>
6477 * sem_ch10.adb, sem_prag.adb: Remove redundant apostrophes in error
6480 2012-01-23 Olivier Hainque <hainque@adacore.com>
6482 * adadecode.c (__gnat_decode): Deal with empty input early,
6483 preventing potential erroneous memory access later on.
6485 2012-01-21 Eric Botcazou <ebotcazou@adacore.com>
6488 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: In the case of a
6489 renaming, preserve the volatileness through the indirection, if any.
6491 2012-01-14 Andreas Schwab <schwab@linux-m68k.org>
6493 * gcc-interface/Makefile.in (OSCONS_EXTRACT): Add
6496 2012-01-10 Pascal Obry <obry@adacore.com>
6498 * prj-nmsc.adb (Check_Library_Attributes):
6499 Kill check for object/source directories for aggregate libraries.
6501 2012-01-10 Matthew Heaney <heaney@adacore.com>
6503 * a-cdlili.adb, a-cdlili.ads, a-cihama.adb, a-cihama.ads, a-coinve.adb,
6504 a-coinve.ads, a-ciorse.adb, a-ciorse.ads, a-coorma.adb, a-coorma.ads,
6505 a-cborma.adb, a-cborma.ads, a-cidlli.adb, a-cidlli.ads, a-cimutr.adb,
6506 a-cimutr.ads, a-cihase.adb, a-cihase.ads, a-cohama.adb, a-cohama.ads,
6507 a-coorse.adb, a-coorse.ads, a-cbhama.adb, a-cbhama.ads, a-cborse.adb,
6508 a-cborse.ads, a-comutr.adb, a-comutr.ads, a-ciorma.adb, a-cobove.adb,
6509 a-ciorma.ads, a-cobove.ads, a-convec.adb, a-convec.ads, a-cohase.adb,
6510 a-cohase.ads, a-cbdlli.adb, a-cbdlli.ads, a-cbmutr.adb, a-cbmutr.ads,
6511 a-cbhase.adb, a-cbhase.ads (Reference, Constant_Reference): Declare
6512 container parameter as aliased in/in out.
6515 2012-01-10 Bob Duff <duff@adacore.com>
6517 * s-os_lib.ads: Improve comment.
6519 2012-01-10 Geert Bosch <bosch@adacore.com>
6521 * s-gearop.adb (Forward_Eliminate): Avoid improper aliasing
6524 2012-01-10 Bob Duff <duff@adacore.com>
6526 * sem_intr.adb (Check_Shift): Use RM_Size instead of Esize, when
6527 checking that the 'Size is correct. If the type is "mod 2**12",
6528 for example, it's illegal, but Esize is the 'Object_Size, which
6529 will be something like 16 or 32, so the error ('Size = 12) was
6531 * gnat_rm.texi: Improve documentation of shift
6532 and rotate intrinsics.
6534 2012-01-10 Pascal Obry <obry@adacore.com>
6536 * prj.adb (For_Every_Project_Imported): Fix
6537 implementation to make sure we return each project only once
6538 for aggragte libraries. It is fine to return a project twice for
6539 aggregate projects, this was the case as a Project_Id is different
6540 in each project tree. The new implementation use a table based on
6541 the project name to ensure proper detection of duplicate project
6542 in aggregate library. A new context is then created to continue
6543 retrurning duplicate project for aggregate libraries.
6545 2012-01-09 Eric Botcazou <ebotcazou@adacore.com>
6547 * gcc-interface/trans.c (call_to_gnu): Create the temporary for the
6548 return value in the variable-sized return type case if the target is
6549 an array with fixed size. However, do not create it if this is the
6550 expression of an object declaration.
6552 2012-01-09 Eric Botcazou <ebotcazou@adacore.com>
6554 * gcc-interface/trans.c (addressable_p) <COMPONENT_REF>: Fix thinko.
6556 2012-01-06 Robert Dewar <dewar@adacore.com>
6558 * a-wichha.ads, a-wichun.ads, a-zchhan.ads, a-zchuni.ads,
6559 s-utf_32.ads: Add pragma Pure
6560 * s-utf_32.adb: Suppress warnings on non-static constants (now
6563 2012-01-06 Bob Duff <duff@adacore.com>
6565 * s-rpc.ads (Read, Write): Add overriding indicators.
6567 2012-01-06 Robert Dewar <dewar@adacore.com>
6569 * gnat_rm.texi: Add documentation for conventions
6570 Ada_Pass_By_Copy and Ada_Pass_By_Reference.
6572 2012-01-06 Gary Dismukes <dismukes@adacore.com>
6574 * a-tienio.adb (Put): Add exception message on
6575 raise statements. Remove unneeded blocks and object declarations.
6577 2012-01-06 Robert Dewar <dewar@adacore.com>
6579 * sem_prag.adb: Minor reformatting.
6581 2012-01-06 Ed Schonberg <schonberg@adacore.com>
6583 * sinfo.ads, sinfo.adb (Has_Prefixed_Call): New flag to indicate
6584 that a selected component within a generic unit has been resolved
6585 as a prefixed call with local references.
6586 * sem_ch3.adb (Is_Visible_Component): In an instance body a selected
6587 component is always visible.
6588 * sem_ch4.adb (Analyze_Selected_Component): If the node is a
6589 prefixed call in an instance, do not look for visible components
6591 * sem_ch12.adb (Reset_Entity): If a selected component has resolved
6592 to a prefixed call, mark the node accordingly when prefix and
6593 selector are local references.
6595 2012-01-02 Eric Botcazou <ebotcazou@adacore.com>
6597 * gnatvsn.ads (Current_Year): Bump to 2012.
6599 Copyright (C) 2012 Free Software Foundation, Inc.
6601 Copying and distribution of this file, with or without modification,
6602 are permitted in any medium without royalty provided the copyright
6603 notice and this notice are preserved.