OSDN Git Service

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