gcc/
[official-gcc.git] / gcc / ada / ChangeLog
blob6aa07b00c9c96fb254ca844696cec1f5a86acd18
1 2012-10-15  Matthias Klose  <doko@ubuntu.com>
3         * gcc-interface/Makefile.in: Match arm*-*-linux-*eabi* for
4         ARM Linux/GNU.
6 2012-10-05  Robert Dewar  <dewar@adacore.com>
8         * sem_ch7.adb: Minor reformatting.
10 2012-10-05  Ed Schonberg  <schonberg@adacore.com>
12         * sem_prag.adb (Analyze_Pragma, case Persistent_BSS): check for
13         a duplicate pragma before Rep_Item_Too_Late to prevent spurious
14         messages about duplicate pragmas.
16 2012-10-05  Ed Schonberg  <schonberg@adacore.com>
18         * exp_util.adb (Find_Init_Call): If the successor of the
19         object declaration is a block, check whether it contains the
20         initialization call, because it may have been created by actuals
21         that use the secondary stack.
23 2012-10-05  Thomas Quinot  <quinot@adacore.com>
25         * sem_dim.adb, errout.adb, errout.ads (Analyze_Dimension_Call): Add
26         guard against abnormal tree resulting from a previously diagnosed
27         illegality.
29 2012-10-05  Hristian Kirtchev  <kirtchev@adacore.com>
31         * freeze.adb (Freeze_Expression): Rename local variable Cspc to Spec
32         and update all refs to it. Do not freeze an entity outside a subprogram
33         body when the original context is an expression function.
35 2012-10-05  Robert Dewar  <dewar@adacore.com>
37         * gnat1drv.adb (Adjust_Global_Switches): Default for overflow checking
38         is suppressed, even if backend overflow/divide checks are enabled.
40 2012-10-05  Ed Schonberg  <schonberg@adacore.com>
42         * einfo.adb (Set_Invariant_Procedure, Set_Predicate_Function):
43         chain properly subprograms on Subprograms_For_Type list.
44         * sem_ch13.ads; (Build_Invariant_Procedure_Declaration): new
45         procedure, to create declaration for invariant procedure
46         independently of the construction of the body, so that it can
47         be called within expression functions.
48         * sem_ch13.adb (Build_Invariant_Procedure): code cleanup. The
49         declaration may already have been generated at the point an
50         explicit invariant aspect is encountered.
51         * sem_prag.adb; (Analyze_Pragma, case Invariant): create declaration
52         for invariant procedure.
53         * sem_ch7.adb (Analyze_Package_Specification): clean up call to
54         build invariant procedure.
55         (Preserve_Full_Attributes): propagate information about invariants
56         if they appear on a completion,
58 2012-10-05  Pascal Obry  <obry@adacore.com>
60         * gnat_ugn.texi: Update documentation to lift Microsoft C
61         restriction.
63 2012-10-05  Robert Dewar  <dewar@adacore.com>
65         * sem_util.adb (Has_One_Matching_Field): Handle case of lone
66         discriminant.
68 2012-10-05  Yannick Moy  <moy@adacore.com>
70         * checks.adb (Minimize_Eliminate_Overflow_Checks): Correct code
71         for the division operation and exponent operation. Adjust bound
72         for the mod and rem operations.
74 2012-10-05  Robert Dewar  <dewar@adacore.com>
76         * checks.adb, checks.ads, s-tassta.adb, s-stposu.adb, s-spsufi.adb,
77         s-spsufi.ads, exp_ch4.adb: Minor reformatting.
79 2012-10-05  Yannick Moy  <moy@adacore.com>
81         * switch-c.adb, checks.adb, checks.ads, sem_prag.adb, exp_ch4.adb,
82         osint.adb: Minor correction of typos, and special case for Alfa mode.
84 2012-10-05  Hristian Kirtchev  <kirtchev@adacore.com>
86         * s-spsufi.adb: Add with clause for Ada.Unchecked_Deallocation.
87         Add with and use clauses for System.Finalization_Masters.
88         (Finalize_And_Deallocate): Add an instance of
89         Ada.Unchecked_Deallocation. Merge the code from the now obsolete
90         Finalize_Subpool into this routine.
91         * s-spsufi.ads: Add pragma Preelaborate.
92         * s-stposu.adb: Remove with clause for
93         Ada.Unchecked_Deallocation; Add with and use clauses for
94         System.Storage_Pools.Subpools.Finalization; (Finalize_Pool):
95         Update the comment on all actions takes with respect to a subpool
96         finalization. Finalize and deallocate each individual subpool.
97         (Finalize_Subpool): Removed.
98         (Free): Removed;
99         (Detach): Move from package body to spec.
100         * s-stposu.ads (Detach): Move from package body to spec.
101         (Finalize_Subpool): Removed.
103 2012-10-05  Arnaud Charlet  <charlet@adacore.com>
105         * s-tassta.adb: Update comments.
106         (Vulnerable_Complete_Master): If Free_On_Termination is set, do
107         nothing, and let the task free itself if not already done.
109 2012-10-04  Robert Dewar  <dewar@adacore.com>
111         * sem_res.adb (Resolve_Set_Membership): Warn on duplicates.
113 2012-10-04  Emmanuel Briot  <briot@adacore.com>
115         * g-comlin.adb (Getopt): Fix value of Full_Switch returned in case of
116         invalid switch.
118 2012-10-04  Arnaud Charlet  <charlet@adacore.com>
120         * gcc-interface/Make-lang.in: Update dependencies.
122 2012-10-04  Robert Dewar  <dewar@adacore.com>
124         * sem_eval.adb (Fold_Str, Fold_Uint, Fold_Ureal): Reset static
125         expression state after Resolve call.
127 2012-10-04  Robert Dewar  <dewar@adacore.com>
129         * sem_prag.adb (Analyze_Pragma. case Warnngs): Don't make entry
130         in the table for Warnings Off pragmas if within an instance.
132 2012-10-04  Ed Schonberg  <schonberg@adacore.com>
134         * sem_ch9.adb (Analyze_Entry_Body): Transfer
135         Has_Pragma_Unreferenced flag from entry formal to corresponding
136         entity in body, to prevent spurious warnings when pragma is
137         present.
139 2012-10-04  Robert Dewar  <dewar@adacore.com>
141         * s-bignum.adb (Big_Exp): Raise Storage_Error for ludicrously
142         large results.
144 2012-10-04  Ed Schonberg  <schonberg@adacore.com>
146         * sem_ch3.adb (Check_Duplicate_Aspects): Diagnose properly
147         aspects that appear in the partial and the full view of a type.
149 2012-10-04  Robert Dewar  <dewar@adacore.com>
151         * sinfo.ads (N_Return_Statement): Removed.
153 2012-10-04  Tristan Gingold  <gingold@adacore.com>
155         * init.c (__gl_zero_cost_exceptions): Comment it as not used
156         anymore.
157         * bindgen.adb (Gen_Adainit): Do not emit Zero_Cost_Exceptions
158         anymore.
160 2012-10-04  Thomas Quinot  <quinot@adacore.com>
162         * prep.adb, prepcomp.adb, gprep.adb, opt.ads: New preprocessor switch
163         -a (all source text preserved).
165 2012-10-04  Vincent Celier  <celier@adacore.com>
167         * prj-proc.adb (Recursive_Process): Use project directory
168         display path name as the value of 'Project_Dir.
170 2012-10-04  Robert Dewar  <dewar@adacore.com>
172         * exp_ch4.adb (Expand_Compare_Minimize_Eliminate_Overflow):
173         Deal with case where we get a bignum operand and cannot do a
174         range analysis.
175         * sem_eval.adb (Why_Not_Static): Deal with bignum operands
177 2012-10-04  Ed Schonberg  <schonberg@adacore.com>
179         * sem_ch4.adb (Find_Unary_Types): Within an instance, an
180         interpretation that involves a predefied arithmetic operator is
181         not a candidate if the corresponding generic formal type is not
182         a numeric type.
183         * sem_util.ads, sem_util.adb (Corresonding_Generic_Type): If a
184         type is a generic actual type within an instance, return the
185         corresponding formal in the generic unit, otherwise return
186         Any_Type.
188 2012-10-04  Robert Dewar  <dewar@adacore.com>
190         * checks.adb (Minimize_Eliminate_Overflow_Checks): Dont reanalyze
191         if/case expression if nothing has changed (just reexpand). Stops
192         case expression from generating incorrect temporary.
193         * exp_ch4.adb (Expand_Compare_Minimize_Eliminate_Overflow):
194         Fix cut and paste typo for range analysis in NE (not equal) case.
195         * sem_eval.adb (Compile_Time_Compare): Small optimization to
196         catch some more cases.
197         * types.ads (Suppressed_Or_Checked): New subtype of
198         Overflow_Check_Type.
200 2012-10-04  Javier Miranda  <miranda@adacore.com>
202         * exp_disp.adb (Set_CPP_Constructors_Old): Removed.
203         (Set_CPP_Constructors): Code cleanup.
205 2012-10-04  Ed Schonberg  <schonberg@adacore.com>
207         * sem_ch10.adb (Is_Ancestor_Unit): Make global, for use elsewhere.
208         (Install_Private_with_Clauses): if clause is private and limited,
209         do not install the limited view if the library unit is an ancestor
210         of the unit being compiled.  This unusual configuration occurs
211         when compiling a unit DDP, when an ancestor P of DDP has a
212         private limited with clause on a descendant of P that is itself
213         an ancestor of DDP.
215 2012-10-04  Vincent Celier  <celier@adacore.com>
217         * prj-proc.adb (Process_Package_Declaration): Use project
218         directory display path name as the value of 'Project_Dir.
220 2012-10-04  Gary Dismukes  <dismukes@adacore.com>
222         * exp_util.adb (Build_Allocate_Deallocate_Proc): The subpool can be
223         given by an arbitrary name, so copy the tree to make the call's actual.
225 2012-10-04  Robert Dewar  <dewar@adacore.com>
227         * s-exnllf.adb, s-exnllf.ads: Minor reformatting.
229 2012-10-04  Thomas Quinot  <quinot@adacore.com>
231         * exp_ch6.adb: Minor reformatting.
233 2012-10-04  Pascal Obry  <obry@adacore.com>
235         * projects.texi: Use consistently @command{} when referencing
236         commands. Fix typos.
238 2012-10-03  Ed Schonberg  <schonberg@adacore.com>
240         * sem_ch6.adb (New_Overloaded_Entity): call
241         Append_Inherited_Subprogram when appropriate.
242         * sem_dim.adb (Analyze_Dimension_Call): Do not perform dimensional
243         analysis if call has previous semantic error.
244         * sem_util.ads, sem_util.adb (Append_Inherited_Subprogram):
245         new subprogram to handle properly the visibility of inherited
246         operations that are primitives of a type extension, when the
247         parent type and operations are declared in the same visible part.
249 2012-10-03  Robert Dewar  <dewar@adacore.com>
251         * checks.adb (Minimize_Eliminate_Overflow_Checks): Properly
252         handle case of top level expression within type conversion
253         * gnat1drv.adb (Adjust_Global_Switches): Set SUPPRESSED as
254         default for overflow checking for -gnatg mode (includes run-time).
255         * sem_res.adb (Resolve_Type_Conversion): Avoid bogus warnings
256         about redundant conversions from MINIMIZED/EXTENDED mode checking
258 2012-10-03  Javier Miranda  <miranda@adacore.com>
260         * exp_ch4.adb (Expand_N_Allocator_Expression): Minor code
261         reorganization and cleanup. Done to ensure proper management of
262         the C++ constructor covering tagged and untagged types and also
263         non-default constructors.
264         * exp_ch6.ads, exp_ch6.adb (Make_CPP_Constructor_Call_In_Allocator):
265         New subprogram.
267 2012-10-03  Gary Dismukes  <dismukes@adacore.com>
269         * sem_ch6.adb: Minor typo fix.
271 2012-10-03  Robert Dewar  <dewar@adacore.com>
273         * checks.adb (Apply_Arithmetic_Overflow_Minimized_Eliminated):
274         Set Top_Level properly (to False) for operand of range of
275         membership test.
276         * exp_ch4.adb (Expand_Membership_Minimize_Eliminate_Overflow):
277         Fix crash with -gnato3 and membership operations.
278         (Expand_Membership_Minimize_Eliminate_Overflow): Fix error message
279         and wrong results for -gnato3 large expression and predicated
280         subtype.
281         (Expand_Membership_Minimize_Eliminate_Overflow): Use
282         expression action node to avoid using insert actions (bombs in
283         some cases).
284         (Expand_Compare_Minimize_Eliminate_Overflow): Use expression action
285         node to avoid using insert actions (bombs in some cases).
287 2012-10-03  Javier Miranda  <miranda@adacore.com>
289         * exp_disp.adb (Set_CPP_Constructors_Old): Handle constructor of
290         untagged type that has all its parameters with defaults and hence it
291         covers the default constructor.
293 2012-10-03  Yannick Moy  <moy@adacore.com>
295         * checks.adb, sem_prag.adb, s-bignum.ads: Minor typo fixes.
297 2012-10-03  Thomas Quinot  <quinot@adacore.com>
299         * g-socket.adb (Connect_Socket, version with timeout): When the
300         newly-connected socket is reported as available for writing, check
301         whether it has a pending asynchronous error prior to returning.
303 2012-10-03  Ed Schonberg  <schonberg@adacore.com>
305         * sem_ch6.adb (Check_Conformance): Additional info when subtype
306         conformance fails, due to a missing null exclusion indicatar in
307         a formal that must match a controlling access formal.
309 2012-10-02  Ben Brosgol  <brosgol@adacore.com>
311         * gnat_rm.texi: Minor editing.
313 2012-10-02  Ed Schonberg  <schonberg@adacore.com>
315         * sem_ch6.adb (Analyze_Function_Return): Reject a return
316         expression whose type is a local access to subprogram type.
318 2012-10-02  Robert Dewar  <dewar@adacore.com>
320         * sem_eval.adb: Minor improvement to Compile_Time_Compare.
322 2012-10-02  Robert Dewar  <dewar@adacore.com>
324         * checks.adb (Apply_Arithmetic_Overflow_Minimized_Eliminated):
325         Fix base type problem that resulted in improper conversion.
326         (Minimize_Eliminate_Overflow_Checks): Properly handle top
327         level case to avoid unnecessary conversion to bignum or LLI.
328         (Minimize_Eliminate_Overflow_Checks): Implement uniform two phase
329         approach for arithmetic operators and for if/case expressions.
330         * checks.ads: Minor comment fix.
331         * exp_ch4.adb (Minimized_Eliminated_Overflow_Check): New function,
332         implements a uniform way of treating minimized/eliminated checks in
333         two phases.
334         (Expand_Compare_Minimize_Eliminate_Overflow): Fix cut and
335         paste error resulting in wrong results for less than in some
336         cases.  (Expand_Membership_Minimize_Eliminate_Overflow):
337         Fix error caused by incorrect capture of operand types.
338         (Expand_Membership_Minimize_Eliminate_Overflow): Fix error in
339         handling of bignum case.
340         (Expand_N_Case_Expression): Implement
341         proper two phase handling (Expand_N_If_Expression): Implement
342         proper two phase handling (Expand_N_Op_Abs): Implement proper
343         two phase handling ditto for all other arithmetic operators
344         * sem_res.adb (Resolve_If_Expression): Avoid introducing
345         unneeded conversions.
347 2012-10-02  Robert Dewar  <dewar@adacore.com>
349         * s-bignum.adb (Big_Exp): 0**0 should be 1, not 0.
350         (Big_Exp): Fix possible error for (-1)**0.
351         (Big_Exp): Fix error in computing 2**K for small K.
352         (Big_Mod): Fix wrong sign for negative operands.
353         (Div_Rem): Fix bad results for operands close to 2**63.
354         * s-bignum.ads: Add documentation and an assertion to require
355         LLI size to be 64 bits.
356         * sem_prag.adb (Analyze_Pragma, case Overflow_Checks): Do not
357         allow ELIMINATED if LLI'Size is other than 64 bits.
358         * switch-c.adb (Scan_Switches): Do not allow -gnato3 if LLI'Size
359         is not 64 bits.
360         * switch.ads (Bad_Switch): Add missing pragma No_Return.
361         * gnat_ugn.texi: Added appendix on Overflow Check Handling in GNAT.
363 2012-10-02  Robert Dewar  <dewar@adacore.com>
365         * sem_type.adb: Minor reformatting.
367 2012-10-02  Robert Dewar  <dewar@adacore.com>
369         * sem_ch8.adb: Minor reformatting.
371 2012-10-02  Javier Miranda  <miranda@adacore.com>
373         * exp_disp.adb (Set_CPP_Constructors): Handle constructor with default
374         parameters that covers the default constructor.
376 2012-10-02  Yannick Moy  <moy@adacore.com>
378         * s-bignum.adb: Minor stylistic and comment corrections.
380 2012-10-02  Pascal Obry  <obry@adacore.com>
382         * prj-util.adb (For_Interface_Sources): Iterate over all sources in
383         aggregate library projects.
385 2012-10-02  Ed Schonberg  <schonberg@adacore.com>
387         * sem_ch8.adb (Find_Direct_Name): The left-hand side of an
388         assignment may designate a generalized reference.
390 2012-10-02  Eric Botcazou  <ebotcazou@adacore.com>
392         * types.h (N_Return_Statement): Delete.
393         * gcc-interface/trans.c (gnat_to_gnu): Replace N_Return_Statement with
394         N_Simple_Return_Statement.
396 2012-10-02  Ed Schonberg  <schonberg@adacore.com>
398         * freeze.adb (Freeze_Entity): in a generic context, aspects must
399         be analyzed because they may be queried subsequently within the
400         generic unit, even if no other freezing actions are generated
401         for an entity.
402         * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): iterator
403         aspects must be analyzed because they are delayed aspects and
404         the corresponding attribute definition clause may not have been
405         analyzed yet.
407 2012-10-02  Yannick Moy  <moy@adacore.com>
409         * gnat_rm.texi: Minor editing.
411 2012-10-02  Robert Dewar  <dewar@adacore.com>
413         * sinfo.adb, sinfo.ads, sem_util.adb, sem_util.ads, types.h,
414         exp_ch4.adb, exp_ch6.adb: Get rid of internal use of N_Return_Statement.
416 2012-10-02  Eric Botcazou  <ebotcazou@adacore.com>
418         * types.h: Minor cosmetic fix.
420 2012-10-02  Eric Botcazou  <ebotcazou@adacore.com>
422         * gcc-interfaces/decl.c (elaborate_expression_1): Use the variable for
423         bounds of loop iteraration scheme only for locally defined subtypes.
425         * gcc-interface/trans.c (gigi): Fix formatting.
426         (build_return_expr): Apply the NRV optimization only for BLKmode.
428 2012-10-02  Robert Dewar  <dewar@adacore.com>
430         * sinfo.ads: Remove refs of N_Conditional_Expression and
431         N_Parameterized_Expression.
433 2012-10-02  Thomas Quinot  <quinot@adacore.com>
435         * exp_aggr.adb (Get_Component_Val): Rewrite code that computes
436         justification of bits in enclosing word in an attempt to make
437         it clearer.
439 2012-10-02  Robert Dewar  <dewar@adacore.com>
441         * par_sco.adb, sem_ch3.adb, layout.adb, exp_ch7.adb, exp_imgv.adb,
442         exp_util.adb, exp_util.ads, exp_attr.adb, sinfo.adb, sinfo.ads,
443         exp_ch9.adb, style.ads, scos.ads, debug.adb, einfo.ads, scng.adb,
444         checks.adb, checks.ads, sem.adb, par-ch4.adb, sem_util.adb, types.h,
445         sem_res.adb, expander.adb, scans.ads, par.adb, exp_ch2.adb,
446         gnat1drv.adb, stylesw.ads, sem_elab.adb, exp_ch4.adb, exp_ch4.ads,
447         exp_ch6.adb, sem_ch4.adb, sem_ch4.ads, sem_ch6.adb,
448         opt.ads, sem_eval.adb, sem_eval.ads, exp_intr.adb, sprint.adb,
449         sprint.ads, styleg.ads: Change name Conditional_Expression to
450         If_Expression.
451         * gcc-interface/trans.c (gnat_to_gnu): Replace
452         N_Conditional_Expression by N_If_Expression.
453         * gcc-interface/Make-lang.in: Update dependencies.
455 2012-10-02  Robert Dewar  <dewar@adacore.com>
457         * exp_ch4.adb (Expand_N_Op_Expon): Use expression with actions
458         for x ** 4.
460 2012-10-02  Ed Schonberg  <schonberg@adacore.com>
462         * sem_ch5.adb: (Analyze_Iterator_Specification): If container
463         has a variable indexing aspect, the element is a variable and
464         is modifiable in the loop. This check is also performed when the
465         loop is expanded, but it must be done in semantic analysis when
466         expansion is disabled, for example for ASIS usage.
468 2012-10-02  Ed Schonberg  <schonberg@adacore.com>
470         * lib-xref.adb (Generate_Reference): If a child subprogram
471         has no previous spec, treat a reference to its formals (such
472         as a parameter association) as coming from source in order to
473         generate the proper references and enable gps navigation between
474         reference and declaration.
476 2012-10-02  Robert Dewar  <dewar@adacore.com>
478         * checks.adb (Apply_Arithmetic_Overflow_Checked_Suppressed):
479         New name for Apply_Arithmetic_Overflow_Normal
480         (Apply_Arithmetic_Overflow_Minimized_Eliminated):
481         Add handling for conditional expressions
482         (Is_Signed_Integer_Arithmetic_Op): Now includes conditional
483         expressions (Minimize_Eliminate_Overflow_Checks): Handle
484         conditional expressions.
485         * checks.ads: Minor comment fixes.
486         * exp_ch4.adb (Expand_N_Case_Expression): Call
487         Apply_Arithmetic_Overflow_Check (Expand_N_Conditional_Expression):
488         Call Apply_Arithmetic_Overflow_Check
489         * s-bignum.adb (Normalize): Remove incorrect precondition.
490         * sem_res.adb (Resolve_Case_Expression): Set Do_Overflow_Check
491         flag (Resolve_Conditional_Expression): Set Do_Overflow_Check flag.
492         * sinfo.adb: Add Do_Overflow_Check for conditional expressions.
493         * sinfo.ads: Minor documentation updates.
495 2012-10-02  Ed Schonberg  <schonberg@adacore.com>
497         * exp_ch4.adb (Expand_N_Case_Expression): Do not introduce
498         indirections when the type of the alternatives is an access type:
499         more efficient, and removes anomalies when an alternative is
500         statically null.
502 2012-10-02  Robert Dewar  <dewar@adacore.com>
504         * aspects.ads: Minor comment addition (Invariant is a GNAT aspect).
506 2012-10-02  Robert Dewar  <dewar@adacore.com>
508         * exp_ch7.adb, sem_dim.adb, sem_dim.ads, prj-part.adb, checks.adb,
509         freeze.adb, sem_ch4.adb, sem_ch13.adb: Minor reformatting.
511 2012-10-02  Robert Dewar  <dewar@adacore.com>
513         * sem_prag.adb (Analyze_Pragma, case Overflow_Checks): Fix
514         typo preventing proper processing of Overflow_Checks pragmas
515         for general case.
517 2012-10-02  Robert Dewar  <dewar@adacore.com>
519         * exp_ch4.adb (Expand_N_Op_Mod): Fix crash in ELIMINATED overflow
520         checks mode when bignum mode is used.
522 2012-10-02  Robert Dewar  <dewar@adacore.com>
524         * stylesw.ads, gnat_ugn.texi: Document new style rule for NOT IN.
525         * par-ch4.adb (P_Relational_Operator): Add style check for NOT IN.
526         * style.ads, styleg.adb, styleg.ads (Check_Not_In): New procedure.
528 2012-10-02  Vincent Pucci  <pucci@adacore.com>
530         * sem_attr.adb (Analyze_Attribute): Check dimension for attribute
531         Old before it gets expanded.
532         * sem_dim.adb (Analyze_Dimension_Has_Etype): Correctly propagate
533         dimensions for identifier.
535 2012-10-02  Ed Schonberg  <schonberg@adacore.com>
537         * exp_ch5.adb (Expand_Iterator_Loop): Handle properly the case
538         where the iterator type is derived locally from an instantiation
539         of Ada.Iterators_Interface.
540         * exp_ch7.adb (Establish_Transient_Scope): Do not create a
541         transient scope if within the expansion of an iterator loop,
542         because a transient block already exists.
544 2012-10-02  Vincent Celier  <celier@adacore.com>
546         * gnatcmd.adb: Use absolute path for configuration pragmas files
547         * make.adb (Configuration_Pragmas_Switch.Absolute_Path): Moved
548         to Makeutl.
549         * makeutl.ads, makeutl.adb (Absolute_Path): New function, moved from
550         make.adb.
552 2012-10-02  Vincent Celier  <celier@adacore.com>
554         * prj-part.adb (Post_Parse_Context_Clause): Resurrect Boolean
555         parameter In_Limited.  Check for circularity also if In_Limited
556         is True.
557         (Parse_Single_Project): Call Post_Parse_Context_Clause with
558         In_Limited parameter.
560 2012-10-02  Bob Duff  <duff@adacore.com>
562         * checks.adb (Apply_Predicate_Check): Disable check in -gnatc mode.
564 2012-10-02  Vincent Pucci  <pucci@adacore.com>
566         * sem_ch6.adb (Analyze_Function_Call): Dimension propagation
567         for function calls moved to Analyze_Dimension_Call.
568         * sem_dim.adb (Analyze_Dimension_Call): Properly propagate the
569         dimensions from the returned type for function calls.
571 2012-10-02  Vincent Celier  <celier@adacore.com>
573         * gnatcmd.adb: Take into account any configuration pragma file
574         in the project files for gnat pretty/stub/metric.
576 2012-10-02  Ed Schonberg  <schonberg@adacore.com>
578         * sem_ch13.adb (Check_Indexing_Functions): Refine several tests
579         on the legality of indexing aspects: Constant_Indexing functions
580         do not have to return a reference type, and given an indexing
581         aspect Func, not all overloadings of Func in the current scope
582         need to be indexing functions.
584 2012-10-02  Vasiliy Fofanov  <fofanov@adacore.com>
586         * gnat_ugn.texi: Adjust docs for overflow checks to be VMS-friendly.
588 2012-10-02  Vincent Celier  <celier@adacore.com>
590         * switch-m.adb (Normalize_Compiler_Switches): Recognize switches
591         -gnatox and -gnatoxx when x=0/1/2/3.
593 2012-10-02  Vincent Pucci  <pucci@adacore.com>
595         * sem_ch4.adb (Analyze_Indexed_Component_Form): Dimension
596         analysis for indexed components added.
597         * sem_ch6.adb (Analyze_Function_Call): Dimension propagation
598         for function calls added.
599         * sem_dim.adb (Analyze_Dimension): Call to
600         Analyze_Dimension_Has_Etype when N is a function call.
601         (Analyze_Dimension_Call): Don't propagate anymore the dimensions
602         for function calls since this is now treated separately in
603         Analyze_Dimension_Has_Etype.
604         (Analyze_Dimension_Has_Etype): For
605         attribute references, propagate the dimensions from the prefix.
606         * sem_dim.ads (Copy_Dimensions): Fix comment.
608 2012-10-02  Hristian Kirtchev  <kirtchev@adacore.com>
610         * checks.ads, checks.adb (Apply_Parameter_Aliasing_Checks): New routine.
611         (Apply_Parameter_Aliasing_And_Validity_Checks): This routine
612         has been split into two.
613         (Apply_Parameter_Validity_Checks): New routine.
614         * exp_ch6.adb (Expand_Call): Add checks to verify that actuals
615         do not overlap. The checks are made on the caller side to overcome
616         issues of parameter passing mechanisms.
617         * freeze.adb (Freeze_Entity): Update call to
618         Apply_Parameter_Aliasing_And_Validity_Checks.
620 2012-10-02  Ed Schonberg  <schonberg@adacore.com>
622         * sem_ch4.adb (Is_Empty_Range): Use bounds of index type
623         to determine whether an array is empty when optimizing
624         a quantified expression over a null range. Use of RM_Size
625         was incorrect. Analyze condition before constant-folding the
626         expression to catch potential errors. Modify the error message
627         to avoid mathematical terminology.
629 2012-10-02  Robert Dewar  <dewar@adacore.com>
631         * usage.adb, gnat_rm.texi, vms_data.ads: Add entry for
632         /OVERFLOW_CHECKS=?? generating -gnato?? for control
633         of extended overflow checking.
634         * ug_words: Add entry for -gnato?? for /OVERFLOW_CHECKS=??
635         * gnat_ugn.texi: Add documentation for -gnato?? for control of overflow
636         checking mode.
638 2012-10-02  Ed Schonberg  <schonberg@adacore.com>
640         * sem_ch4.adb (Analyze_Quantified_Expression): If the iterator in
641         a quantified expression is statically known to be null (e.g. a
642         array with an empty index type) emit a warning.
644 2012-10-02  Robert Dewar  <dewar@adacore.com>
646         * sem_dim.adb: Minor code reorganization.
647         * sem_dim.ads: Add comment.
649 2012-10-02  Robert Dewar  <dewar@adacore.com>
651         * checks.ads, exp_ch4.adb, checks.adb
652         (Minimize_Eliminate_Overflow_Checks): Add Top_Level parameter to avoid
653         unnecessary conversions to Bignum.
654         Minor reformatting.
656 2012-10-02  Ed Schonberg  <schonberg@adacore.com>
658         * sem_ch6.adb (Process_PPCs): Generate invariant checks for a
659         return value whose type is an access type and whose designated
660         type has invariants. Ditto for in-out parameters and in-parameters
661         of an access type.
662         * exp_ch3.adb (Build_Component_Invariant_Call): Add invariant check
663         for an access component whose designated type has invariants.
665 2012-10-01  Vincent Pucci  <pucci@adacore.com>
667         * sem_aggr.adb (New_Copy_Tree_And_Copy_Dimensions): New routine.
668         (Resolve_Record_Aggregate): New_Copy_Tree calls replaced by
669         New_Copy_Tree_And_Copy_Dimensions calls. Move_Dimensions call
670         replaced by Copy_Dimensions call.
671         * sem_dim.adb (Analyze_Dimension_Component_Declaration): Don't
672         remove the dimensions of expression in component declaration anymore.
673         (Copy_Dimensions): New routine.
674         (Move_Dimensions): Add call to Copy_Dimensions.
675         * sem_dim.ads (Copy_Dimensions): New routine.
676         (Move_Dimensions): Spec moved to body of Sem_Dim.
678 2012-10-01  Ed Schonberg  <schonberg@adacore.com>
680         * checks.adb (Apply_Predicate_Check): If the predicate is a
681         static one and the operand is static, evaluate the predicate at
682         compile time.
683         * sem_eval.ads, sem_eval.adb (Eval_Static_Predicate_Check): new
684         procedure, to evaluate a static predicate check whenever possible.
685         * sem_res.adb (Resolve_Type_Conversion): Apply predicate check
686         on the conversion if the target type has predicates.
688 2012-10-01  Vincent Pucci  <pucci@adacore.com>
690         * sem_dim.adb (Has_Symbols): Complain if parameter Symbol has been
691         provided by the user in the dimension output call.
693 2012-10-01  Robert Dewar  <dewar@adacore.com>
695         * checks.adb (Apply_Divide_Checks): New name for
696         Apply_Divide_Check (Minimize_Eliminate_Overflow_Checks):
697         Add code to handle division (and rem and mod) properly.
698         (Apply_Division_Check): New procedure (Apply_Divide_Checks):
699         Use Apply_Division_Check (Apply_Divide_Checks): Use
700         Apply_Arithmetic_Overflow_Minimized_Eliminated.
701         * checks.ads (Apply_Divide_Checks): New name for
702         Apply_Divide_Check, also add clearer documentation for this
703         routine and put in alfa order.
704         * exp_ch4.adb (Apply_Divide_Checks): New name for
705         Apply_Divide_Check.
706         * s-bignum.adb (To_Bignum): Handle largest negative integer
707         properly.
708         * sem.adb (Analyze): Handle overflow suppression correctly
709         (Analyze_List): Handle overflow suppression correctly
710         * sem_res.adb (Analyze_And_Resolve): Handle overflow suppression
711         correctly.
713 2012-10-01  Vasiliy Fofanov  <fofanov@adacore.com>
715         * s-oscons-tmplt.c, g-socket.ads: Revert previous change, breaks VMS.
717 2012-10-01  Robert Dewar  <dewar@adacore.com>
719         * checks.adb (Minimize_Eliminate_Overflow_Checks): Changes
720         for exponentiation.
721         * exp_ch4.adb (Expand_N_Op_Expon): Changes for Minimize/Eliminate
722         overflow checks.
723         * s-bignum.adb (Compare): Fix bad precondition.
725 2012-10-01  Ed Schonberg  <schonberg@adacore.com>
727         * sem_ch3.adb (Build_Derived_Record_Type): If the derived
728         type has new discriminantss that constrain inherited ones, use
729         the discriminant type in the original declaration to check for
730         conformance, because in the presence of array components with a
731         smaller range that are constrained by the origina discriminant,
732         the compiler will have created a narrower subtype for that
733         discriminant.
735 2012-10-01  Robert Dewar  <dewar@adacore.com>
737         * checks.adb (Apply_Arithmetic_Overflow_Minimized_Eliminated):
738         Handle case of appearing in range in membership test.
739         * exp_ch4.adb (Expand_Membership_Minimize_Eliminate_Overflow):
740         New procedure (Expand_N_In): Use
741         Expand_Membership_Minimize_Eliminate_Overflow.
742         * rtsfind.ads: Add RE_Bignum_In_LLI_Range.
743         * s-bignum.ads, s-bignum.adb (Bignum_In_LLI_Range): New function.
744         * sinfo.ads, sinfo.adb (No_Minimize_Eliminate): New flag.
746 2012-10-01  Robert Dewar  <dewar@adacore.com>
748         * uintp.ads: Minor reformatting.
750 2012-10-01  Ed Schonberg  <schonberg@adacore.com>
752         * checks.adb: Improve warning message.
754 2012-10-01  Robert Dewar  <dewar@adacore.com>
756         * checks.adb: Minor reformatting.
758 2012-10-01  Javier Miranda  <miranda@adacore.com>
760         * exp_ch3.adb (Expand_N_Object_Declaration): Suppress tag
761         assignment for initializations that are aggregates.
763 2012-10-01  Robert Dewar  <dewar@adacore.com>
765         * exp_ch4.adb (Expand_Compare_Minimize_Eliminate_Overflow):
766         New procedure.
768 2012-10-01  Robert Dewar  <dewar@adacore.com>
770         * checks.adb (Minimize_Eliminate_Checks): Changes from testing.
771         (Apply_Arithmetic_Overflow_Minimized_Eliminated): Changes
772         from testing.
773         * sinfo.ads: Remove note on not setting Entity field in overflow
774         case since this is no longer true.
775         * Makefile.rtl: Add s-bignum.o
777 2012-10-01  Thomas Quinot  <quinot@adacore.com>
779         * Make-generated.in: Correction to previous change for s-oscons
780         target.
782 2012-10-01  Thomas Quinot  <quinot@adacore.com>
784         * s-bignum.adb (Allocate_Bignum): Reorganize to kill strict
785         aliasing warning.
787 2012-10-01  Robert Dewar  <dewar@adacore.com>
789         * checks.adb (Overflow_Check_Mode): New function
790         (Apply_Overflow_Check): New procedure (Is_Check_Suppressed):
791         Moved here from Sem, Overflow_Check case now specially treated.
792         * checks.ads (Overflow_Check_Mode): New function
793         (Is_Check_Suppressed): Moved here from Sem (more logical)
794         * exp_ch4.adb (Substitute_Valid_Check): Suppress warning about
795         optimization if we are in MINIMIZED or ELIMINATED overflow
796         checking mode and within an assertiom expression.
797         * rtsfind.ads: Add entries for Bignum stuff.
798         * s-bignum.ads, s-bignum.adb: New files.
799         * sem.ads, sem.adb (Is_Check_Suppressed): Moved to Checks, more logical.
800         * sem_prag.adb (Process_Suppress_Unsuppress): New behavior for
801         Unsuppress of Overflow_Check (sets Checked instead of Minimized)
802         * sem_res.adb: Update comments.
803         * sinfo.ads (N_Op): Add documentation on overflow handling.
804         * tbuild.ads, tbuild.adb (Convert_To_And_Rewrite): New procedure.
805         * types.ads (Minimized_Or_Eliminated): New subtype.
807 2012-10-01  Eric Botcazou  <ebotcazou@adacore.com>
809         * layout.adb (Layout_Type): Do not set twice the address size
810         on an access-to-unconstrained array if Debug_Flag_6 is set.
812 2012-10-01  Hristian Kirtchev  <kirtchev@adacore.com>
814         * sem_ch3.adb (Analyze_Declarations): Remove the specialized
815         code which prevents freezing when the declarative list contains
816         a _postconditions body. This is no longer needed because the
817         body is now inserted at the end of the declarations.
818         * sem_ch6.adb (Insert_After_Last_Declaration): New routine.
819         (Insert_Before_First_Source_Declaration): Removed.
820         (Process_PPCs): Insert the _postconditions body at the end of
821         the declarative list to prevent premature freezing of types that
822         appear in the declarations.
824 2012-10-01  Robert Dewar  <dewar@adacore.com>
826         * sem_aggr.adb, sem_dim.adb: Minor reformatting.
828 2012-10-01  Ed Schonberg  <schonberg@adacore.com>
830         * sem_prag.adb (Process_Convention, Process_Import_Or_Interface):
831         Adjust test so that when the pragma comes from an aspect
832         specification it only applies to the entity in the original
833         declaration.
835 2012-10-01  Thomas Quinot  <quinot@adacore.com>
837         * gnat_ugn.texi: Document new command line switch -fada-spec-parent.
839 2012-10-01  Thomas Quinot  <quinot@adacore.com>
841         * s-oscons-tmplt.c, g-socket.ads: Minor code improvement: use gcc
842         builtin __alignof__ to get the alignment of struct fd_set.
844 2012-10-01  Vincent Pucci  <pucci@adacore.com>
846         * exp_ch6.adb (Expand_Call): Remove call to
847         Remove_Dimension_In_Call.
848         * sem_aggr.adb (Resolve_Array_Aggregate): Analyze dimension of
849         components in array aggregate.
850         (Resolve_Aggr_Expr): Propagate dimensions from the original expression
851         Expr to the new created expression New_Expr when resolving the
852         expression of a component in record aggregates.
853         (Resolve_Record_Aggregate): Analyze
854         dimension of components in record (or extension) aggregate.
855         * sem_ch6.adb (Analyze_Subprogram_Specification): Analyze
856         dimension of formals with default expressions in subprogram
857         specification.
858         * sem_ch8.adb (Analyze_Expanded_Name): Analyze dimension of
859         expanded names.
860         (Find_Selected_Component): Analyze dimension of selected component.
861         * sem_dim.adb: Several dimension error messages reformatting.
862         (Dimensions_Msg_Of): New flag Description_Needed in order to
863         differentiate two different sort of dimension error messages.
864         (Dim_Warning_For_Numeric_Literal): New routine.
865         (Exists): New routine.
866         (Move_Dimensions): Routine spec moved to spec file.
867         * sem_dim.ads (String_From_Numeric_Literal): New routine.
868         (Analyze_Dimension): Analyze dimension only when the
869         node comes from source.  Dimension analysis for expanded names added.
870         (Analyze_Dimension_Array_Aggregate): New routine.
871         (Analyze_Dimension_Call): New routine.
872         (Analyze_Dimension_Component_Declaration): Warning if default
873         expression is a numeric literal.
874         (Analyze_Dimension_Extension_Or_Record_Aggregate): New routine.
875         (Analyze_Dimension_Formals): New routine.
876         (Analyze_Dimension_Object_Declaration): Warning if default
877         expression is a numeric literal.
878         (Symbol_Of): Return either the dimension subtype symbol or the
879         dimension symbol built by From_Dim_To_Str_Of_Unit_Symbols.
880         * sem_dim.ads (Analyze_Dimension_Array_Aggregate): New routine.
881         (Analyze_Dimension_Call): New routine.
882         (Analyze_Dimension_Extension_Or_Record_Aggregate): New routine.
883         (Analyze_Dimension_Formals): New routine.
884         (Move_Dimensions): Moved from sem_dim.adb.
885         * s-dimmks.ads: Turn off the warnings for dimensioned object
886         declaration.  Dimensioned subtypes sorted in alphabetical
887         order. New subtypes Area, Speed, Volume.
888         * s-dmotpr.ads: Turn off the warnings for dimensioned object
889         declaration.
890         * sem_res.adb (Resolve_Call): Analyze dimension for calls.
892 2012-10-01  Thomas Quinot  <quinot@adacore.com>
894         * Make-generated.in: Minor cleanup of all targets: use
895         MOVE_IF_CHANGE to put generated files in place, to avoid useless
896         recompilations.
898 2012-10-01  Javier Miranda  <miranda@adacore.com>
900         * exp_disp.adb (Expand_Dispatching_Call): For functions returning
901         interface types add an implicit conversion to the returned object
902         to force the displacement of the pointer to the returned object
903         to reference the corresponding secondary dispatch table. This
904         is needed to handle well combined calls involving secondary
905         dispatch tables (for example Obj.Prim1.Prim2).
906         * exp_ch4.adb (Expand_Allocator_Expression): Declare internal
907         access type as access to constant or access to variable depending
908         on the context. Found working in this ticket.
910 2012-10-01  Ed Schonberg  <schonberg@adacore.com>
912         * checks.adb (Apply_Predicate_Check): Do not apply check to
913         actual of predicate checking procedure, to prevent infinite
914         recursion.
916 2012-10-01  Arnaud Charlet  <charlet@adacore.com>
918         * gcc-interface/Make-lang.in: Update dependencies.
919         (GCC_LINK): Add -static-libstdc++.
921 2012-10-01  Arnaud Charlet  <charlet@adacore.com>
923         * a-catizo.adb, a-stwiun.adb, a-cdlili.adb, a-cihama.adb, a-direct.adb,
924         a-coinve.adb, a-calend.adb, a-ciorse.adb, a-coorma.adb, a-cfdlli.adb,
925         a-stzunb-shared.adb, a-cfhase.adb, bindgen.adb, ceinfo.adb, a-tags.adb,
926         einfo.adb, checks.adb, eval_fat.adb, a-cborma.adb, a-stwifi.adb,
927         a-tifiio.adb, a-textio.adb, a-cidlli.adb, a-strunb-shared.adb,
928         a-cimutr.adb, a-calcon.adb, a-exexpr-gcc.adb, a-ciormu.adb,
929         a-stzunb.adb, a-stzsea.adb, a-ngelfu.adb, a-stzfix.adb,
930         a-cihase.adb, a-cohama.adb, a-exetim-posix.adb, a-dirval-vms.adb,
931         a-caldel-vms.adb, a-coorse.adb, errout.adb,
932         a-except.adb, butil.adb, a-dirval-mingw.adb, a-cforma.adb,
933         a-except-2005.adb, a-wtedit.adb, cstand.adb, a-stwiun-shared.adb,
934         a-cbhama.adb, a-direio.adb, clean.adb, a-cborse.adb, back_end.adb,
935         binde.adb, a-exexda.adb, a-comutr.adb, a-ciorma.adb, a-cobove.adb,
936         a-coormu.adb, a-teioed.adb, a-convec.adb, a-wtenau.adb, exp_aggr.adb,
937         a-ztedit.adb, a-cohase.adb, a-exetim-mingw.adb, bcheck.adb,
938         a-dynpri.adb, a-cfhama.adb, a-calfor.adb, a-cbdlli.adb,
939         a-crdlli.adb, a-cbmutr.adb, a-sequio.adb, a-ngcoar.adb, a-cforse.adb,
940         a-strunb.adb, a-calend-vms.adb, a-clrefi.adb, a-cofove.adb,
941         a-ztenau.adb, a-strfix.adb, a-cbhase.adb, a-stzsup.adb: Minor
942         reformatting.
944 2012-10-01  Vincent Pucci  <pucci@adacore.com>
946         * s-gearop.adb (Vector_Matrix_Product): Dimensions check fixed. Index
947         of Left in S evaluation fixed.
949 2012-10-01  Javier Miranda  <miranda@adacore.com>
951         * sem_ch3.adb (Analyze_Declarations): Avoid
952         premature freezing caused by the internally generated subprogram
953         _postconditions.
954         * checks.adb (Expr_Known_Valid): Float literals are assumed to be valid
955         in VM targets.
957 2012-10-01  Thomas Quinot  <quinot@adacore.com>
959         * sinput.ads, sinput.adb, sinput-l.adb sinput-c.adb (Sinput): New
960         Instances table, tracking all generic instantiations. Source file
961         attribute Instance replaces previous Instantiation attribute with an
962         index into the Instances table.
963         (Iterate_On_Instances): New generic procedure.
964         (Create_Instantiation_Source): Record instantiations in Instances.
965         (Tree_Read, Tree_Write): Read/write the instance table.
966         * scils.ads, scos.adb (SCO_Instance_Table): New table, contains
967         information copied from Sinput.Instance_Table, but self-contained
968         within the SCO data structures.
969         * par_sco.ads, par_sco.adb (To_Source_Location): Move to library level.
970         (Record_Instance): New subprogram, used by...
971         (Populate_SCO_Instance_Table): New subprogram to fill
972         the SCO instance table from the Sinput one (called by SCO_Output).
973         * opt.ads (Generate_SCO_Instance_Table): New option.
974         * put_scos.adb (Write_Instance_Table): New subprogram, used by...
975         (Put_SCOs): Dump the instance table at the end of SCO information
976         if requested.
977         * get_scos.adb (Get_SCOs): Read SCO_Instance_Table.
978         * types.h: Add declaration for Instance_Id.
979         * back_end.adb (Call_Back_End): Pass instance ids in source file
980         information table.
981         (Scan_Back_End_Switches): -fdebug-instances sets
982         Opt.Generate_SCO_Instance_Table.
983         * gcc-interface/gigi.h: File_Info_Type includes instance id.
984         * gcc-interface/trans.c: Under -fdebug-instances, set instance
985         id in line map from same in file info.
987 2012-10-01  Thomas Quinot  <quinot@adacore.com>
989         * sem_elab.adb: Minor reformatting
990         (Check_Elab_Call): Minor fix to debugging code
991         (add special circuit for the valid case where a 'Access attribute
992         reference is passed to Check_Elab_Call).
994 2012-10-01  Thomas Quinot  <quinot@adacore.com>
996         * exp_ch3.adb: Minor reformatting.
998 2012-10-01  Ed Schonberg  <schonberg@adacore.com>
1000         * exp_ch3.ads (Build_Array_Invariant_Proc): moved to body.
1001         * exp_ch3.adb (Build_Array_Invariant_Proc,
1002         Build_Record_Invariant_Proc): transform into functions.
1003         (Insert_Component_Invariant_Checks): for composite types that have
1004         components with specified invariants, build a checking procedure,
1005         and make into the invariant procedure of the composite type,
1006         or incorporate it into the user- defined invariant procedure if
1007         one has been created.
1008         * sem_ch3.adb (Array_Type_Declaration): Checking for invariants
1009         on the component type is defered to the expander.
1011 2012-10-01  Thomas Quinot  <quinot@adacore.com>
1013         * xsnamest.adb, namet.h, sem_ch10.adb, s-oscons-tmplt.c,
1014         xoscons.adb: Minor reformatting.
1016 2012-10-01  Hristian Kirtchev  <kirtchev@adacore.com>
1018         * checks.adb (Apply_Parameter_Aliasing_And_Validity_Checks):
1019         Do not process subprogram renaminds because a) those cannot
1020         have PPC pragmas b) the renamed entity already has the PPCs.
1021         (Build_PPC_Pragma): Prepend a PPC pragma for consistency with
1022         Process_PPCs.
1023         * sem_ch6.adb (Last_Implicit_Declaration): Removed.
1024         (Process_PPCs): Insert a post condition body at the start of the
1025         declarative region of the related subprogram. This way the body
1026         will not freeze anything it shouldn't.
1028 2012-10-01  Robert Dewar  <dewar@adacore.com>
1030         * freeze.adb, sem_ch6.adb, opt.ads, sem_ch13.adb,
1031         exp_ch3.adb: Minor reformatting.
1033 2012-10-01  Hristian Kirtchev  <kirtchev@adacore.com>
1035         * checks.adb (Build_PPC_Pragma): A PPC pragma can now be properly
1036         associated with a subprogram body.
1038 2012-10-01  Ed Schonberg  <schonberg@adacore.com>
1040         * aspects.ads: Type_Invariant'class is a valid aspect.
1041         * sem_ch6.adb (Is_Public_Subprogram_For): with the exception of
1042         initialization procedures, subprograms that do not come from
1043         source are not public for the purpose of invariant checking.
1044         * sem_ch13.adb (Build_Invariant_Procedure): Handle properly the
1045         case of a non-private type in a package without a private part,
1046         when the type inherits invariants from its ancestor.
1048 2012-10-01  Ed Schonberg  <schonberg@adacore.com>
1050         * exp_ch3.adb (Build_Record_Invariant_Proc): new procedure to
1051         generate a checking procedure for record types that may have
1052         components whose types have type invariants declared.
1054 2012-10-01  Vincent Pucci  <pucci@adacore.com>
1056         * system-solaris-sparcv9.ads, system-mingw.ads, system-vms_64.ads: Flag
1057         Support_Atomic_Primitives set to True.
1059 2012-10-01  Robert Dewar  <dewar@adacore.com>
1061         * impunit.adb: Ada.Locales is a language defined unit.
1063 2012-10-01  Hristian Kirtchev  <kirtchev@adacore.com>
1065         * checks.adb (Apply_Parameter_Aliasing_Checks): Removed.
1066         (Apply_Parameter_Aliasing_And_Validity_Checks): New routine.
1067         (Apply_Parameter_Validity_Checks): Removed.
1068         * checks.ads (Apply_Parameter_Aliasing_Checks): Removed.
1069         (Apply_Parameter_Aliasing_And_Validity_Checks): New routine.
1070         (Apply_Parameter_Validity_Checks): Removed.
1071         * exp_ch6.adb (Expand_Call): Remove the generation of parameter
1072         aliasing checks.
1073         * freeze.adb: Remove with and use clauses for Validsw.
1074         (Freeze_Entity): Update the guard and generation of aliasing
1075         and scalar initialization checks for subprogram parameters.
1076         * opt.ads: Add new flags Check_Aliasing_Of_Parameters and
1077         Check_Validity_Of_Parameters along with comments on usage.
1078         * sem_attr.adb (Analyze_Attribute): Pragma Overlaps_Storage is
1079         no longer an Ada 2012 feature.
1080         * sem_ch4.adb: Remove with and use clauses for Checks and Validsw.
1081         (Analyze_Call): Remove the generation of aliasing checks for
1082         subprogram parameters.
1083         * sem_ch13.adb: Remove with and use clauses for Validsw.
1084         (Analyze_Aspect_Specifications): Remove the generation of scalar
1085         initialization checks.
1086         * switch-c.adb (Scan_Front_End_Switches): Add processing for
1087         -gnateA and -gnateV.
1088         * usage.adb (Usage): Add information on switches -gnateA and
1089         -gnateV. Remove information on validity switches 'l', 'L',
1090         'v' and 'V'.
1091         * validsw.adb (Reset_Validity_Check_Options): Remove the
1092         reset of flags Validity_Check_Non_Overlapping_Params
1093         and Validity_Check_Valid_Scalars_On_Params.
1094         (Save_Validity_Check_Options): Remove the processing
1095         for flags Validity_Check_Non_Overlapping_Params
1096         and Validity_Check_Valid_Scalars_On_Params.
1097         (Set_Validity_Check_Options): Remove the processing
1098         for flags Validity_Check_Non_Overlapping_Params and
1099         Validity_Check_Valid_Scalars_On_Params.
1100         * validsw.ads: Remove flags Validity_Check_Non_Overlapping_Params
1101         and Validity_Check_Valid_Scalars_On_Params along with their
1102         comments on usage.
1104 2012-10-01  Yannick Moy  <moy@adacore.com>
1106         * sem_ch13.adb (Add_Invariants): Analyze the invariant expression
1107         as an assertion expression.
1108         * sem_ch3.adb / sem_ch3.ads (Preanalyze_Assert_Expression):
1109         New procedure that wraps a call to Preanalyze_Spec_Expression
1110         for assertion expressions, so that In_Assertion_Expr can be
1111         properly adjusted.
1112         * sem_prag.adb (Analyze_PPC_In_Decl_Part
1113         Check_Precondition_Postcondition Preanalyze_CTC_Args): Call the
1114         new Preanalyze_Assert_Expression.
1116 2012-10-01  Robert Dewar  <dewar@adacore.com>
1118         * checks.ads: Minor reformatting.
1120 2012-10-01  Yannick Moy  <moy@adacore.com>
1122         * types.ads, sem_prag.adb, sem.ads: Correct minor typos in comments.
1124 2012-10-01  Vincent Celier  <celier@adacore.com>
1126         * make.adb (Scan_Make_Arg): Only test for "vP" of the option
1127         includes at least 3 characters.
1128         * gnatcmd.adb (GNATCmd): Ditto.
1130 2012-10-01  Eric Botcazou  <ebotcazou@adacore.com>
1132         * exp_ch7.adb, sinfo.ads: Add comments.
1134 2012-10-01  Robert Dewar  <dewar@adacore.com>
1136         * checks.adb: Remove reference to Enable_Overflow_Checks Use
1137         Suppress_Options rather than Scope_Suppress.
1138         * gnat1drv.adb (Adjust_Global_Switches): Handle new overflow
1139         settings (Adjust_Global_Switches): Initialize Scope_Suppress
1140         from Suppress_Options.
1141         * opt.adb: Remove Enable_Overflow_Checks (use Suppress_Options
1142         instead).
1143         * opt.ads: Remove Overflow_Checks_Unsuppressed (not used)
1144         Remove Enable_Overflow_Checks (use Suppress_Options instead)
1145         Suppress_Options is now current setting (replaces Scope_Suppress).
1146         * osint.adb (Initialize): Deal with initializing overflow
1147         checking.
1148         * par-prag.adb: Add dummy entry for pragma Overflow_Checks.
1149         * sem.adb (Semantics): Save and restore In_Assertion_Expr Use
1150         Suppress_Options instead of Scope_Suppress.
1151         * sem.ads (In_Assertion_Expr): New flag (Scope_Suppress):
1152         Removed, use Suppress_Options instead.
1153         * sem_eval.adb (Compile_Time_Compare): Return Unknown in
1154         preanalysis mode.
1155         * sem_prag.adb (Process_Suppress_Unsuppress): Setting of
1156         Overflow_Checks_Unsuppressed removed (not used anywhere!)
1157         (Analyze_Pragma, case Check): Set In_Assertion_Expression
1158         (Analyze_Pragma, case Overflow_Checks): Implement new pragma
1159         * snames.ads-tmpl: Add names needed for handling pragma
1160         Overflow_Checks
1161         * switch-c.adb (Scan_Front_End_Switches) Handle -gnato? and
1162         -gnato?? where ? is 0-3
1163         * types.ads: Updates and fixes to comment on Suppress_Record.
1165 2012-10-01  Vincent Celier  <celier@adacore.com>
1167         * prj-part.adb (Parse): Remove incorrect comment about checking
1168         imported non extending projects from and "extending all"
1169         one. Minor correction.
1171 2012-10-01  Robert Dewar  <dewar@adacore.com>
1173         * make.adb, exp_ch3.adb: Minor reformatting.
1175 2012-10-01  Hristian Kirtchev  <kirtchev@adacore.com>
1177         * validsw.adb (Save_Validity_Check_Options): Do not set
1178         Validity_Check_Non_Overlapping_Params and
1179         Validity_Check_Valid_Scalars_On_Params when -gnatVa is present
1180         because the related checks are deemed too aggressive.
1182 2012-10-01  Ed Schonberg  <schonberg@adacore.com>
1184         * sem_util.ads sem_util.adb (Check_Internal_Protected_Use):
1185         reject use of protected procedure or entry within the body of
1186         a protected function of the same protected type, when usage is
1187         a call, an actual in an instantiation, a or prefix of 'Access.
1188         * sem_ch8.adb (Analyze_Subprogram_Renaming): Verify that target
1189         object in renaming of protected procedure is a variable, and
1190         apply Check_Internal_Protected_Use.
1191         * sem_res.adb (Analyze_Call, Analyze_Entry_Call): apply
1192         Check_Internal_Protected_Use rather than on-line code.
1193         * sem_attr.adb (Analyze_Access_Attribute): Verify that target
1194         object in accsss to protected procedure is a variable, and apply
1195         Check_Internal_Protected_Use.
1197 2012-10-01  Gary Dismukes  <dismukes@adacore.com>
1199         * sem_ch4.adb (Find_Equality_Types.Try_One_Interp): Exclude the
1200         predefined interpretation from consideration if it's for a "/="
1201         operator of a tagged type. This will allow Analyze_Equality_Op to
1202         rewrite the "/=" as a logical negation of a call to the appropriate
1203         dispatching equality function. This needs to be done during
1204         analysis rather than expansion for the benefit of ASIS, which
1205         otherwise gets the unresolved N_Op_Ne operator from Standard.
1207 2012-10-01  Thomas Quinot  <quinot@adacore.com>
1209         * gnatcmd.adb, make.adb (Scan_Make_Arg, Inspect_Switches): Recognize
1210         and reject an invalid parameter passed to -vP.
1212 2012-10-01  Yannick Moy  <moy@adacore.com>
1214         * sem_warn.adb (Check_Infinite_Loop_Warning/Test_Ref): Improve
1215         the detection of modifications to the loop variable by noting
1216         that, if the type of variable is elementary and the condition
1217         does not contain a function call, then the condition cannot be
1218         modified by side-effects from a procedure call.
1220 2012-10-01  Robert Dewar  <dewar@adacore.com>
1222         * checks.adb: Add comments.
1224 2012-10-01  Javier Miranda  <miranda@adacore.com>
1226         * exp_ch3.adb (Expand_N_Object_Declaration): Improve condition catching
1227         never-ending recursion. The previous condition erroneously disabled
1228         silently the expansion of the class-wide interface object
1229         initialization in cases not involving the recursion.
1231 2012-10-01  Thomas Quinot  <quinot@adacore.com>
1233         * make.adb: Minor documentation fix: error messages are sent to
1234         stderr, not stdout.
1236 2012-10-01  Hristian Kirtchev  <kirtchev@adacore.com>
1238         * checks.ads, checks.adb (Apply_Parameter_Aliasing_Checks): New routine.
1239         (Apply_Parameter_Validity_Checks): New routines.
1240         * exp_ch6.adb (Expand_Call): Add aliasing checks to detect
1241         overlapping objects.
1242         * freeze.adb: Add with and use clauses for Checks and Validsw.
1243         (Freeze_Entity): Add checks to detect proper initialization
1244         of scalars.
1245         * sem_ch4.adb: Add with and use clauses for Checks and Validsw.
1246         (Analyze_Call): Add aliasing checks to detect overlapping objects.
1247         * sem_ch13.adb: Add with and use clauses for Validsw.
1248         (Analyze_Aspect_Specifications): Add checks to detect proper
1249         initialization of scalars.
1250         * sem_prag.adb (Chain_PPC): Correct the extraction of the
1251         subprogram name.
1252         * sem_util.adb (Is_Object_Reference): Attribute 'Result now
1253         produces an object.
1254         * usage.adb (Usage): Add usage lines for validity switches 'l',
1255         'L', 'v' and 'V'.
1256         * validsw.adb (Reset_Validity_Check_Options): Include
1257         processing for flags Validity_Check_Non_Overlapping_Params and
1258         Validity_Check_Valid_Scalars_On_Params. Code reformatting.
1259         (Save_Validity_Check_Options): Include processing
1260         for flags Validity_Check_Non_Overlapping_Params
1261         and Validity_Check_Valid_Scalars_On_Params.
1262         (Set_Validity_Check_Options): Add processing for validity switches
1263         'a', 'l', 'L', 'n', 'v' and 'V'. Code reformatting.
1264         * validsw.ads: Add new flags Validity_Check_Non_Overlapping_Params
1265         and Validity_Check_Valid_Scalars_On_Params along with comments
1266         on usage.
1268 2012-10-01  Thomas Quinot  <quinot@adacore.com>
1270         * namet.ads, xsnamest.adb, prj-env.adb, sem_warn.adb,
1271         errout.ads: Minor reformatting.
1272         * prj-part.adb: Add comment.
1274 2012-10-01  Robert Dewar  <dewar@adacore.com>
1276         * sinfo.ads, exp_aggr.adb, sem_ch13.adb: Minor reformatting.
1278 2012-10-01  Ed Schonberg  <schonberg@adacore.com>
1280         * sem_aggr.adb (Resolve_Array_Aggregate): Handle properly
1281         component associations given by subtypes that have static
1282         predicates.  Improve error message for overlapping ranges in
1283         array aggregates.
1285 2012-10-01  Pascal Obry  <obry@adacore.com>
1287         * snames.ads-tmpl (Name_Link_Lib_Subdir): New constant.
1289 2012-10-01  Ed Schonberg  <schonberg@adacore.com>
1291         * sem_ch9.adb (Analyze_Requeue): The target of a requeue
1292         statement on a protected entry must be a variable. This is part
1293         of AI05-0225.
1295 2012-09-26  Ian Lance Taylor  <iant@google.com>
1297         * gcc-interface/Makefile.in (LIBBACKTRACE): New variable.
1298         (LIBS): Add $(LIBBACKTRACE).
1299         (LIBDEPS): Add $(LIBBACKTRACE).
1300         (TOOLS_LIBS): Add ../../../libbacktrace/.libs/libbacktrace.a.
1302 2012-09-10  Diego Novillo  <dnovillo@google.com>
1304         * gcc-interface/decl.c (build_subst_list): Adjust call to VEC_safe_push.
1305         (build_variant_list): Likewise.
1306         * gcc-interface/utils.c (convert): Adjust calls to VEC_quick_push.
1308 2012-09-07  Eric Botcazou  <ebotcazou@adacore.com>
1310         * gcc-interface/trans.c (Loop_Statement_to_gnu): Revert to using
1311         size_type_node instead of sizetype.
1313 2012-08-19  Eric Botcazou  <ebotcazou@adacore.com>
1315         * layout.adb (Set_Elem_Alignment): Cap the alignment of access types
1316         to that of a regular access type for non-strict-alignment platforms.
1317         * gcc-interface/utils.c (finish_fat_pointer_type): Do not set the
1318         alignment for non-strict-alignment platforms.
1320 2012-08-19  Eric Botcazou  <ebotcazou@adacore.com>
1322         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Use proper
1323         dummy type for the temporary COMPONENT_REF built for a derived tagged
1324         type with discriminant.
1326 2012-08-14   Diego Novillo  <dnovillo@google.com>
1328         Merge from cxx-conversion branch.  Re-implement VEC in C++.
1330         * gcc-interface/trans.c (finalize_nrv_unc_r): Adjust VEC_index usage.
1331         * gcc-interface/utils.c (convert): Likewise.
1332         (remove_conversions): Likewise.
1333         * gcc-interface/utils2.c (compare_fat_pointers): Likewise.
1334         (build_unary_op): Likewise.
1335         (gnat_stabilize_reference): Likewise.
1337 2012-08-06  Jose Ruiz  <ruiz@adacore.com>
1339         * gcc-interface/Makefile.in: Add support for 32-bit VxWorks for SPARC
1340         in kernel mode.
1342 2012-08-06  Arnaud Charlet  <charlet@adacore.com>
1344         * prj-attr.adb (Register_New_Package): Add missing blank.
1346 2012-08-06  Ed Schonberg  <schonberg@adacore.com>
1348         * exp_aggr.adb (Is_Two_Dim_Packed_Array): New predicate,
1349         used when computing maximum size allowable to construct static
1350         aggregate.
1352 2012-08-06  Vincent Pucci  <pucci@adacore.com>
1354         * freeze.adb (Freeze_Entity): Inherit_Aspects_At_Freeze_Point
1355         calls added for derived types and subtypes.
1356         * sem_aux.adb, sem_aux.ads (Get_Rep_Item, Get_Rep_Pragma,
1357         Has_Rep_Pragma): New routines.
1358         * sem_ch13.ads (Inherit_Aspects_At_Freeze_Point): New routine.
1359         * sem_ch13.adb (Analyze_Aspect_Specifications): Error message
1360         for aspect Lock_Free fixed.
1361         (Inherits_Aspects_At_Freeze_Point): New routine.
1362         * sem_ch3.adb: Several flag settings removed since inheritance
1363         of aspects must be performed at freeze point.
1365 2012-08-06  Thomas Quinot  <quinot@adacore.com>
1367         * s-oscons-tmplt.c: Fix s-oscons.ads formatting on VxWorks.
1369 2012-08-06  Vincent Pucci  <pucci@adacore.com>
1371         * sem_dim.adb (Analyze_Dimension_Binary_Op): Issue an error message
1372         for unknown exponent at compile-time.
1374 2012-08-06  Gary Dismukes  <dismukes@adacore.com>
1376         * sem_eval.ads (Compile_Time_Known_Value_Or_Aggr): Enhance
1377         comment to make it clear that the aggregate's evaluation might
1378         still involve run-time checks even though the aggregate is
1379         considered known at compile time.
1380         * sinfo.ads (Compile_Time_Known_Aggregate): Correct comment to
1381         refer to Exp_Aggr instead of Sem_Aggr.
1383 2012-08-06  Robert Dewar  <dewar@adacore.com>
1385         * xoscons.adb: Minor code reorganization (remove unused variable
1386         E at line 331).
1387         * g-sercom.ads, exp_attr.adb: Minor reformatting.
1388         * sinfo.adb, sinfo.ads: Minor cleanup, remove unused flag
1389         Static_Processing_OK.
1391 2012-08-06  Ed Schonberg  <schonberg@adacore.com>
1393         * sem_ch3.adb (Build_Derived_Concurrent_Type): Copy discriminant
1394         constraint when building a constrained subtype, to prevent
1395         undesirable tree sharing betweeb geberated subtype and derived
1396         type definition.
1398 2012-08-06  Thomas Quinot  <quinot@adacore.com>
1400         * g-sercom-mingw.adb, s-oscons-tmplt.c: Add missing constants
1401         on Windows.
1403 2012-08-06  Sergey Rybin  <rybin@adacore.com frybin>
1405         * tree_io.ads: Update ASIS_Version_Number because of the tree fix
1406         for discriminant constraints for concurrent types.
1408 2012-08-06  Thomas Quinot  <quinot@adacore.com>
1410         * sem_ch4.adb: Minor reformatting.
1412 2012-08-06  Thomas Quinot  <quinot@adacore.com>
1414         * s-oscons-tmplt.c, xoscons.adb: Per the Single UNIX Specification,
1415         types cc_t, speed_t, and tcflag_t defined in <termios.h> all are
1416         unsigned types. Add required special handling to have their correct
1417         unsigned values in s-oscons.ads.
1419 2012-08-06  Thomas Quinot  <quinot@adacore.com>
1421         * par-ch13.adb: Minor reformatting.
1423 2012-08-06  Thomas Quinot  <quinot@adacore.com>
1425         * g-sercom.adb, g-sercom.ads, g-sercom-mingw.adb, g-sercom-linux.adb
1426         (Set): Add Local and Flow_Control settings.
1428 2012-08-06  Ed Schonberg  <schonberg@adacore.com>
1430         * exp_attr.adb: Suppress saving of 'Old if assertions are not
1431         enabled.
1433 2012-08-06  Yannick Moy  <moy@adacore.com>
1435         * sem_ch4.adb (Analyze_Selected_Component): Issue an error in
1436         Alfa mode for component not present.
1438 2012-08-06  Thomas Quinot  <quinot@adacore.com>
1440         * exp_ch7.adb (Insert_Actions_In_Scope_Around): Do not
1441         use a renaming of Scope_Stack.Table (Scope_Stack.Last), as
1442         Process_Transient_Object may introduce new scopes and cause
1443         Scope_Stack.Table to be reallocated.
1445 2012-08-06  Robert Dewar  <dewar@adacore.com>
1447         * exp_util.adb, switch-c.adb, inline.ads, sem_ch10.adb, types.ads,
1448         checks.adb, sem_prag.adb, sem.adb, sem.ads, sem_res.adb, sem_attr.adb,
1449         gnat1drv.adb, exp_ch4.adb, exp_ch6.adb, opt.ads, osint.adb: Implement
1450         extended overflow checks (step 1).
1451         (Overflow_Check_Type, Suppress_Record, Suppress_All): New types.
1452         (Suppress_Array): Extended to include switches to control extended
1453         overflow checking (and renamed to Suppress_Record).
1454         Update all uses of Suppress_Array.
1456 2012-08-06  Thomas Quinot  <quinot@adacore.com>
1458         * makeutl.ads: Minor documentation fix.
1460 2012-08-06  Thomas Quinot  <quinot@adacore.com>
1462         * exp_ch7.adb: Minor reformatting.
1464 2012-08-06  Geert Bosch  <bosch@adacore.com>
1466         * a-ngelfu.adb: Change obsolete comment that this is a non-strict
1467         implementation.
1469 2012-08-06  Steve Baird  <baird@adacore.com>
1471         * exp_ch7.adb (Build_Finalizer.Process_Object_Declaration): If
1472         CodePeer_Mode = True then omit exception handlers for finalization calls
1474 2012-08-06  Robert Dewar  <dewar@adacore.com>
1476         * exp_aggr.adb: Minor reformatting.
1478 2012-08-06  Robert Dewar  <dewar@adacore.com>
1480         * sem_ch6.adb: Remove useless flag Body_Deleted.
1482 2012-08-06  Thomas Quinot  <quinot@adacore.com>
1484         * sinfo.ads (End_Span): Change default from No_Uint to Uint_0,
1485         as this is what all usage occurrences of this attribute are
1486         expecting.
1487         * uintp.adb (UI_To_Int): Add assertion to guard against calling
1488         with No_Uint.
1490 2012-08-06  Vincent Pucci  <pucci@adacore.com>
1492         PR ada/54125
1493         * exp_attr.adb (Expand_N_Attribute_Reference): Expand new
1494         Atomic_Always_Lock_Free attribute.
1495         * sem_attr.adb (Analyze_Attribute): Analyze new
1496         Atomic_Always_Lock_Free attribute.
1497         (Eval_Attribute): Nothing to do with new Atomic_Always_Lock_Free
1498         attribute.
1499         * sem_ch9.adb (Allows_Lock_Free_Implementation):
1500         Support_Atomic_Primitives check replaces previous erroneous
1501         size check.
1502         * sem_util.adb, sem_util.ads (Support_Atomic_Primitives):
1503         New routine.
1504         * snames.ads-tmpl: New name Name_Atomic_Always_Lock_Free and
1505         new attribute Attribute_Atomic_Always_Lock_Free defined.
1506         * s-atopri.adb: Support_Atomic_Primitives checks replaced by
1507         Atomic_Always_Lock_Free queries.
1508         * system-aix64.ads, system-aix.ads, system-darwin-ppc.ads,
1509         system-hpux.ads, system-linux-alpha.ads, system-linux-hppa.ads,
1510         system-linux-ppc.ads, system-linux-s390.ads,
1511         system-linux-s390x.ads, system-linux-sh4.ads,
1512         system-linux-sparc.ads, system-lynxos178-ppc.ads,
1513         system-lynxos-ppc.ads, system-mingw.ads,
1514         system-vxworks-arm.ads, system-solaris-sparc.ads,
1515         system-solaris-sparcv9.ads, system-vms_64.ads,
1516         system-vxworks-m68k.ads, system-vxworks-mips.ads,
1517         system-vxworks-ppc.ads, system-vxworks-sparcv9.ads: Flag
1518         Support_Atomic_Primitives removed.
1520 2012-08-06  Hristian Kirtchev  <kirtchev@adacore.com>
1522         * sem_mech.adb (Set_Mechanisms): OUT and IN OUT parameters are
1523         now unconditionally passed by reference. IN parameters subject
1524         to convention C_Pass_By_Copy are passed by copy, otherwise they
1525         are passed by reference.
1527 2012-08-06  Ed Schonberg  <schonberg@adacore.com>
1529         * sem_ch3.adb (Analyze_Object_Declaration): According to
1530         AI95-0303, protected objects with interrupt handlers can be
1531         declared in nested scopes. This is a binding interpretation,
1532         and thus applies to all versions of the compiler.
1534 2012-08-06  Robert Dewar  <dewar@adacore.com>
1536         * frontend.adb, exp_aggr.adb: Minor reformatting.
1538 2012-08-06  Thomas Quinot  <quinot@adacore.com>
1540         * par-endh.adb: Minor reformatting.
1542 2012-08-06  Hristian Kirtchev  <kirtchev@adacore.com>
1544         * exp_ch7.adb (Process_Transient_Objects): Remove obsolete loop
1545         processing related to array initialization. The expansion of
1546         loops already contains a mechanism to detect controlled objects
1547         generated by expansion and introduce a block around the loop
1548         statements for finalization purposes.
1550 2012-08-06  Vincent Pucci  <pucci@adacore.com>
1552         * sem_ch13.adb: Current scope must be within
1553         or same as the scope of the entity while analysing aspect
1554         specifications at freeze point.
1556 2012-08-06  Thomas Quinot  <quinot@adacore.com>
1558         * par_sco.adb: Add note about dubious SCO for TERMINATE
1559         alternative.
1560         * sem_ch8.adb, exp_ch11.adb: Minor reformatting.
1562 2012-08-06  Ed Schonberg  <schonberg@adacore.com>
1564         * exp_aggr.adb (Two_Dim_Packed_Array_Handled): New procedure to
1565         transform an aggregate for a packed two-dimensional array into
1566         a one-dimensional array of constant values, in order to avoid
1567         the generation of component-by-component assignments.
1569 2012-08-06  Thomas Quinot  <quinot@adacore.com>
1571         * frontend.adb: Do not attempt to process deferred configuration
1572         pragmas if the main unit failed to load, to avoid cascaded
1573         inconsistencies that can lead to a compiler crash.
1575 2012-08-06  Vincent Pucci  <pucci@adacore.com>
1577         * s-atopri.adb: Minor reformatting.
1579 2012-08-06  Arnaud Charlet  <charlet@adacore.com>
1581         * gnat-style.texi: Clarify that all subprograms should be
1582         documented. Minor rewording.
1584 2012-08-06  Robert Dewar  <dewar@adacore.com>
1586         * aspects.ads: Define Aspect_Id_Exclude_No_Aspect.
1587         * par-ch13.adb, restrict.adb: Use Aspect_Id_Exclude_No_Aspect to
1588         simplify code.
1590 2012-08-06  Yannick Moy  <moy@adacore.com>
1592         * gnat-style.texi: Update style guide for declarations.
1594 2012-08-06  Yannick Moy  <moy@adacore.com>
1596         * sem_attr.adb (Analyze_Attribute): In the case for 'Old,
1597         skip a special expansion which is not needed in Alfa mode.
1599 2012-08-06  Yannick Moy  <moy@adacore.com>
1601         * sem_ch5.adb (Analyze_Iterator_Specification): Do not perform
1602         an expansion of the iterator in Alfa mode.
1604 2012-08-06  Robert Dewar  <dewar@adacore.com>
1606         * s-oscons-tmplt.c, sem_ch9.adb, osint.adb: Minor reformatting.
1608 2012-08-06  Hristian Kirtchev  <kirtchev@adacore.com>
1610         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Remove obsolete
1611         Alfa-specific guard. The code is a leftover from an early
1612         implementation of iterators which is no longer in use.
1614 2012-08-06  Vincent Celier  <celier@adacore.com>
1616         * par-ch13.adb (Get_Aspect_Specifications): Do not consider
1617         No_Aspect when checking for a mispelled aspect.
1619 2012-08-06  Robert Dewar  <dewar@adacore.com>
1621         * s-htable.adb: Minor reformatting.
1623 2012-08-06  Thomas Quinot  <quinot@adacore.com>
1625         * s-oscons-tmplt.c, g-socket.adb (System.OS_Constants.Target_OS):
1626         Suppress warnings so that we don't have to do it at each usage.
1628 2012-08-06  Vincent Pucci  <pucci@adacore.com>
1630         * exp_ch9.adb (Build_Lock_Free_Unprotected_Subprogram_Body):
1631         Use of Known_Static_Esize instead of  Known_Esize and
1632         Known_Static_RM_Size instead of Known_RM_Size in order to
1633         properly call UI_To_Int. Don't check the size of the component
1634         type in case of generic.
1635         * sem_ch9.adb (Allows_Lock_Free_Implementation):
1636         Use of Known_Static_Esize instead of Known_Esize and
1637         Known_Static_RM_Size instead of Known_RM_Size in order to properly
1638         call UI_To_Int. Don't check the size of the component type in
1639         case of generic.
1641 2012-08-06  Hristian Kirtchev  <kirtchev@adacore.com>
1643         * checks.adb (Discrete_Range_Cond): Do not try to optimize on
1644         the assumption that the type of an expression can always fit in
1645         the target type of a conversion.
1647 2012-07-30  Robert Dewar  <dewar@adacore.com>
1649         * bindusg.adb: Clarify file in -A lines.
1651 2012-07-30  Robert Dewar  <dewar@adacore.com>
1653         * freeze.adb: Minor reformatting.
1655 2012-07-30  Robert Dewar  <dewar@adacore.com>
1657         * gnatcmd.adb, makeutl.adb, makeutl.ads: Minor code reorganization.
1659 2012-07-30  Vincent Pucci  <pucci@adacore.com>
1661         * exp_ch9.adb (Build_Lock_Free_Unprotected_Subprogram_Body): Minor
1662         reformatting.
1663         * sem_ch9.adb (Allows_Lock_Free_Implementation): Minor reformatting.
1664         Capture the correct error message in case of a quantified expression.
1666 2012-07-30  Thomas Quinot  <quinot@adacore.com>
1668         * g-socket.adb (Get_Socket_Option, Set_Socket_Option): On Windows, the
1669         value is a milliseconds count in a DWORD, not a struct timeval.
1671 2012-07-30  Hristian Kirtchev  <kirtchev@adacore.com>
1673         * sem_ch12.adb (Earlier): Add local variables T1 and T2. Minor code
1674         refactoring.
1676 2012-07-30  Thomas Quinot  <quinot@adacore.com>
1678         * gnatcmd.adb, make.adb, makeutl.adb, makeutl.ads
1679         (Test_If_Relative_Path): Rename to Ensure_Absolute_Path to better
1680         reflect what this subprogram does. Rename argument Including_L_Switch
1681         to For_Gnatbind, and also exempt -A from rewriting.
1682         * bindusg.adb: Document optional =file argument to gnatbind -A.
1684 2012-07-30  Ed Schonberg  <schonberg@adacore.com>
1686         * freeze.adb (Freeze_Entity): Do no apply restriction check on
1687         storage pools to access to subprogram types.
1689 2012-07-30  Robert Dewar  <dewar@adacore.com>
1691         * par_sco.adb, a-cihama.adb, a-coinve.adb, exp_ch7.adb, a-ciorse.adb,
1692         exp_ch9.adb, sem_dim.adb, par-ch13.adb, sem_ch9.adb, a-cidlli.adb,
1693         a-cimutr.adb, freeze.adb, a-ciormu.adb, sem_res.adb, sem_attr.adb,
1694         a-cihase.adb, exp_ch4.adb, sem_ch4.adb, a-ciorma.adb,
1695         s-tasinf-linux.ads, sem_ch13.adb, a-coinho.adb: Minor reformatting.
1696         Add comments.
1698 2012-07-30  Vincent Pucci  <pucci@adacore.com>
1700         * sem_ch9.adb (Allows_Lock_Free_Implementation): Restrict implicit
1701         dereferences of access values.
1703 2012-07-27  Iain Sandoe  <iain@codesourcery.com>
1705         * system-darwin-ppc64.ads: Add Support_Atomic_Primitives, set to True.
1707 2012-07-25  Eric Botcazou  <ebotcazou@adacore.com>
1709         * gcc-interface/utils2.c (gnat_stabilize_reference) <BIT_FIELD_REF>: Do
1710         not stabilize operand #1 and #2.
1712 2012-07-23  Tristan Gingold  <gingold@adacore.com>
1714         * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): Use
1715         End_Label sloc when possible for sloc of the TRY_CATCH_EXPR node.
1717 2012-07-23  Olivier Hainque  <hainque@adacore.com>
1719         * gcc-interface/Makefile.in: Adjust processing of Linker_Options for
1720         VxWorks.
1721         * gcc-interface/Make-lang.in: Update dependencies.
1723 2012-07-23  Arnaud Charlet  <charlet@adacore.com>
1725         * s-tasinf-linux.ads: Fix typo.
1727 2012-07-23  Thomas Quinot  <quinot@adacore.com>
1729         * exp_ch7.adb, switch-m.adb, exp_ch3.adb, freeze.adb: Minor reformatting
1731 2012-07-23  Ed Schonberg  <schonberg@adacore.com>
1733         * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): If original
1734         loop carries an identifier, preserve it when rewriting it as a
1735         standard loop to validate exit statements that may reference
1736         that name in the body of the loop.
1738 2012-07-23  Thomas Quinot  <quinot@adacore.com>
1740         * exp_ch9.adb: Minor code cleanup.
1742 2012-07-23  Ed Schonberg  <schonberg@adacore.com>
1744         * sem_ch4.adb (Analyze_Selected_Component): When checking for
1745         potential ambiguities with class-wide operations on synchronized
1746         types, attach the copied node properly to the tree, to prevent
1747         errors during expansion.
1749 2012-07-23  Yannick Moy  <moy@adacore.com>
1751         * sem_ch5.adb (Analyze_Loop_Statement): Make sure the loop body
1752         is analyzed in Alfa mode.
1754 2012-07-23  Ed Schonberg  <schonberg@adacore.com>
1756         * sem_res.adb: Adjust previous change.
1758 2012-07-23  Vincent Pucci  <pucci@adacore.com>
1760         * sem_ch9.adb (Allows_Lock_Free_Implementation): Flag
1761         Lock_Free_Given renames previous flag Complain. Description
1762         updated. Henceforth, catch every error messages issued by this
1763         routine when Lock_Free_Given is True.  Declaration restriction
1764         updated: No non-elementary parameter instead (even in parameter)
1765         New subprogram body restrictions implemented: No allocator,
1766         no address, import or export rep items, no delay statement,
1767         no goto statement, no quantified expression and no dereference
1768         of access value.
1770 2012-07-23  Hristian Kirtchev  <kirtchev@adacore.com>
1772         * checks.adb (Determine_Range): Add local variable Btyp. Handle
1773         the case where the base type of an enumeration subtype is
1774         private. Replace all occurrences of Base_Type with Btyp.
1775         * exp_attr.adb (Attribute_Valid): Handle the case where the
1776         base type of an enumeration subtype is private. Replace all
1777         occurrences of Base_Type with Btyp.
1778         * sem_util.adb (Get_Enum_Lit_From_Pos): Add local variable
1779         Btyp. Handle the case where the base type of an enumeration
1780         subtype is private. Replace all occurrences of Base_Type with
1781         Btyp.
1783 2012-07-23  Ed Schonberg  <schonberg@adacore.com>
1785         * par-ch6.adb (P_Mode): in Ada 2005, a mode indicator can apply
1786         to a formal object of an anonymous access type.
1788 2012-07-23  Ed Schonberg  <schonberg@adacore.com>
1790         * sem_ch4.adb (Try_Container_Indexing): A user-defined indexing
1791         aspect can have more than one index, e.g. to describe indexing
1792         of a multidimensional object.
1794 2012-07-23  Hristian Kirtchev  <kirtchev@adacore.com>
1796         * exp_ch4.adb (Apply_Accessibility_Check): Reimplemented. The check is
1797         now more complex and contains optional finalization part and mandatory
1798         deallocation part.
1800 2012-07-23  Gary Dismukes  <dismukes@adacore.com>
1802         * a-cihama.adb, a-cihase.adb, a-cimutr.adb, a-ciorma.adb, a-ciormu.adb,
1803         a-ciorse.adb, a-coinho.adb, a-coinve.adb, a-cidlli.adb: Unsuppress
1804         Accessibility_Check for Element_Type allocators.
1806 2012-07-23  Vasiliy Fofanov  <fofanov@adacore.com>
1808         * projects.texi: Fix typo.
1810 2012-07-23  Ed Schonberg  <schonberg@adacore.com>
1812         * sem_res.adb (Resolve_Explicit_Derenference): If prefix is
1813         overloaded, remove those interpretations whose designated type
1814         does not match the context, to avoid spurious ambiguities that
1815         may be caused by the Ada 2012 conversion rule for anonymous
1816         access types.
1818 2012-07-23  Vincent Celier  <celier@adacore.com>
1820         * g-spitbo.adb (Substr (String)): Return full string and do not
1821         raise exception when Start is 1 and Len is exactly the length
1822         of the string parameter.
1823         * g-spitbo.ads: Fix spelling error in the name of exception
1824         Index_Error.
1826 2012-07-23  Ed Schonberg  <schonberg@adacore.com>
1828         * par.adb: new subprogram Get_Aspect_Specifications.
1829         * par-ch6.adb (P_Subprogram): handle subprogram bodies with aspect
1830         specifications.
1831         * par-ch13.adb (Get_Aspect_Specifications): extracted from
1832         P_Aspect_Specifications. Collect aspect specifications in some
1833         legal context, but do not attach them to any declaration. Used
1834         when parsing subprogram declarations or bodies that include
1835         aspect specifications.
1836         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If aspects are
1837         present, analyze them, or reject them if the subprogram as a
1838         previous spec.
1840 2012-07-23  Vasiliy Fofanov  <fofanov@adacore.com>
1842         * gnat_ugn.texi: Omit section on other platforms/runtimes support
1843         in gnattest for vms version.
1845 2012-07-23  Ed Schonberg  <schonberg@adacore.com>
1847         * sem_ch13.adb (Analyze_Aspect_Specifications):
1848         Handle properly aspects that can be specified on a subprogram
1849         body: CPU, Priority, and Interrupt_Priority.
1851 2012-07-23  Claire Dross  <dross@adacore.com>
1853         * a-cfdlli.ads: Switch definition of Constant_Reference_Type
1854         and Empty_List.
1856 2012-07-23  Thomas Quinot  <quinot@adacore.com>
1858         * par_sco.adb (Process_Decisions.Output_Header): For the guard
1859         on an alternative in a SELECT statement, use the First_Sloc
1860         of the guard expression (not its topmost sloc) as the decision
1861         location, because this is what is referenced by dominance markers.
1863 2012-07-23  Hristian Kirtchev  <kirtchev@adacore.com>
1865         * exp_ch7.adb (Requires_Hooking): Examine the original expression
1866         of an object declaration node because a function call that
1867         returns on the secondary stack may have been rewritten into
1868         something else.
1870 2012-07-23  Vincent Pucci  <pucci@adacore.com>
1872         * sem_dim.adb (Analyze_Dimension_Has_Etype): For identifier, propagate
1873         dimension when entity is a non-dimensionless constant.
1874         (Analyze_Dimension_Object_Declaration): Propagate
1875         dimension from the expression to the entity when type is a
1876         dimensioned type and object is a constant.
1878 2012-07-23  Ed Schonberg  <schonberg@adacore.com>
1880         * sem_attr.adb (Analyze_Attribute, case 'Old): if the prefix
1881         is not an entity name, expand at once so that code generated by
1882         the expansion of the prefix is not generated before the constant
1883         that captures the old value is properly inserted and analyzed.
1885 2012-07-23  Thomas Quinot  <quinot@adacore.com>
1887         * exp_ch9.adb (Ensure_Statement_Present): Mark generated NULL
1888         statement as Comes_From_Source so that GIGI does not eliminate it.
1890 2012-07-23  Hristian Kirtchev  <kirtchev@adacore.com>
1892         * sem_ch12.adb (Insert_Freeze_Node_For_Instance): Inst is now
1893         a local variable. Retrieve the related instance when processing
1894         a subprogram instantiation. Such instances appear as wrapper
1895         packages.
1897 2012-07-23  Vincent Pucci  <pucci@adacore.com>
1899         * system-aix64.ads, system-aix.ads, system-darwin-ppc.ads,
1900         system-hpux.ads, system-linux-alpha.ads,
1901         system-linux-hppa.ads, system-linux-ppc.ads,
1902         system-linux-s390.ads, system-linux-s390x.ads,
1903         system-linux-sh4.ads, system-linux-sparc.ads,
1904         system-lynxos-ppc.ads, system-mingw.ads,
1905         system-solaris-sparc.ads, system-solaris-sparcv9.ads,
1906         system-vms_64.ads, * system-vxworks-arm.ads, system-vxworks-m68k.ads,
1907         system-vxworks-mips.ads, system-vxworks-ppc.ads,
1908         system-vxworks-sparcv9.ads: Support_Atomic_Primitives set to False.
1909         * system-darwin-x86.ads, system-darwin-x86_64.ads,
1910         system-freebsd-x86.ads, system-freebsd-x86_64.ads,
1911         system-hpux-ia64.ads, system-linux-ia64.ads, system-linux-x86.ads,
1912         system-linux-x86_64.ads, system-lynxos-x86.ads,
1913         system-mingw-x86_64.ads, system-solaris-x86.ads,
1914         system-solaris-x86_64.ads, system-vms-ia64.ads,
1915         system-vxworks-x86.ads: Support_Atomic_Primitives set to True.
1916         * s-atopri.adb (Lock_Free_Read_X): New body.
1917         (Lock_Free_Try_Write_X): Support_Atomic_Primitives check added.
1918         (Lock_Free_Try_Write_64): New body.
1919         * s-atopri.ads: New type uint.
1920         (Sync_Compare_And_Swap_64): __sync_val_compare_and_swap_8 intrinsic
1921         import.
1922         (Lock_Free_Read_X): Body moved to s-atopri.adb.
1923         (Lock_Free_Try_Write_64): Similar to other Lock_Free_Try_Write_X
1924         routines.
1925         * targparm.adb: New enumeration literal SAP
1926         (Support_Atomic_Primitives) for type Targparm_Tags. New constant
1927         SAP_Str. New component SAP_Str'Access for array Targparm_Str.
1928         (Get_Target_Parameters): Parse Support_Atomic_Primitives_On_Target
1929         flag.
1930         * targparm.ads: New back-end code generation flag
1931         Support_Atomic_Primitives_On_Target
1933 2012-07-23  Vincent Pucci  <pucci@adacore.com>
1935         * gnat_ugn.texi: Dimensionality checking documentation updated.
1937 2012-07-23  Ed Schonberg  <schonberg@adacore.com>
1939         * sem_prag.adb (Make_Inline): If the pragma applies to a
1940         subprogram renaming, set inline flags on both the renamed entity
1941         and on the renaming, so that some ASIS queries can be handled
1942         consistently in the absence of expansion.
1944 2012-07-23  Fedor Rybin  <frybin@adacore.com>
1946         * gnat_ugn.texi: Removing obsolete limitation of gnattest
1947         to support only ada05.  Updating gnattest support for other
1948         platforms/run-times section to reflect the usage of taget
1949         prefix in gnattest calls.  Fixing missed obsolete --stub-default
1950         option name.
1952 2012-07-23  Robert Dewar  <dewar@adacore.com>
1954         * uintp.adb: Minor reformatting.
1956 2012-07-23  Olivier Hainque  <hainque@adacore.com>
1958         * system-vxworks-ppc.ads: Replace the default
1959         Linker_Options requesting crtbe by a commented out request for
1960         -nostartfiles.
1962 2012-07-23  Vincent Celier  <celier@adacore.com>
1964         * prj-nmsc.adb (Check_Naming): Do not get the exceptions names
1965         in a virtual project.
1967 2012-07-23  Robert Dewar  <dewar@adacore.com>
1969         * layout.adb, sem_prag.adb, sem.ads, freeze.adb,
1970         switch-m.adb, exp_disp.adb, system-vxworks-ppc.ads, exp_ch6.adb: Minor
1971         reformatting.
1973 2012-07-23  Tristan Gingold  <gingold@adacore.com>
1975         * gcc-interface/trans.c: (Handled_Sequence_Of_Statements_to_gnu): Set
1976         location on TRY_CATCH_EXPR.
1978 2012-07-19  Eric Botcazou  <ebotcazou@adacore.com>
1980         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Try to ensure
1981         that an object of CW type initialized to a value is sufficiently
1982         aligned for this value.
1984 2012-07-19  Eric Botcazou  <ebotcazou@adacore.com>
1986         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Do not
1987         look up the REP part of the base type in advance.  Deal with that of
1988         the variant types.
1989         (get_rep_part): Be prepared for record types with fields.
1991 2012-07-18  Eric Botcazou  <ebotcazou@adacore.com>
1993         * gcc-interface/trans.c (stmt_group_may_fallthru): New function.
1994         (gnat_to_gnu) <N_Block_Statement>: Use it to find out whether the
1995         block needs to be translated.
1997 2012-07-17  Tristan Gingold  <gingold@adacore.com>
1999         * gnat_rm.texi: Adjust previous change.
2001 2012-07-17  Ed Schonberg  <schonberg@adacore.com>
2003         * sem_prag.adb (Process_Import_Or_Interface): If the pragma
2004         comes from an aspect, it applies to the corresponding entity
2005         without further check.
2007 2012-07-17  Olivier Hainque  <hainque@adacore.com>
2009         * initialize.c (__gnat_initialize for VxWorks): Remove section with
2010         call to __gnat_vxw_setup_for_eh.
2011         * system-vxworks-ppc.ads: Add -auto-register to -crtbe, relying
2012         on the VxWorks constructor mechanism for network loaded modules
2013         by default.
2015 2012-07-17  Tristan Gingold  <gingold@adacore.com>
2017         * adaint.c: Minor reformatting.
2019 2012-07-17  Pascal Obry  <obry@adacore.com>
2021         * s-regexp.adb (Adjust): Fix access violation in Adjust.
2023 2012-07-17  Ed Schonberg  <schonberg@adacore.com>
2025         * freeze.adb (Freeze_Entity): Warn if an imported subprogram
2026         has pre/post conditions, because these will not be enforced.
2028 2012-07-17  Eric Botcazou  <ebotcazou@adacore.com>
2030         * exp_ch7.adb (Process_Transient_Objects): Put all the
2031         finalization blocks and the final raise statement into a wrapper
2032         block.
2034 2012-07-17  Vincent Pucci  <pucci@adacore.com>
2036         * s-atopri.adb (Lock_Free_Try_Write_X): Atomic_Compare_Exchange_X
2037         replaced by Sync_Compare_And_Swap_X.
2038         (Lock_Free_Try_Write_64): Removed.
2039         * s-atopri.ads (Sync_Compare_And_Swap_X): Replaces previous
2040         routine Atomic_Compare_Exchange_X.
2041         (Lock_Free_Read_64): Renaming of Atomic_Load_64.
2042         (Lock_Free_Try_Write_64): Renaming of Sync_Compare_And_Swap_64.
2044 2012-07-17  Vincent Celier  <celier@adacore.com>
2046         * switch-m.adb (Normalize_Compiler_Switches): Recognize new
2047         switches -gnatn1 and -gnatn2.
2049 2012-07-17  Vincent Pucci  <pucci@adacore.com>
2051         * gnat_ugn.texi: GNAT dimensionality checking
2052         documentation updated with System.Dim.Mks modifications.
2054 2012-07-17  Ed Schonberg  <schonberg@adacore.com>
2056         * exp_ch3.adb: sloc of array init_proc is sloc of type declaration.
2058 2012-07-17  Tristan Gingold  <gingold@adacore.com>
2060         * raise-gcc.c (get_call_site_action_for): Remove useless init
2061         expression for p.
2062         (get_action_description_for): Do not overwrite action->kind.
2064 2012-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
2066         * exp_attr.adb (Expand_N_Attribute_Reference): Add local variables Attr
2067         and Conversion_Added.  Add local constant Typ.
2068         Retrieve the original attribute after the arithmetic check
2069         machinery has modified the node. Add a conversion to the target
2070         type when the prefix of attribute Max_Size_In_Storage_Elements
2071         is a controlled type.
2073 2012-07-17  Gary Dismukes  <dismukes@adacore.com>
2075         * exp_ch6.adb (Expand_Inlined_Call): For each actual parameter
2076         of mode 'out' or 'in out' that denotes an entity, reset
2077         Last_Assignment on the entity so that any assignments to the
2078         corresponding formal in the inlining will not trigger spurious
2079         warnings about overwriting assignments.
2081 2012-07-17  Robert Dewar  <dewar@adacore.com>
2083         * s-assert.ads: Fix comments to make it clear that this is used
2084         for all assertions, not just pragma Assert.
2086 2012-07-17  Jerome Guitton  <guitton@adacore.com>
2088         * par_sco.ads: Minor typo fix.
2090 2012-07-17  Gary Dismukes  <dismukes@adacore.com>
2092         * layout.adb (Layout_Type): In the case where the target is
2093         AAMP, use 32 bits (a single pointer) rather than 64 bits for an
2094         anonymous access-to-subprogram type if the type is library-level
2095         and Is_Local_Anonymous_Access is True.
2097 2012-07-17  Jose Ruiz  <ruiz@adacore.com>
2099         * s-tassta.adb, s-tarest.adb (Create_Task, Create_Restricted_Task,
2100         Initialize): Add comments explaining that the CPU affinity value that
2101         is passed to the run-time library can be either Unspecified_CPU, to
2102         indicate that the task inherits the affinity of its activating task,
2103         or a value in the range of CPU_Range but no greater than Number_Of_CPUs.
2105 2012-07-17  Javier Miranda  <miranda@adacore.com>
2107         * exp_disp.adb (Make_DT): Remove decoration of Ada.Tags entities.
2108         (Make_Tags): Add decoration of Ada.Tags entities.
2110 2012-07-17  Ed Schonberg  <schonberg@adacore.com>
2112         * sem_ch6.adb (Check_Statement_Sequence): When locating the
2113         last significant statement in a sequence, ignore iserted nodes
2114         that typically come from expansion of controlled operations.
2116 2012-07-17  Tristan Gingold  <gingold@adacore.com>
2118         * gnat_rm.texi: Document foreign exceptions.
2120 2012-07-17  Robert Dewar  <dewar@adacore.com>
2122         * sem_prag.adb, treepr.ads: Minor reformatting.
2124 2012-07-17  Robert Dewar  <dewar@adacore.com>
2126         * exp_ch9.adb: Minor code reorganization.
2127         * exp_ch3.adb: Minor code improvement.
2129 2012-07-17  Tristan Gingold  <gingold@adacore.com>
2131         * seh_init.c (__gnat_SEH_error_handler): Not compiled anymore
2132         on Windows 64 (+ SEH), as it is unused.
2134 2012-07-17  Javier Miranda  <miranda@adacore.com>
2136         * sem_prag.adb (CPP_Class): Transform obsolescent pragma CPP_Class into
2137         CPP convention automatically.
2139 2012-07-16  Tristan Gingold  <gingold@adacore.com>
2141         * gcc-interface/decl.c (intrin_return_compatible_p): Map Address to
2142         void *.
2144 2012-07-16  Thomas Quinot  <quinot@adacore.com>
2146         * exp_ch9.adb (Ensure_Statement_Present): New subprogram.
2147         (Expand_N_Asynchronous_Select,
2148         Expand_N_Selective_Accept.Process_Accept_Alternative,
2149         Expand_N_Selective_Accept.Process_Delay_Alternative,
2150         Expand_N_Timed_Entry_Call): For an alternative with no trailing
2151         statements, introduce a null statement to carry the sloc of
2152         the initial special statement (accept, delay, or entry call)
2153         in the alternative, for coverage analysis purposes.
2155 2012-07-16  Thomas Quinot  <quinot@adacore.com>
2157         * sem_eval.adb (In_Subrange_Of): Fix typo in test for scalar
2158         arguments.
2160 2012-07-16  Robert Dewar  <dewar@adacore.com>
2162         * a-exexpr.adb, freeze.adb, a-exexpr-gcc.adb, a-except-2005.adb,
2163         sem_eval.adb, s-fileio.adb: Minor reformatting.
2165 2012-07-16  Javier Miranda  <miranda@adacore.com>
2167         * sem_prag.adb (Analyze_Pragma): Remove support for obsolescent
2168         pragma CPP_Class.
2169         * sem_ch13.adb (Analyze_Freeze_Entity): Add missing error on Ada
2170         derivations of CPP types.  Found updating the tests affected by
2171         the removal of pragma CPP_Class.
2173 2012-07-16  Thomas Quinot  <quinot@adacore.com>
2175         * back_end.adb: Minor reformatting.
2177 2012-07-16  Thomas Quinot  <quinot@adacore.com>
2179         * exp_ch9.adb (Expand_N_Selective_Accept.Process_Accept_Alternative):
2180         Remove junk test that was always true. For the case of no statements
2181         following the ACCEPT, jump directly to End_Lab instead of
2182         introducing an intermediate jump.
2183         (Expand_N_Selective_Accept.Process_Delay_Alternative): Fix
2184         predicate testing for presence of statements following the DELAY.
2185         that was always true. For the case of no statements following
2186         the ACCEPT, jump directly to End_Lab instead of introducing an
2187         intermediate jump.
2188         (Expand_N_Selective_Accept): Fix incorrect insertion point for
2189         end label.
2191 2012-07-16  Thomas Quinot  <quinot@adacore.com>
2193         * gnat_rm.texi: Minor documentation improvements.
2195 2012-07-16  Yannick Moy  <moy@adacore.com>
2197         * sem_ch13.adb (Analyze_Aspect_Specifications): Allow Pre
2198         and Pre'Class aspects on the same declaration.
2199         * sem_prag.adb (Chain_PPC): Allow Pre and Pre'Class aspects on the
2200         same hierarchy of primitive operations.
2202 2012-07-16  Thomas Quinot  <quinot@adacore.com>
2204         * freeze.adb (Check_Component_Storage_Order): Do not reject a
2205         nested composite with different scalar storage order if it is
2206         byte aligned.
2208 2012-07-16  Thomas Quinot  <quinot@adacore.com>
2210         * gnat_rm.texi: Update documentation for Scalar_Storage_Order.
2212 2012-07-16  Tristan Gingold  <gingold@adacore.com>
2214         * a-exexpr.adb (Propagate_Exception): Adjust call to
2215         Exception_Traces procedures.
2216         * a-exexpr-gcc.adb (Setup_Current_Excep): Now a
2217         function that returns an access to the Ada occurrence.
2218         (Propagate_GCC_Exception): Adjust calls.
2219         * raise.h (struct Exception_Occurrence): Declare.
2220         * a-exextr.adb: Remove useless pragma.  (Notify_Handled_Exception,
2221         Notify_Unhandled_Exception) (Unhandled_Exception_Terminate):
2222         Add Excep parameter.
2223         * a-except.adb (Notify_Handled_Exception,
2224         Notify_Unhandled_Exception) (Unhandled_Exception_Terminate):
2225         Add Excep parameter.
2226         (Process_Raise_Exception): Adjust calls.
2227         * a-except-2005.adb (Notify_Handled_Exception,
2228         Notify_Unhandled_Exception) (Unhandled_Exception_Terminate): Add
2229         Excep parameter.
2230         (Raise_Exception): Calls Raise_Exception_Always.
2231         * raise-gcc.c (__gnat_setup_current_excep,
2232         __gnat_notify_handled_exception)
2233         (__gnat_notify_unhandled_exception): Adjust declarations.
2234         (PERSONALITY_FUNCTION): Adjust calls.
2235         (__gnat_personality_seh0): Remove warning.
2237 2012-07-16  Javier Miranda  <miranda@adacore.com>
2239         * sem_eval.adb (Test_Expression_Is_Foldable): Adding documentation.
2240         (Eval_Relational_Op): Adding documentation.
2242 2012-07-16  Robert Dewar  <dewar@adacore.com>
2244         * freeze.adb, g-debpoo.adb, exp_ch3.adb: Minor reformatting.
2246 2012-07-16  Thomas Quinot  <quinot@adacore.com>
2248         * s-oscons-tmplt.c: Add definitions of E2BIG and EILSEQ.
2250 2012-07-16  Tristan Gingold  <gingold@adacore.com>
2252         * a-exexpr.adb (Propagate_Continue): New function replacing
2253         Raise_Current_Excep.
2254         (Allocate_Occurrence): New function.
2255         (Propagate_Exception): Add Excep parameter, remove call to Call_Chain.
2256         * a-exexpr-gcc.adb (GNAT_GCC_Exception): Occurrence component
2257         is now aliased.
2258         (To_GCC_Exception): Convert from Address.
2259         (Allocate_Occurrence): Allocate an Unwind exception occurrence.
2260         (Setup_Current_Excep): Fill the machine occurrence in case of
2261         foreign exception.
2262         (Propagate_Exception): Add Excep parameter, remove call to Call_Chain.
2263         * a-except.adb (Set_Exception_C_Msg, Set_Exception_Msg): add
2264         Excep parameter.
2265         (Raise_Exception, Raise_Exception_Always,
2266         Raise_Exception_No_Defer): Adjust calls to the above procedures.
2267         (Raise_From_Signal_Handler, Raise_With_Location_And_Msg)
2268         (Rcheck_PE_Finalize_Raised_Exception): Likewise.
2269         * a-except-2005.adb (Set_Exception_C_Msg, Set_Exception_Msg):
2270         add Excep parameter.
2271         (Propagate_Exception): Likewise.
2272         (Allocate_Occurrence): New function.
2273         (Raise_Current_Excep): Removed.
2274         (Complete_Occurrence): New function to save the call chain.
2275         (Complete_And_Propagate_Occurrence): New procedure.
2276         (Create_Occurrence_From_Signal_Handler): New function to build an
2277         occurrence without propagating it.
2278         (Create_Machine_Occurrence_From_Signal_Handler): Likewise, but
2279         return the machine occurrence.
2280         (Raise_From_Signal_Handler): Use Create_Occurrence_From_Signal_Handler.
2281         (Raise_Exception, Raise_Exception_Always, Raise_Exception_No_Defer):
2282         Adjust calls to the above procedures. Allocate the occurrence at
2283         the beginning.
2284         (Raise_With_Location_And_Msg, Raise_With_Msg)
2285         (Rcheck_PE_Finalize_Raised_Exceptionm Reraise): Likewise.
2286         (Reraise_Occurrence): Use Reraise_Occurrence_Always.
2287         (Reraise_Occurrence_Always): Use Reraise_Occurrence_No_Defer.
2288         (Reraise_Occurrence_No_Defer): Preserve machine occurrence.
2289         (Save_Occurrence): Do not save machine occurrence.
2290         * a-except-2005.ads (Exception_Occurrence): Add Machine_Occurrence
2291         component.
2292         (Null_Occurrence): Consider it.
2293         * a-exexda.adb (Set_Exception_C_Msg, Set_Exception_Msg): add
2294         Excep parameter.
2296 2012-07-16  Tristan Gingold  <gingold@adacore.com>
2298         * seh_init.c (__gnat_map_SEH): New function extracted from
2299         __gnat_SEH_error_handler.
2300         * raise-gcc.c: __gnat_personality_seh0: Directly transforms
2301         Windows system exception into GCC one when possible, in order
2302         to save stack room (particularly useful when Storage_Error will
2303         be propagated).
2305 2012-07-16  Robert Dewar  <dewar@adacore.com>
2307         * a-direct.adb, g-dirope.adb: Minor reformatting.
2309 2012-07-16  Tristan Gingold  <gingold@adacore.com>
2311         * a-except.ads, a-except-2005.ads: Remove outdated comment.
2313 2012-07-16  Robert Dewar  <dewar@adacore.com>
2315         * sem_ch6.adb (Subprogram_Name_Greater): Fix algorithm to
2316         conform to documentation.
2318 2012-07-16  Ed Schonberg  <schonberg@adacore.com>
2320         * gnat1drv.adb (Check_Library_Items): Removed, no longer used.
2322 2012-07-16  Ed Schonberg  <schonberg@adacore.com>
2324         * sem_ch3.adb (Array_Type_Declaration): if component type has
2325         invariants, the array type itself requires an invariant procedure.
2326         * exp_ch3.ads, exp_ch3.adb (Build_Array_Invariant_Proc): new
2327         procedure, to build a checking procedure that applies the
2328         invariant check on some type T to each component of an array
2329         of T's.  Code is similar to the construction of the init_proc
2330         for an array, and handles multidimensional arrays by recursing
2331         over successive dimensions.
2333 2012-07-16  Hristian Kirtchev  <kirtchev@adacore.com>
2335         * g-debpoo.adb: Revert previous change.
2337 2012-07-16  Hristian Kirtchev  <kirtchev@adacore.com>
2339         * freeze.adb (Freeze_Entity): Insert the itype reference to a
2340         library-level class-wide subtype after the freeze node of the
2341         equivalent record type.
2343 2012-07-16  Pascal Obry  <obry@adacore.com>
2345         * s-crtl.ads (mkdir): New routine, support encoding.
2346         * adaint.h (__gnat_mkdir): Update spec to pass encoding.
2347         * mkdir.c (__gnat_mkdir): Add encoding parameter.
2348         * a-direct.adb (Create_Directory): Use CRTL.mkdir, parse encoding
2349         in form parameter.
2350         * g-dirope.adb (Make_Dir): Update to pass encoding parameter.
2352 2012-07-16  Pascal Obry  <obry@adacore.com>
2354         * adaint.c: Minor reformatting.
2356 2012-07-16  Steven Bosscher  <steven@gcc.gnu.org>
2358         * gcc-interface/utils.c: Include timevar.h.
2359         * Make-lang.in: Fix dependencies.
2361 2012-07-16  Vasiliy Fofanov  <fofanov@adacore.com>
2363         * ug_words, vms_data.ads: Document VMS qualifiers for -gnatn1/2
2364         switches.
2366 2012-07-16  Bob Duff  <duff@adacore.com>
2368         * sinfo.ads: Minor comment fix.
2370 2012-07-16  Bob Duff  <duff@adacore.com>
2372         * sem_elab.adb (Within_Elaborate_All): Walk the with clauses to
2373         find pragmas Elaborate_All that may be found in the transitive
2374         closure of the dependences.
2376 2012-07-16  Robert Dewar  <dewar@adacore.com>
2378         * exp_pakd.adb, freeze.adb, sem_util.adb, vms_data.ads: Minor
2379         reformatting.
2381 2012-07-12  Vasiliy Fofanov  <fofanov@adacore.com>
2383         * vms_data.ads: Add VMS qualifiers for -gnatn1/2 switches.
2385 2012-07-12  Thomas Quinot  <quinot@adacore.com>
2387         * exp_ch5.adb, exp_pakd.adb, rtsfind.ads, freeze.adb, sem_util.adb,
2388         sem_util.ads, exp_aggr.adb
2389         (Exp_Aggr.Packed_Array_Aggregate_Handled): Simplify processing
2390         for reverse storage order aggregate.
2391         (Exp_Pakd.Byte_Swap): New utility routine used by...
2392         (Exp_Pakd.Expand_Bit_Packed_Element_Set,
2393         Expand_Packed_Element_Reference): For the case of a free-standing
2394         packed array with reverse storage order, perform byte swapping.
2395         (Rtsfind): Make new entities RE_Bswap_{16,32,64} available.
2396         (Freeze.Check_Component_Storage_Order): New utility routine
2397         to enforce legality rules for nested composite types whose
2398         enclosing composite has an explicitly defined Scalar_Storage_Order
2399         attribute.
2400         (Sem_Util.In_Reverse_Storage_Order_Object): Renamed from
2401         Sem_Util.In_Reverse_Storage_Order_Record, as SSO now applies to
2402         array types as well.
2403         (Exp_Ch5.Expand_Assign_Array): Remove now unnecessary kludge
2404         for change of scalar storage order in assignments. The Lhs and
2405         Rhs now always have the same scalar storage order.
2407 2012-07-12  Hristian Kirtchev  <kirtchev@adacore.com>
2409         * g-debpoo.adb (Allocate): Add local constant
2410         No_Element. Initialize the allocated memory chunk to No_Element.
2412 2012-07-12  Ed Schonberg  <schonberg@adacore.com>
2414         * sem_ch12.adb (Validate_Derived_Type_Instance): Handle properly
2415         the case of an instance of a child unit where a formal derived
2416         type DT is an extension of a type T declared in a parent unit,
2417         and the actual in the instance of the child is the type T declared
2418         in the parent instance, and that actual is not a derived type.
2420 2012-07-12  Eric Botcazou  <ebotcazou@adacore.com>
2421             Tristan Gingold  <gingold@adacore.com>
2423         * system-hpux-ia64.ads: Enable ZCX by default.
2424         * gcc-interface/Makefile.in: Use alternate stack on ia64-hpux.
2425         Change soext to .so.
2427 2012-07-12  Robert Dewar  <dewar@adacore.com>
2429         * s-atopri.adb, s-atopri.ads: Minor reformatting.
2431 2012-07-12  Robert Dewar  <dewar@adacore.com>
2433         * ali.adb: Add circuitry to read new named form of restrictions lines.
2434         * debug.adb: Add doc for new -gnatd.R switch (used positional
2435         notation for output of restrictions data in ali file).
2436         * lib-writ.adb: Implement new named format for restrictions lines.
2437         * lib-writ.ads: Add documentation for new named format for
2438         restrictions in ali files.
2439         * restrict.adb, restrict.ads, sem_prag.adb: Update comments.
2440         * rident.ads: Go back to withing System.Rident
2441         * s-rident.ads: Add extensive comment on dealing with consistency
2442         checking.
2444 2012-07-12  Thomas Quinot  <quinot@adacore.com>
2446         * par_sco.adb, scos.ads: Emit detailed SCOs for SELECT statements.
2448 2012-07-12  Robert Dewar  <dewar@adacore.com>
2450         * sem_disp.adb: Minor reformatting
2451         * s-bytswa.ads: Minor comment update.
2453 2012-07-12  Vincent Pucci  <pucci@adacore.com>
2455         * exp_ch9.adb (Build_Lock_Free_Unprotected_Subprogram_Body):
2456         Atomic_Load_N replaced by Lock_Free_Read_N. Atomic_Compare_Exchange_N
2457         replaced by Lock_Free_Try_Write_N.
2458         Renaming of several local variables. For
2459         procedure, Expected_Comp declaration moved to the declaration
2460         list of the procedure.
2461         * rtsfind.ads: RE_Atomic_Compare_Exchange_8,
2462         RE_Atomic_Compare_Exchange_16, RE_Atomic_Compare_Exchange_32,
2463         RE_Atomic_Compare_Exchange_64, RE_Atomic_Load_8,
2464         RE_Atomic_Load_16, RE_Atomic_Load_32, RE_Atomic_Load_64,
2465         RE_Atomic_Synchronize, RE_Relaxed removed.  RE_Lock_Free_Read_8,
2466         RE_Lock_Free_Read_16, RE_Lock_Free_Read_32, RE_Lock_Free_Read_64,
2467         RE_Lock_Free_Try_Write_8, RE_Lock_Free_Try_Write_16,
2468         RE_Lock_Free_Try_Write_32, RE_Lock_Free_Try_Write_64 added.
2469         * s-atopri.adb: New file.
2470         * s-atopri.ads (Atomic_Compare_Exchange_8): Renaming of
2471         parameters.  Import primitive __sync_val_compare_and_swap_1.
2472         (Atomic_Compare_Exchange_16): Renaming of parameters.
2473         Import primitive __sync_val_compare_and_swap_2.
2474         (Atomic_Compare_Exchange_32): Renaming of parameters.
2475         Import primitive __sync_val_compare_and_swap_4.
2476         (Atomic_Compare_Exchange_64): Renaming of parameters.  Import
2477         primitive __sync_val_compare_and_swap_8.
2478         (Atomic_Load_8): Ptr renames parameter X.
2479         (Atomic_Load_16): Ptr renames parameter X.
2480         (Atomic_Load_32): Ptr renames parameter X.
2481         (Atomic_Load_64): Ptr renames parameter X.
2482         (Lock_Free_Read_8): New routine.
2483         (Lock_Free_Read_16): New routine.
2484         (Lock_Free_Read_32): New routine.
2485         (Lock_Free_Read_64): New routine.
2486         (Lock_Free_Try_Write_8): New routine.
2487         (Lock_Free_Try_Write_16): New routine.
2488         (Lock_Free_Try_Write_32): New routine.
2489         (Lock_Free_Try_Write_64): New routine.
2491 2012-07-12  Robert Dewar  <dewar@adacore.com>
2493         * exp_attr.adb, exp_ch9.adb, sem_ch9.adb, exp_aggr.adb: Minor
2494         reformatting.
2496 2012-07-12  Vincent Pucci  <pucci@adacore.com>
2498         * sem_dim.adb (Analyze_Dimension_Function_Call): Reformatting of error
2499         msgs for elementary functions.
2501 2012-07-12  Vincent Pucci  <pucci@adacore.com>
2503         * sem_attr.adb (Eval_Attribute): Minor reformatting.
2505 2012-07-12  Pascal Obry  <obry@adacore.com>
2507         * prj-nmsc.adb (Check_Library_Attributes): Allow the same library
2508         project in different project tree (different aggregated projects).
2510 2012-07-12  Thomas Quinot  <quinot@adacore.com>
2512         * s-bytswa.adb, g-bytswa.adb, g-bytswa.ads, s-bytswa.ads: Further
2513         reorganization of byte swapping routines.
2515 2012-07-12  Ed Schonberg  <schonberg@adacore.com>
2517         * sem_disp.adb (Check_Dispatching_Context): Refine legality
2518         checks on tagg indeterminate calls to abstract operations,
2519         that appear in the context of other calls.
2521 2012-07-12  Thomas Quinot  <quinot@adacore.com>
2523         * s-bytswa.adb (Swapped2.Bswap16): Remove local function,
2524         no longer needed.
2526 2012-07-12  Javier Miranda  <miranda@adacore.com>
2528         * exp_attr.adb (Expand_N_Attribute_Reference): For
2529         attributes 'access, 'unchecked_access and 'unrestricted_access,
2530         iff the current instance reference is located in a protected
2531         subprogram or entry then rewrite the access attribute to be the
2532         name of the "_object" parameter.
2534 2012-07-12  Tristan Gingold  <gingold@adacore.com>
2536         * raise.h: Revert previous patch: structure is used in init.c
2537         by vms.
2539 2012-07-12  Vincent Celier  <celier@adacore.com>
2541         * make.adb (Binding_Phase): If --subdirs was used, but not
2542         -P, change the working directory to the specified subdirectory
2543         before invoking gnatbind.
2544         (Linking_Phase): If --subdirs was used, but not -P, change the working
2545         directory to the specified subdirectory before invoking gnatlink.
2547 2012-07-12  Vincent Pucci  <pucci@adacore.com>
2549         * exp_ch9.adb (Build_Lock_Free_Unprotected_Subprogram_Body):
2550         For a procedure, instead of replacing each Comp reference by a
2551         reference to Current_Comp, make a renaming Comp of Current_Comp
2552         that rewrites the original renaming generated by the compiler
2553         during the analysis. Move the declarations of the procedure
2554         inside the generated block.
2555         (Process_Stmts): Moved in the body
2556         of Build_Lock_Free_Unprotected_Subprogram_Body.
2557         (Process_Node):
2558         Moved in the body of Build_Lock_Free_Unprotected_Subprogram_Body.
2559         * sem_ch9.adb (Allows_Lock_Free_Implementation): Restrict any
2560         non-elementary out parameters in protected procedures.
2562 2012-07-12  Thomas Quinot  <quinot@adacore.com>
2564         * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
2565         Scalar_Storage_Order): Attribute applies to base type only.
2567 2012-07-12  Ed Schonberg  <schonberg@adacore.com>
2569         * exp_aggr.adb (Convert_To_Positional): Increase acceptable size
2570         of static aggregate when Static_Elaboration_Desired is requested.
2571         Add a warning if the request cannot be satisfied either because
2572         some components or some array bounds are non-static.
2574 2012-07-12  Thomas Quinot  <quinot@adacore.com>
2576         * exp_pakd.adb: Minor reformatting.
2578 2012-07-12  Tristan Gingold  <gingold@adacore.com>
2580         * tracebak.c: Fix warnings.
2581         * raise-gcc.c (__gnat_adjust_context): New function
2582         (__gnat_personality_seh0): Call __gnat_adjust_context to adjust
2583         PC in machine frame for exceptions that occur in the current
2584         function.
2586 2012-07-12  Thomas Quinot  <quinot@adacore.com>
2588         * g-bytswa.adb, g-bytswa.ads, s-bytswa.adb, s-bytswa.ads, Makefile.rtl:
2589         Move GNAT.Byte_Swapping to System (with a renaming under GNAT)
2590         so that it is usable in expanded code.
2592 2012-07-12  Tristan Gingold  <gingold@adacore.com>
2594         * s-osinte-hpux.ads: Increase alternate stack size on hpux.
2596 2012-07-12  Javier Miranda  <miranda@adacore.com>
2598         * exp_ch3.adb (Make_Neq_Body): Fix typo in comment.
2600 2012-07-12  Eric Botcazou  <ebotcazou@adacore.com>
2602         * tb-gcc.c (trace_callback): On IA-64/HP-UX, use workaround only
2603         if USE_LIBUNWIND_EXCEPTIONS is defined.
2604         * init.c: Further tweaks for IA-64/HP-UX.
2606 2012-07-12  Tristan Gingold  <gingold@adacore.com>
2608         * raise-gcc.c: Do not include unwind-dw2-fde.h. Adjust comments.
2609         (db_region_for): Second argument is ip.  Do not recompute ip.
2610         (action_kind): Remove typedef, add unhandler enum const.
2611         (action_descriptor): Adjust type of kind field.
2612         (db_action_for): Second argument is ip, do not recompute it.
2613         (get_call_site_action_for): First argument is call_site, do not
2614         recompute it.  Remove useless return.
2615         (is_handled_by): Now return enum action_kind.
2616         Handle GNAT_ALL_OTHERS first.
2617         Return unhandler for GNAT_UNHANDLED_OTHERS.
2618         (get_action_description_for): First argument is now ip, do not
2619         recompute it.  Adjust code for call to is_handled_by.
2620         (__gnat_notify_unhandled_exception): Add prototype.
2621         (PERSONALITY_FUNCTION): Call get_ip_from_context.  Adjust calls.
2622         Handle unhandler case.
2623         (__gnat_cleanupunwind_handler): Add comments, add
2624         ATTRIBUTE_UNUSED on arguments.
2625         (__gnat_Unwind_RaiseException, __gnat_Unwind_ForcedUnwind): Define
2626         only once.
2627         * raise.h: Makes struct Exception_Data opaque.
2629 2012-07-12  Robert Dewar  <dewar@adacore.com>
2631         * make.adb, sem_ch9.adb, prj.adb, s-rident.ads, snames.ads-tmpl: Minor
2632         reformatting.
2634 2012-07-12  Javier Miranda  <miranda@adacore.com>
2636         * exp_ch3.adb (Is_User_Defined_Equality): New subprogram.
2637         (Make_Neq_Body): New subprogram.
2638         (Make_Predefined_Primitive_Specs): Adding local variable
2639         Has_Predef_Eq_ Renaming to ensure that we enable the machinery
2640         which handles renamings of predefined primitive operators.
2642 2012-07-09  Pascal Obry  <obry@adacore.com>
2644         * prj.adb (For_Every_Project_Imported_Context): Make sure we
2645         callback with the project having sources.
2646         Minor reformatting.
2648 2012-07-09  Eric Botcazou  <ebotcazou@adacore.com>
2650         * make.adb: Fix typo.
2652 2012-07-09  Vincent Pucci  <pucci@adacore.com>
2654         * sem_ch9.adb (Check_Node): Allow attributes
2655         that denote static function for lock-free implementation.
2656         (Is_Static_Function): New routine.
2658 2012-07-09  Tristan Gingold  <gingold@adacore.com>
2660         * tracebak.c: Adjust skip_frames on Win64.
2662 2012-07-09  Tristan Gingold  <gingold@adacore.com>
2664         * init.c: Add __gnat_adjust_context_for_raise for ia64/hpux.
2665         * raise-gcc.c: __gnat_cleanupunwind_handler: Do not call
2666         _Unwind_GetGR on hpux when using libgcc unwinder.  Part of
2668 2012-07-09  Vincent Pucci  <pucci@adacore.com>
2670         * exp_attr.adb, sem_attr.adb: Minor reformatting.
2671         * par-ch13.adb, par-ch4.adb, par-util.adb: Reformatting
2672         considering that internal attribute names are not defined anymore
2673         in the main attribute names list.
2674         * snames.adb-tmpl (Get_Attribute_Id): Special processinf
2675         for names CPU, Dispatching_Domain and Interrupt_Priority.
2676         (Is_Internal_Attribute_Name): Minor reformatting.
2677         * snames.ads-tmpl: New list of internal attribute names. Internal
2678         attributes moved at the end of the attribute Id list.
2680 2012-07-09  Robert Dewar  <dewar@adacore.com>
2682         * freeze.adb: Minor code reorganization (use Ekind_In).
2683         * exp_attr.adb, sem_ch9.adb par-ch4.adb, s-taprop-mingw.adb,
2684         sem_attr.adb, exp_ch8.adb, snames.adb-tmpl, par-util.adb,
2685         sem_ch13.adb, snames.ads-tmpl: Minor reformatting.
2687 2012-07-09  Tristan Gingold  <gingold@adacore.com>
2689         * raise-gcc.c: Adjust previous patch.
2691 2012-07-09  Vincent Celier  <celier@adacore.com>
2693         * make.adb (Compilation_Phase): Do not build libraries in
2694         Codepeer mode (do not call Library_Phase).
2696 2012-07-09  Ed Schonberg  <schonberg@adacore.com>
2698         * sem_ch13.adb: Extend previous change to elementary types.
2700 2012-07-09  Javier Miranda  <miranda@adacore.com>
2702         * exp_ch8.adb (Expand_N_Subprogram_Renaming_Declaration): Reverse
2703         previous patch since unconditionally handling as renaming_as_body
2704         renamings of predefined dispatching equality and unequality operator
2705         cause visibility problems with private overridings of the equality
2706         operator (see ACATS C854001).
2708 2012-07-09  Vincent Pucci  <pucci@adacore.com>
2710         * exp_attr.adb (Signal_Bad_Attribute): Raise Program_Error in
2711         case of internal attribute names (already rejected by the parser).
2712         * par-ch13.adb (P_Representation_Clause): Complain if an internal
2713         attribute name that comes from source occurs.
2714         * par-ch4.adb (P_Name): Complain if an internal attribute name
2715         occurs in the context of an attribute reference.
2716         * par-util.adb (Signal_Bad_Attribute): Don't complain about
2717         mispelling attribute with internal attributes.
2718         * sem_attr.adb (Analyze_Attribute): Raise Program_Error in case
2719         of internal attribute names (already rejected by the parser).
2720         * snames.adb-tmpl (Is_Internal_Attribute_Name): New routine.
2721         * snames.ads-tmpl: Attributes CPU, Dispatching_Domain and
2722         Interrupt_Priority are marked as INT attributes since they
2723         don't denote real attribute and are only used internally in
2724         the compiler.
2725         (Is_Internal_Attribute_Name): New routine.
2727 2012-07-09  Thomas Quinot  <quinot@adacore.com>
2729         * einfo.adb (Set_Reverse_Storage_Order): Update assertion,
2730         flag is now valid for array types as well.
2732 2012-07-09  Tristan Gingold  <gingold@adacore.com>
2734         * tracebak.c: Implement __gnat_backtrace for Win64 SEH.
2736 2012-07-09  Robert Dewar  <dewar@adacore.com>
2738         * einfo.ads: Minor reformatting.
2740 2012-07-09  Javier Miranda  <miranda@adacore.com>
2742         * exp_ch8.adb (Expand_N_Subprogram_Renaming_Declaration): Handle as
2743         renaming_as_body renamings of predefined dispatching equality
2744         and unequality operators.
2746 2012-07-09  Robert Dewar  <dewar@adacore.com>
2748         * rident.ads: Do not instantiate r-ident.ads, this is now an
2749         independent unit.
2751 2012-07-09  Javier Miranda  <miranda@adacore.com>
2753         * exp_disp.adb (Write_DT): Avoid runtime crash of this debugging
2754         routine.
2755         * sem_disp.adb (Find_Dispatching_Time): Protect this routine
2756         against partially decorated entities.
2758 2012-07-09  Ed Schonberg  <schonberg@adacore.com>
2760         * sem_ch13.adb (Check_Size): Reject a size clause that specifies
2761         a value greater than Int'Last for a scalar type.
2763 2012-07-09  Vincent Pucci  <pucci@adacore.com>
2765         * sem_ch9.adb (Allows_Lock_Free_Implementation): type must support
2766         atomic operation moved to the protected body case. No non-elementary
2767         out parameter moved to the protected declaration case. Functions have
2768         only one lock-free restriction.
2769         (Analyze_Protected_Type_Declaration): Issue a warning when
2770         Priority given with Lock_Free.
2772 2012-07-09  Vincent Pucci  <pucci@adacore.com>
2774         * sem_dim.adb: Grammar of aspect Dimension fixed.
2776 2012-07-09  Vincent Pucci  <pucci@adacore.com>
2778         * freeze.adb (Freeze_Record_Type): Code reorg in order to avoid
2779         pushing and popping the scope stack whenever a delayed aspect occurs.
2781 2012-07-09  Gary Dismukes  <dismukes@adacore.com>
2783         * s-os_lib.ads: Remove pragma Elaborate_Body, as
2784         this is now unnecessary due to recently added pragma Preelaborate.
2786 2012-07-09  Jose Ruiz  <ruiz@adacore.com>
2788         * s-taprop-mingw.adb (Set_Priority): Remove the code that was
2789         previously in place to reorder the ready queue when a task drops
2790         its priority due to the loss of inherited priority.
2792 2012-07-09  Robert Dewar  <dewar@adacore.com>
2794         * layout.adb, i-cstrea.ads, a-ststio.ads, prj-util.ads, sem_cat.adb,
2795         s-commun.ads, s-ficobl.ads, s-os_lib.ads, s-fileio.ads: Minor
2796         reformatting.
2798 2012-07-09  Eric Botcazou  <ebotcazou@adacore.com>
2800         * raise-gcc.c: Update comments. Fix typo.
2802 2012-07-09  Thomas Quinot  <quinot@adacore.com>
2804         * einfo.adb, einfo.ads, sem_attr.adb, sem_ch13.adb: Attribute
2805         Scalar_Storage_Order can be defined or queried for array types as well
2806         as record types.
2808 2012-07-09  Tristan Gingold  <gingold@adacore.com>
2810         * a-exexpr-gcc.adb (CleanupUnwind_Handler): Now imported from
2811         raise-gcc.c
2812         * raise-gcc.c (__gnat_cleanupunwind_handler): Defined.
2813         Strictly follow the ABI convention on ia64.
2815 2012-07-09  Gary Dismukes  <dismukes@adacore.com>
2817         * a-ststio.ads: Add pragma Preelaborate, per AI05-0283.
2818         * i-cstrea.ads (max_path_len): Change from variable to deferred
2819         constant to allow it to be used as a bound in string component
2820         in type System.File_IO.Temp_File_Record.
2821         * s-os_lib.ads, s-commun.ads, s-ficobl.ads, s-fileio.ads: Add pragma
2822         Preelaborate.
2823         * s-fileio.adb (Get_Case_Sensitive): Move function inside
2824         procedure Open.
2825         (File_Names_Case_Sensitive): Move variable inside
2826         procedure Open, to avoid violation of Preelaborate restriction
2827         (due to call to Get_Case_Sensitive).
2829 2012-07-09  Ed Schonberg  <schonberg@adacore.com>
2831         * layout.adb (Set_Elem_Alignment): Protect against meaningless
2832         size clause, to prevent overflow in internal computation of
2833         alignment.
2835 2012-07-09  Robert Dewar  <dewar@adacore.com>
2837         * freeze.adb, prj-util.adb, prj-util.ads, sem_ch13.adb: Minor
2838         reformatting.
2840 2012-07-09  Gary Dismukes  <dismukes@adacore.com>
2842         * sem_cat.adb (Check_Categorization_Dependencies):
2843         Allow dependence of both Remote_Types and Remote_Call_Interface
2844         declarations (not just Remote_Types units) on preelaborated
2845         units, but require that the dependence be made via a private
2846         with_clause. Issue a specialized error message.
2848 2012-07-09  Pascal Obry  <obry@adacore.com>
2850         * prj-util.adb, prj-util.ads (For_Interface_Sources): New routine.
2852 2012-07-09  Tristan Gingold  <gingold@adacore.com>
2854         * seh_init.c (__gnat_SEH_error_handler): On Win64 and SEH,
2855         return for unknown exceptions.
2856         * raise-gcc.c (__gnat_personality_seh0): Call __gnat_SEH_error_handler.
2858 2012-07-09  Joel Brobecker  <brobecker@adacore.com brobecker>
2860         * exp_dbug.ads (No_Dollar_In_Label): Delete.
2862 2012-07-09  Vincent Pucci  <pucci@adacore.com>
2864         * sem_ch13.adb (Check_Overloaded_Name): New routine.
2866 2012-07-09  Vincent Pucci  <pucci@adacore.com>
2868         * freeze.adb (Freeze_Record_Type): Analyze the delayed aspects of the
2869         components in a record type.
2871 2012-07-09  Pascal Obry  <obry@adacore.com>
2873         * prj-util.ads: Minor reformatting.
2875 2012-07-09  Tristan Gingold  <gingold@adacore.com>
2877         * raise-gcc.c (db_indent): Simplify style, improve comments.
2878         Remove !IN_RTS part (dead).
2880 2012-07-09  Robert Dewar  <dewar@adacore.com>
2882         * usage.adb: Minor change to format of -gnatn line.
2884 2012-07-09  Tristan Gingold  <gingold@adacore.com>
2886         * a-exexpr-gcc.adb: Reorder routine.
2888 2012-07-09  Vincent Celier  <celier@adacore.com>
2890         * lib-writ.ads: Add documentation for the Z lines (implicitly
2891         withed units) and Y lines (limited withed units).
2893 2012-07-09  Robert Dewar  <dewar@adacore.com>
2895         * lib.ads, exp_attr.adb, exp_ch9.adb, sem_dim.adb, sem_ch9.adb,
2896         sem_prag.adb, sem_ch12.adb, mlib-utl.adb, freeze.adb, sem_res.adb,
2897         sem_attr.adb, sem_case.adb, gnatlink.adb, exp_ch4.adb, sem_ch6.adb,
2898         sem_elim.adb, s-dimmks.ads, sem_ch13.adb: Minor code clean ups.
2900 2012-07-09  Eric Botcazou  <ebotcazou@adacore.com>
2902         * gnat_ugn.texi (Switches for gcc): Document -gnatn[12] only
2903         lightly in the summary and more thoroughly in inlining section.
2904         (Performance Considerations): Document -gnatn[12] in inlining
2905         section.
2907 2012-07-09  Tristan Gingold  <gingold@adacore.com>
2909         * a-exexpr-gcc.adb (Unhandled_Except_Handler): New procedure.
2910         (Unhandled_Others_Value): New const.
2911         * raise-gcc.c (GNAT_UNHANDLED_OTHERS): Define.
2912         (action_descriptor): Remove ttype_entry.
2913         (get_action_description_for): Do not assign ttype_entry.
2914         (is_handled_by): Consider GNAT_UNHANDLED_OTHERS.
2916 2012-07-03  Eric Botcazou  <ebotcazou@adacore.com>
2918         * gcc-interface/trans.c (Call_to_gnu): Robustify test for function case
2919         if the CICO mechanism is used.
2921 2012-07-03  Eric Botcazou  <ebotcazou@adacore.com>
2923         * gcc-interface/utils2.c (build_simple_component_ref): Do not look
2924         through an extension if the type contains a placeholder.
2926 2012-07-03  Eric Botcazou  <ebotcazou@adacore.com>
2928         * exp_disp.adb (Expand_Dispatching_Call): Propagate the convention on
2929         the designated subprogram type and also set Is_Dispatch_Table_Entity.
2930         (Expand_Interface_Thunk): Propagate the convention on the thunk.
2931         (Set_CPP_Constructors_Old): Set Is_Constructor and Convention_CPP on
2932         the internal view of the constructors.
2933         (Set_CPP_Constructors): Likewise.
2934         * sem_prag.adb (Analyze_Pragma) <Pragma_CPP_Constructor>: Set the
2935         convention on the function.
2936         * gcc-interface/gigi.h (is_cplusplus_method): Declare.
2937         * gcc-interface/decl.c (Has_Thiscall_Convention): New macro.
2938         (gnat_to_gnu_entity) <E_Subprogram_Type>: Test it to set the `thiscall'
2939         calling convention
2940         (get_minimal_subprog_decl): Likewise.
2941         (is_cplusplus_method): New predicate.
2942         * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Access>: Issue an
2943         error on access to C++ constructor or member function.
2945 2012-07-03  Eric Botcazou  <ebotcazou@adacore.com>
2947         * gcc-interface/utils.c (gnat_pushdecl): Set TYPE_CONTEXT for types
2948         attached to a TYPE_DECL.
2950 2012-06-26  Vincent Pucci  <pucci@adacore.com>
2952         * exp_ch3.adb (Build_Init_Statements): Don't check the parents
2953         in the Rep Item Chain of the task for aspects Interrupt_Priority,
2954         Priority, CPU and Dispatching_Domain.
2955         * exp_ch9.adb (Expand_N_Task_Type_Declaration): fields _Priority,
2956         _CPU and _Domain are present in the corresponding record type
2957         only if the task entity has a pragma, attribute definition
2958         clause or aspect specification.
2959         (Make_Initialize_Protection): Don't check the parents in the Rep Item
2960         Chain of the task for aspects Interrupt_Priority, Priority, CPU and
2961         Dispatching_Domain.
2962         * freeze.adb (Freeze_Entity): Use of Evaluate_Aspects_At_Freeze_Point
2963         call replaced by Analyze_Aspects_At_Freeze_Point.
2964         * sem_ch13.adb, sem_ch13.ads (Analyze_Aspects_At_Freeze_Point):
2965         Renaming of Evaluate_Aspects_At_Freeze_Point.
2967 2012-06-26  Yannick Moy  <moy@adacore.com>
2969         * sem_attr.adb (Analyze_Attribute): Detect if 'Old is used outside a
2970         postcondition, and issue an error in such a case.
2972 2012-06-26  Yannick Moy  <moy@adacore.com>
2974         * gnat_rm.texi: Minor editing.
2976 2012-06-26  Tristan Gingold  <gingold@adacore.com>
2978         * raise-gcc.c: Minor cleanup: remove unused prototype.
2979         * seh_init.c: Do not create an image wide unwind info to catch
2980         SEH when SEH unwind info are emitted by the compiler.
2982 2012-06-19  Steven Bosscher  <steven@gcc.gnu.org>
2984         * gcc-interface/trans.c: Include target.h.
2985         (gigi): Try to put out .ident with targetm.asm_out.output_ident.
2986         Remove uses of ASM_OUTPUT_IDENT.
2987         * gcc-interface/Make-lang.in: Fix dependencies.
2989 2012-06-15  Eric Botcazou  <ebotcazou@adacore.com>
2991         PR ada/53592
2992         * gcc-interface/gigi.h (maybe_vector_array): Make static inline.
2993         * gcc-interface/utils.c (maybe_vector_array): Delete.
2994         * gcc-interface/trans.c (gnat_to_gnu) <N_Indexed_Component>: Mark the
2995         array object as addressable if it has vector type and is on the LHS.
2997 2012-06-15  Eric Botcazou  <ebotcazou@adacore.com>
2999         PR middle-end/53590
3000         * gcc-interface/misc.c (gnat_init_options_struct): Set
3001         opts->x_flag_delete_dead_exceptions to 1.
3003 2012-06-14  Jose Ruiz  <ruiz@adacore.com>
3005         * gcc-interface/Make-lang.in (ada.install-common, ada.uninstall):
3006         Use the prefix specified with the --program-prefix configure option
3007         to determine the install name of the Ada tools.
3008         (ada.all.cross): Use a for loop to iterate over the set of Ada tools
3009         instead of duplicate the same processing.
3010         Update dependencies.
3012 2012-06-14  Vincent Pucci  <pucci@adacore.com>
3014         * exp_ch6.adb (Expand_Call): Expand_Put_Call_With_Dimension_Symbol
3015         call replaced by Expand_Put_Call_With_Symbol call.
3016         * sem_dim.adb: New fields Unit_Names, Unit_Symbols
3017         and Dim_Symbols for record type System_Type.
3018         (From_Dimension_To_String_Of_Symbols): Removed.
3019         (From_Dim_To_Str_Of_Dim_Symbols): Renames previous
3020         routine From_Dimension_To_String_Of_Symbols.
3021         (From_Dim_To_Str_Of_Unit_Symbols): New routine.
3022         (Analyze_Aspect_Dimension): argument Symbol in aspect
3023         Dimension aggregate is optional. Named association implemented.
3024         (Has_Compile_Time_Known_Expressions): Removed.
3025         (Analyze_Aspect_Dimension_System): New
3026         component Dim_Symbol in each Dimension aggregate in
3027         aspect Dimension_System. Named associations implemented.
3028         (Add_Dimension_Vector_To_Buffer): Removed.
3029         (Add_Whole_To_Buffer): Removed.
3030         (Expand_Put_Call_With_Dimension_Symbol.): Removed.
3031         (Expand_Put_Call_With_Symbol): Renames previous routine
3032         Expand_Put_Call_With_Dimension_Symbol.
3033         (Has_Dimension_Symbols): Removed.
3034         (Has_Symbols): Renames previous routine
3035         Has_Dimension_Symbols.  (Store_String_Oexpon): New routine.
3036         * sem_dim.ads (Expand_Put_Call_With_Dimension_Symbol.): Removed.
3037         (Expand_Put_Call_With_Symbol): Renames previous routine
3038         Expand_Put_Call_With_Dimension_Symbol.
3039         * s-diflio.adb, s-diinio.adb (Put): Symbol renames Symbols.
3040         (Put_Dim_Of): New routines.
3041         * s-diflio.ads, s-diinio.ads: documentation updated.
3042         (Put): Symbol renames Symbols.
3043         (Put_Dim_Of): New routines.
3044         * s-dim.ads: documentation updated.
3045         * s-dimmks.ads: dimensioned type and subtypes updated.
3046         * snames.ads-tmpl: Name_Dim_Symbol, Name_Put_Dim_Of, Name_Symbol,
3047         and Name_Unit_Symbol added. Name_Symbols removed.
3049 2012-06-14  Vincent Pucci  <pucci@adacore.com>
3051         * freeze.adb (In_Exp_Body): Expression function case added.
3052         (Freeze_Expression): Insert the Freeze_Nodes
3053         list before the correct current scope in case of a quantified
3054         expression.
3056 2012-06-14  Pascal Obry  <obry@adacore.com>
3058         * projects.texi: Document the Install package for gprinstall.
3059 2012-06-14  Ed Schonberg  <schonberg@adacore.com>
3061         * sem_elim.adb (Check_For_Eliminated_Subprogram): Do not check within
3062         a default expression.
3063         * sem_res.adb (Resolve_Call): simplify code.
3065 2012-06-14  Ed Schonberg  <schonberg@adacore.com>
3067         * sem_case.adb (Check, Issue_Msg): within an instance, non-other
3068         values in a variant part or a case expression do not have to
3069         belong to the actual subtype.
3071 2012-06-14  Ed Schonberg  <schonberg@adacore.com>
3073         * sem_ch12.adb (Validate_Derived_Type_Instance): If parent is
3074         an interface type, check whether it is itself a previous formal
3075         already instantiated in the current list of actuals.
3077 2012-06-14  Ed Schonberg  <schonberg@adacore.com>
3079         * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): The
3080         expression for a stream attribute is a name that may be overloaded
3081         with other declarations. To determine whether it matches the
3082         aspect at the freeze point, it is necessary to verify that one
3083         of its interpretations matches.
3085 2012-06-14  Robert Dewar  <dewar@adacore.com>
3087         * exp_ch7.adb, exp_util.adb, sem_aux.ads, exp_ch9.adb,
3088         sem_ch10.adb, freeze.adb, sem_util.adb, exp_ch4.adb,
3089         s-taprop-dummy.adb: Minor reformatting.
3091 2012-06-14  Vincent Pucci  <pucci@adacore.com>
3093         * exp_attr.adb (Expand_N_Attribute_Reference): Lock_Free
3094         attribute case added.
3095         * par-prag.adb (Prag): Lock_Free pragma case added.
3096         * sem_attr.adb (Analyze_Attribute_Reference): Lock_Free attribute
3097         case added.
3098         * sem_ch13.adb (Analyze_Aspect_Specifications): Record_Rep_Item
3099         call added for Aspect_Lock_Free.
3100         * sem_ch9.adb (Allows_Lock_Free_Implementation): New Lock_Free
3101         error messages for subprogram bodies.
3102         (Lock_Free_Disabled): New routine.
3103         (Analyze_Protected_Body): Call to Lock_Free_Disabled added.
3104         * sem_prag.adb (Analyze_Pragma): Lock_Free pragma case added.
3105         * snames.adb-tmpl (Get_Pragma_Id): Name_Lock_Free case added.
3106         (Is_Pragma_Name): Name_Lock_Free case added.
3107         * snames.ads-tmpl: Attribute_Lock_Free and Pragma_Lock_Free added.
3109 2012-06-14  Ed Schonberg  <schonberg@adacore.com>
3111         * a-coorma.adb, a-cborma.adb, a-cbhama.adb, a-ciorma.adb: Add missing
3112         aliased keyword.
3114 2012-06-14  Bob Duff  <duff@adacore.com>
3116         * lib.ads, lib.adb, sem.adb (Write_Unit_Info): Move this
3117         procedure from Sem body to Lib spec, so it can be used for
3118         debugging elsewhere.
3120 2012-06-14  Ed Schonberg  <schonberg@adacore.com>
3122         * sem_ch6.adb (Check_Conformance): Add Ada 2012 check on mode
3123         conformance: "aliased" must apply to both or neither formal
3124         parameters.
3126 2012-06-14  Gary Dismukes  <dismukes@adacore.com>
3128         * exp_ch9.adb: Minor reformatting.
3130 2012-06-14  Thomas Quinot  <quinot@adacore.com>
3132         * freeze.adb (Freeze_Record_Type): Warn about useless bit order
3133         specification [when there's no component clause] regardless
3134         of whether the specified bit order is reversed or not.
3136 2012-06-14  Tristan Gingold  <gingold@adacore.com>
3138         * raise-gcc.c (__gnat_personality_seh0): New function.
3140 2012-06-14  Tristan Gingold  <gingold@adacore.com>
3142         * gnatname.adb (Gnatname): Make sure that dynamic table
3143         argument_data is initialized.
3145 2012-06-14  Robert Dewar  <dewar@adacore.com>
3147         * sem_aux.adb: Minor code reorganization.
3149 2012-06-14  Vincent Pucci  <pucci@adacore.com>
3151         * einfo.adb einfo.ads (Get_Rep_Item): Removed.
3152         (Get_Rep_Item_For_Entity): Removed.
3153         (Get_Rep_Pragma): Removed.
3154         (Get_Rep_Pragma_For_Entity): Removed.
3155         (Has_Rep_Item): Removed.
3156         (Has_Rep_Pragma): Removed.
3157         (Has_Rep_Pragma_For_Entity): Removed.
3158         * exp_ch9.adb (Expand_N_Task_Type_Declaration):
3159         Has_Rep_Pragma_For_Entity replaced by Has_Rep_Pragma
3160         and Get_Rep_Pragma_For_Entity replaced by Get_Rep_Pragma.
3161         (Make_Task_Create_Call): Has_Rep_Pragma_For_Entity replaced
3162         by Has_Rep_Pragma and Get_Rep_Pragma_For_Entity replaced by
3163         Get_Rep_Pragma.
3164         * exp_intr.adb: Dependency to Sem_Aux added for call to Get_Rep_Pragma.
3165         * sem_aux.adb (Get_Rep_Item): New routine.
3166         (Get_Rep_Pragma): New routine.
3167         (Has_Rep_Item): New routine.
3168         (Has_Rep_Pragma): New routine.
3169         (Nearest_Ancestor): Minor reformatting.
3170         * sem_aux.ads (Get_Rep_Item): New routine.
3171         (Get_Rep_Pragma): New routine.
3172         (Has_Rep_Item): New routine.
3173         (Has_Rep_Pragma): New routine.
3174         * sem_ch13.adb (Duplicate_Clause): Restore original error messages.
3175         * sem_eval.adb (Subtypes_Statically_Match): Get_Rep_Item_For_Entity
3176         replaced by Get_Rep_Item.
3177         * sem_prag.adb (Analyze_Pragma): Restore original error messages.
3178         (Check_Duplicate_Pragma): Restore original error messages.
3180 2012-06-14  Ed Schonberg  <schonberg@adacore.com>
3182         * sem_util.adb (Is_Object_Reference): in Ada 2012, qualified
3183         expressions are valid names.
3185 2012-06-14  Ed Schonberg  <schonberg@adacore.com>
3187         * sem_ch10.adb (Analyze_Compilation_Unit): If the unit is an
3188         instantiation do not emit warnings for obsolescent units. The
3189         warnings belong on the corresponding generic.
3191 2012-06-14  Hristian Kirtchev  <kirtchev@adacore.com>
3193         * einfo.adb: Update the usage of Node15.
3194         (Return_Flag_Or_Transient_Decl): Removed.
3195         (Set_Return_Flag_Or_Transient_Decl): Removed.
3196         (Set_Status_Flag_Or_Transient_Decl): New routine.
3197         (Status_Flag_Or_Transient_Decl): New routine.
3198         (Write_Field15_Name): Update the output for variables and constants.
3199         * einfo.ads: Remove attribute
3200         Return_Flag_Or_Transient_Decl along with occurrences in nodes.
3201         (Return_Flag_Or_Transient_Decl): Removed along with pragma Inline.
3202         (Set_Return_Flag_Or_Transient_Decl): Removed along with pragma Inline.
3203         (Set_Status_Flag_Or_Transient_Decl): New routine along with pragma
3204         Inline.
3205         (Status_Flag_Or_Transient_Decl): New routine along with pragma Inline.
3206         * exp_ch4.adb (Create_Alternative): New routine.
3207         (Expand_N_Conditional_Expression): Handle the case
3208         where at least one of the conditional expression
3209         alternatives prodices a controlled temporary by means of a function
3210         call.
3211         (Is_Controlled_Function_Call): New routine.
3212         (Process_Transient_Object): Update the call to
3213         Set_Return_Flag_Or_Transient_Decl.
3214         * exp_ch6.adb (Enclosing_Context): New routine.
3215         (Expand_N_Extended_Return_Statement): Update all calls to
3216         Set_Return_Flag_Or_Transient_Decl.
3217         (Expand_Ctrl_Function_Call): Prohibit the finalization of a controlled
3218         function result when the context is a conditional expression.
3219         * exp_ch7.adb (Process_Declarations): Update all calls to
3220         Return_Flag_Or_Transient_Decl. Add processing for intermediate
3221         results of conditional expressions where one of the alternatives
3222         uses a controlled function call.
3223         (Process_Object_Declaration): Update all calls to
3224         Return_Flag_Or_Transient_Decl and rearrange the logic to process
3225         "hook" objects first.
3226         (Process_Transient_Objects): Update the call to
3227         Set_Return_Flag_Or_Transient_Decl.
3228         * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean,
3229         Boolean)): Update all calls to Return_Flag_Or_Transient_Decl. Add
3230         detection for intermediate results of conditional expressions
3231         where one of the alternatives uses a controlled function call.
3233 2012-06-13  Eric Botcazou  <ebotcazou@adacore.com>
3235         Revert
3236         2012-05-19  Eric Botcazou  <ebotcazou@adacore.com>
3238         * gcc-interface/decl.c (Has_Thiscall_Convention): New macro.
3239         (gnat_to_gnu_entity) <E_Subprogram_Type>: Test it to set the thiscall
3240         calling convention
3241         (get_minimal_subprog_decl): Likewise.
3242         (gnat_first_param_is_class): New predicate.
3244 2012-06-12  Robert Dewar  <dewar@adacore.com>
3246         * gcc-interface/Make-lang.in: Update dependencies.
3247         * sem_ch9.ads, einfo.adb, einfo.ads, sem_prag.adb, freeze.adb,
3248         sem_util.adb, sem_ch13.adb, sem_ch13.ads, exp_ch3.adb: Add comments.
3249         Minor reformatting.
3251 2012-06-12  Ed Schonberg  <schonberg@adacore.com>
3253         * sem_ch12.adb (Instantiate_Formal_Subprogram): Remove code that
3254         implements AI05-0296, because the actual may be overloaded.
3255         * sem_ch8.adb (Analyze_Subprogram_Renaming): and move it here,
3256         to be applied once the actual subprogram is properly resolved.
3258 2012-06-12  Robert Dewar  <dewar@adacore.com>
3260         * switch-c.adb, a-exexpr-gcc.adb: Minor reformatting.
3262 2012-06-12  Vincent Pucci  <pucci@adacore.com>
3264         * checks.adb (Tag_Checks_Suppressed): Remove Kill_Tag_Checks check.
3265         * einfo.adb (Universal_Aliasing): Apply to the implementation
3266         base type instead of the base type.
3267         (Get_Rep_Item_For_Entity):
3268         Return a pragma if the pragma node is not present in the Rep
3269         Item chain of the parent.
3270         (Kill_Tag_Checks): Removed (unused flag).
3271         (Set_Kill_Tag_Checks): Removed.
3272         (Get_First_Rep_Item): New routine.
3273         (Get_Rep_Pragma_For_Entity): New routine.
3274         (Has_Rep_Item): New routine.
3275         (Has_Rep_Pragma_For_Entity): New routine.
3276         (Present_In_Rep_Item): New routine.
3277         * einfo.ads (Kill_Tag_Checks): Removed.
3278         (Set_Kill_Tag_Checks): Removed.
3279         (Get_First_Rep_Item): New routine.
3280         (Get_Rep_Pragma_For_Entity): New routine.
3281         (Has_Rep_Item): New routine.
3282         (Has_Rep_Pragma_For_Entity): New routine.
3283         (Present_In_Rep_Item): New routine.
3284         * exp_attr.adb, sem_attr.adb: Attribute_CPU,
3285         Attribute_Dispatching_Domain and Attribute_Interrupt_Priority
3286         case added.
3287         * exp_ch13.adb (Expand_N_Attribute_Definition_Clause): For
3288         attribute Storage_Size, insert the new assignement statement
3289         after the Size variable declaration.
3290         * exp_ch3.adb (Build_Init_Statements): Fill the CPU,
3291         Dispatching_Domain, Priority and Size components with the Rep
3292         Item expression (if any).
3293         * exp_ch9.adb (Expand_N_Task_Type_Declaration): _CPU,
3294         _Priority, _Domain fields are always present in the
3295         corresponding record type.
3296         (Find_Task_Or_Protected_Pragma): Removed.
3297         (Get_Relative_Deadline_Pragma): New routine.
3298         (Make_Initialize_Protection): Find_Task_Or_Protected_Pragma removed.
3299         (Make_Task_Create_Call): Check CPU, Size or
3300         Dispatching_Domain Rep Item is present using new routine Has_Rep_Item.
3301         * freeze.adb (Freeze_All): Push_Scope_And_Install_Discriminants
3302         and Uninstall_Discriminants_And_Pop_Scope calls added.
3303         (Freeze_Entity): Evaluate_Aspects_At_Freeze_Point call added.
3304         * sem_aux.adb (Nearest_Ancestor): Retrieve the nearest ancestor
3305         for private derived types.
3306         * sem_ch13.adb (Analyze_Aspect_Specifications): Clean-up
3307         and reordering. Delay analysis for all aspects (except some
3308         peculiar cases).
3309         (Analyze_Attribute_Definition_Clause):
3310         Attribute_CPU, Attribute_Dispatching_Domain,
3311         Interrupt_Priority and Attribute_Priority cases added.
3312         (Analyze_Freeze_Entity): Push_Scope_And_Install_Discriminants
3313         and Uninstall_Discriminants_And_Pop_Scope calls added.
3314         (Check_Aspect_At_Freeze_Point): Reordering and clean-up.
3315         (Duplicate_Clause): Issue an explicit error msg when the current
3316         clause duplicates an aspect specification, an attribute definition
3317         clause or a pragma.
3318         (Evaluate_Aspects_At_Freeze_Point): New routine.
3319         * sem_ch13.ads (Evaluate_Aspects_At_Freeze_Point): New routine.
3320         * sem_ch9.adb, sem_ch9.ads (Install_Discriminants): New routine.
3321         (Push_Scope_And_Install_Discriminants): New routine.
3322         (Uninstall_Discriminants): New routine.
3323         (Uninstall_Discriminants_And_Pop_Scope): New routine.
3324         * sem_prag.adb (Check_Duplicate_Pragma): Issue an explicit error
3325         msg when the current pragma duplicates an aspect specification,
3326         an attribute definition clause or a pragma.
3327         (Analyze_Pragma): Remove use of flags Has_Pragma_CPU,
3328         Has_Pragma_Priority and Has_Pragma_Dispatching_Domain.
3329         * sem_util.adb (Compile_Time_Constraint_Error): Don't complain
3330         about the type if the corresponding concurrent type doesn't come
3331         from source.
3332         * sinfo.adb, sinfo.ads (Has_Pragma_CPU): Removed.
3333         (Has_Pragma_Dispatching_Domain): Removed.
3334         (Has_Pragma_Priority): Removed.
3335         (Has_Task_Info_Pragma): Removed.
3336         (Has_Task_Name_Pragma): Removed.
3337         (Set_Has_Pragma_CPU): Removed.
3338         (Set_Has_Pragma_Dispatching_Domain): Removed.
3339         (Set_Has_Pragma_Priority): Removed.
3340         (Set_Has_Task_Info_Pragma): Removed.
3341         (Set_Has_Task_Name_Pragma): Removed.
3342         * snames.adb-tmpl (Get_Pragma_Id): Pragma_CPU,
3343         Pragma_Dispatching_Domain and Pragma_Interrupt_Priority added.
3344         (Is_Pragma_Name): Name_CPU, Name_Dispatching_Domain and
3345         Name_Interrupt_Priority added.
3346         * snames.ads-tmpl: Name_Dispatching_Domain, Name_CPU
3347         and Name_Interrupt_Priority moved to the list of
3348         Attribute_Name. Attribute_CPU, Attribute_Dispatching_Domain and
3349         Attribute_Interrupt_Priority added.  Pragma_Dispatching_Domain,
3350         Pragma_CPU and Pragma_Interrupt_Priority moved to the end of
3351         the Pragma_Name list.
3353 2012-06-12  Arnaud Charlet  <charlet@adacore.com>
3355         * xref_lib.adb (Get_Full_Type): Add support for 'G'.
3357 2012-06-12  Tristan Gingold  <gingold@adacore.com>
3359         * a-exexpr-gcc.adb (Unwind_Exception): Add 4 more private fields.
3361 2012-06-12  Fedor Rybin  <frybin@adacore.com>
3363         * gnat_ugn.texi: Update doc on gnattest.
3365 2012-06-12  Robert Dewar  <dewar@adacore.com>
3367         * sem_ch12.adb: Add comments.
3369 2012-06-12  Robert Dewar  <dewar@adacore.com>
3371         * switch-c.adb, inline.adb, usage.adb, opt.ads: Minor reformatting.
3373 2012-06-12  Robert Dewar  <dewar@adacore.com>
3375         * sem_ch12.adb: Minor reformatting.
3377 2012-06-12  Eric Botcazou  <ebotcazou@adacore.com>
3379         * opt.ads (Inline_Level): New variable.
3380         * gnat1drv.adb (Adjust_Global_Switches): Set it based on optimization
3381         level if it has not been set by the user.
3382         * switch-c.adb (Scan_Front_End_Switches): Accept -gnatn1 and -gnatn2
3383         and set Inline_Level accordingly.
3384         * inline.adb (Add_Inlined_Body): Declate new Inline_Level_Type type.
3385         (Must_Inline): Return Inline_Level_T instead of Boolean to indicate
3386         whether the package of the inlined subprogram must be compiled.
3387         If Inline_Level is set to 1, only compile packages of subprograms
3388         directly called from the main unit.
3389         * usage.adb (Usage): Adjust line for -gnatn switch.
3390         * gnat_ugn.texi (Switches for gcc): Document -gnatn1 and -gnatn2.
3392 2012-06-12  Ed Schonberg  <schonberg@adacore.com>
3394         * sem_ch12.adb (Instantiate_Formal_Subprogram): Do not apply
3395         AI05-296 if the actual is overloaded. In this case The rule must
3396         be applied after resolution, in Analyze_Subprogram_Renaming.
3398 2012-06-12  Robert Dewar  <dewar@adacore.com>
3400         * stringt.adb: Minor reformatting.
3402 2012-06-12  Robert Dewar  <dewar@adacore.com>
3404         * ali-util.adb, stringt.ads: Minor reformatting.
3406 2012-06-12  Hristian Kirtchev  <kirtchev@adacore.com>
3408         * exp_ch7.adb (Process_Declarations): Handle the case where
3409         the original context has been wrapped in a block to avoid
3410         interference between exception handlers and At_End handlers.
3411         (Wrap_HSS_In_Block): Mark the block which contains the original
3412         statements of the context as being a finalization wrapper.
3413         * sinfo.adb (Is_Finalization_Wrapper): New routine.
3414         (Set_Is_Finalization_Wrapper): New routine.
3416         * sinfo.ads: Add new attribute Is_Finalization_Wrapper applicable
3417         to block statemnts.
3418         (Is_Finalization_Wrapper): New routine with corresponding pragma Inline.
3419         (Set_Is_Finalization_Wrapper): New routine with corresponding pragma
3420         Inline.
3422 2012-06-12  Steve Baird  <baird@adacore.com>
3424         * gnat1drv.adb (Adjust_Global_Switches): No longer need to set
3425         Exception_Extra_Info in CodePeer_Mode.
3427 2012-06-12  Robert Dewar  <dewar@adacore.com>
3429         * sem_dist.adb, exp_ch7.adb, sem_type.adb, exp_attr.adb,
3430         sinfo.ads, sem_ch7.adb, exp_alfa.adb, sem_scil.adb, sem_ch12.adb,
3431         sem_util.adb, sem_res.adb, sem_attr.adb, sem_elab.adb, exp_ch6.adb,
3432         sem_ch4.adb, sem_warn.adb, scil_ll.adb, exp_cg.adb: Minor code
3433         reorganization.
3435 2012-06-12  Eric Botcazou  <ebotcazou@adacore.com>
3437         * s-tasini.ads: Minor fix in comment.
3439 2012-06-12  Thomas Quinot  <quinot@adacore.com>
3441         * freeze.adb (Freeze_Record_Type): Warn on record with
3442         Scalar_Storage_Order if there is no placed component.
3444 2012-06-12  Thomas Quinot  <quinot@adacore.com>
3446         * sem_ch3.adb: Minor comment fix.
3448 2012-06-12  Vincent Celier  <celier@adacore.com>
3450         * ali-util.adb (Time_Stamp_Mismatch): In minimal recompilation
3451         mode, use Stringt Mark and Release to avoid growing the Stringt
3452         internal tables uselessly.
3453         * stringt.adb (Strings_Last): New global variable
3454         (String_Chars_Last): New global variable.
3455         (Mark, Release): New procedures.
3456         * stringt.ads (Mark, Release) New procedures.
3458 2012-06-12  Hristian Kirtchev  <kirtchev@adacore.com>
3460         * exp_ch7.adb (Process_Transient_Objects): Renamed constant
3461         Requires_Hooking to Must_Hook and replace all occurrences of the name.
3462         (Requires_Hooking): New routine. Detect all contexts that require
3463         transient variable export to the outer finalizer due to a potential
3464         exception.
3466 2012-06-12  Ed Schonberg  <schonberg@adacore.com>
3468         * sem_ch12.adb: Small adjustment.
3470 2012-06-12  Vincent Celier  <celier@adacore.com>
3472         * vms_cmds.ads (Command_Type): New enumeration value Test
3473         * vms_conv.adb (Initialize): Add component at index Test in
3474         Command_List
3475         * vms_data.ads (Test_Switches): New global variable for the
3476         switches of gnattest, currently empty.
3478 2012-06-12  Ed Schonberg  <schonberg@adacore.com>
3480         * sem_ch3.adb (Analyze_Subtype_Declaration): if an incomplete
3481         type is tagged, so is a subtype of it.
3482         * sem_ch12.adb (Validate_Actual_Subprogram): implement AI05-0296,
3483         concerning freeze rules in the presence of formal incomplete
3484         types: a formal abstract subprogram cannot have an incomplete
3485         controlling type, and the profile of the actual subprogram does
3486         not freeze if it includes an incomplete untagged type.
3488 2012-06-12  Robert Dewar  <dewar@adacore.com>
3490         * a-direct.adb: Minor reformatting.
3492 2012-06-12  Robert Dewar  <dewar@adacore.com>
3494         * gnat_ugn.texi: Add missing documentation for -gnatw.v and
3495         -gnatw.V.
3497 2012-06-12  Thomas Quinot  <quinot@adacore.com>
3499         * sem_ch7.adb, sem_prag.adb, sem_ch12.adb, sem_ch4.adb,
3500         sem_ch13.adb: Minor rewording of error messages for unchecked unions.
3502 2012-06-12  Robert Dewar  <dewar@adacore.com>
3504         * lib-xref.ads: Minor reformatting.
3506 2012-06-12  Pascal Obry  <obry@adacore.com>
3508         * a-direct.adb (Delete_File): Delete symbolic links silently
3509         instead of raising the Name_Error exception when the symbolic
3510         link is pointing to a non existent file.
3512 2012-06-12  Robert Dewar  <dewar@adacore.com>
3514         * xref_lib.adb, sem_ch13.adb, lib-xref.adb: Minor reformatting.
3516 2012-06-12  Javier Miranda  <miranda@adacore.com>
3518         * lib-xref.ads Adding missing documentation.
3520 2012-06-12  Hristian Kirtchev  <kirtchev@adacore.com>
3522         * exp_ch7.adb (Create_Finalizer): Add the
3523         exception reraise mechanism at the very end of the finalizer
3524         statements. This placement ensures that all objects are finalized,
3525         the secondary stack mark released and aborts undeferred before
3526         propagating an exception.
3528 2012-06-12  Ed Schonberg  <schonberg@adacore.com>
3530         * sem_ch10.adb (Remove_Unit_From_Visibility): if the unit is a
3531         wrapper package. remove from visibility the original subprogram
3532         instance.
3534 2012-06-12  Javier Miranda  <miranda@adacore.com>
3536         * sem_prag.adb (Process_Convention): Generate reference to entity
3537         exported to foreign language. Needed for GPS navigation.
3538         * xref_lib.adb (Parse_Identifier_Info): Parse exported entities.
3539         * lib-xref (Output_References): Output exported entities.
3541 2012-06-12  Pascal Obry  <obry@adacore.com>
3543         * prj-attr.adb: Add install package and corresponding attributes.
3544         * snames.ads-tmpl (Name_Active): New constant.
3545         (Name_Exec_Subdir): Likewise.
3546         (Name_Install): Likewise.
3547         (Name_Lib_Subdir): Likewise.
3548         (Name_Project_Subdir): Likewise.
3549         (Name_Sources_Subdir): Likewise.
3551 2012-06-12  Bob Duff  <duff@adacore.com>
3553         * sem_res.adb (Check_Infinite_Recursion):
3554         Suppress spurious warning on recursion after "raise with ...".
3556 2012-06-12  Thomas Quinot  <quinot@adacore.com>
3558         * sem_prag.adb (Analyze_Pragma, case Unchecked_Union): Do
3559         not crash on illegal unchecked union that is a null record.
3561 2012-06-12  Thomas Quinot  <quinot@adacore.com>
3563         * exp_ch4.adb (Has_Inferable_Discriminants): Reorganize code to
3564         treat implicit dereferences with a constrained unchecked union
3565         nominal subtype as having inferable discriminants. 
3567 2012-06-12  Robert Dewar  <dewar@adacore.com>
3569         * sem_ch6.adb: Minor reformatting.
3571 2012-06-12  Eric Botcazou  <ebotcazou@adacore.com>
3573         * gnat_ugn.texi: Couple of minor corrections.
3575 2012-06-12  Thomas Quinot  <quinot@adacore.com>
3577         * sem_prag.adb (Check_Variant): An empty component list is not
3578         illegal in an unchecked union variant.
3580 2012-06-12  Gary Dismukes  <dismukes@adacore.com>
3582         * projects.texi: Remove comments.
3584 2012-06-12  Thomas Quinot  <quinot@adacore.com>
3586         * back_end.adb (Scan_Back_End_Switches): Treat -fdump-scos as
3587         synonym of -gnateS.
3588         (gnat_post_options): Disable gimple-based SCO generator.
3589         * gnat_ugn.texi: Document that -gnateS is an obsolete synonym
3590         of -fdump-scos.
3592 2012-06-12  Ed Schonberg  <schonberg@adacore.com>
3594         * sem_ch6.adb (Different_Generic_Profile): new predicate for
3595         Find_Corresponding_Spec, to handle a rare case of accidental
3596         overloading in an instance, when the profile of a subprogram body
3597         that depends on a formal type becomes compatible with that of
3598         a homonym whose profile in the generic mentions the actual type.
3600 2012-06-12  Thomas Quinot  <quinot@adacore.com>
3602         * gnat1drv.adb: Minor reformatting.
3604 2012-06-12  Ed Schonberg  <schonberg@adacore.com>
3606         * sem_util.adb (Build_Explicit_Dereference): If the expression
3607         is an entity, ensure that the type of the expression is the same
3608         as that of the entity.
3610 2012-06-12  Pat Rogers  <rogers@adacore.com>
3612         * projects.texi: Corrected instances of the word "build" that
3613         should be "built" instead. Other similar changes and minor
3614         punctuation changes.
3616 2012-06-12  Eric Botcazou  <ebotcazou@adacore.com>
3618         * sem_util.adb (Is_Atomic_Object): Return true for an atomic
3619         component as well as a prefix which is an atomic component.
3621 2012-06-12  Ed Schonberg  <schonberg@adacore.com>
3623         * exp_prag.adb (Expand_Pragma_Import_Or_Interface): revert previous
3624         patch. The processing of interfacing aspects now generates a
3625         proper Ada 2005 pragma.
3626         * sem_prag.adb (Analyze_Pragma, cases Pragma_Export and
3627         Pragma_Import): revert previous patch.  The processing of
3628         interfacing aspects now generates a proper Ada 2005 pragma.
3629         * sem_ch13.adb (Analyze_Aspect_Specifications): generate proper
3630         pragam for aspects Convention, Import and Export. Scan list
3631         of aspects to collect link name and external name if present,
3632         and verify that a complete pragma can be generated.
3634 2012-06-11  Olivier Hainque  <hainque@adacore.com>
3636         * gcc-interface/Makefile.in (GNATLIBCFLAGS_FOR_C): Remove
3637         $(PIC_FLAG_FOR_TARGET).
3638         (gnatlib-shared-default): Add $(PIC_FLAG_FOR_TARGET) to
3639         GNATLIBCFLAGS_FOR_C passed to gnatlib.
3640         (gnatlib-shared-win32): Likewise.
3641         (gnatlib-shared-darwin): Likewise.
3642         (gnatlib-shared-dual-win32): Pass PIC_FLAG_FOR_TARGET to
3643         gnatlib-shared-win32.
3645 2012-06-11  Eric Botcazou  <ebotcazou@adacore.com>
3647         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Convert GNU_SIZE
3648         to units before invoking allocatable_size_p on it.
3649         Remove orphaned comment.  Do not use ssize_int.
3650         <E_Record_Subtype>: Traverse list in original order.  Minor tweak.
3651         (allocatable_size_p): Adjust and simplify.
3652         (build_subst_list): Use consistent terminology throughout.
3653         (build_variant_list): Likewise.  Traverse list in original order.
3654         (create_field_decl_from): Likewise.
3655         (copy_and_substitute_in_size): Likewise.
3656         (create_variant_part_from): Add comment about field list order.
3657         * gcc-interface/utils.c (build_vms_descriptor): Do not use ssize_int.
3658         * gcc-interface/utils2.c (build_allocator): Likewise.
3660 2012-06-11  Eric Botcazou  <ebotcazou@adacore.com>
3662         * gcc-interface/trans.c (Identifier_to_gnu): Test Is_Elementary_Type
3663         instead of Is_Scalar_Type for a constant with an address clause.
3664         Do not return the underlying constant for a constant used by reference
3665         if it holds the address of a constant and an lvalue is required.
3667 2012-06-11  Eric Botcazou  <ebotcazou@adacore.com>
3669         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not specifically deal
3670         with external constants wrt force_global here...
3671         <E_Constant>: ...but here instead.
3672         * gcc-interface/utils.c (gnat_pushdecl): Do not put external DECLs onto
3673         the list of global DECLs.
3675 2012-06-11  Eric Botcazou  <ebotcazou@adacore.com>
3677         * gcc-interface/decl.c (gnat_to_gnu_entity): Translate the Esize on
3678         entry only for elementary types and abort if it is too large.
3679         <E_Record_Type>: Make sure the Esize is known before using it.
3681 2012-06-04  Steven Bosscher  <steven@gcc.gnu.org>
3683         * gcc-interface/utils2.c: Do not include output.h.
3684         * gcc-interface/Make-lang.in: Fix dependencies.
3686 2012-05-29  Michael Matz  <matz@suse.de>
3688         * gcc-interface/utils.c (create_var_decl_1): Don't call expand_decl.
3690 2012-05-26  Eric Botcazou  <ebotcazou@adacore.com>
3692         * gcc-interface/decl.c (variant_desc): Rename 'record' to 'new_type'.
3693         (build_variant_list): Adjust to above renaming.
3694         (gnat_to_gnu_entity) <E_Record_Subtype>: Likewise.  Give a unique name
3695         to the type of the variant containers.
3696         (create_variant_part_from): Likewise.  Give a unique name to the type
3697         of the variant part.
3699 2012-05-25  Eric Botcazou  <ebotcazou@adacore.com>
3701         PR ada/52362
3702         * link.c (__gnat_object_file_option): Set to "-Wl,@" for GNU linker.
3703         (__gnat_using_gnu_linker): Delete.
3704         * gnatlink.adb (Gnatlink): Declare Object_File_Option_Ptr here...
3705         Declare Object_File_Option string constant and Using_GNU_response_file
3706         boolean constant.
3707         (Process_Binder_File): ...instead of here.  Delete Using_GNU_Linker,
3708         Opening and Closing local variables.  Do not handle the GNU linker
3709         specially.
3710         (Write_RF): New procedure to write into the response file.  Escape some
3711         characters if a GNU response file is used.  Keep track of error status.
3712         Invoke Write_RF to write into the response file.  Delete the file only
3713         if the link was successful.
3714         * mlib-utl.adb: Do not `with' package System.
3715         (Gcc): Likewise.  Declare Object_File_Option string constant and
3716         Using_GNU_response_file boolean constant.
3717         (Write_RF): Take a string instead of address and length.  Escape some
3718         characters if a GNU response file is used.
3719         Invoke Write_RF to write into the response file.  Delete the file only
3720         if the link was successful.  Do not warn if it cannot be deleted.
3722 2012-05-20  Eric Botcazou  <ebotcazou@adacore.com>
3724         * gcc-interface/utils.c (gnat_write_global_declarations): Put a name
3725         on the dummy global variable.
3727 2012-05-19  Eric Botcazou  <ebotcazou@adacore.com>
3729         * gcc-interface/decl.c (Has_Thiscall_Convention): New macro.
3730         (gnat_to_gnu_entity) <E_Subprogram_Type>: Test it to set the thiscall
3731         calling convention
3732         (get_minimal_subprog_decl): Likewise.
3733         (gnat_first_param_is_class): New predicate.
3735         * gcc-interface/misc.c (gnat_handle_option): Fix formatting.
3736         * gcc-interface/Makefile.in: Likewise.
3738 2012-05-18  Eric Botcazou  <ebotcazou@adacore.com>
3740         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: For an object at
3741         global level with unconstrained nominal subtype and a non-fixed size,
3742         make a variable for the size.
3744 2012-05-15  Andris Pavenis  <andris.pavenis@iki.fi>
3746         PR ada/52494
3747         * s-taprop-dummy.adb (Specific): New package.
3749 2012-05-15  Olivier Hainque  <hainque@adacore.com>
3751         * gcc-interface/Make-lang.in (COMMON_FLAGS_TO_PASS): Use WARN_CFLAGS
3752         instead of trying to mimic it.
3754 2012-05-15  Robert Dewar  <dewar@adacore.com>
3756         * sem_ch5.adb, sem_util.adb, s-stposu.adb, exp_ch4.adb: Minor
3757         reformatting.
3759 2012-05-15  Geert Bosch  <bosch@adacore.com>
3761         * uintp.adb (UI_Rem): Remove optimizations, as they are complex and are
3762         not needed.
3763         (Sum_Digits): Remove, no longer used.
3764         (Sum_Double_Digits): Likewise.
3766 2012-05-15  Yannick Moy  <moy@adacore.com>
3768         * aspects.ads: Minor typo.
3770 2012-05-15  Thomas Quinot  <quinot@adacore.com>
3772         * gnat_rm.texi (Scalar_Storage_Order): Fix RM reference.
3773         * sem_ch13.adb: Minor comment fix: incorrect RM reference.
3775 2012-05-15  Eric Botcazou  <ebotcazou@adacore.com>
3777         * sem_prag.adb (Process_Atomic_Shared_Volatile): Propagate
3778         atomicity from an object to its underlying type only if it
3779         is composite.
3781 2012-05-15  Ed Schonberg  <schonberg@adacore.com>
3783         * sem_ch5.adb (Analyze_Iterator_Specification): Set kind of
3784         loop variable after pre-analysis of iterator name, to prevent
3785         premature usage of loop variable.
3787 2012-05-15  Ed Schonberg  <schonberg@adacore.com>
3789         * sem_util.adb (Is_Variable): In Ada 2012, an explicit
3790         dereference that is a rewriting of an expression whose type has
3791         a declared Implicit_Derenference aspect is a variable.
3793 2012-05-15  Hristian Kirtchev  <kirtchev@adacore.com>
3795         * exp_ch4.adb (Insert_Dereference_Action): Reimplemented. The
3796         routine performs address and size adjustments for dereferences
3797         of heap-allocated controlled objects. This manipulation is needed
3798         in order to restore the original state of the memory at the time
3799         it was allocated by the finalization machinery.
3800         * rtsfind.ads: Add RE_Adjust_Controlled_Dereference to tables
3801         RE_Id and RE_Unit_Table.
3802         * sinfo.adb (Has_Dereference_Action): New routine.
3803         (Set_Has_Dereference_Action): New routine.
3804         * sinfo.ads: Add new semantic flag Has_Dereference_Action along
3805         its association in nodes.
3806         (Has_Dereference_Action): New routine and pragma Inline.
3807         (Set_Has_Dereference_Action): New routine and pragma Inline.
3808         * s-stposu.ads, s-stposu.adb (Adjust_Controlled_Dereference): New
3809         routine.
3811 2012-05-15  Thomas Quinot  <quinot@adacore.com>
3813         * uintp.adb (Image_Uint): Use UI_Div_Rem to get quotient and
3814         remainder of U / Base in a single operation.
3816 2012-05-15  Robert Dewar  <dewar@adacore.com>
3818         * exp_ch5.adb, inline.adb, sem_ch10.adb, prj.ads, sem_util.adb,
3819         a-ngelfu.ads, exp_ch4.adb, exp_ch6.adb, aspects.ads, sem_ch6.adb,
3820         vms_data.ads, exp_ch3.adb, prj-env.adb: Minor reformatting.
3822 2012-05-15  Thomas Quinot  <quinot@adacore.com>
3824         * exp_ch4.adb (Has_Inferable_Discriminants): For a qualified
3825         expression, use correct node for test on the subtype denoted by
3826         the subtype mark.
3828 2012-05-15  Eric Botcazou  <ebotcazou@adacore.com>
3830         * inline.adb (Scope_In_Main_Unit): Rename into...
3831         (In_Main_Unit_Or_Subunit): ...this.  Also return
3832         true if the subprogram is within a subunit of the
3833         main unit.
3834         (Add_Inlined_Body): Adjust for above renaming.
3835         (Add_Inlined_Subprogram): Likewise.  Pass the subprogram directly.
3836         (Analyze_Inlined_Bodies): Really set aside inlined subprograms
3837         not handled by Add_Inlined_Body.
3839 2012-05-15  Ed Schonberg  <schonberg@adacore.com>
3841         * sem_ch10.adb (Expand_With_Clause): In the context of a generic
3842         package declaration, a private with-clause on a child unit implies
3843         that the implicit with clauses on its parents are private as well.
3845 2012-05-15  Javier Miranda  <miranda@adacore.com>
3847         * sem_ch6.adb (Is_Interface_Conformant): Add missing call to
3848         Base_Type to handle subtypes.
3849         * exp_ch6.adb (Expand_Call): For calls located in thunks handle
3850         unchecked conversions of access types found in actuals.
3851         * exp_disp.adb (Expand_Interface_Thunk): Add missing unchecked
3852         conversion to actuals whose type is an access type. Done to
3853         avoid reporting spurious errors.
3855 2012-05-15  Vincent Celier  <celier@adacore.com>
3857         * prj-env.adb (Create_Mapping): Ignore sources that are
3858         suppressed (Create_Mapping_File.Process): Ditto
3859         * prj-nmsc.adb (Add_Source): Update to take into
3860         account suppressed files that may hide inherited sources.
3861         (Mark_Excluded_Sources): Mark excluded sources of the current
3862         project as suppressed.
3863         * prj.ads (Source_Data): New Boolean component Suppressed,
3864         defaulted to False
3866 2012-05-15  Thomas Quinot  <quinot@adacore.com>
3868         * exp_intr.adb: Minor reformatting.
3870 2012-05-15  Thomas Quinot  <quinot@adacore.com>
3872         * gnat_rm.texi: Document attribute Scalar_Storage_Order.
3874 2012-05-15  Javier Miranda  <miranda@adacore.com>
3876         * exp_ch3.adb (Build_Offset_To_Top): Modify the
3877         expansion of the offset_to_top functions to ensure that their
3878         profile is conformant with the profile specified in Ada.Tags. No
3879         change in functionality.
3881 2012-05-15  Eric Botcazou  <ebotcazou@adacore.com>
3883         * inline.adb (Subp_Info): Remove Count and Next_Nopred
3884         components, add Processed component and move around Next component.
3885         (Add_Call): Reverse meaning of Successors table to the natural one.
3886         (Add_Inlined_Body): Do not inline a package if it is in the main unit.
3887         (Add_Inlined_Subprogram): Do not add the subprogram to the list if the
3888         package is in the main unit. Do not recurse on the successors.
3889         (Add_Subp): Adjust to new contents of Subp_Info.
3890         (Analyze_Inlined_Bodies): Do not attempt
3891         to compute a topological order on the list of inlined subprograms,
3892         but compute the transitive closure from the main unit instead.
3893         (Get_Code_Unit_Entity): Always return the spec for a package.
3895 2012-05-15  Yannick Moy  <moy@adacore.com>
3897         * aspects.ads: Minor addition of comments to provide info on
3898         how to add new aspects.
3900 2012-05-15  Thomas Quinot  <quinot@adacore.com>
3902         * osint.ads: Minor reformatting.
3904 2012-05-15  Thomas Quinot  <quinot@adacore.com>
3906         * exp_ch5.adb, exp_pakd.adb, sem_util.adb, sem_util.ads
3907         (Expand_Assign_Array): Handle the case of a packed bit array within a
3908         record with reverse storage order (assign element by element in that
3909         case).
3910         (In_Reverse_Storage_Order_Record): New subprogram,
3911         code extracted from Exp_Pakd.
3913 2012-05-15  Yannick Moy  <moy@adacore.com>
3915         * a-ngelfu.ads: Add postconditions using Ada 2012
3916         aspect syntax, reflecting some of the RM requirements for these
3917         functions, from Annex A.5.1 or G.2.4.
3919 2012-05-15  Thomas Quinot  <quinot@adacore.com>
3921         * adaint.c: Minor fix: move misplaced comment.
3923 2012-05-15  Doug Rupp  <rupp@adacore.com>
3925         * vms_data.ads: Enhance help for /IMMEDIATE_ERRORS to discourage
3926         use by customers.
3928 2012-05-15  Tristan Gingold  <gingold@adacore.com>
3930         * a-exextr.adb: Add comment.
3932 2012-05-15  Ed Schonberg  <schonberg@adacore.com>
3934         * sem_ch3.adb: Minor reformatting (remove long dead code).
3936 2012-05-15  Ed Schonberg  <schonberg@adacore.com>
3938         * aspects.adb, aspects.ads: Add aspects for Convention, Export,
3939         External_Name, Import, and Link_Name.
3940         * exp_prag.adb (Expand_Pragma_Import_Or_Interface): if the
3941         pragma comes from an aspect specification, the entity is the
3942         first argument.
3943         * sem_prag.adb (Analyze_Pragma, cases Pragma_Export and
3944         Pragma_Import): if the pragma comes from an aspect specification,
3945         the entity is the first argument, and the second has the value
3946         True by default.
3947         * sem_ch13.adb (Analyze_Aspect_Specifications): generate pragam
3948         for aspect Convention. Add placeholders for Link_Name and
3949         External_Name.
3951 2012-05-15  Hristian Kirtchev  <kirtchev@adacore.com>
3953         * exp_ch9.adb (Expand_N_Asynchronous_Select): Extract the statements
3954         of the abortable part and triggering alternative after being processed
3955         for controlled objects.
3956         (Expand_N_Timed_Entry_Call): Code and comment reformatting.
3958 2012-05-15  Robert Dewar  <dewar@adacore.com>
3960         * sem_util.adb: Minor code reorganization.
3962 2012-05-15  Robert Dewar  <dewar@adacore.com>
3964         * exp_ch7.adb, exp_ch11.adb, exp_ch11.ads: Minor reformatting.
3966 2012-05-15  Thomas Quinot  <quinot@adacore.com>
3968         * sem_res.adb (Resolve): Enforce E.2.2(11/2) and E.2.2(12) for
3969         'Unrestricted_Access and 'Unchecked_Access (not just 'Access):
3970         even in those cases, a remote access type may only designate a
3971         remote subprogram.
3973 2012-05-15  Thomas Quinot  <quinot@adacore.com>
3975         * sem_util.adb, sem_util.ads, sem_cat.adb: Minor refactoring.
3976         (Enclosing_Lib_Unit_Node): Rename to Enclosing_Comp_Unit_Node.
3978 2012-05-15  Ed Schonberg  <schonberg@adacore.com>
3980         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Remove obsolete
3981         checks on nested inlined subprograms.
3983 2012-05-15  Tristan Gingold  <gingold@adacore.com>
3985         * fe.h (Get_RT_Exception_Name): Declare.
3987 2012-05-15  Tristan Gingold  <gingold@adacore.com>
3989         * raise-gcc.c (db_region_for): Use %p + cast to avoid warnings.
3990         (get_region_description_for): Likewise.
3991         (db_action_for): Likewise.
3992         (get_call_site_action_for): Likewise.
3993         (get_ttype_entry_for): Remove useless 'const'.
3994         (PERSONALITY_FUNCTION): Add ATTRIBUTE_UNUSED on uw_exception_class.
3996 2012-05-15  Tristan Gingold  <gingold@adacore.com>
3998         * a-exextr.adb (Unhandled_Exception_Terminate): Save occurrence
3999         on the stack to avoid a dynamic memory allocation.
4001 2012-05-15  Bob Duff  <duff@adacore.com>
4003         * exp_ch9.adb (Expand_N_Timed_Entry_Call): Move initialization of
4004         E_Stats and D_Stats after Process_Statements_For_Controlled_Objects,
4005         because those calls can destroy the Statements list.
4007 2012-05-15  Tristan Gingold  <gingold@adacore.com>
4009         * fe.h (Get_RT_Exception_Name): Define.
4010         * types.ads (RT_Exception_Code): Update comment.
4011         * exp_ch11.adb, exp_ch11.ads (Get_RT_Exception_Name): New
4012         procedure to get the name of the rcheck subprograms.
4013         * a-except-2005.adb (Rcheck_xx): Rename.
4014         * a-except.adb Likewise, but also keep the old Rcheck_nn routines
4015         for bootstrap.
4016         * arith64.c (__gnat_mulv64): Use __gnat_rcheck_CE_Overflow_Check
4017         instead of __gnat_rcheck_10.
4018         * gcc-interface/trans.c (build_raise_check): Use Get_RT_Exception_Name
4019         to create the __gnat_rcheck routines name.
4020         * gcc-interface/Make-lang.in: Update dependencies.
4022 2012-05-15  Tristan Gingold  <gingold@adacore.com>
4024         * exp_ch7.adb (Build_Exception_Handler): Save current
4025         occurrence only if -gnateE.
4026         (Build_Object_Declaration): Declare E_Id only if -gnateE.
4027         (Build_Raise_Statement): Call Raise_From_Controlled_Operation only if
4028         -gnateE (else raise PE).
4029         * s-soflin.adb (Save_Library_Occurrence): Handle null occurrence
4030         access.
4031         * a-except-2005.adb (Reraise_Library_Exception_If_Any): Call
4032         Raise_From_Controlled_Operation only if the saved occurrence is
4033         not null, otherwise raise PE.
4035 2012-05-15  Yannick Moy  <moy@adacore.com>
4037         * exp_alfa.ads: Add comments describing the Alfa mode.
4039 2012-05-15  Tristan Gingold  <gingold@adacore.com>
4041         * s-soflin.ads, s-soflin.adb (Save_Library_Occurrence): Parameter
4042         E is now of type Exception_Occurrence_Access.
4043         * exp_ch7.ads, exp_ch7.adb (Build_Exception_Handler): Adjust generated
4044         call to Save_Library_Occurrence.
4046 2012-05-15  Thomas Quinot  <quinot@adacore.com>
4048         * exp_ch4.adb (Rewrite_Coextension): Use Insert_Action to
4049         insert temporary variable decl at the proper place in the tree.
4051 2012-05-15  Hristian Kirtchev  <kirtchev@adacore.com>
4053         * g-calend.adb (Split_At_Locale): New routine.
4054         (Time_Of_At_Locale): New routine.
4055         * g-calend.ads (Split_At_Locale): New routine.
4056         (Time_Of_At_Locale): New routine.
4058 2012-05-15  Gary Dismukes  <dismukes@adacore.com>
4060         * a-except.ads: Minor reformatting.
4062 2012-05-15  Ed Schonberg  <schonberg@adacore.com>
4064         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): If the loop
4065         parameter specification is part of a quantified expression, and it
4066         already carries a type, do not repeat the analysis to preserve
4067         type information: a range attribute reference may have been
4068         rewritten as a range with static bounds, and its re-analysis may
4069         type it as Integer by default, instead of the original index type.
4071 2012-05-15  Robert Dewar  <dewar@adacore.com>
4073         * s-osprim-mingw.adb: Minor reformatting.
4075 2012-05-15  Arnaud Charlet  <charlet@adacore.com>
4077         * a-except.adb, a-except.ads (Reraise_Library_Exception_If_Any): New.
4078         Mark this unit preelaborate.
4079         * s-soflin.ads: Make package Preelaborate.
4081 2012-05-15  Robert Dewar  <dewar@adacore.com>
4083         * s-osprim-mingw.adb, sem_eval.adb, a-calend-vms.ads: Minor reformatting
4085 2012-05-15  Ed Schonberg  <schonberg@adacore.com>
4087         * sem_eval.adb (Subtypes_Statically_Match): In Ada 2012, static
4088         matching requires matching of static subtype predicates as well.
4090 2012-05-15  Ed Schonberg  <schonberg@adacore.com>
4092         * sem_case.adb (Analyze_Choices): If the subtype of the
4093         expression has a non-static predicate, the case alternatives
4094         must cover the base type.
4096 2012-05-15  Tristan Gingold  <gingold@adacore.com>
4098         * a-calend-vms.ads: Add pragma export to Split and Time_Of.
4099         Merge comments from a-calend.ads to minimize differences.
4101 2012-05-15  Sergey Rybin  <rybin@adacore.com frybin>
4103         * gnat_ugn.texi: gnatmetric: add a small example that demonstrates
4104         the difference between control coupling and unit coupling.
4106 2012-05-15  Tristan Gingold  <gingold@adacore.com>
4108         * bindgen.adb (Gen_Header): Remove code to emit LE_Set.
4109         (Gen_Finalize_Library): Replace test with
4110         a call to __gnat_reraise_library_exception_if_any.
4111         * s-soflin.ads (Library_Exception): Do not export.
4112         (Library_Exception_Set): Likewise.
4113         * a-except-2005.ads, a-except-2005.adb
4114         (Reraise_Library_Exception_If_Any): New procedure.
4116 2012-05-15  Geert Bosch  <bosch@adacore.com>
4118         * sem_ch9.adb (Allows_Lock_Free_Implementation): out or in out
4119         parameters can be access types as well, not just scalar types,
4120         so relax the test to Is_Elementary_Type.
4122 2012-05-15  Bob Duff  <duff@adacore.com>
4124         * s-atacco.ads s-atacco.adb: Replace pragma Elaborate_Body
4125         with pragma No_Body.
4126         (Xyz): Remove Xyz, which is apparently unnecessary.
4128 2012-05-15  Tristan Gingold  <gingold@adacore.com>
4130         * a-calend-vms.adb: Complete previous change.
4132 2012-05-15  Bob Duff  <duff@adacore.com>
4134         * s-win32.ads: Minor comment fix.
4135         * s-osprim-mingw.adb: Minor editing.
4137 2012-05-15  Robert Dewar  <dewar@adacore.com>
4139         * exp_ch9.adb, sem_ch9.adb, sem_ch13.adb: Minor reformatting.
4141 2012-05-15  Robert Dewar  <dewar@adacore.com>
4143         * g-comlin.adb, g-comlin.ads: Minor reformatting.
4145 2012-05-15  Vincent Pucci  <pucci@adacore.com>
4147         * aspects.adb, aspects.adb: Reordering of the Aspect_Idi list. New
4148         aspect Aspect_Lock_Free.
4149         * einfo.adb, einfo.ads: New flag Uses_Lock_Free (flag 188).
4150         (Set_Uses_Lock_Free): New routine.
4151         (Uses_Lock_Free): New routine.
4152         * exp_ch7.adb (Is_Simple_Protected_Type): Return False for
4153         lock-free implementation.
4154         * exp_ch9.adb (Allows_Lock_Free_Implementation): Moved to Sem_Ch9.
4155         (Build_Lock_Free_Unprotected_Subprogram_Body): Protected
4156         procedure uses __sync_synchronise. Check both Object_Size
4157         and Value_Size.
4158         (Expand_N_Protected_Body): Lock_Free_Active
4159         renames Lock_Free_On.
4160         (Expand_N_Protected_Type_Declaration):
4161         _Object field removed for lock-free implementation.
4162         (Install_Private_Data_Declarations): Protection object removed
4163         for lock-free implementation.
4164         (Make_Initialize_Protection):
4165         Protection object initialization removed for lock-free implementation.
4166         * rtsfind.ads: RE_Atomic_Synchronize and RE_Relaxed added.
4167         * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect_Lock_Free
4168         analysis added.
4169         * sem_ch9.adb (Allows_Lock_Free_Implementation): New routine.
4170         (Analyze_Protected_Body): Allows_Lock_Free_Implementation call added.
4171         (Analyze_Protected_Type_Declaration):
4172         Allows_Lock_Free_Implementation call added.
4173         (Analyze_Single_Protected_Declaration): Second analysis of
4174         aspects removed.
4175         * s-atopri.ads: Header added.
4176         (Atomic_Synchronize): New routine.
4178 2012-05-15  Robert Dewar  <dewar@adacore.com>
4180         * exp_ch7.ads: Add comment.
4182 2012-05-15  Hristian Kirtchev  <kirtchev@adacore.com>
4184         * a-calend.adb (Day_Of_Week): The routine once again treats
4185         all dates as historic.  (Formatting_Operations.Split): All
4186         calls to UTC_Time_Offset are now controlled through formal
4187         parameter Is_Historic.  (Formatting_Operations.Time_Of):
4188         All calls to UTC_Time_Offset are now handled through
4189         formal parameter Is_Historic.
4190         (Split): Update the call to Formatting_Operations.Split.
4191         (Time_Of): Update the call to Formatting_Operations.Time_Of.
4192         (To_Ada_Time): Update the call to Formatting_Operations.Time_Of.
4193         (To_Strict_Tm): Update the call to Formatting_Operations.Split.
4194         * a-calend.ads (Split): Add new formal Is_Historic along with
4195         comment on usage. This routine is now exported for the purposes
4196         of GNAT.Calendar.Locale.
4197         (Time_Of): Remove defaults. Add new
4198         formal Is_Historic along with comment on usage. This routine is
4199         now exported for the purposes of GNAT.Calendar.Locale.
4200         * a-calend-vms.adb (Split): Update the call to
4201         Formatting_Operations.Split.
4202         (Time_Of): Update the call to Formatting_Operations.Time_Of.
4203         * a-calend-vms.ads (Split): Add new formal Is_Historic along
4204         with comment on usage.  (Time_Of): Remove defaults. Add new
4205         formal Is_Historic along with comment on usage.
4206         * a-calfor.adb (Split): Update the call to
4207         Formatting_Operations.Split.
4208         (Time_Of): Update the call to Formatting_Operations.Time_Of.
4210 2012-05-15  Vincent Celier  <celier@adacore.com>
4212         * prj-nmsc.adb (Add_Source): Always add the source if it is
4213         excluded, to avoid incorrect duplicate checks.
4215 2012-05-15  Yannick Moy  <moy@adacore.com>
4217         * sem_aux.ads: Correct typo.
4218         * sem_eval.adb (Compile_Time_Known_Value): Return False in Alfa
4219         mode for a deferred constant when outside of the scope of its
4220         full view.
4222 2012-05-15  Emmanuel Briot  <briot@adacore.com>
4224         * g-comlin.adb, g-comlin.ads (Define_Switch): Allow specifying the name
4225         of the argument, for the automatic help message.
4226         (Getopt): do not systematically initialize switches with string values
4227         to the empty string, when the user has already specified a default.
4229 2012-05-14  Bernd Schmidt  <bernds@codesourcery.com>
4231         * gcc-interface/utils.c (DEF_ATTR_STRING): New.
4233 2012-05-14  Manuel López-Ibáñez  <manu@gcc.gnu.org>
4235         PR 53063
4236         * gcc-interface/misc.c: Include opts.h and options.h before tm.h.
4237         (gnat_handle_option): Call lang-specific generated function.
4239 2012-05-13  Manuel López-Ibáñez  <manu@gcc.gnu.org>
4241         * gcc-interface/lang.opt (I): Comment out help text with no effect.
4242         (nostdinc): Comment out help text with no effect.
4244 2012-05-12  Eric Botcazou  <ebotcazou@adacore.com>
4246         * gcc-interface/Makefile.in (TOOLS_LIBS): Add ../../ggc-none.o.
4248 2012-05-11  Manuel López-Ibáñez  <manu@gcc.gnu.org>
4250         PR 53063
4251         * gcc-interface/misc.c (gnat_parse_file): Move before ...
4252         (gnat_handle_option): ... this. Use handle_generated_option.
4254 2012-05-10  Richard Guenther  <rguenther@suse.de>
4256         * gcc-interface/cuintp.c (UI_From_gnu): Remove TYPE_IS_SIZETYPE use.
4258 2012-05-06  Tristan Gingold  <gingold@adacore.com>
4260         * gcc-interface/trans.c (gigi): Decorate reraise_zcx_decl.
4262 2012-05-06  Eric Botcazou  <ebotcazou@adacore.com>
4264         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: In the renaming
4265         case, use the padded type if the renamed object has an unconstrained
4266         type with default discriminant.
4268 2012-05-06  Eric Botcazou  <ebotcazou@adacore.com>
4270         * gcc-interface/trans.c (Loop_Statement_to_gnu): Also handle invariant
4271         conditions with only one bound.
4272         (Raise_Error_to_gnu): Likewise.  New function extracted from...
4273         (gnat_to_gnu) <N_Raise_Constraint_Error>: ...here.  Call above function
4274         in regular mode only.
4276 2012-05-06  Eric Botcazou  <ebotcazou@adacore.com>
4278         * gcc-interface/misc.c (gnat_post_options): Disable caret by default.
4280 2012-05-06  Eric Botcazou  <ebotcazou@adacore.com>
4282         * gcc-interface/gigi.h (make_packable_type): Declare.
4283         (make_type_from_size): Likewise.
4284         (relate_alias_sets): Likewise.
4285         (maybe_pad_type): Adjust.
4286         (init_gnat_to_gnu): Delete.
4287         (destroy_gnat_to_gnu): Likewise.
4288         (init_dummy_type): Likewise.
4289         (destroy_dummy_type): Likewise.
4290         (init_gnat_utils): Declare.
4291         (destroy_gnat_utils): Likewise.
4292         (ceil_pow2): New inline function.
4293         * gcc-interface/decl.c (gnat_to_gnu_entity): Use ceil_pow2.
4294         <object>: Pass True for the final processing of alignment and size.
4295         <E_Subprogram_Type>: Only create the TYPE_DECL for a padded return
4296         type if necessary.
4297         (round_up_to_align): Delete.
4298         (ceil_alignment): Likewise.
4299         (relate_alias_sets): Move to...
4300         (make_aligning_type): Likewise.
4301         (make_packable_type): Likewise.
4302         (maybe_pad_type): Likewise.
4303         (make_type_from_size): Likewise.
4304         * gcc-interface/utils.c (MAX_BITS_PER_WORD): Delete.
4305         (struct pad_type_hash): New type.
4306         (pad_type_hash_table): New static variable.
4307         (init_gnat_to_gnu): Merge into...
4308         (init_dummy_type): Likewise.
4309         (init_gnat_utils): ...this.  New function.
4310         (destroy_gnat_to_gnu): Merge into...
4311         (destroy_dummy_type): Likewise.
4312         (destroy_gnat_utils): ...this.  New function.
4313         (pad_type_hash_marked_p): New function.
4314         (pad_type_hash_hash): Likewise.
4315         (pad_type_hash_eq): Likewise.
4316         (relate_alias_sets): ...here.
4317         (make_aligning_type): Likewise.
4318         (make_packable_type): Likewise.
4319         (maybe_pad_type): Likewise.  Change same_rm_size parameter into
4320         set_rm_size; do not set TYPE_ADA_SIZE if it is false.  Do not set
4321         null as Ada size.  Do not set TYPE_VOLATILE on the padded type.  If it
4322         is complete and has constant size, canonicalize it.  Bail out earlier
4323         if a warning need not be issued.
4324         (make_type_from_size): Likewise.
4325         <INTEGER_TYPE>: Bail out if size is too large
4326         (gnat_types_compatible_p): Do not deal with padded types.
4327         (convert): Compare main variants for padded types.
4328         * gcc-interface/trans.c (gigi): Call {init|destroy}_gnat_utils.
4329         (gnat_to_gnu): Do not convert at the end for a call to a function that
4330         returns an unconstrained type with default discriminant.
4331         (Attribute_to_gnu) <Attr_Size>: Simplify handling of padded objects.
4332         * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Likewise.
4333         Do not use the padded type if it is BLKmode and the inner type is
4334         non-BLKmode.
4336 2012-05-02  Pascal Obry  <obry@adacore.com>
4338         Revert
4339         2012-02-24  Dave Korn  <dave.korn.cygwin@gmail.com>
4341         * gcc-interface/Makefile.in (WIN_SO_PREFIX [windows targets]): New
4342         Windows-specific make variable.
4343         (WIN_SO_INSTALL_DIR [windows targets]): Likewise.
4344         (install-gnatlib): Respect the above during installation when set,
4345         and also install any windows import library that has been built.
4346         (gnatlib-shared-win32): Use WIN_SO_PREFIX to name output DLL and also
4347         build a corresponding import library.
4349 2012-04-30  Jan Hubicka  <jh@suse.cz>
4351         * gcc-interface/utils.c (rest_of_subprog_body_compilation): Update
4352         comment.
4353         (gnat_write_global_declarations): Use finalize_compilation_unit.
4355 2012-04-30  Eric Botcazou  <ebotcazou@adacore.com>
4357         * gcc-interface/decl.c (gnat_to_gnu_entity): In type annotation mode,
4358         do not adjust the size of a tagged type if there is a representation
4359         clause on it.  Otherwise, round the adjustment up to the alignment
4360         of the first field and use the appropriate helper routine.
4361         (maybe_pad_type): Do not warn in type annotation mode on a tagged type.
4362         (gnat_to_gnu_field): Do not error out under the same circumstances.
4363         (annotate_rep): In type annotation mode, do not adjust the offset of
4364         components of a tagged type with representation clause.  Otherwise,
4365         round the adjustment up to the alignment of the first field.
4367 2012-04-30  Eric Botcazou  <ebotcazou@adacore.com>
4369         * gcc-interface/utils.c (finish_record_type): Force the traditional GCC
4370         layout for bitfields on the type if it is packed or has a representation
4371         clause and an alternate layout is available.
4373 2012-04-30  Eric Botcazou  <ebotcazou@adacore.com>
4375         * gcc-interface/gigi.h (mark_out_of_scope): Delete.
4376         (destroy_gnat_to_gnu): Declare.
4377         (destroy_dummy_type): Likewise.
4378         * gcc-interface/decl.c (mark_out_of_scope): Delete.
4379         * gcc-interface/utils.c (destroy_gnat_to_gnu): New function.
4380         (destroy_dummy_type): Likewise.
4381         * gcc-interface/trans.c (gnat_validate_uc_list): New variable.
4382         (gigi): Call validate_unchecked_conversion on gnat_validate_uc_list
4383         after the translation is completed.  Call destroy_gnat_to_gnu and
4384         destroy_dummy_type at the end.
4385         (Subprogram_Body_to_gnu): Do not call mark_out_of_scope.
4386         (gnat_to_gnu) <N_Block_Statement>: Likewise.
4387         <N_Validate_Unchecked_Conversion>: Do not process the node, only push
4388         it onto gnat_validate_uc_list.
4389         (validate_unchecked_conversion): New function.
4391 2012-04-26  Tristan Gingold  <gingold@adacore.com>
4393         * gcc-interface/Make-lang.in: Update dependencies.
4394         Remove s-traceb and tracebak objects from gnat1 and gnatbind (not used).
4395         Remove s-tasdeb and s-vaflop rules (not used).
4397 2012-04-26  Olivier Hainque  <hainque@adacore.com>
4399         * gcc-interface/targtyps.c (WIDEST_HARDWARE_FP_SIZE): Default to
4400         DOUBLE_TYPE_SIZE instead of LONG_DOUBLE_TYPE_SIZE.
4402 2012-04-26  Hristian Kirtchev  <kirtchev@adacore.com>
4404         * a-calend.adb (Day_Of_Week): Keep the internal
4405         usage of UTC_Time_Offset consistent with Time_Of and Split.
4407 2012-04-26  Hristian Kirtchev  <kirtchev@adacore.com>
4409         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Do not freeze
4410         the loop variable while preanalyzing a quantified expression.
4412 2012-04-26  Hristian Kirtchev  <kirtchev@adacore.com>
4414         * a-calend.adb (Split, Time_Of): Rename parameter Is_Ada_05
4415         to Use_TZ to better illustrate its function. Update all
4416         references to the parameter.
4417         (To_Ada_Time): Update the call to Formatting_Operations.Time_Of.
4418         * a-calend.ads (Split, Time_Of): Rename parameter Is_Ada_05
4419         to Use_TZ to better illustrate its function. Update the related
4420         comment on usage.
4421         * a-calend-vms.adb (Split, Time_Of): Rename parameter
4422         Is_Ada_05 to Use_TZ to better illustrate its function. Update
4423         all references to the parameter.
4424         (To_Ada_Time): Update the call to Formatting_Operations.Time_Of.
4425         * a-calend-vms.ads (Split, Time_Of): Rename parameter Is_Ada_05
4426         to Use_TZ to better illustrate its function. Update the related
4427         comment on usage.
4428         * a-calfor.adb (Split, Time_Of): Update the call to
4429         Formatting_Operations.Time_Of.
4430         * sysdep.c (__gnat_localtime_tzoff): Dereference pointer
4431         "is_historic" and rewrite the check as a comparison. Add a
4432         comment on flag values.
4434 2012-04-26  Robert Dewar  <dewar@adacore.com>
4436         * exp_ch2.adb, sem_ch8.adb: Minor reformatting.
4438 2012-04-26  Vasiliy Fofanov  <fofanov@adacore.com>
4440         * a-stzunb-shared.adb, gnat_ugn.texi, a-strunb-shared.adb,
4441         a-strunb-shared.ads, uintp.adb, a-stwiun-shared.adb,
4442         a-stwiun-shared.ads, a-cbhama.ads, vms_data.ads, a-cobove.adb,
4443         a-convec.adb, sem_ch13.adb, a-cbhase.ads: Fix common misuses of the
4444         word "then" where "than" should be used in English.
4446 2012-04-26  Robert Dewar  <dewar@adacore.com>
4448         * sem_ch5.adb (Check_Unreachable_Code): Skip past pragmas.
4450 2012-04-26  Hristian Kirtchev  <kirtchev@adacore.com>
4452         * s-finroo.ads: Remove with clause for
4453         Ada.Streams. Type Root_Controlled is now abstract tagged null
4454         record. Remove internal package Stream_Attributes. Root_Controlled
4455         doesn't need stream attribute redeclaration and avoids the
4456         dependency on streams.
4458 2012-04-26  Tristan Gingold  <gingold@adacore.com>
4460         * adaint.c (to_host_path_spec): Removed (unused).
4461         Minor reformatting.
4463 2012-04-26  Steve Baird  <baird@adacore.com>
4465         * gnat_rm.texi Improve description of Valid_Scalars attribute.
4467 2012-04-26  Ed Schonberg  <schonberg@adacore.com>
4469         * sem_ch6.adb (Can_Override_Operator): If the formal is a
4470         generic type the operator cannot be overriding.
4472 2012-04-26  Ed Schonberg  <schonberg@adacore.com>
4474         * sem_ch8.adb (Spec_Reloaded_For_Body): Check whether the type
4475         is declared in a package specification, and current unit is the
4476         corresponding package body. The use clauses themselves may be
4477         within a nested package.
4479 2012-04-26  Bob Duff  <duff@adacore.com>
4481         * exp_ch2.adb (Param_Entity): Take into account the case where
4482         the type of the entry parameter has a representation clause.
4484 2012-04-26  Ed Schonberg  <schonberg@adacore.com>
4486         * gnat_ugn.texi: Tweak dimensionality doc.
4488 2012-04-26  Robert Dewar  <dewar@adacore.com>
4490         * sem_eval.adb: Minor reformatting.
4492 2012-04-26  Robert Dewar  <dewar@adacore.com>
4494         * einfo.adb, einfo.ads, sem_res.adb, sem_ch4.adb,
4495         sem_eval.adb: Minor reformatting.
4497 2012-04-26  Thomas Quinot  <quinot@adacore.com>
4499         * freeze.adb: Minor change in error wording.
4501 2012-04-26  Ed Schonberg  <schonberg@adacore.com>
4503         * gnat_ugn.texi: Documentation on dimensional analysis.
4505 2012-04-26  Hristian Kirtchev  <kirtchev@adacore.com>
4507         * einfo.adb, einfo.ads: Remove synthesized attribute
4508         Proper_First_Index along with its associations in various nodes.
4509         (Proper_First_Index): Removed.
4510         * sem_ch4.adb (Analyze_Slice): Alphabetize constants. Add new
4511         local variable Index_Type. The index type of a string literal
4512         subtype is that of the stored low bound.
4513         * sem_eval (Get_Static_Length): Remove the use of Proper_First_Index.
4514         * sem_res.adb (Resolve_Slice): Alphabetize constants. Add
4515         new local variable Index_Type. The index type of a
4516         string literal subtype is that of the stored low bound.
4517         (Set_String_Literal_Subtype): Code reformatting.
4519 2012-04-26  Robert Dewar  <dewar@adacore.com>
4521         * exp_aggr.adb: Minor reformatting.
4523 2012-04-26  Hristian Kirtchev  <kirtchev@adacore.com>
4525         * exp_ch7.adb (Expand_Cleanup_Actions): Update the call to
4526         Requires_Cleanup_Actions.
4527         * exp_util.adb (Requires_Cleanup_Actions (List_Id; Boolean;
4528         Boolean)): Rename formal parameter For_Package to Lib_Level to
4529         better reflect its purpose. Update the related comment and all
4530         occurrences of For_Package in the body.
4531         (Requires_Cleanup_Actions
4532         (Node_Id; Boolean)): Add new formal parameter Lib_Level. Add
4533         local constant At_Lib_Level to keep monitor whether the path
4534         taken from the top-most context to the current construct involves
4535         package constructs. Update all calls to Requires_Cleanup_Actions.
4536         * exp_util.ads (Requires_Cleanup_Actions): Add new formal
4537         parameter Lib_Level and associated comment.
4539 2012-04-26  Ed Schonberg  <schonberg@adacore.com>
4541         * sem_ch6.adb (Process_Formals): If the type of the formal is
4542         a non null access type, mark the generated subtype as having a
4543         delayed freeze only if the designated type is not frozen yet.
4545 2012-04-26  Vincent Celier  <celier@adacore.com>
4547         * prj-attr.adb: New package Clean with attributes
4548         Object_Artifact_Extensions and Source_Artifact_Extensions.
4549         * prj-nmsc.adb (Process_Clean): Process new package Clean
4550         * prj.ads (Language_Config): New components
4551         Clean_Object_Artifacts and Clean_Source_Artifacts.
4552         * snames.ads-tmpl: New standard names Clean,
4553         Object_Artifact_Extensions and Source_Artifact_Extensions.
4555 2012-04-26  Hristian Kirtchev  <kirtchev@adacore.com>
4557         * einfo.adb (Proper_First_Index): Moved from Sem_Util.
4558         * einfo.ads: Add new synthesized attribute Proper_First_Index
4559         along with usage in nodes.
4560         (Proper_First_Index): Moved from Sem_Util.
4561         * sem_util.ads, sem_util.adb (Proper_First_Index): Moved to Einfo.
4563 2012-04-26  Gary Dismukes  <dismukes@adacore.com>
4565         * layout.adb (Layout_Component_List): Test for the case of a
4566         single variant and the size of its component list was computed
4567         as an integer literal, and use that size (which is in bits)
4568         as is rather than converting to storage units.
4570 2012-04-26  Robert Dewar  <dewar@adacore.com>
4572         * exp_aggr.adb: Minor reformatting.
4574 2012-04-26  Robert Dewar  <dewar@adacore.com>
4576         * sem_util.adb: Minor reformatting.
4578 2012-04-26  Thomas Quinot  <quinot@adacore.com>
4580         * exp_aggr.adb, exp_pakd.adb (Setup_Inline_Packed_Array_Reference,
4581         Packed_Array_Aggregate_Handled.Get_Component_Val):
4582         Reverse bit numbering within PAT when Reverse_Storage_Order
4583         applies to the enclosing record.
4585 2012-04-26  Thomas Quinot  <quinot@adacore.com>
4587         * freeze.adb (Freeze_Record_Type): Improve error message for
4588         Scalar_Storage_Order inconsistent with Bit_Order.
4590 2012-04-25  Gary Dismukes  <dismukes@adacore.com>
4592         * exp_ch9.adb: Add comments on the usage of the
4593         lock-free data structures.
4595 2012-04-25  Vincent Pucci  <pucci@adacore.com>
4597         * exp_intr.adb (Expand_Shift): Convert the left
4598         operand and the operator when the type of the call differs from
4599         the type of the operator.
4601 2012-04-25  Geert Bosch  <bosch@adacore.com>
4603         * stand.ads: Minor comment fix.
4605 2012-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
4607         * sem_ch4.adb (Analyze_Slice): Handle the case where the prefix
4608         is a string literal. Retrieve the first index from the base type
4609         when slicing a string literal.
4610         * sem_ch12.adb (Check_Private_View): Move the initialization
4611         of the type inside the loop to reflect the changing index.
4612         * sem_eval.adb (Eval_Relational_Op): Retrieve the first index
4613         from the base type when dealing with a string literal.
4614         * sem_res.adb (Resolve_Slice): Retrieve the first index from
4615         the base type when slicing a string literal.
4616         * sem_util.adb (Is_Internally_Generated_Renaming): New routine.
4617         (Is_Object_Reference): String literals may act
4618         as object references only when they are renamed internally.
4619         (Proper_First_Index): New routine.
4620         * sem_util.ads (Proper_First_Index): New routine.
4622 2012-04-25  Robert Dewar  <dewar@adacore.com>
4624         * sem_ch3.adb, csinfo.adb, lib-writ.adb, sem_ch12.adb,
4625         lib-xref.adb: Minor reformatting.
4627 2012-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
4629         * exp_ch9.adb: Rename Lock_Free_Sub_Type
4630         to Lock_Free_Subprogram. Remove type Subprogram_Id.
4631         Rename LF_Sub_Table to Lock_Free_Subprogram_Table.
4632         (Allow_Lock_Free_Implementation): Renamed to
4633         Allows_Lock_Free_Implementation.  Update the comment on
4634         lock-free restrictions. Code clean up and restructuring.
4635         (Build_Lock_Free_Protected_Subprogram_Body): Update the
4636         profile and related comments. Code clean up and restructuring.
4637         (Build_Lock_Free_Unprotected_Subprogram_Body): Update the
4638         profile and related comments. Code clean up and restructuring.
4639         (Comp_Of): Removed.
4641 2012-04-25  Vincent Celier  <celier@adacore.com>
4643         * sem_ch12.adb (Inherit_Context): Compare library units, not
4644         names of units, when checking if a unit is already in the context.
4646 2012-04-25  Thomas Quinot  <quinot@adacore.com>
4648         * sem_ch3.adb: Reverse_Storage_Order must be propagated to
4649         untagged derived record types.
4651 2012-04-25  Ed Schonberg  <schonberg@adacore.com>
4653         * lib-xref.adb: Adjust position of end label.
4655 2012-04-22  Jan Hubicka  <jh@suse.cz>
4657         * gcc-interface/utils.c (gnat_write_global_declarations): Do not mark
4658         needed node.
4660 2012-04-20  Jan Hubicka  <jh@suse.cz>
4662         * gcc-interface/utils.c (gnat_write_global_declarations): Update for new
4663         force_output placement.
4665 2012-04-14  Jan Hubicka  <jh@suse.cz>
4667         * gcc-interface/trans.c (finalize_nrv): Update field referenced for new
4668         cgraph/varpool layout.
4670 2012-04-09  Mike Stump  <mikestump@comcast.net>
4672         * a-assert.ads: Remove execute permission.
4673         * a-chacon.ads: Likewise.
4674         * a-coteio.ads: Likewise.
4675         * a-envvar.ads: Likewise.
4676         * a-exetim-mingw.ads: Likewise.
4677         * a-fzteio.ads: Likewise.
4678         * a-izteio.ads: Likewise.
4679         * a-lcteio.ads: Likewise.
4680         * a-llctio.ads: Likewise.
4681         * a-scteio.ads: Likewise.
4682         * a-suenco.ads: Likewise.
4683         * a-suenst.ads: Likewise.
4684         * a-suewst.ads: Likewise.
4685         * a-suezst.ads: Likewise.
4686         * a-tirsfi.ads: Likewise.
4687         * a-wichha.ads: Likewise.
4688         * a-zchara.ads: Likewise.
4689         * a-zchhan.ads: Likewise.
4690         * a-zchuni.ads: Likewise.
4691         * a-zrstfi.ads: Likewise.
4692         * aspects.ads: Likewise.
4693         * g-byorma.ads: Likewise.
4694         * g-decstr.ads: Likewise.
4695         * g-encstr.ads: Likewise.
4696         * g-spchge.ads: Likewise.
4697         * g-u3spch.ads: Likewise.
4698         * g-wispch.ads: Likewise.
4699         * g-zspche.ads: Likewise.
4700         * namet-sp.ads: Likewise.
4701         * s-os_lib.ads: Likewise.
4702         * s-regexp.ads: Likewise.
4703         * s-regpat.ads: Likewise.
4704         * s-string.ads: Likewise.
4705         * s-tasloc.ads: Likewise.
4706         * s-utf_32.ads: Likewise.
4707         * sem_aux.ads: Likewise.
4708         * a-assert.adb: Likewise.
4709         * a-chacon.adb: Likewise.
4710         * a-envvar.adb: Likewise.
4711         * a-exetim-mingw.adb: Likewise.
4712         * a-suenco.adb: Likewise.
4713         * a-suenst.adb: Likewise.
4714         * a-suewst.adb: Likewise.
4715         * a-suezst.adb: Likewise.
4716         * a-tirsfi.adb: Likewise.
4717         * a-wichha.adb: Likewise.
4718         * a-zchhan.adb: Likewise.
4719         * a-zchuni.adb: Likewise.
4720         * a-zrstfi.adb: Likewise.
4721         * aspects.adb: Likewise.
4722         * g-byorma.adb: Likewise.
4723         * g-decstr.adb: Likewise.
4724         * g-encstr.adb: Likewise.
4725         * g-spchge.adb: Likewise.
4726         * g-u3spch.adb: Likewise.
4727         * g-wispch.adb: Likewise.
4728         * g-zspche.adb: Likewise.
4729         * namet-sp.adb: Likewise.
4730         * s-except.adb: Likewise.
4731         * s-inmaop-vxworks.adb: Likewise.
4732         * s-os_lib.adb: Likewise.
4733         * s-regexp.adb: Likewise.
4734         * s-regpat.adb: Likewise.
4735         * s-string.adb: Likewise.
4736         * s-tasloc.adb: Likewise.
4737         * s-utf_32.adb: Likewise.
4738         * s-wchcon.adb: Likewise.
4739         * sem_aux.adb: Likewise.
4741 2012-04-02  Robert Dewar  <dewar@adacore.com>
4743         * s-atopri.ads: Minor reformatting.
4745 2012-04-02  Thomas Quinot  <quinot@adacore.com>
4747         * sem_util.adb: Minor reformatting, minor code cleanup.
4749 2012-04-02  Ed Schonberg  <schonberg@adacore.com>
4751         * lib-xref.adb (Generate_Reference): For a reference to an
4752         operator symbol, set the sloc to point to the first character
4753         of the operator name, and not to the initial quaote.
4754         (Output_References): Ditto for the definition of an operator
4755         symbol.
4757 2012-04-02  Vincent Celier  <celier@adacore.com>
4759         * ali.adb (Scan_Ali): Recognize Z lines. Set
4760         Implicit_With_From_Instantiation to True in the With_Record for
4761         Z lines.
4762         * ali.ads (With_Record): New Boolean component
4763         Implicit_With_From_Instantiation, defaulted to False.
4764         * csinfo.adb: Indicate that Implicit_With_From_Instantiation
4765         is special
4766         * lib-writ.adb (Write_ALI): New array Implicit_With.
4767         (Collect_Withs): Set Implicit_With for the unit is it is not Yes.
4768         (Write_With_Lines): Write a Z line instead of a W line if
4769         Implicit_With is Yes for the unit.
4770         * sem_ch12.adb (Inherit_Context): Only add a unit in the context
4771         if it is not there yet.
4772         * sinfo.ads: New flag Implicit_With_From_Instantiation (Flag12)
4773         added.
4775 2012-04-02  Yannick Moy  <moy@adacore.com>
4777         * osint.adb, osint.ads (Add_Default_Search_Dirs): Add library
4778         search dirs in file specified with option -gnateO.
4780 2012-04-02  Robert Dewar  <dewar@adacore.com>
4782         * sem_ch5.adb, exp_util.adb, sem_util.adb, exp_ch4.adb: Minor
4783         reformatting.
4785 2012-04-02  Olivier Hainque  <hainque@adacore.com>
4787         * g-sse.ads: Add x86-solaris and x86_64-darwin to the set of
4788         platforms where the use of this spec is supported. Add current
4789         year to the copyright notice.
4790         * gcc-interfaces/Makefile.in: Add g-sse.o and g-ssvety.o to
4791         EXTRA_GNATRTL_NONTASKING_OBJS on x86 32/64 targets that support
4792         it and where they were missing (x86-solaris, x86-freebsd,
4793         x86_64-freebsd, and x86-darwin).
4795 2012-04-02  Gary Dismukes  <dismukes@adacore.com>
4797         * bindgen.adb (Gen_Ada_Init): When compiling for the AAMP small
4798         library, where we no longer suppress the Standard_Library,
4799         generate an empty body rather than the usual generation of
4800         assignments to imported globals, since those aren't present in
4801         the small library.
4803 2012-04-02  Ed Schonberg  <schonberg@adacore.com>
4805         * sinfo.ads: Minor documentation fix.
4807 2012-04-02  Hristian Kirtchev  <kirtchev@adacore.com>
4809         * sem_res.adb (Resolve_Conditional_Expression): Add local variables
4810         Else_Typ and Then_Typ. Add missing type conversions to the "then" and
4811         "else" expressions when their respective types are scalar.
4813 2012-04-02  Vincent Pucci  <pucci@adacore.com>
4815         * exp_ch9.adb: Reordering of the local subprograms. New Table
4816         for the lock free implementation that maps each protected
4817         subprograms with the protected component it references.
4818         (Allow_Lock_Free_Implementation): New routine. Check if
4819         the protected body enables the lock free implementation.
4820         (Build_Lock_Free_Protected_Subprogram_Body): New routine.
4821         (Build_Lock_Free_Unprotected_Subprogram_Body): New routine.
4822         (Comp_Of): New routine.
4823         * Makefile.rtl: Add s-atopri.o
4824         * debug.adb: New compiler debug flag -gnatd9 for lock free
4825         implementation.
4826         * rtsfind.ads: RE_Atomic_Compare_Exchange_8,
4827         RE_Atomic_Compare_Exchange_16, RE_Atomic_Compare_Exchange_32,
4828         RE_Atomic_Compare_Exchange_64, RE_Atomic_Load_8,
4829         RE_Atomic_Load_16, RE_Atomic_Load_32, RE_Atomic_Load_64, RE_Uint8,
4830         RE_Uint16, RE_Uint32, RE_Uint64 added.
4831         * s-atropi.ads: New file. Defines atomic primitives used
4832         by the lock free implementation.
4834 2012-04-02  Emmanuel Briot  <briot@adacore.com>
4836         * g-expect.adb (Expect_Internal): Fix leak of the input file descriptor.
4838 2012-04-02  Hristian Kirtchev  <kirtchev@adacore.com>
4840         * exp_ch4.adb (Expand_N_Quantified_Expression): Reimplemented.
4841         The expansion no longer uses the copy of the original QE created
4842         during analysis.
4843         * sem.adb (Analyze): Add processing for loop parameter specifications.
4844         * sem_ch4.adb (Analyze_Quantified_Expression): Reimplemented. The
4845         routine no longer creates a copy of the original QE. All
4846         constituents of a QE are now preanalyzed and resolved.
4847         * sem_ch5.adb (Analyze_Iteration_Scheme): Remove the guard which
4848         bypasses all processing when the iteration scheme is related to a
4849         QE. Relovate the code which analyzes loop parameter specifications
4850         to a separate routine.  (Analyze_Iterator_Specification):
4851         Preanalyze the iterator name. This action was originally
4852         done in Analyze_Iteration_Scheme. Update the check which
4853         detects an iterator specification in the context of a QE.
4854         (Analyze_Loop_Parameter_Specification): New routine. This
4855         procedure allows for a stand-alone analysis of a loop parameter
4856         specification without the need of a parent iteration scheme. Add
4857         code to update the type of the loop variable when the range
4858         generates an itype and the context is a QE.
4859         (Pre_Analyze_Range): Renamed to Preanalyze_Range. Update all references
4860         to the routine.
4861         * sem_ch5.ads: Code reformatting.
4862         (Analyze_Loop_Parameter_Specification): New routine.
4863         * sem_ch6.adb (Fully_Conformant_Expressions): Detect a case
4864         when establishing conformance between two QEs utilizing different
4865         specifications.
4866         * sem_res.adb (Proper_Current_Scope): New routine.
4867         (Resolve): Do not resolve a QE as there is nothing to be done now.
4868         Ignore any loop scopes generated for QEs when detecting an expression
4869         function as the scopes are cosmetic and do not appear in the tree.
4870         (Resolve_Quantified_Expression): Removed. All resolution of
4871         QE constituents is now performed during analysis. This ensures
4872         that loop variables appearing in array aggregates are properly
4873         resolved.
4875 2012-04-02  Ed Schonberg  <schonberg@adacore.com>
4877         * sem_util.adb (Build_Default_Subtype): If the base type is
4878         private and its full view is available, use the full view in
4879         the subtype declaration.
4881 2012-04-02  Jose Ruiz  <ruiz@adacore.com>
4883         * gnat_ugn.texi: Add some minimal documentation about how to
4884         use GNATtest for cross platforms.
4886 2012-04-02  Vincent Celier  <celier@adacore.com>
4888         * opt.ads (Object_Path_File_Name): New variable.
4889         * prj-attr.adb: New Compiler attribute Object_Path_Switches.
4890         * prj-nmsc.adb (Process_Compiler): Recognize new attribute
4891         Object_Path_Switches.
4892         * snames.ads-tmpl: New standard name Object_Path_Switches.
4893         * switch-c.adb (Scan_Front_End_Switches): Recognize new switch
4894         -gnateO= and put its value in Opt.Object_Path_File_Name.
4896 2012-04-02  Hristian Kirtchev  <kirtchev@adacore.com>
4898         * exp_ch7.adb (Process_Declarations): Detect a case where
4899         a source object was initialized by another source object,
4900         but the expression was rewritten as a class-wide conversion
4901         of Ada.Tags.Displace.
4902         * exp_util.adb (Initialized_By_Ctrl_Function): Removed.
4903         (Is_Controlled_Function_Call): New routine.
4904         (Is_Displacement_Of_Ctrl_Function_Result): Removed.
4905         (Is_Displacement_Of_Object_Or_Function_Result): New routine.
4906         (Is_Source_Object): New routine.
4907         (Requires_Cleanup_Actions): Detect a case where a source object was
4908         initialized by another source object, but the expression was rewritten
4909         as a class-wide conversion of Ada.Tags.Displace.
4910         * exp_util.ads (Is_Displacement_Of_Ctrl_Function_Result): Removed.
4911         (Is_Displacement_Of_Object_Or_Function_Result): New routine.
4913 2012-04-02  Ed Schonberg  <schonberg@adacore.com>
4915         * sem_res.adb (Resolve_Call): A call to an expression function
4916         does not freeze if it appears in a different scope from the
4917         expression function itself. Such calls appear in the generated
4918         bodies of other expression functions, or in pre/postconditions
4919         of subsequent subprograms.
4921 2012-04-02  Yannick Moy  <moy@adacore.com>
4923         * lib-xref-alfa.adb: Code clean up.
4925 2012-04-02  Ed Schonberg  <schonberg@adacore.com>
4927         * sem_ch12.adb (Analyze_Subprogram_Instantiation): Do not suppress
4928         style checks, because the subprogram instance itself may contain
4929         violations of syle rules.
4930         * style.adb (Missing_Overriding): Check for missing overriding
4931         indicator on a subprogram instance.
4933 2012-04-02  Hristian Kirtchev  <kirtchev@adacore.com>
4935         * sem_ch6.adb (Last_Implicit_Declaration): New routine.
4936         (Process_PPCs): Insert the body of _postconditions after the
4937         last internally generated declaration. This ensures that actual
4938         subtypes created for formal parameters are visible and properly
4939         frozen as _postconditions may reference them.
4941 2012-04-02  Robert Dewar  <dewar@adacore.com>
4943         * einfo.adb (First_Component_Or_Discriminant) Now applies to
4944         all types with discriminants, not just records.
4945         * exp_attr.adb (Expand_N_Attribute): Add Scalar_Values handling
4946         for arrays, scalars and non-variant records.
4947         * sem_attr.adb (Analyze_Attribute): Handle Valid_Scalars
4948         * sem_attr.ads (Valid_Scalars): Update description
4949         * sem_util.ads, sem_util.adb (No_Scalar_Parts): New function.
4951 2012-03-31  Eric Botcazou  <ebotcazou@adacore.com>
4953         Revert
4954         2012-03-25  Eric Botcazou  <ebotcazou@adacore.com>
4956         * gcc-interface/decl.c (SS_MARK_NAME): New define.
4957         (gnat_to_gnu_entity) <E_Function>: Prepend leaf attribute on entities
4958         whose name is SS_MARK_NAME.
4960 2012-03-30  Robert Dewar  <dewar@adacore.com>
4962         * exp_ch5.adb, sem_util.adb, exp_ch4.adb: Minor comment updates.
4964 2012-03-30  Yannick Moy  <moy@adacore.com>
4966         * lib-xref-alfa.adb (Add_Alfa_File): Treat possibly 2 units at the same
4967         time, putting all scopes in the same Alfa file.
4968         (Add_Alfa_Xrefs): Correct errors in comparison function. Correct value
4969         of Def component.
4970         (Collect_Alfa): Possibly pass 2 units to Add_Alfa_File.
4972 2012-03-30  Hristian Kirtchev  <kirtchev@adacore.com>
4974         * exp_util.adb (Is_Secondary_Stack_BIP_Func_Call): Handle a case where
4975         a build-in-place call appears as Prefix'Reference'Reference.
4977 2012-03-30  Yannick Moy  <moy@adacore.com>
4979         * lib-xref-alfa.adb: Minor refactoring to remove internal package.
4981 2012-03-30  Hristian Kirtchev  <kirtchev@adacore.com>
4983         * sem_ch5.adb (Analyze_Iteration_Scheme): Preanalyze the subtype
4984         definition of a loop when the context is a quantified expression.
4986 2012-03-30  Vincent Celier  <celier@adacore.com>
4988         * prj.ads: Minor comment update.
4990 2012-03-30  Yannick Moy  <moy@adacore.com>
4992         * lib-xref-alfa.adb, alloc.ads, lib-xref.ads: Minor addition of
4993         comments and refactoring.
4995 2012-03-30  Robert Dewar  <dewar@adacore.com>
4997         * lib-xref.adb, lib-xref-alfa.adb: Minor reformatting & code
4998         reorganization.
5000 2012-03-30  Yannick Moy  <moy@adacore.com>
5002         * lib-xref-alfa.adb (Generate_Dereference): Use Get_Code_Unit
5003         instead of Get_Source_Unit to get file for reference.
5004         (Traverse_Compilation_Unit): Do not add scopes for generic units.
5005         * lib-xref.adb (Generate_Reference): Use Get_Code_Unit instead
5006         of Get_Source_Unit to get file for reference.
5007         * sem_ch12.adb (Analyze_Package_Instantiation): Enable
5008         instantiation in Alfa mode.
5010 2012-03-30  Hristian Kirtchev  <kirtchev@adacore.com>
5012         * exp_ch7.adb (Process_Declarations): Replace
5013         the call to Is_Null_Access_BIP_Func_Call with
5014         Is_Secondary_Stack_BIP_Func_Call. Update the related comment.
5015         * exp_util.adb (Is_Null_Access_BIP_Func_Call): Removed.
5016         (Is_Secondary_Stack_BIP_Func_Call): New routine.
5017         (Requires_Cleanup_Actions): Replace
5018         the call to Is_Null_Access_BIP_Func_Call with
5019         Is_Secondary_Stack_BIP_Func_Call. Update the related comment.
5020         * exp_util.ads (Is_Null_Access_BIP_Func_Call): Removed.
5021         (Is_Secondary_Stack_BIP_Func_Call): New routine.
5023 2012-03-30  Yannick Moy  <moy@adacore.com>
5025         * lib-xref-alfa.adb, lib-xref.adb: Code clean ups.
5027 2012-03-30  Gary Dismukes  <dismukes@adacore.com>
5029         * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): For the case of a
5030         loop entity which is rewritten as a renaming
5031         of the indexed array, explicitly mark the entity as needing
5032         debug info so that Materialize entity will be set later by
5033         Debug_Renaming_Declaration when the renaming is expanded.
5035 2012-03-30  Robert Dewar  <dewar@adacore.com>
5037         * sem_attr.ads: Update comment.
5039 2012-03-30  Vincent Celier  <celier@adacore.com>
5041         * prj.ads: New Dependency_Kind: ALI_Closure.
5043 2012-03-30  Thomas Quinot  <quinot@adacore.com>
5045         * exp_pakd.adb: Minor reformatting.
5047 2012-03-30  Yannick Moy  <moy@adacore.com>
5049         * lib-xref-alfa.adb (Add_Alfa_File): Take into account possible absence
5050         of compilation unit for unit in Sdep_Table.
5052 2012-03-30  Thomas Quinot  <quinot@adacore.com>
5054         * freeze.adb (Freeze_Record_Type): For a type with reversed bit
5055         order and reversed storage order, disable front-end relayout.
5057 2012-03-25  Eric Botcazou  <ebotcazou@adacore.com>
5059         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Copy
5060         the TYPE_PACKED flag from the base type.
5062 2012-03-25  Eric Botcazou  <ebotcazou@adacore.com>
5064         * gcc-interface/decl.c (SS_MARK_NAME): New define.
5065         (gnat_to_gnu_entity) <E_Function>: Prepend leaf attribute on entities
5066         whose name is SS_MARK_NAME.
5068 2012-03-25  Eric Botcazou  <ebotcazou@adacore.com>
5070         * gcc-interface/utils.c (add_parallel_type): Take a TYPE instead of a
5071         DECL and adjust.  Move around.
5072         (has_parallel_type): New predicate.
5073         (rest_of_record_type_compilation): Return early if the type already
5074         has a parallel type.
5075         * gcc-interface/gigi.h (add_parallel_type): Adjust.
5076         * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust for above changes.
5078 2012-03-25  Eric Botcazou  <ebotcazou@adacore.com>
5080         * gcc-interface/utils.c (finish_record_type): Return early for padded
5081         types and tidy up.
5083 2012-03-20  Arnaud Charlet  <charlet@adacore.com>
5085         * hlo.ads, hlo.adb: Removed, no longer used.
5086         * gcc-interface/Make-lang.in: Remove hlo.o. Update dependencies.
5087         * gcc-interface/Makefile.in: Remove EXTRA_LIBGNAT_SRCS (temporarly)
5088         and compute it from EXTRA_LIBGNAT_OBJS.
5089         Clean up comments, reorder LIBGNAT_SRCS and LIBGNAT_OBJS.
5091 2012-03-20  Yannick Moy  <moy@adacore.com>
5093         * gnat_rm.texi, sem_attr.ads: Update documentation.
5095 2012-03-19  Yannick Moy  <moy@adacore.com>
5097         * sem_ch6.adb: Minor code clean up.
5099 2012-03-19  Vincent Celier  <celier@adacore.com>
5101         * make.adb (Scan_Make_Arg): Make sure all significant -m switches
5102         on the command line are counted.
5104 2012-03-19  Robert Dewar  <dewar@adacore.com>
5106         * sem_elab.adb (Generate_Elab_Warnings): Fix spec, fix attribute
5107         reference case
5109 2012-03-19  Robert Dewar  <dewar@adacore.com>
5111         * par-ch4.adb (Check_Bad_Exp): New procedure
5113 2012-03-19  Robert Dewar  <dewar@adacore.com>
5115         * exp_attr.adb, sem_attr.adb, sem_attr.ads, snames.ads-tmpl: Add
5116         initial framework for Valid_Scalars attribute.
5118 2012-03-19  Robert Dewar  <dewar@adacore.com>
5120         * scng.adb (Scan): Recognize incorrect preprocessor directive
5122 2012-03-19  Robert Dewar  <dewar@adacore.com>
5124         * atree.adb (Allocate_Initialize_Node): Use Num_Extension_Nodes
5125         * atree.ads (Num_Extension_Nodes): New variable
5126         * debug.adb: New debug flag -gnatd.N
5127         * gnat1drv.adb (Adjust_Global_Switches): Adjust
5128         Num_Extension_Nodes if -gnatd.N set
5130 2012-03-19  Eric Botcazou  <ebotcazou@adacore.com>
5132         * einfo.ads: Minor update to First_Rep_Item and Has_Gigi_Rep_Item
5133         descriptions.
5135 2012-03-19  Robert Dewar  <dewar@adacore.com>
5137         * opt.ads: Remove HLO_Active flag.
5138         * sem.adb: Remove call of high level optimizer.
5139         * sem.ads (New_Nodes_OK): Removed.
5140         * sem_ch10.adb: Remove references to New_Nodes_OK.
5141         * switch-c.adb: Remove handling of -gnatH switch.
5143 2012-03-19  Yannick Moy  <moy@adacore.com>
5145         * sem_ch6.adb (Check_Subprogram_Contract): Do not emit warnings
5146         on trivially True or False postconditions and Ensures components
5147         of contract-cases.
5149 2012-03-19  Robert Dewar  <dewar@adacore.com>
5151         * gnat_ugn.texi: Fix index entry for -gnatei (now we have
5152         ug_words entry).
5154 2012-03-19  Hristian Kirtchev  <kirtchev@adacore.com>
5156         * sem_ch3.adb (Get_Discriminant_Value): Instead of looking
5157         at the immediate correcponsing discriminant, traverse a
5158         potential chain of discriminants produced by type derivations.
5159         (Root_Corresponding_Discriminant): Traverse a chain of inherited
5160         discriminants and return the topmost discriminant.
5162 2012-03-19  Bob Duff  <duff@adacore.com>
5164         * debug.adb: Minor comment change.
5165         * gnat_ugn.texi: Update documentation for elaboration regarding
5166         indirect calls.
5168 2012-03-19  Gary Dismukes  <dismukes@adacore.com>
5170         * exp_ch3.adb (Expand_N_Object_Declaration): In
5171         the case of an object of a class-wide interface type, where the
5172         declaration is rewritten as a renaming, call Set_Debug_Info_Needed
5173         on the renaming entity so that Materialize_Entity will be
5174         set. Also, change existing call (for other than interface cases)
5175         to call Set_Debug_Info_Needed rather than Set_Needs_Debug_Info
5176         (as specified for that flag).
5178 2012-03-19  Hristian Kirtchev  <kirtchev@adacore.com>
5180         * sem_ch4.adb (Analyze_Allocator): Detect an allocator generated
5181         by the build-in-place machinery where the designated type is
5182         indefinite, but the underlying type is not. Do not emit errors
5183         related to missing initialization in this case.
5185 2012-03-19  Robert Dewar  <dewar@adacore.com>
5187         * gnat_ugn.texi: Add documentation for -gnateinnn switch.
5188         * sem_elab.adb, put_alfa.adb, lib-xref-alfa.adb: Minor reformatting.
5189         * sem_prag.adb: Minor comment update.
5191 2012-03-15  Robert Dewar  <dewar@adacore.com>
5193         * errout.ads: Add entry for translating -gnateinn to
5194         /MAX_INSTANTIATIONS for VMS.
5195         * hostparm.ads (Max_Instantiations): Moved to Opt.
5196         * opt.ads (Maximum_Instantiations): Moved from Hostparm, and renamed.
5197         * sem_ch12.adb (Maximum_Instantiations): New name of
5198         Max_Instantiations (Analyze_Package_Instantiation): Change error
5199         msg for too many instantiations (mention -gnateinn switch).
5200         * switch-c.adb (Scan_Front_End_Switches): Implement -gnateinn switch.
5201         * switch.ads: Minor comment update.
5202         * usage.adb (Usage): Output line for -maxeinn switch.
5203         * vms_data.ads: Add entry for MAX_INSTANTIATIONS (-gnateinn).
5205 2012-03-15  Yannick Moy  <moy@adacore.com>
5207         * alfa.ads Update the decription of ALI sections.
5208         (Alfa_File_Record): Add a component Unit_File_Name to store the
5209         unit file name for subunits.
5210         * get_alfa.adb, put_alfa.adb Adapt to the possible presence of
5211         a unit file name.
5212         * lib-xref-alfa.adb (Add_Alfa_File): For subunits, retrieve the
5213         file name of the unit.
5215 2012-03-15  Yannick Moy  <moy@adacore.com>
5217         * sem_ch6.adb (Check_Subprogram_Contract): Do
5218         not issue warning on missing 'Result in postcondition if all
5219         postconditions and contract-cases already get a warning for only
5220         referring to pre-state.
5222 2012-03-15  Bob Duff  <duff@adacore.com>
5224         * debug.adb: Add new debug switch -gnatd.U, which disables the
5225         support added below, in case someone trips over a cycle, and needs
5226         to disable this.
5227         * sem_attr.adb (Analyze_Access_Attribute):
5228         Treat Subp'Access as a call for elaboration purposes.
5229         * sem_elab.ads, sem_elab.adb (Check_Elab_Call): Add support
5230         for Subp'Access.
5232 2012-03-15  Vincent Pucci  <pucci@adacore.com>
5234         * sem.ads, sem.adb (Preanalyze): New routine.
5235         * sem_ch4.adb (Analyze_Quantified_Expression): Call to the
5236         Preanalyze routine in Sem added.  Renaming of Needs_Expansion
5237         into Need_Preanalysis.
5238         * sem_ch6.adb (Preanalyze): Removed.
5240 2012-03-15  Robert Dewar  <dewar@adacore.com>
5242         * sem_ch4.adb (Analyze_Quantified_Expression): Add comment.
5243         * sem_prag.adb: Minor comment additions.
5244         * sem_attr.adb (Check_First_Last_Valid): Make sure prefix type
5245         is frozen.
5247 2012-03-15  Vincent Pucci  <pucci@adacore.com>
5249         * sem_ch4.adb (Analyze_Quantified_Expression):
5250         Preanalyze the condition when the quantified expression will be
5251         further expanded.
5253 2012-03-15  Yannick Moy  <moy@adacore.com>
5255         * sem_prag.adb, sem_util.adb, sem_util.ads, sem_attr.adb, sem_ch6.adb,
5256         sem_warn.adb: Minor refactoring, renaming Case_Pragma in CTC_Pragma,
5257         to refer to both Test_Case pragma and Contract_Case pragma (same
5258         acronym as in Spec_CTC_List).
5260 2012-03-15  Robert Dewar  <dewar@adacore.com>
5262         * sem_prag.adb, sem_prag.ads, sem_util.ads, sem_attr.adb, sem_ch6.adb,
5263         sem_warn.adb: Minor reformatting.
5265 2012-03-15  Hristian Kirtchev  <kirtchev@adacore.com>
5267         * exp_util.adb (Initialized_By_Ctrl_Function): Do not loop over
5268         selector names as the function call always appears at the top selected
5269         component.
5271 2012-03-15  Ed Schonberg  <schonberg@adacore.com>
5273         * sem_ch12.adb (Validate_Access_Subprogram_Instance): keep
5274         Mode_Conformance check for older versions of the language.
5276 2012-03-15  Yannick Moy  <moy@adacore.com>
5278         * gnat_ugn.texi Document the extension of option -gnatw.t.
5279         * sem_ch3.adb (Analyze_Declaration): Check for suspicious
5280         contracts only after contract cases have been semantically
5281         analyzed.
5282         * sem_ch6.adb (Check_Subprogram_Contract): Consider also Ensures
5283         components of contract cases for detecting suspicious contracts.
5285 2012-03-15  Yannick Moy  <moy@adacore.com>
5287         * aspects.adb, aspects.ads (Aspect_Id): New GNAT aspect
5288         Aspect_Contract_Case.
5289         * gnat_rm.texi Document the new pragma/aspect
5290         Contract_Case. Correct the documentation of the existing
5291         pragma/aspect Test_Case with the new semantics.
5292         * sem_attr.adb (Analyze_Attribute): Allow use of 'Result in the
5293         Ensures component of a Contract_Case pragma.
5294         * sem_ch13.adb (Analyze_Aspect_Specifications): Check new aspect
5295         and translate it into a pragma.
5296         (Check_Aspect_At_Freeze_Point): Take into account the new aspect.
5297         * sem_ch3.adb, sinfo.adb, sinfo.ads Renaming of TC (for test case)
5298         into CTC (for contract and test case).
5299         * sem_ch6.adb (Process_PPCs): Generate Check pragmas from
5300         Contract_Case pragmas, similarly to what is done already for
5301         postconditions.
5302         * sem_prag.adb, sem_prag.ads (Check_Contract_Or_Test_Case):
5303         Renaming of Check_Test_Case.
5304         (Analyze_Pragma, Sig_Flags): Take into account the new pragma.
5305         * sem_util.adb, sem_util.ads Renaming to take into account the
5306         new pragma, so that functions which applied only to Test_Case
5307         now apply to both Test_Case and Contract_Case.
5308         * par-prag.adb, sem_warn.adb, snames.ads-tmpl Take into account
5309         the new pragma.
5311 2012-03-15  Robert Dewar  <dewar@adacore.com>
5313         * sem_ch6.ads: Minor comment updates.
5314         * sem_ch12.adb: Minor comment clarification.
5316 2012-03-15  Robert Dewar  <dewar@adacore.com>
5318         * sem_ch5.adb: Minor reformatting.
5320 2012-03-15  Ed Schonberg  <schonberg@adacore.com>
5322         * exp_ch3.adb (Expand_N_Object_Declaration): When rewriting the
5323         declaration of a class-wide object, retain the Ekind to prevent
5324         subsequent misuse of constants.
5326 2012-03-15  Yannick Moy  <moy@adacore.com>
5328         * gnat_rm.texi, gnat_ugn.texi: Minor correction of invariant
5329         terminology.
5331 2012-03-15  Hristian Kirtchev  <kirtchev@adacore.com>
5333         * exp_util.adb (Initialized_By_Ctrl_Function): Add code to
5334         process the case when a function call appears in object.operation
5335         format.
5337 2012-03-15  Ed Schonberg  <schonberg@adacore.com>
5339         * sem_ch6.ads, sem_ch6.adb (Check_Subtype_Conformant): add
5340         Get_Inst formal, so that conformance within an instantiation
5341         follows renamings of formals. This is similar to what is already
5342         done in Check_Mode_conformant.
5343         * sem_ch12.adb (Vailidate_Access_Subprogram_Instance): check that
5344         formal and actual are subtype conformant. Previously only mode
5345         conformance was required.
5347 2012-03-15  Robert Dewar  <dewar@adacore.com>
5349         * par-ch6.adb, einfo.ads, sem_eval.adb, sem_eval.ads,
5350         sem_case.adb: Minor reformatting.
5352 2012-03-15  Robert Dewar  <dewar@adacore.com>
5354         * exp_attr.adb (Expand_N_Attribute_Reference): Add handling
5355         of First_Valid/Last_Valid.
5356         * sem_attr.adb (Check_First_Last_Valid): New procedure
5357         (Analyze_Attribute): Add handling of First_Valid and Last_Valid
5358         (Eval_Attribute): ditto.
5359         * snames.ads-tmpl: Add entries for First_Valid and Last_Valid.
5361 2012-03-15  Ed Schonberg  <schonberg@adacore.com>
5363         * exp_ch5.adb (Expand_Predicated_Loop): Suppress warnings on
5364         loop variable, for the unusual case where the range has a single
5365         element and the loop variable has no visible assignment to it.
5367 2012-03-15  Vincent Pucci  <pucci@adacore.com>
5369         * exp_ch4.adb (Expand_N_Quantified_Expression): Expand the
5370         original quantified expression node.
5371         * sem_ch4.adb (Analyze_Quantified_Expression): Properly analyze
5372         the quantified expression and preserve the original non-analyzed
5373         quantified expression when an expansion is needed.
5374         * sem_ch5.adb (Analyze_Iteration_Scheme): Special treatment
5375         for quantified expressions.
5376         (Analyze_Iterator_Specification): Special treatment for quantified
5377         expressions.
5379 2012-03-15  Ed Falis  <falis@adacore.com>
5381         * s-vxwork-ppc.ads: Update FP_CONTEXT so name of former pad
5382         field matches VxWorks headers.
5384 2012-03-14  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5386         * gcc-interface/Makefile.in (mips-sgi-irix6*): Remove.
5388         * a-intnam-irix.ads, mlib-tgt-specific-irix.adb,
5389         s-intman-irix.adb, s-mastop-irix.adb, s-osinte-irix.adb,
5390         s-osinte-irix.ads, s-proinf-irix-athread.adb,
5391         s-proinf-irix-athread.ads, s-taprop-irix.adb, s-tasinf-irix.ads,
5392         system-irix-n32.ads, system-irix-n64.ads, system-irix-o32.ads:
5393         Remove.
5395         * adaint.c [__mips && __sgi]: Remove.
5396         (__gnat_number_of_cpus) [__mips && __sgi]: Remove.
5397         [IS_CROSS && !(__mips && __sgi)]: Remove.
5398         * adaint.h [sgi && _LFAPI]: Remove.
5399         * cstreams.c (__gnat_full_name) [sgi]: Remove.
5400         * env.c (__gnat_unsetenv) [__mips && __sgi]: Remove.
5401         (__gnat_clearenv) [__mips && __sgi]: Remove.
5402         * errno.c (_SGI_MP_SOURCE): Remove.
5403         * gsocket.h [sgi]: Remove.
5404         * init.c: Remove IRIX reference.
5405         [sgi]: Remove.
5406         * link.c [sgi]: Remove.
5407         * s-oscons-tmplt.c [__mips && __sgi] (IOV_MAX): Don't define.
5408         (main) [__mips && __sgi] (MAX_tv_sec): Don't define.
5409         (CLOCK_SGI_FAST, CLOCK_SGI_CYCLE): Remove.
5410         * sysdep.c [sgi]: Remove.
5411         (getc_immediate_common) [sgi]: Remove.
5412         (__gnat_localtime_tzoff) [sgi]: Remove.
5413         * terminals.c [__mips && __sgi] (IRIX): Don't define.
5414         [IRIX] (USE_GETPTY): Don't define.
5415         (allocate_pty_desc) [USE_GETPTY]: Remove.
5417         * g-traceb.ads: Remove IRIX reference.
5418         * g-trasym.ads: Likewise.
5419         * memtrack.adb: Likewise.
5420         * s-interr-sigaction.adb: Likewise.
5422         * gnat_rm.texi (Implementation Advice): Remove SGI info.
5423         (Implementation Defined Characteristics): Likewise.
5424         * gnat_ugn.texi (Summary of Run-Time Configurations, mips-irix):
5425         Remove.
5426         (Irix-Specific Considerations): Remove.
5428 2012-03-13  Tristan Gingold  <gingold@adacore.com>
5430         * gcc-interface/gigi.h (flag_vms_malloc64): Refine condition.
5432 2012-03-13  Tristan Gingold  <gingold@adacore.com>
5434         * sysdep.c: Adjust condition after removal of __osf__.
5436 2012-03-12  Eric Botcazou  <ebotcazou@adacore.com>
5438         * gcc-interface/gigi.h (shift_unc_components_for_thin_pointers): Kill.
5439         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Remove call
5440         to above function.
5441         * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Pool_Address>: Adjust
5442         handling of thin pointers.
5443         <Attr_Descriptor_Size>: Likewise.
5444         (gnat_to_gnu) <N_Free_Statement>: Likewise.
5445         * gcc-interface/utils.c (shift_unc_components_for_thin_pointers): Kill.
5446         (convert_to_fat_pointer): Adjust handling of thin pointers.
5447         (convert) <POINTER_TYPE>: Likewise.
5448         * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: Likewise.
5450 2012-03-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5452         * gcc-interface/Makefile.in (alpha*-dec-osf*): Remove.
5453         * a-intnam-tru64.ads, mlib-tgt-specific-tru64.adb,
5454         s-mastop-tru64.adb, s-osinte-tru64.adb, s-osinte-tru64.ads,
5455         s-taprop-tru64.adb, s-tasinf-tru64.ads, s-taspri-tru64.ads,
5456         system-tru64.ads: Remove.
5458         * adaint.c (__gnat_number_of_cpus) [__alpha__ && __osf__]:
5459         Remove.
5460         [IS_CROSS] [!(__alpha__ && __osf__)]: Remove.
5461         * env.c [__alpha__ && __osf__]: Remove.
5462         * gsocket.h (_OSF_SOURCE): Remove.
5463         (HAVE_THREAD_SAFE_GETxxxBYyyy) [__osf__]: Remove.
5464         * init.c [__alpha__ && __osf__]: Remove.
5465         * link.c [__osf__]: Remove.
5466         * s-oscons-tmplt.c [__alpha__ && __osf__]: Remove.
5467         [__osf__ && !_SS_MAXSIZE]: Remove.
5468         * sysdep.c [__osf__]: Remove.
5469         * terminals.c [__alpha__ && __osf__]: Remove.
5470         [OSF1]: Remove.
5472         * g-traceb.ads: Remove Tru64 reference.
5473         * g-trasym.ads: Likewise.
5474         * gnat_ugn.texi (Linking a Mixed C++ & Ada Program): Likewise.
5475         (Summary of Run-Time Configurations): Likewise.
5476         * memtrack.adb: Likewise.
5478 2012-03-12  Tristan Gingold  <gingold@adacore.com>
5480         * gcc-interface/decl.c (gnat_to_gnu_param): Use flag_vms_malloc64
5481         instead of TARGET_MALLOC64.
5482         * gcc-interface/gigi.h (flag_vms_malloc64): Define instead
5483         of TARGET_MALLOC64.
5485 2012-03-09  Robert Dewar  <dewar@adacore.com>
5487         * a-direct.adb, comperr.adb, freeze.adb: Minor reformatting.
5489 2012-03-09  Arnaud Charlet  <charlet@adacore.com>
5491         * s-taskin.adb (Initialize_ATCB): Set Task_Image_Len to
5492         0 so that we never access this field uninitialized (e.g. in
5493         Task_Primitives.Operations.Enter_Task for the environment task).
5495 2012-03-09  Vincent Pucci  <pucci@adacore.com>
5497         * exp_ch5.adb (Expand_Iterator_Loop):
5498         Call to Expand_Iterator_Loop_Over_Array added.
5499         (Expand_Iterator_Loop_Over_Array): New routine. Expansion of
5500         "of" iterator loop over arrays. Multidimensional array case added.
5502 2012-03-09  Eric Botcazou  <ebotcazou@adacore.com>
5504         * uintp.ads: Fix minor pasto in comment.
5506 2012-03-09  Vasiliy Fofanov  <fofanov@adacore.com>
5508         * a-direct.adb: Do not strip the trailing directory separator
5509         from path, as this is already done inside Normalize_Pathname;
5510         doing it again produces the wrong result on Windows for the
5511         drive's root dir (i.e. "X:\" becomes "X:").
5513 2012-03-09  Thomas Quinot  <quinot@adacore.com>
5515         * exp_attr.adb, freeze.adb, sem_attr.adb, aspects.adb, aspects.ads,
5516         sem_ch13.adb, snames.ads-tmpl (Exp_Attr.Expand_N_Attribute_Reference):
5517         Add Attribute_Scalar_Storage_Order.
5518         (Sem_Attr.Analyze_Attribute, Eval_Attribute): Ditto.
5519         (Aspects): Add Aspect_Scalar_Storage_Order (Snames): Add
5520         Name_Scalar_Storage_Order and Attribute_Scalar_Storage_Order.
5521         (Sem_Ch13.Analyze_Attribute_Definition_Clause): Add processing
5522         for Scalar_Storage_Order.
5523         (Freeze): If Scalar_Storage_Order is specified, check that it
5524         is compatible with Bit_Order.
5526 2012-03-09  Robert Dewar  <dewar@adacore.com>
5528         * s-osinte-linux.ads, sem_util.adb, s-taprop-linux.adb, exp_ch4.adb,
5529         a-strsup.ads, sem_ch6.adb, a-stwisu.ads, exp_ch3.adb,
5530         a-stzsup.ads: Minor reformatting.
5532 2012-03-09  Thomas Quinot  <quinot@adacore.com>
5534         * s-ransee-vms.adb: Minor reformatting.
5536 2012-03-09  Arnaud Charlet  <charlet@adacore.com>
5538         * comperr.adb (Delete_SCIL_Files): Fix handling of
5539         N_Package_Renaming_Declaration and N_Generic_Package_Declaration.
5541 2012-03-09  Javier Miranda  <miranda@adacore.com>
5543         * sem_ch6.adb (Check_Body_To_Inline): In AAMP and VM targets
5544         use frontend inlining at all optimization levels.
5545         * sem_util.adb (Must_Inline): In AAMP and VM targets, given that
5546         there is no inlining support in the backend, use also frontend
5547         inlining when compiling with optimizations enabled.
5548         * exp_ch6.adb (Expand_Call): Minor code reorganization.
5550 2012-03-09  Eric Botcazou  <ebotcazou@adacore.com>
5552         * gcc-interface/ada-tree.h (TYPE_VAX_FLOATING_POINT_P): Move around.
5553         (TYPE_UNCONSTRAINED_ARRAY): Adjust comment.
5554         * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Pool_Address>: Tidy
5555         up.  Add comment and use canonical predicate for thin pointers.
5556         (gnat_to_gnu) <N_Free_Statement>: Tidy up and reorder.  Add comment
5557         and use canonical predicate for thin pointers.
5558         * gcc-interface/utils.c (convert_to_fat_pointer): Remove superfluous
5559         'else' and use standard name.
5560         (convert_to_thin_pointer): Delete.
5561         (convert) <POINTER_TYPE>: Do the difference in sizetype directly and
5562         change obsolete idioms.  Do not call above function.
5563         (unchecked_convert): Fix formatting.
5564         * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: In the thin
5565         pointer case, use byte_position to get the field position.
5567 2012-03-07  Eric Botcazou  <ebotcazou@adacore.com>
5569         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set flags on the
5570         DECL node built for a type which has a non-trivial equivalent type.
5572 2012-03-07  Eric Botcazou  <ebotcazou@adacore.com>
5574         * gcc-interface/gigi.h (rest_of_type_decl_compilation): Delete.
5575         * gcc-interface/decl.c (defer_finalize_level): Likewise.
5576         (defer_finalize_list): Likewise.
5577         (gnat_to_gnu_entity): Delete references to above variables and do not
5578         call rest_of_type_decl_compilation.
5579         (rest_of_type_decl_compilation): Delete.
5580         (rest_of_type_decl_compilation_no_defer): Likewise.
5581         * gcc-interface/utils.c (rest_of_record_type_compilation): Do not call
5582         rest_of_type_decl_compilation.
5583         (create_type_decl): Likewise.
5584         (update_pointer_to): Likewise.
5586 2012-03-07  Eric Botcazou  <ebotcazou@adacore.com>
5588         * gcc-interface/trans.c (Identifier_to_gnu): Don't unshare initializer.
5589         (add_decl_expr): Mark external DECLs as used.
5590         * gcc-interface/utils.c (convert) <CONSTRUCTOR>: Copy the vector.
5592 2012-03-07  Tristan Gingold  <gingold@adacore.com>
5594         * s-ransee-vms.adb: New file.
5595         * gcc-interface/Makefile.in: Use s-ransee-vms.adb on VMS.
5596         * gcc-interface/Make-lang.in: Update dependencies.
5598 2012-03-07  Bob Duff  <duff@adacore.com>
5600         * rtsfind.ads: Add support for finding Super_String types.
5601         * sem_util.ads, sem_util.adb (Is_Bounded_String): New function
5602         to determine whether a given type is a bounded string type.
5603         (Is_Fully_Initialized_Type): Return True for bounded
5604         string types, to suppress bogus warnings.
5605         * exp_ch4.adb (Expand_Composite_Equality): Special case for bounded
5606         strings: equality composes. This allows us to remove default values in
5607         super strings.
5608         * a-strsup.ads, a-stwisu.ads, a-stzsup.ads: Update comments.
5609         * exp_ch3.adb (Expand_Freeze_Record_Type): Comment.
5611 2012-03-07  Robert Dewar  <dewar@adacore.com>
5613         * sem_util.adb, exp_ch4.adb, exp_ch6.adb, sem_ch6.adb: Minor
5614         reformatting.
5616 2012-03-07  Sergey Rybin  <rybin@adacore.com frybin>
5618         * gnat_ugn.texi: gnatpp: fix paragraph about sources with
5619         preprocessor directives.
5621 2012-03-07  Arnaud Charlet  <charlet@adacore.com>
5623         * s-osinte-linux.ads, s-taprop-linux.adb (prctl): New function.
5624         (Enter_Task): Call prctl when relevant.
5626 2012-03-07  Tristan Gingold  <gingold@adacore.com>
5628         * s-osinte-vms.ads: pthread_mutex_setname_np: new function.
5630 2012-03-07  Ed Schonberg  <schonberg@adacore.com>
5632         * sem_ch6.adb (Process_Formals): a generic subprogram with
5633         a formal incomplete type does not require a freeze node.
5635 2012-03-07  Bob Duff  <duff@adacore.com>
5637         * sem_util.ads: Minor reformatting.
5639 2012-03-07  Geert Bosch  <bosch@adacore.com>
5641         * targparm.ads: New target parameter Atomic_Sync_Default,
5642         defaulting to True.
5643         * targparm.adb (Get_Target_Parameters): Add processing for
5644         Atomic_Sync_Default.
5645         * gnat1drv.adb (Adjust_Global_Switches): Adjust Supress_Options
5646         based on ASD.
5648 2012-03-07  Javier Miranda  <miranda@adacore.com>
5650         * sem_ch3.adb (Analyze_Object_Declaration): If the object
5651         declaration has an init expression then stop the analysis of the
5652         object declaration if the expression which initializes the object
5653         is a call to an inlined function which returns an unconstrained
5654         and has been expanded into a procedure call.
5655         * sem_ch5.adb (Has_Call_Using_Secondary_Stack): Add missing
5656         support to handle selected components.
5657         * sem_ch6.ads (Cannot_Inline): Adding parameter Is_Serious plus
5658         documentation.
5659         * sem_ch6.adb (Check_And_Build_Body_To_Inline): New
5660         subprogram which implements the checks required by the
5661         new rules for frontend inlining and builds the body to inline.
5662         (Analyze_Subprogram_Body_Helper): Move code that
5663         checks inlining of subprogram that has nested subprogram
5664         to Check_And_Build_Body_To_Inline.  Replace call to
5665         Build_Body_To_Inline by call to the new subprogram
5666         Check_And_Build_Body_To_Inline.
5667         (Cannot_Inline): New implementation.
5668         * sem_ch12.adb (Analyze_Package_Instantiation.Must_Inline_Subp):
5669         New subprogram.
5670         * sem_util.ad[sb] (Must_Inline): New subprogram.
5671         (Returns_Unconstrained_Type): New subprogram.
5672         * sem_res.adb (Resolve_Call): Do not create a transient scope
5673         for inlined calls.
5674         * inline.ads (Analyzing_Inlined_Bodies): Remove unreferenced variable.
5675         * inline.adb (Analyze_Inlined_Bodies, Initialize): Remove setting
5676         to false the variable Analyzing_Inlined_Bodies.  Fix comments.
5677         * exp_ch4.adb (Expand_N_Allocator): Fix handling of finalization master.
5678         * exp_ch6.ads (List_Inlining_Info): New subprogram.
5679         * exp_ch6.adb (Expand_Call.Do_Inline): New subprogram.
5680         (Expand_Call.Do_Inline_Always): New subprogram.
5681         (In_Unfrozen_Instance): Move the declaration of this subprogram.
5682         (Expand_Inlined_Call.Reset_Dispatching_Calls): New subprogram.
5683         (Expand_Inlined_Call): Adding new support for inlining functions
5684         that return unconstrained types.
5685         (List_Inlining_Info): New subprogram.
5686         * debug.adb Document flags -gnatd.j and -gnatd.k
5687         * gnat1drv.adb Add call to generate the new listing of inlined
5688         calls and calls passed to the backend.
5690 2012-03-07  Robert Dewar  <dewar@adacore.com>
5692         * sem_ch5.adb, s-vaflop.adb, s-taprop-vms.adb, exp_ch6.adb,
5693         s-gearop.adb, sem_ch6.adb, g-trasym.adb: Minor reformatting.
5695 2012-03-07  Javier Miranda  <miranda@adacore.com>
5697         * a-ngrear.ads: Add documentation.
5699 2012-03-07  Tristan Gingold  <gingold@adacore.com>
5701         * s-taprop-vms.adb (Create_Task): set thread name.
5702         * s-osinte-vms.ads (pthread_attr_setname_np): Declare.
5704 2012-03-07  Arnaud Charlet  <charlet@adacore.com>
5706         * g-trasym.adb: Minor reformatting.
5708 2012-03-07  Robert Dewar  <dewar@adacore.com>
5710         * a-ngrear.ads: Minor addition of ??? comment.
5712 2012-03-07  Gary Dismukes  <dismukes@adacore.com>
5714         * exp_ch4.adb (Apply_Accessibility_Check): Call
5715         Remove_Side_Effects in the build-in-place case, to ensure that
5716         we capture the call and don't end up with two calls.
5718 2012-03-07  Javier Miranda  <miranda@adacore.com>
5720         * exp_ch6.adb (Expand_Inlined_Call): Skip inlining of functions
5721         that return unconstrained types using an extended return statement
5722         since the support for inlining these functions has not been yet
5723         added to the frontend.
5724         * s-vaflop.adb, s-vaflop-vms-alpha.adb: Code reorganization.
5725         * a-ngrear.ads: Replace all the Inline_Always pragmas by pragma
5726         Inline.
5727         * a-ngrear.adb (Eigenvalues, Transpose): Restructured to use
5728         extended return statement.
5729         * a-strsup.adb, a-stzsup.adb, a-stwisu.adb (Concat, Super_Slice,
5730         Super_To_String): Restructured to use extended return statement.
5731         * a-chahan.adb (To_Basic, To_Lower, To_Upper): Restructured to
5732         use extended return statement.
5733         * s-gearop.adb (Diagonal, Matrix_Elementwise_Operation,
5734         Vector_Elementwise_Operation, Matrix_Elementwise_Operation,
5735         Matrix_Matrix_Scalar_Elementwise_Operation,
5736         Vector_Vector_Elementwise_Operation,
5737         Vector_Vector_Scalar_Elementwise_Operation,
5738         Matrix_Scalar_Elementwise_Operation,
5739         Vector_Scalar_Elementwise_Operation,
5740         Scalar_Matrix_Elementwise_Operation,
5741         Scalar_Vector_Elementwise_Operation, Matrix_Matrix_Product,
5742         Matrix_Vector_Product, Outer_Product, Unit_Matrix, Unit_Vector,
5743         Vector_Matrix_Product): Restructured to use extended return
5744         statement.
5746 2012-03-07  Vincent Pucci  <pucci@adacore.com>
5748         * sem_ch5.adb (One_Bound): Minor reformatting.
5750 2012-03-07  Tristan Gingold  <gingold@adacore.com>
5752         * s-osinte-vms-ia64.adb, s-osinte-vms-ia64.ads, s-osinte-vms.adb,
5753         s-osinte-vms.ads, gcc-interface/Makefile.in: Merge s-osinte-vms and
5754         s-osinte-vms-ia64.
5756 2012-03-07  Ed Schonberg  <schonberg@adacore.com>
5758         * checks.adb (Apply_Predicate_Check): Do not generate a predicate
5759         check is the context is an internally generated type-specific
5760         function.
5761         * sem_ch6.adb (Process_PPCs); the formals of internally generated
5762         type-specific functions do not get assertion checks.
5764 2012-03-07  Yannick Moy  <moy@adacore.com>
5766         * gnat_rm.texi: Minor renaming of title.
5767         * gnat_ugn.texi: Minor correction.
5769 2012-03-07  Vincent Pucci  <pucci@adacore.com>
5771         * exp_ch4.adb (Expand_N_Quantified_Expression): Minor
5772         reformating.
5773         * sem_ch4.adb (Analyze_Quantified_Expression): Creation and
5774         analysis of the iteration scheme added in all cases.
5775         * sem_ch5.adb (Analyze_Iteration_Scheme): Minor reformating.
5776         (Analyze_Iterator_Specification): Minor reformating.
5777         * sem_res.adb (Resolve_Quantified_Expression): Resolution of
5778         the condition added in all cases.
5780 2012-03-07  Thomas Quinot  <quinot@adacore.com>
5782         * einfo.adb, einfo.ads: Add flag Reverse_Storage_Order.
5784 2012-03-07  Yannick Moy  <moy@adacore.com>
5786         * gnat_rm.texi, gnat_ugn.texi: Rewording of GNAT UG and GNAT RM to
5787         account for Ada 2012 assertions, and their pragma counterparts in GNAT.
5789 2012-03-07  Thomas Quinot  <quinot@adacore.com>
5791         * exp_attr.adb, sem_attr.adb: Minor reformatting.
5793 2012-03-07  Bob Duff  <duff@adacore.com>
5795         * hostparm.ads (Max_Instantiations): Increase parameter.
5797 2012-03-07  Bob Duff  <duff@adacore.com>
5799         * par-prag.adb: Minor code rearrangement.
5801 2012-03-07  Bob Duff  <duff@adacore.com>
5803         * a-strsup.ads, a-stwisu.ads, a-stzsup.ads (Super_String):
5804         Remove default initial value for Data. It is no longer needed
5805         because "=" now composes properly for untagged records. This
5806         default has caused efficiency problems.
5808 2012-03-07  Ed Schonberg  <schonberg@adacore.com>
5810         * sem_res.adb (Resolve_Actuals): If the actual is a selected
5811         component of an anonymous access type, whose prefix is a variable,
5812         treat the variable as if it may be modified by the call, to
5813         suppress spurious warnings that a variable might be declared as
5814         a constant.
5816 2012-03-07  Thomas Quinot  <quinot@adacore.com>
5818         * einfo.adb, einfo.ads: Remove unused entity flags.
5820 2012-03-07  Eric Botcazou  <ebotcazou@adacore.com>
5822         * gnat_ugn.texi (Inline Assembler): Fix swapping of Input and
5823         Output operands throughout.
5825 2012-03-07  Hristian Kirtchev  <kirtchev@adacore.com>
5827         * sem_ch12.adb (Earlier): When two nodes come from the same
5828         generic instantiation, compare their locations. Otherwise always
5829         use the top level locations of the nodes.
5831 2012-03-07  Thomas Quinot  <quinot@adacore.com>
5833         * einfo.ads, sem_prag.adb: Minor reformatting.
5835 2012-03-05  Jason Merrill  <jason@redhat.com>
5837         * gcc-interface/Make-lang.in (doc/gnat_ugn.texi): Build xgnatugn
5838         before using it.
5840 2012-03-04  Eric Botcazou  <ebotcazou@adacore.com>
5842         * gnatvsn.ads (Library_Version): Bump to 4.8.
5844 2012-03-03  H.J. Lu  <hongjiu.lu@intel.com>
5846         * init.c (__gnat_adjust_context_for_raise): Also check
5847         "orq $0x0,(%esp)" for x32.
5849         * link.c (__gnat_default_libgcc_subdir): Set to libx32 for x32.
5851         * gcc-interface/Makefile.in (arch): Set to x32 if MULTISUBDIR
5852         is /x32 and add support for x32.
5854 2012-02-29  Eric Botcazou  <ebotcazou@adacore.com>
5856         * gcc-interface/decl.c (components_to_record): Add ARTIFICIAL parameter
5857         and set TYPE_ARTIFICIAL according to it.  Adjust recursive call.
5858         (gnat_to_gnu_entity) <E_Record_Type>: Adjust call to above function.
5859         * gcc-interface/utils.c (rest_of_record_type_compilation): Do not
5860         invoke rest_of_type_decl_compilation on the parallel type, if any.
5862 2012-02-29  Eric Botcazou  <ebotcazou@adacore.com>
5864         * gcc-interface/utils.c (gnat_write_global_declarations): Make sure the
5865         dummy global built for global types is preserved.
5867 2012-02-27  Tristan Gingold  <gingold@adacore.com>
5869         * gcc-interface/decl.c (gnat_to_gnu_entity) [E_String_Type,
5870         E_Array_Type]: Reuse dummy fat type for gnu_ptr_template and
5871         gnu_template_type.
5873 2012-02-27  Eric Botcazou  <ebotcazou@adacore.com>
5875         * gcc-interface/ada-tree.h (TYPE_PACKED_ARRAY_TYPE_P): Add checking.
5876         (TYPE_BY_REFERENCE_P): New flag.
5877         (TYPE_IS_BY_REFERENCE_P): New macro.
5878         (TYPE_DUMMY_P): Add checking and remove VOID_TYPE.
5879         (TYPE_IS_DUMMY_P): Adjust for above change.
5880         * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_BY_REFERENCE_P
5881         and TYPE_IS_BY_REFERENCE_P instead of TREE_ADDRESSABLE.
5882         (gnat_to_gnu_param): Likewise.
5883         (maybe_pad_type): Likewise.
5884         (make_type_from_size): Use TYPE_IS_PACKED_ARRAY_TYPE_P.
5885         * gcc-interface/misc.c (must_pass_by_ref): Use TYPE_IS_BY_REFERENCE_P
5886         instead of TREE_ADDRESSABLE.
5887         * gcc-interface/trans.c (finalize_nrv): Likewise.
5888         (call_to_gnu): Likewise.  Do not create a temporary for return values
5889         with by-reference type here.
5890         (gnat_to_gnu): Test TYPE_IS_DUMMY_P instead of TYPE_DUMMY_P.
5891         (gnat_gimplify_expr) <ADDR_EXPR>: Don't do anything for non-constant
5892         CONSTRUCTORs and calls.
5893         * gcc-interface/utils.c (make_dummy_type): Get the equivalent type of
5894         the underlying type and use it throughout.  Use TYPE_IS_BY_REFERENCE_P
5895         instead of TREE_ADDRESSABLE.
5896         * gcc-interface/utils2.c (build_cond_expr): Deal with by-reference
5897         types explicitly.
5899 2012-02-27  Eric Botcazou  <ebotcazou@adacore.com>
5901         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Revert previous
5902         change that creates a special VAR_DECL for debugging purposes.  For an
5903         aliased object with an unconstrained nominal subtype, make its type a
5904         thin reference to the underlying object.
5905         * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: Deal with
5906         expressions built for the initialization of above objects.
5908 2012-02-24  Dave Korn  <dave.korn.cygwin@gmail.com>
5910         * gcc-interface/Makefile.in (WIN_SO_PREFIX [windows targets]): New
5911         Windows-specific make variable.
5912         (WIN_SO_INSTALL_DIR [windows targets]): Likewise.
5913         (install-gnatlib): Respect the above during installation when set,
5914         and also install any windows import library that has been built.
5915         (gnatlib-shared-win32): Use WIN_SO_PREFIX to name output DLL and also
5916         build a corresponding import library.
5918 2012-02-22  Robert Dewar  <dewar@adacore.com>
5920         * exp_util.adb, make.adb, sem_dim.adb, sem_ch4.adb, exp_disp.adb: Minor
5921         reformatting.
5923 2012-02-22  Geert Bosch  <bosch@adacore.com>
5925         * g-bytswa-x86.adb, g-bytswa.adb, gcc-interface/Makefile.in: Remove
5926         x86-specific version of byteswap and use GCC builtins instead.
5928 2012-02-22  Tristan Gingold  <gingold@adacore.com>
5930         * gcc-interface/decl.c (gnat_to_gnu_entity) [E_String_Type,
5931         E_Array_Type]: Translate component ealier.
5933 2012-02-22  Robert Dewar  <dewar@adacore.com>
5935         * par-ch3.adb (P_Signed_Integer_Type_Definition): Specialize
5936         error message for 'Range.
5938 2012-02-22  Pascal Obry  <obry@adacore.com>
5940         * s-taprop-mingw.adb (Finalize_TCB): Do not wait on thread handle as
5941         this is our own thread.
5943 2012-02-22  Sergey Rybin  <rybin@adacore.com frybin>
5945         * tree_io.ads: Update ASIS_Version_Number because of the changes
5946         in Snames.
5948 2012-02-22  Hristian Kirtchev  <kirtchev@adacore.com>
5950         * exp_ch7.adb (Create_Finalizer): Suppress elaboration checks on
5951         stack-related finalizers.
5953 2012-02-22  Ed Schonberg  <schonberg@adacore.com>
5955         * sem_ch6.adb (Analyze_Expression_Function): If the construct
5956         is a completion, indicate that its formals are the formals of
5957         a completion, and as such do not get a cross- reference entry.
5958         (Analyze_Subprogram_Specification): Do not generate a definition
5959         for the entity of an expression function, because it may be a
5960         completion. Definition will be generated if needed when analyzing
5961         the generated subprogram declaration.
5963 2012-02-22  Vincent Celier  <celier@adacore.com>
5965         * make.adb (Check): When checking if an object file is in the
5966         correct object directory, get the unit name from a previous call
5967         to Check_Source_Info_In_ALI.
5968         * makeutl.adb (Check_Source_Info_In_ALI): Return the name of
5969         the unit when everything is OK, otherwise return No_Name.
5970         * makeutl.ads (Check_Source_Info_In_ALI): Return Name_Id instead
5971         of Boolean
5973 2012-02-22  Ed Schonberg  <schonberg@adacore.com>
5975         * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): In an
5976         instance, the operator is visible if an operand is of some
5977         numeric type which is not in use or directly visible, and the
5978         other operand is a numeric literal.
5980 2012-02-22  Tristan Gingold  <gingold@adacore.com>
5982         * init.c: Minor code clean up.
5983         * gcc-interface/Make-lang.in: Update dependencies.
5985 2012-02-22  Arnaud Charlet  <charlet@adacore.com>
5987         * gnatlink.adb (Gnatlink): Use -gnatcC in CodePeer_Node,
5988         otherwise GCC will generate an object file.
5990 2012-02-22  Vincent Celier  <celier@adacore.com>
5992         * projects.texi: Correct typo related to "**" in Source_Dirs.
5994 2012-02-22  Steve Baird  <baird@adacore.com>
5996         * sem_prag.adb (Analyze_PPC_In_Decl_Part): Clean up generation of
5997         error message text.
5999 2012-02-22  Vincent Pucci  <pucci@adacore.com>
6001         * rtsfind.adb (Get_Unit_Name): Ada_Numerics_Child and
6002         System_Dim_Child cases added.
6003         * rtsfind.ads: Ada_Numerics,
6004         Ada_Numerics_Generic_Elementary_Functions, System_Dim,
6005         System_Dim_Float_IO and System_Dim_Integer_IO added to the list
6006         of RTU_Id.  Ada_Numerics_Child and System_Dim_Child added as
6007         new RTU_Id subtypes.
6008         * sem_dim.adb (Is_Dim_IO_Package_Entity): Use of
6009         Rtsfind to verify the package entity is located either
6010         in System.Dim.Integer_IO or in System.Dim.Float_IO.
6011         (Is_Dim_IO_Package_Instantiation): Minor
6012         changes.  (Is_Elementary_Function_Call): Removed.
6013         (Is_Elementary_Function_Entity): New routine.
6014         (Is_Procedure_Put_Call): Is_Dim_IO_Package_Entity call added.
6015         * snames.ads-tmpl: Name_Dim and Name_Generic_Elementary_Functions
6016         removed.
6018 2012-02-22  Vincent Pucci  <pucci@adacore.com>
6020         * sem_prag.adb: Minor reformatting.
6022 2012-02-22  Ed Schonberg  <schonberg@adacore.com>
6024         * sem_ch3.adb (Find_Type_Name): When analyzing a private type
6025         declaration that is the completion of a tagged incomplete type, do
6026         not associate the class-wide type already created with the private
6027         type to prevent order-of-elaboration issues in the back-end.
6028         * exp_disp.adb (Find_Specific_Type): Find specific type of
6029         a class-wide type, and handle the case of an incomplete type
6030         coming  either from a limited_with clause or from an incomplete
6031         type declaration. Used when expanding a dispatchin call and
6032         generating tag checks (minor refactoring).
6034 2012-02-22  Robert Dewar  <dewar@adacore.com>
6036         * exp_ch5.adb: Add comment.
6037         * sem_ch12.adb, exp_ch6.adb: minor reformatting
6039 2012-02-22  Ed Schonberg  <schonberg@adacore.com>
6041         * freeze.adb (Freeze_Entity): Do not perform type layout within
6042         a generic unit.
6044 2012-02-22  Eric Botcazou  <ebotcazou@adacore.com>
6046         * init.c (__gnat_error_handler) [Linux]: Map SIGBUS to
6047         Storage_Error.
6049 2012-02-22  Ed Schonberg  <schonberg@adacore.com>
6051         * exp_ch5.adb (Expand_N_Assignment_Statement): Reject an
6052         assignment to a classwide type whose type is limited, as
6053         can happen in an instantiation in programs that run afoul or
6054         AI05-0087.
6056 2012-02-17  Ed Schonberg  <schonberg@adacore.com>
6058         * exp_ch6.adb (Legal_Copy): If layout is not
6059         determined in the front-end, do not emit error message when
6060         by-reference actual is potentially unaligned.
6061         * gcc-interface/decl.c (gnat_to_gnu_field): Better error message for
6062         illegal representation clause on tagged or aliased component, or on
6063         by-reference type with forced alignment.
6065 2012-02-17  Nicolas Roche  <roche@adacore.com>
6067         * gcc-interface/Makefile.in: Ensure FORCE_DEBUG_ADAFLAGS variables is
6068         propagated by gnatlib-sjlj and gnatlib-zcx targets.
6069         * gcc-interface/Make-lang.in: Update dependencies.
6071 2012-02-17  Thomas Quinot  <quinot@adacore.com>
6073         * sem_ch12.adb (Analyze_Package_Instantiation): For an
6074         instantiation in an RCI library unit, omit the instance body
6075         if the RCI library unit is the instance itself (E.2.3(18)),
6076         but include the body if the instantiation is within the RCI
6077         declaration (12.3(12)).
6079 2012-02-17  Steve Baird  <baird@adacore.com>
6081         * sem_prag.adb (Analyze_PPC_In_Decl_Part): Pre'Class and
6082         Post'Class aspects can only be specified for a primitive operation
6083         of a tagged type.
6085 2012-02-17  Yannick Moy  <moy@adacore.com>
6087         * gnat_rm.texi: Minor shuffling.
6089 2012-02-17  Ed Schonberg  <schonberg@adacore.com>
6091         * aspects.adb: Expression functions can carry pre/postconditions.
6092         * par-ch6.adb (P_Subprogram): look for optional pre/postconditions
6093         in an expression function.
6094         * sem_prag (Check_Precondition_Postcondition): legal on expression
6095         functions.
6097 2012-02-17  Vincent Pucci  <pucci@adacore.com>
6099         * a-cdlili.adb, a-cidlli.adb, a-cihama.adb, a-cimutr.adb,
6100         * a-ciorma.adb, a-cohama.adb, a-coinve.adb, a-comutr.adb,
6101         * a-convec.adb, a-coorma.adb (Adjust): New routine.
6102         (Constant_Reference): Increment Busy and Lock counters.
6103         (Reference): Increase Busy and Lock counters.
6104         (Finalize): New routine.
6105         * a-cihase.adb, a-ciorse.adb, a-cohase.adb, a-coorse.adb:
6106         (Adjust): New routine.  (Constant_Reference): Increment Busy
6107         and Lock counters.
6108         (Finalize): New routine.
6109         * a-cdlili.ads, a-cidlli.ads, a-cihama.ads, a-cihase.ads,
6110         * a-cimutr.ads, a-ciorma.ads, a-ciorse.ads, a-cohama.ads,
6111         * a-cohase.ads, a-coinve.ads, a-comutr.ads, a-convec.ads,
6112         * a-coorma.ads, a-coorse: Controlled component added to the
6113         reference types.
6115 2012-02-17  Robert Dewar  <dewar@adacore.com>
6117         * restrict.adb (Check_Restriction): Add special handling for
6118         No_Obsolescent_Features.
6120 2012-02-17  Hristian Kirtchev  <kirtchev@adacore.com>
6122         * exp_util.adb (Find_Finalize_Address): When dealing with an
6123         internally built full view for a type with unknown discriminants,
6124         use the original record type.
6126 2012-02-17  Robert Dewar  <dewar@adacore.com>
6128         * sem_dim.adb: Minor reformatting.
6130 2012-02-17  Yannick Moy  <moy@adacore.com>
6132         * gnat_rm.texi: Minor rewording.
6134 2012-02-17  Thomas Quinot  <quinot@adacore.com>
6136         * sem_aggr.adb: Minor reformatting.
6138 2012-02-17  Robert Dewar  <dewar@adacore.com>
6140         * gnat_ugn.texi: Update doc for -gnatw.m to include 2*x case.
6142 2012-02-17  Vincent Pucci  <pucci@adacore.com>
6144         * sem_dim.adb (Is_Dim_IO_Package_Entity): New routine.
6145         (Is_Dim_IO_Package_Instantiation): Is_Dim_IO_Package_Entity
6146         call added.
6147         (Is_Procedure_Put_Call): Is_Dim_IO_Package_Entity
6148         call added.
6149         * s-dim.ads: Make package Pure.
6151 2012-02-17  Gary Dismukes  <dismukes@adacore.com>
6153         * prj-nmsc.adb: Minor reformatting.
6155 2012-02-17  Yannick Moy  <moy@adacore.com>
6157         * gnat_rm.texi: Update GNAT RM with a separate chapter on restrictions.
6159 2012-02-17  Yannick Moy  <moy@adacore.com>
6161         * gnat_ugn.texi: Fix typos.
6163 2012-02-17  Pascal Obry  <obry@adacore.com>
6165         * prj-nmsc.adb: prj-nmsc.adb (Check_Aggregated): Check that an
6166         aggregate is not Externally_Built.
6168 2012-02-17  Ed Schonberg  <schonberg@adacore.com>
6170         * sem_aggr.adb (Resolve_Record_Aggregate): If a composite
6171         component has a box association, copy the default value using
6172         the current scope as the scope of internal types, to prevent
6173         scoping anomalies in gigi.
6175 2012-02-17  Robert Dewar  <dewar@adacore.com>
6177         * sem_dim.adb, sem_dim.ads, s-tasren.adb, prj.adb, prj.ads, freeze.adb,
6178         sem_res.adb, exp_ch4.adb, sinput.adb, sinput.ads, exp_aggr.adb,
6179         exp_intr.adb, s-os_lib.adb: Minor reformatting.
6181 2012-02-17  Ed Schonberg  <schonberg@adacore.com>
6183         * sem_ch6.adb (Is_Non_Overriding_Operation): Add warning if the
6184         old operation is abstract, the relevant type is not abstract,
6185         and the new subprogram fails to override.
6187 2012-02-15  Eric Botcazou  <ebotcazou@adacore.com>
6189         * gcc-interface/trans.c (Identifier_to_gnu): Move block retrieving the
6190         type of the result to the end and execute it for a deferred constant of
6191         a discriminated type whose full view can be elaborated statically.
6193 2012-02-15  Eric Botcazou  <ebotcazou@adacore.com>
6195         * gcc-interface/trans.c (gnat_to_gnu) <N_Qualified_Expression>: If the
6196         type is tagged, mark it as used for debugging purposes.
6197         <N_Allocator>: Likewise for a qualified expression.
6199 2012-02-15  Eric Botcazou  <ebotcazou@adacore.com>
6201         * gcc-interface/trans.c (call_to_gnu): Create the temporary for the
6202         return value in the by-reference return type case if this isn't the
6203         expression of an object declaration.  Tidy up.
6205 2012-02-09  Tristan Gingold  <gingold@adacore.com>
6207         * gcc-interface/Makefile.in: Remove .sym rule (not used).
6208         Remove adamsg.o object (requires native message compiler).
6209         * init.c (CMA$_EXIT_THREAD, MTH$_FLOOVEMAT, SS$_INTDIV): Define as a
6210         macro instead of as extern int.
6211         (ADA$_ALREADY_OPEN, ADA$_CONSTRAINT_ERRO, ADA$_DATA_ERROR)
6212         (ADA$_DEVICE_ERROR, ADA$_END_ERROR, ADA$_FAC_MODE_MISMAT)
6213         (ADA$_IOSYSFAILED, ADA$_KEYSIZERR, ADA$_KEY_MISMATCH)
6214         (ADA$_LAYOUT_ERROR, ADA$_LINEXCMRS, ADA$_MAXLINEXC)
6215         (ADA$_MODE_ERROR, ADA$_MRN_MISMATCH, ADA$_MRS_MISMATCH)
6216         (ADA$_NAME_ERROR, ADA$_NOT_OPEN, ADA$_ORG_MISMATCH)
6217         (ADA$_PROGRAM_ERROR, ADA$_RAT_MISMATCH, ADA$_RFM_MISMATCH)
6218         (ADA$_STAOVF, ADA$_STATUS_ERROR, ADA$_STORAGE_ERROR)
6219         (ADA$_UNSUPPORTED, ADA$_USE_ERROR): Likewise.
6220         (struct cond_except): Field cond is now an unsigned int.
6221         (dec_ada_cond_except_table): Adjust.
6222         (cond_except_table): Likewise.
6223         (cond_resignal_table): Likewise.
6224         (__gnat_default_resignal_p): Fix style.
6226 2012-02-08  Vincent Celier  <celier@adacore.com>
6228         * gcc-interface/Make-lang.in: Add g-byorma.o to gnatbind objects
6229         (g-buorma is now imported by sinput).
6230         Update dependencies.
6231         * scn.adb (Initialize_Scanner): Call Check_For_BOM
6232         * sinput-p.adb (Source_File_Is_Subunit): Call Check_For_BOM
6233         * sinput.adb: New procedure Check_For_BOM
6234         * sinput.ads: New procedure Check_For_BOM
6236 2012-02-08  Vincent Pucci  <pucci@adacore.com>
6238         * impunit.adb: Dimension package names updated
6239         * Makefile.rtl: s-dim added
6240         * sem_dim.adb (Is_Procedure_Put_Call): minor changes
6241         (Is_Dim_IO_Package_Instantiation): minor changes
6242         * sem_dim.ads: minor changes in comments
6243         * snames.ads-tmpl: Name_Dim added Name_Dim_Float_IO and
6244         Name_Dim_Integer_IO removed
6245         * s-dim.ads: New package. Define the dimension terminology.
6246         * s-diflio.adb, s-diinio.adb, s-dimkio.ads, s-dimmks.ads,
6247         * s-dmotpr.ads: Package names updated.
6248         * s-diflio.ads, s-diinio.ads: Documentation added and package
6249         names updated.
6251 2012-02-08  Gary Dismukes  <dismukes@adacore.com>
6253         * gcc-interface/utils2.c (build_call_alloc_dealloc_proc): Revise test
6254         for storage pools to test for an underlying record type rather than
6255         testing Is_Tagged_Type, so that simple storage pools will be handled
6256         the same as normal Ada storage pools.
6258 2012-02-08  Yannick Moy  <moy@adacore.com>
6260         * gnat_rm.texi: Minor reshuffling to place restriction at
6261         appropriate place.
6263 2012-02-08  Bob Duff  <duff@adacore.com>
6265         * warnsw.adb (Set_Warning_Switch): Set Warn_On_Suspicious_Modulus_Value
6266         False for '-gnatwA', to suppress these warnings.
6268 2012-02-08  Vincent Celier  <celier@adacore.com>
6270         * sinput-p.adb (Source_File_Is_Subunit): Check for BOM before
6271         starting to scan, so that UTF8 encoding is taken into account.
6273 2012-02-08  Arnaud Charlet  <charlet@adacore.com>
6275         * s-tasren.adb, s-tasren.ads (Internal_Complete_Rendezvous): New
6276         function.
6277         (Complete_Rendezvous): Now call Internal_Complete_Rendezvous.
6278         (Exceptional_Complete_Rendezvous): Mark No_Return.
6280 2012-02-08  Eric Botcazou  <ebotcazou@adacore.com>
6282         * exp_aggr.adb (Compile_Time_Known_Composite_Value):
6283         New predicate to compute whether a composite value can be
6284         evaluated at compile time.
6285         (Component_Not_OK_For_Backend): Use Compile_Time_Known_Value for all
6286         expressions of elementary type and Compile_Time_Known_Composite_Value
6287         for all other expressions.
6288         (Expand_Record_Aggregate): Convert to assignments in the case
6289         of a type with mutable components if the aggregate cannot be
6290         built statically.
6292 2012-02-08  Gary Dismukes  <dismukes@adacore.com>
6294         * aspects.ads (type Aspect_Id): Add Simple_Storage_Pool_Type.
6295         (Impl_Defined_Aspects): Add association for
6296         Aspect_Simple_Storage_Pool_Type.
6297         (Aspect_Names): Add
6298         association for Aspect_Simple_Storage_Pool_Type.
6299         * aspects.adb:
6300         (Canonical_Aspect): Add association for Simple_Storage_Pool_Type.
6301         * exp_attr.adb (Expand_N_Attribute_Reference):
6302         Change name to Name_Simple_Storage_Pool_Type.
6303         * exp_ch4.adb (Expand_N_Allocator): Change
6304         name to Name_Simple_Storage_Pool_Type.
6305         * exp_intr.adb (Expand_Unc_Deallocation): Change name to
6306         Name_Simple_Storage_Pool_Type.  * freeze.adb (Freeze_Entity):
6307         Change names to Name_Simple_Storage_Pool_Type.  * par-prag.adb:
6308         Change names to Name_Simple_Storage_Pool_Type.  * sem_attr.adb:
6309         (Analyze_Attribute): Change name to Name_Simple_Storage_Pool_Type.
6310         * sem_ch13.adb (Analyze_Attribute_Definition_Clause):
6311         Change name to Name_Simple_Storage_Pool_Type.
6312         * sem_prag.adb:
6313         (Analyze_Pragma): Change name to Name_Simple_Storage_Pool_Type.
6314         (Sig_Flags): Change name to Name_Simple_Storage_Pool_Type.
6315         * sem_res.adb (Resolve_Allocator): Change name to
6316         Name_Simple_Storage_Pool_Type.  * snames.ads-tmpl:
6317         (Name_Simple_Storage_Pool_Type): New name constant.
6318         (type Pragma_Id): Change name to Name_Simple_Storage_Pool_Type and
6319         move to main pragma section because it no longer matches the
6320         attribute name.
6321         * snames.adb-tmpl (Get_Pragma_Id): Remove test for
6322         Name_Simple_Storage_Pool.
6323         (Is_Pragma_Name): Remove test for Name_Simple_Storage_Pool.
6325 2012-02-08  Robert Dewar  <dewar@adacore.com>
6327         * gnat_ugn.texi: Add some clarification to -gnatwA and -gnatws.
6329 2012-02-08  Pascal Obry  <obry@adacore.com>
6331         * prj.adb (Compute_All_Imported_Projects): Use new
6332         For_Project_And_Aggregated_Context to ensure proper context is
6333         used for encapsulated aggregate libraries.
6334         * prj-proc.adb (Recursive_Process): Call
6335         Process_Aggregated_Projects earlier to ensure that all dependent
6336         projects are set with the proper encapsulated status.
6338 2012-02-08  Pascal Obry  <obry@adacore.com>
6340         * s-os_lib.adb (Normalize_Arguments): Properly escape last \ in null
6341         terminated string.
6343 2012-02-08  Pascal Obry  <obry@adacore.com>
6345         * prj.ads, prj.adb (For_Project_And_Aggregated_Context): New
6346         generic routine with a context parameter.
6348 2012-02-08  Robert Dewar  <dewar@adacore.com>
6350         * a-coinve.adb, sem_util.adb, sem_ch8.adb, a-cobove.adb,
6351         a-convec.adb: Minor reformatting and code reorganization.
6353 2012-02-08  Steve Baird  <baird@adacore.com>
6355         * sem_cat.adb (In_Preelaborated_Unit): A child
6356         unit instantiation does not inherit preelaboration requirements
6357         from its parent.
6359 2012-02-08  Gary Dismukes  <dismukes@adacore.com>
6361         * aspects.ads (type Aspect_Id): Add Aspect_Simple_Storage_Pool.
6362         (Impl_Defined_Aspects): Add entry for Aspect_Simple_Storage_Pool.
6363         (Aspect_Argument): Add Name entry for Aspect_Simple_Storage_Pool.
6364         (Aspect_Names): Add entry for Aspect_Simple_Storage_Pool.
6365         * aspects.adb (Canonical_Aspect): Add entry for
6366         Aspect_Simple_Storage_Pool.
6367         * exp_attr.adb (Expand_N_Attribute_Reference): Handle case of
6368         Attribute_Simple_Storage_Pool in the same way as Storage_Pool
6369         (add conversion, analyze/resolve). For the Storage_Size attribute,
6370         for the simple pool case, locate and use the simple pool type's
6371         Storage_Size function (if any), otherwise evaluate to zero.
6372         * exp_ch4.adb (Expand_N_Allocator): In the case of an allocator
6373         for an access type with an associated simple storage pool,
6374         locate and use the pool type's Allocate.
6375         * exp_intr.adb (Expand_Unc_Deallocation): In the case where the
6376         access type has a simple storage pool, locate the pool type's
6377         Deallocate procedure (if present) and use it as the procedure
6378         to call on the Free operation.
6379         * freeze.adb (Freeze_Entity): In the case of a full type for
6380         a private type defined with pragma Simple_Storage_Pool, check
6381         that the full type is also appropriate for the pragma. For
6382         a simple storage pool type, validate that the operations
6383         Allocate, Deallocate (if present), and Storage_Size
6384         (if present) are defined with appropriate expected profiles.
6385         (Validate_Simple_Pool_Op_Formal): New procedure
6386         (Validate_Simple_Pool_Operation): New procedure Add with and
6387         use of Rtsfind.
6388         * par-prag.adb: Add Pragma_Simple_Storage_Pool to case statement
6389         (no action required).
6390         * sem_attr.adb (Analyze_Attribute): For the case of the
6391         Storage_Pool attribute, give a warning if the prefix type has an
6392         associated simple storage pool, and rewrite the attribute as a
6393         raise of Program_Error. In the case of the Simple_Storage_Pool
6394         attribute, check that the prefix type has an associated simple
6395         storage pool, and set the attribute type to the pool's type.
6396         * sem_ch13.adb (Analyze_Aspect_Specifications): Add
6397         Aspect_Simple_Storage_Pool case choice.
6398         (Analyze_Attribute_Definition_Clause): Add
6399         Aspect_Simple_Storage_Pool to case for Ignore_Rep_Clauses
6400         (no action). Add handling for Simple_Storage_Pool attribute
6401         definition, requiring the name to denote a simple storage pool
6402         object.
6403         (Check_Aspect_At_Freeze_Point): For a simple storage pool
6404         aspect, set the type to that of the name specified for the aspect.
6405         * sem_prag.adb (Analyze_Pragma): Add handling for pragma
6406         Simple_Storage_Pool, requiring that it applies to a library-level
6407         type declared in a package declaration that is a limited private
6408         or limited record type.
6409         * sem_res.adb (Resolve_Allocator): Flag an attempt to call a
6410         build-in-place function in an allocator for an access type with
6411         a simple storage pool as unsupported.
6412         * snames.ads-tmpl: Add Name_Simple_Storage_Pool.
6413         (type Attribute_Id): Add Attribute_Simple_Storage_Pool.
6414         (type Pragma_Id): Add Pragma_Simple_Storage_Pool.
6415         * snames.adb-tmpl (Get_Pragma_Id): Handle case of
6416         Name_Simple_Storage_Pool.
6417         (Is_Pragma_Name): Return True for Name_Simple_Storage_Pool.
6419 2012-02-08  Cyrille Comar  <comar@adacore.com>
6421         * projects.texi: Clarify doc for interfaces.
6423 2012-02-07  Eric Botcazou  <ebotcazou@adacore.com>
6425         * gcc-interface/Make-lang.in (GCC_LINKERFLAGS): New variable.
6426         (GCC_LINK): Use it.
6428 2012-02-01  Tristan Gingold  <gingold@adacore.com>
6430         * gcc-interface/trans.c (Loop_Statement_to_gnu): Use sizetype
6431         instead of size_type_node.
6433 2012-01-30  Nicolas Roche  <roche@adacore.com>
6435         * gcc-interface/Make-lang.in: Update dependencies.
6436         * gcc-interface/Makefile.in: Use system-vxworks-system-ppc-mils.ads
6437         when needed.
6438         Remove Linker_Options -crtbe when building sjlj run-time.
6440 2012-01-30  Robert Dewar  <dewar@adacore.com>
6442         * sem.adb (Analyze): Call Analyze_Mod for N_Op_Mod mode.
6443         * sem_ch3.adb (Modular_Type_Declaration): Warn on mod value of
6444         form 2 * small-literal.
6445         * sem_ch4.adb (Analyze_Mod): New procedure (warn on suspicious
6446         mod value).
6447         * sem_ch4.ads (Analyze_Mod): New procedure.
6449 2012-01-30  Ed Schonberg  <schonberg@adacore.com>
6451         * sem_ch6.adb: sem_ch6.adb (Analyze_Expression_Function): Copy
6452         types and return expression when building spec for implicit
6453         body, to preserve global references that may be present in an
6454         instantiation.
6456 2012-01-30  Matthew Heaney  <heaney@adacore.com>
6458         * a-convec.adb, a-coinve.adb, a-cobove.adb (Sort,
6459         Reverse_Elements): Check for cursor tampering.
6461 2012-01-30  Ed Schonberg  <schonberg@adacore.com>
6463         * sem_util.adb (Is_Fully_Initialized_Type): In Ada 2012, a
6464         type with aspect Default_Value or Default_Component_Value is
6465         fully initialized, and use of variables of such types do not
6466         generate warnings.
6468 2012-01-30  Javier Miranda  <miranda@adacore.com>
6470 PR ada/15846
6471         * sem_ch8.adb (Analyze_Subprogram_Renaming):
6472         Handle self-renaming when the renamed entity is referenced using
6473         its expanded name.
6475 2012-01-30  Vincent Celier  <celier@adacore.com>
6477         * projects.texi: Add documentation for attribute Interfaces.
6479 2012-01-30  Hristian Kirtchev  <kirtchev@adacore.com>
6481         * exp_ch7.adb (Build_Finalizer_Call): Set loc again.
6482         * exp_ch11.adb (Expand_At_End_Handler): Do not provide a source
6483         location for the wrapped call to the original AT_END routine
6484         and the subsequent return statement.
6486 2012-01-30  Pascal Obry  <obry@adacore.com>
6488         * s-rannum.adb: Minor reformatting.
6490 2012-01-30  Hristian Kirtchev  <kirtchev@adacore.com>
6492         * a-calend-vms.adb, a-calend.adb: Increment the number of leap seconds
6493         to 25 and add the hard time value for 2012-06-30.
6495 2012-01-30  Robert Dewar  <dewar@adacore.com>
6497         * a-strhas.ads, einfo.adb, einfo.ads, exp_ch7.adb, exp_ch9.adb,
6498         freeze.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-proc.adb, s-llflex.ads,
6499         s-ransee.adb, s-ransee.ads, sem_ch13.adb, sem_dim.adb, sem_prag.adb:
6500         Minor reformatting/code reorganization.
6502 2012-01-30  Thomas Quinot  <quinot@adacore.com>
6504         * s-rannum.adb, s-ransee.adb, s-ransee.ads (Get_Seed): Return
6505         Unsigned_64 rather than Duration.
6506         (System.Random_Numbers.Reset): Use full value of seed
6507         (do not truncate sub-second bits).
6509 2012-01-30  Thomas Quinot  <quinot@adacore.com>
6511         * sem_cat.adb, sem_ch12.adb: Minor reformatting.
6513 2012-01-30  Yannick Moy  <moy@adacore.com>
6515         * gnat_ugn.texi: Minor correction of GNAT UG, to take into
6516         account changes to -gnatwa and more recent warnings.
6518 2012-01-30  Hristian Kirtchev  <kirtchev@adacore.com>
6520         * exp_ch7.adb (Build_Finalizer_Call): Do not provide a source
6521         location when creating a call to a finalizer.
6522         * exp_ch11.adb (Expand_Exception_Handlers): Do not provide
6523         a source location for the first actual of Save_Occurrence for
6524         consistency sake.
6526 2012-01-30  Ed Schonberg  <schonberg@adacore.com>
6528         * einfo.ads, einfo,adb: New attribute on scalar types:
6529         Default_Aspect_Value New attribute on  array types:
6530         Default_Aspect_Component_Value Move attribute Related_Array_Object
6531         to a different position to accomodate new aspect attributes.
6532         * freeze.adb (Freeze_Entity): Use new attributes to retrieve value
6533         of defaults set with an aspect specification, rather than using
6534         the list of aspects attached to the type, to prevent issues with
6535         partial views.
6536         * sem_ch13.adb (Analyze_Aspect_Specifications): For aspects
6537         Default_Value and Default_Component _Value, store corresponding
6538         expression in type entity.
6539         (Check_Aspect_At_End_Of_Declaration): If the default aspects
6540         are declared on the full view, use the full view to resolve the
6541         correseponding expression.
6542         * exp_ch3.adb (Init_Component): Use attribute
6543         Default_Aspect_Component_Value to perform default initialization,
6544         rather than relying on the rep item list for the type.
6545         (Get_Simple_Init_Val): Ditto.
6547 2012-01-30  Thomas Quinot  <quinot@adacore.com>
6549         * a-strhas.ads: Document risk of collision attack.
6551 2012-01-30  Yannick Moy  <moy@adacore.com>
6553         * gnat_ugn.texi: Minor update wrt warning switches.
6555 2012-01-30  Vincent Celier  <celier@adacore.com>
6557         * prj-nmsc.adb (Check_Interfaces): Report an error when a
6558         unit from Library_Interface is not a unit of the project.
6560 2012-01-30  Vincent Pucci  <pucci@adacore.com>
6562         * sem_prag.adb (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Parent
6563         links fixed inside PPC pragmas.
6564         * sem_ch12.adb: Move call to Make_Aspect_For_PPC_In_Gen_Sub_Decl.
6566 2012-01-30  Thomas Quinot  <quinot@adacore.com>
6568         * s-ransee.ads: Minor reformatting.
6570 2012-01-30  Pascal Obry  <obry@adacore.com>
6572         * prj.ads, prj.adb (For_Each_Source): Add support for skipping
6573         sources coming from an encapsulated library.
6575 2012-01-30  Ed Schonberg  <schonberg@adacore.com>
6577         * sem_ch3.adb (Process-Full_View): fix typo.
6578         * sem_ch13.adb (Aalyze_Aspect_Specifications): if predicates
6579         appear on a private type and the full view is available, ensure
6580         existence of freeze node for full view.
6581         (Build_Predicate_Function): Attach predicate function to both
6582         views of a private type.
6584 2012-01-30  Vincent Celier  <celier@adacore.com>
6586         * prj-nmsc.adb (Check_Interfaces): Compute the Lib_Interface_ALIs
6587         for the project if either attribute Library_Interface or
6588         Interfaces is declared.
6589         (Check_Stand_Alone_Library): Use Lib_Interface_ALIs computed in
6590         Check_Interfaces.
6592 2012-01-30  Pascal Obry  <obry@adacore.com>
6594         * prj-proc.adb (Recursive_Process): Set From_Encapsulated_Lib
6595         boolean value to true in the process list created by this routine.
6596         * prj.ads (Project_List_Element): New field From_Encapsulated_Lib.
6597         Continued work for KA06-021.
6598         * prj.adb (Compute_All_Imported_Projects): Set
6599         From_Encapsulated_Lib boolean flag.
6601 2012-01-30  Vincent Pucci  <pucci@adacore.com>
6603         * sem_dim.adb (Expand_Put_Call_With_Dimension_Symbol): Minor
6604         code clean up.
6605         * s-diflio.ads: Minor change.
6607 2012-01-30  Javier Miranda  <miranda@adacore.com>
6609         * exp_ch9.adb (Build_Dispatching_Requeue): Add missing call
6610         to Get_Entry_Index.  Required to generate code which provides
6611         the correct value of Entry_Index in the target entry.
6613 2012-01-30  Nicolas Roche  <roche@adacore.com>
6615         * system-vxworks-ppc.ads: Add pragma Linker_Options -crtbe to
6616         fix issue with zcx on VxWorks5.
6618 2012-01-30  Pascal Obry  <obry@adacore.com>
6620         * prj.ads, prj.adb (For_Every_Project_Imported): Remove
6621         In_Aggregate_Lib.
6622         (For_Every_Project_Imported_Context): New generic routine with
6623         a context parameter.
6624         * prj-nmsc.adb: Revert to use For_Every_Project_Imported Avoid
6625         distributed complexity.
6626         * prj-env.adb, prj-conf.adb, makeutl.adb, gnatcmd.adb: Ditto.
6628 2012-01-30  Thomas Quinot  <quinot@adacore.com>
6630         * exp_aggr.adb (Expand_Record_Aggregate): After creating the
6631         _parent aggregate for an extension aggregate, check whether it
6632         requires delayed (top-down) expansion.
6634 2012-01-30  Vincent Pucci  <pucci@adacore.com>
6636         * sem_dim.adb (Expand_Put_Call_With_Dimension_Symbol): Rewritten.
6637         * snames.ads-tmpl: Name_Item and Name_Symbols added.
6638         * s-diflio.adb, s-diflio.ads, s-diinio.adb, s-diinio.ads: Rename
6639         and change the position of parameter Symbols in every Put routine.
6640         * s-dimmks.ads: Convert long float type Mks_Type into long
6641         long float.
6642         * s-llflex.ads: Modifications in comments.
6644 2012-01-30  Hristian Kirtchev  <kirtchev@adacore.com>
6646         * sem_ch12.adb (Earlier): Do not use the
6647         top level source locations of the two input nodes.
6649 2012-01-30  Robert Dewar  <dewar@adacore.com>
6651         * einfo.ads, sem_prag.adb, sem_attr.adb, aspects.ads,
6652         sem_cat.adb, sem_aggr.adb, exp_aggr.adb: Minor reformatting.
6654 2012-01-30  Robert Dewar  <dewar@adacore.com>
6656         * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb: Minor reformatting.
6658 2012-01-30  Olivier Hainque  <hainque@adacore.com>
6660         * sigtramp-ppcvxw.c (CFI_COMMON_REGS): Add rule for r1 back +
6661         comments.
6663 2012-01-30  Thomas Quinot  <quinot@adacore.com>
6665         * gnat_rm.texi, sem_dist.adb, sem_dist.ads, einfo.ads, sem_prag.adb,
6666         sem_ch12.adb, sem_attr.adb, aspects.adb, aspects.ads, par-prag.adb,
6667         sem_cat.adb, snames.ads-tmpl (Sem_Dist.Is_Valid_Remote_Object_Type):
6668         New subprogram (extracted from
6669         Sem_Cat.Validate_Remote_Access_Object_Type_Declaration).
6670         (Einfo.Is_Remote_Types): Now applies to generic types. Update
6671         documentation accordingly.
6672         (Sem_Ch12.Analyze_Associations): A RACW type is acceptable as
6673         actual for a formal type to which a pragma Remote_Access_Type
6674         applies.
6675         (Aspects, Par.Prag, Sem_Prag): Support for new pramga/aspect
6676         Remote_Access_Type.
6677         (Sem_Attr.Analyze_Attribute, case Stub_Type): Attribute can
6678         be applied to a generic type if pragma Remote_Access_Type
6679         applies, in which case the type of the attribute is
6680         System.Partition_Interface.RACW_Stub_Type.
6682 2012-01-27  Eric Botcazou  <ebotcazou@adacore.com>
6684         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Do not set
6685         an alignment on fields of the RETURN type built for the CICO mechanism.
6687 2012-01-27  Eric Botcazou  <ebotcazou@adacore.com>
6689         * gcc-interface/trans.c (gnat_to_gnu): Avoid making a SAVE_EXPR for
6690         a call to a function that returns an unconstrained type with default
6691         discriminant.  Similarly, avoid doing the conversion to the nominal
6692         result type in this case.
6694 2012-01-27  Eric Botcazou  <ebotcazou@adacore.com>
6696         * gcc-interface/ada-tree.h (DECL_ALIASED_P): New flag.
6697         * gcc-interface/decl.c (is_variable_size): Rename to...
6698         (type_has_variable_size): ...this.
6699         (adjust_packed): Adjust to above renaming.
6700         (gnat_to_gnu_field): Set DECL_ALIASED_P on the field.
6701         (field_is_artificial): New predicate.
6702         (field_is_aliased): Likewise.
6703         (field_has_self_size): Likewise.
6704         (field_has_variable_size): Likewise.
6705         (components_to_record): Record information for the final layout during
6706         the first pass on fields.
6707         If there is an aliased field placed after a field whose length depends
6708         on discriminants, put all the fields of the latter sort, last.
6710 2012-01-27  Eric Botcazou  <ebotcazou@adacore.com>
6712         * gcc-interface/gigi.h (get_minimal_subprog_decl): Declare.
6713         * gcc-interface/decl.c (get_minimal_subprog_decl): New function.
6714         * gcc-interface/trans.c (Attribute_to_gnu): Use it for the prefix of an
6715         Access-like attribute in a dispatch table if the subprogram is public.
6717 2012-01-27  Eric Botcazou  <ebotcazou@adacore.com>
6719         * gcc-interface/gigi.h (create_label_decl): Adjust.
6720         * gcc-interface/utils.c (create_label_decl): Add GNAT_NODE parameter
6721         and invoke gnat_pushdecl on it.  Remove obsolete settings.
6722         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Label>: Adjust call to
6723         create_label_decl.
6724         * gcc-interface/trans.c (gnat_to_gnu) <N_Null): Likewise.  Ignore the
6725         label for debugging purposes.
6727 2012-01-27  Eric Botcazou  <ebotcazou@adacore.com>
6729         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: For an aliased
6730         object with an unconstrained nominal subtype and if optimization isn't
6731         enabled, create a special VAR_DECL for debugging purposes.
6733 2012-01-23  Robert Dewar  <dewar@adacore.com>
6735         * sem_prag.ads, sem_prag.adb: Minor reformatting.
6737 2012-01-23  Robert Dewar  <dewar@adacore.com>
6739         * sem_ch13.adb (Analyze_Aspect_Specifications): Check for
6740         language defined aspect applied to renaming or formal type
6741         declaration (not permitted)
6743 2012-01-23  Matthew Heaney  <heaney@adacore.com>
6745         * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb (Vet): Replaced
6746         comment with pragma Assert.
6748 2012-01-23  Vincent Pucci  <pucci@adacore.com>
6750         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Call
6751         to Make_Aspect_For_PPC_In_Gen_Sub_Decl added in ASIS mode.
6752         * sem_prag.adb, sem_prag.ads (Make_Aspect_For_PPC_In_Gen_Sub_Decl): New
6753         routine. In ASIS mode, convert any PPC pragmas into aspects in generic
6754         subprogram declaration in order to enable the analysis of PPC boolean
6755         expressions.
6757 2012-01-23  Robert Dewar  <dewar@adacore.com>
6759         * sem_ch3.adb (Analyze_Object_Declaration): Properly
6760         handle Current_Value for volatile variables (also propagate
6761         Treat_As_Volatile from type to object).
6763 2012-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
6765         * sem_ch12.adb (Install_Body): Detect the case
6766         where the enclosing context is a package with a stub body that
6767         has already been replaced by the actual body. In such cases,
6768         the freeze node for the enclosing context must be inserted after
6769         the real body.
6771 2012-01-23  Ed Schonberg  <schonberg@adacore.com>
6773         * sem_prag.adb (Analyze_Pragma, case Debug): Freeze the called
6774         subprogram before expanding the pragma into an if-statement with
6775         a block, to ensure that when the subprogram is null its body is
6776         properly generated before expansion.
6778 2012-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
6780         * sem_ch12.adb (Analyze_Associations): Alphabetize local variables and
6781         constants. Rename Actual_Types to Actuals_To_Freeze. Rename Next_Formal
6782         to Saved_Formal.
6783         Freeze all eligible subprograms which appear as actuals in
6784         the instantiation.
6785         (Has_Fully_Defined_Profile): New routine.
6786         (Renames_Standard_Subprogram): New routine.
6787         (Earlier): Add local variable N. Comment update. Do not use source
6788         locations when trying to determine whether one node precedes another.
6790 2012-01-23  Gary Dismukes  <dismukes@adacore.com>
6792         * exp_ch4.adb (Expand_Concatenate): In the case
6793         where the result of a concatentation can be null, set the to
6794         result have both the low and high bounds of the right operand (not
6795         just the high bound, as was the case prior to this fix). Also,
6796         fix the saved high bound setting (Last_Opnd_High_Bound) in the
6797         empty string literal case (should have been low bound minus one,
6798         rather than plus one).
6800 2012-01-23  Thomas Quinot  <quinot@adacore.com>
6802         * scos.ads, put_scos.adb, get_scos.adb (Get_SCOs, Put_SCOs): Do not
6803         omit statement SCOs for disabled pragmas.
6805 2012-01-23  Matthew Heaney  <heaney@adacore.com>
6807         * a-cohase.ads, a-cihase.ads, a-cbhase.ads, a-coorse.ads,
6808         a-ciorse.ads, a-cborse.ads, a-cohama.ads, a-cihama.ads, a-cbhama.ads,
6809         a-coorma.ads, a-ciorma.ads, a-cborma.ads, a-cdlili.ads, a-cidlli.ads,
6810         a-cbdlli.ads, a-convec.ads, a-coinve.ads, a-cobove.ads (Cursor'Read,
6811         Cursor'Write): Declare in private part.
6812         (Reference_Type'Read, Reference_Type'Write): Ditto.
6813         (Constant_Reference_Type'Read, Constant_Reference_Type'Write): Ditto.
6815 2012-01-23  Robert Dewar  <dewar@adacore.com>
6817         * a-catizo.ads, a-calend.adb, a-calend.ads, par-ch13.adb: Minor
6818         reformatting.
6820 2012-01-23  Ed Schonberg  <schonberg@adacore.com>
6822         * sem_ch6.adb (Analyze_Subprogram_Declaration): Do not set the
6823         Corresponding_Body on a defaulted null formal subprogram.
6824         * sem_ch12.adb (Check_Formal_Package_Instance): No check needed
6825         on a defaulted formal subprogram that is a null procedure.
6827 2012-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
6829         * exp_ch9.adb: Update the comments involving pragma Implemented.
6830         * sem_ch3.adb (Check_Pragma_Implemented (Entity_Id)): Add local
6831         constant Subp_Alias and local variable Impl_Subp. Properly
6832         handle aliases of synchronized wrappers. Code cleanup.
6833         (Check_Pragma_Implemented (Entity_Id; Entity_Id)): Add
6834         Name_Optional as part of the condition.
6835         * sem_prag.adb (Analyze_Pragma): Add "Optional" as one of the
6836         valid choices of implementation kind.
6837         (Check_Arg_Is_One_Of): New routine.
6838         * snames.ads-tmlp: Add Name_Optional.
6840 2012-01-23  Ed Schonberg  <schonberg@adacore.com>
6842         * par-ch13.adb: Better error recovery in illegal aspect
6843         specification.
6845 2012-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
6847         * a-calend.adb: Add with clause for Interfaces.C. Add constant
6848         Unix_Max.
6849         (Day_Of_Week): Call the internal UTC_Time_Offset.
6850         (Split): Call the internal UTC_Time_Offset.
6851         (Time_Of): Call the internal UTC_Time_Offset.
6852         (Time_Zone_Operations.UTC_Time_Offset): Call internal UTC_Time_Offset.
6853         (UTC_Time_Offset): New library-level routine.
6854         * a-calend.ads (UTC_Time_Offset): Remove parameter
6855         Is_Historic. Update related comment on usage.
6856         * a-catizo.adb (UTC_Time_Offset): Removed.
6857         (UTC_Time_Offset (Time)): Call Time_Zone_Operations.UTC_Time_Offset.
6858         * a-caltizo.ads (UTC_Time_Offset): Removed.
6859         (UTC_Time_Offset (Time)): Add back the default expression of parameter
6860         Date.
6862 2012-01-23  Robert Dewar  <dewar@adacore.com>
6864         * sprint.ads, sprint.adb (Sprint_Node_List): Add New_Lines parameter
6865         (pg,po,ps): Make sure each entry starts on new line.
6867 2012-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
6869         * a-calend.ads, a-calend.adb: Define types int and int_Pointer. Update
6870         the parameter profile of procedure localtime_tzoff and its associated
6871         comment.
6872         (Day_Of_Week): Do not treat the input date as historical
6873         with respect to time zones.
6874         (Split): Do not treat the input
6875         date as historical with respect to time zones.  (Time_Of): Do
6876         not treat the input constituents as forming a historical date
6877         with respect to time zones.
6878         (UTC_Time_Offset): Add new formal
6879         parameter Is_Historic. Add local variable Flag. Update the call
6880         to localtime_tzoff.
6881         * a-catizo.ads, a-catizo.adb (UTC_Time_Offset): New routine.
6882         (UTC_Time_Offset (Time)): Update the call to
6883         Time_Zone_Operations.UTC_Time_Offset.
6884         * sysdep.c (__gnat_localtime_tzoff): Update parameter
6885         profile. Split the processing of offsets on Windows into two - one
6886         part of historic time stamps and the other for the current time.
6888 2012-01-23  Robert Dewar  <dewar@adacore.com>
6890         * a-calend.adb: Minor reformatting.
6892 2012-01-23  Ed Schonberg  <schonberg@adacore.com>
6894         * exp_ch9.adb, sem_ch9.adb: Handle array of access to synchronized
6895         interface in requeue statement.
6897 2012-01-23  Cyrille Comar  <comar@adacore.com>
6899         * projects.texi: Remove references to main units and replace
6900         with references to main programs to be coherent with the
6901         documentation.
6903 2012-01-23  Robert Dewar  <dewar@adacore.com>
6905         * s-utf_32.adb: Minor reformatting.
6907 2012-01-23  Vincent Celier  <celier@adacore.com>
6909         * snames.ads-tmpl: Minor comment addition Indicate that
6910         Name_Library_Encapsulated_Options is only used in gprbuild.
6912 2012-01-23  Robert Dewar  <dewar@adacore.com>
6914         * sem_ch10.adb (Analyze_Subunit): Properly save/restore cunit
6915         restrictions.
6917 2012-01-23  Ed Schonberg  <schonberg@adacore.com>
6919         * snames.ads-tmpl: Add Name_Synchronization.
6920         * aspects.ads, aspects.adb: Add Aspect_Synchronization to
6921         enumeration type and related maps.
6922         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle Aspect
6923         Synchronization, build corresponding pragma Implemented.
6924         * sem_util.adb (Implementation_Kind): Handle both explicit and
6925         implicit pragma_argument association to retrieve the given
6926         synchronization mode.
6928 2012-01-23  Robert Dewar  <dewar@adacore.com>
6930         * sem_ch10.adb, errout.adb: Minor reformatting.
6932 2012-01-23  Ed Schonberg  <schonberg@adacore.com>
6934         * sem_res.adb (Resolve_Actuals): An actual in a call to an
6935         Ada 2012 Reference function does not lead to a dangerous order
6936         dependence.
6938 2012-01-23  Gary Dismukes  <dismukes@adacore.com>
6940         * exp_util.adb (Is_Iterated_Container): Test
6941         Is_Entity_Name when searching for calls to the default iterator,
6942         to avoid blowing up on indirect calls which have an explicit
6943         dereference as the call name.
6945 2012-01-23  Thomas Quinot  <quinot@adacore.com>
6947         * errout.adb (Set_Msg_Node): For an N_Expanded_Name, output
6948         the complete expanded name, rather than just its Selector_Name.
6950 2012-01-23  Thomas Quinot  <quinot@adacore.com>
6952         * a-textio.adb (Put): Rewrite one-parameter Character version to
6953         just call the two-parameter one with Current_Out.
6955 2012-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
6957         * freeze.adb (Check_Current_Instance): Issue an
6958         error when the prefix of 'Unchecked_Access or 'Access does not
6959         denote a legal aliased view of a type.
6960         (Freeze_Record_Type): Do not halt the processing of record components
6961         once the Has_Controlled_Component is set as this bypasses the remaining
6962         checks.
6963         (Is_Aliased_View_Of_Type): New routine.
6965 2012-01-23  Thomas Quinot  <quinot@adacore.com>
6967         * errout.ads, freeze.adb: Minor reformatting.
6969 2012-01-23  Thomas Quinot  <quinot@adacore.com>
6971         * sem_ch10.adb, sem_prag.adb: Remove redundant apostrophes in error
6972         messages.
6974 2012-01-23  Olivier Hainque  <hainque@adacore.com>
6976         * adadecode.c (__gnat_decode): Deal with empty input early,
6977         preventing potential erroneous memory access later on.
6979 2012-01-21  Eric Botcazou  <ebotcazou@adacore.com>
6981         PR ada/46192
6982         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: In the case of a
6983         renaming, preserve the volatileness through the indirection, if any.
6985 2012-01-14  Andreas Schwab  <schwab@linux-m68k.org>
6987         * gcc-interface/Makefile.in (OSCONS_EXTRACT): Add
6988         $(GNATLIBCFLAGS).
6990 2012-01-10  Pascal Obry  <obry@adacore.com>
6992         * prj-nmsc.adb (Check_Library_Attributes):
6993         Kill check for object/source directories for aggregate libraries.
6995 2012-01-10  Matthew Heaney  <heaney@adacore.com>
6997         * a-cdlili.adb, a-cdlili.ads, a-cihama.adb, a-cihama.ads, a-coinve.adb,
6998         a-coinve.ads, a-ciorse.adb, a-ciorse.ads, a-coorma.adb, a-coorma.ads,
6999         a-cborma.adb, a-cborma.ads, a-cidlli.adb, a-cidlli.ads, a-cimutr.adb,
7000         a-cimutr.ads, a-cihase.adb, a-cihase.ads, a-cohama.adb, a-cohama.ads,
7001         a-coorse.adb, a-coorse.ads, a-cbhama.adb, a-cbhama.ads, a-cborse.adb,
7002         a-cborse.ads, a-comutr.adb, a-comutr.ads, a-ciorma.adb, a-cobove.adb,
7003         a-ciorma.ads, a-cobove.ads, a-convec.adb, a-convec.ads, a-cohase.adb,
7004         a-cohase.ads, a-cbdlli.adb, a-cbdlli.ads, a-cbmutr.adb, a-cbmutr.ads,
7005         a-cbhase.adb, a-cbhase.ads (Reference, Constant_Reference): Declare
7006         container parameter as aliased in/in out.
7007         Code clean ups.
7009 2012-01-10  Bob Duff  <duff@adacore.com>
7011         * s-os_lib.ads: Improve comment.
7013 2012-01-10  Geert Bosch  <bosch@adacore.com>
7015         * s-gearop.adb (Forward_Eliminate): Avoid improper aliasing
7016         for complex Scalar.
7018 2012-01-10  Bob Duff  <duff@adacore.com>
7020         * sem_intr.adb (Check_Shift): Use RM_Size instead of Esize, when
7021         checking that the 'Size is correct. If the type is "mod 2**12",
7022         for example, it's illegal, but Esize is the 'Object_Size, which
7023         will be something like 16 or 32, so the error ('Size = 12) was
7024         not detected.
7025         * gnat_rm.texi: Improve documentation of shift
7026         and rotate intrinsics.
7028 2012-01-10  Pascal Obry  <obry@adacore.com>
7030         * prj.adb (For_Every_Project_Imported): Fix
7031         implementation to make sure we return each project only once
7032         for aggragte libraries. It is fine to return a project twice for
7033         aggregate projects, this was the case as a Project_Id is different
7034         in each project tree. The new implementation use a table based on
7035         the project name to ensure proper detection of duplicate project
7036         in aggregate library. A new context is then created to continue
7037         retrurning duplicate project for aggregate libraries.
7039 2012-01-09  Eric Botcazou  <ebotcazou@adacore.com>
7041         * gcc-interface/trans.c (call_to_gnu): Create the temporary for the
7042         return value in the variable-sized return type case if the target is
7043         an array with fixed size.  However, do not create it if this is the
7044         expression of an object declaration.
7046 2012-01-09  Eric Botcazou  <ebotcazou@adacore.com>
7048         * gcc-interface/trans.c (addressable_p) <COMPONENT_REF>: Fix thinko.
7050 2012-01-06  Robert Dewar  <dewar@adacore.com>
7052         * a-wichha.ads, a-wichun.ads, a-zchhan.ads, a-zchuni.ads,
7053         s-utf_32.ads: Add pragma Pure
7054         * s-utf_32.adb: Suppress warnings on non-static constants (now
7055         that this is Pure).
7057 2012-01-06  Bob Duff  <duff@adacore.com>
7059         * s-rpc.ads (Read, Write): Add overriding indicators.
7061 2012-01-06  Robert Dewar  <dewar@adacore.com>
7063         * gnat_rm.texi: Add documentation for conventions
7064         Ada_Pass_By_Copy and Ada_Pass_By_Reference.
7066 2012-01-06  Gary Dismukes  <dismukes@adacore.com>
7068         * a-tienio.adb (Put): Add exception message on
7069         raise statements. Remove unneeded blocks and object declarations.
7071 2012-01-06  Robert Dewar  <dewar@adacore.com>
7073         * sem_prag.adb: Minor reformatting.
7075 2012-01-06  Ed Schonberg  <schonberg@adacore.com>
7077         * sinfo.ads, sinfo.adb (Has_Prefixed_Call): New flag to indicate
7078         that a selected component within a generic unit has been resolved
7079         as a prefixed call with local references.
7080         * sem_ch3.adb (Is_Visible_Component): In an instance body a selected
7081         component is always visible.
7082         * sem_ch4.adb (Analyze_Selected_Component): If the node is a
7083         prefixed call in an instance, do not look for visible components
7084         of the type.
7085         * sem_ch12.adb (Reset_Entity): If a selected component has resolved
7086         to a prefixed call, mark the node accordingly when prefix and
7087         selector are local references.
7089 2012-01-02  Eric Botcazou  <ebotcazou@adacore.com>
7091         * gnatvsn.ads (Current_Year): Bump to 2012.
7093 Copyright (C) 2012 Free Software Foundation, Inc.
7095 Copying and distribution of this file, with or without modification,
7096 are permitted in any medium without royalty provided the copyright
7097 notice and this notice are preserved.