OSDN Git Service

7e3195a953ae92f9744962ec292bf435d36edba4
[pf3gnuchains/gcc-fork.git] / gcc / ada / ChangeLog
1 2012-06-14  Release Manager
2
3         * GCC 4.7.1 released.
4
5 2012-06-13  Eric Botcazou  <ebotcazou@adacore.com>
6
7         Revert
8         2012-05-19  Eric Botcazou  <ebotcazou@adacore.com>
9
10         * gcc-interface/decl.c (Has_Thiscall_Convention): New macro.
11         (gnat_to_gnu_entity) <E_Subprogram_Type>: Test it to set the thiscall
12         calling convention
13         (get_minimal_subprog_decl): Likewise.
14         (gnat_first_param_is_class): New predicate.
15
16 2012-06-12  Olivier Hainque  <hainque@adacore.com>
17
18         * gcc-interface/Makefile.in (GNATLIBCFLAGS_FOR_C): Remove
19         $(PIC_FLAG_FOR_TARGET).
20         (gnatlib-shared-default): Add $(PIC_FLAG_FOR_TARGET) to
21         GNATLIBCFLAGS_FOR_C passed to gnatlib.
22         (gnatlib-shared-win32): Likewise.
23         (gnatlib-shared-darwin): Likewise.
24         (gnatlib-shared-dual-win32): Pass PIC_FLAG_FOR_TARGET to
25         gnatlib-shared-win32.
26
27 2012-05-26  Eric Botcazou  <ebotcazou@adacore.com>
28
29         * gcc-interface/decl.c (variant_desc): Rename 'record' to 'new_type'.
30         (build_variant_list): Adjust to above renaming.
31         (gnat_to_gnu_entity) <E_Record_Subtype>: Likewise.  Give a unique name
32         to the type of the variant containers.
33         (create_variant_part_from): Likewise.  Give a unique name to the type
34         of the variant part.
35
36 2012-05-25  Eric Botcazou  <ebotcazou@adacore.com>
37
38         PR ada/52362
39         * link.c (__gnat_object_file_option): Set to "-Wl,@" for GNU linker.
40         (__gnat_using_gnu_linker): Delete.
41         * gnatlink.adb (Gnatlink): Declare Object_File_Option_Ptr here...
42         Declare Object_File_Option string constant and Using_GNU_response_file
43         boolean constant.
44         (Process_Binder_File): ...instead of here.  Delete Using_GNU_Linker,
45         Opening and Closing local variables.  Do not handle the GNU linker
46         specially.
47         (Write_RF): New procedure to write into the response file.  Escape some
48         characters if a GNU response file is used.  Keep track of error status.
49         Invoke Write_RF to write into the response file.  Delete the file only
50         if the link was successful.
51         * mlib-utl.adb: Do not `with' package System.
52         (Gcc): Likewise.  Declare Object_File_Option string constant and
53         Using_GNU_response_file boolean constant.
54         (Write_RF): Take a string instead of address and length.  Escape some
55         characters if a GNU response file is used.
56         Invoke Write_RF to write into the response file.  Delete the file only
57         if the link was successful.  Do not warn if it cannot be deleted.
58
59 2012-05-20  Eric Botcazou  <ebotcazou@adacore.com>
60
61         * gcc-interface/utils.c (gnat_write_global_declarations): Put a name
62         on the dummy global variable.
63
64 2012-05-19  Eric Botcazou  <ebotcazou@adacore.com>
65
66         * gcc-interface/decl.c (Has_Thiscall_Convention): New macro.
67         (gnat_to_gnu_entity) <E_Subprogram_Type>: Test it to set the thiscall
68         calling convention
69         (get_minimal_subprog_decl): Likewise.
70         (gnat_first_param_is_class): New predicate.
71
72         Backport from mainline
73         2012-05-15  Javier Miranda  <miranda@adacore.com>
74
75         * exp_ch3.adb (Build_Offset_To_Top): Modify the
76         expansion of the offset_to_top functions to ensure that their
77         profile is conformant with the profile specified in Ada.Tags. No
78         change in functionality.
79
80 2012-05-18  Eric Botcazou  <ebotcazou@adacore.com>
81
82         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: For an object at
83         global level with unconstrained nominal subtype and a non-fixed size,
84         make a variable for the size.
85
86 2012-05-15  Andris Pavenis  <andris.pavenis@iki.fi>
87
88         PR ada/52494
89         * s-taprop-dummy.adb (Specific): New package.
90
91 2012-05-15  Eric Botcazou  <ebotcazou@adacore.com>
92
93         * sem_prag.adb (Process_Atomic_Shared_Volatile): Propagate
94         atomicity from an object to its underlying type only if it
95         is composite.
96
97 2012-05-06  Pascal Obry  <obry@adacore.com>
98
99         Revert
100         2012-02-24  Dave Korn  <dave.korn.cygwin@gmail.com>
101
102         * gcc-interface/Makefile.in (WIN_SO_PREFIX [windows targets]): New
103         Windows-specific make variable.
104         (WIN_SO_INSTALL_DIR [windows targets]): Likewise.
105         (install-gnatlib): Respect the above during installation when set,
106         and also install any windows import library that has been built.
107         (gnatlib-shared-win32): Use WIN_SO_PREFIX to name output DLL and also
108         build a corresponding import library.
109
110 2012-04-30  Eric Botcazou  <ebotcazou@adacore.com>
111
112         * gcc-interface/utils.c (finish_record_type): Force the traditional GCC
113         layout for bitfields on the type if it is packed or has a representation
114         clause and an alternate layout is available.
115
116 2012-04-09  Mike Stump  <mikestump@comcast.net>
117
118         * a-assert.ads: Remove execute permission.
119         * a-chacon.ads: Likewise.
120         * a-coteio.ads: Likewise.
121         * a-envvar.ads: Likewise.
122         * a-exetim-mingw.ads: Likewise.
123         * a-fzteio.ads: Likewise.
124         * a-izteio.ads: Likewise.
125         * a-lcteio.ads: Likewise.
126         * a-llctio.ads: Likewise.
127         * a-scteio.ads: Likewise.
128         * a-suenco.ads: Likewise.
129         * a-suenst.ads: Likewise.
130         * a-suewst.ads: Likewise.
131         * a-suezst.ads: Likewise.
132         * a-tirsfi.ads: Likewise.
133         * a-wichha.ads: Likewise.
134         * a-zchara.ads: Likewise.
135         * a-zchhan.ads: Likewise.
136         * a-zchuni.ads: Likewise.
137         * a-zrstfi.ads: Likewise.
138         * aspects.ads: Likewise.
139         * g-byorma.ads: Likewise.
140         * g-decstr.ads: Likewise.
141         * g-encstr.ads: Likewise.
142         * g-spchge.ads: Likewise.
143         * g-u3spch.ads: Likewise.
144         * g-wispch.ads: Likewise.
145         * g-zspche.ads: Likewise.
146         * namet-sp.ads: Likewise.
147         * s-os_lib.ads: Likewise.
148         * s-regexp.ads: Likewise.
149         * s-regpat.ads: Likewise.
150         * s-string.ads: Likewise.
151         * s-tasloc.ads: Likewise.
152         * s-utf_32.ads: Likewise.
153         * sem_aux.ads: Likewise.
154         * a-assert.adb: Likewise.
155         * a-chacon.adb: Likewise.
156         * a-envvar.adb: Likewise.
157         * a-exetim-mingw.adb: Likewise.
158         * a-suenco.adb: Likewise.
159         * a-suenst.adb: Likewise.
160         * a-suewst.adb: Likewise.
161         * a-suezst.adb: Likewise.
162         * a-tirsfi.adb: Likewise.
163         * a-wichha.adb: Likewise.
164         * a-zchhan.adb: Likewise.
165         * a-zchuni.adb: Likewise.
166         * a-zrstfi.adb: Likewise.
167         * aspects.adb: Likewise.
168         * g-byorma.adb: Likewise.
169         * g-decstr.adb: Likewise.
170         * g-encstr.adb: Likewise.
171         * g-spchge.adb: Likewise.
172         * g-u3spch.adb: Likewise.
173         * g-wispch.adb: Likewise.
174         * g-zspche.adb: Likewise.
175         * namet-sp.adb: Likewise.
176         * s-except.adb: Likewise.
177         * s-inmaop-vxworks.adb: Likewise.
178         * s-os_lib.adb: Likewise.
179         * s-regexp.adb: Likewise.
180         * s-regpat.adb: Likewise.
181         * s-string.adb: Likewise.
182         * s-tasloc.adb: Likewise.
183         * s-utf_32.adb: Likewise.
184         * s-wchcon.adb: Likewise.
185         * sem_aux.adb: Likewise.
186
187 2012-03-22  Release Manager
188
189         * GCC 4.7.0 released.
190
191 2012-02-29  Eric Botcazou  <ebotcazou@adacore.com>
192
193         * gcc-interface/decl.c (components_to_record): Add ARTIFICIAL parameter
194         and set TYPE_ARTIFICIAL according to it.  Adjust recursive call.
195         (gnat_to_gnu_entity) <E_Record_Type>: Adjust call to above function.
196         * gcc-interface/utils.c (rest_of_record_type_compilation): Do not
197         invoke rest_of_type_decl_compilation on the parallel type, if any.
198
199 2012-02-29  Eric Botcazou  <ebotcazou@adacore.com>
200
201         * gcc-interface/utils.c (gnat_write_global_declarations): Make sure the
202         dummy global built for global types is preserved.
203
204 2012-02-27  Tristan Gingold  <gingold@adacore.com>
205
206         * gcc-interface/decl.c (gnat_to_gnu_entity) [E_String_Type,
207         E_Array_Type]: Reuse dummy fat type for gnu_ptr_template and
208         gnu_template_type.
209
210 2012-02-27  Eric Botcazou  <ebotcazou@adacore.com>
211
212         * gcc-interface/ada-tree.h (TYPE_PACKED_ARRAY_TYPE_P): Add checking.
213         (TYPE_BY_REFERENCE_P): New flag.
214         (TYPE_IS_BY_REFERENCE_P): New macro.
215         (TYPE_DUMMY_P): Add checking and remove VOID_TYPE.
216         (TYPE_IS_DUMMY_P): Adjust for above change.
217         * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_BY_REFERENCE_P
218         and TYPE_IS_BY_REFERENCE_P instead of TREE_ADDRESSABLE.
219         (gnat_to_gnu_param): Likewise.
220         (maybe_pad_type): Likewise.
221         (make_type_from_size): Use TYPE_IS_PACKED_ARRAY_TYPE_P.
222         * gcc-interface/misc.c (must_pass_by_ref): Use TYPE_IS_BY_REFERENCE_P
223         instead of TREE_ADDRESSABLE.
224         * gcc-interface/trans.c (finalize_nrv): Likewise.
225         (call_to_gnu): Likewise.  Do not create a temporary for return values
226         with by-reference type here.
227         (gnat_to_gnu): Test TYPE_IS_DUMMY_P instead of TYPE_DUMMY_P.
228         (gnat_gimplify_expr) <ADDR_EXPR>: Don't do anything for non-constant
229         CONSTRUCTORs and calls.
230         * gcc-interface/utils.c (make_dummy_type): Get the equivalent type of
231         the underlying type and use it throughout.  Use TYPE_IS_BY_REFERENCE_P
232         instead of TREE_ADDRESSABLE.
233         * gcc-interface/utils2.c (build_cond_expr): Deal with by-reference
234         types explicitly.
235
236 2012-02-27  Eric Botcazou  <ebotcazou@adacore.com>
237
238         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Revert previous
239         change that creates a special VAR_DECL for debugging purposes.  For an
240         aliased object with an unconstrained nominal subtype, make its type a
241         thin reference to the underlying object.
242         * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: Deal with
243         expressions built for the initialization of above objects.
244
245 2012-02-24  Dave Korn  <dave.korn.cygwin@gmail.com>
246
247         * gcc-interface/Makefile.in (WIN_SO_PREFIX [windows targets]): New
248         Windows-specific make variable.
249         (WIN_SO_INSTALL_DIR [windows targets]): Likewise.
250         (install-gnatlib): Respect the above during installation when set,
251         and also install any windows import library that has been built.
252         (gnatlib-shared-win32): Use WIN_SO_PREFIX to name output DLL and also
253         build a corresponding import library.
254
255 2012-02-22  Robert Dewar  <dewar@adacore.com>
256
257         * exp_util.adb, make.adb, sem_dim.adb, sem_ch4.adb, exp_disp.adb: Minor
258         reformatting.
259
260 2012-02-22  Geert Bosch  <bosch@adacore.com>
261
262         * g-bytswa-x86.adb, g-bytswa.adb, gcc-interface/Makefile.in: Remove
263         x86-specific version of byteswap and use GCC builtins instead.
264
265 2012-02-22  Tristan Gingold  <gingold@adacore.com>
266
267         * gcc-interface/decl.c (gnat_to_gnu_entity) [E_String_Type,
268         E_Array_Type]: Translate component ealier.
269
270 2012-02-22  Robert Dewar  <dewar@adacore.com>
271
272         * par-ch3.adb (P_Signed_Integer_Type_Definition): Specialize
273         error message for 'Range.
274
275 2012-02-22  Pascal Obry  <obry@adacore.com>
276
277         * s-taprop-mingw.adb (Finalize_TCB): Do not wait on thread handle as
278         this is our own thread.
279
280 2012-02-22  Sergey Rybin  <rybin@adacore.com frybin>
281
282         * tree_io.ads: Update ASIS_Version_Number because of the changes
283         in Snames.
284
285 2012-02-22  Hristian Kirtchev  <kirtchev@adacore.com>
286
287         * exp_ch7.adb (Create_Finalizer): Suppress elaboration checks on 
288         stack-related finalizers.
289
290 2012-02-22  Ed Schonberg  <schonberg@adacore.com>
291
292         * sem_ch6.adb (Analyze_Expression_Function): If the construct
293         is a completion, indicate that its formals are the formals of
294         a completion, and as such do not get a cross- reference entry.
295         (Analyze_Subprogram_Specification): Do not generate a definition
296         for the entity of an expression function, because it may be a
297         completion. Definition will be generated if needed when analyzing
298         the generated subprogram declaration.
299
300 2012-02-22  Vincent Celier  <celier@adacore.com>
301
302         * make.adb (Check): When checking if an object file is in the
303         correct object directory, get the unit name from a previous call
304         to Check_Source_Info_In_ALI.
305         * makeutl.adb (Check_Source_Info_In_ALI): Return the name of
306         the unit when everything is OK, otherwise return No_Name.
307         * makeutl.ads (Check_Source_Info_In_ALI): Return Name_Id instead
308         of Boolean
309
310 2012-02-22  Ed Schonberg  <schonberg@adacore.com>
311
312         * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): In an
313         instance, the operator is visible if an operand is of some
314         numeric type which is not in use or directly visible, and the
315         other operand is a numeric literal.
316
317 2012-02-22  Tristan Gingold  <gingold@adacore.com>
318
319         * init.c: Minor code clean up.
320         * gcc-interface/Make-lang.in: Update dependencies.
321
322 2012-02-22  Arnaud Charlet  <charlet@adacore.com>
323
324         * gnatlink.adb (Gnatlink): Use -gnatcC in CodePeer_Node,
325         otherwise GCC will generate an object file.
326
327 2012-02-22  Vincent Celier  <celier@adacore.com>
328
329         * projects.texi: Correct typo related to "**" in Source_Dirs.
330
331 2012-02-22  Steve Baird  <baird@adacore.com>
332
333         * sem_prag.adb (Analyze_PPC_In_Decl_Part): Clean up generation of
334         error message text.
335
336 2012-02-22  Vincent Pucci  <pucci@adacore.com>
337
338         * rtsfind.adb (Get_Unit_Name): Ada_Numerics_Child and
339         System_Dim_Child cases added.
340         * rtsfind.ads: Ada_Numerics,
341         Ada_Numerics_Generic_Elementary_Functions, System_Dim,
342         System_Dim_Float_IO and System_Dim_Integer_IO added to the list
343         of RTU_Id.  Ada_Numerics_Child and System_Dim_Child added as
344         new RTU_Id subtypes.
345         * sem_dim.adb (Is_Dim_IO_Package_Entity): Use of
346         Rtsfind to verify the package entity is located either
347         in System.Dim.Integer_IO or in System.Dim.Float_IO.
348         (Is_Dim_IO_Package_Instantiation): Minor
349         changes.  (Is_Elementary_Function_Call): Removed.
350         (Is_Elementary_Function_Entity): New routine.
351         (Is_Procedure_Put_Call): Is_Dim_IO_Package_Entity call added.
352         * snames.ads-tmpl: Name_Dim and Name_Generic_Elementary_Functions
353         removed.
354
355 2012-02-22  Vincent Pucci  <pucci@adacore.com>
356
357         * sem_prag.adb: Minor reformatting.
358
359 2012-02-22  Ed Schonberg  <schonberg@adacore.com>
360
361         * sem_ch3.adb (Find_Type_Name): When analyzing a private type
362         declaration that is the completion of a tagged incomplete type, do
363         not associate the class-wide type already created with the private
364         type to prevent order-of-elaboration issues in the back-end.
365         * exp_disp.adb (Find_Specific_Type): Find specific type of
366         a class-wide type, and handle the case of an incomplete type
367         coming  either from a limited_with clause or from an incomplete
368         type declaration. Used when expanding a dispatchin call and
369         generating tag checks (minor refactoring).
370
371 2012-02-22  Robert Dewar  <dewar@adacore.com>
372
373         * exp_ch5.adb: Add comment.
374         * sem_ch12.adb, exp_ch6.adb: minor reformatting
375
376 2012-02-22  Ed Schonberg  <schonberg@adacore.com>
377
378         * freeze.adb (Freeze_Entity): Do not perform type layout within
379         a generic unit.
380
381 2012-02-22  Eric Botcazou  <ebotcazou@adacore.com>
382
383         * init.c (__gnat_error_handler) [Linux]: Map SIGBUS to
384         Storage_Error.
385
386 2012-02-22  Ed Schonberg  <schonberg@adacore.com>
387
388         * exp_ch5.adb (Expand_N_Assignment_Statement): Reject an
389         assignment to a classwide type whose type is limited, as
390         can happen in an instantiation in programs that run afoul or
391         AI05-0087.
392
393
394 2012-02-17  Ed Schonberg  <schonberg@adacore.com>
395
396         * exp_ch6.adb (Legal_Copy): If layout is not
397         determined in the front-end, do not emit error message when
398         by-reference actual is potentially unaligned.
399         * gcc-interface/decl.c (gnat_to_gnu_field): Better error message for
400         illegal representation clause on tagged or aliased component, or on
401         by-reference type with forced alignment.
402
403 2012-02-17  Nicolas Roche  <roche@adacore.com>
404
405         * gcc-interface/Makefile.in: Ensure FORCE_DEBUG_ADAFLAGS variables is
406         propagated by gnatlib-sjlj and gnatlib-zcx targets.
407         * gcc-interface/Make-lang.in: Update dependencies.
408
409 2012-02-17  Thomas Quinot  <quinot@adacore.com>
410
411         * sem_ch12.adb (Analyze_Package_Instantiation): For an
412         instantiation in an RCI library unit, omit the instance body
413         if the RCI library unit is the instance itself (E.2.3(18)),
414         but include the body if the instantiation is within the RCI
415         declaration (12.3(12)).
416
417 2012-02-17  Steve Baird  <baird@adacore.com>
418
419         * sem_prag.adb (Analyze_PPC_In_Decl_Part): Pre'Class and
420         Post'Class aspects can only be specified for a primitive operation
421         of a tagged type.
422
423 2012-02-17  Yannick Moy  <moy@adacore.com>
424
425         * gnat_rm.texi: Minor shuffling.
426
427 2012-02-17  Ed Schonberg  <schonberg@adacore.com>
428
429         * aspects.adb: Expression functions can carry pre/postconditions.
430         * par-ch6.adb (P_Subprogram): look for optional pre/postconditions
431         in an expression function.
432         * sem_prag (Check_Precondition_Postcondition): legal on expression
433         functions.
434
435 2012-02-17  Vincent Pucci  <pucci@adacore.com>
436
437         * a-cdlili.adb, a-cidlli.adb, a-cihama.adb, a-cimutr.adb,
438         * a-ciorma.adb, a-cohama.adb, a-coinve.adb, a-comutr.adb,
439         * a-convec.adb, a-coorma.adb (Adjust): New routine.
440         (Constant_Reference): Increment Busy and Lock counters.
441         (Reference): Increase Busy and Lock counters.
442         (Finalize): New routine.
443         * a-cihase.adb, a-ciorse.adb, a-cohase.adb, a-coorse.adb:
444         (Adjust): New routine.  (Constant_Reference): Increment Busy
445         and Lock counters.
446         (Finalize): New routine.
447         * a-cdlili.ads, a-cidlli.ads, a-cihama.ads, a-cihase.ads,
448         * a-cimutr.ads, a-ciorma.ads, a-ciorse.ads, a-cohama.ads,
449         * a-cohase.ads, a-coinve.ads, a-comutr.ads, a-convec.ads,
450         * a-coorma.ads, a-coorse: Controlled component added to the
451         reference types.
452
453 2012-02-17  Robert Dewar  <dewar@adacore.com>
454
455         * restrict.adb (Check_Restriction): Add special handling for
456         No_Obsolescent_Features.
457
458 2012-02-17  Hristian Kirtchev  <kirtchev@adacore.com>
459
460         * exp_util.adb (Find_Finalize_Address): When dealing with an
461         internally built full view for a type with unknown discriminants,
462         use the original record type.
463
464 2012-02-17  Robert Dewar  <dewar@adacore.com>
465
466         * sem_dim.adb: Minor reformatting.
467
468 2012-02-17  Yannick Moy  <moy@adacore.com>
469
470         * gnat_rm.texi: Minor rewording.
471
472 2012-02-17  Thomas Quinot  <quinot@adacore.com>
473
474         * sem_aggr.adb: Minor reformatting.
475
476 2012-02-17  Robert Dewar  <dewar@adacore.com>
477
478         * gnat_ugn.texi: Update doc for -gnatw.m to include 2*x case.
479
480 2012-02-17  Vincent Pucci  <pucci@adacore.com>
481
482         * sem_dim.adb (Is_Dim_IO_Package_Entity): New routine.
483         (Is_Dim_IO_Package_Instantiation): Is_Dim_IO_Package_Entity
484         call added.
485         (Is_Procedure_Put_Call): Is_Dim_IO_Package_Entity
486         call added.
487         * s-dim.ads: Make package Pure.
488
489 2012-02-17  Gary Dismukes  <dismukes@adacore.com>
490
491         * prj-nmsc.adb: Minor reformatting.
492
493 2012-02-17  Yannick Moy  <moy@adacore.com>
494
495         * gnat_rm.texi: Update GNAT RM with a separate chapter on restrictions.
496
497 2012-02-17  Yannick Moy  <moy@adacore.com>
498
499         * gnat_ugn.texi: Fix typos.
500
501 2012-02-17  Pascal Obry  <obry@adacore.com>
502
503         * prj-nmsc.adb: prj-nmsc.adb (Check_Aggregated): Check that an
504         aggregate is not Externally_Built.
505
506 2012-02-17  Ed Schonberg  <schonberg@adacore.com>
507
508         * sem_aggr.adb (Resolve_Record_Aggregate): If a composite
509         component has a box association, copy the default value using
510         the current scope as the scope of internal types, to prevent
511         scoping anomalies in gigi.
512
513 2012-02-17  Robert Dewar  <dewar@adacore.com>
514
515         * sem_dim.adb, sem_dim.ads, s-tasren.adb, prj.adb, prj.ads, freeze.adb,
516         sem_res.adb, exp_ch4.adb, sinput.adb, sinput.ads, exp_aggr.adb,
517         exp_intr.adb, s-os_lib.adb: Minor reformatting.
518
519 2012-02-17  Ed Schonberg  <schonberg@adacore.com>
520
521         * sem_ch6.adb (Is_Non_Overriding_Operation): Add warning if the
522         old operation is abstract, the relevant type is not abstract,
523         and the new subprogram fails to override.
524
525 2012-02-15  Eric Botcazou  <ebotcazou@adacore.com>
526
527         * gcc-interface/trans.c (Identifier_to_gnu): Move block retrieving the
528         type of the result to the end and execute it for a deferred constant of
529         a discriminated type whose full view can be elaborated statically.
530
531 2012-02-15  Eric Botcazou  <ebotcazou@adacore.com>
532
533         * gcc-interface/trans.c (gnat_to_gnu) <N_Qualified_Expression>: If the
534         type is tagged, mark it as used for debugging purposes.
535         <N_Allocator>: Likewise for a qualified expression.
536
537 2012-02-15  Eric Botcazou  <ebotcazou@adacore.com>
538
539         * gcc-interface/trans.c (call_to_gnu): Create the temporary for the
540         return value in the by-reference return type case if this isn't the
541         expression of an object declaration.  Tidy up.
542
543 2012-02-09  Tristan Gingold  <gingold@adacore.com>
544
545         * gcc-interface/Makefile.in: Remove .sym rule (not used).
546         Remove adamsg.o object (requires native message compiler).
547         * init.c (CMA$_EXIT_THREAD, MTH$_FLOOVEMAT, SS$_INTDIV): Define as a
548         macro instead of as extern int.
549         (ADA$_ALREADY_OPEN, ADA$_CONSTRAINT_ERRO, ADA$_DATA_ERROR)
550         (ADA$_DEVICE_ERROR, ADA$_END_ERROR, ADA$_FAC_MODE_MISMAT)
551         (ADA$_IOSYSFAILED, ADA$_KEYSIZERR, ADA$_KEY_MISMATCH)
552         (ADA$_LAYOUT_ERROR, ADA$_LINEXCMRS, ADA$_MAXLINEXC)
553         (ADA$_MODE_ERROR, ADA$_MRN_MISMATCH, ADA$_MRS_MISMATCH)
554         (ADA$_NAME_ERROR, ADA$_NOT_OPEN, ADA$_ORG_MISMATCH)
555         (ADA$_PROGRAM_ERROR, ADA$_RAT_MISMATCH, ADA$_RFM_MISMATCH)
556         (ADA$_STAOVF, ADA$_STATUS_ERROR, ADA$_STORAGE_ERROR)
557         (ADA$_UNSUPPORTED, ADA$_USE_ERROR): Likewise.
558         (struct cond_except): Field cond is now an unsigned int.
559         (dec_ada_cond_except_table): Adjust.
560         (cond_except_table): Likewise.
561         (cond_resignal_table): Likewise.
562         (__gnat_default_resignal_p): Fix style.
563
564 2012-02-08  Vincent Celier  <celier@adacore.com>
565
566         * gcc-interface/Make-lang.in: Add g-byorma.o to gnatbind objects
567         (g-buorma is now imported by sinput).
568         Update dependencies.
569         * scn.adb (Initialize_Scanner): Call Check_For_BOM
570         * sinput-p.adb (Source_File_Is_Subunit): Call Check_For_BOM
571         * sinput.adb: New procedure Check_For_BOM
572         * sinput.ads: New procedure Check_For_BOM
573
574 2012-02-08  Vincent Pucci  <pucci@adacore.com>
575
576         * impunit.adb: Dimension package names updated
577         * Makefile.rtl: s-dim added
578         * sem_dim.adb (Is_Procedure_Put_Call): minor changes
579         (Is_Dim_IO_Package_Instantiation): minor changes
580         * sem_dim.ads: minor changes in comments
581         * snames.ads-tmpl: Name_Dim added Name_Dim_Float_IO and
582         Name_Dim_Integer_IO removed
583         * s-dim.ads: New package. Define the dimension terminology.
584         * s-diflio.adb, s-diinio.adb, s-dimkio.ads, s-dimmks.ads,
585         * s-dmotpr.ads: Package names updated.
586         * s-diflio.ads, s-diinio.ads: Documentation added and package
587         names updated.
588
589 2012-02-08  Gary Dismukes  <dismukes@adacore.com>
590
591         * gcc-interface/utils2.c (build_call_alloc_dealloc_proc): Revise test
592         for storage pools to test for an underlying record type rather than
593         testing Is_Tagged_Type, so that simple storage pools will be handled
594         the same as normal Ada storage pools.
595
596 2012-02-08  Yannick Moy  <moy@adacore.com>
597
598         * gnat_rm.texi: Minor reshuffling to place restriction at
599         appropriate place.
600
601 2012-02-08  Bob Duff  <duff@adacore.com>
602
603         * warnsw.adb (Set_Warning_Switch): Set Warn_On_Suspicious_Modulus_Value
604         False for '-gnatwA', to suppress these warnings.
605
606 2012-02-08  Vincent Celier  <celier@adacore.com>
607
608         * sinput-p.adb (Source_File_Is_Subunit): Check for BOM before
609         starting to scan, so that UTF8 encoding is taken into account.
610
611 2012-02-08  Arnaud Charlet  <charlet@adacore.com>
612
613         * s-tasren.adb, s-tasren.ads (Internal_Complete_Rendezvous): New
614         function.
615         (Complete_Rendezvous): Now call Internal_Complete_Rendezvous.
616         (Exceptional_Complete_Rendezvous): Mark No_Return.
617
618 2012-02-08  Eric Botcazou  <ebotcazou@adacore.com>
619
620         * exp_aggr.adb (Compile_Time_Known_Composite_Value):
621         New predicate to compute whether a composite value can be
622         evaluated at compile time.
623         (Component_Not_OK_For_Backend): Use Compile_Time_Known_Value for all
624         expressions of elementary type and Compile_Time_Known_Composite_Value
625         for all other expressions.
626         (Expand_Record_Aggregate): Convert to assignments in the case
627         of a type with mutable components if the aggregate cannot be
628         built statically.
629
630 2012-02-08  Gary Dismukes  <dismukes@adacore.com>
631
632         * aspects.ads (type Aspect_Id): Add Simple_Storage_Pool_Type.
633         (Impl_Defined_Aspects): Add association for
634         Aspect_Simple_Storage_Pool_Type.
635         (Aspect_Names): Add
636         association for Aspect_Simple_Storage_Pool_Type.
637         * aspects.adb:
638         (Canonical_Aspect): Add association for Simple_Storage_Pool_Type.
639         * exp_attr.adb (Expand_N_Attribute_Reference):
640         Change name to Name_Simple_Storage_Pool_Type.
641         * exp_ch4.adb (Expand_N_Allocator): Change
642         name to Name_Simple_Storage_Pool_Type.
643         * exp_intr.adb (Expand_Unc_Deallocation): Change name to
644         Name_Simple_Storage_Pool_Type.  * freeze.adb (Freeze_Entity):
645         Change names to Name_Simple_Storage_Pool_Type.  * par-prag.adb:
646         Change names to Name_Simple_Storage_Pool_Type.  * sem_attr.adb:
647         (Analyze_Attribute): Change name to Name_Simple_Storage_Pool_Type.
648         * sem_ch13.adb (Analyze_Attribute_Definition_Clause):
649         Change name to Name_Simple_Storage_Pool_Type.
650         * sem_prag.adb:
651         (Analyze_Pragma): Change name to Name_Simple_Storage_Pool_Type.
652         (Sig_Flags): Change name to Name_Simple_Storage_Pool_Type.
653         * sem_res.adb (Resolve_Allocator): Change name to
654         Name_Simple_Storage_Pool_Type.  * snames.ads-tmpl:
655         (Name_Simple_Storage_Pool_Type): New name constant.
656         (type Pragma_Id): Change name to Name_Simple_Storage_Pool_Type and
657         move to main pragma section because it no longer matches the
658         attribute name.
659         * snames.adb-tmpl (Get_Pragma_Id): Remove test for
660         Name_Simple_Storage_Pool.
661         (Is_Pragma_Name): Remove test for Name_Simple_Storage_Pool.
662
663 2012-02-08  Robert Dewar  <dewar@adacore.com>
664
665         * gnat_ugn.texi: Add some clarification to -gnatwA and -gnatws.
666
667 2012-02-08  Pascal Obry  <obry@adacore.com>
668
669         * prj.adb (Compute_All_Imported_Projects): Use new
670         For_Project_And_Aggregated_Context to ensure proper context is
671         used for encapsulated aggregate libraries.
672         * prj-proc.adb (Recursive_Process): Call
673         Process_Aggregated_Projects earlier to ensure that all dependent
674         projects are set with the proper encapsulated status.
675
676 2012-02-08  Pascal Obry  <obry@adacore.com>
677
678         * s-os_lib.adb (Normalize_Arguments): Properly escape last \ in null
679         terminated string.
680
681 2012-02-08  Pascal Obry  <obry@adacore.com>
682
683         * prj.ads, prj.adb (For_Project_And_Aggregated_Context): New
684         generic routine with a context parameter.
685
686 2012-02-08  Robert Dewar  <dewar@adacore.com>
687
688         * a-coinve.adb, sem_util.adb, sem_ch8.adb, a-cobove.adb,
689         a-convec.adb: Minor reformatting and code reorganization.
690
691 2012-02-08  Steve Baird  <baird@adacore.com>
692
693         * sem_cat.adb (In_Preelaborated_Unit): A child
694         unit instantiation does not inherit preelaboration requirements
695         from its parent.
696
697 2012-02-08  Gary Dismukes  <dismukes@adacore.com>
698
699         * aspects.ads (type Aspect_Id): Add Aspect_Simple_Storage_Pool.
700         (Impl_Defined_Aspects): Add entry for Aspect_Simple_Storage_Pool.
701         (Aspect_Argument): Add Name entry for Aspect_Simple_Storage_Pool.
702         (Aspect_Names): Add entry for Aspect_Simple_Storage_Pool.
703         * aspects.adb (Canonical_Aspect): Add entry for
704         Aspect_Simple_Storage_Pool.
705         * exp_attr.adb (Expand_N_Attribute_Reference): Handle case of
706         Attribute_Simple_Storage_Pool in the same way as Storage_Pool
707         (add conversion, analyze/resolve). For the Storage_Size attribute,
708         for the simple pool case, locate and use the simple pool type's
709         Storage_Size function (if any), otherwise evaluate to zero.
710         * exp_ch4.adb (Expand_N_Allocator): In the case of an allocator
711         for an access type with an associated simple storage pool,
712         locate and use the pool type's Allocate.
713         * exp_intr.adb (Expand_Unc_Deallocation): In the case where the
714         access type has a simple storage pool, locate the pool type's
715         Deallocate procedure (if present) and use it as the procedure
716         to call on the Free operation.
717         * freeze.adb (Freeze_Entity): In the case of a full type for
718         a private type defined with pragma Simple_Storage_Pool, check
719         that the full type is also appropriate for the pragma. For
720         a simple storage pool type, validate that the operations
721         Allocate, Deallocate (if present), and Storage_Size
722         (if present) are defined with appropriate expected profiles.
723         (Validate_Simple_Pool_Op_Formal): New procedure
724         (Validate_Simple_Pool_Operation): New procedure Add with and
725         use of Rtsfind.
726         * par-prag.adb: Add Pragma_Simple_Storage_Pool to case statement
727         (no action required).
728         * sem_attr.adb (Analyze_Attribute): For the case of the
729         Storage_Pool attribute, give a warning if the prefix type has an
730         associated simple storage pool, and rewrite the attribute as a
731         raise of Program_Error. In the case of the Simple_Storage_Pool
732         attribute, check that the prefix type has an associated simple
733         storage pool, and set the attribute type to the pool's type.
734         * sem_ch13.adb (Analyze_Aspect_Specifications): Add
735         Aspect_Simple_Storage_Pool case choice.
736         (Analyze_Attribute_Definition_Clause): Add
737         Aspect_Simple_Storage_Pool to case for Ignore_Rep_Clauses
738         (no action). Add handling for Simple_Storage_Pool attribute
739         definition, requiring the name to denote a simple storage pool
740         object.
741         (Check_Aspect_At_Freeze_Point): For a simple storage pool
742         aspect, set the type to that of the name specified for the aspect.
743         * sem_prag.adb (Analyze_Pragma): Add handling for pragma
744         Simple_Storage_Pool, requiring that it applies to a library-level
745         type declared in a package declaration that is a limited private
746         or limited record type.
747         * sem_res.adb (Resolve_Allocator): Flag an attempt to call a
748         build-in-place function in an allocator for an access type with
749         a simple storage pool as unsupported.
750         * snames.ads-tmpl: Add Name_Simple_Storage_Pool.
751         (type Attribute_Id): Add Attribute_Simple_Storage_Pool.
752         (type Pragma_Id): Add Pragma_Simple_Storage_Pool.
753         * snames.adb-tmpl (Get_Pragma_Id): Handle case of
754         Name_Simple_Storage_Pool.
755         (Is_Pragma_Name): Return True for Name_Simple_Storage_Pool.
756
757 2012-02-08  Cyrille Comar  <comar@adacore.com>
758
759         * projects.texi: Clarify doc for interfaces.
760
761 2012-02-07  Eric Botcazou  <ebotcazou@adacore.com>
762
763         * gcc-interface/Make-lang.in (GCC_LINKERFLAGS): New variable.
764         (GCC_LINK): Use it.
765
766 2012-02-01  Tristan Gingold  <gingold@adacore.com>
767
768         * gcc-interface/trans.c (Loop_Statement_to_gnu): Use sizetype
769         instead of size_type_node.
770
771 2012-01-30  Nicolas Roche  <roche@adacore.com>
772
773         * gcc-interface/Make-lang.in: Update dependencies.
774         * gcc-interface/Makefile.in: Use system-vxworks-system-ppc-mils.ads
775         when needed.
776         Remove Linker_Options -crtbe when building sjlj run-time.
777
778 2012-01-30  Robert Dewar  <dewar@adacore.com>
779
780         * sem.adb (Analyze): Call Analyze_Mod for N_Op_Mod mode.
781         * sem_ch3.adb (Modular_Type_Declaration): Warn on mod value of
782         form 2 * small-literal.
783         * sem_ch4.adb (Analyze_Mod): New procedure (warn on suspicious
784         mod value).
785         * sem_ch4.ads (Analyze_Mod): New procedure.
786
787 2012-01-30  Ed Schonberg  <schonberg@adacore.com>
788
789         * sem_ch6.adb: sem_ch6.adb (Analyze_Expression_Function): Copy
790         types and return expression when building spec for implicit
791         body, to preserve global references that may be present in an
792         instantiation.
793
794 2012-01-30  Matthew Heaney  <heaney@adacore.com>
795
796         * a-convec.adb, a-coinve.adb, a-cobove.adb (Sort,
797         Reverse_Elements): Check for cursor tampering.
798
799 2012-01-30  Ed Schonberg  <schonberg@adacore.com>
800
801         * sem_util.adb (Is_Fully_Initialized_Type): In Ada 2012, a
802         type with aspect Default_Value or Default_Component_Value is
803         fully initialized, and use of variables of such types do not
804         generate warnings.
805
806 2012-01-30  Javier Miranda  <miranda@adacore.com>
807
808 PR ada/15846
809         * sem_ch8.adb (Analyze_Subprogram_Renaming):
810         Handle self-renaming when the renamed entity is referenced using
811         its expanded name.
812
813 2012-01-30  Vincent Celier  <celier@adacore.com>
814
815         * projects.texi: Add documentation for attribute Interfaces.
816
817 2012-01-30  Hristian Kirtchev  <kirtchev@adacore.com>
818
819         * exp_ch7.adb (Build_Finalizer_Call): Set loc again.
820         * exp_ch11.adb (Expand_At_End_Handler): Do not provide a source
821         location for the wrapped call to the original AT_END routine
822         and the subsequent return statement.
823
824 2012-01-30  Pascal Obry  <obry@adacore.com>
825
826         * s-rannum.adb: Minor reformatting.
827
828 2012-01-30  Hristian Kirtchev  <kirtchev@adacore.com>
829
830         * a-calend-vms.adb, a-calend.adb: Increment the number of leap seconds
831         to 25 and add the hard time value for 2012-06-30.
832
833 2012-01-30  Robert Dewar  <dewar@adacore.com>
834
835         * a-strhas.ads, einfo.adb, einfo.ads, exp_ch7.adb, exp_ch9.adb,
836         freeze.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-proc.adb, s-llflex.ads,
837         s-ransee.adb, s-ransee.ads, sem_ch13.adb, sem_dim.adb, sem_prag.adb:
838         Minor reformatting/code reorganization.
839
840 2012-01-30  Thomas Quinot  <quinot@adacore.com>
841
842         * s-rannum.adb, s-ransee.adb, s-ransee.ads (Get_Seed): Return
843         Unsigned_64 rather than Duration.
844         (System.Random_Numbers.Reset): Use full value of seed
845         (do not truncate sub-second bits).
846
847 2012-01-30  Thomas Quinot  <quinot@adacore.com>
848
849         * sem_cat.adb, sem_ch12.adb: Minor reformatting.
850
851 2012-01-30  Yannick Moy  <moy@adacore.com>
852
853         * gnat_ugn.texi: Minor correction of GNAT UG, to take into
854         account changes to -gnatwa and more recent warnings.
855
856 2012-01-30  Hristian Kirtchev  <kirtchev@adacore.com>
857
858         * exp_ch7.adb (Build_Finalizer_Call): Do not provide a source
859         location when creating a call to a finalizer.
860         * exp_ch11.adb (Expand_Exception_Handlers): Do not provide
861         a source location for the first actual of Save_Occurrence for
862         consistency sake.
863
864 2012-01-30  Ed Schonberg  <schonberg@adacore.com>
865
866         * einfo.ads, einfo,adb: New attribute on scalar types:
867         Default_Aspect_Value New attribute on  array types:
868         Default_Aspect_Component_Value Move attribute Related_Array_Object
869         to a different position to accomodate new aspect attributes.
870         * freeze.adb (Freeze_Entity): Use new attributes to retrieve value
871         of defaults set with an aspect specification, rather than using
872         the list of aspects attached to the type, to prevent issues with
873         partial views.
874         * sem_ch13.adb (Analyze_Aspect_Specifications): For aspects
875         Default_Value and Default_Component _Value, store corresponding
876         expression in type entity.
877         (Check_Aspect_At_End_Of_Declaration): If the default aspects
878         are declared on the full view, use the full view to resolve the
879         correseponding expression.
880         * exp_ch3.adb (Init_Component): Use attribute
881         Default_Aspect_Component_Value to perform default initialization,
882         rather than relying on the rep item list for the type.
883         (Get_Simple_Init_Val): Ditto.
884
885 2012-01-30  Thomas Quinot  <quinot@adacore.com>
886
887         * a-strhas.ads: Document risk of collision attack.
888
889 2012-01-30  Yannick Moy  <moy@adacore.com>
890
891         * gnat_ugn.texi: Minor update wrt warning switches.
892
893 2012-01-30  Vincent Celier  <celier@adacore.com>
894
895         * prj-nmsc.adb (Check_Interfaces): Report an error when a
896         unit from Library_Interface is not a unit of the project.
897
898 2012-01-30  Vincent Pucci  <pucci@adacore.com>
899
900         * sem_prag.adb (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Parent
901         links fixed inside PPC pragmas.
902         * sem_ch12.adb: Move call to Make_Aspect_For_PPC_In_Gen_Sub_Decl.
903
904 2012-01-30  Thomas Quinot  <quinot@adacore.com>
905
906         * s-ransee.ads: Minor reformatting.
907
908 2012-01-30  Pascal Obry  <obry@adacore.com>
909
910         * prj.ads, prj.adb (For_Each_Source): Add support for skipping
911         sources coming from an encapsulated library.
912
913 2012-01-30  Ed Schonberg  <schonberg@adacore.com>
914
915         * sem_ch3.adb (Process-Full_View): fix typo.
916         * sem_ch13.adb (Aalyze_Aspect_Specifications): if predicates
917         appear on a private type and the full view is available, ensure
918         existence of freeze node for full view.
919         (Build_Predicate_Function): Attach predicate function to both
920         views of a private type.
921
922 2012-01-30  Vincent Celier  <celier@adacore.com>
923
924         * prj-nmsc.adb (Check_Interfaces): Compute the Lib_Interface_ALIs
925         for the project if either attribute Library_Interface or
926         Interfaces is declared.
927         (Check_Stand_Alone_Library): Use Lib_Interface_ALIs computed in
928         Check_Interfaces.
929
930 2012-01-30  Pascal Obry  <obry@adacore.com>
931
932         * prj-proc.adb (Recursive_Process): Set From_Encapsulated_Lib
933         boolean value to true in the process list created by this routine.
934         * prj.ads (Project_List_Element): New field From_Encapsulated_Lib.
935         Continued work for KA06-021.
936         * prj.adb (Compute_All_Imported_Projects): Set
937         From_Encapsulated_Lib boolean flag.
938
939 2012-01-30  Vincent Pucci  <pucci@adacore.com>
940
941         * sem_dim.adb (Expand_Put_Call_With_Dimension_Symbol): Minor
942         code clean up.
943         * s-diflio.ads: Minor change.
944
945 2012-01-30  Javier Miranda  <miranda@adacore.com>
946
947         * exp_ch9.adb (Build_Dispatching_Requeue): Add missing call
948         to Get_Entry_Index.  Required to generate code which provides
949         the correct value of Entry_Index in the target entry.
950
951 2012-01-30  Nicolas Roche  <roche@adacore.com>
952
953         * system-vxworks-ppc.ads: Add pragma Linker_Options -crtbe to
954         fix issue with zcx on VxWorks5.
955
956 2012-01-30  Pascal Obry  <obry@adacore.com>
957
958         * prj.ads, prj.adb (For_Every_Project_Imported): Remove
959         In_Aggregate_Lib.
960         (For_Every_Project_Imported_Context): New generic routine with
961         a context parameter.
962         * prj-nmsc.adb: Revert to use For_Every_Project_Imported Avoid
963         distributed complexity.
964         * prj-env.adb, prj-conf.adb, makeutl.adb, gnatcmd.adb: Ditto.
965
966 2012-01-30  Thomas Quinot  <quinot@adacore.com>
967
968         * exp_aggr.adb (Expand_Record_Aggregate): After creating the
969         _parent aggregate for an extension aggregate, check whether it
970         requires delayed (top-down) expansion.
971
972 2012-01-30  Vincent Pucci  <pucci@adacore.com>
973
974         * sem_dim.adb (Expand_Put_Call_With_Dimension_Symbol): Rewritten.
975         * snames.ads-tmpl: Name_Item and Name_Symbols added.
976         * s-diflio.adb, s-diflio.ads, s-diinio.adb, s-diinio.ads: Rename
977         and change the position of parameter Symbols in every Put routine.
978         * s-dimmks.ads: Convert long float type Mks_Type into long
979         long float.
980         * s-llflex.ads: Modifications in comments.
981
982 2012-01-30  Hristian Kirtchev  <kirtchev@adacore.com>
983
984         * sem_ch12.adb (Earlier): Do not use the
985         top level source locations of the two input nodes.
986
987 2012-01-30  Robert Dewar  <dewar@adacore.com>
988
989         * einfo.ads, sem_prag.adb, sem_attr.adb, aspects.ads,
990         sem_cat.adb, sem_aggr.adb, exp_aggr.adb: Minor reformatting.
991
992 2012-01-30  Robert Dewar  <dewar@adacore.com>
993
994         * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb: Minor reformatting.
995
996 2012-01-30  Olivier Hainque  <hainque@adacore.com>
997
998         * sigtramp-ppcvxw.c (CFI_COMMON_REGS): Add rule for r1 back +
999         comments.
1000
1001 2012-01-30  Thomas Quinot  <quinot@adacore.com>
1002
1003         * gnat_rm.texi, sem_dist.adb, sem_dist.ads, einfo.ads, sem_prag.adb,
1004         sem_ch12.adb, sem_attr.adb, aspects.adb, aspects.ads, par-prag.adb,
1005         sem_cat.adb, snames.ads-tmpl (Sem_Dist.Is_Valid_Remote_Object_Type):
1006         New subprogram (extracted from
1007         Sem_Cat.Validate_Remote_Access_Object_Type_Declaration).
1008         (Einfo.Is_Remote_Types): Now applies to generic types. Update
1009         documentation accordingly.
1010         (Sem_Ch12.Analyze_Associations): A RACW type is acceptable as
1011         actual for a formal type to which a pragma Remote_Access_Type
1012         applies.
1013         (Aspects, Par.Prag, Sem_Prag): Support for new pramga/aspect
1014         Remote_Access_Type.
1015         (Sem_Attr.Analyze_Attribute, case Stub_Type): Attribute can
1016         be applied to a generic type if pragma Remote_Access_Type
1017         applies, in which case the type of the attribute is
1018         System.Partition_Interface.RACW_Stub_Type.
1019
1020 2012-01-27  Eric Botcazou  <ebotcazou@adacore.com>
1021
1022         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Do not set
1023         an alignment on fields of the RETURN type built for the CICO mechanism.
1024
1025 2012-01-27  Eric Botcazou  <ebotcazou@adacore.com>
1026
1027         * gcc-interface/trans.c (gnat_to_gnu): Avoid making a SAVE_EXPR for
1028         a call to a function that returns an unconstrained type with default
1029         discriminant.  Similarly, avoid doing the conversion to the nominal
1030         result type in this case.
1031
1032 2012-01-27  Eric Botcazou  <ebotcazou@adacore.com>
1033
1034         * gcc-interface/ada-tree.h (DECL_ALIASED_P): New flag.
1035         * gcc-interface/decl.c (is_variable_size): Rename to...
1036         (type_has_variable_size): ...this.
1037         (adjust_packed): Adjust to above renaming.
1038         (gnat_to_gnu_field): Set DECL_ALIASED_P on the field.
1039         (field_is_artificial): New predicate.
1040         (field_is_aliased): Likewise.
1041         (field_has_self_size): Likewise.
1042         (field_has_variable_size): Likewise.
1043         (components_to_record): Record information for the final layout during
1044         the first pass on fields.
1045         If there is an aliased field placed after a field whose length depends
1046         on discriminants, put all the fields of the latter sort, last.
1047
1048 2012-01-27  Eric Botcazou  <ebotcazou@adacore.com>
1049
1050         * gcc-interface/gigi.h (get_minimal_subprog_decl): Declare.
1051         * gcc-interface/decl.c (get_minimal_subprog_decl): New function.
1052         * gcc-interface/trans.c (Attribute_to_gnu): Use it for the prefix of an
1053         Access-like attribute in a dispatch table if the subprogram is public.
1054
1055 2012-01-27  Eric Botcazou  <ebotcazou@adacore.com>
1056
1057         * gcc-interface/gigi.h (create_label_decl): Adjust.
1058         * gcc-interface/utils.c (create_label_decl): Add GNAT_NODE parameter
1059         and invoke gnat_pushdecl on it.  Remove obsolete settings.
1060         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Label>: Adjust call to
1061         create_label_decl.
1062         * gcc-interface/trans.c (gnat_to_gnu) <N_Null): Likewise.  Ignore the
1063         label for debugging purposes.
1064
1065 2012-01-27  Eric Botcazou  <ebotcazou@adacore.com>
1066
1067         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: For an aliased
1068         object with an unconstrained nominal subtype and if optimization isn't
1069         enabled, create a special VAR_DECL for debugging purposes.
1070
1071 2012-01-23  Robert Dewar  <dewar@adacore.com>
1072
1073         * sem_prag.ads, sem_prag.adb: Minor reformatting.
1074
1075 2012-01-23  Robert Dewar  <dewar@adacore.com>
1076
1077         * sem_ch13.adb (Analyze_Aspect_Specifications): Check for
1078         language defined aspect applied to renaming or formal type
1079         declaration (not permitted)
1080
1081 2012-01-23  Matthew Heaney  <heaney@adacore.com>
1082
1083         * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb (Vet): Replaced
1084         comment with pragma Assert.
1085
1086 2012-01-23  Vincent Pucci  <pucci@adacore.com>
1087
1088         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Call
1089         to Make_Aspect_For_PPC_In_Gen_Sub_Decl added in ASIS mode.
1090         * sem_prag.adb, sem_prag.ads (Make_Aspect_For_PPC_In_Gen_Sub_Decl): New
1091         routine. In ASIS mode, convert any PPC pragmas into aspects in generic
1092         subprogram declaration in order to enable the analysis of PPC boolean
1093         expressions.
1094
1095 2012-01-23  Robert Dewar  <dewar@adacore.com>
1096
1097         * sem_ch3.adb (Analyze_Object_Declaration): Properly
1098         handle Current_Value for volatile variables (also propagate
1099         Treat_As_Volatile from type to object).
1100
1101 2012-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
1102
1103         * sem_ch12.adb (Install_Body): Detect the case
1104         where the enclosing context is a package with a stub body that
1105         has already been replaced by the actual body. In such cases,
1106         the freeze node for the enclosing context must be inserted after
1107         the real body.
1108
1109 2012-01-23  Ed Schonberg  <schonberg@adacore.com>
1110
1111         * sem_prag.adb (Analyze_Pragma, case Debug): Freeze the called
1112         subprogram before expanding the pragma into an if-statement with
1113         a block, to ensure that when the subprogram is null its body is
1114         properly generated before expansion.
1115
1116 2012-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
1117
1118         * sem_ch12.adb (Analyze_Associations): Alphabetize local variables and
1119         constants. Rename Actual_Types to Actuals_To_Freeze. Rename Next_Formal
1120         to Saved_Formal.
1121         Freeze all eligible subprograms which appear as actuals in
1122         the instantiation.
1123         (Has_Fully_Defined_Profile): New routine.
1124         (Renames_Standard_Subprogram): New routine.
1125         (Earlier): Add local variable N. Comment update. Do not use source
1126         locations when trying to determine whether one node precedes another.
1127
1128 2012-01-23  Gary Dismukes  <dismukes@adacore.com>
1129
1130         * exp_ch4.adb (Expand_Concatenate): In the case
1131         where the result of a concatentation can be null, set the to
1132         result have both the low and high bounds of the right operand (not
1133         just the high bound, as was the case prior to this fix). Also,
1134         fix the saved high bound setting (Last_Opnd_High_Bound) in the
1135         empty string literal case (should have been low bound minus one,
1136         rather than plus one).
1137
1138 2012-01-23  Thomas Quinot  <quinot@adacore.com>
1139
1140         * scos.ads, put_scos.adb, get_scos.adb (Get_SCOs, Put_SCOs): Do not
1141         omit statement SCOs for disabled pragmas.
1142
1143 2012-01-23  Matthew Heaney  <heaney@adacore.com>
1144
1145         * a-cohase.ads, a-cihase.ads, a-cbhase.ads, a-coorse.ads,
1146         a-ciorse.ads, a-cborse.ads, a-cohama.ads, a-cihama.ads, a-cbhama.ads,
1147         a-coorma.ads, a-ciorma.ads, a-cborma.ads, a-cdlili.ads, a-cidlli.ads,
1148         a-cbdlli.ads, a-convec.ads, a-coinve.ads, a-cobove.ads (Cursor'Read,
1149         Cursor'Write): Declare in private part.
1150         (Reference_Type'Read, Reference_Type'Write): Ditto.
1151         (Constant_Reference_Type'Read, Constant_Reference_Type'Write): Ditto.
1152
1153 2012-01-23  Robert Dewar  <dewar@adacore.com>
1154
1155         * a-catizo.ads, a-calend.adb, a-calend.ads, par-ch13.adb: Minor
1156         reformatting.
1157
1158 2012-01-23  Ed Schonberg  <schonberg@adacore.com>
1159
1160         * sem_ch6.adb (Analyze_Subprogram_Declaration): Do not set the
1161         Corresponding_Body on a defaulted null formal subprogram.
1162         * sem_ch12.adb (Check_Formal_Package_Instance): No check needed
1163         on a defaulted formal subprogram that is a null procedure.
1164
1165 2012-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
1166
1167         * exp_ch9.adb: Update the comments involving pragma Implemented.
1168         * sem_ch3.adb (Check_Pragma_Implemented (Entity_Id)): Add local
1169         constant Subp_Alias and local variable Impl_Subp. Properly
1170         handle aliases of synchronized wrappers. Code cleanup.
1171         (Check_Pragma_Implemented (Entity_Id; Entity_Id)): Add
1172         Name_Optional as part of the condition.
1173         * sem_prag.adb (Analyze_Pragma): Add "Optional" as one of the
1174         valid choices of implementation kind.
1175         (Check_Arg_Is_One_Of): New routine.
1176         * snames.ads-tmlp: Add Name_Optional.
1177
1178 2012-01-23  Ed Schonberg  <schonberg@adacore.com>
1179
1180         * par-ch13.adb: Better error recovery in illegal aspect
1181         specification.
1182
1183 2012-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
1184
1185         * a-calend.adb: Add with clause for Interfaces.C. Add constant
1186         Unix_Max.
1187         (Day_Of_Week): Call the internal UTC_Time_Offset.
1188         (Split): Call the internal UTC_Time_Offset.
1189         (Time_Of): Call the internal UTC_Time_Offset.
1190         (Time_Zone_Operations.UTC_Time_Offset): Call internal UTC_Time_Offset.
1191         (UTC_Time_Offset): New library-level routine.
1192         * a-calend.ads (UTC_Time_Offset): Remove parameter
1193         Is_Historic. Update related comment on usage.
1194         * a-catizo.adb (UTC_Time_Offset): Removed.
1195         (UTC_Time_Offset (Time)): Call Time_Zone_Operations.UTC_Time_Offset.
1196         * a-caltizo.ads (UTC_Time_Offset): Removed.
1197         (UTC_Time_Offset (Time)): Add back the default expression of parameter
1198         Date.
1199
1200 2012-01-23  Robert Dewar  <dewar@adacore.com>
1201
1202         * sprint.ads, sprint.adb (Sprint_Node_List): Add New_Lines parameter
1203         (pg,po,ps): Make sure each entry starts on new line.
1204
1205 2012-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
1206
1207         * a-calend.ads, a-calend.adb: Define types int and int_Pointer. Update
1208         the parameter profile of procedure localtime_tzoff and its associated
1209         comment.
1210         (Day_Of_Week): Do not treat the input date as historical
1211         with respect to time zones.
1212         (Split): Do not treat the input
1213         date as historical with respect to time zones.  (Time_Of): Do
1214         not treat the input constituents as forming a historical date
1215         with respect to time zones.
1216         (UTC_Time_Offset): Add new formal
1217         parameter Is_Historic. Add local variable Flag. Update the call
1218         to localtime_tzoff.
1219         * a-catizo.ads, a-catizo.adb (UTC_Time_Offset): New routine.
1220         (UTC_Time_Offset (Time)): Update the call to
1221         Time_Zone_Operations.UTC_Time_Offset.
1222         * sysdep.c (__gnat_localtime_tzoff): Update parameter
1223         profile. Split the processing of offsets on Windows into two - one
1224         part of historic time stamps and the other for the current time.
1225
1226 2012-01-23  Robert Dewar  <dewar@adacore.com>
1227
1228         * a-calend.adb: Minor reformatting.
1229
1230 2012-01-23  Ed Schonberg  <schonberg@adacore.com>
1231
1232         * exp_ch9.adb, sem_ch9.adb: Handle array of access to synchronized
1233         interface in requeue statement.
1234
1235 2012-01-23  Cyrille Comar  <comar@adacore.com>
1236
1237         * projects.texi: Remove references to main units and replace
1238         with references to main programs to be coherent with the
1239         documentation.
1240
1241 2012-01-23  Robert Dewar  <dewar@adacore.com>
1242
1243         * s-utf_32.adb: Minor reformatting.
1244
1245 2012-01-23  Vincent Celier  <celier@adacore.com>
1246
1247         * snames.ads-tmpl: Minor comment addition Indicate that
1248         Name_Library_Encapsulated_Options is only used in gprbuild.
1249
1250 2012-01-23  Robert Dewar  <dewar@adacore.com>
1251
1252         * sem_ch10.adb (Analyze_Subunit): Properly save/restore cunit
1253         restrictions.
1254
1255 2012-01-23  Ed Schonberg  <schonberg@adacore.com>
1256
1257         * snames.ads-tmpl: Add Name_Synchronization.
1258         * aspects.ads, aspects.adb: Add Aspect_Synchronization to
1259         enumeration type and related maps.
1260         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle Aspect
1261         Synchronization, build corresponding pragma Implemented.
1262         * sem_util.adb (Implementation_Kind): Handle both explicit and
1263         implicit pragma_argument association to retrieve the given
1264         synchronization mode.
1265
1266 2012-01-23  Robert Dewar  <dewar@adacore.com>
1267
1268         * sem_ch10.adb, errout.adb: Minor reformatting.
1269
1270 2012-01-23  Ed Schonberg  <schonberg@adacore.com>
1271
1272         * sem_res.adb (Resolve_Actuals): An actual in a call to an
1273         Ada 2012 Reference function does not lead to a dangerous order
1274         dependence.
1275
1276 2012-01-23  Gary Dismukes  <dismukes@adacore.com>
1277
1278         * exp_util.adb (Is_Iterated_Container): Test
1279         Is_Entity_Name when searching for calls to the default iterator,
1280         to avoid blowing up on indirect calls which have an explicit
1281         dereference as the call name.
1282
1283 2012-01-23  Thomas Quinot  <quinot@adacore.com>
1284
1285         * errout.adb (Set_Msg_Node): For an N_Expanded_Name, output
1286         the complete expanded name, rather than just its Selector_Name.
1287
1288 2012-01-23  Thomas Quinot  <quinot@adacore.com>
1289
1290         * a-textio.adb (Put): Rewrite one-parameter Character version to
1291         just call the two-parameter one with Current_Out.
1292
1293 2012-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
1294
1295         * freeze.adb (Check_Current_Instance): Issue an
1296         error when the prefix of 'Unchecked_Access or 'Access does not
1297         denote a legal aliased view of a type.
1298         (Freeze_Record_Type): Do not halt the processing of record components
1299         once the Has_Controlled_Component is set as this bypasses the remaining
1300         checks.
1301         (Is_Aliased_View_Of_Type): New routine.
1302
1303 2012-01-23  Thomas Quinot  <quinot@adacore.com>
1304
1305         * errout.ads, freeze.adb: Minor reformatting.
1306
1307 2012-01-23  Thomas Quinot  <quinot@adacore.com>
1308
1309         * sem_ch10.adb, sem_prag.adb: Remove redundant apostrophes in error
1310         messages.
1311
1312 2012-01-23  Olivier Hainque  <hainque@adacore.com>
1313
1314         * adadecode.c (__gnat_decode): Deal with empty input early,
1315         preventing potential erroneous memory access later on.
1316
1317 2012-01-21  Eric Botcazou  <ebotcazou@adacore.com>
1318
1319         PR ada/46192
1320         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: In the case of a
1321         renaming, preserve the volatileness through the indirection, if any.
1322
1323 2012-01-14  Andreas Schwab  <schwab@linux-m68k.org>
1324
1325         * gcc-interface/Makefile.in (OSCONS_EXTRACT): Add
1326         $(GNATLIBCFLAGS).
1327
1328 2012-01-10  Pascal Obry  <obry@adacore.com>
1329
1330         * prj-nmsc.adb (Check_Library_Attributes):
1331         Kill check for object/source directories for aggregate libraries.
1332
1333 2012-01-10  Matthew Heaney  <heaney@adacore.com>
1334
1335         * a-cdlili.adb, a-cdlili.ads, a-cihama.adb, a-cihama.ads, a-coinve.adb,
1336         a-coinve.ads, a-ciorse.adb, a-ciorse.ads, a-coorma.adb, a-coorma.ads,
1337         a-cborma.adb, a-cborma.ads, a-cidlli.adb, a-cidlli.ads, a-cimutr.adb,
1338         a-cimutr.ads, a-cihase.adb, a-cihase.ads, a-cohama.adb, a-cohama.ads,
1339         a-coorse.adb, a-coorse.ads, a-cbhama.adb, a-cbhama.ads, a-cborse.adb,
1340         a-cborse.ads, a-comutr.adb, a-comutr.ads, a-ciorma.adb, a-cobove.adb,
1341         a-ciorma.ads, a-cobove.ads, a-convec.adb, a-convec.ads, a-cohase.adb,
1342         a-cohase.ads, a-cbdlli.adb, a-cbdlli.ads, a-cbmutr.adb, a-cbmutr.ads,
1343         a-cbhase.adb, a-cbhase.ads (Reference, Constant_Reference): Declare
1344         container parameter as aliased in/in out.
1345         Code clean ups.
1346
1347 2012-01-10  Bob Duff  <duff@adacore.com>
1348
1349         * s-os_lib.ads: Improve comment.
1350
1351 2012-01-10  Geert Bosch  <bosch@adacore.com>
1352
1353         * s-gearop.adb (Forward_Eliminate): Avoid improper aliasing
1354         for complex Scalar.
1355
1356 2012-01-10  Bob Duff  <duff@adacore.com>
1357
1358         * sem_intr.adb (Check_Shift): Use RM_Size instead of Esize, when
1359         checking that the 'Size is correct. If the type is "mod 2**12",
1360         for example, it's illegal, but Esize is the 'Object_Size, which
1361         will be something like 16 or 32, so the error ('Size = 12) was
1362         not detected.
1363         * gnat_rm.texi: Improve documentation of shift
1364         and rotate intrinsics.
1365
1366 2012-01-10  Pascal Obry  <obry@adacore.com>
1367
1368         * prj.adb (For_Every_Project_Imported): Fix
1369         implementation to make sure we return each project only once
1370         for aggragte libraries. It is fine to return a project twice for
1371         aggregate projects, this was the case as a Project_Id is different
1372         in each project tree. The new implementation use a table based on
1373         the project name to ensure proper detection of duplicate project
1374         in aggregate library. A new context is then created to continue
1375         retrurning duplicate project for aggregate libraries.
1376
1377 2012-01-09  Eric Botcazou  <ebotcazou@adacore.com>
1378
1379         * gcc-interface/trans.c (call_to_gnu): Create the temporary for the
1380         return value in the variable-sized return type case if the target is
1381         an array with fixed size.  However, do not create it if this is the
1382         expression of an object declaration.
1383
1384 2012-01-09  Eric Botcazou  <ebotcazou@adacore.com>
1385
1386         * gcc-interface/trans.c (addressable_p) <COMPONENT_REF>: Fix thinko.
1387
1388 2012-01-06  Robert Dewar  <dewar@adacore.com>
1389
1390         * a-wichha.ads, a-wichun.ads, a-zchhan.ads, a-zchuni.ads,
1391         s-utf_32.ads: Add pragma Pure
1392         * s-utf_32.adb: Suppress warnings on non-static constants (now
1393         that this is Pure).
1394
1395 2012-01-06  Bob Duff  <duff@adacore.com>
1396
1397         * s-rpc.ads (Read, Write): Add overriding indicators.
1398
1399 2012-01-06  Robert Dewar  <dewar@adacore.com>
1400
1401         * gnat_rm.texi: Add documentation for conventions
1402         Ada_Pass_By_Copy and Ada_Pass_By_Reference.
1403
1404 2012-01-06  Gary Dismukes  <dismukes@adacore.com>
1405
1406         * a-tienio.adb (Put): Add exception message on
1407         raise statements. Remove unneeded blocks and object declarations.
1408
1409 2012-01-06  Robert Dewar  <dewar@adacore.com>
1410
1411         * sem_prag.adb: Minor reformatting.
1412
1413 2012-01-06  Ed Schonberg  <schonberg@adacore.com>
1414
1415         * sinfo.ads, sinfo.adb (Has_Prefixed_Call): New flag to indicate
1416         that a selected component within a generic unit has been resolved
1417         as a prefixed call with local references.
1418         * sem_ch3.adb (Is_Visible_Component): In an instance body a selected
1419         component is always visible.
1420         * sem_ch4.adb (Analyze_Selected_Component): If the node is a
1421         prefixed call in an instance, do not look for visible components
1422         of the type.
1423         * sem_ch12.adb (Reset_Entity): If a selected component has resolved
1424         to a prefixed call, mark the node accordingly when prefix and
1425         selector are local references.
1426
1427 2012-01-02  Eric Botcazou  <ebotcazou@adacore.com>
1428
1429         * gnatvsn.ads (Current_Year): Bump to 2012.
1430 \f
1431 Copyright (C) 2012 Free Software Foundation, Inc.
1432
1433 Copying and distribution of this file, with or without modification,
1434 are permitted in any medium without royalty provided the copyright
1435 notice and this notice are preserved.