OSDN Git Service

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