OSDN Git Service

04a66c5efd4723ec5369c6742e79b1518efab2f1
[pf3gnuchains/gcc-fork.git] / gcc / ada / ChangeLog
1 2012-02-15  Eric Botcazou  <ebotcazou@adacore.com>
2
3         * gcc-interface/trans.c (gnat_to_gnu) <N_Qualified_Expression>: If the
4         type is tagged, mark it as used for debugging purposes.
5         <N_Allocator>: Likewise for a qualified expression.
6
7 2012-02-15  Eric Botcazou  <ebotcazou@adacore.com>
8
9         * gcc-interface/trans.c (call_to_gnu): Create the temporary for the
10         return value in the by-reference return type case if this isn't the
11         expression of an object declaration.  Tidy up.
12
13 2012-02-09  Tristan Gingold  <gingold@adacore.com>
14
15         * gcc-interface/Makefile.in: Remove .sym rule (not used).
16         Remove adamsg.o object (requires native message compiler).
17         * init.c (CMA$_EXIT_THREAD, MTH$_FLOOVEMAT, SS$_INTDIV): Define as a
18         macro instead of as extern int.
19         (ADA$_ALREADY_OPEN, ADA$_CONSTRAINT_ERRO, ADA$_DATA_ERROR)
20         (ADA$_DEVICE_ERROR, ADA$_END_ERROR, ADA$_FAC_MODE_MISMAT)
21         (ADA$_IOSYSFAILED, ADA$_KEYSIZERR, ADA$_KEY_MISMATCH)
22         (ADA$_LAYOUT_ERROR, ADA$_LINEXCMRS, ADA$_MAXLINEXC)
23         (ADA$_MODE_ERROR, ADA$_MRN_MISMATCH, ADA$_MRS_MISMATCH)
24         (ADA$_NAME_ERROR, ADA$_NOT_OPEN, ADA$_ORG_MISMATCH)
25         (ADA$_PROGRAM_ERROR, ADA$_RAT_MISMATCH, ADA$_RFM_MISMATCH)
26         (ADA$_STAOVF, ADA$_STATUS_ERROR, ADA$_STORAGE_ERROR)
27         (ADA$_UNSUPPORTED, ADA$_USE_ERROR): Likewise.
28         (struct cond_except): Field cond is now an unsigned int.
29         (dec_ada_cond_except_table): Adjust.
30         (cond_except_table): Likewise.
31         (cond_resignal_table): Likewise.
32         (__gnat_default_resignal_p): Fix style.
33
34 2012-02-08  Vincent Celier  <celier@adacore.com>
35
36         * gcc-interface/Make-lang.in: Add g-byorma.o to gnatbind objects
37         (g-buorma is now imported by sinput).
38         Update dependencies.
39         * scn.adb (Initialize_Scanner): Call Check_For_BOM
40         * sinput-p.adb (Source_File_Is_Subunit): Call Check_For_BOM
41         * sinput.adb: New procedure Check_For_BOM
42         * sinput.ads: New procedure Check_For_BOM
43
44 2012-02-08  Vincent Pucci  <pucci@adacore.com>
45
46         * impunit.adb: Dimension package names updated
47         * Makefile.rtl: s-dim added
48         * sem_dim.adb (Is_Procedure_Put_Call): minor changes
49         (Is_Dim_IO_Package_Instantiation): minor changes
50         * sem_dim.ads: minor changes in comments
51         * snames.ads-tmpl: Name_Dim added Name_Dim_Float_IO and
52         Name_Dim_Integer_IO removed
53         * s-dim.ads: New package. Define the dimension terminology.
54         * s-diflio.adb, s-diinio.adb, s-dimkio.ads, s-dimmks.ads,
55         * s-dmotpr.ads: Package names updated.
56         * s-diflio.ads, s-diinio.ads: Documentation added and package
57         names updated.
58
59 2012-02-08  Gary Dismukes  <dismukes@adacore.com>
60
61         * gcc-interface/utils2.c (build_call_alloc_dealloc_proc): Revise test
62         for storage pools to test for an underlying record type rather than
63         testing Is_Tagged_Type, so that simple storage pools will be handled
64         the same as normal Ada storage pools.
65
66 2012-02-08  Yannick Moy  <moy@adacore.com>
67
68         * gnat_rm.texi: Minor reshuffling to place restriction at
69         appropriate place.
70
71 2012-02-08  Bob Duff  <duff@adacore.com>
72
73         * warnsw.adb (Set_Warning_Switch): Set Warn_On_Suspicious_Modulus_Value
74         False for '-gnatwA', to suppress these warnings.
75
76 2012-02-08  Vincent Celier  <celier@adacore.com>
77
78         * sinput-p.adb (Source_File_Is_Subunit): Check for BOM before
79         starting to scan, so that UTF8 encoding is taken into account.
80
81 2012-02-08  Arnaud Charlet  <charlet@adacore.com>
82
83         * s-tasren.adb, s-tasren.ads (Internal_Complete_Rendezvous): New
84         function.
85         (Complete_Rendezvous): Now call Internal_Complete_Rendezvous.
86         (Exceptional_Complete_Rendezvous): Mark No_Return.
87
88 2012-02-08  Eric Botcazou  <ebotcazou@adacore.com>
89
90         * exp_aggr.adb (Compile_Time_Known_Composite_Value):
91         New predicate to compute whether a composite value can be
92         evaluated at compile time.
93         (Component_Not_OK_For_Backend): Use Compile_Time_Known_Value for all
94         expressions of elementary type and Compile_Time_Known_Composite_Value
95         for all other expressions.
96         (Expand_Record_Aggregate): Convert to assignments in the case
97         of a type with mutable components if the aggregate cannot be
98         built statically.
99
100 2012-02-08  Gary Dismukes  <dismukes@adacore.com>
101
102         * aspects.ads (type Aspect_Id): Add Simple_Storage_Pool_Type.
103         (Impl_Defined_Aspects): Add association for
104         Aspect_Simple_Storage_Pool_Type.
105         (Aspect_Names): Add
106         association for Aspect_Simple_Storage_Pool_Type.
107         * aspects.adb:
108         (Canonical_Aspect): Add association for Simple_Storage_Pool_Type.
109         * exp_attr.adb (Expand_N_Attribute_Reference):
110         Change name to Name_Simple_Storage_Pool_Type.
111         * exp_ch4.adb (Expand_N_Allocator): Change
112         name to Name_Simple_Storage_Pool_Type.
113         * exp_intr.adb (Expand_Unc_Deallocation): Change name to
114         Name_Simple_Storage_Pool_Type.  * freeze.adb (Freeze_Entity):
115         Change names to Name_Simple_Storage_Pool_Type.  * par-prag.adb:
116         Change names to Name_Simple_Storage_Pool_Type.  * sem_attr.adb:
117         (Analyze_Attribute): Change name to Name_Simple_Storage_Pool_Type.
118         * sem_ch13.adb (Analyze_Attribute_Definition_Clause):
119         Change name to Name_Simple_Storage_Pool_Type.
120         * sem_prag.adb:
121         (Analyze_Pragma): Change name to Name_Simple_Storage_Pool_Type.
122         (Sig_Flags): Change name to Name_Simple_Storage_Pool_Type.
123         * sem_res.adb (Resolve_Allocator): Change name to
124         Name_Simple_Storage_Pool_Type.  * snames.ads-tmpl:
125         (Name_Simple_Storage_Pool_Type): New name constant.
126         (type Pragma_Id): Change name to Name_Simple_Storage_Pool_Type and
127         move to main pragma section because it no longer matches the
128         attribute name.
129         * snames.adb-tmpl (Get_Pragma_Id): Remove test for
130         Name_Simple_Storage_Pool.
131         (Is_Pragma_Name): Remove test for Name_Simple_Storage_Pool.
132
133 2012-02-08  Robert Dewar  <dewar@adacore.com>
134
135         * gnat_ugn.texi: Add some clarification to -gnatwA and -gnatws.
136
137 2012-02-08  Pascal Obry  <obry@adacore.com>
138
139         * prj.adb (Compute_All_Imported_Projects): Use new
140         For_Project_And_Aggregated_Context to ensure proper context is
141         used for encapsulated aggregate libraries.
142         * prj-proc.adb (Recursive_Process): Call
143         Process_Aggregated_Projects earlier to ensure that all dependent
144         projects are set with the proper encapsulated status.
145
146 2012-02-08  Pascal Obry  <obry@adacore.com>
147
148         * s-os_lib.adb (Normalize_Arguments): Properly escape last \ in null
149         terminated string.
150
151 2012-02-08  Pascal Obry  <obry@adacore.com>
152
153         * prj.ads, prj.adb (For_Project_And_Aggregated_Context): New
154         generic routine with a context parameter.
155
156 2012-02-08  Robert Dewar  <dewar@adacore.com>
157
158         * a-coinve.adb, sem_util.adb, sem_ch8.adb, a-cobove.adb,
159         a-convec.adb: Minor reformatting and code reorganization.
160
161 2012-02-08  Steve Baird  <baird@adacore.com>
162
163         * sem_cat.adb (In_Preelaborated_Unit): A child
164         unit instantiation does not inherit preelaboration requirements
165         from its parent.
166
167 2012-02-08  Gary Dismukes  <dismukes@adacore.com>
168
169         * aspects.ads (type Aspect_Id): Add Aspect_Simple_Storage_Pool.
170         (Impl_Defined_Aspects): Add entry for Aspect_Simple_Storage_Pool.
171         (Aspect_Argument): Add Name entry for Aspect_Simple_Storage_Pool.
172         (Aspect_Names): Add entry for Aspect_Simple_Storage_Pool.
173         * aspects.adb (Canonical_Aspect): Add entry for
174         Aspect_Simple_Storage_Pool.
175         * exp_attr.adb (Expand_N_Attribute_Reference): Handle case of
176         Attribute_Simple_Storage_Pool in the same way as Storage_Pool
177         (add conversion, analyze/resolve). For the Storage_Size attribute,
178         for the simple pool case, locate and use the simple pool type's
179         Storage_Size function (if any), otherwise evaluate to zero.
180         * exp_ch4.adb (Expand_N_Allocator): In the case of an allocator
181         for an access type with an associated simple storage pool,
182         locate and use the pool type's Allocate.
183         * exp_intr.adb (Expand_Unc_Deallocation): In the case where the
184         access type has a simple storage pool, locate the pool type's
185         Deallocate procedure (if present) and use it as the procedure
186         to call on the Free operation.
187         * freeze.adb (Freeze_Entity): In the case of a full type for
188         a private type defined with pragma Simple_Storage_Pool, check
189         that the full type is also appropriate for the pragma. For
190         a simple storage pool type, validate that the operations
191         Allocate, Deallocate (if present), and Storage_Size
192         (if present) are defined with appropriate expected profiles.
193         (Validate_Simple_Pool_Op_Formal): New procedure
194         (Validate_Simple_Pool_Operation): New procedure Add with and
195         use of Rtsfind.
196         * par-prag.adb: Add Pragma_Simple_Storage_Pool to case statement
197         (no action required).
198         * sem_attr.adb (Analyze_Attribute): For the case of the
199         Storage_Pool attribute, give a warning if the prefix type has an
200         associated simple storage pool, and rewrite the attribute as a
201         raise of Program_Error. In the case of the Simple_Storage_Pool
202         attribute, check that the prefix type has an associated simple
203         storage pool, and set the attribute type to the pool's type.
204         * sem_ch13.adb (Analyze_Aspect_Specifications): Add
205         Aspect_Simple_Storage_Pool case choice.
206         (Analyze_Attribute_Definition_Clause): Add
207         Aspect_Simple_Storage_Pool to case for Ignore_Rep_Clauses
208         (no action). Add handling for Simple_Storage_Pool attribute
209         definition, requiring the name to denote a simple storage pool
210         object.
211         (Check_Aspect_At_Freeze_Point): For a simple storage pool
212         aspect, set the type to that of the name specified for the aspect.
213         * sem_prag.adb (Analyze_Pragma): Add handling for pragma
214         Simple_Storage_Pool, requiring that it applies to a library-level
215         type declared in a package declaration that is a limited private
216         or limited record type.
217         * sem_res.adb (Resolve_Allocator): Flag an attempt to call a
218         build-in-place function in an allocator for an access type with
219         a simple storage pool as unsupported.
220         * snames.ads-tmpl: Add Name_Simple_Storage_Pool.
221         (type Attribute_Id): Add Attribute_Simple_Storage_Pool.
222         (type Pragma_Id): Add Pragma_Simple_Storage_Pool.
223         * snames.adb-tmpl (Get_Pragma_Id): Handle case of
224         Name_Simple_Storage_Pool.
225         (Is_Pragma_Name): Return True for Name_Simple_Storage_Pool.
226
227 2012-02-08  Cyrille Comar  <comar@adacore.com>
228
229         * projects.texi: Clarify doc for interfaces.
230
231 2012-02-07  Eric Botcazou  <ebotcazou@adacore.com>
232
233         * gcc-interface/Make-lang.in (GCC_LINKERFLAGS): New variable.
234         (GCC_LINK): Use it.
235
236 2012-02-01  Tristan Gingold  <gingold@adacore.com>
237
238         * gcc-interface/trans.c (Loop_Statement_to_gnu): Use sizetype
239         instead of size_type_node.
240
241 2012-01-30  Nicolas Roche  <roche@adacore.com>
242
243         * gcc-interface/Make-lang.in: Update dependencies.
244         * gcc-interface/Makefile.in: Use system-vxworks-system-ppc-mils.ads
245         when needed.
246         Remove Linker_Options -crtbe when building sjlj run-time.
247
248 2012-01-30  Robert Dewar  <dewar@adacore.com>
249
250         * sem.adb (Analyze): Call Analyze_Mod for N_Op_Mod mode.
251         * sem_ch3.adb (Modular_Type_Declaration): Warn on mod value of
252         form 2 * small-literal.
253         * sem_ch4.adb (Analyze_Mod): New procedure (warn on suspicious
254         mod value).
255         * sem_ch4.ads (Analyze_Mod): New procedure.
256
257 2012-01-30  Ed Schonberg  <schonberg@adacore.com>
258
259         * sem_ch6.adb: sem_ch6.adb (Analyze_Expression_Function): Copy
260         types and return expression when building spec for implicit
261         body, to preserve global references that may be present in an
262         instantiation.
263
264 2012-01-30  Matthew Heaney  <heaney@adacore.com>
265
266         * a-convec.adb, a-coinve.adb, a-cobove.adb (Sort,
267         Reverse_Elements): Check for cursor tampering.
268
269 2012-01-30  Ed Schonberg  <schonberg@adacore.com>
270
271         * sem_util.adb (Is_Fully_Initialized_Type): In Ada 2012, a
272         type with aspect Default_Value or Default_Component_Value is
273         fully initialized, and use of variables of such types do not
274         generate warnings.
275
276 2012-01-30  Javier Miranda  <miranda@adacore.com>
277
278 PR ada/15846
279         * sem_ch8.adb (Analyze_Subprogram_Renaming):
280         Handle self-renaming when the renamed entity is referenced using
281         its expanded name.
282
283 2012-01-30  Vincent Celier  <celier@adacore.com>
284
285         * projects.texi: Add documentation for attribute Interfaces.
286
287 2012-01-30  Hristian Kirtchev  <kirtchev@adacore.com>
288
289         * exp_ch7.adb (Build_Finalizer_Call): Set loc again.
290         * exp_ch11.adb (Expand_At_End_Handler): Do not provide a source
291         location for the wrapped call to the original AT_END routine
292         and the subsequent return statement.
293
294 2012-01-30  Pascal Obry  <obry@adacore.com>
295
296         * s-rannum.adb: Minor reformatting.
297
298 2012-01-30  Hristian Kirtchev  <kirtchev@adacore.com>
299
300         * a-calend-vms.adb, a-calend.adb: Increment the number of leap seconds
301         to 25 and add the hard time value for 2012-06-30.
302
303 2012-01-30  Robert Dewar  <dewar@adacore.com>
304
305         * a-strhas.ads, einfo.adb, einfo.ads, exp_ch7.adb, exp_ch9.adb,
306         freeze.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-proc.adb, s-llflex.ads,
307         s-ransee.adb, s-ransee.ads, sem_ch13.adb, sem_dim.adb, sem_prag.adb:
308         Minor reformatting/code reorganization.
309
310 2012-01-30  Thomas Quinot  <quinot@adacore.com>
311
312         * s-rannum.adb, s-ransee.adb, s-ransee.ads (Get_Seed): Return
313         Unsigned_64 rather than Duration.
314         (System.Random_Numbers.Reset): Use full value of seed
315         (do not truncate sub-second bits).
316
317 2012-01-30  Thomas Quinot  <quinot@adacore.com>
318
319         * sem_cat.adb, sem_ch12.adb: Minor reformatting.
320
321 2012-01-30  Yannick Moy  <moy@adacore.com>
322
323         * gnat_ugn.texi: Minor correction of GNAT UG, to take into
324         account changes to -gnatwa and more recent warnings.
325
326 2012-01-30  Hristian Kirtchev  <kirtchev@adacore.com>
327
328         * exp_ch7.adb (Build_Finalizer_Call): Do not provide a source
329         location when creating a call to a finalizer.
330         * exp_ch11.adb (Expand_Exception_Handlers): Do not provide
331         a source location for the first actual of Save_Occurrence for
332         consistency sake.
333
334 2012-01-30  Ed Schonberg  <schonberg@adacore.com>
335
336         * einfo.ads, einfo,adb: New attribute on scalar types:
337         Default_Aspect_Value New attribute on  array types:
338         Default_Aspect_Component_Value Move attribute Related_Array_Object
339         to a different position to accomodate new aspect attributes.
340         * freeze.adb (Freeze_Entity): Use new attributes to retrieve value
341         of defaults set with an aspect specification, rather than using
342         the list of aspects attached to the type, to prevent issues with
343         partial views.
344         * sem_ch13.adb (Analyze_Aspect_Specifications): For aspects
345         Default_Value and Default_Component _Value, store corresponding
346         expression in type entity.
347         (Check_Aspect_At_End_Of_Declaration): If the default aspects
348         are declared on the full view, use the full view to resolve the
349         correseponding expression.
350         * exp_ch3.adb (Init_Component): Use attribute
351         Default_Aspect_Component_Value to perform default initialization,
352         rather than relying on the rep item list for the type.
353         (Get_Simple_Init_Val): Ditto.
354
355 2012-01-30  Thomas Quinot  <quinot@adacore.com>
356
357         * a-strhas.ads: Document risk of collision attack.
358
359 2012-01-30  Yannick Moy  <moy@adacore.com>
360
361         * gnat_ugn.texi: Minor update wrt warning switches.
362
363 2012-01-30  Vincent Celier  <celier@adacore.com>
364
365         * prj-nmsc.adb (Check_Interfaces): Report an error when a
366         unit from Library_Interface is not a unit of the project.
367
368 2012-01-30  Vincent Pucci  <pucci@adacore.com>
369
370         * sem_prag.adb (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Parent
371         links fixed inside PPC pragmas.
372         * sem_ch12.adb: Move call to Make_Aspect_For_PPC_In_Gen_Sub_Decl.
373
374 2012-01-30  Thomas Quinot  <quinot@adacore.com>
375
376         * s-ransee.ads: Minor reformatting.
377
378 2012-01-30  Pascal Obry  <obry@adacore.com>
379
380         * prj.ads, prj.adb (For_Each_Source): Add support for skipping
381         sources coming from an encapsulated library.
382
383 2012-01-30  Ed Schonberg  <schonberg@adacore.com>
384
385         * sem_ch3.adb (Process-Full_View): fix typo.
386         * sem_ch13.adb (Aalyze_Aspect_Specifications): if predicates
387         appear on a private type and the full view is available, ensure
388         existence of freeze node for full view.
389         (Build_Predicate_Function): Attach predicate function to both
390         views of a private type.
391
392 2012-01-30  Vincent Celier  <celier@adacore.com>
393
394         * prj-nmsc.adb (Check_Interfaces): Compute the Lib_Interface_ALIs
395         for the project if either attribute Library_Interface or
396         Interfaces is declared.
397         (Check_Stand_Alone_Library): Use Lib_Interface_ALIs computed in
398         Check_Interfaces.
399
400 2012-01-30  Pascal Obry  <obry@adacore.com>
401
402         * prj-proc.adb (Recursive_Process): Set From_Encapsulated_Lib
403         boolean value to true in the process list created by this routine.
404         * prj.ads (Project_List_Element): New field From_Encapsulated_Lib.
405         Continued work for KA06-021.
406         * prj.adb (Compute_All_Imported_Projects): Set
407         From_Encapsulated_Lib boolean flag.
408
409 2012-01-30  Vincent Pucci  <pucci@adacore.com>
410
411         * sem_dim.adb (Expand_Put_Call_With_Dimension_Symbol): Minor
412         code clean up.
413         * s-diflio.ads: Minor change.
414
415 2012-01-30  Javier Miranda  <miranda@adacore.com>
416
417         * exp_ch9.adb (Build_Dispatching_Requeue): Add missing call
418         to Get_Entry_Index.  Required to generate code which provides
419         the correct value of Entry_Index in the target entry.
420
421 2012-01-30  Nicolas Roche  <roche@adacore.com>
422
423         * system-vxworks-ppc.ads: Add pragma Linker_Options -crtbe to
424         fix issue with zcx on VxWorks5.
425
426 2012-01-30  Pascal Obry  <obry@adacore.com>
427
428         * prj.ads, prj.adb (For_Every_Project_Imported): Remove
429         In_Aggregate_Lib.
430         (For_Every_Project_Imported_Context): New generic routine with
431         a context parameter.
432         * prj-nmsc.adb: Revert to use For_Every_Project_Imported Avoid
433         distributed complexity.
434         * prj-env.adb, prj-conf.adb, makeutl.adb, gnatcmd.adb: Ditto.
435
436 2012-01-30  Thomas Quinot  <quinot@adacore.com>
437
438         * exp_aggr.adb (Expand_Record_Aggregate): After creating the
439         _parent aggregate for an extension aggregate, check whether it
440         requires delayed (top-down) expansion.
441
442 2012-01-30  Vincent Pucci  <pucci@adacore.com>
443
444         * sem_dim.adb (Expand_Put_Call_With_Dimension_Symbol): Rewritten.
445         * snames.ads-tmpl: Name_Item and Name_Symbols added.
446         * s-diflio.adb, s-diflio.ads, s-diinio.adb, s-diinio.ads: Rename
447         and change the position of parameter Symbols in every Put routine.
448         * s-dimmks.ads: Convert long float type Mks_Type into long
449         long float.
450         * s-llflex.ads: Modifications in comments.
451
452 2012-01-30  Hristian Kirtchev  <kirtchev@adacore.com>
453
454         * sem_ch12.adb (Earlier): Do not use the
455         top level source locations of the two input nodes.
456
457 2012-01-30  Robert Dewar  <dewar@adacore.com>
458
459         * einfo.ads, sem_prag.adb, sem_attr.adb, aspects.ads,
460         sem_cat.adb, sem_aggr.adb, exp_aggr.adb: Minor reformatting.
461
462 2012-01-30  Robert Dewar  <dewar@adacore.com>
463
464         * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb: Minor reformatting.
465
466 2012-01-30  Olivier Hainque  <hainque@adacore.com>
467
468         * sigtramp-ppcvxw.c (CFI_COMMON_REGS): Add rule for r1 back +
469         comments.
470
471 2012-01-30  Thomas Quinot  <quinot@adacore.com>
472
473         * gnat_rm.texi, sem_dist.adb, sem_dist.ads, einfo.ads, sem_prag.adb,
474         sem_ch12.adb, sem_attr.adb, aspects.adb, aspects.ads, par-prag.adb,
475         sem_cat.adb, snames.ads-tmpl (Sem_Dist.Is_Valid_Remote_Object_Type):
476         New subprogram (extracted from
477         Sem_Cat.Validate_Remote_Access_Object_Type_Declaration).
478         (Einfo.Is_Remote_Types): Now applies to generic types. Update
479         documentation accordingly.
480         (Sem_Ch12.Analyze_Associations): A RACW type is acceptable as
481         actual for a formal type to which a pragma Remote_Access_Type
482         applies.
483         (Aspects, Par.Prag, Sem_Prag): Support for new pramga/aspect
484         Remote_Access_Type.
485         (Sem_Attr.Analyze_Attribute, case Stub_Type): Attribute can
486         be applied to a generic type if pragma Remote_Access_Type
487         applies, in which case the type of the attribute is
488         System.Partition_Interface.RACW_Stub_Type.
489
490 2012-01-27  Eric Botcazou  <ebotcazou@adacore.com>
491
492         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Do not set
493         an alignment on fields of the RETURN type built for the CICO mechanism.
494
495 2012-01-27  Eric Botcazou  <ebotcazou@adacore.com>
496
497         * gcc-interface/trans.c (gnat_to_gnu): Avoid making a SAVE_EXPR for
498         a call to a function that returns an unconstrained type with default
499         discriminant.  Similarly, avoid doing the conversion to the nominal
500         result type in this case.
501
502 2012-01-27  Eric Botcazou  <ebotcazou@adacore.com>
503
504         * gcc-interface/ada-tree.h (DECL_ALIASED_P): New flag.
505         * gcc-interface/decl.c (is_variable_size): Rename to...
506         (type_has_variable_size): ...this.
507         (adjust_packed): Adjust to above renaming.
508         (gnat_to_gnu_field): Set DECL_ALIASED_P on the field.
509         (field_is_artificial): New predicate.
510         (field_is_aliased): Likewise.
511         (field_has_self_size): Likewise.
512         (field_has_variable_size): Likewise.
513         (components_to_record): Record information for the final layout during
514         the first pass on fields.
515         If there is an aliased field placed after a field whose length depends
516         on discriminants, put all the fields of the latter sort, last.
517
518 2012-01-27  Eric Botcazou  <ebotcazou@adacore.com>
519
520         * gcc-interface/gigi.h (get_minimal_subprog_decl): Declare.
521         * gcc-interface/decl.c (get_minimal_subprog_decl): New function.
522         * gcc-interface/trans.c (Attribute_to_gnu): Use it for the prefix of an
523         Access-like attribute in a dispatch table if the subprogram is public.
524
525 2012-01-27  Eric Botcazou  <ebotcazou@adacore.com>
526
527         * gcc-interface/gigi.h (create_label_decl): Adjust.
528         * gcc-interface/utils.c (create_label_decl): Add GNAT_NODE parameter
529         and invoke gnat_pushdecl on it.  Remove obsolete settings.
530         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Label>: Adjust call to
531         create_label_decl.
532         * gcc-interface/trans.c (gnat_to_gnu) <N_Null): Likewise.  Ignore the
533         label for debugging purposes.
534
535 2012-01-27  Eric Botcazou  <ebotcazou@adacore.com>
536
537         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: For an aliased
538         object with an unconstrained nominal subtype and if optimization isn't
539         enabled, create a special VAR_DECL for debugging purposes.
540
541 2012-01-23  Robert Dewar  <dewar@adacore.com>
542
543         * sem_prag.ads, sem_prag.adb: Minor reformatting.
544
545 2012-01-23  Robert Dewar  <dewar@adacore.com>
546
547         * sem_ch13.adb (Analyze_Aspect_Specifications): Check for
548         language defined aspect applied to renaming or formal type
549         declaration (not permitted)
550
551 2012-01-23  Matthew Heaney  <heaney@adacore.com>
552
553         * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb (Vet): Replaced
554         comment with pragma Assert.
555
556 2012-01-23  Vincent Pucci  <pucci@adacore.com>
557
558         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Call
559         to Make_Aspect_For_PPC_In_Gen_Sub_Decl added in ASIS mode.
560         * sem_prag.adb, sem_prag.ads (Make_Aspect_For_PPC_In_Gen_Sub_Decl): New
561         routine. In ASIS mode, convert any PPC pragmas into aspects in generic
562         subprogram declaration in order to enable the analysis of PPC boolean
563         expressions.
564
565 2012-01-23  Robert Dewar  <dewar@adacore.com>
566
567         * sem_ch3.adb (Analyze_Object_Declaration): Properly
568         handle Current_Value for volatile variables (also propagate
569         Treat_As_Volatile from type to object).
570
571 2012-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
572
573         * sem_ch12.adb (Install_Body): Detect the case
574         where the enclosing context is a package with a stub body that
575         has already been replaced by the actual body. In such cases,
576         the freeze node for the enclosing context must be inserted after
577         the real body.
578
579 2012-01-23  Ed Schonberg  <schonberg@adacore.com>
580
581         * sem_prag.adb (Analyze_Pragma, case Debug): Freeze the called
582         subprogram before expanding the pragma into an if-statement with
583         a block, to ensure that when the subprogram is null its body is
584         properly generated before expansion.
585
586 2012-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
587
588         * sem_ch12.adb (Analyze_Associations): Alphabetize local variables and
589         constants. Rename Actual_Types to Actuals_To_Freeze. Rename Next_Formal
590         to Saved_Formal.
591         Freeze all eligible subprograms which appear as actuals in
592         the instantiation.
593         (Has_Fully_Defined_Profile): New routine.
594         (Renames_Standard_Subprogram): New routine.
595         (Earlier): Add local variable N. Comment update. Do not use source
596         locations when trying to determine whether one node precedes another.
597
598 2012-01-23  Gary Dismukes  <dismukes@adacore.com>
599
600         * exp_ch4.adb (Expand_Concatenate): In the case
601         where the result of a concatentation can be null, set the to
602         result have both the low and high bounds of the right operand (not
603         just the high bound, as was the case prior to this fix). Also,
604         fix the saved high bound setting (Last_Opnd_High_Bound) in the
605         empty string literal case (should have been low bound minus one,
606         rather than plus one).
607
608 2012-01-23  Thomas Quinot  <quinot@adacore.com>
609
610         * scos.ads, put_scos.adb, get_scos.adb (Get_SCOs, Put_SCOs): Do not
611         omit statement SCOs for disabled pragmas.
612
613 2012-01-23  Matthew Heaney  <heaney@adacore.com>
614
615         * a-cohase.ads, a-cihase.ads, a-cbhase.ads, a-coorse.ads,
616         a-ciorse.ads, a-cborse.ads, a-cohama.ads, a-cihama.ads, a-cbhama.ads,
617         a-coorma.ads, a-ciorma.ads, a-cborma.ads, a-cdlili.ads, a-cidlli.ads,
618         a-cbdlli.ads, a-convec.ads, a-coinve.ads, a-cobove.ads (Cursor'Read,
619         Cursor'Write): Declare in private part.
620         (Reference_Type'Read, Reference_Type'Write): Ditto.
621         (Constant_Reference_Type'Read, Constant_Reference_Type'Write): Ditto.
622
623 2012-01-23  Robert Dewar  <dewar@adacore.com>
624
625         * a-catizo.ads, a-calend.adb, a-calend.ads, par-ch13.adb: Minor
626         reformatting.
627
628 2012-01-23  Ed Schonberg  <schonberg@adacore.com>
629
630         * sem_ch6.adb (Analyze_Subprogram_Declaration): Do not set the
631         Corresponding_Body on a defaulted null formal subprogram.
632         * sem_ch12.adb (Check_Formal_Package_Instance): No check needed
633         on a defaulted formal subprogram that is a null procedure.
634
635 2012-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
636
637         * exp_ch9.adb: Update the comments involving pragma Implemented.
638         * sem_ch3.adb (Check_Pragma_Implemented (Entity_Id)): Add local
639         constant Subp_Alias and local variable Impl_Subp. Properly
640         handle aliases of synchronized wrappers. Code cleanup.
641         (Check_Pragma_Implemented (Entity_Id; Entity_Id)): Add
642         Name_Optional as part of the condition.
643         * sem_prag.adb (Analyze_Pragma): Add "Optional" as one of the
644         valid choices of implementation kind.
645         (Check_Arg_Is_One_Of): New routine.
646         * snames.ads-tmlp: Add Name_Optional.
647
648 2012-01-23  Ed Schonberg  <schonberg@adacore.com>
649
650         * par-ch13.adb: Better error recovery in illegal aspect
651         specification.
652
653 2012-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
654
655         * a-calend.adb: Add with clause for Interfaces.C. Add constant
656         Unix_Max.
657         (Day_Of_Week): Call the internal UTC_Time_Offset.
658         (Split): Call the internal UTC_Time_Offset.
659         (Time_Of): Call the internal UTC_Time_Offset.
660         (Time_Zone_Operations.UTC_Time_Offset): Call internal UTC_Time_Offset.
661         (UTC_Time_Offset): New library-level routine.
662         * a-calend.ads (UTC_Time_Offset): Remove parameter
663         Is_Historic. Update related comment on usage.
664         * a-catizo.adb (UTC_Time_Offset): Removed.
665         (UTC_Time_Offset (Time)): Call Time_Zone_Operations.UTC_Time_Offset.
666         * a-caltizo.ads (UTC_Time_Offset): Removed.
667         (UTC_Time_Offset (Time)): Add back the default expression of parameter
668         Date.
669
670 2012-01-23  Robert Dewar  <dewar@adacore.com>
671
672         * sprint.ads, sprint.adb (Sprint_Node_List): Add New_Lines parameter
673         (pg,po,ps): Make sure each entry starts on new line.
674
675 2012-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
676
677         * a-calend.ads, a-calend.adb: Define types int and int_Pointer. Update
678         the parameter profile of procedure localtime_tzoff and its associated
679         comment.
680         (Day_Of_Week): Do not treat the input date as historical
681         with respect to time zones.
682         (Split): Do not treat the input
683         date as historical with respect to time zones.  (Time_Of): Do
684         not treat the input constituents as forming a historical date
685         with respect to time zones.
686         (UTC_Time_Offset): Add new formal
687         parameter Is_Historic. Add local variable Flag. Update the call
688         to localtime_tzoff.
689         * a-catizo.ads, a-catizo.adb (UTC_Time_Offset): New routine.
690         (UTC_Time_Offset (Time)): Update the call to
691         Time_Zone_Operations.UTC_Time_Offset.
692         * sysdep.c (__gnat_localtime_tzoff): Update parameter
693         profile. Split the processing of offsets on Windows into two - one
694         part of historic time stamps and the other for the current time.
695
696 2012-01-23  Robert Dewar  <dewar@adacore.com>
697
698         * a-calend.adb: Minor reformatting.
699
700 2012-01-23  Ed Schonberg  <schonberg@adacore.com>
701
702         * exp_ch9.adb, sem_ch9.adb: Handle array of access to synchronized
703         interface in requeue statement.
704
705 2012-01-23  Cyrille Comar  <comar@adacore.com>
706
707         * projects.texi: Remove references to main units and replace
708         with references to main programs to be coherent with the
709         documentation.
710
711 2012-01-23  Robert Dewar  <dewar@adacore.com>
712
713         * s-utf_32.adb: Minor reformatting.
714
715 2012-01-23  Vincent Celier  <celier@adacore.com>
716
717         * snames.ads-tmpl: Minor comment addition Indicate that
718         Name_Library_Encapsulated_Options is only used in gprbuild.
719
720 2012-01-23  Robert Dewar  <dewar@adacore.com>
721
722         * sem_ch10.adb (Analyze_Subunit): Properly save/restore cunit
723         restrictions.
724
725 2012-01-23  Ed Schonberg  <schonberg@adacore.com>
726
727         * snames.ads-tmpl: Add Name_Synchronization.
728         * aspects.ads, aspects.adb: Add Aspect_Synchronization to
729         enumeration type and related maps.
730         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle Aspect
731         Synchronization, build corresponding pragma Implemented.
732         * sem_util.adb (Implementation_Kind): Handle both explicit and
733         implicit pragma_argument association to retrieve the given
734         synchronization mode.
735
736 2012-01-23  Robert Dewar  <dewar@adacore.com>
737
738         * sem_ch10.adb, errout.adb: Minor reformatting.
739
740 2012-01-23  Ed Schonberg  <schonberg@adacore.com>
741
742         * sem_res.adb (Resolve_Actuals): An actual in a call to an
743         Ada 2012 Reference function does not lead to a dangerous order
744         dependence.
745
746 2012-01-23  Gary Dismukes  <dismukes@adacore.com>
747
748         * exp_util.adb (Is_Iterated_Container): Test
749         Is_Entity_Name when searching for calls to the default iterator,
750         to avoid blowing up on indirect calls which have an explicit
751         dereference as the call name.
752
753 2012-01-23  Thomas Quinot  <quinot@adacore.com>
754
755         * errout.adb (Set_Msg_Node): For an N_Expanded_Name, output
756         the complete expanded name, rather than just its Selector_Name.
757
758 2012-01-23  Thomas Quinot  <quinot@adacore.com>
759
760         * a-textio.adb (Put): Rewrite one-parameter Character version to
761         just call the two-parameter one with Current_Out.
762
763 2012-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
764
765         * freeze.adb (Check_Current_Instance): Issue an
766         error when the prefix of 'Unchecked_Access or 'Access does not
767         denote a legal aliased view of a type.
768         (Freeze_Record_Type): Do not halt the processing of record components
769         once the Has_Controlled_Component is set as this bypasses the remaining
770         checks.
771         (Is_Aliased_View_Of_Type): New routine.
772
773 2012-01-23  Thomas Quinot  <quinot@adacore.com>
774
775         * errout.ads, freeze.adb: Minor reformatting.
776
777 2012-01-23  Thomas Quinot  <quinot@adacore.com>
778
779         * sem_ch10.adb, sem_prag.adb: Remove redundant apostrophes in error
780         messages.
781
782 2012-01-23  Olivier Hainque  <hainque@adacore.com>
783
784         * adadecode.c (__gnat_decode): Deal with empty input early,
785         preventing potential erroneous memory access later on.
786
787 2012-01-21  Eric Botcazou  <ebotcazou@adacore.com>
788
789         PR ada/46192
790         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: In the case of a
791         renaming, preserve the volatileness through the indirection, if any.
792
793 2012-01-14  Andreas Schwab  <schwab@linux-m68k.org>
794
795         * gcc-interface/Makefile.in (OSCONS_EXTRACT): Add
796         $(GNATLIBCFLAGS).
797
798 2012-01-10  Pascal Obry  <obry@adacore.com>
799
800         * prj-nmsc.adb (Check_Library_Attributes):
801         Kill check for object/source directories for aggregate libraries.
802
803 2012-01-10  Matthew Heaney  <heaney@adacore.com>
804
805         * a-cdlili.adb, a-cdlili.ads, a-cihama.adb, a-cihama.ads, a-coinve.adb,
806         a-coinve.ads, a-ciorse.adb, a-ciorse.ads, a-coorma.adb, a-coorma.ads,
807         a-cborma.adb, a-cborma.ads, a-cidlli.adb, a-cidlli.ads, a-cimutr.adb,
808         a-cimutr.ads, a-cihase.adb, a-cihase.ads, a-cohama.adb, a-cohama.ads,
809         a-coorse.adb, a-coorse.ads, a-cbhama.adb, a-cbhama.ads, a-cborse.adb,
810         a-cborse.ads, a-comutr.adb, a-comutr.ads, a-ciorma.adb, a-cobove.adb,
811         a-ciorma.ads, a-cobove.ads, a-convec.adb, a-convec.ads, a-cohase.adb,
812         a-cohase.ads, a-cbdlli.adb, a-cbdlli.ads, a-cbmutr.adb, a-cbmutr.ads,
813         a-cbhase.adb, a-cbhase.ads (Reference, Constant_Reference): Declare
814         container parameter as aliased in/in out.
815         Code clean ups.
816
817 2012-01-10  Bob Duff  <duff@adacore.com>
818
819         * s-os_lib.ads: Improve comment.
820
821 2012-01-10  Geert Bosch  <bosch@adacore.com>
822
823         * s-gearop.adb (Forward_Eliminate): Avoid improper aliasing
824         for complex Scalar.
825
826 2012-01-10  Bob Duff  <duff@adacore.com>
827
828         * sem_intr.adb (Check_Shift): Use RM_Size instead of Esize, when
829         checking that the 'Size is correct. If the type is "mod 2**12",
830         for example, it's illegal, but Esize is the 'Object_Size, which
831         will be something like 16 or 32, so the error ('Size = 12) was
832         not detected.
833         * gnat_rm.texi: Improve documentation of shift
834         and rotate intrinsics.
835
836 2012-01-10  Pascal Obry  <obry@adacore.com>
837
838         * prj.adb (For_Every_Project_Imported): Fix
839         implementation to make sure we return each project only once
840         for aggragte libraries. It is fine to return a project twice for
841         aggregate projects, this was the case as a Project_Id is different
842         in each project tree. The new implementation use a table based on
843         the project name to ensure proper detection of duplicate project
844         in aggregate library. A new context is then created to continue
845         retrurning duplicate project for aggregate libraries.
846
847 2012-01-09  Eric Botcazou  <ebotcazou@adacore.com>
848
849         * gcc-interface/trans.c (call_to_gnu): Create the temporary for the
850         return value in the variable-sized return type case if the target is
851         an array with fixed size.  However, do not create it if this is the
852         expression of an object declaration.
853
854 2012-01-09  Eric Botcazou  <ebotcazou@adacore.com>
855
856         * gcc-interface/trans.c (addressable_p) <COMPONENT_REF>: Fix thinko.
857
858 2012-01-06  Robert Dewar  <dewar@adacore.com>
859
860         * a-wichha.ads, a-wichun.ads, a-zchhan.ads, a-zchuni.ads,
861         s-utf_32.ads: Add pragma Pure
862         * s-utf_32.adb: Suppress warnings on non-static constants (now
863         that this is Pure).
864
865 2012-01-06  Bob Duff  <duff@adacore.com>
866
867         * s-rpc.ads (Read, Write): Add overriding indicators.
868
869 2012-01-06  Robert Dewar  <dewar@adacore.com>
870
871         * gnat_rm.texi: Add documentation for conventions
872         Ada_Pass_By_Copy and Ada_Pass_By_Reference.
873
874 2012-01-06  Gary Dismukes  <dismukes@adacore.com>
875
876         * a-tienio.adb (Put): Add exception message on
877         raise statements. Remove unneeded blocks and object declarations.
878
879 2012-01-06  Robert Dewar  <dewar@adacore.com>
880
881         * sem_prag.adb: Minor reformatting.
882
883 2012-01-06  Ed Schonberg  <schonberg@adacore.com>
884
885         * sinfo.ads, sinfo.adb (Has_Prefixed_Call): New flag to indicate
886         that a selected component within a generic unit has been resolved
887         as a prefixed call with local references.
888         * sem_ch3.adb (Is_Visible_Component): In an instance body a selected
889         component is always visible.
890         * sem_ch4.adb (Analyze_Selected_Component): If the node is a
891         prefixed call in an instance, do not look for visible components
892         of the type.
893         * sem_ch12.adb (Reset_Entity): If a selected component has resolved
894         to a prefixed call, mark the node accordingly when prefix and
895         selector are local references.
896
897 2012-01-02  Eric Botcazou  <ebotcazou@adacore.com>
898
899         * gnatvsn.ads (Current_Year): Bump to 2012.
900 \f
901 Copyright (C) 2012 Free Software Foundation, Inc.
902
903 Copying and distribution of this file, with or without modification,
904 are permitted in any medium without royalty provided the copyright
905 notice and this notice are preserved.